Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
CPListCtrl Class Reference

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

#include <CPListFrame.h>

Inheritance diagram for CPListCtrl:
Inheritance graph

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::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 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().

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

References MainFrame::Get(), m_sortAscend, m_sortCol, celeste::max(), and SetColumnImage().

void CPListCtrl::DeleteSelected ( )
void CPListCtrl::Init ( HuginBase::Panorama pano)

Definition at line 158 of file CPListFrame.cpp.

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

void CPListCtrl::OnChar ( wxKeyEvent &  e)
protected

handle keystrokes

Definition at line 515 of file CPListFrame.cpp.

References DeleteSelected(), and SelectAll().

void CPListCtrl::OnColumnWidthChange ( wxListEvent &  e)
protected

column width changed

Definition at line 446 of file CPListFrame.cpp.

void CPListCtrl::OnCPListHeaderClick ( wxListEvent &  e)
protected

sort criterium changed

Definition at line 414 of file CPListFrame.cpp.

References m_sortAscend, m_sortCol, SetColumnImage(), and SortInternalList().

void CPListCtrl::OnCPListSelectionChanged ( wxListEvent &  e)
protected

selection event handler

Definition at line 403 of file CPListFrame.cpp.

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

int CPListCtrl::OnGetItemImage ( long  item) const
protectedvirtual

show no images

Definition at line 212 of file CPListFrame.cpp.

wxString CPListCtrl::OnGetItemText ( long  item,
long  column 
) const
protectedvirtual
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 217 of file CPListFrame.cpp.

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

Referenced by Init().

virtual void CPListCtrl::panoramaImagesChanged ( HuginBase::Panorama pano,
const HuginBase::UIntSet changed 
)
inlinevirtual

notifies about changes to images

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

Parameters
panothe panorama object that changed
changedset of changed images

Implements HuginBase::PanoramaObserver.

Definition at line 58 of file CPListFrame.h.

void CPListCtrl::SelectAll ( )

select all items

Definition at line 507 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 490 of file CPListFrame.cpp.

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

Referenced by CPListFrame::OnSelectButton().

void CPListCtrl::SortInternalList ( bool  isAscending)
private
void CPListCtrl::UpdateInternalCPList ( )
private

Member Data Documentation

std::vector<CPListItem> CPListCtrl::m_internalCPList
private
std::map<std::string, int> CPListCtrl::m_localIds
private

Definition at line 88 of file CPListFrame.h.

Referenced by UpdateInternalCPList().

bool CPListCtrl::m_onlyActiveImages = false
private

Definition at line 86 of file CPListFrame.h.

Referenced by panoramaChanged(), and UpdateInternalCPList().

HuginBase::Panorama* CPListCtrl::m_pano
private
bool CPListCtrl::m_sortAscend
private

Definition at line 85 of file CPListFrame.h.

Referenced by CPListCtrl(), Create(), OnCPListHeaderClick(), SortInternalList(), and ~CPListCtrl().

int CPListCtrl::m_sortCol
private

Definition at line 84 of file CPListFrame.h.

Referenced by CPListCtrl(), Create(), OnCPListHeaderClick(), SortInternalList(), and ~CPListCtrl().


The documentation for this class was generated from the following files: