ImagesPanel.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00024 #ifndef _IMAGESPANEL_H
00025 #define _IMAGESPANEL_H
00026 
00027 #include "hugin/MainFrame.h"
00028 
00029 #include "base_wx/wxImageCache.h"
00030 
00031 // forward declarations, to save the #include statements
00032 class ImagesTreeCtrl;
00033 
00040 class ImagesPanel: public wxPanel, public HuginBase::PanoramaObserver
00041 {
00042 public:
00043     ImagesPanel();
00044 
00045     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"));
00046 
00047     void Init(HuginBase::Panorama * pano);
00048 
00049     ~ImagesPanel();
00050 
00067 //    virtual void panoramaChanged(HuginBase::Panorama &pano);
00069     virtual void panoramaChanged(HuginBase::Panorama & pano);
00070     virtual void panoramaImagesChanged(HuginBase::Panorama &pano, const HuginBase::UIntSet & imgNr);
00072     void ReloadCPDetectorSettings();
00074     CPDetectorSetting& GetDefaultSetting() { return cpdetector_config.settings.Item(cpdetector_config.GetDefaultGenerator());};
00075 
00077     void SetGuiLevel(GuiLevel newGuiLevel);
00079     wxString GetCurrentOptimizerString();
00081     void RunCPGenerator(CPDetectorSetting &setting, const HuginBase::UIntSet& img);
00083     void RunCPGenerator(const HuginBase::UIntSet& img);
00085     const wxString GetSelectedCPGenerator();
00086 protected:
00088     void OnOptimizeButton(wxCommandEvent &e);
00090     void OnPhotometricOptimizeButton(wxCommandEvent &e);
00091 
00092 private:
00093     // a window event
00094     void OnSize(wxSizeEvent & e);
00095 
00097     HuginBase::Panorama * m_pano;
00098 
00100     void CPGenerate(wxCommandEvent & e);
00104     void OnSelectionChanged(wxTreeEvent & e);
00105 
00107     void OnLensTypeChanged(wxCommandEvent & e);
00109     void OnFocalLengthChanged(wxCommandEvent & e);
00111     void OnCropFactorChanged(wxCommandEvent & e);
00113     void OnMinimumOverlapChanged(wxCommandEvent & e);
00115     void OnMaxEvDiffChanged(wxCommandEvent& e);
00116 
00118     void OnGroupModeChanged(wxCommandEvent & e);
00120     void OnDisplayModeChanged(wxCommandEvent & e);
00122     void OnOptimizerSwitchChanged(wxCommandEvent &e);
00124     void OnPhotometricOptimizerSwitchChanged(wxCommandEvent &e);
00126     void FillGroupChoice();
00128     void FillOptimizerChoice();
00129 
00130     void DisableImageCtrls();
00131     void EnableImageCtrls();
00132 
00134     void ShowImage(unsigned int imgNr);
00135     void UpdatePreviewImage();
00136 
00138     wxBitmap m_empty;
00139     
00141     HuginBase::ImageCache::RequestPtr thumbnail_request;
00142 
00144     ImagesTreeCtrl* m_images_tree;
00146     wxStaticBitmap * m_smallImgCtrl;
00148     wxChoice *m_lenstype;
00150     wxChoice *m_optChoice;
00152     wxChoice *m_optPhotoChoice;
00154     wxTextCtrl *m_focallength;
00156     wxTextCtrl *m_cropfactor;
00158     wxTextCtrl *m_overlap;
00160     wxTextCtrl *m_maxEv;
00161     size_t m_showImgNr;
00162 
00163     wxButton * m_matchingButton;
00164     wxChoice *m_CPDetectorChoice;
00165     //storing for different cp detector settings
00166     CPDetectorConfig cpdetector_config;
00167 
00168     GuiLevel m_guiLevel;
00169     int m_degDigits;
00170 
00171     DECLARE_EVENT_TABLE()
00172     DECLARE_DYNAMIC_CLASS(ImagesPanel)
00173 };
00174 
00176 class ImagesPanelXmlHandler : public wxXmlResourceHandler
00177 {
00178     DECLARE_DYNAMIC_CLASS(ImagesPanelXmlHandler)
00179 
00180 public:
00181     ImagesPanelXmlHandler();
00182     virtual wxObject *DoCreateResource();
00183     virtual bool CanHandle(wxXmlNode *node);
00184 };
00185 
00186 #endif // _IMAGESPANEL_H

Generated on 9 Feb 2016 for Hugintrunk by  doxygen 1.4.7