Hugintrunk
0.1
|
#include <SelectCropAspectRatioDialog.h>
Public Member Functions | |
SelectAspectRatioDialog (wxWindow *parent) | |
constructor, build dialog and load settings from file More... | |
~SelectAspectRatioDialog () | |
destructor, save position and list of aspect ratios More... | |
double | GetSelectedAspectRatio () const |
returns the selected aspect ratio More... | |
Protected Member Functions | |
void | OnOk (wxCommandEvent &e) |
handler for Ok, check for valid inputs More... | |
void | OnAddAspectRatio (wxCommandEvent &e) |
handler for adding new aspect ratio setting More... | |
void | OnRemoveAspectRatio (wxCommandEvent &e) |
handler for removing selected aspect ratio More... | |
void | OnListBoxSelect (wxCommandEvent &e) |
event handler for activation/deactivation of buttons if necessary More... | |
Private Member Functions | |
void | ListBoxSelectionChanged () |
implementation of activation/deactivation of buttons if necessary More... | |
void | FillListBox () |
read the settings from the file and add them to the list box if the file does not exist, populate list with default settings More... | |
wxFileName | GetAspectRatioFilename () const |
returns the file name for the list of aspect ratios More... | |
void | LoadAspectRatios () |
load aspect ratios from file More... | |
void | SaveAspectRatios () |
save the aspect ratios to the file More... | |
Private Attributes | |
wxArrayString | m_aspectRatioStrings |
array with names of all aspect ratios More... | |
std::vector< double > | m_aspectRatios |
vector with values of all aspect ratios, ratio=width/height More... | |
wxListBox * | m_aspectList |
pointer to wxListBox of aspect ratios More... | |
Definition at line 35 of file SelectCropAspectRatioDialog.h.
SelectAspectRatioDialog::SelectAspectRatioDialog | ( | wxWindow * | parent | ) |
constructor, build dialog and load settings from file
Definition at line 34 of file SelectCropAspectRatioDialog.cpp.
References FillListBox(), huginApp::Get(), ListBoxSelectionChanged(), m_aspectList, OnAddAspectRatio(), OnListBoxSelect(), OnOk(), OnRemoveAspectRatio(), and RestoreFramePosition().
SelectAspectRatioDialog::~SelectAspectRatioDialog | ( | ) |
destructor, save position and list of aspect ratios
Definition at line 55 of file SelectCropAspectRatioDialog.cpp.
References SaveAspectRatios(), and StoreFramePosition().
|
private |
read the settings from the file and add them to the list box if the file does not exist, populate list with default settings
Definition at line 201 of file SelectCropAspectRatioDialog.cpp.
References LoadAspectRatios(), m_aspectList, m_aspectRatios, and m_aspectRatioStrings.
Referenced by SelectAspectRatioDialog().
|
private |
returns the file name for the list of aspect ratios
Definition at line 224 of file SelectCropAspectRatioDialog.cpp.
References hugin_utils::GetUserAppDataDir().
Referenced by LoadAspectRatios(), and SaveAspectRatios().
double SelectAspectRatioDialog::GetSelectedAspectRatio | ( | ) | const |
returns the selected aspect ratio
Definition at line 63 of file SelectCropAspectRatioDialog.cpp.
References m_aspectList, and m_aspectRatios.
Referenced by GLPreviewFrame::OnSetCropAspect().
|
private |
implementation of activation/deactivation of buttons if necessary
Definition at line 193 of file SelectCropAspectRatioDialog.cpp.
References m_aspectList, and m_aspectRatioStrings.
Referenced by OnAddAspectRatio(), OnListBoxSelect(), OnRemoveAspectRatio(), and SelectAspectRatioDialog().
|
private |
load aspect ratios from file
Definition at line 229 of file SelectCropAspectRatioDialog.cpp.
References GetAspectRatioFilename(), celeste::line, m_aspectRatios, m_aspectRatioStrings, and separator.
Referenced by FillListBox().
|
protected |
handler for adding new aspect ratio setting
Definition at line 141 of file SelectCropAspectRatioDialog.cpp.
References CheckInputs(), ListBoxSelectionChanged(), m_aspectList, m_aspectRatios, and m_aspectRatioStrings.
Referenced by SelectAspectRatioDialog().
|
protected |
event handler for activation/deactivation of buttons if necessary
Definition at line 188 of file SelectCropAspectRatioDialog.cpp.
References ListBoxSelectionChanged().
Referenced by SelectAspectRatioDialog().
|
protected |
handler for Ok, check for valid inputs
Definition at line 73 of file SelectCropAspectRatioDialog.cpp.
References m_aspectList.
Referenced by SelectAspectRatioDialog().
|
protected |
handler for removing selected aspect ratio
Definition at line 170 of file SelectCropAspectRatioDialog.cpp.
References ListBoxSelectionChanged(), m_aspectList, m_aspectRatios, and m_aspectRatioStrings.
Referenced by SelectAspectRatioDialog().
|
private |
save the aspect ratios to the file
Definition at line 261 of file SelectCropAspectRatioDialog.cpp.
References GetAspectRatioFilename(), m_aspectRatios, m_aspectRatioStrings, and separator.
Referenced by ~SelectAspectRatioDialog().
|
private |
pointer to wxListBox of aspect ratios
Definition at line 70 of file SelectCropAspectRatioDialog.h.
Referenced by FillListBox(), GetSelectedAspectRatio(), ListBoxSelectionChanged(), OnAddAspectRatio(), OnOk(), OnRemoveAspectRatio(), and SelectAspectRatioDialog().
|
private |
vector with values of all aspect ratios, ratio=width/height
Definition at line 68 of file SelectCropAspectRatioDialog.h.
Referenced by FillListBox(), GetSelectedAspectRatio(), LoadAspectRatios(), OnAddAspectRatio(), OnRemoveAspectRatio(), and SaveAspectRatios().
|
private |
array with names of all aspect ratios
Definition at line 66 of file SelectCropAspectRatioDialog.h.
Referenced by FillListBox(), ListBoxSelectionChanged(), LoadAspectRatios(), OnAddAspectRatio(), OnRemoveAspectRatio(), and SaveAspectRatios().