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)
 
void OnImageLoaded (HuginBase::ImageCache::EntryPtr entry, std::string filename)
 called when is image is fully loaded to display image in wxStaticBitmap
 

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 }
 
wxPropertyGrid * m_enfuseOptions { nullptr }
 
wxArrayString m_files
 
PreviewWindow * m_preview { nullptr }
 
wxNotebook * m_enfuse_preview_notebook { nullptr }
 
MyExecPanel * m_logWindow { nullptr }
 
wxStaticBitmap * m_previewSelectedImage { nullptr }
 
HuginBase::ImageCache::RequestPtr m_imgRequest
 
std::string m_selectedImage
 
wxArrayString m_outputFilenames
 
wxArrayString m_tempFiles
 
bool m_cleanupOutput = false
 

Detailed Description

panel for enfuse GUI

Definition at line 38 of file EnfusePanel.h.

Constructor & Destructor Documentation

◆ ~EnfusePanel()

EnfusePanel::~EnfusePanel ( )

destructor, save state and settings

Definition at line 193 of file EnfusePanel.cpp.

References CleanUpTempFiles(), GetPropertyGridContent(), m_enfuse_preview_notebook, 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 1170 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 1142 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 1163 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 1149 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 1114 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 944 of file EnfusePanel.cpp.

References m_enfuseOptions, and threshold().

Referenced by GetEnfuseCommandLine().

◆ OnAddFiles()

void EnfusePanel::OnAddFiles ( wxCommandEvent &  e)
protected

event handler

Definition at line 308 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 515 of file EnfusePanel.cpp.

References EnableOutputButtons(), and GetCheckedItemCount().

Referenced by Create().

◆ OnFileListChar()

void EnfusePanel::OnFileListChar ( wxKeyEvent &  e)
protected

Definition at line 435 of file EnfusePanel.cpp.

References m_fileListCtrl, and threshold().

Referenced by Create().

◆ OnFileSelectionChanged()

void EnfusePanel::OnFileSelectionChanged ( wxCommandEvent &  e)
protected

◆ OnGenerateOutput()

void EnfusePanel::OnGenerateOutput ( wxCommandEvent &  e)
protected

◆ OnGeneratePreview()

void EnfusePanel::OnGeneratePreview ( wxCommandEvent &  e)
protected

◆ OnImageLoaded()

void EnfusePanel::OnImageLoaded ( HuginBase::ImageCache::EntryPtr  entry,
std::string  filename 
)
protected

called when is image is fully loaded to display image in wxStaticBitmap

Definition at line 505 of file EnfusePanel.cpp.

References GeneratePreviewSelectedFile(), m_previewSelectedImage, m_selectedImage, and threshold().

Referenced by OnFileSelectionChanged().

◆ 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 808 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 631 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 774 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 826 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 100 of file EnfusePanel.h.

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

◆ m_enfuse_preview_notebook

wxNotebook* EnfusePanel::m_enfuse_preview_notebook { nullptr }
private

Definition at line 93 of file EnfusePanel.h.

Referenced by Create(), and ~EnfusePanel().

◆ m_enfuseOptions

wxPropertyGrid* EnfusePanel::m_enfuseOptions { nullptr }
private

◆ m_fileListCtrl

wxListCtrl* EnfusePanel::m_fileListCtrl { nullptr }
private

◆ m_files

wxArrayString EnfusePanel::m_files
private

◆ m_imgRequest

HuginBase::ImageCache::RequestPtr EnfusePanel::m_imgRequest
private

Definition at line 96 of file EnfusePanel.h.

Referenced by OnFileSelectionChanged().

◆ m_logWindow

MyExecPanel* EnfusePanel::m_logWindow { nullptr }
private

Definition at line 94 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 92 of file EnfusePanel.h.

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

◆ m_previewSelectedImage

wxStaticBitmap* EnfusePanel::m_previewSelectedImage { nullptr }
private

Definition at line 95 of file EnfusePanel.h.

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

◆ m_selectedImage

std::string EnfusePanel::m_selectedImage
private

Definition at line 97 of file EnfusePanel.h.

Referenced by OnFileSelectionChanged(), and OnImageLoaded().

◆ m_tempFiles

wxArrayString EnfusePanel::m_tempFiles
private

Definition at line 99 of file EnfusePanel.h.

Referenced by CleanUpTempFiles(), and OnCreateFile().


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