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
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. More...
 
 ~EditOutputIniDialog ()
 destructor, saves size and position More...
 

Protected Member Functions

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

Private Member Functions

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

Private Attributes

wxPropertyGridManager * m_grid
 
wxPGProperty * m_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 ( wxWindow *  parent)

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

Definition at line 130 of file EditOutputIniDialog.cpp.

References huginApp::Get(), InitArrays(), m_grid, OnContextMenu(), OnOk(), ReadIni(), and RestoreFramePosition().

EditOutputIniDialog::~EditOutputIniDialog ( )

destructor, saves size and position

Definition at line 156 of file EditOutputIniDialog.cpp.

References StoreFramePosition().

Member Function Documentation

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 167 of file EditOutputIniDialog.cpp.

References BlenderArray, HDRFileTypeArray, LDRFileTypeArray, m_grid, OutputTypeArray, and ProjectionArray.

Referenced by OnAddCondition(), and ReadIni().

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

function to build context menu with all missing entries

Definition at line 407 of file EditOutputIniDialog.cpp.

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

Referenced by OnContextMenu().

wxArrayString EditOutputIniDialog::GetChildren ( wxPGProperty *  prop) const
private

return wxArrayString with all sub-entries of given wxPGProperty

Definition at line 500 of file EditOutputIniDialog.cpp.

References m_grid.

Referenced by BuildAddContextMenu(), and OnAddCondition().

wxFileName EditOutputIniDialog::GetIniFileName ( )
private

return the filename of the default ini file

Definition at line 402 of file EditOutputIniDialog.cpp.

References hugin_utils::GetUserAppDataDir().

Referenced by ReadIni(), and WriteIni().

wxArrayString EditOutputIniDialog::GetSections ( ) const
private

return wxArrayString with all sections

Definition at line 490 of file EditOutputIniDialog.cpp.

References m_grid.

Referenced by OnAddSection(), and OnRenameSection().

void EditOutputIniDialog::OnAddCondition ( wxCommandEvent &  e)
protected

adds a new condition to list

Definition at line 564 of file EditOutputIniDialog.cpp.

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

Referenced by BuildAddContextMenu().

void EditOutputIniDialog::OnAddSection ( wxCommandEvent &  e)
protected

add a new section

Definition at line 511 of file EditOutputIniDialog.cpp.

References contains(), GetSections(), and m_grid.

Referenced by OnContextMenu().

void EditOutputIniDialog::OnContextMenu ( wxContextMenuEvent &  e)
protected

right click handler, show popup menu

Definition at line 441 of file EditOutputIniDialog.cpp.

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

Referenced by EditOutputIniDialog().

void EditOutputIniDialog::OnOk ( wxCommandEvent &  e)
protected

save ini and close dialog

Definition at line 161 of file EditOutputIniDialog.cpp.

References WriteIni().

Referenced by EditOutputIniDialog().

void EditOutputIniDialog::OnRenameSection ( wxCommandEvent &  e)
protected

renames a new section

Definition at line 535 of file EditOutputIniDialog.cpp.

References contains(), GetSections(), and m_grid.

Referenced by OnContextMenu().

void EditOutputIniDialog::ReadIni ( )
private

read the ini file and populate the control

Definition at line 290 of file EditOutputIniDialog.cpp.

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

Referenced by EditOutputIniDialog().

void EditOutputIniDialog::WriteIni ( )
private

write the ini to disc

Definition at line 334 of file EditOutputIniDialog.cpp.

References GetIniFileName(), and m_grid.

Referenced by OnOk().

Member Data Documentation

wxPGProperty* EditOutputIniDialog::m_currentSection
private

Definition at line 71 of file EditOutputIniDialog.h.

Referenced by BuildAddContextMenu(), and OnAddCondition().

wxPropertyGridManager* EditOutputIniDialog::m_grid
private

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