[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

hugin1/hugin/PanoPanel.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00026 #ifndef _PANOPANEL_H
00027 #define _PANOPANEL_H
00028 
00029 #include "hugin/MainFrame.h"
00030 
00031 //using namespace PT;
00032 class PanoDialog;
00033 class wxSpinCtrl;
00034 class wxTextCtrl;
00035 class wxChoice;
00036 class wxComboBox;
00037 
00038 class StitcherPanel;
00039 
00045 class PanoPanel: public wxPanel, public PT::PanoramaObserver
00046 {
00047 public:
00048 
00049     PanoPanel();
00050 
00051     bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("panel"));
00052 
00053     void Init(PT::Panorama * pano);
00054 
00055     virtual ~PanoPanel(void) ;
00056 
00073     virtual void panoramaChanged(PT::Panorama &pano);
00074 //    void panoramaImageChanged(PT::Panorama &pano, const PT::UIntSet & imgNr);
00075 
00077 // TODO remove
00078 //    void previewSingleChanged(wxCommandEvent & e);
00079 
00080 
00081     // actions
00082     void DoStitch();
00083         void SendToBatch();
00084 
00085 
00086  private:
00087 
00089     enum StitchingEngine { NONA=0, PTSTITCHER };
00090 
00092     enum StitchingPresets { PROFILE_CUSTOM =0 , PROFILE_JPEG=0,
00093                             PROFILE_DRAFT_JPEG, PROFILE_TIFF,
00094                             PROFILE_LAYER_TIFF, PROFILE_LAYER_PSD };
00095 
00096 
00097     // apply changes from the model
00098     bool StackCheck (PT::Panorama & pano);
00099     void UpdateDisplay(const PT::PanoramaOptions & opt, const bool hasStacks);
00100     void SetStitcher(PanoramaOptions::Remapper stitcher);
00101 
00102     // apply changes to the model. (gui values -> Panorama)
00103     void QuickModeChanged(wxCommandEvent & e);
00104     void ApplyQuickMode(int preset);
00105 
00106     void HFOVChanged(wxCommandEvent & e);
00107     void HFOVChangedSpin(wxSpinEvent & e);
00108     void VFOVChanged(wxCommandEvent & e );
00109     void VFOVChangedSpin(wxSpinEvent & e);
00110     void ProjectionChanged(wxCommandEvent & e);
00111 
00112     void OnOutputFilesChanged(wxCommandEvent & e);
00113     void RemapperChanged(wxCommandEvent & e);
00114     void OnRemapperOptions(wxCommandEvent & e);
00115 
00116     void FusionChanged(wxCommandEvent & e);
00117     void OnFusionOptions(wxCommandEvent & e);
00118 
00119     void HDRMergeChanged(wxCommandEvent & e);
00120     void OnHDRMergeOptions(wxCommandEvent & e);
00121 
00122     void BlenderChanged(wxCommandEvent & e);
00123     void OnBlenderOptions(wxCommandEvent & e);
00124 
00125     // File format options
00126     void FileFormatChanged(wxCommandEvent & e);
00127     void HDRFileFormatChanged(wxCommandEvent & e);
00128     void OnJPEGQualityText(wxCommandEvent & e);
00129     void OnNormalTIFFCompression(wxCommandEvent & e);
00130     void OnHDRTIFFCompression(wxCommandEvent & e);
00131 
00132     void OnHDRFileFormatOpts(wxCommandEvent & e);
00133 
00134 
00135     void WidthChanged(wxCommandEvent & e);
00136     void HeightChanged(wxCommandEvent & e);
00137     void ROIChanged(wxCommandEvent & e);
00138 
00139 // TODO remove
00140 //    void DoPreview(wxCommandEvent & e);
00141     void DoCalcFOV(wxCommandEvent & e);
00142     void OnDoStitch(wxCommandEvent & e);
00143         void OnSendToBatch(wxCommandEvent & e);
00144 
00147     void DoCalcOptimalWidth(wxCommandEvent & e);
00148     
00151     void DoCalcOptimalROI(wxCommandEvent & e);    
00152 
00154     void EnableControls(bool enable);
00155 
00156     // the model
00157     Panorama * pano;
00158 
00159     // don't listen to input on gui elements during
00160     // updating the gui from the model, to prevent recursion,
00161     // because the gui might report changes as well.
00162     bool updatesDisabled;
00163     PanoramaOptions m_oldOpt;
00164     double m_oldVFOV;
00165 
00166     bool m_keepViewOnResize;
00167     bool m_hasStacks;
00168 
00169     // controls of this frame
00170     wxChoice    * m_ProjectionChoice;
00171     wxTextCtrl  * m_HFOVText;
00172     wxTextCtrl  * m_VFOVText;
00173 
00174     wxTextCtrl  * m_WidthTxt;
00175     wxTextCtrl  * m_HeightTxt;
00176     wxTextCtrl  * m_ROILeftTxt;
00177     wxTextCtrl  * m_ROIRightTxt;
00178     wxTextCtrl  * m_ROITopTxt;
00179     wxTextCtrl  * m_ROIBottomTxt;
00180     wxChoice    * m_RemapperChoice;
00181     wxChoice    * m_FusionChoice;
00182     wxChoice    * m_HDRMergeChoice;
00183     wxChoice    * m_BlenderChoice;
00184     wxButton    * m_StitchButton;
00185         wxButton        * m_BatchButton;
00186     wxButton    * m_CalcHFOVButton;
00187     wxButton    * m_CalcOptWidthButton;
00188     wxButton    * m_CalcOptROIButton;
00189 
00190     wxChoice    * m_FileFormatChoice;
00191     wxPanel     * m_FileFormatPanelJPEG;
00192     wxTextCtrl  * m_FileFormatJPEGQualityText;
00193     wxPanel     * m_FileFormatPanelTIFF;
00194     wxChoice    * m_FileFormatTIFFCompChoice;
00195 
00196     wxChoice    * m_HDRFileFormatChoice;
00197     wxPanel     * m_HDRFileFormatPanelTIFF;
00198     wxChoice    * m_FileFormatHDRTIFFCompChoice;
00199 
00200     wxScrolledWindow *m_pano_ctrls;
00201 
00202     DECLARE_EVENT_TABLE()
00203     DECLARE_DYNAMIC_CLASS(PanoPanel)
00204 };
00205 
00207 class PanoPanelXmlHandler : public wxXmlResourceHandler
00208 {
00209     DECLARE_DYNAMIC_CLASS(PanoPanelXmlHandler)
00210 
00211 public:
00212     PanoPanelXmlHandler();
00213     virtual wxObject *DoCreateResource();
00214     virtual bool CanHandle(wxXmlNode *node);
00215 };
00216 
00217 #endif // _PANOPANEL_H

Generated on Mon Sep 20 01:01:26 2010 for Hugintrunk by doxygen 1.3.9.1