CPDetectorConfig Class Reference

class for storing settings of different control point generators More...

#include <CPDetectorConfig.h>

List of all members.

Public Member Functions

 CPDetectorConfig ()
 constructor
virtual ~CPDetectorConfig ()
 destructor
void Read (wxConfigBase *config=wxConfigBase::Get(), wxString loadFromFile=wxEmptyString)
 read the settings of different cp generators from config
void Write (wxConfigBase *config=wxConfigBase::Get())
 writes the settings of different cp generators to config
void ReadFromFile (wxString filename)
 import the cp detector settings from external file
void WriteToFile (wxString filename)
 exporth the cp detector settings to external file
void ResetToDefault ()
 reset values to default
void FillControl (wxControlWithItems *control, bool select_default=false, bool show_default=false)
 fills a wxControlWithItems with the available generators
unsigned int GetCount ()
 return counts of cp detector settings
void Swap (int index)
 swaps setting which index and index+1
unsigned int GetDefaultGenerator ()
 return index of default generator (this one is used for assistent)
void SetDefaultGenerator (unsigned int new_default_generator)
 sets new default generator, which is used by assistent

Public Attributes

ArraySettings settings
 array which stores the different autopano settings

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 (  )  [inline, virtual]

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:
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 130 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:
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 43 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 68 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 81 of file CPDetectorConfig.cpp.

References default_generator, and settings.

Referenced by Read().

void CPDetectorConfig::ResetToDefault (  ) 

reset values to default

Definition at line 123 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 155 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 144 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 98 of file CPDetectorConfig.cpp.

References default_generator, settings, and WriteIndex().

Referenced by ImagesPanel::Create(), PreferencesDialog::OnCPDetectorLoad(), PreferencesDialog::OnRestoreDefaults(), iCPApp::ReadDetectorConfig(), PreferencesDialog::UpdateConfigData(), and WriteToFile().

void CPDetectorConfig::WriteIndex ( wxConfigBase *  config,
int  i 
) [private]

Definition at line 117 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 110 of file CPDetectorConfig.cpp.

References Write().

Referenced by PreferencesDialog::OnCPDetectorSave().


Member Data Documentation

unsigned int CPDetectorConfig::default_generator [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(), PreferencesDialog::OnCPDetectorAdd(), PreferencesDialog::OnCPDetectorDelete(), Read(), iCPApp::ReadDetectorConfig(), ReadIndex(), ResetToDefault(), Swap(), CPDetectorDialog::UpdateFields(), CPDetectorDialog::UpdateSettings(), Write(), and WriteIndex().


The documentation for this class was generated from the following files:
Generated on 5 Dec 2014 for Hugintrunk by  doxygen 1.4.7