Hugin trunk 0.1
Loading...
Searching...
No Matches
CPListFrame.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
24#ifndef _CPLISTFRAME_H
25#define _CPLISTFRAME_H
26
27#include <wx/xrc/xh_listc.h>
28#include <vector>
29
30class MainFrame;
31
34{
37};
38
43class CPListCtrl : public wxListView, public HuginBase::PanoramaObserver
44{
45public:
46 CPListCtrl();
48 bool Create(wxWindow *parent,
51 const wxSize& size = wxDefaultSize,
54 const wxString& name = wxListCtrlNameStr);
55
56 void Init(HuginBase::Panorama* pano);
57 virtual void panoramaChanged(HuginBase::Panorama &pano);
60 void DeleteSelected();
64 void SelectAll();
65protected:
67 virtual wxString OnGetItemText(long item, long column) const;
69 virtual int OnGetItemImage(long item) const;
77 void OnChar(wxKeyEvent& e);
78private:
81
83 // current sorting column
86 bool m_onlyActiveImages = false;
87 std::vector<CPListItem> m_internalCPList;
88 std::map<std::string, int> m_localIds;
89
91};
92
94class CPListCtrlXmlHandler : public wxListCtrlXmlHandler
95{
97
98public:
102 virtual wxObject *DoCreateResource();
104 virtual bool CanHandle(wxXmlNode *node);
105};
106
107class CPListFrame : public wxDialog
108{
109public:
112 CPListFrame(wxWindow* parent, HuginBase::Panorama & pano);
113
116 virtual ~CPListFrame();
117
118protected:
119 void OnDeleteButton(wxCommandEvent & e);
120 void OnSelectButton(wxCommandEvent & e);
122private:
125};
126
127
128
129#endif // _CPLISTFRAME_H
xrc handler for CPImagesComboBox
Definition CPListFrame.h:95
CPListCtrlXmlHandler()
Constructor.
virtual bool CanHandle(wxXmlNode *node)
Internal use to identify right xml handler.
virtual wxObject * DoCreateResource()
Create CPImagesComboBox from resource.
List all control points of this project.
Definition CPListFrame.h:44
void SelectDistanceThreshold(double threshold)
select all cp with the given error bigger than the threshold
virtual void panoramaChanged(HuginBase::Panorama &pano)
Notification about a Panorama change.
void OnCPListSelectionChanged(wxListEvent &e)
selection event handler
void OnChar(wxKeyEvent &e)
handle keystrokes
virtual wxString OnGetItemText(long item, long column) const
create labels for virtual list control
virtual int OnGetItemImage(long item) const
show no images
void DeleteSelected()
Delete the selected points.
void SelectAll()
select all items
std::vector< CPListItem > m_internalCPList
Definition CPListFrame.h:87
void OnColumnWidthChange(wxListEvent &e)
column width changed
void OnCPListHeaderClick(wxListEvent &e)
sort criterium changed
void Init(HuginBase::Panorama *pano)
void UpdateInternalCPList()
bool m_onlyActiveImages
Definition CPListFrame.h:86
HuginBase::Panorama * m_pano
Definition CPListFrame.h:82
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)
bool m_sortAscend
Definition CPListFrame.h:85
void SortInternalList(bool isAscending)
virtual void panoramaImagesChanged(HuginBase::Panorama &pano, const HuginBase::UIntSet &changed)
notifies about changes to images
Definition CPListFrame.h:58
std::map< std::string, int > m_localIds
Definition CPListFrame.h:88
void OnSelectButton(wxCommandEvent &e)
HuginBase::Panorama & m_pano
void OnDeleteButton(wxCommandEvent &e)
CPListCtrl * m_list
void OnClose(wxCloseEvent &event)
virtual ~CPListFrame()
dtor.
this handler class will receive change events from the Panorama.
Model for a panorama.
Definition Panorama.h:153
The main window frame.
Definition MainFrame.h:84
std::set< unsigned int > UIntSet
helper class for virtual listview control
Definition CPListFrame.h:34
size_t globalIndex
Definition CPListFrame.h:35
size_t localNumber
Definition CPListFrame.h:36
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41