Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
EnfusePanel Class Reference

panel for enfuse GUI More...

#include <EnfusePanel.h>

Inheritance diagram for EnfusePanel:
Inheritance graph

Public Member Functions

 ~EnfusePanel ()
 destructor, save state and settings More...
 
bool Create (wxWindow *parent, MyExecPanel *logPanel)
 creates the control and populates all controls with their settings More...
 
void AddFile (const wxString &filename)
 adds the given file to the list More...
 
void OnProcessFinished (wxCommandEvent &e)
 call at the end of the enfuse command, to load result back and enable buttons again More...
 

Protected Member Functions

void OnSize (wxSizeEvent &e)
 event handler More...
 
void OnAddFiles (wxCommandEvent &e)
 
void OnRemoveFile (wxCommandEvent &e)
 
void OnCreateFile (wxCommandEvent &e)
 
void OnSelectAllFiles (wxKeyEvent &e)
 
void OnFileSelectionChanged (wxCommandEvent &e)
 
void OnFileCheckStateChanged (wxCommandEvent &e)
 
void OnLoadSetting (wxCommandEvent &e)
 
void OnSaveSetting (wxCommandEvent &e)
 
void OnResetSetting (wxCommandEvent &e)
 
void OnGeneratePreview (wxCommandEvent &e)
 
void OnGenerateOutput (wxCommandEvent &e)
 
void OnZoom (wxCommandEvent &e)
 

Private Member Functions

void PopulateEnfuseOptions ()
 fill the PropertyGrid with all enfuse options More...
 
void ExecuteEnfuse ()
 build the command line and execute enfuse command More...
 
void ExecuteEnfuseExiftool ()
 build the command line and execute enfuse and exiftool afterwards More...
 
wxString GetEnfuseOptions ()
 build string with all enfuse options from values in wxPropertyGrid this are the mainly the fusion options without the filesnames More...
 
wxString GetEnfuseCommandLine ()
 get the full commandline for enfuse without program, but with files and output options, the output filename is read from m_outputFilename More...
 
void EnableFileButtons ()
 enable/disable the file(s) remove and create buttons depending on selection of wxListCtrl More...
 
long GetCheckedItemCount () const
 return the number of check images More...
 
void EnableOutputButtons (bool enable)
 enable/disable output buttons More...
 
void CleanUpTempFiles ()
 delete all temporary files, to be called mainly at end More...
 

Private Attributes

wxListCtrl * m_fileListCtrl = nullptr
 
wxPropertyGrid * m_enfuseOptions = nullptr
 
wxArrayString m_files
 
PreviewWindowm_preview = nullptr
 
MyExecPanelm_logWindow = nullptr
 
wxArrayString m_outputFilenames
 
wxArrayString m_tempFiles
 
bool m_cleanupOutput = false
 

Detailed Description

panel for enfuse GUI

Definition at line 37 of file EnfusePanel.h.

Constructor & Destructor Documentation

EnfusePanel::~EnfusePanel ( )

destructor, save state and settings

Definition at line 190 of file EnfusePanel.cpp.

References CleanUpTempFiles(), GetPropertyGridContent(), m_enfuseOptions, and m_fileListCtrl.

Member Function Documentation

void EnfusePanel::AddFile ( const wxString &  filename)
void EnfusePanel::CleanUpTempFiles ( )
private

delete all temporary files, to be called mainly at end

Definition at line 1117 of file EnfusePanel.cpp.

References m_tempFiles.

Referenced by ~EnfusePanel().

bool EnfusePanel::Create ( wxWindow *  parent,
MyExecPanel logPanel 
)
void EnfusePanel::EnableFileButtons ( )
private

enable/disable the file(s) remove and create buttons depending on selection of wxListCtrl

Definition at line 1089 of file EnfusePanel.cpp.

References m_fileListCtrl.

Referenced by Create(), OnFileSelectionChanged(), and OnRemoveFile().

void EnfusePanel::EnableOutputButtons ( bool  enable)
private

enable/disable output buttons

Definition at line 1110 of file EnfusePanel.cpp.

Referenced by AddFile(), Create(), ExecuteEnfuse(), ExecuteEnfuseExiftool(), OnFileCheckStateChanged(), OnProcessFinished(), and OnRemoveFile().

void EnfusePanel::ExecuteEnfuse ( )
private
void EnfusePanel::ExecuteEnfuseExiftool ( )
private
long EnfusePanel::GetCheckedItemCount ( ) const
private

return the number of check images

Definition at line 1096 of file EnfusePanel.cpp.

References m_fileListCtrl.

Referenced by AddFile(), OnFileCheckStateChanged(), and OnRemoveFile().

wxString EnfusePanel::GetEnfuseCommandLine ( )
private

get the full commandline for enfuse without program, but with files and output options, the output filename is read from m_outputFilename

