Relacs Widgets Library  0.9.8
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
ConfigDialog Class Reference

#include <configdialog.h>

Inheritance diagram for ConfigDialog:
Inheritance graph
[legend]
Collaboration diagram for ConfigDialog:
Collaboration graph
[legend]

Public Slots

virtual void dialog (void)
 
virtual void help (void)
 
virtual void notifyDialog (const Options &opt)
 

Signals

void dialogAccepted (void)
 
void dialogAction (int r)
 
void dialogClosed (int r)
 

Public Member Functions

 ConfigDialog (const string &configident="", int configgroup=0, const string &name="", const string &author="", const string &version="", const string &date=__DATE__)
 
virtual ~ConfigDialog (void)
 
string name (void) const
 
virtual void setName (const string &name)
 
string author (void) const
 
virtual void setAuthor (const string &author)
 
string version (void) const
 
virtual void setVersion (const string &version)
 
string date (void) const
 
virtual void setDate (const string &date)
 
virtual OptWidgetdialogOptions (OptDialog *od, string *tabhotkeys=0)
 
virtual void dialogButtons (OptDialog *od)
 
virtual void dialogEmptyMessage (OptDialog *od)
 
int dialogSelectMask (void) const
 
void setDialogSelectMask (int mask)
 
void addDialogSelectMask (int mask)
 
int dialogReadOnlyMask (void) const
 
void setDialogReadOnlyMask (int mask)
 
void addDialogReadOnlyMask (int mask)
 
int dialogStyle (void) const
 
void setDialogStyle (int style)
 
void addDialogStyle (int style)
 
string dialogCaption (void) const
 
void setDialogCaption (const string &caption)
 
bool dialogHeader (void) const
 
void setDialogHeader (bool d)
 
string headerBackgroundColor (void) const
 
void setHeaderBackgroundColor (const string &color)
 
string headerForegroundColor (void) const
 
void setHeaderForegroundColor (const string &color)
 
string headerImageFile (void) const
 
void setHeaderImageFile (const string &file)
 
virtual void dialogHeaderWidget (OptDialog *od)
 
bool dialogHelp (void) const
 
void setDialogHelp (bool d)
 
string helpCaption (void) const
 
void setHelpCaption (const string &caption)
 
string helpPath (int inx=0) const
 
int helpPathes (void) const
 
void clearHelpPathes (void)
 
void setHelpPath (const string &path)
 
void addHelpPath (const string &path)
 
virtual string helpFileName (void) const
 
bool dialogOpen (void) const
 
bool helpOpen (void) const
 
QWidget * mainWidget (void)
 
virtual void setMainWidget (QWidget *widget)
 
void lock () const
 
void unlock () const
 
bool tryLock (int timeout=1)
 
QMutex * mutex (void)
 
- Public Member Functions inherited from ConfigClass
 ConfigClass (const string &ident, int group=0, int mode=0xffff, int selectmask=0)
 
 ConfigClass (const ConfigClass &C)
 
virtual ~ConfigClass (void)
 
const string & configIdent (void) const
 
void setConfigIdent (const string &ident)
 
int configGroup (void) const
 
void setConfigGroup (int group)
 
int configMode (void) const
 
void setConfigMode (int mode)
 
void addConfigMode (int mode)
 
void delConfigMode (int mode)
 
int configSelectMask (void) const
 
void setConfigSelectMask (int mask)
 
void addConfig (void)
 
void readConfig (void)
 
virtual void readConfig (StrQueue &sq)
 
virtual void saveConfig (ofstream &str)
 
virtual int configSize (void) const
 
virtual void config (void)
 
virtual void preConfig (void)
 
 Options (void)
 
 Options (const Options &o)
 
 Options (const Options &o, int flags)
 
 Options (const string &name, const string &type, int flags, int style)
 
 Options (const Str &opttxt, const string &assignment=":=", const string &separator=",;")
 
 Options (const StrQueue &sq, const string &assignment=":=")
 
 Options (istream &str, const string &assignment=":=", const string &comment="#", const string &stop="", string *line=0)
 
virtual ~Options (void)
 
Optionsoperator= (const Options &o)
 
Optionsassign (const Options &o)
 
Optionsappend (const Options &o)
 
Optionsadd (const Options &o)
 
Optionsinsert (const Options &o, const string &atname="")
 
Optionsassign (const Options &o, int flags)
 
Optionscopy (Options &o, int flags)
 
Optionsappend (const Options &o, int flags)
 
Optionsadd (const Options &o, int flags)
 
Optionsinsert (const Options &o, int flags, const string &atname="")
 
Parameterassign (const string &name, const string &value)
 
OptionsparentSection (void)
 
const OptionsparentSection (void) const
 
void setParentSection (Options *parentsection)
 
void resetParents (void)
 
OptionsrootSection (void)
 
const OptionsrootSection (void) const
 
string name (void) const
 
virtual void setName (const string &name, const string &type)
 
string type (void) const
 
