Hugintrunk
0.1
|
The image preview frame. More...
#include <PreviewFrame.h>
Public Member Functions | |
PreviewFrame (wxFrame *frame, HuginBase::Panorama &pano) | |
ctor. More... | |
virtual | ~PreviewFrame () |
dtor. More... | |
void | panoramaChanged (HuginBase::Panorama &pano) |
Notification about a Panorama change. More... | |
void | panoramaImagesChanged (HuginBase::Panorama &pano, const HuginBase::UIntSet &changed) |
notifies about changes to images More... | |
void | OnUpdate (wxCommandEvent &event) |
void | updateProgressDisplay () |
update the display More... | |
Public Member Functions inherited from HuginBase::PanoramaObserver | |
virtual | ~PanoramaObserver () |
Public Member Functions inherited from AppBase::ProgressDisplay | |
virtual | ~ProgressDisplay () |
void | setMessage (const std::string &message, const std::string &filename="") |
sets the message to given string More... | |
void | taskFinished () |
call when a task has finished and the status message should be cleared More... | |
bool | updateDisplay () |
updates the display, return true, if update was successful, false if cancel was pressed More... | |
bool | updateDisplay (const std::string &message) |
bool | updateDisplayValue () |
void | setMaximum (int newMaximum) |
sets the new maximum value of the progress value More... | |
bool | wasCancelled () |
return true, if process should be canceled by user e.g. More... | |
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 | OnRangeCompressionIncrease (wxSpinEvent &e) |
void | OnRangeCompressionDecrease (wxSpinEvent &e) |
void | OnProjParameterReset (wxCommandEvent &e) |
event handler for reset projection parameters More... | |
void | OnBlendChoice (wxCommandEvent &e) |
void | OnProjectionChoice (wxCommandEvent &e) |
void | OnOutputChoice (wxCommandEvent &e) |
void | OnFullScreen (wxCommandEvent &e) |
event handler for full screen More... | |
void | OnUndo (wxCommandEvent &e) |
event handler for undo More... | |
void | OnRedo (wxCommandEvent &e) |
event handler for redo More... | |
void | updatePano () |
Protected Member Functions inherited from AppBase::ProgressDisplay | |
ProgressDisplay (int maximum=0) | |
constructor More... | |
Private Attributes | |
HuginBase::Panorama & | m_pano |
PreviewPanel * | m_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 |
wxTextCtrl * | m_rangeCompressionTextCtrl |
wxSpinButton * | m_rangeCompressionSpinBut |
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< wxToggleButton * > | m_ToggleButtons |
Additional Inherited Members | |
Protected Attributes inherited from AppBase::ProgressDisplay | |
bool | m_canceled |
std::string | m_message |
std::string | m_filename |
int | m_maximum |
int | m_progress |
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.
PreviewFrame::PreviewFrame | ( | wxFrame * | frame, |
HuginBase::Panorama & | pano | ||
) |
ctor.
Definition at line 104 of file PreviewFrame.cpp.
References HuginBase::Panorama::addObserver(), PreviewPanel::Create(), DEBUG_ASSERT, DEBUG_TRACE, huginApp::Get(), ID_EXPOSURE_TEXT, ID_RANGE_COMPRESSION_TEXT, PreviewPanel::Init(), m_BlendModeChoice, m_ButtonPanel, m_ButtonSizer, m_choices, m_defaultExposureBut, m_exposureSpinBut, m_exposureTextCtrl, m_HFOVSlider, m_oldProjFormat, m_outputModeChoice, m_pano, m_PreviewPanel, m_ProjectionChoice, m_projParamNamesLabel, m_projParamSizer, m_projParamSlider, m_projParamTextCtrl, m_rangeCompressionSpinBut, m_rangeCompressionTextCtrl, m_ToggleButtonSizer, m_ToolBar, m_topsizer, m_VFOVSlider, PROJ_PARAM_NAMES_ID, PROJ_PARAM_SLIDER_ID, PROJ_PARAM_VAL_ID, RestoreFramePosition(), PreviewPanel::SetAutoUpdate(), and PreviewPanel::SetBlendMode().
|
virtual |
dtor.
Definition at line 391 of file PreviewFrame.cpp.
References DEBUG_TRACE, m_BlendModeChoice, m_pano, m_projParamTextCtrl, m_ToolBar, HuginBase::Panorama::removeObserver(), and StoreFramePosition().
|
protected |
Definition at line 595 of file PreviewFrame.cpp.
References PreviewPanel::ForceUpdate(), m_PreviewPanel, and PreviewPanel::SetAutoUpdate().
|
protected |
Definition at line 856 of file PreviewFrame.cpp.
References PreviewPanel::BLEND_COPY, PreviewPanel::BLEND_DIFFERENCE, DEBUG_WARN, m_BlendModeChoice, m_PreviewPanel, and PreviewPanel::SetBlendMode().
|
protected |
Definition at line 625 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), HuginBase::Panorama::getActiveImages(), PanoCommand::GlobalCmdHist::getInstance(), and m_pano.
|
protected |
Definition at line 415 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_DEBUG, DEBUG_ERROR, HuginBase::Panorama::getActiveImages(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), ID_TOGGLE_BUT, m_pano, and m_ToggleButtons.
|
protected |
Definition at line 825 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_DEBUG, DEBUG_TRACE, PanoCommand::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().
|
protected |
Definition at line 581 of file PreviewFrame.cpp.
References DEBUG_DEBUG, and DEBUG_TRACE.
|
protected |
Definition at line 898 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, HuginBase::PanoramaOptions::outputExposureValue, and updatePano().
|
protected |
Definition at line 876 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), HuginBase::CalculateMeanExposure::calcMeanExposure(), HuginBase::Panorama::getActiveImages(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, HuginBase::PanoramaOptions::outputExposureValue, and updatePano().
|
protected |
Definition at line 655 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_INFO, DEBUG_TRACE, HuginBase::Panorama::getActiveImages(), HuginBase::PanoramaOptions::getHeight(), HuginBase::PanoramaOptions::getHFOV(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), HuginBase::CalculateFitPanorama::getResultHeight(), HuginBase::CalculateFitPanorama::getResultHorizontalFOV(), HuginBase::PanoramaOptions::getVFOV(), m_pano, hugin_utils::roundi(), HuginBase::PanoramaAlgorithm::run(), HuginBase::PanoramaOptions::setHeight(), HuginBase::PanoramaOptions::setHFOV(), and updatePano().
|
protected |
event handler for full screen
Definition at line 983 of file PreviewFrame.cpp.
References PreviewPanel::ForceUpdate(), and m_PreviewPanel.
|
protected |
Definition at line 888 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, HuginBase::PanoramaOptions::outputExposureValue, and updatePano().
|
protected |
Definition at line 704 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_DEBUG, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), m_pano, hugin_utils::str2double(), and updatePano().
|
protected |
Definition at line 946 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_WARN, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_outputModeChoice, m_pano, HuginBase::PanoramaOptions::outputMode, and updatePano().
|
protected |
Definition at line 928 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_DEBUG, DEBUG_WARN, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, m_ProjectionChoice, HuginBase::PanoramaOptions::setProjection(), and updatePano().
|
protected |
event handler for reset projection parameters
Definition at line 816 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, and HuginBase::PanoramaOptions::resetProjectionParameters().
|
protected |
Definition at line 918 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, celeste::max(), HuginBase::PanoramaOptions::outputRangeCompression, and updatePano().
|
protected |
Definition at line 908 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), m_pano, celeste::min(), HuginBase::PanoramaOptions::outputRangeCompression, and updatePano().
|
protected |
event handler for redo
Definition at line 1006 of file PreviewFrame.cpp.
References PanoCommand::GlobalCmdHist::getInstance().
|
protected |
Definition at line 674 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_ASSERT, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), m_pano, m_ToggleButtons, and updatePano().
|
protected |
Definition at line 689 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_ASSERT, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), m_pano, m_ToggleButtons, and updatePano().
|
protected |
Definition at line 634 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getNrOfImages(), and m_pano.
|
protected |
Definition at line 740 of file PreviewFrame.cpp.
References PanoCommand::CommandHistory::addCommand(), DEBUG_INFO, PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Panorama::getOptions(), HuginBase::PanoramaOptions::getProjectionParameters(), m_exposureTextCtrl, m_pano, HuginBase::PanoramaOptions::m_projFeatures, m_projParamTextCtrl, m_rangeCompressionTextCtrl, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::outputRangeCompression, HuginBase::PanoramaOptions::setProjectionParameters(), hugin_utils::str2double(), and updatePano().
|
protected |
event handler for undo
Definition at line 993 of file PreviewFrame.cpp.
References PanoCommand::GlobalCmdHist::getInstance().
void PreviewFrame::OnUpdate | ( | wxCommandEvent & | event | ) |
Definition at line 643 of file PreviewFrame.cpp.
References PreviewPanel::ForceUpdate(), and m_PreviewPanel.
Referenced by MainFrame::LoadProjectFile(), MainFrame::OnMergeProject(), MainFrame::OnNewProject(), and MainFrame::OnTogglePreviewFrame().
|
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 436 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_rangeCompressionTextCtrl, m_ToolBar, m_topsizer, m_VFOVSlider, HuginBase::PanoramaOptions::OUTPUT_HDR, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::outputMode, HuginBase::PanoramaOptions::outputRangeCompression, hugin_utils::roundi(), and updatePano().
|
virtual |
notifies about changes to images
Images might have been added/removed. to find out how many images are still there, use Panorama::getNrOfImages.
pano | the panorama object that changed |
changed | set of changed images |
Implements HuginBase::PanoramaObserver.
Definition at line 521 of file PreviewFrame.cpp.
References DEBUG_INFO, DEBUG_TRACE, HuginBase::Panorama::getActiveImages(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getNrOfImages(), HUGIN_CONV_FILENAME, ID_TOGGLE_BUT, m_ButtonPanel, m_ButtonSizer, m_pano, m_ToggleButtons, set_contains(), and updatePano().
|
protected |
Definition at line 648 of file PreviewFrame.cpp.
References PreviewPanel::ForceUpdate(), m_PreviewPanel, and m_ToolBar.
Referenced by OnDecreaseExposure(), OnDefaultExposure(), OnFitPano(), OnIncreaseExposure(), OnNumTransform(), OnOutputChoice(), OnProjectionChoice(), OnRangeCompressionDecrease(), OnRangeCompressionIncrease(), OnShowAll(), OnShowNone(), OnTextCtrlChanged(), panoramaChanged(), and panoramaImagesChanged().
|
virtual |
update the display
Implements AppBase::ProgressDisplay.
Definition at line 964 of file PreviewFrame.cpp.
References HUGIN_CONV_FILENAME, AppBase::ProgressDisplay::m_filename, and AppBase::ProgressDisplay::m_message.
|
private |
Definition at line 99 of file PreviewFrame.h.
Referenced by OnBlendChoice(), PreviewFrame(), and ~PreviewFrame().
|
private |
Definition at line 114 of file PreviewFrame.h.
Referenced by panoramaImagesChanged(), and PreviewFrame().
|
private |
Definition at line 115 of file PreviewFrame.h.
Referenced by panoramaImagesChanged(), and PreviewFrame().
|
private |
Definition at line 108 of file PreviewFrame.h.
Referenced by PreviewFrame().
|
private |
Definition at line 103 of file PreviewFrame.h.
Referenced by PreviewFrame().
|
private |
Definition at line 104 of file PreviewFrame.h.
Referenced by PreviewFrame().
|
private |
Definition at line 102 of file PreviewFrame.h.
Referenced by OnTextCtrlChanged(), panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 97 of file PreviewFrame.h.
Referenced by OnChangeFOV(), panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 109 of file PreviewFrame.h.
Referenced by panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 101 of file PreviewFrame.h.
Referenced by OnOutputChoice(), panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 93 of file PreviewFrame.h.
Referenced by OnCenterHorizontally(), OnChangeDisplayedImgs(), OnChangeFOV(), OnDecreaseExposure(), OnDefaultExposure(), OnFitPano(), OnIncreaseExposure(), OnNumTransform(), OnOutputChoice(), OnProjectionChoice(), OnProjParameterReset(), OnRangeCompressionDecrease(), OnRangeCompressionIncrease(), OnShowAll(), OnShowNone(), OnStraighten(), OnTextCtrlChanged(), panoramaImagesChanged(), PreviewFrame(), and ~PreviewFrame().
|
private |
Definition at line 95 of file PreviewFrame.h.
Referenced by OnAutoPreviewToggle(), OnBlendChoice(), OnFullScreen(), OnUpdate(), PreviewFrame(), and updatePano().
|
private |
Definition at line 100 of file PreviewFrame.h.
Referenced by OnProjectionChoice(), panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 120 of file PreviewFrame.h.
Referenced by panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 119 of file PreviewFrame.h.
Referenced by panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 122 of file PreviewFrame.h.
Referenced by OnChangeFOV(), panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 121 of file PreviewFrame.h.
Referenced by OnTextCtrlChanged(), panoramaChanged(), PreviewFrame(), and ~PreviewFrame().
|
private |
Definition at line 106 of file PreviewFrame.h.
Referenced by PreviewFrame().
|
private |
Definition at line 105 of file PreviewFrame.h.
Referenced by OnTextCtrlChanged(), panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 123 of file PreviewFrame.h.
Referenced by OnChangeDisplayedImgs(), OnShowAll(), OnShowNone(), and panoramaImagesChanged().
|
private |
Definition at line 116 of file PreviewFrame.h.
Referenced by PreviewFrame().
|
private |
Definition at line 96 of file PreviewFrame.h.
Referenced by panoramaChanged(), PreviewFrame(), updatePano(), and ~PreviewFrame().
|
private |
Definition at line 118 of file PreviewFrame.h.
Referenced by panoramaChanged(), and PreviewFrame().
|
private |
Definition at line 98 of file PreviewFrame.h.
Referenced by OnChangeFOV(), panoramaChanged(), and PreviewFrame().