29 #include "wx/msw/wrapwin.h"
34 #include "hugin_config.h"
35 #include <wx/fileconf.h>
51 int count=config->Read(wxT(
"/AutoPano/AutoPanoCount"),0l);
55 for(
int i=0;i<count;i++)
60 if(loadFromFile.IsEmpty())
75 if(wxFile::Exists(filename))
77 wxFileConfig fconfig(wxT(
"hugin"),wxEmptyString,filename);
88 wxString path=wxString::Format(wxT(
"/AutoPano/AutoPano_%d"),i);
89 if(config->HasGroup(path))
92 if(gen->
Read(config,path))
106 config->Write(wxT(
"/AutoPano/AutoPanoCount"),count);
110 for(
int i=0;i<count;i++)
117 wxFileConfig fconfig(wxT(
"hugin"),wxEmptyString,filename);
124 wxString path=wxString::Format(wxT(
"/AutoPano/AutoPano_%d"),i);
138 for(
unsigned int i=0;i<
settings.GetCount();i++)
140 wxString s=
settings[i].GetCPDetectorDesc();
142 s=s+wxT(
" (")+_(
"Default")+wxT(
")");
162 if(new_default_generator<
GetCount())
168 #include <wx/arrimpl.cpp>
212 if(!config->Exists(path))
222 args_cleanup=config->Read(path+wxT(
"/ArgumentsCleanup"),wxEmptyString);
228 prog_matcher=config->Read(path+wxT(
"/ProgramMatcher"),wxEmptyString);
229 args_matcher=config->Read(path+wxT(
"/ArgumentsMatcher"),wxEmptyString);
232 prog_stack=config->Read(path+wxT(
"/ProgramStack"),wxEmptyString);
233 args_stack=config->Read(path+wxT(
"/ArgumentsStack"),wxEmptyString);
240 config->Read(path+wxT(
"/Option"),&
option,
true);
247 config->Write(path+wxT(
"/Type"),
int(
type));
248 config->Write(path+wxT(
"/Description"),
desc);
249 config->Write(path+wxT(
"/Program"),
prog);
250 config->Write(path+wxT(
"/Arguments"),
args);
251 config->Write(path+wxT(
"/ProgramMatcher"),
prog_matcher);
252 config->Write(path+wxT(
"/ArgumentsMatcher"),
args_matcher);
255 config->Write(path+wxT(
"/ArgumentsCleanup"),
args_cleanup);
259 config->Write(path+wxT(
"/ProgramStack"),
prog_stack);
260 config->Write(path+wxT(
"/ArgumentsStack"),
args_stack);
262 config->Write(path+wxT(
"/Option"),
option);
const bool IsCleanupPossible()
void Read(wxConfigBase *config=wxConfigBase::Get(), wxString loadFromFile=wxEmptyString)
read the settings of different cp generators from config
CPDetectorSetting()
constructor
void Swap(int index)
swaps setting which index and index+1
WX_DEFINE_OBJARRAY(wxArrayTreeListColumnInfo)
unsigned int GetCount()
return counts of cp detector settings
unsigned int default_generator
void Write(wxConfigBase *config, wxString path)
writes setting for this generator to config
bool Read(wxConfigBase *config, wxString path)
read setting for this generator from config
ArraySettings settings
array which stores the different autopano settings
void FillControl(wxControlWithItems *control, bool select_default=false, bool show_default=false)
fills a wxControlWithItems with the available generators
class, which stores all settings of one cp detector
void ReadIndex(wxConfigBase *config, int i)
void WriteToFile(wxString filename)
exporth the cp detector settings to external file
wxString default_cpgenerator_args(wxT("-o %o %s"))
arguments for default cp generator, for fall back procedure
void ReadFromFile(wxString filename)
import the cp detector settings from external file
wxString default_cpgenerator_desc(wxT("Hugin's Cpfind"))
description of default cp generator, for fall back procedure
void ResetToDefault()
reset values to default
declaration of CPDetectorSetting and CPDetectorConfig classes, which are for storing and changing set...
wxString default_cpgenerator_prog(wxT("cpfind"))
program name of default cp generator, for fall back procedure
void Write(wxConfigBase *config=wxConfigBase::Get())
writes the settings of different cp generators to config
void SetDefaultGenerator(unsigned int new_default_generator)
sets new default generator, which is used by assistent
void WriteIndex(wxConfigBase *config, int i)
const bool ContainsStacks()