void setType (const string &type)
 
string include (void) const
 
void setInclude (const string &include)
 
void setInclude (const string &url, const string &name)
 
int flag (void) const
 
bool flag (int selectflag) const
 
OptionssetFlag (int flag)
 
OptionsaddFlag (int flag)
 
OptionsdelFlag (int flag)
 
OptionsclearFlag (void)
 
int style (void) const
 
OptionssetStyle (int style)
 
OptionsaddStyle (int style)
 
OptionsdelStyle (int style)
 
OptionsclearStyle (void)
 
bool checkType (int mask) const
 
Str warning (void) const
 
iterator begin (void)
 
iterator end (void)
 
const_iterator begin (void) const
 
const_iterator end (void) const
 
section_iterator sectionsBegin (void)
 
section_iterator sectionsEnd (void)
 
const_section_iterator sectionsBegin (void) const
 
const_section_iterator sectionsEnd (void) const
 
const_iterator find (const string &pattern, int level=-1) const
 
iterator find (const string &pattern, int level=-1)
 
const_iterator rfind (const string &pattern, int level=-1) const
 
iterator rfind (const string &pattern, int level=-1)
 
const_section_iterator findSection (const string &pattern, int level=-1) const
 
section_iterator findSection (const string &pattern, int level=-1)
 
const_section_iterator rfindSection (const string &pattern, int level=-1) const
 
section_iterator rfindSection (const string &pattern, int level=-1)
 
const Parameteroperator[] (int i) const
 
Parameteroperator[] (int i)
 
const Parameteroperator[] (const string &name) const
 
Parameteroperator[] (const string &name)
 
const Optionssection (int i) const
 
Optionssection (int i)
 
const Optionssection (const string &name) const
 
Optionssection (const string &name)
 
Str request (const string &name) const
 
ParametersetRequest (const string &name, const string &request)
 
Parameter::ValueType valueType (const string &name) const
 
ParametersetValueType (const string &name, Parameter::ValueType type)
 
int flags (const string &name) const
 
bool flags (const string &name, int flag) const
 
ParametersetFlags (const string &name, int flags)
 
ParameteraddFlags (const string &name, int flags)
 
ParameterdelFlags (const string &name, int flags)
 
ParameterclearFlags (const string &name)
 
bool changed (const string &name)
 
int style (const string &name) const
 
ParametersetStyle (const string &name, int style)
 
ParameteraddStyle (const string &name, int style)
 
ParameterdelStyle (const string &name, int style)
 
Str format (const string &name) const
 
ParametersetFormat (const string &name, int width=0, int prec=-1, char fmt='g')
 
ParametersetFormat (const string &name, const string &format)
 
int formatWidth (const string &name) const
 
int size (const string &name) const
 
Parameteradd (const Parameter &np)
 
Parameterinsert (const Parameter &np, const string &atname="")
 
ParameteraddText (const string &name, const string &request, const string &dflt, int flags=0, int style=0)
 
ParameteraddText (const string &name, const string &dflt="", int flags=0, int style=0)
 
ParameterinsertText (const string &name, const string &atname, const string &request, const string &dflt, int flags=0, int style=0)
 
ParameterinsertText (const string &name, const string &atname="", const string &dflt="", int flags=0, int style=0)
 
Str text (const string &name, int index, const string &dflt="", const string &format="", const string &unit="") const
 
Str text (const string &name, const string &dflt="", const string &format="", const string &unit="") const
 
void texts (const string &name, vector< string > &s, const string &format="", const string &unit="") const
 
Str allText (const string &name, const string &dflt="", const string &format="", const string &unit="", const string &separator=", ") const
 
ParametersetText (const string &name, const string &strg)
 
ParametersetText (const string &name, const Parameter &p)
 
ParameterpushText (const string &name, const string &strg)
 
Str defaultText (const string &name, const string &format="", const string &unit="") const
 
ParametersetDefaultText (const string &name, const string &dflt)
 
ParameteraddSelection (const string &name, const string &request, const string &selection, int flags=0, int style=0)
 
ParameteraddSelection (const string &name, const string &selection="", int flags=0, int style=0)
 
ParameterinsertSelection (const string &name, const string &atname, const string &request, const string &selection, int flags=0, int style=0)
 
ParameterinsertSelection (const string &name, const string &atname="", const string &selection="", int flags=0, int style=0)
 
ParameterselectText (const string &name, const string &strg, int add=0)
 
ParameterselectText (const string &name, int index)
 
int index (const string &name) const
 
int index (const string &name, const string &strg) const
 
ParameteraddNumber (const string &name, const string &request, double dflt, double minimum, double maximum=MAXDOUBLE, double step=1.0, const string &unit="", const string &outputunit="", const string &format="", int flags=0, int style=0)
 
ParameteraddNumber (const string &name, const string &request, double dflt, const string &unit="", const string &format="", int flags=0, int style=0)
 
