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 using namespace PT; 00032 00033 // forward declarations, to save the #include statements 00034 class ImagesTreeCtrl; 00035 00042 class ImagesPanel: public wxPanel, public PT::PanoramaObserver 00043 { 00044 public: 00045 ImagesPanel(); 00046 00047 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")); 00048 00049 void Init(PT::Panorama * pano); 00050 00051 ~ImagesPanel(); 00052 00069 // virtual void panoramaChanged(PT::Panorama &pano); 00071 virtual void panoramaChanged(PT::Panorama & pano); 00072 virtual void panoramaImagesChanged(PT::Panorama &pano, const PT::UIntSet & imgNr); 00074 void ReloadCPDetectorSettings(); 00076 CPDetectorSetting& GetDefaultSetting() { return cpdetector_config.settings.Item(cpdetector_config.GetDefaultGenerator());}; 00077 00079 void SetGuiLevel(GuiLevel newGuiLevel); 00080 protected: 00082 void OnOptimizeButton(wxCommandEvent &e); 00084 void OnPhotometricOptimizeButton(wxCommandEvent &e); 00085 00086 private: 00087 // a window event 00088 void OnSize(wxSizeEvent & e); 00089 00091 Panorama * m_pano; 00092 00094 void CPGenerate(wxCommandEvent & e); 00098 void OnSelectionChanged(wxTreeEvent & e); 00099 00101 void OnLensTypeChanged(wxCommandEvent & e); 00103 void OnFocalLengthChanged(wxCommandEvent & e); 00105 void OnCropFactorChanged(wxCommandEvent & e); 00107 void OnMinimumOverlapChanged(wxCommandEvent & e); 00109 void OnMaxEvDiffChanged(wxCommandEvent& e); 00110 00112 void OnGroupModeChanged(wxCommandEvent & e); 00114 void OnDisplayModeChanged(wxCommandEvent & e); 00116 void OnOptimizerSwitchChanged(wxCommandEvent &e); 00118 void OnPhotometricOptimizerSwitchChanged(wxCommandEvent &e); 00120 void FillGroupChoice(); 00122 void FillOptimizerChoice(); 00123 00124 void DisableImageCtrls(); 00125 void EnableImageCtrls(); 00126 00128 void ShowImage(unsigned int imgNr); 00129 void UpdatePreviewImage(); 00130 00132 wxBitmap m_empty; 00133 00135 HuginBase::ImageCache::RequestPtr thumbnail_request; 00136 00138 ImagesTreeCtrl* m_images_tree; 00140 wxStaticBitmap * m_smallImgCtrl; 00142 wxChoice *m_lenstype; 00144 wxChoice *m_optChoice; 00146 wxChoice *m_optPhotoChoice; 00148 wxTextCtrl *m_focallength; 00150 wxTextCtrl *m_cropfactor; 00152 wxTextCtrl *m_overlap; 00154 wxTextCtrl *m_maxEv; 00155 size_t m_showImgNr; 00156 00157 wxButton * m_matchingButton; 00158 wxChoice *m_CPDetectorChoice; 00159 //storing for different cp detector settings 00160 CPDetectorConfig cpdetector_config; 00161 00162 GuiLevel m_guiLevel; 00163 int m_degDigits; 00164 00165 DECLARE_EVENT_TABLE() 00166 DECLARE_DYNAMIC_CLASS(ImagesPanel) 00167 }; 00168 00170 class ImagesPanelXmlHandler : public wxXmlResourceHandler 00171 { 00172 DECLARE_DYNAMIC_CLASS(ImagesPanelXmlHandler) 00173 00174 public: 00175 ImagesPanelXmlHandler(); 00176 virtual wxObject *DoCreateResource(); 00177 virtual bool CanHandle(wxXmlNode *node); 00178 }; 00179 00180 #endif // _IMAGESPANEL_H
1.3.9.1