Hugintrunk
0.1
|
Owner Drawn ComboBox for showing connected images on CP tab. More...
#include <CPImagesComboBox.h>
Public Member Functions | |
bool | Create (wxWindow *parent, wxWindowID id, const wxString &value, const wxPoint &pos, const wxSize &size, long style=0, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxASCII_STR(wxComboBoxNameStr)) |
create control, bind events More... | |
virtual void | OnDrawItem (wxDC &dc, const wxRect &rect, int item, int WXUNUSED(flags)) const |
Paint method for drawing text and indication bar of combo box. More... | |
void | CalcCPDistance (HuginBase::Panorama *pano) |
Get maximum CP distance for all images pairs containing the reference image. More... | |
void | SetRefImage (HuginBase::Panorama *pano, unsigned int newRefImg) |
Set new reference image. More... | |
const unsigned int | GetRefImage () |
Returns the reference image number. More... | |
Protected Member Functions | |
void | OnMouseWheel (wxMouseEvent &e) |
Mouse wheel handler to mimic wxChoice behavior. More... | |
void | OnKeyDown (wxKeyEvent &e) |
Key handler to mimic wxChoice behavior. More... | |
Private Member Functions | |
void | Init () |
void | SelectNext (int step=1) |
void | SelectPrev (int step=1) |
void | NotifyParent () |
Private Attributes | |
unsigned int | refImage |
std::vector< double > | CPConnection |
std::vector< unsigned int > | CPCount |
Owner Drawn ComboBox for showing connected images on CP tab.
Definition at line 38 of file CPImagesComboBox.h.
void CPImagesComboBox::CalcCPDistance | ( | HuginBase::Panorama * | pano | ) |
Get maximum CP distance for all images pairs containing the reference image.
Definition at line 271 of file CPImagesComboBox.cpp.
References CPConnection, CPCount, HuginBase::ControlPoint::error, HuginBase::Panorama::getCtrlPoint(), HuginBase::Panorama::getNrOfCtrlPoints(), HuginBase::ControlPoint::image1Nr, HuginBase::ControlPoint::image2Nr, and refImage.
Referenced by CPEditorPanel::CreateNewPoint(), CPEditorPanel::OnCPEvent(), CPEditorPanel::OnDeleteButton(), CPEditorPanel::panoramaImagesChanged(), and SetRefImage().
bool CPImagesComboBox::Create | ( | wxWindow * | parent, |
wxWindowID | id, | ||
const wxString & | value, | ||
const wxPoint & | pos, | ||
const wxSize & | size, | ||
long | style = 0 , |
||
const wxValidator & | validator = wxDefaultValidator , |
||
const wxString & | name = wxASCII_STR(wxComboBoxNameStr) |
||
) |
create control, bind events
Definition at line 36 of file CPImagesComboBox.cpp.
References OnKeyDown(), and OnMouseWheel().
|
inline |
Returns the reference image number.
Definition at line 58 of file CPImagesComboBox.h.
References refImage.
|
private |
Definition at line 145 of file CPImagesComboBox.cpp.
References CPConnection, and refImage.
|
private |
Definition at line 134 of file CPImagesComboBox.cpp.
Referenced by SelectNext(), and SelectPrev().
|
virtual |
Paint method for drawing text and indication bar of combo box.
Definition at line 151 of file CPImagesComboBox.cpp.
References hugin_utils::ControlPointErrorColour(), CPConnection, CPCount, and vigra_ext::EMoR::h.
|
protected |
Key handler to mimic wxChoice behavior.
Definition at line 65 of file CPImagesComboBox.cpp.
References SelectNext(), and SelectPrev().
Referenced by Create().
|
protected |
Mouse wheel handler to mimic wxChoice behavior.
Definition at line 48 of file CPImagesComboBox.cpp.
References SelectNext(), and SelectPrev().
Referenced by Create().
|
private |
Definition at line 112 of file CPImagesComboBox.cpp.
References NotifyParent().
Referenced by OnKeyDown(), and OnMouseWheel().
|
private |
Definition at line 123 of file CPImagesComboBox.cpp.
References NotifyParent().
Referenced by OnKeyDown(), and OnMouseWheel().
|
inline |
Set new reference image.
Definition at line 52 of file CPImagesComboBox.h.
References CalcCPDistance(), and refImage.
Referenced by CPEditorPanel::setLeftImage(), and CPEditorPanel::setRightImage().
|
private |
Definition at line 69 of file CPImagesComboBox.h.
Referenced by CalcCPDistance(), Init(), and OnDrawItem().
|
private |
Definition at line 70 of file CPImagesComboBox.h.
Referenced by CalcCPDistance(), and OnDrawItem().
|
private |
Definition at line 68 of file CPImagesComboBox.h.
Referenced by CalcCPDistance(), GetRefImage(), Init(), and SetRefImage().