Hugin trunk 0.1
Loading...
Searching...
No Matches
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
 
bool Create (wxWindow *parent, MyExecPanel *logPanel)
 creates the control and populates all controls with their settings
 
void AddFile (const wxString &filename)
 adds the given file to the list
 
void OnProcessFinished (wxCommandEvent &e)
 call at the end of the enfuse command, to load result back and enable buttons again
 

Protected Member Functions

void OnAddFiles (wxCommandEvent &e)
 event handler
 
void OnRemoveFile (wxCommandEvent &e)
 
void OnCreateFile (wxCommandEvent &e)
 
void OnFileListChar (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
 
void ExecuteEnfuse ()
 build the command line and execute enfuse command
 
void ExecuteEnfuseExiftool ()
 build the command line and execute enfuse and exiftool afterwards
 
wxString GetEnfuseOptions ()
 build string with all enfuse options from values in wxPropertyGrid this are the mainly the fusion options without the filesnames

 
wxString GetEnfuseCommandLine ()
 get the full commandline for enfuse without program, but with files and output options, the output filename is read from m_outputFilename
 
void EnableFileButtons ()
 enable/disable the file(s) remove and create buttons depending on selection of wxListCtrl
 
long GetCheckedItemCount () const
 return the number of check images
 
void EnableOutputButtons (bool enable)
 enable/disable output buttons
 
void CleanUpTempFiles ()
 delete all temporary files, to be called mainly at end
 

Private Attributes

wxListCtrl * m_fileListCtrl = nullptr
 
wxPropertyGridm_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::~EnfusePanel ( )

destructor, save state and settings

Definition at line 191 of file EnfusePanel.cpp.

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

Member Function Documentation

◆ AddFile()

void EnfusePanel::AddFile ( const wxString filename)

◆ CleanUpTempFiles()

void EnfusePanel::CleanUpTempFiles ( )
private

delete all temporary files, to be called mainly at end

Definition at line 1125 of file EnfusePanel.cpp.

References m_tempFiles, and threshold().

Referenced by ~EnfusePanel().

◆ Create()

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

◆ EnableFileButtons()

void EnfusePanel::EnableFileButtons ( )
private

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

Definition at line 1097 of file EnfusePanel.cpp.

References m_fileListCtrl, and threshold().

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

◆ EnableOutputButtons()

void EnfusePanel::EnableOutputButtons ( bool  enable)
private

enable/disable output buttons

Definition at line 1118 of file EnfusePanel.cpp.

References threshold().

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

◆ ExecuteEnfuse()

void EnfusePanel::ExecuteEnfuse ( )
private

◆ ExecuteEnfuseExiftool()

void EnfusePanel::ExecuteEnfuseExiftool ( )
private

◆ GetCheckedItemCount()

long EnfusePanel::GetCheckedItemCount ( ) const
private

return the number of check images

Definition at line 1104 of file EnfusePanel.cpp.

References m_fileListCtrl, and threshold().

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

◆ GetEnfuseCommandLine()

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 1069 of file EnfusePanel.cpp.

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

Referenced by ExecuteEnfuse(), and ExecuteEnfuseExiftool().

◆ GetEnfuseOptions()

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 899 of file EnfusePanel.cpp.

References m_enfuseOptions, and threshold().

Referenced by GetEnfuseCommandLine().

◆ OnAddFiles()

void EnfusePanel::OnAddFiles ( wxCommandEvent &  e)
protected

event handler

Definition at line 302 of file EnfusePanel.cpp.

References AddFile(), GetFileDialogImageFilters(), and threshold().

Referenced by Create().

◆ OnCreateFile()

void EnfusePanel::OnCreateFile ( wxCommandEvent &  e)
protected

◆ OnFileCheckStateChanged()

void EnfusePanel::OnFileCheckStateChanged ( wxCommandEvent &  e)
protected

Definition at line 470 of file EnfusePanel.cpp.

References EnableOutputButtons(), and GetCheckedItemCount().

Referenced by Create().

◆ OnFileListChar()

void EnfusePanel::OnFileListChar ( wxKeyEvent e)
protected

Definition at line 429 of file EnfusePanel.cpp.

References m_fileListCtrl, and threshold().

Referenced by Create().

◆ OnFileSelectionChanged()

void EnfusePanel::OnFileSelectionChanged ( wxCommandEvent &  e)
protected

Definition at line 464 of file EnfusePanel.cpp.

References EnableFileButtons().

Referenced by Create().

◆ OnGenerateOutput()

void EnfusePanel::OnGenerateOutput ( wxCommandEvent &  e)
protected

◆ OnGeneratePreview()

void EnfusePanel::OnGeneratePreview ( wxCommandEvent &  e)
protected

◆ OnLoadSetting()

void EnfusePanel::OnLoadSetting ( wxCommandEvent &  e)
protected

◆ OnProcessFinished()

void EnfusePanel::OnProcessFinished ( wxCommandEvent &  e)

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

Definition at line 763 of file EnfusePanel.cpp.

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

Referenced by ToolboxFrame::OnQueueProgress().

◆ OnRemoveFile()

void EnfusePanel::OnRemoveFile ( wxCommandEvent &  e)
protected

◆ OnResetSetting()

void EnfusePanel::OnResetSetting ( wxCommandEvent &  e)
protected

Definition at line 586 of file EnfusePanel.cpp.

References m_enfuseOptions.

Referenced by Create().

◆ OnSaveSetting()

void EnfusePanel::OnSaveSetting ( wxCommandEvent &  e)
protected

◆ OnZoom()

void EnfusePanel::OnZoom ( wxCommandEvent &  e)
protected

Definition at line 729 of file EnfusePanel.cpp.

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

Referenced by Create().

◆ PopulateEnfuseOptions()

void EnfusePanel::PopulateEnfuseOptions ( )
private

fill the PropertyGrid with all enfuse options

Definition at line 781 of file EnfusePanel.cpp.

References m_enfuseOptions, and threshold().

Referenced by Create().

Member Data Documentation

◆ m_cleanupOutput

bool EnfusePanel::m_cleanupOutput = false
private

Definition at line 93 of file EnfusePanel.h.

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

◆ m_enfuseOptions

wxPropertyGrid* EnfusePanel::m_enfuseOptions = nullptr
private

◆ m_fileListCtrl

wxListCtrl* EnfusePanel::m_fileListCtrl = nullptr
private

◆ m_files

wxArrayString EnfusePanel::m_files
private

◆ m_logWindow

MyExecPanel* EnfusePanel::m_logWindow = nullptr
private

Definition at line 90 of file EnfusePanel.h.

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

◆ m_outputFilenames

wxArrayString EnfusePanel::m_outputFilenames
private

◆ m_preview

PreviewWindow* EnfusePanel::m_preview = nullptr
private

Definition at line 89 of file EnfusePanel.h.

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

◆ m_tempFiles

wxArrayString EnfusePanel::m_tempFiles
private

Definition at line 92 of file EnfusePanel.h.

Referenced by CleanUpTempFiles(), and OnCreateFile().


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