[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/LensPanel.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00024 #ifndef _LENSPANEL_H
00025 #define _LENSPANEL_H
00026 
00027 #include "PT/Panorama.h"
00028 #include "hugin/MainFrame.h"
00029 
00030 #include <panodata/StandardImageVariableGroups.h>
00031 
00032 class ImagesListLens;
00033 
00043 class LensPanel: public wxPanel, public PT::PanoramaObserver
00044 {
00045  public:
00046     LensPanel( );
00047     
00048     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"));
00049 
00050     void Init(PT::Panorama * pano);
00051    
00052     virtual ~LensPanel(void) ;
00053 
00055     void RestoreLayoutOnNextResize()
00056     {
00057         m_restoreLayoutOnResize = true;
00058     }
00059 
00076     void panoramaImagesChanged(PT::Panorama &pano, const PT::UIntSet & imgNr);
00077 
00081     void UpdateLensDisplay ();
00082 
00084     void EnableInputs();
00085 
00086     void EditVigCorr (wxCommandEvent & e);
00087 
00088  private:
00089     // a window event
00090     //void OnSize(wxSizeEvent & e);
00091 
00092     // event handlers
00094     void LensTypeChanged (wxCommandEvent & e);
00096     void focalLengthChanged(wxCommandEvent & e);
00097     void focalLengthFactorChanged(wxCommandEvent & e);
00098 
00099     void ResponseTypeChanged (wxCommandEvent & e);
00100 
00102     void OnVarChanged(wxCommandEvent & e);
00104     void OnVarInheritChanged(wxCommandEvent & e);
00105 
00107     void OnReadExif(wxCommandEvent & e);
00108 
00110     void OnSaveLensParameters(wxCommandEvent & e);
00111 
00113     void OnLoadLensParameters(wxCommandEvent & e);
00114 
00116     void OnChangeLens(wxCommandEvent & e);
00117 
00121     void OnNewLens(wxCommandEvent & e);
00122 
00125     void OnReset(wxCommandEvent & e);
00126 
00128     void ListSelectionChanged(wxListEvent& e);
00129 
00130 
00131     // the model
00132     Panorama * pano;
00133     
00134     HuginBase::StandardImageVariableGroups * variable_groups;
00135 
00136     ImagesListLens * images_list;
00137 
00138     // currently selected images and lenses
00139     UIntSet m_selectedImages;
00140     UIntSet m_selectedLenses;
00141 //    unsigned int m_editImageNr;
00142 //    unsigned int m_editLensNr;
00143 
00144     void updateHFOV(void);
00145     int m_degDigits;
00146     int m_distDigitsEdit;
00147     int m_pixelDigits;
00148 
00149     wxPanel *m_lens_ctrls;
00150 
00151     bool m_restoreLayoutOnResize;
00152 
00153     static const char *m_varNames[];
00154 
00155     DECLARE_EVENT_TABLE()
00156     DECLARE_DYNAMIC_CLASS(LensPanel)
00157 
00158 };
00159 
00161 class LensPanelXmlHandler : public wxXmlResourceHandler
00162 {
00163     DECLARE_DYNAMIC_CLASS(LensPanelXmlHandler)
00164 
00165 public:
00166     LensPanelXmlHandler();
00167     virtual wxObject *DoCreateResource();
00168     virtual bool CanHandle(wxXmlNode *node);
00169 };
00170 
00172 bool LoadLensParametersChoose(wxWindow * parent, Lens & lens, VariableMap & vars, ImageOptions & imgopts);
00173 
00174 #if 0
00175 
00176 bool initLensFromFile(const std::string & filename, double &cropFactor, Lens & l,
00177                       VariableMap & vars, ImageOptions & imgopts, bool sameSettings=false);
00178 #endif
00179 
00180 #endif // _LENSPANEL_H

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