Hugin trunk 0.1
Loading...
Searching...
No Matches
SelectCropAspectRatioDialog.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
2
11/* This is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
15 *
16 * This software is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public
22 * License along with this software. If not, see
23 * <http://www.gnu.org/licenses/>.
24 *
25 */
26
27#ifndef _SELECTCROPASPECTRATIODIALOG_H
28#define _SELECTCROPASPECTRATIODIALOG_H
29
30#include <wx/dialog.h>
31#include <wx/listbox.h>
32#include <wx/filename.h>
33#include <vector>
34
35class SelectAspectRatioDialog :public wxDialog
36{
37public:
43 double GetSelectedAspectRatio() const;
44protected:
46 void OnOk(wxCommandEvent& e);
48 void OnAddAspectRatio(wxCommandEvent& e);
50 void OnRemoveAspectRatio(wxCommandEvent& e);
52 void OnListBoxSelect(wxCommandEvent& e);
53private:
58 void FillListBox();
62 void LoadAspectRatios();
64 void SaveAspectRatios();
68 std::vector<double> m_aspectRatios;
71};
72
73#endif //_SELECTCROPASPECTRATIODIALOG_H
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
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
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.
Definition threshold.h:41