Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EnfusePanel.h
Go to the documentation of this file.
1 // -*- c-basic-offset: 4 -*-
10 /* This is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This software is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public
21  * License along with this software. If not, see
22  * <http://www.gnu.org/licenses/>.
23  *
24  */
25 
26 #ifndef ENFUSEPANEL_H
27 #define ENFUSEPANEL_H
28 
29 #include "panoinc_WX.h"
30 #include <wx/propgrid/propgrid.h>
31 #include "PreviewWindow.h"
33 
37 class EnfusePanel : public wxPanel
38 {
39 public:
41  ~EnfusePanel();
43  bool Create(wxWindow* parent, MyExecPanel* logPanel);
45  void AddFile(const wxString& filename);
47  void OnProcessFinished(wxCommandEvent& e);
48 
49 protected:
51  void OnSize(wxSizeEvent& e);
52  void OnAddFiles(wxCommandEvent& e);
53  void OnRemoveFile(wxCommandEvent& e);
54  void OnCreateFile(wxCommandEvent& e);
55  void OnSelectAllFiles(wxKeyEvent& e);
56  void OnFileSelectionChanged(wxCommandEvent& e);
57  void OnFileCheckStateChanged(wxCommandEvent& e);
58  void OnLoadSetting(wxCommandEvent& e);
59  void OnSaveSetting(wxCommandEvent& e);
60  void OnResetSetting(wxCommandEvent& e);
61  void OnGeneratePreview(wxCommandEvent& e);
62  void OnGenerateOutput(wxCommandEvent& e);
63  void OnZoom(wxCommandEvent& e);
64 
65 private:
67  void PopulateEnfuseOptions();
69  void ExecuteEnfuse();
71  void ExecuteEnfuseExiftool();
75  wxString GetEnfuseOptions();
77  wxString GetEnfuseCommandLine();
79  void EnableFileButtons();
81  long GetCheckedItemCount() const;
83  void EnableOutputButtons(bool enable);
85  void CleanUpTempFiles();
86  // member variables
87  wxListCtrl* m_fileListCtrl = nullptr;
88  wxPropertyGrid* m_enfuseOptions = nullptr;
89  wxArrayString m_files;
92  wxArrayString m_outputFilenames;
93  wxArrayString m_tempFiles;
94  bool m_cleanupOutput = false;
95 
96  DECLARE_DYNAMIC_CLASS(EnfusePanel)
97 };
98 
99 #endif // ENFUSEPANEL_H
void OnSize(wxSizeEvent &e)
event handler
void OnAddFiles(wxCommandEvent &e)
void OnRemoveFile(wxCommandEvent &e)
MyExecPanel * m_logWindow
Definition: EnfusePanel.h:91
long GetCheckedItemCount() const
return the number of check images
void OnSelectAllFiles(wxKeyEvent &e)
void OnZoom(wxCommandEvent &e)
void ExecuteEnfuse()
build the command line and execute enfuse command
void OnGeneratePreview(wxCommandEvent &e)
void OnCreateFile(wxCommandEvent &e)
void EnableOutputButtons(bool enable)
enable/disable output buttons
wxArrayString m_files
Definition: EnfusePanel.h:89
void OnFileCheckStateChanged(wxCommandEvent &e)
void EnableFileButtons()
enable/disable the file(s) remove and create buttons depending on selection of wxListCtrl ...
void AddFile(const wxString &filename)
adds the given file to the list
bool m_cleanupOutput
Definition: EnfusePanel.h:94
PreviewWindow * m_preview
Definition: EnfusePanel.h:90
void OnLoadSetting(wxCommandEvent &e)
void ExecuteEnfuseExiftool()
build the command line and execute enfuse and exiftool afterwards
wxListCtrl * m_fileListCtrl
Definition: EnfusePanel.h:87
void OnFileSelectionChanged(wxCommandEvent &e)
void CleanUpTempFiles()
delete all temporary files, to be called mainly at end
bool Create(wxWindow *parent, MyExecPanel *logPanel)
creates the control and populates all controls with their settings
void PopulateEnfuseOptions()
fill the PropertyGrid with all enfuse options
void OnSaveSetting(wxCommandEvent &e)
panel for enfuse GUI
Definition: EnfusePanel.h:37
wxArrayString m_tempFiles
Definition: EnfusePanel.h:93
include file for the hugin project
void OnProcessFinished(wxCommandEvent &e)
call at the end of the enfuse command, to load result back and enable buttons again ...
~EnfusePanel()
destructor, save state and settings
wxString GetEnfuseCommandLine()
get the full commandline for enfuse without program, but with files and output options, the output filename is read from m_outputFilename
preview window
Definition: PreviewWindow.h:38
void OnResetSetting(wxCommandEvent &e)
wxPropertyGrid * m_enfuseOptions
Definition: EnfusePanel.h:88
wxArrayString m_outputFilenames
Definition: EnfusePanel.h:92
declaration of PreviewWindow class
wxString GetEnfuseOptions()
build string with all enfuse options from values in wxPropertyGrid this are the mainly the fusion opt...
void OnGenerateOutput(wxCommandEvent &e)