PreviewFrame Class Reference

The image preview frame. More...

#include <PreviewFrame.h>

Inheritance diagram for PreviewFrame:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PreviewFrame (wxFrame *frame, PT::Panorama &pano)
 ctor.
virtual ~PreviewFrame ()
 dtor.
void panoramaChanged (PT::Panorama &pano)
void panoramaImagesChanged (PT::Panorama &pano, const PT::UIntSet &changed)
void OnUpdate (wxCommandEvent &event)
void updateProgressDisplay ()
 update the display

Protected Member Functions

void OnClose (wxCloseEvent &e)
void OnChangeDisplayedImgs (wxCommandEvent &e)
void OnAutoPreviewToggle (wxCommandEvent &e)
void OnCenterHorizontally (wxCommandEvent &e)
void OnFitPano (wxCommandEvent &e)
void OnStraighten (wxCommandEvent &e)
void OnShowAll (wxCommandEvent &e)
void OnShowNone (wxCommandEvent &e)
void OnNumTransform (wxCommandEvent &e)
void OnChangeFOV (wxScrollEvent &e)
void OnTextCtrlChanged (wxCommandEvent &e)
void OnDefaultExposure (wxCommandEvent &e)
void OnDecreaseExposure (wxSpinEvent &e)
void OnIncreaseExposure (wxSpinEvent &e)
void OnProjParameterReset (wxCommandEvent &e)
 event handler for reset projection parameters
void OnBlendChoice (wxCommandEvent &e)
void OnProjectionChoice (wxCommandEvent &e)
void OnOutputChoice (wxCommandEvent &e)
void OnFullScreen (wxCommandEvent &e)
 event handler for full screen
void OnUndo (wxCommandEvent &e)
 event handler for undo
void OnRedo (wxCommandEvent &e)
 event handler for redo
void updatePano ()

Private Attributes

PT::Panoramam_pano
PreviewPanelm_PreviewPanel
wxToolBar * m_ToolBar
wxSlider * m_HFOVSlider
wxSlider * m_VFOVSlider
wxChoice * m_BlendModeChoice
wxChoice * m_ProjectionChoice
wxChoice * m_outputModeChoice
wxTextCtrl * m_exposureTextCtrl
wxBitmapButton * m_defaultExposureBut
wxSpinButton * m_exposureSpinBut
wxString m_choices [3]
int m_oldProjFormat
wxScrolledWindow * m_ButtonPanel
wxBoxSizer * m_ButtonSizer
wxStaticBoxSizer * m_ToggleButtonSizer
wxBoxSizer * m_topsizer
wxStaticBoxSizer * m_projParamSizer
std::vector< wxStaticText * > m_projParamNamesLabel
std::vector< wxTextCtrl * > m_projParamTextCtrl
std::vector< wxSlider * > m_projParamSlider
std::vector< wxCheckBox * > m_ToggleButtons

Detailed Description

The image preview frame.

Contains the ImagePreviewPanel and various controls for it.

it is not created with XRC, because it is highly dynamic, buttons have to be added etc.

Definition at line 40 of file PreviewFrame.h.


Constructor & Destructor Documentation

PreviewFrame::PreviewFrame wxFrame *  frame,
PT::Panorama pano
 

ctor.

Definition at line 119 of file PreviewFrame.cpp.

References DEBUG_ASSERT, DEBUG_TRACE, ID_BLEND_CHOICE, ID_EXPOSURE_DEFAULT, ID_EXPOSURE_SPIN, ID_EXPOSURE_TEXT, ID_FULL_SCREEN, ID_OUTPUTMODE_CHOICE, ID_PROJECTION_CHOICE, ID_REDO, ID_UNDO, PROJ_PARAM_NAMES_ID, PROJ_PARAM_RESET_ID, PROJ_PARAM_SLIDER_ID, PROJ_PARAM_VAL_ID, and RestoreFramePosition().

PreviewFrame::~PreviewFrame  )  [virtual]
 

dtor.

Definition at line 396 of file PreviewFrame.cpp.

References DEBUG_TRACE, m_BlendModeChoice, m_pano, m_projParamTextCtrl, m_ToolBar, HuginBase::Panorama::removeObserver(), and StoreFramePosition().


Member Function Documentation