Definition at line 1055 of file EnfusePanel.cpp.

References GetEnfuseOptions(), m_fileListCtrl, m_files, m_outputFilenames, and hugin_utils::wxQuoteFilename().

Referenced by ExecuteEnfuse(), and ExecuteEnfuseExiftool().

wxString EnfusePanel::GetEnfuseOptions ( )
private

build string with all enfuse options from values in wxPropertyGrid this are the mainly the fusion options without the filesnames

Definition at line 885 of file EnfusePanel.cpp.

References m_enfuseOptions.

Referenced by GetEnfuseCommandLine().

void EnfusePanel::OnAddFiles ( wxCommandEvent &  e)
protected

Definition at line 309 of file EnfusePanel.cpp.

References AddFile(), and GetFileDialogImageFilters().

Referenced by Create().

void EnfusePanel::OnCreateFile ( wxCommandEvent &  e)
protected
void EnfusePanel::OnFileCheckStateChanged ( wxCommandEvent &  e)
protected

Definition at line 457 of file EnfusePanel.cpp.

References EnableOutputButtons(), and GetCheckedItemCount().

Referenced by Create().

void EnfusePanel::OnFileSelectionChanged ( wxCommandEvent &  e)
protected

Definition at line 451 of file EnfusePanel.cpp.

References EnableFileButtons().

Referenced by Create().

void EnfusePanel::OnGenerateOutput ( wxCommandEvent &  e)
protected
void EnfusePanel::OnGeneratePreview ( wxCommandEvent &  e)
protected

Definition at line 598 of file EnfusePanel.cpp.

References ExecuteEnfuse(), HuginQueue::GetConfigTempDir(), m_cleanupOutput, and m_outputFilenames.

Referenced by Create().

void EnfusePanel::OnLoadSetting ( wxCommandEvent &  e)
protected
void EnfusePanel::OnProcessFinished ( wxCommandEvent &  e)

call at the end of the enfuse command, to load result back and enable buttons again

Definition at line 750 of file EnfusePanel.cpp.

References EnableOutputButtons(), m_cleanupOutput, m_outputFilenames, m_preview, and PreviewWindow::setImage().

Referenced by ToolboxFrame::OnQueueProgress().

void EnfusePanel::OnRemoveFile ( wxCommandEvent &  e)
protected

Definition at line 364 of file EnfusePanel.cpp.

References EnableFileButtons(), EnableOutputButtons(), GetCheckedItemCount(), m_fileListCtrl, and m_files.

Referenced by Create().

void EnfusePanel::OnResetSetting ( wxCommandEvent &  e)
protected

Definition at line 573 of file EnfusePanel.cpp.

References m_enfuseOptions.

Referenced by Create().

void EnfusePanel::OnSaveSetting ( wxCommandEvent &  e)
protected
void EnfusePanel::OnSelectAllFiles ( wxKeyEvent &  e)
protected

Definition at line 437 of file EnfusePanel.cpp.

References m_fileListCtrl.

Referenced by Create().

void EnfusePanel::OnSize ( wxSizeEvent &  e)
protected

event handler

Definition at line 302 of file EnfusePanel.cpp.

Referenced by Create().

void EnfusePanel::OnZoom ( wxCommandEvent &  e)
protected

Definition at line 716 of file EnfusePanel.cpp.

References DEBUG_ERROR, m_preview, and PreviewWindow::setScale().

Referenced by Create().

void EnfusePanel::PopulateEnfuseOptions ( )
private

fill the PropertyGrid with all enfuse options

Definition at line 768 of file EnfusePanel.cpp.

References m_enfuseOptions.

Referenced by Create().

Member Data Documentation

bool EnfusePanel::m_cleanupOutput = false
private

Definition at line 94 of file EnfusePanel.h.

Referenced by OnGenerateOutput(), OnGeneratePreview(), and OnProcessFinished().

wxPropertyGrid* EnfusePanel::m_enfuseOptions = nullptr
private
wxListCtrl* EnfusePanel::m_fileListCtrl = nullptr
private
wxArrayString EnfusePanel::m_files
private
MyExecPanel* EnfusePanel::m_logWindow = nullptr
private

Definition at line 91 of file EnfusePanel.h.

Referenced by Create(), ExecuteEnfuse(), and ExecuteEnfuseExiftool().

wxArrayString EnfusePanel::m_outputFilenames
private
PreviewWindow* EnfusePanel::m_preview = nullptr
private

Definition at line 90 of file EnfusePanel.h.

Referenced by Create(), OnProcessFinished(), and OnZoom().

wxArrayString EnfusePanel::m_tempFiles
private

Definition at line 93 of file EnfusePanel.h.

Referenced by CleanUpTempFiles(), and OnCreateFile().


The documentation for this class was generated from the following files: