30#include <wx/textfile.h>
37 wxXmlResource::Get()->LoadDialog(
this,
parent,
"choice_aspect_dlg");
101 if (value > 1e-4 && value < 10000)
120 if (value > 1e-4 && value < 10000)
139 wxXmlResource::Get()->LoadDialog(&
dlg,
this,
"add_aspect_dlg");
151 },
XRCID(
"wxID_OK"));
202 const auto addAspect = [
this](
const double v1,
const double v2)
235 line = line.Trim(
true).Trim(
false);
bool CheckInputs(wxWindow *parent, wxTextCtrl *labelCtrl, wxTextCtrl *aspectRatioCtrl, double &value)
check the input of the add aspect ratio dialog
static const wxString separator
Definition of dialog for selecting and editing aspect ratios of crop.
void FillListBox()
read the settings from the file and add them to the list box if the file does not exist,...
void OnAddAspectRatio(wxCommandEvent &e)
handler for adding new aspect ratio setting
wxArrayString m_aspectRatioStrings
array with names of all aspect ratios
void OnOk(wxCommandEvent &e)
handler for Ok, check for valid inputs
void ListBoxSelectionChanged()
implementation of activation/deactivation of buttons if necessary
void SaveAspectRatios()
save the aspect ratios to the file
wxFileName GetAspectRatioFilename() const
returns the file name for the list of aspect ratios
SelectAspectRatioDialog(wxWindow *parent)
constructor, build dialog and load settings from file
wxListBox * m_aspectList
pointer to wxListBox of aspect ratios
void OnRemoveAspectRatio(wxCommandEvent &e)
handler for removing selected aspect ratio
void LoadAspectRatios()
load aspect ratios from file
~SelectAspectRatioDialog()
destructor, save position and list of aspect ratios
void OnListBoxSelect(wxCommandEvent &e)
event handler for activation/deactivation of buttons if necessary
double GetSelectedAspectRatio() const
returns the selected aspect ratio
std::vector< double > m_aspectRatios
vector with values of all aspect ratios, ratio=width/height
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)
std::string GetUserAppDataDir()
returns the directory for user specific Hugin settings, e.g.
void StoreFramePosition(wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize)
void RestoreFramePosition(wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize)
include file for the hugin project
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.