ParameteraddNumber (const string &name, double dflt, const string &unit="", const string &format="", int flags=0, int style=0)
 
ParameteraddNumber (const string &name, double dflt, const string &unit, int flags, int style=0)
 
ParameteraddNumber (const string &name, double dflt, double error, const string &unit="", const string &format="", int flags=0, int style=0)
 
ParameteraddNumber (const string &name, const string &unit="", const string &format="", int flags=0, int style=0)
 
ParameterinsertNumber (const string &name, const string &atname, const string &request, double dflt, double minimum, double maximum=MAXDOUBLE, double step=1.0, const string &unit="", const string &outputunit="", const string &format="", int flags=0, int style=0)
 
ParameterinsertNumber (const string &name, const string &atname, const string &request, double dflt, const string &unit="", const string &format="", int flags=0, int style=0)
 
ParameterinsertNumber (const string &name, const string &atname, double dflt, const string &unit="", const string &format="", int flags=0, int style=0)
 
ParameterinsertNumber (const string &name, const string &atname, const string &unit="", const string &format="", int flags=0, int style=0)
 
double number (const string &name, double dflt=0.0, const string &unit="", int index=0) const
 
double number (const string &name, const string &unit, double dflt=0.0, int index=0) const
 
double number (const string &name, int index, double dflt=0.0, const string &unit="") const
 
double number (const string &name, int index, const string &unit, double dflt=0.0) const
 
void numbers (const string &name, vector< double > &n, const string &unit="") const
 
double error (const string &name, const string &unit="", int index=0) const
 
double error (const string &name, int index, const string &unit="") const
 
void errors (const string &name, vector< double > &n, const string &unit="") const
 
ParametersetNumber (const string &name, double number, double error, const string &unit="")
 
ParametersetNumber (const string &name, double number, const string &unit="")
 
ParameterpushNumber (const string &name, double number, double error=-1.0, const string &unit="")
 
ParameterpushNumber (const string &name, double number, const string &unit)
 
ParametersetNumber (const string &name, const Parameter &p)
 
double defaultNumber (const string &name, const string &unit="") const
 
ParametersetDefaultNumber (const string &name, double dflt, const string &unit="")
 
double minimum (const string &name, const string &unit="") const
 
double maximum (const string &name, const string &unit="") const
 
double step (const string &name, const string &unit="") const
 
ParametersetStep (const string &name, double step, const string &unit="")
 
ParametersetMinMax (const string &name, double minimum=-MAXDOUBLE, double maximum=MAXDOUBLE, double step=1.0, const string &unit="")
 
Str unit (const string &name) const
 
Str outUnit (const string &name) const
 
ParametersetUnit (const string &name, const string &internunit, const string &outunit="")
 
ParametersetOutUnit (const string &name, const string &outputunit)
 
ParameterchangeUnit (const string &name, const string &internunit)
 
ParameteraddInteger (const string &name, const string &request, long dflt, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="", const string &outputunit="", int width=0, int flags=0, int style=0)
 
ParameteraddInteger (const string &name, long dflt, const string &unit="", int width=0, int flags=0, int style=0)
 
ParameteraddInteger (const string &name, const string &unit="")
 
ParameterinsertInteger (const string &name, const string &atname, const string &request, long dflt, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="", const string &outputunit="", int width=0, int flags=0, int style=0)
 
ParameterinsertInteger (const string &name, const string &atname, long dflt, const string &unit="", int width=0, int flags=0, int style=0)
 
ParameterinsertInteger (const string &name, const string &atname, const string &unit="", int width=0, int flags=0, int style=0)
 
long integer (const string &name, const string &unit="", long dflt=0, int index=0) const
 
long integer (const string &name, int index, long dflt=0, const string &unit="") const
 
long integer (const string &name, int index, const string &unit, long dflt=0) const
 
void integers (const string &name, vector< long > &n, const string &unit="") const
 
void integers (const string &name, vector< int > &n, const string &unit="") const
 
ParametersetInteger (const string &name, long number, long error, const string &unit="")
 
ParametersetInteger (const string &name, long number, const string &unit="")
 
ParameterpushInteger (const string &name, long number, long error, const string &unit="")
 
ParameterpushInteger (const string &name, long number, const string &unit="")
 
ParametersetInteger (const string &name, const Parameter &p)
 
long defaultInteger (const string &name, const string &unit="") const
 
ParametersetDefaultInteger (const string &name, long dflt, const string &unit="")
 
ParametersetMinMax (const string &name, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="")
 
ParametersetMinMax (const string &name, int minimum, int maximum, int step=1, const string &unit="")
 
ParameteraddBoolean (const string &name, const string &request, bool dflt, int flags=0, int style=0)
 
ParameteraddBoolean (const char *name, const char *request, bool dflt, int flags=0, int style=0)
 
ParameteraddBoolean (const string &name, bool dflt, int flags=0, int style=0)
 
ParameteraddBoolean (const char *name, bool dflt, int flags=0, int style=0)
 
