Hugintrunk
0.1
|
List all control points of this project. More...
#include <CPListFrame.h>
Public Member Functions | |
CPListCtrl () | |
~CPListCtrl () | |
bool | Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxLC_REPORT|wxLC_VIRTUAL, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxListCtrlNameStr) |
void | Init (HuginBase::Panorama *pano) |
virtual void | panoramaChanged (HuginBase::Panorama &pano) |
Notification about a Panorama change. More... | |
virtual void | panoramaImagesChanged (HuginBase::Panorama &pano, const HuginBase::UIntSet &changed) |
notifies about changes to images More... | |
void | DeleteSelected () |
Delete the selected points. More... | |
void | SelectDistanceThreshold (double threshold) |
select all cp with the given error bigger than the threshold More... | |
void | SelectAll () |
select all items More... | |
Public Member Functions inherited from HuginBase::PanoramaObserver | |
virtual | ~PanoramaObserver () |
Protected Member Functions | |
virtual wxString | OnGetItemText (long item, long column) const |
create labels for virtual list control More... | |
virtual int | OnGetItemImage (long item) const |
show no images More... | |
void | OnCPListSelectionChanged (wxListEvent &e) |
selection event handler More... | |
void | OnCPListHeaderClick (wxListEvent &e) |
sort criterium changed More... | |
void | OnColumnWidthChange (wxListEvent &e) |
column width changed More... | |
void | OnChar (wxKeyEvent &e) |
handle keystrokes More... | |
Private Member Functions | |
void | UpdateInternalCPList () |
void | SortInternalList (bool isAscending) |
Private Attributes | |
HuginBase::Panorama * | m_pano |
int | m_sortCol |
bool | m_sortAscend |
bool | m_onlyActiveImages = false |
std::vector< CPListItem > | m_internalCPList |
std::map< std::string, int > | m_localIds |
List all control points of this project.
useful to jump to a specific point, or see which point are bad
Definition at line 43 of file CPListFrame.h.
CPListCtrl::CPListCtrl | ( | ) |
Definition at line 72 of file CPListFrame.cpp.
References m_sortAscend, and m_sortCol.
CPListCtrl::~CPListCtrl | ( | ) |
Definition at line 78 of file CPListFrame.cpp.
References m_pano, m_sortAscend, m_sortCol, and HuginBase::Panorama::removeObserver().
bool CPListCtrl::Create | ( | wxWindow * | parent, |
wxWindowID | id = wxID_ANY , |
||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxLC_REPORT | wxLC_VIRTUAL , |
||
const wxValidator & | validator = wxDefaultValidator , |
||
const wxString & | name = wxListCtrlNameStr |
||
) |
Definition at line 90 of file CPListFrame.cpp.
References MainFrame::Get(), m_sortAscend, and m_sortCol.
void CPListCtrl::DeleteSelected | ( | ) |
Delete the selected points.
Definition at line 403 of file CPListFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_DEBUG, MainFrame::Get(), PanoCommand::GlobalCmdHist::getInstance(), m_internalCPList, m_pano, and MainFrame::ShowCtrlPoint().
Referenced by OnChar(), and CPListFrame::OnDeleteButton().
void CPListCtrl::Init | ( | HuginBase::Panorama * | pano | ) |
Definition at line 124 of file CPListFrame.cpp.
References HuginBase::Panorama::addObserver(), m_pano, and panoramaChanged().
|
protected |
handle keystrokes
Definition at line 466 of file CPListFrame.cpp.
References DeleteSelected(), and SelectAll().
|
protected |
column width changed
Definition at line 397 of file CPListFrame.cpp.
|
protected |
sort criterium changed
Definition at line 380 of file CPListFrame.cpp.
References m_sortAscend, m_sortCol, and SortInternalList().
|
protected |
selection event handler
Definition at line 369 of file CPListFrame.cpp.
References MainFrame::Get(), m_internalCPList, and MainFrame::ShowCtrlPoint().
|
protectedvirtual |
show no images
Definition at line 178 of file CPListFrame.cpp.
|
protectedvirtual |
create labels for virtual list control
Definition at line 131 of file CPListFrame.cpp.
References HuginBase::ControlPoint::error, HuginBase::Panorama::getCtrlPoint(), HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, m_internalCPList, m_pano, HuginBase::ControlPoint::mode, HuginBase::ControlPoint::X, HuginBase::ControlPoint::X_Y, and HuginBase::ControlPoint::Y.
|
virtual |
Notification about a Panorama change.
This function will always be called, even when the change could be handled by panoramaImageAdded() or other notify functions.
This allows lazy observers to just listen to panoramaChanged().
Implements HuginBase::PanoramaObserver.
Definition at line 183 of file CPListFrame.cpp.
References MainFrame::Get(), MainFrame::GetOptimizeOnlyActiveImages(), MainFrame::IsShowingCorrelation(), m_internalCPList, m_onlyActiveImages, and UpdateInternalCPList().
Referenced by Init().
|
inlinevirtual |
notifies about changes to images
Images might have been added/removed. to find out how many images are still there, use Panorama::getNrOfImages.
pano | the panorama object that changed |
changed | set of changed images |
Implements HuginBase::PanoramaObserver.
Definition at line 58 of file CPListFrame.h.
void CPListCtrl::SelectAll | ( | ) |
select all items
Definition at line 458 of file CPListFrame.cpp.
References m_internalCPList.
Referenced by OnChar().
void CPListCtrl::SelectDistanceThreshold | ( | double | threshold | ) |
select all cp with the given error bigger than the threshold
Definition at line 441 of file CPListFrame.cpp.
References HuginBase::Panorama::getCtrlPoints(), m_internalCPList, m_pano, and threshold().
Referenced by CPListFrame::OnSelectButton().
|
private |
Definition at line 293 of file CPListFrame.cpp.
References HuginBase::Panorama::getCtrlPoints(), m_internalCPList, m_pano, m_sortAscend, and m_sortCol.
Referenced by OnCPListHeaderClick(), and UpdateInternalCPList().
|
private |
Definition at line 206 of file CPListFrame.cpp.
References HuginBase::Panorama::getActiveImages(), HuginBase::Panorama::getCtrlPoints(), CPListItem::globalIndex, HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, CPListItem::localNumber, m_internalCPList, m_localIds, m_onlyActiveImages, m_pano, makePairId(), set_contains(), and SortInternalList().
Referenced by panoramaChanged().
|
private |
Definition at line 87 of file CPListFrame.h.
Referenced by DeleteSelected(), OnCPListSelectionChanged(), OnGetItemText(), panoramaChanged(), SelectAll(), SelectDistanceThreshold(), SortInternalList(), and UpdateInternalCPList().
|
private |
Definition at line 88 of file CPListFrame.h.
Referenced by UpdateInternalCPList().
|
private |
Definition at line 86 of file CPListFrame.h.
Referenced by panoramaChanged(), and UpdateInternalCPList().
|
private |
Definition at line 82 of file CPListFrame.h.
Referenced by DeleteSelected(), Init(), OnGetItemText(), SelectDistanceThreshold(), SortInternalList(), UpdateInternalCPList(), and ~CPListCtrl().
|
private |
Definition at line 85 of file CPListFrame.h.
Referenced by CPListCtrl(), Create(), OnCPListHeaderClick(), SortInternalList(), and ~CPListCtrl().
|
private |
Definition at line 84 of file CPListFrame.h.
Referenced by CPListCtrl(), Create(), OnCPListHeaderClick(), SortInternalList(), and ~CPListCtrl().