From: <hug...@li...> - 2013-03-11 16:32:13
|
branch: 2013.0 details: http://hugin.hg.sourceforge.net/hgweb/hugin/hugin/hgroot/hugin/hugin/rev/4f4f24b815f2 changeset: 6204:4f4f24b815f2 user: tmodes date: Mon Mar 11 17:32:35 2013 +0100 description: PanoOutputDialog: Hide HDR output option in simple user interface To be consistent with stitcher tab diffstat: src/hugin1/hugin/GLPreviewFrame.cpp | 2 +- src/hugin1/hugin/PanoOutputDialog.cpp | 22 +++++++++++++++++++--- src/hugin1/hugin/PanoOutputDialog.h | 4 +++- 3 files changed, 23 insertions(+), 5 deletions(-) diffs (92 lines): diff -r be3914012ac3 -r 4f4f24b815f2 src/hugin1/hugin/GLPreviewFrame.cpp --- a/src/hugin1/hugin/GLPreviewFrame.cpp Sun Mar 10 08:27:42 2013 +0100 +++ b/src/hugin1/hugin/GLPreviewFrame.cpp Mon Mar 11 17:32:35 2013 +0100 @@ -3113,7 +3113,7 @@ void GLPreviewFrame::OnCreate( wxCommandEvent & e ) { - PanoOutputDialog dlg(this, m_pano); + PanoOutputDialog dlg(this, m_pano, m_guiLevel); if(dlg.ShowModal()==wxID_OK) { GlobalCmdHist::getInstance().addCommand( diff -r be3914012ac3 -r 4f4f24b815f2 src/hugin1/hugin/PanoOutputDialog.cpp --- a/src/hugin1/hugin/PanoOutputDialog.cpp Sun Mar 10 08:27:42 2013 +0100 +++ b/src/hugin1/hugin/PanoOutputDialog.cpp Mon Mar 11 17:32:35 2013 +0100 @@ -44,7 +44,7 @@ EVT_SPINCTRL(XRCID("output_height"), PanoOutputDialog::OnHeightChanged) END_EVENT_TABLE() -PanoOutputDialog::PanoOutputDialog(wxWindow *parent, PT::Panorama& pano) : m_pano(pano) +PanoOutputDialog::PanoOutputDialog(wxWindow *parent, PT::Panorama& pano, GuiLevel guiLevel) : m_pano(pano) { // load our children. some children might need special // initialization. this will be done later. @@ -70,6 +70,7 @@ this->Move(0, 44); }; // get number of stacks and exposure layers + m_guiLevel=guiLevel; m_stacks=getHDRStacks(m_pano, m_pano.getActiveImages(), m_pano.getOptions()); m_exposureLayers=getExposureLayers(m_pano, m_pano.getActiveImages(), m_pano.getOptions()); // set initial width @@ -154,6 +155,18 @@ XRCCTRL(*this, "output_hdr_bitmap", wxCheckBox)->Enable(true); return; } + //hide hdr controls for simple interface + if(m_guiLevel==GUI_SIMPLE) + { + XRCCTRL(*this, "output_hdr", wxCheckBox)->Hide(); + XRCCTRL(*this, "output_hdr_bitmap", wxCheckBox)->Hide(); + XRCCTRL(*this, "output_hdr_format_label", wxStaticText)->Hide(); + XRCCTRL(*this, "output_hdr_format", wxChoice)->Hide(); + XRCCTRL(*this, "output_hdr_compression_label", wxStaticText)->Hide(); + XRCCTRL(*this, "output_hdr_tiff_compression", wxChoice)->Hide(); + Layout(); + GetSizer()->Fit(this); + }; //single image or normal panorama, enable only normal output if(m_pano.getNrOfImages()==1 || m_stacks.size() >= 0.8 * m_pano.getNrOfImages()) { @@ -169,8 +182,11 @@ XRCCTRL(*this, "output_fused_blended_bitmap", wxCheckBox)->Enable(true); XRCCTRL(*this, "output_blended_fused", wxCheckBox)->Enable(true); XRCCTRL(*this, "output_blended_fused_bitmap", wxCheckBox)->Enable(true); - XRCCTRL(*this, "output_hdr", wxCheckBox)->Enable(true); - XRCCTRL(*this, "output_hdr_bitmap", wxCheckBox)->Enable(true); + if(m_guiLevel!=GUI_SIMPLE) + { + XRCCTRL(*this, "output_hdr", wxCheckBox)->Enable(true); + XRCCTRL(*this, "output_hdr_bitmap", wxCheckBox)->Enable(true); + }; if(m_pano.getNrOfImages() % m_stacks.size() == 0) { XRCCTRL(*this, "output_fused_blended", wxCheckBox)->SetValue(true); diff -r be3914012ac3 -r 4f4f24b815f2 src/hugin1/hugin/PanoOutputDialog.h --- a/src/hugin1/hugin/PanoOutputDialog.h Sun Mar 10 08:27:42 2013 +0100 +++ b/src/hugin1/hugin/PanoOutputDialog.h Mon Mar 11 17:32:35 2013 +0100 @@ -28,13 +28,14 @@ #include "panoinc_WX.h" #include "panoinc.h" +#include "GuiLevel.h" /** Dialog for setting output parameters for simple user interface */ class PanoOutputDialog : public wxDialog { public: /** Constructor, read from xrc ressource; restore last uses settings, size and position */ - PanoOutputDialog(wxWindow *parent, PT::Panorama& pano); + PanoOutputDialog(wxWindow *parent, PT::Panorama& pano, GuiLevel guiLevel); /** destructor, save position */ ~PanoOutputDialog(); HuginBase::PanoramaOptions GetNewPanoramaOptions() {return m_newOpt; } ; @@ -60,6 +61,7 @@ double m_initalWidth; double m_initalROIWidth; double m_aspect; + GuiLevel m_guiLevel; wxSpinCtrl* m_edit_width; wxSpinCtrl* m_edit_height; |