CPListCtrl Class Reference

List all control points of this project. More...

#include <CPListFrame.h>

Inheritance diagram for CPListCtrl:

Inheritance graph
[legend]
List of all members.

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.
virtual void panoramaImagesChanged (HuginBase::Panorama &pano, const HuginBase::UIntSet &changed)
 notifies about changes to images
void DeleteSelected ()
 Delete the selected points.
void SelectDistanceThreshold (double threshold)
 select all cp with the given error bigger than the threshold
void SelectAll ()
 select all items

Protected Member Functions

virtual wxString OnGetItemText (long item, long column) const
 create labels for virtual list control
void OnCPListSelectionChanged (wxListEvent &e)
 selection event handler
void OnCPListHeaderClick (wxListEvent &e)
 sort criterium changed
void OnColumnWidthChange (wxListEvent &e)
 column width changed
void OnChar (wxKeyEvent &e)
 handle keystrokes

Private Member Functions

void UpdateInternalCPList ()
void SortInternalList (bool isAscending)

Private Attributes

HuginBase::Panoramam_pano
int m_sortCol
bool m_sortAscend
bool m_onlyActiveImages = false
std::vector< CPListItemm_internalCPList
std::map< std::string, int > m_localIds

Detailed Description

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.


Constructor & Destructor Documentation

CPListCtrl::CPListCtrl (  ) 

Definition at line 71 of file CPListFrame.cpp.

References m_sortAscend, and m_sortCol.

CPListCtrl::~CPListCtrl (  ) 

Definition at line 77 of file CPListFrame.cpp.

References m_pano, and HuginBase::Panorama::removeObserver().


Member Function Documentation

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 85 of file CPListFrame.cpp.

void CPListCtrl::DeleteSelected (  ) 

Delete the selected points.

Definition at line 377 of file CPListFrame.cpp.

References 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 113 of file CPListFrame.cpp.

References HuginBase::Panorama::addObserver(), m_pano, and panoramaChanged().

void CPListCtrl::OnChar ( wxKeyEvent &  e  )  [protected]

handle keystrokes

Definition at line 440 of file CPListFrame.cpp.

References DeleteSelected(), and SelectAll().

void CPListCtrl::OnColumnWidthChange ( wxListEvent &  e  )  [protected]

column width changed

Definition at line 371 of file CPListFrame.cpp.

void CPListCtrl::OnCPListHeaderClick ( wxListEvent &  e  )  [protected]

sort criterium changed

Definition at line 355 of file CPListFrame.cpp.

References m_sortAscend, m_sortCol, and SortInternalList().

void CPListCtrl::OnCPListSelectionChanged ( wxListEvent &  e  )  [protected]

selection event handler

Definition at line 344 of file CPListFrame.cpp.

References MainFrame::Get(), m_internalCPList, and MainFrame::ShowCtrlPoint().

wxString CPListCtrl::OnGetItemText ( long  item,
long  column 
) const [protected, virtual]

create labels for virtual list control

Definition at line 120 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.

void CPListCtrl::panoramaChanged ( HuginBase::Panorama pano  )  [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 167 of file CPListFrame.cpp.

References MainFrame::Get(), MainFrame::GetOptimizeOnlyActiveImages(), m_internalCPList, m_onlyActiveImages, and UpdateInternalCPList().

Referenced by Init().

virtual void CPListCtrl::panoramaImagesChanged ( HuginBase::Panorama pano,
const HuginBase::UIntSet changed 
) [inline, virtual]

notifies about changes to images

Images might have been added/removed. to find out how many images are still there, use Panorama::getNrOfImages.

Parameters:
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 432 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 415 of file CPListFrame.cpp.

References HuginBase::Panorama::getCtrlPoints(), m_internalCPList, and m_pano.

Referenced by CPListFrame::OnSelectButton().

void CPListCtrl::SortInternalList ( bool  isAscending  )  [private]

Referenced by OnCPListHeaderClick(), and UpdateInternalCPList().

void CPListCtrl::UpdateInternalCPList (  )  [private]

Definition at line 175 of file CPListFrame.cpp.

References HuginBase::Panorama::getActiveImages(), HuginBase::Panorama::getCtrlPoints(), CPListItem::globalIndex, CPListItem::localNumber, m_internalCPList, m_localIds, m_onlyActiveImages, m_pano, makePairId(), set_contains(), and SortInternalList().

Referenced by panoramaChanged().


Member Data Documentation

std::vector<CPListItem> CPListCtrl::m_internalCPList [private]

Definition at line 85 of file CPListFrame.h.

Referenced by CompareStruct(), DeleteSelected(), OnCPListSelectionChanged(), OnGetItemText(), panoramaChanged(), SelectAll(), SelectDistanceThreshold(), and UpdateInternalCPList().

std::map<std::string, int> CPListCtrl::m_localIds [private]

Definition at line 86 of file CPListFrame.h.

Referenced by UpdateInternalCPList().

bool CPListCtrl::m_onlyActiveImages = false [private]

Definition at line 84 of file CPListFrame.h.

Referenced by panoramaChanged(), and UpdateInternalCPList().

HuginBase::Panorama* CPListCtrl::m_pano [private]

Definition at line 80 of file CPListFrame.h.

Referenced by CompareStruct(), DeleteSelected(), Init(), OnGetItemText(), SelectDistanceThreshold(), UpdateInternalCPList(), and ~CPListCtrl().

bool CPListCtrl::m_sortAscend [private]

Definition at line 83 of file CPListFrame.h.

Referenced by CompareStruct(), CPListCtrl(), and OnCPListHeaderClick().

int CPListCtrl::m_sortCol [private]

Definition at line 82 of file CPListFrame.h.

Referenced by CompareStruct(), CPListCtrl(), and OnCPListHeaderClick().


The documentation for this class was generated from the following files:
Generated on 26 Apr 2018 for Hugintrunk by  doxygen 1.4.7