Hugin trunk 0.1
Loading...
Searching...
No Matches
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.
 
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
 
- 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
 
virtual int OnGetItemImage (long item) const
 show no images
 
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, intm_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::CPListCtrl ( )

Definition at line 65 of file CPListFrame.cpp.

References m_sortAscend, and m_sortCol.

◆ ~CPListCtrl()

CPListCtrl::~CPListCtrl ( )

Member Function Documentation

◆ Create()

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 
)

◆ DeleteSelected()

void CPListCtrl::DeleteSelected ( )

◆ Init()

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

Definition at line 123 of file CPListFrame.cpp.

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

Referenced by CPListFrame::CPListFrame().

◆ OnChar()

void CPListCtrl::OnChar ( wxKeyEvent e)
protected

handle keystrokes

Definition at line 465 of file CPListFrame.cpp.

References DeleteSelected(), SelectAll(), and threshold().

Referenced by Create().

◆ OnColumnWidthChange()

void CPListCtrl::OnColumnWidthChange ( wxListEvent e)
protected

column width changed

Definition at line 396 of file CPListFrame.cpp.

References threshold().

Referenced by Create().

◆ OnCPListHeaderClick()

void CPListCtrl::OnCPListHeaderClick ( wxListEvent e)
protected

sort criterium changed

Definition at line 379 of file CPListFrame.cpp.

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

Referenced by Create().

◆ OnCPListSelectionChanged()

void CPListCtrl::OnCPListSelectionChanged ( wxListEvent e)
protected

selection event handler

Definition at line 368 of file CPListFrame.cpp.

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

Referenced by Create().

◆ OnGetItemImage()

int CPListCtrl::OnGetItemImage ( long  item) const
protectedvirtual

show no images

Definition at line 177 of file CPListFrame.cpp.

◆ OnGetItemText()

wxString CPListCtrl::OnGetItemText ( long  item,
long  column 
) const
protectedvirtual

◆ panoramaChanged()

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

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

Referenced by Init().

◆ panoramaImagesChanged()

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.

◆ SelectAll()

void CPListCtrl::SelectAll ( )

select all items

Definition at line 457 of file CPListFrame.cpp.

References m_internalCPList, and threshold().

Referenced by OnChar().

◆ SelectDistanceThreshold()

void CPListCtrl::SelectDistanceThreshold ( double  threshold)

select all cp with the given error bigger than the threshold

Definition at line 440 of file CPListFrame.cpp.

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

Referenced by CPListFrame::OnSelectButton().

◆ SortInternalList()

void CPListCtrl::SortInternalList ( bool  isAscending)
private

◆ UpdateInternalCPList()

void CPListCtrl::UpdateInternalCPList ( )
private

Member Data Documentation

◆ m_internalCPList

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

◆ m_localIds

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

Definition at line 88 of file CPListFrame.h.

Referenced by UpdateInternalCPList().

◆ m_onlyActiveImages

bool CPListCtrl::m_onlyActiveImages = false
private

Definition at line 86 of file CPListFrame.h.

Referenced by panoramaChanged(), and UpdateInternalCPList().

◆ m_pano

HuginBase::Panorama* CPListCtrl::m_pano
private

◆ m_sortAscend

bool CPListCtrl::m_sortAscend
private

Definition at line 85 of file CPListFrame.h.

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

◆ m_sortCol

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: