Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
CPImagesComboBox Class Reference

Owner Drawn ComboBox for showing connected images on CP tab. More...

#include <CPImagesComboBox.h>

Inheritance diagram for CPImagesComboBox:
Inheritance graph

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
 
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

 
void CalcCPDistance (HuginBase::Panorama *pano)
 Get maximum CP distance for all images pairs containing the reference image

 
void SetRefImage (HuginBase::Panorama *pano, unsigned int newRefImg)
 Set new reference image.
 
const unsigned int GetRefImage ()
 Returns the reference image number

 

Protected Member Functions

void OnMouseWheel (wxMouseEvent &e)
 Mouse wheel handler to mimic wxChoice behavior

 
void OnKeyDown (wxKeyEvent &e)
 Key handler to mimic wxChoice behavior

 

Private Member Functions

void Init ()
 
void SelectNext (int step=1)
 
void SelectPrev (int step=1)
 
void NotifyParent ()
 

Private Attributes

unsigned int refImage
 
std::vector< doubleCPConnection
 
std::vector< unsigned intCPCount
 

Detailed Description

Owner Drawn ComboBox for showing connected images on CP tab.

Definition at line 38 of file CPImagesComboBox.h.

Member Function Documentation

◆ CalcCPDistance()

void CPImagesComboBox::CalcCPDistance ( HuginBase::Panorama pano)

◆ Create()

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(), OnMouseWheel(), and threshold().

◆ GetRefImage()

const unsigned int CPImagesComboBox::GetRefImage ( )
inline

Returns the reference image number

Definition at line 58 of file CPImagesComboBox.h.

References refImage.

◆ Init()

void CPImagesComboBox::Init ( )
private

Definition at line 145 of file CPImagesComboBox.cpp.

References CPConnection, and refImage.

◆ NotifyParent()

void CPImagesComboBox::NotifyParent ( )
private

Definition at line 134 of file CPImagesComboBox.cpp.

References threshold().

Referenced by SelectNext(), and SelectPrev().

◆ OnDrawItem()

void CPImagesComboBox::OnDrawItem ( wxDC dc,
const wxRect rect,
int  item,
int   WXUNUSEDflags 
) const
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 threshold().

◆ OnKeyDown()

void CPImagesComboBox::OnKeyDown ( wxKeyEvent e)
protected

Key handler to mimic wxChoice behavior

Definition at line 65 of file CPImagesComboBox.cpp.

References SelectNext(), SelectPrev(), and threshold().

Referenced by Create().

◆ OnMouseWheel()

void CPImagesComboBox::OnMouseWheel ( wxMouseEvent e)
protected

Mouse wheel handler to mimic wxChoice behavior

Definition at line 48 of file CPImagesComboBox.cpp.

References SelectNext(), SelectPrev(), and threshold().

Referenced by Create().

◆ SelectNext()

void CPImagesComboBox::SelectNext ( int  step = 1)
private

Definition at line 112 of file CPImagesComboBox.cpp.

References NotifyParent(), and threshold().

Referenced by OnKeyDown(), and OnMouseWheel().

◆ SelectPrev()

void CPImagesComboBox::SelectPrev ( int  step = 1)
private

Definition at line 123 of file CPImagesComboBox.cpp.

References NotifyParent(), and threshold().

Referenced by OnKeyDown(), and OnMouseWheel().

◆ SetRefImage()

void CPImagesComboBox::SetRefImage ( HuginBase::Panorama pano,
unsigned int  newRefImg 
)
inline

Set new reference image.

Definition at line 52 of file CPImagesComboBox.h.

References CalcCPDistance(), refImage, and threshold().

Referenced by CPEditorPanel::setLeftImage(), and CPEditorPanel::setRightImage().

Member Data Documentation

◆ CPConnection

std::vector<double> CPImagesComboBox::CPConnection
private

Definition at line 69 of file CPImagesComboBox.h.

Referenced by CalcCPDistance(), Init(), and OnDrawItem().

◆ CPCount

std::vector<unsigned int> CPImagesComboBox::CPCount
private

Definition at line 70 of file CPImagesComboBox.h.

Referenced by CalcCPDistance(), and OnDrawItem().

◆ refImage

unsigned int CPImagesComboBox::refImage
private

Definition at line 68 of file CPImagesComboBox.h.

Referenced by CalcCPDistance(), GetRefImage(), Init(), and SetRefImage().


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