[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/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 #include "hugin/ImagesList.h"
00029 
00030 // Celeste files
00031 #include "Celeste.h"
00032 #include "CelesteGlobals.h"
00033 #include "Utilities.h"
00034 
00035 using namespace PT;
00036 
00037 // forward declarations, to save the #include statements
00038 class CPEditorPanel;
00039 
00046 class ImagesPanel: public wxPanel, public PT::PanoramaObserver
00047 {
00048 public:
00049     ImagesPanel();
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     ~ImagesPanel();
00056 
00058     void RestoreLayout();
00059 
00061     void RestoreLayoutOnNextResize()
00062     {
00063         m_restoreLayoutOnResize = true;
00064     }
00065 
00082 //    virtual void panoramaChanged(PT::Panorama &pano);
00083     void panoramaImagesChanged(PT::Panorama &pano, const PT::UIntSet & imgNr);
00085     void ReloadCPDetectorSettings();
00087     CPDetectorSetting& GetDefaultSetting() { return cpdetector_config.settings.Item(cpdetector_config.GetDefaultGenerator());};
00088 private:
00089     // a window event
00090     void OnSize(wxSizeEvent & e);
00091 
00093     Panorama * pano;
00094 
00095     // event handlers
00096     void OnAddImages(wxCommandEvent & e);
00097     void OnRemoveImages(wxCommandEvent & e);
00098     void OnPositionChanged(wxSplitterEvent& event);
00099 
00100     // Here we select the preview image
00101 
00103     void OnVarTextChanged ( wxCommandEvent & e );
00104     void OnImageLinkChanged ( wxCommandEvent & e );
00105 
00106     void OnOptAnchorChanged(wxCommandEvent & e);
00107     void OnColorAnchorChanged(wxCommandEvent &e );
00108 
00109     void OnRemoveCtrlPoints(wxCommandEvent & e);
00110     void OnResetImagePositions(wxCommandEvent & e);
00111 
00112     void OnMoveImageUp(wxCommandEvent & e);
00113     void OnMoveImageDown(wxCommandEvent & e);
00114     
00115     void OnNewStack(wxCommandEvent & e);
00116     void OnChangeStack(wxCommandEvent & e); 
00117 
00125     void ChangePano ( std::string type, double var );
00126 
00128     void SIFTMatching(wxCommandEvent & e);
00130     void OnCleanCP(wxCommandEvent & e);
00131 
00135     void ListSelectionChanged(wxListEvent & e);
00136 
00137     void OnCelesteButton(wxCommandEvent & e);
00138 
00141     void ShowImgParameters(unsigned int imgNr);
00142 
00144     void ClearImgParameters();
00145 
00146     void DisableImageCtrls();
00147     void EnableImageCtrls();
00148 
00150     void ShowImage(unsigned int imgNr);
00151     void ShowExifInfo(unsigned int imgNr);
00152     void ClearImgExifInfo();
00153     void UpdatePreviewImage();
00154 
00156     wxBitmap m_empty;
00157 
00159     ImagesListImage* images_list;
00160     wxStaticBitmap * m_smallImgCtrl;
00161     unsigned m_showImgNr;
00162 
00163     wxButton * m_optAnchorButton;
00164     wxButton * m_colorAnchorButton;
00165     wxButton * m_moveUpButton;
00166     wxButton * m_moveDownButton;
00167     wxButton * m_stackNewButton;
00168     wxButton * m_stackChangeButton;
00169 
00170     wxButton * m_matchingButton;
00171     wxButton * m_cleaningButton;
00172     wxButton * m_removeCPButton;
00173     
00174     wxCheckBox * m_linkCheckBox;
00175 
00176     wxPanel *m_img_ctrls;
00177     wxChoice *m_CPDetectorChoice;
00178     //storing for different cp detector settings
00179     CPDetectorConfig cpdetector_config;
00180 
00181     int m_degDigits;
00182 
00183     bool m_restoreLayoutOnResize;
00184 
00185     DECLARE_EVENT_TABLE()
00186     DECLARE_DYNAMIC_CLASS(ImagesPanel)
00187 };
00188 
00190 class ImagesPanelXmlHandler : public wxXmlResourceHandler
00191 {
00192     DECLARE_DYNAMIC_CLASS(ImagesPanelXmlHandler)
00193 
00194 public:
00195     ImagesPanelXmlHandler();
00196     virtual wxObject *DoCreateResource();
00197     virtual bool CanHandle(wxXmlNode *node);
00198 };
00199 
00200 
00201 
00202 //------------------------------------------------------------------------------
00203 
00211 class ImgPreview: public wxScrolledWindow
00212 {
00213  public:
00214     ImgPreview(wxWindow *parent, const wxPoint& pos, const wxSize& size, Panorama *pano);
00215     ~ImgPreview(void) ;
00216 
00217     // Here we select the preview image
00218     void ChangePreview ( wxImage & s_img );
00219 
00220  private:
00221     void OnMouse ( wxMouseEvent & event );
00222 
00223     void OnDraw(wxDC& dc);
00224     //void OnPaint(wxPaintEvent& event);
00225 
00227     Panorama * pano;
00228 
00229 
00230     DECLARE_EVENT_TABLE()
00231 };
00232 
00233 #endif // _IMAGESPANEL_H

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