Hugintrunk
0.1
|
class for storing settings of different control point generators More...
#include <CPDetectorConfig.h>
Public Member Functions | |
CPDetectorConfig () | |
constructor More... | |
virtual | ~CPDetectorConfig () |
destructor More... | |
void | Read (wxConfigBase *config=wxConfigBase::Get(), wxString loadFromFile=wxEmptyString) |
read the settings of different cp generators from config More... | |
void | Write (wxConfigBase *config=wxConfigBase::Get()) |
writes the settings of different cp generators to config More... | |
void | ReadFromFile (wxString filename) |
import the cp detector settings from external file More... | |
void | WriteToFile (wxString filename) |
exporth the cp detector settings to external file More... | |
void | ResetToDefault () |
reset values to default More... | |
void | FillControl (wxControlWithItems *control, bool select_default=false, bool show_default=false) |
fills a wxControlWithItems with the available generators More... | |
unsigned int | GetCount () |
return counts of cp detector settings More... | |
void | Swap (int index) |
swaps setting which index and index+1 More... | |
unsigned int | GetDefaultGenerator () |
return index of default generator (this one is used for assistent) More... | |
void | SetDefaultGenerator (unsigned int new_default_generator) |
sets new default generator, which is used by assistent More... | |
Public Attributes | |
ArraySettings | settings |
array which stores the different autopano settings More... | |
Private Member Functions | |
void | ReadIndex (wxConfigBase *config, int i) |
void | WriteIndex (wxConfigBase *config, int i) |
Private Attributes | |
unsigned int | default_generator |
class for storing settings of different control point generators
Definition at line 128 of file CPDetectorConfig.h.
|
inline |
constructor
Definition at line 132 of file CPDetectorConfig.h.
|
inlinevirtual |
destructor
Definition at line 134 of file CPDetectorConfig.h.
void CPDetectorConfig::FillControl | ( | wxControlWithItems * | control, |
bool | select_default = false , |
||
bool | show_default = false |
||
) |
fills a wxControlWithItems with the available generators
control | control, which should show the generators |
select_default | should default generator be selected |
show_default | should default generator get a "(Default)" suffix |
Definition at line 135 of file CPDetectorConfig.cpp.
References default_generator, and settings.
Referenced by ImagesPanel::Create(), PreferencesDialog::OnCPDetectorAdd(), PreferencesDialog::OnCPDetectorDefault(), PreferencesDialog::OnCPDetectorDelete(), PreferencesDialog::OnCPDetectorEdit(), PreferencesDialog::OnCPDetectorMoveDown(), PreferencesDialog::OnCPDetectorMoveUp(), ImagesPanel::ReloadCPDetectorSettings(), and PreferencesDialog::UpdateDisplayData().
|
inline |
return counts of cp detector settings
Definition at line 154 of file CPDetectorConfig.h.
Referenced by PreferencesDialog::OnCPDetectorAdd(), and SetDefaultGenerator().
|
inline |
return index of default generator (this one is used for assistent)
Definition at line 158 of file CPDetectorConfig.h.
Referenced by ImagesPanel::GetDefaultSetting(), PreferencesDialog::OnCPDetectorDefault(), PreferencesDialog::OnCPDetectorDelete(), and iCPApp::ReadDetectorConfig().
void CPDetectorConfig::Read | ( | wxConfigBase * | config = wxConfigBase::Get() , |
wxString | loadFromFile = wxEmptyString |
||
) |
read the settings of different cp generators from config
config | wxConfigBase, from which the settings are loaded, if empty the default wxConfigBase is used |
loadFromFile | file, from which the settings are loaded, if no settings are stored by hugin itself |
Definition at line 48 of file CPDetectorConfig.cpp.
References default_generator, ReadFromFile(), ReadIndex(), ResetToDefault(), and settings.
Referenced by ImagesPanel::Create(), iCPApp::ReadDetectorConfig(), ReadFromFile(), and ImagesPanel::ReloadCPDetectorSettings().
void CPDetectorConfig::ReadFromFile | ( | wxString | filename | ) |
import the cp detector settings from external file
Definition at line 73 of file CPDetectorConfig.cpp.
References Read(), and ResetToDefault().
Referenced by PreferencesDialog::OnCPDetectorLoad(), PreferencesDialog::OnRestoreDefaults(), and Read().
|
private |
Definition at line 86 of file CPDetectorConfig.cpp.
References default_generator, CPDetectorSetting::Read(), and settings.
Referenced by Read().
void CPDetectorConfig::ResetToDefault | ( | ) |
reset values to default
Definition at line 128 of file CPDetectorConfig.cpp.
References default_generator, and settings.
Referenced by Read(), and ReadFromFile().
void CPDetectorConfig::SetDefaultGenerator | ( | unsigned int | new_default_generator | ) |
sets new default generator, which is used by assistent
Definition at line 160 of file CPDetectorConfig.cpp.
References default_generator, and GetCount().
Referenced by PreferencesDialog::OnCPDetectorDefault(), and PreferencesDialog::OnCPDetectorDelete().
void CPDetectorConfig::Swap | ( | int | index | ) |
swaps setting which index and index+1
Definition at line 149 of file CPDetectorConfig.cpp.
References default_generator, and settings.
Referenced by PreferencesDialog::OnCPDetectorMoveDown(), and PreferencesDialog::OnCPDetectorMoveUp().
void CPDetectorConfig::Write | ( | wxConfigBase * | config = wxConfigBase::Get() | ) |
writes the settings of different cp generators to config
Definition at line 103 of file CPDetectorConfig.cpp.
References default_generator, settings, and WriteIndex().
Referenced by ImagesPanel::Create(), PreferencesDialog::OnCPDetectorLoad(), PreferencesDialog::OnRestoreDefaults(), iCPApp::ReadDetectorConfig(), PreferencesDialog::UpdateConfigData(), and WriteToFile().
|
private |
void CPDetectorConfig::WriteToFile | ( | wxString | filename | ) |
exporth the cp detector settings to external file
Definition at line 115 of file CPDetectorConfig.cpp.
References Write().
Referenced by PreferencesDialog::OnCPDetectorSave().
|
private |
Definition at line 164 of file CPDetectorConfig.h.
Referenced by FillControl(), Read(), ReadIndex(), ResetToDefault(), SetDefaultGenerator(), Swap(), and Write().
ArraySettings CPDetectorConfig::settings |
array which stores the different autopano settings
Definition at line 162 of file CPDetectorConfig.h.
Referenced by ImagesPanel::CPGenerate(), FillControl(), ImagesPanel::GetDefaultSetting(), ImagesPanel::GetSelectedCPGenerator(), PreferencesDialog::OnCPDetectorAdd(), PreferencesDialog::OnCPDetectorDelete(), Read(), iCPApp::ReadDetectorConfig(), ReadIndex(), ResetToDefault(), ImagesPanel::RunCPGenerator(), Swap(), CPDetectorDialog::UpdateFields(), CPDetectorDialog::UpdateSettings(), Write(), and WriteIndex().