void PreviewFrame::OnAutoPreviewToggle wxCommandEvent &  e  )  [protected]
 

Definition at line 613 of file PreviewFrame.cpp.

References PreviewPanel::ForceUpdate(), m_PreviewPanel, and PreviewPanel::SetAutoUpdate().

void PreviewFrame::OnBlendChoice wxCommandEvent &  e  )  [protected]
 

Definition at line 841 of file PreviewFrame.cpp.

References DEBUG_WARN, m_PreviewPanel, and PreviewPanel::SetBlendMode().

void PreviewFrame::OnCenterHorizontally wxCommandEvent &  e  )  [protected]
 

Definition at line 643 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), HuginBase::Panorama::getActiveImages(), GlobalCmdHist::getInstance(), and m_pano.

void PreviewFrame::OnChangeDisplayedImgs wxCommandEvent &  e  )  [protected]
 

Definition at line 421 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), DEBUG_DEBUG, DEBUG_ERROR, HuginBase::Panorama::getActiveImages(), GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), m_pano, and m_ToggleButtons.

void PreviewFrame::OnChangeFOV wxScrollEvent &  e  )  [protected]
 

Definition at line 810 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), DEBUG_DEBUG, DEBUG_TRACE, GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getProjectionParameters(), m_HFOVSlider, m_pano, HuginBase::PanoramaOptions::m_projFeatures, m_projParamSlider, m_VFOVSlider, HuginBase::PanoramaOptions::setHFOV(), HuginBase::PanoramaOptions::setProjectionParameters(), and HuginBase::PanoramaOptions::setVFOV().

void PreviewFrame::OnClose wxCloseEvent &  e  )  [protected]
 

Definition at line 599 of file PreviewFrame.cpp.

References DEBUG_DEBUG, and DEBUG_TRACE.

void PreviewFrame::OnDecreaseExposure wxSpinEvent &  e  )  [protected]
 

Definition at line 883 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, HuginBase::PanoramaOptions::outputExposureValue, and updatePano().

void PreviewFrame::OnDefaultExposure wxCommandEvent &  e  )  [protected]
 

Definition at line 861 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), PT::calcMeanExposure(), GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), m_pano, HuginBase::PanoramaOptions::outputExposureValue, and updatePano().

void PreviewFrame::OnFitPano wxCommandEvent &  e  )  [protected]
 

Definition at line 673 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), DEBUG_INFO, DEBUG_TRACE, PT::Panorama::fitPano(), HuginBase::Panorama::getActiveImages(), HuginBase::PanoramaOptions::getHeight(), HuginBase::PanoramaOptions::getHFOV(), GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getVFOV(), m_pano, hugin_utils::roundi(), HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), and updatePano().

void PreviewFrame::OnFullScreen wxCommandEvent &  e  )  [protected]
 

event handler for full screen

Definition at line 967 of file PreviewFrame.cpp.

References PreviewPanel::ForceUpdate(), and m_PreviewPanel.

void PreviewFrame::OnIncreaseExposure wxSpinEvent &  e  )  [protected]
 

Definition at line 873 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, HuginBase::PanoramaOptions::outputExposureValue, and updatePano().

void PreviewFrame::OnNumTransform wxCommandEvent &  e  )  [protected]
 

Definition at line 723 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), DEBUG_DEBUG, GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), m_pano, str2double(), and updatePano().

void PreviewFrame::OnOutputChoice wxCommandEvent &  e  )  [protected]
 

Definition at line 911 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), DEBUG_WARN, GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_outputModeChoice, m_pano, HuginBase::PanoramaOptions::outputMode, and updatePano().

void PreviewFrame::OnProjectionChoice wxCommandEvent &  e  )  [protected]
 

Definition at line 893 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), DEBUG_DEBUG, DEBUG_WARN, GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, m_ProjectionChoice, HuginBase::PanoramaOptions::setProjection(), and updatePano().

void PreviewFrame::OnProjParameterReset wxCommandEvent &  e  )  [protected]
 

event handler for reset projection parameters

Definition at line 801 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, and HuginBase::PanoramaOptions::resetProjectionParameters().

void PreviewFrame::OnRedo wxCommandEvent &  e  )  [protected]
 

event handler for redo

Definition at line 990 of file PreviewFrame.cpp.

