Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
CPDetectorConfig Class Reference

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
 

Detailed Description

class for storing settings of different control point generators

Definition at line 128 of file CPDetectorConfig.h.

Constructor & Destructor Documentation

CPDetectorConfig::CPDetectorConfig ( )
inline

constructor

Definition at line 132 of file CPDetectorConfig.h.

virtual CPDetectorConfig::~CPDetectorConfig ( )
inlinevirtual

destructor

Definition at line 134 of file CPDetectorConfig.h.

Member Function Documentation

void CPDetectorConfig::FillControl ( wxControlWithItems *  control,
bool  select_default = false,
bool  show_default = false 
)

fills a wxControlWithItems with the available generators

Parameters
controlcontrol, which should show the generators
select_defaultshould default generator be selected
show_defaultshould 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().

unsigned int CPDetectorConfig::GetCount ( )
inline

return counts of cp detector settings

Definition at line 154 of file CPDetectorConfig.h.

Referenced by PreferencesDialog::OnCPDetectorAdd(), and SetDefaultGenerator().

unsigned int CPDetectorConfig::GetDefaultGenerator ( )
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

Parameters
configwxConfigBase, from which the settings are loaded, if empty the default wxConfigBase is used
loadFromFilefile, 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().

void CPDetectorConfig::ReadIndex ( wxConfigBase *  config,
int  i 
)
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())
void CPDetectorConfig::WriteIndex ( wxConfigBase *  config,
int  i 
)
private

Definition at line 122 of file CPDetectorConfig.cpp.

References settings.

Referenced by Write().

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().

Member Data Documentation

unsigned int CPDetectorConfig::default_generator
private
ArraySettings CPDetectorConfig::settings

The documentation for this class was generated from the following files: