Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
EditOutputIniDialog Class Reference

Dialog for editing user defined output settings (ini file) More...

#include <EditOutputIniDialog.h>

Inheritance diagram for EditOutputIniDialog:
Inheritance graph

Public Member Functions

 EditOutputIniDialog (wxWindow *parent)
 Constructor, constructs dialog; restore last uses settings, size and position.
 
 ~EditOutputIniDialog ()
 destructor, saves size and position
 

Protected Member Functions

void OnOk (wxCommandEvent &e)
 save ini and close dialog
 
void OnContextMenu (wxContextMenuEvent &e)
 right click handler, show popup menu
 
void OnAddSection (wxCommandEvent &e)
 add a new section
 
void OnRenameSection (wxCommandEvent &e)
 renames a new section
 
void OnAddCondition (wxCommandEvent &e)
 adds a new condition to list
 

Private Member Functions

void ReadIni ()
 read the ini file and populate the control
 
void WriteIni ()
 write the ini to disc
 
wxFileName GetIniFileName ()
 return the filename of the default ini file
 
wxArrayString GetSections () const
 return wxArrayString with all sections
 
wxArrayString GetChildren (wxPGProperty *prop) const
 return wxArrayString with all sub-entries of given wxPGProperty
 
void BuildAddContextMenu (wxMenu &menu, wxPGProperty *category, const bool addSeparator)
 function to build context menu with all missing entries
 
void AddKey (wxPGProperty *section, const wxString &key, const wxString &value)
 add key with value to wxPropertyGrid, generate if necessary all sub properties
 

Private Attributes

wxPropertyGridManagerm_grid
 
wxPGPropertym_currentSection
 

Detailed Description

Dialog for editing user defined output settings (ini file)

Definition at line 34 of file EditOutputIniDialog.h.

Constructor & Destructor Documentation

◆ EditOutputIniDialog()

EditOutputIniDialog::EditOutputIniDialog ( wxWindow *  parent)

Constructor, constructs dialog; restore last uses settings, size and position.

Definition at line 131 of file EditOutputIniDialog.cpp.

References InitArrays(), m_grid, OnContextMenu(), OnOk(), ReadIni(), hugin_utils::RestoreFramePosition(), and threshold().

◆ ~EditOutputIniDialog()

EditOutputIniDialog::~EditOutputIniDialog ( )

destructor, saves size and position

Definition at line 148 of file EditOutputIniDialog.cpp.

References hugin_utils::StoreFramePosition().

Member Function Documentation

◆ AddKey()

void EditOutputIniDialog::AddKey ( wxPGProperty section,
const wxString key,
const wxString value 
)
private

add key with value to wxPropertyGrid, generate if necessary all sub properties

Definition at line 159 of file EditOutputIniDialog.cpp.

References BlenderArray, HDRFileTypeArray, LDRFileTypeArray, m_grid, OutputTypeArray, ProjectionArray, and threshold().

Referenced by OnAddCondition(), and ReadIni().

◆ BuildAddContextMenu()

void EditOutputIniDialog::BuildAddContextMenu ( wxMenu menu,
wxPGProperty category,
const bool  addSeparator 
)
private

function to build context menu with all missing entries

Definition at line 399 of file EditOutputIniDialog.cpp.

References ADDKEYITEM, GetChildren(), m_currentSection, OnAddCondition(), and threshold().

Referenced by OnContextMenu().

◆ GetChildren()

wxArrayString EditOutputIniDialog::GetChildren ( wxPGProperty prop) const
private

return wxArrayString with all sub-entries of given wxPGProperty

Definition at line 492 of file EditOutputIniDialog.cpp.

References m_grid, and threshold().

Referenced by BuildAddContextMenu(), and OnAddCondition().

◆ GetIniFileName()

wxFileName EditOutputIniDialog::GetIniFileName ( )
private

return the filename of the default ini file

Definition at line 394 of file EditOutputIniDialog.cpp.

References hugin_utils::GetUserAppDataDir(), and threshold().

Referenced by ReadIni(), and WriteIni().

◆ GetSections()

wxArrayString EditOutputIniDialog::GetSections ( ) const
private

return wxArrayString with all sections

Definition at line 482 of file EditOutputIniDialog.cpp.

References m_grid, and threshold().

Referenced by OnAddSection(), and OnRenameSection().

◆ OnAddCondition()

void EditOutputIniDialog::OnAddCondition ( wxCommandEvent &  e)
protected

adds a new condition to list

Definition at line 556 of file EditOutputIniDialog.cpp.

References AddKey(), GetChildren(), m_currentSection, m_grid, and threshold().

Referenced by BuildAddContextMenu().

◆ OnAddSection()

void EditOutputIniDialog::OnAddSection ( wxCommandEvent &  e)
protected

add a new section

Definition at line 503 of file EditOutputIniDialog.cpp.

References contains(), GetSections(), hugin_utils::HuginMessageBox(), m_grid, and threshold().

Referenced by OnContextMenu().

◆ OnContextMenu()

void EditOutputIniDialog::OnContextMenu ( wxContextMenuEvent e)
protected

right click handler, show popup menu

Definition at line 433 of file EditOutputIniDialog.cpp.

References BuildAddContextMenu(), m_grid, OnAddSection(), OnRenameSection(), and threshold().

Referenced by EditOutputIniDialog().

◆ OnOk()

void EditOutputIniDialog::OnOk ( wxCommandEvent &  e)
protected

save ini and close dialog

Definition at line 153 of file EditOutputIniDialog.cpp.

References threshold(), and WriteIni().

Referenced by EditOutputIniDialog().

◆ OnRenameSection()

void EditOutputIniDialog::OnRenameSection ( wxCommandEvent &  e)
protected

renames a new section

Definition at line 527 of file EditOutputIniDialog.cpp.

References contains(), GetSections(), hugin_utils::HuginMessageBox(), m_grid, and threshold().

Referenced by OnContextMenu().

◆ ReadIni()

void EditOutputIniDialog::ReadIni ( )
private

read the ini file and populate the control

Definition at line 282 of file EditOutputIniDialog.cpp.

References AddKey(), defaultIni, GetIniFileName(), m_grid, and threshold().

Referenced by EditOutputIniDialog().

◆ WriteIni()

void EditOutputIniDialog::WriteIni ( )
private

write the ini to disc

Definition at line 326 of file EditOutputIniDialog.cpp.

References GetIniFileName(), hugin_utils::HuginMessageBox(), m_grid, and threshold().

Referenced by OnOk().

Member Data Documentation

◆ m_currentSection

wxPGProperty* EditOutputIniDialog::m_currentSection
private

Definition at line 71 of file EditOutputIniDialog.h.

Referenced by BuildAddContextMenu(), and OnAddCondition().

◆ m_grid

wxPropertyGridManager* EditOutputIniDialog::m_grid
private

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