References CommandHistory::canRedo(), and GlobalCmdHist::getInstance().

void PreviewFrame::OnShowAll wxCommandEvent &  e  )  [protected]
 

Definition at line 693 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), DEBUG_ASSERT, GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), m_pano, m_ToggleButtons, and updatePano().

void PreviewFrame::OnShowNone wxCommandEvent &  e  )  [protected]
 

Definition at line 708 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), DEBUG_ASSERT, GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), m_pano, m_ToggleButtons, and updatePano().

void PreviewFrame::OnStraighten wxCommandEvent &  e  )  [protected]
 

Definition at line 652 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), and m_pano.

void PreviewFrame::OnTextCtrlChanged wxCommandEvent &  e  )  [protected]
 

Definition at line 759 of file PreviewFrame.cpp.

References CommandHistory::addCommand(), DEBUG_INFO, GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getProjectionParameters(), m_exposureTextCtrl, m_pano, HuginBase::PanoramaOptions::m_projFeatures, m_projParamTextCtrl, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::setProjectionParameters(), str2double(), and updatePano().

void PreviewFrame::OnUndo wxCommandEvent &  e  )  [protected]
 

event handler for undo

Definition at line 977 of file PreviewFrame.cpp.

References CommandHistory::canUndo(), and GlobalCmdHist::getInstance().

void PreviewFrame::OnUpdate wxCommandEvent &  event  ) 
 

Definition at line 661 of file PreviewFrame.cpp.

References PreviewPanel::ForceUpdate(), and m_PreviewPanel.

Referenced by MainFrame::LoadProjectFile(), MainFrame::OnMergeProject(), MainFrame::OnNewProject(), and MainFrame::OnTogglePreviewFrame().

void PreviewFrame::panoramaChanged PT::Panorama pano  ) 
 

Definition at line 442 of file PreviewFrame.cpp.

References DEBUG_DEBUG, hugin_utils::doubleToString(), HuginBase::PanoramaOptions::fovCalcSupported(), HuginBase::Panorama::getActiveImages(), HuginBase::PanoramaOptions::getHFOV(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getProjection(), HuginBase::PanoramaOptions::getProjectionParameters(), HuginBase::PanoramaOptions::getVFOV(), m_exposureTextCtrl, m_HFOVSlider, m_oldProjFormat, m_outputModeChoice, m_ProjectionChoice, HuginBase::PanoramaOptions::m_projFeatures, m_projParamNamesLabel, m_projParamSizer, m_projParamSlider, m_projParamTextCtrl, m_ToolBar, m_topsizer, m_VFOVSlider, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::outputMode, hugin_utils::roundi(), and updatePano().

void PreviewFrame::panoramaImagesChanged PT::Panorama pano,
const PT::UIntSet changed
 

Definition at line 526 of file PreviewFrame.cpp.

References DEBUG_INFO, DEBUG_TRACE, HuginBase::Panorama::getActiveImages(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getNrOfImages(), ID_TOGGLE_BUT, m_ButtonPanel, m_ButtonSizer, m_pano, m_ToggleButtons, set_contains(), and updatePano().

void PreviewFrame::updatePano  )  [protected]
 

Definition at line 666 of file PreviewFrame.cpp.

References PreviewPanel::ForceUpdate(), m_PreviewPanel, and m_ToolBar.

Referenced by OnDecreaseExposure(), OnDefaultExposure(), OnFitPano(), OnIncreaseExposure(), OnNumTransform(), OnOutputChoice(), OnProjectionChoice(), OnShowAll(), OnShowNone(), OnTextCtrlChanged(), panoramaChanged(), and panoramaImagesChanged().

void PreviewFrame::updateProgressDisplay  )  [virtual]
 

update the display

Reimplemented from AppBase::MultiProgressDisplay.

Definition at line 929 of file PreviewFrame.cpp.


Member Data Documentation

wxChoice* PreviewFrame::m_BlendModeChoice [private]
 

Definition at line 97 of file PreviewFrame.h.

Referenced by ~PreviewFrame().

wxScrolledWindow* PreviewFrame::m_ButtonPanel [private]
 

Definition at line 110 of file PreviewFrame.h.

Referenced by panoramaImagesChanged().

