47 QDS_Datum(
const QString&,
QWidget* = 0,
const int = All,
const QString& = QString() );
52 QString label()
const;
53 QString units()
const;
54 QString filter()
const;
55 QString format()
const;
56 QString longDescription()
const;
57 QString shortDescription()
const;
59 QString defaultValue()
const;
60 QString minimumValue()
const;
61 QString maximumValue()
const;
63 QStringList options()
const;
64 QVariant option(
const QString& )
const;
65 QString optionString(
const QString& )
const;
66 double optionDouble(
const QString& )
const;
67 int optionInteger(
const QString& )
const;
69 virtual QVariant value()
const;
71 virtual QString stringValue()
const;
72 virtual double doubleValue()
const;
73 virtual int integerValue()
const;
77 virtual bool isEmpty()
const;
82 virtual void setValue(
const QVariant& );
84 virtual void setStringValue(
const QString& );
85 virtual void setDoubleValue(
const double );
86 virtual void setIntegerValue(
const int );
88 virtual bool isEnabled(
const int = Control )
const;
89 virtual void setEnabled(
const bool,
const int );
91 void show(
const int = All );
92 void hide(
const int = All );
93 virtual void setShown(
const bool,
const int = All );
95 QWidget* widget(
const int )
const;
98 virtual bool isValid(
const bool =
true,
99 const QString& = QString(),
100 const QString& = QString() )
const;
101 virtual QValidator* validator(
const bool =
false )
const;
103 void addTo( QVBoxLayout* );
104 void addTo( QHBoxLayout* );
105 void addTo( QGridLayout*,
const int,
const int,
const bool =
false );
107 virtual void setAlignment(
const int,
const int = Label );
109 static QString unitsToText(
const QString& );
110 static QString textToUnits(
const QString& );
112 static QString format(
const QString&,
const QString&,
const bool =
false );
113 static QString format(
const int,
const QString&,
const bool =
false );
114 static QString format(
const double,
const QString&,
const bool =
false );
115 static QString units(
const QString& );
117 virtual QString getString()
const = 0;
123 bool isCustomTr()
const;
124 void enableCustomTr(
const bool );
128 void paramChanged( QString& );
131 void setEnabled(
bool );
134 virtual void onParamChanged();
141 QLabel* labelWidget()
const;
142 QLabel* unitsWidget()
const;
143 QWidget* controlWidget()
const;
150 void invalidateCache();
156 virtual void setString(
const QString& ) = 0;
158 virtual bool validate(
const QString& )
const;
160 QString prefix()
const;
161 QString suffix()
const;
162 virtual QString minValue()
const;
163 virtual QString maxValue()
const;
165 static QString format(
const QString&,
const int,
const int );
166 static QString format(
const QString&,
const int,
const double );
167 static QString format(
const QString&,
const int,
const QString& );
169 static QString sprintf(
const QString&,
const int );
170 static QString sprintf(
const QString&,
const double );
171 static QString sprintf(
const QString&,
const QString& );
173 virtual void unitSystemChanged(
const QString& );
175 void initDatum()
const;
181 Wrapper* wrapper(
const int )
const;
182 int wrapperType(
Wrapper* )
const;
184 static QString removeAccel(
const QString& );
185 static bool isDoubleFormat(
const QString& );
186 static QString canonicalFormat(
const QString& );
187 static QString canonicalFormat(
const QString&, QString& );
203 QString mySourceValue;
204 QString myTargetValue;
206 bool myInitialised, myTr;