ParameterinsertBoolean (const string &name, const string &atname="", const string &request="", bool dflt=false, int flags=0, int style=0)
 
ParameterinsertBoolean (const string &name, const string &atname, int flags=0, int style=0)
 
bool boolean (const string &name, bool dflt=false, int index=0) const
 
bool boolean (const string &name, int index, bool dflt=false) const
 
void booleans (const string &name, vector< bool > &n) const
 
ParametersetBoolean (const string &name, bool b)
 
ParametersetBoolean (const string &name, const Parameter &p)
 
bool defaultBoolean (const string &name) const
 
ParametersetDefaultBoolean (const string &name, bool dflt)
 
ParameteraddDate (const string &name, const string &request, int year=0, int month=0, int day=0, int flags=0, int style=0)
 
ParameteraddDate (const string &name, int year, int month, int day, int flags=0, int style=0)
 
ParameteraddDate (const string &name, int flags=0, int style=0)
 
ParameterinsertDate (const string &name, const string &atname="", const string &request="", int year=0, int month=0, int day=0, int flags=0, int style=0)
 
ParameterinsertDate (const string &name, const string &atname, int year=0, int month=0, int day=0, int flags=0, int style=0)
 
ParameterinsertDate (const string &name, const string &atname, int flags=0, int style=0)
 
const Parameterdate (const string &name, int index, int &year, int &month, int &day) const
 
ParametersetDate (const string &name, int year, int month, int day)
 
ParametersetDate (const string &name, const string &date)
 
ParametersetDate (const string &name, const struct tm &date)
 
ParametersetDate (const string &name, const time_t &time)
 
ParametersetCurrentDate (const string &name)
 
ParametersetDate (const string &name, const Parameter &p)
 
const ParameterdefaultDate (const string &name, int index, int &year, int &month, int &day) const
 
ParametersetDefaultDate (const string &name, int year, int month, int day)
 
ParameteraddTime (const string &name, const string &request, int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0)
 
ParameteraddTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0, int flags=0, int style=0)
 
ParameteraddTime (const string &name, int flags=0, int style=0)
 
ParameterinsertTime (const string &name, const string &atname="", const string &request="", int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0)
 
ParameterinsertTime (const string &name, const string &atname, int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0)
 
ParameterinsertTime (const string &name, const string &atname, int flags=0, int style=0)
 
const Parametertime (const string &name, int index, int &hour, int &minutes, int &seconds, int &milliseconds) const
 
ParametersetTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0)
 
ParametersetTime (const string &name, const string &time)
 
ParametersetTime (const string &name, const struct tm &time)
 
ParametersetTime (const string &name, const time_t &time)
 
ParametersetCurrentTime (const string &name)
 
ParametersetTime (const string &name, const Parameter &p)
 
const ParameterdefaultTime (const string &name, int index, int &hour, int &minutes, int &seconds, int &milliseconds) const
 
ParametersetDefaultTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0)
 
OptionsnewSection (int level, const string &name, const string &type="", int flag=0, int style=0)
 
OptionsnewSection (int level, const string &name, int flag, int style=0)
 
OptionsnewSection (const string &name, const string &type="", int flag=0, int style=0)
 
OptionsnewSection (const string &name, int flag, int style=0)
 
OptionsnewSubSection (const string &name, const string &type="", int flag=0, int style=0)
 
OptionsnewSubSection (const string &name, int flag, int style=0)
 
OptionsnewSubSubSection (const string &name, const string &type="", int flag=0, int style=0)
 
OptionsnewSubSubSection (const string &name, int flag, int style=0)
 
OptionsaddSection (const string &name, const string &type="", int flag=0, int style=0)
 
OptionsaddSection (const string &name, int flag, int style=0)
 
OptionsinsertSection (const string &name, const string &atpattern, const string &type="", int flag=0, int style=0)
 
OptionsinsertSection (const string &name, const string &atpattern, int flag, int style=0)
 