wxBoxSizer* PreviewFrame::m_ButtonSizer [private]
 

Definition at line 111 of file PreviewFrame.h.

Referenced by panoramaImagesChanged().

wxString PreviewFrame::m_choices[3] [private]
 

Definition at line 104 of file PreviewFrame.h.

wxBitmapButton* PreviewFrame::m_defaultExposureBut [private]
 

Definition at line 101 of file PreviewFrame.h.

wxSpinButton* PreviewFrame::m_exposureSpinBut [private]
 

Definition at line 102 of file PreviewFrame.h.

wxTextCtrl* PreviewFrame::m_exposureTextCtrl [private]
 

Definition at line 100 of file PreviewFrame.h.

Referenced by OnTextCtrlChanged(), and panoramaChanged().

wxSlider* PreviewFrame::m_HFOVSlider [private]
 

Definition at line 95 of file PreviewFrame.h.

Referenced by OnChangeFOV(), and panoramaChanged().

int PreviewFrame::m_oldProjFormat [private]
 

Definition at line 105 of file PreviewFrame.h.

Referenced by panoramaChanged().

wxChoice* PreviewFrame::m_outputModeChoice [private]
 

Definition at line 99 of file PreviewFrame.h.

Referenced by OnOutputChoice(), and panoramaChanged().

PT::Panorama& PreviewFrame::m_pano [private]
 

Definition at line 91 of file PreviewFrame.h.

Referenced by OnCenterHorizontally(), OnChangeDisplayedImgs(), OnChangeFOV(), OnDecreaseExposure(), OnDefaultExposure(), OnFitPano(), OnIncreaseExposure(), OnNumTransform(), OnOutputChoice(), OnProjectionChoice(), OnProjParameterReset(), OnShowAll(), OnShowNone(), OnStraighten(), OnTextCtrlChanged(), panoramaImagesChanged(), and ~PreviewFrame().

PreviewPanel* PreviewFrame::m_PreviewPanel [private]
 

Definition at line 93 of file PreviewFrame.h.

Referenced by OnAutoPreviewToggle(), OnBlendChoice(), OnFullScreen(), OnUpdate(), and updatePano().

wxChoice* PreviewFrame::m_ProjectionChoice [private]
 

Definition at line 98 of file PreviewFrame.h.

Referenced by OnProjectionChoice(), and panoramaChanged().

std::vector<wxStaticText *> PreviewFrame::m_projParamNamesLabel [private]
 

Definition at line 116 of file PreviewFrame.h.

Referenced by panoramaChanged().

wxStaticBoxSizer* PreviewFrame::m_projParamSizer [private]
 

Definition at line 115 of file PreviewFrame.h.

Referenced by panoramaChanged().

std::vector<wxSlider *> PreviewFrame::m_projParamSlider [private]
 

Definition at line 118 of file PreviewFrame.h.

Referenced by OnChangeFOV(), and panoramaChanged().

std::vector<wxTextCtrl *> PreviewFrame::m_projParamTextCtrl [private]
 

Definition at line 117 of file PreviewFrame.h.

Referenced by OnTextCtrlChanged(), panoramaChanged(), and ~PreviewFrame().

std::vector<wxCheckBox *> PreviewFrame::m_ToggleButtons [private]
 

Definition at line 123 of file PreviewFrame.h.

Referenced by OnChangeDisplayedImgs(), OnShowAll(), OnShowNone(), and panoramaImagesChanged().

wxStaticBoxSizer* PreviewFrame::m_ToggleButtonSizer [private]
 

Definition at line 112 of file PreviewFrame.h.

wxToolBar* PreviewFrame::m_ToolBar [private]
 

Definition at line 94 of file PreviewFrame.h.

Referenced by panoramaChanged(), updatePano(), and ~PreviewFrame().

wxBoxSizer* PreviewFrame::m_topsizer [private]
 

Definition at line 114 of file PreviewFrame.h.

Referenced by panoramaChanged().

wxSlider* PreviewFrame::m_VFOVSlider [private]
 

Definition at line 96 of file PreviewFrame.h.

Referenced by OnChangeFOV(), and panoramaChanged().


The documentation for this class was generated from the following files:
Generated on Thu Apr 24 01:25:48 2014 for Hugintrunk by  doxygen 1.3.9.1