Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OptimizePanel.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
24 #ifndef _OPTIMIZE_PANEL_H
25 #define _OPTIMIZE_PANEL_H
26 
27 #include <panodata/Panorama.h>
28 #include <wx/xrc/xmlres.h>
29 #include "GuiLevel.h"
30 
31 class ImagesTreeCtrl;
32 class wxCheckBox;
33 
38 class OptimizePanel : public wxPanel, public HuginBase::PanoramaObserver
39 {
40 
41 
42 public:
43  OptimizePanel();
44 
46  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"));
47 
48  virtual ~OptimizePanel();
49 
50  void Init(HuginBase::Panorama * pano);
51 
53  virtual void panoramaChanged(HuginBase::Panorama & pano);
55  virtual void panoramaImagesChanged(HuginBase::Panorama &pano, const HuginBase::UIntSet & imgNr);
56 
58  void OnOptimizeButton(wxCommandEvent & e);
60  void OnCheckOnlyActiveImages(wxCommandEvent &e);
62  void SetOnlyActiveImages(const bool onlyActive);
64  void OnCheckIgnoreLineCP(wxCommandEvent &e);
66  void SetIgnoreLineCP(const bool noLineCp);
67  void SetGuiLevel(GuiLevel newGuiLevel);
68 
69 protected:
70 
71  void OnClose(wxCloseEvent& e);
72  void OnReset(wxCommandEvent& e);
73 
74  void runOptimizer(const HuginBase::UIntSet & img, const bool ignoreLineCp);
75 
76  bool AskApplyResult(wxWindow* activeWindow, const HuginBase::Panorama & pano);
77 
80 
82  wxCheckBox * m_ignore_line_cp;
83  wxCheckBox * m_edit_cb;
84 
86 private:
87 
88  DECLARE_EVENT_TABLE()
89  DECLARE_DYNAMIC_CLASS(OptimizePanel)
90 };
91 
92 
94 class OptimizePanelXmlHandler : public wxXmlResourceHandler
95 {
96  DECLARE_DYNAMIC_CLASS(OptimizePanelXmlHandler)
97 
98 public:
100  virtual wxObject *DoCreateResource();
101  virtual bool CanHandle(wxXmlNode *node);
102 };
103 
104 
105 #endif // _OPTIMIZE_PANEL_H
ImagesTreeCtrl * m_lens_tree_list
Definition: OptimizePanel.h:79
declaration of helper for work with different GuiLevels
ImagesTreeCtrl * m_images_tree_list
Definition: OptimizePanel.h:78
virtual ~OptimizePanel()
virtual void panoramaImagesChanged(HuginBase::Panorama &pano, const HuginBase::UIntSet &imgNr)
receives notification about panorama changes
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"))
Delayed creation.
void OnReset(wxCommandEvent &e)
void OnCheckIgnoreLineCP(wxCommandEvent &e)
handle &quot;ignore line cp&quot; checkbox
wxCheckBox * m_only_active_images_cb
Definition: OptimizePanel.h:81
void Init(HuginBase::Panorama *pano)
std::set< unsigned int > UIntSet
Definition: PanoramaData.h:51
HuginBase::Panorama * m_pano
Definition: OptimizePanel.h:85
void runOptimizer(const HuginBase::UIntSet &img, const bool ignoreLineCp)
Model for a panorama.
Definition: Panorama.h:152
void SetIgnoreLineCP(const bool noLineCp)
for external setting of &quot;ignore line cp&quot; checkbox
void SetOnlyActiveImages(const bool onlyActive)
for external setting of &quot;only active image&quot; checkbox
wxCheckBox * m_ignore_line_cp
Definition: OptimizePanel.h:82
void OnOptimizeButton(wxCommandEvent &e)
run the optimizer
bool AskApplyResult(wxWindow *activeWindow, const HuginBase::Panorama &pano)
run the optimizer.
Definition: OptimizePanel.h:38
void SetGuiLevel(GuiLevel newGuiLevel)
this handler class will receive change events from the Panorama.
Definition: PanoramaData.h:401
the main images tree control, used on images and optimizer tabs
Definition: ImagesTree.h:36
GuiLevel
Definition: GuiLevel.h:31
virtual void panoramaChanged(HuginBase::Panorama &pano)
receives notification about panorama changes
wxCheckBox * m_edit_cb
Definition: OptimizePanel.h:83
void OnClose(wxCloseEvent &e)
void OnCheckOnlyActiveImages(wxCommandEvent &e)
handle &quot;only active images&quot; checkbox