OptionsnewSection (int level, const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSection (int level, const Options &opt, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSection (int level, const Options &opt, const string &name, int flag, int style=0)
 
OptionsnewSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSection (const Options &opt, const string &name, int flag, int style=0)
 
OptionsnewSubSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSubSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSubSection (const Options &opt, const string &name, int flag, int style=0)
 
OptionsnewSubSubSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSubSubSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsnewSubSubSection (const Options &opt, const string &name, int flag, int style=0)
 
OptionsaddSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsaddSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0)
 
OptionsaddSection (const Options &opt, const string &name, int flag, int style=0)
 
OptionsinsertSection (const Options &opt, int selectmask, const string &name, const string &atpattern, const string &type="", int flag=0, int style=0)
 
OptionsinsertSection (const Options &opt, const string &name, const string &atpattern, const string &type="", int flag=0, int style=0)
 
OptionsinsertSection (const Options &opt, const string &name, const string &atpattern, int flag, int style=0)
 
OptionsnewSection (Options *opt, bool newparent=false)
 
OptionsaddSection (Options *opt, bool newparent=false)
 
OptionsinsertSection (Options *opt, const string &atpattern, bool newparent=false)
 
OptionsnewSections (Options *opt, bool newparent=false)
 
void endSection (void)
 
void clearSections (void)
 
void setSection (Options &opt)
 
void lastSection (void)
 
int up (void)
 
int down (void)
 
ParametersetDefault (const string &name)
 
OptionssetDefaults (int flags=0)
 
ParametersetToDefault (const string &name)
 
OptionssetToDefaults (int flags=0)
 
Optionserase (iterator p)
 
Optionserase (section_iterator p)
 
Optionserase (Options *s)
 
Optionserase (const string &pattern)
 
Optionserase (int selectflag)
 
Optionspop (void)
 
OptionspopSection (void)
 
Optionsflatten (Options *root=0)
 
Optionsclear (bool revert=true)
 
int size (void) const
 
int size (int selectflag) const
 
bool empty (void) const
 
int parameterSize (void) const
 
int parameterSize (int flags) const
 
int sectionsSize (void) const
 
int sectionsSize (int flags) const
 
bool exist (const string &pattern) const
 
bool existSection (const string &pattern) const
 
OptionssetFlags (int flags, int selectflag=0)
 
OptionsaddFlags (int flags, int selectflag=0)
 
OptionsdelFlags (int flags, int selectflag=0)
 
OptionssetValueTypeFlags (int flags, int typemask)
 
OptionsaddValueTypeFlags (int flags, int typemask)
 
OptionsdelValueTypeFlags (int flags, int typemask)
 
OptionssetStyles (int style, int selectflag=0)
 
OptionsaddStyles (int style, int selectflag=0)
 
OptionsdelStyles (int style, int selectflag=0)
 
int styleSize (int style) const
 
OptionssetValueTypeStyles (int style, int typemask)
 
OptionsaddValueTypeStyles (int style, int typemask)
 
OptionsdelValueTypeStyles (int style, int typemask)
 
int nameWidth (int selectmask=0, bool detailed=false, bool escape=false) const
 
string save (int selectmask=0, int flags=0) const
 
ostream & save (ostream &str, const string &start="", int selectmask=0, int flags=0, int width=-1) const
 
ostream & save (ostream &str, const string &textformat, const string &numberformat, const string &boolformat="%i=%b", const string &dateformat="%i=%04Y-%02m-%02d", const string &timeformat="%i=%02H:%02M:%02S", const string &sectionformat="%i", int selectmask=0, const string &start="") const
 
ostream & saveXML (ostream &str, int selectmask=0, int flags=0, int level=0, int indent=4) const
 
Optionsread (const string &opttxt, int flag, const string &assignment=":=", const string &separator=",;", int *indent=0)
 
Optionsread (const string &opttxt, const string &assignment=":=", const string &separator=",;")
 
istream & read (istream &str, int flag, const string &assignment=":=", const string &comment="#", const string &stop="", Str *line=0)
 
istream & read (istream &str, const string &assignment=":=", const string &comment="#", const string &stop="", Str *line=0)
 
Optionsread (const StrQueue &sq, int flag=0, const string &assignment=":=")
 
bool read (const Parameter &p, int flag=0)
 
Optionsread (const Options &o, int flags=0, int flag=0)
 
bool readAppend (const Parameter &p)
 
OptionsreadAppend (const Options &o, int flags=0)
 
Optionsload (const Str &opttxt, const string &assignment=":=", const string &separator=",;", int *indent=0, int *indentspacing=0, int *level=0)
 
istream & load (istream &str, const string &assignment=":=", const string &comment="#", const string &stop="", string *line=0)
 
Optionsload (const StrQueue &sq, const string &assignment=":=")
 
virtual void notify (void)
 
void callNotifies (void)
 
bool setNotify (bool notify=true)
 
bool unsetNotify (void)
 
bool notifying (void) const
 

Protected Slots

void notificationFromDialog (const Parameter &p)
 
virtual void dClosed (int r)
 
virtual void hClosed (int r)
 

Protected Member Functions

void setDialogOpen (bool open=true)
 
void setHelpOpen (bool open=true)
 

Protected Attributes

Options DialogOptions
 

Additional Inherited Members

- Public Types inherited from ConfigClass
enum  Action
 
enum  SaveFlags
 
typedef deque< Parameter >
::iterator 
iterator
 
typedef deque< Parameter >
::const_iterator 
const_iterator
 
typedef deque< Options * >
::iterator 
section_iterator
 
typedef deque< Options * >
::const_iterator 
const_section_iterator
 
- Static Public Member Functions inherited from ConfigClass
static void setConfigureClasses (ConfigureClasses *cfg)
 
static double floorLog10 (double v)
 
static double floor10 (double v, double scale=1.0)
 
static double ceil10 (double v, double scale=1.0)
 
- Static Public Attributes inherited from ConfigClass
static const int NonDefault
 
static const long TabSection
 

Detailed Description

A dialog for a ConfigClass.

Author
Jan Benda

ConfigDialog adds a dialog for editing the configuration Options of a ConfigClass. You can select a subset of the Options for the dialog by defining a dialogSelectMask() with setDialogSelectMask() and addDialogSelectMask(). Likewise, some Options can be marked as read-only with dialogReadOnlyMask(), setDialogReadOnlyMask(), and addDialogReadOnlyMask(). The appearance of the dialog can be controlled with dialogStyle(), setDialogStyle(), and addDialogStyle(). The dialog is opened (executed) with dialog(). dialogOpen() returns true if the dialog is already opened.

The dialog widget is composed of a header, the Options, and some buttons, which are generated by dialogHeaderWidget(), dialogOptions(), and dialogButtons(), respectively. Alternatively to the options and buttons, a message is displayed by dialogEmptyMessage() if there are no options selected by dialogSelectMask(). The header can be switched on or off by setDialogHeader() and uses headerForegroundColor() and headerBackgroundColor() as the foreground and background color, respectively, and headerImageFile() as an image.

ConfigDialog also provides help() for displaying some html-based help text. This can be enabled or disabled by setDialogHelp(). Help texts are assumed to be contained in html files with name helpFileName(). These files are searched in directories as specified in the list of default search pathes that can be accessed with helpPathes(), helpPath() and manipulated with clearHelpPathes(), setHelpPath(), addHelpPath().

A ConfigDialog has a name(), the last version() was written by author() on date(). This information is set either by the constructor or by setName(), setAuthor(), setVersion(), and setDate(). The name() and selected Options can be saved in XML format via saveXML(). A main widget for the dialogs can be set via setMainWidget().

Constructor & Destructor Documentation

ConfigDialog ( const string &  configident = "",
int  configgroup = 0,
const string &  name = "",
const string &  author = "",
const string &  version = "",
const string &  date = __DATE__ 
)

Construct a ConfigDialog. The identifier configident is used for identifying this class in the configuration file of group configgroup. The class has a unique name. The implementation of a class derived from ConfigDialog has a version and was written by author on date.

See Also
setConfigIdent(), setConfigGroup(), setName(), setTitle(), setAuthor(), setDate(), setVersion()

References ConfigDialog::author(), ConfigDialog::date(), OptWidget::HighlightNameStyle, ConfigDialog::name(), OptWidget::NameBehindStyle, and ConfigDialog::version().

~ConfigDialog ( void  )
virtual

Destruct the ConfigDialog.

Member Function Documentation

string name ( void  ) const
void setName ( const string &  name)
virtual

Set the name of the class to name.

Reimplemented from ConfigClass.

References ConfigDialog::name().

string author ( void  ) const
void setAuthor ( const string &  author)
virtual

Set the author of the class to author.

References ConfigDialog::author().

string version ( void  ) const
void setVersion ( const string &  version)
virtual

Set the version string of the class to version.

References ConfigDialog::version().

string date ( void  ) const

The date of the last revision of the class (default is set to the compile time).

Referenced by ConfigDialog::ConfigDialog(), ConfigDialog::dialogHeaderWidget(), and ConfigDialog::setDate().

void setDate ( const string &  date)
virtual

Set the date of the last revision of the class to date.

References ConfigDialog::date().

OptWidget * dialogOptions ( OptDialog od,
string *  tabhotkeys = 0 
)
virtual

Adds the options selected by dialogSelectMask() and configured by dialogReadOnlyMask() and dialogStyle() to the dialog.

Parameters
odthe dialog to which the options are added.
tabhotkeysa string with already taken hotkeys that will be expanded by further hotkeys of the Options.
Returns
the widget editing the options. Its valueChanged() signal is connected to the notifyDialog() slot.
See Also
dialog()

References OptDialog::addOptions(), ConfigDialog::dialogHeader(), ConfigDialog::DialogOptions, OptWidget::lines(), ConfigDialog::mutex(), and OptDialog::setVerticalSpacing().

Referenced by ConfigDialog::dialog().

void dialogButtons ( OptDialog od)
virtual

Add an <Ok>, <Apply>, <Reset>, and <Close> button to the dialog.

Parameters
odthe dialog to which the buttons are added.
See Also
dialog()

References OptDialog::Accept, OptDialog::addButton(), ConfigDialog::dClosed(), ConfigDialog::dialogAccepted(), ConfigDialog::dialogAction(), ConfigDialog::dialogClosed(), OptDialog::Reset, and OptDialog::setRejectCode().

Referenced by ConfigDialog::dialog().

void dialogEmptyMessage ( OptDialog od)
virtual

Adds a message, indicating that this class does not have any options for this dialog, and an <Ok> button to the dialog.

Parameters
odthe dialog to which the message is added.
See Also
dialog()

References OptDialog::addButton(), OptDialog::addWidget(), ConfigDialog::dClosed(), ConfigDialog::dialogClosed(), and ConfigDialog::name().

Referenced by ConfigDialog::dialog().

int dialogSelectMask ( void  ) const

The mask that is used to select single options for the standard dialog.

void setDialogSelectMask ( int  mask)

Set the mask that is used to select single options for the standard dialog to mask. Default is 0, i.e. all options appear in the dialog.

void addDialogSelectMask ( int  mask)

Add mask to the mask that is used to select single options for the standard dialog.

int dialogReadOnlyMask ( void  ) const

The mask that is used to select single options as read-only for the standard dialog.

void setDialogReadOnlyMask ( int  mask)

Set the mask that is used to select single options as read-only for the standard dialog to mask. Default is 0, i.e. all options are read-writeable.

void addDialogReadOnlyMask ( int  mask)

Add mask to the mask that is used to select single options as read-only for the standard dialog.

int dialogStyle ( void  ) const

The style used for the standard dialog.

void setDialogStyle ( int  style)

Set the style used for the standard dialog to style. The implementation of dialog() uses OptWidget. See there for a list of possible styles.

References ConfigClass::style().

void addDialogStyle ( int  style)

Add style to the style used for the standard dialog.

References ConfigClass::style().

string dialogCaption ( void  ) const

Returns the caption for the dialog.

References ConfigDialog::name().

Referenced by ConfigDialog::dialog().

void setDialogCaption ( const string &  caption)

Set the caption for the dialog to caption.

bool dialogHeader ( void  ) const

Returns true if a header should be displayed in the dialog.

Referenced by ConfigDialog::dialogOptions().

void setDialogHeader ( bool  d)

Display a header with author, version and date info in the dialog if d is set to true.

string headerBackgroundColor ( void  ) const
Returns
background color of the dialog header as a hex string (#rrggbb).
See Also
setHeaderBackgroundColor(), headerForegroundColor(), headerImageFile(), dialogHeaderWidget()

Referenced by ConfigDialog::dialogHeaderWidget().

void setHeaderBackgroundColor ( const string &  color)

Set the background color of the dialog header.

Parameters
[in]colorthe background color as a hex string (#rrggbb).
See Also
headerBackgroundColor(), setHeaderForegroundColor(), setHeaderImageFile(), dialogHeaderWidget()
string headerForegroundColor ( void  ) const
Returns
foreground color of the dialog header for the labels as a hex string (#rrggbb).
See Also
setHeaderForegroundColor(), headerBackgroundColor(), headerImageFile(), dialogHeaderWidget()

Referenced by ConfigDialog::dialogHeaderWidget().

void setHeaderForegroundColor ( const string &  color)

Set the foreground color of the dialog header that is used for the labels.

Parameters
[in]colorthe foreground color as a hex string (#rrggbb).
See Also
headerForegroundColor(), setHeaderBackgroundColor(), setHeaderImageFile(), dialogHeaderWidget()
string headerImageFile ( void  ) const
Returns
name of the image file (full path) used to be displayed in the dialog header.
See Also
setHeaderImageFile(), dialogHeaderWidget()

Referenced by ConfigDialog::dialogHeaderWidget().

void setHeaderImageFile ( const string &  file)

Selects the image to be displayed in the dialog header.

Parameters
[in]filethe full path of the image file.
See Also
headerImageFile(), dialogHeaderWidget()
void dialogHeaderWidget ( OptDialog od)
virtual

Adds a header widget to the dialog. The headerImageFile() is used as a background image. name(), version(), date() and author() are displayed. If dialogHelp() is enabled, a button for launching the help browser is added.

Parameters
odthe dialog to which the header widget is added.
See Also
dialog()

References OptDialog::addWidget(), ConfigDialog::author(), ConfigDialog::date(), ConfigDialog::dialogHelp(), ConfigClass::empty(), ConfigDialog::headerBackgroundColor(), ConfigDialog::headerForegroundColor(), ConfigDialog::headerImageFile(), ConfigDialog::help(), ConfigDialog::name(), and ConfigDialog::version().

Referenced by ConfigDialog::dialog().

bool dialogHelp ( void  ) const

Returns true if a help button should be displayed in the dialog header.

References ConfigClass::configMode(), and ConfigClass::Help.

Referenced by ConfigDialog::dialogHeaderWidget(), and ConfigDialog::help().

void setDialogHelp ( bool  d)

Add a help-button to the dialog header if d is set to true. Modifies the ConfigClass::Help flag of configMode().

References ConfigClass::addConfigMode(), ConfigClass::delConfigMode(), and ConfigClass::Help.

string helpCaption ( void  ) const

Returns the caption for the help window.

References ConfigDialog::name().

Referenced by ConfigDialog::help().

void setHelpCaption ( const string &  caption)

Set the caption for the help window to caption.

string helpPath ( int  inx = 0) const

Returns the inx-th default path used for searching help files.

References ConfigDialog::helpPathes().

Referenced by ConfigDialog::help().

int helpPathes ( void  ) const

Returns the number of default pathes used for searching help files.

Referenced by ConfigDialog::help(), and ConfigDialog::helpPath().

void clearHelpPathes ( void  )

Clear the list of default pathes, where to look for help files.

void setHelpPath ( const string &  path)

Use path as the single default path, where to loock for help files.

void addHelpPath ( const string &  path)

Add path to the list of default pathes, where to loock for help files.

string helpFileName ( void  ) const
virtual
Returns
the name of the file to be displayed in the help dialog. The default implementation returns name() + ".html".

References ConfigDialog::name().

Referenced by ConfigDialog::help().

bool dialogOpen ( void  ) const

True if the dialog is open.

Referenced by ConfigDialog::dialog().

bool helpOpen ( void  ) const

True if the help window is open.

QWidget * mainWidget ( void  )
Returns
the main widget for the dialogs. Can be NULL.
See Also
setMainWidget()

Referenced by ConfigDialog::dialog(), and ConfigDialog::help().

void setMainWidget ( QWidget *  widget)
virtual

Set the main widget for the dialogs to widget.

See Also
mainWidget()
void lock ( void  ) const

Lock the mutex of the ConfigDialog.

See Also
unlock(), tryLock(), mutex()
void unlock ( ) const

Unlock the mutex of the ConfigDialog.

See Also
lock(), mutex()
bool tryLock ( int  timeout = 1)

Try to lock the mutex of the ConfigDialog for at most timeoutms milliseconds. Returns true if the lock was obtained within timeout milliseconds.

See Also
lock(), mutex()
QMutex * mutex ( void  )

Returns a pointer to the mutex of the ConfigDialog.

See Also
lock(), unlock()

Referenced by ConfigDialog::dialogOptions().

void dialog ( void  )
virtualslot

Launches a dialog that allows to edit the values of the Options if the ConfigClass::Dialog flag is set in configMode(). You may reimplement dialog() with your own dialog. The parts of the default dialog are composed out of dialogHeaderWidget(), dialogEmptyMessage(), dialogOptions(), and dialogButtons() and can be individually reimplemented as well. The default implementation is

{
if ( dialogOpen() || ( configMode() & ConfigClass::Dialog == 0 ) )
return;
OptDialog *od = new OptDialog( false, this );
od->setCaption( dialogCaption() );
if ( Options::size( DialogSelectMask ) <= 0 )
else {
string tabhotkeys = "oatc";
dialogOptions( od, &tabhotkeys );
}
od->exec();
}
See Also
dialogOpen(), setDialogOpen(), dClosed(), dialogAccepted(), dialogAction(), dialogClosed()

References ConfigClass::configMode(), ConfigClass::Dialog, ConfigDialog::dialogButtons(), ConfigDialog::dialogCaption(), ConfigDialog::dialogEmptyMessage(), ConfigDialog::dialogHeaderWidget(), ConfigDialog::dialogOpen(), ConfigDialog::dialogOptions(), OptDialog::exec(), ConfigDialog::mainWidget(), ConfigDialog::notificationFromDialog(), OptDialog::setCaption(), and ConfigDialog::setDialogOpen().

void help ( void  )
virtualslot
void notifyDialog ( const Options opt)
virtualslot

This slot is called whenever a value in the dialog is changed. The values of all the options opt from the dialog are set to the current values visible in the dialog. The changed value has the Parameter::changedFlag() set. The default implementation does nothing.

Referenced by ConfigDialog::notificationFromDialog().

void dialogAccepted ( void  )
signal

Values entered via the dialog are copied to the Options.

Referenced by ConfigDialog::dialogButtons().

void dialogAction ( int  r)
signal

A button with return code r was clicked in the dialog.

Referenced by ConfigDialog::dialogButtons().

void dialogClosed ( int  r)
signal
void setDialogOpen ( bool  open = true)
protected

Set the status of the dialog to open. Use this if you reimplement dialog() to inform ConfigDialog about the status of the dialog window.

Referenced by ConfigDialog::dialog().

void setHelpOpen ( bool  open = true)
protected

Set the status of the help window to open. Use this if you reimplement help() to inform ConfigDialog about the status of the help window.

void notificationFromDialog ( const Parameter p)
protectedslot

This slot is called whenever a value in the dialog is changed. Read the value from p to DialogOptions and call notifyDialog().

References Parameter::changedFlag(), ConfigDialog::DialogOptions, and ConfigDialog::notifyDialog().

Referenced by ConfigDialog::dialog().

void dClosed ( int  r)
protectedvirtualslot

Informs the class that the dialog window is closed.

References ConfigDialog::dialogClosed().

Referenced by ConfigDialog::dialogButtons(), and ConfigDialog::dialogEmptyMessage().

void hClosed ( int  r)
protectedvirtualslot

Informs the class that the help window is closed.

Referenced by ConfigDialog::help().

Member Data Documentation

Options DialogOptions
protected

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