|
Hugin trunk 0.1
|
#include <SelectCropAspectRatioDialog.h>

Public Member Functions | |
| SelectAspectRatioDialog (wxWindow *parent) | |
| constructor, build dialog and load settings from file | |
| ~SelectAspectRatioDialog () | |
| destructor, save position and list of aspect ratios | |
| double | GetSelectedAspectRatio () const |
| returns the selected aspect ratio | |
Protected Member Functions | |
| void | OnOk (wxCommandEvent &e) |
| handler for Ok, check for valid inputs | |
| void | OnAddAspectRatio (wxCommandEvent &e) |
| handler for adding new aspect ratio setting | |
| void | OnRemoveAspectRatio (wxCommandEvent &e) |
| handler for removing selected aspect ratio | |
| void | OnListBoxSelect (wxCommandEvent &e) |
| event handler for activation/deactivation of buttons if necessary | |
Private Member Functions | |
| void | ListBoxSelectionChanged () |
| implementation of activation/deactivation of buttons if necessary | |
| 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 | |
| wxFileName | GetAspectRatioFilename () const |
| returns the file name for the list of aspect ratios | |
| void | LoadAspectRatios () |
| load aspect ratios from file | |
| void | SaveAspectRatios () |
| save the aspect ratios to the file | |
Private Attributes | |
| wxArrayString | m_aspectRatioStrings |
| array with names of all aspect ratios | |
| std::vector< double > | m_aspectRatios |
| vector with values of all aspect ratios, ratio=width/height | |
| wxListBox * | m_aspectList |
| pointer to wxListBox of aspect ratios | |
Definition at line 35 of file SelectCropAspectRatioDialog.h.
| SelectAspectRatioDialog::SelectAspectRatioDialog | ( | wxWindow * | parent | ) |
constructor, build dialog and load settings from file
Definition at line 35 of file SelectCropAspectRatioDialog.cpp.
References FillListBox(), ListBoxSelectionChanged(), m_aspectList, OnAddAspectRatio(), OnListBoxSelect(), OnOk(), OnRemoveAspectRatio(), hugin_utils::RestoreFramePosition(), and threshold().
| SelectAspectRatioDialog::~SelectAspectRatioDialog | ( | ) |
destructor, save position and list of aspect ratios
Definition at line 49 of file SelectCropAspectRatioDialog.cpp.
References SaveAspectRatios(), and hugin_utils::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 196 of file SelectCropAspectRatioDialog.cpp.
References LoadAspectRatios(), m_aspectList, m_aspectRatios, m_aspectRatioStrings, and threshold().
Referenced by SelectAspectRatioDialog().
|
private |
returns the file name for the list of aspect ratios
Definition at line 219 of file SelectCropAspectRatioDialog.cpp.
References hugin_utils::GetUserAppDataDir(), and threshold().
Referenced by LoadAspectRatios(), and SaveAspectRatios().
| double SelectAspectRatioDialog::GetSelectedAspectRatio | ( | ) | const |
returns the selected aspect ratio
Definition at line 57 of file SelectCropAspectRatioDialog.cpp.
References m_aspectList, m_aspectRatios, and threshold().
|
private |
implementation of activation/deactivation of buttons if necessary
Definition at line 188 of file SelectCropAspectRatioDialog.cpp.
References m_aspectList, m_aspectRatioStrings, and threshold().
Referenced by OnAddAspectRatio(), OnListBoxSelect(), OnRemoveAspectRatio(), and SelectAspectRatioDialog().
|
private |
load aspect ratios from file
Definition at line 224 of file SelectCropAspectRatioDialog.cpp.
References GetAspectRatioFilename(), m_aspectRatios, m_aspectRatioStrings, separator, and threshold().
Referenced by FillListBox().
|
protected |
handler for adding new aspect ratio setting
Definition at line 136 of file SelectCropAspectRatioDialog.cpp.
References CheckInputs(), ListBoxSelectionChanged(), m_aspectList, m_aspectRatios, m_aspectRatioStrings, and threshold().
Referenced by SelectAspectRatioDialog().
|
protected |
event handler for activation/deactivation of buttons if necessary
Definition at line 183 of file SelectCropAspectRatioDialog.cpp.
References ListBoxSelectionChanged().
Referenced by SelectAspectRatioDialog().
|
protected |
handler for Ok, check for valid inputs
Definition at line 67 of file SelectCropAspectRatioDialog.cpp.
References m_aspectList, and threshold().
Referenced by SelectAspectRatioDialog().
|
protected |
handler for removing selected aspect ratio
Definition at line 165 of file SelectCropAspectRatioDialog.cpp.
References ListBoxSelectionChanged(), m_aspectList, m_aspectRatios, m_aspectRatioStrings, and threshold().
Referenced by SelectAspectRatioDialog().
|
private |
save the aspect ratios to the file
Definition at line 256 of file SelectCropAspectRatioDialog.cpp.
References GetAspectRatioFilename(), m_aspectRatios, m_aspectRatioStrings, separator, and threshold().
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().