#include <QDS_SpinBoxDbl.h>

Public Types | |
| enum | DatumFlags { None = 0x00, Label = 0x01, Control = 0x02, Units = 0x04, NotFormat = 0x08, NotAccel = 0x10, UnitsWithLabel = 0x20, All = Label | Control | Units } |
Enum describes bit flags of the Qt datum view and behaviour. More... | |
Public Slots | |
| void | setEnabled (bool) |
| Enable/disable main control subwidget (QDS.Control). | |
Signals | |
| void | paramChanged () |
| The signal is emitted when the datum value is changed. | |
| void | paramChanged (QString &) |
Public Member Functions | |
| QDS_SpinBoxDbl (const QString &, QWidget *=0, const int=All, const QString &=QString()) | |
| Constructor. | |
| virtual | ~QDS_SpinBoxDbl () |
| Destructor. | |
| double | step () const |
| Get the spin box increment value. | |
| void | setStep (const double) |
| Set the spin box increment value. | |
| QString | id () const |
| Get the datum ID. | |
| int | type () const |
| Get the datum value type. | |
| QString | label () const |
| Get the datum label text. | |
| QString | units () const |
| Get the datum units text. | |
| QString | filter () const |
| Get the datum filter string. | |
| QString | format () const |
| Get the datum format string. | |
| QString | longDescription () const |
| Get the datum long description. | |
| QString | shortDescription () const |
| Get the datum short description. | |
| QString | defaultValue () const |
| Get the datum default value. | |
| QString | minimumValue () const |
| Get the datum minimum value. | |
| QString | maximumValue () const |
| Get the datum maximum value. | |
| QStringList | options () const |
| Get the datum options names. | |
| QVariant | option (const QString &) const |
| Get datum option specified by name as QVariant. | |
| QString | optionString (const QString &) const |
| Get datum option specified by name as string. | |
| double | optionDouble (const QString &) const |
| Get datum option specified by name as double. | |
| int | optionInteger (const QString &) const |
| Get datum option specified by name as integer. | |
| virtual QVariant | value () const |
| Get the datum value as QVariant. | |
| virtual QString | stringValue () const |
| Get the datum value as string. | |
| virtual double | doubleValue () const |
| Get the datum value as double. | |
| virtual int | integerValue () const |
| Get the datum value as integer. | |
| QString | text () const |
| Get the text data from datum. | |
| virtual bool | isEmpty () const |
| Check if the datum is empty. | |
| virtual void | reset () |
| Reset datum state and set default value as current. | |
| virtual void | clear () |
| Clear the control. | |
| virtual void | setValue (const QVariant &) |
| Set datum value from QVariant object. | |
| virtual void | setStringValue (const QString &) |
| Set datum value from string data. | |
| virtual void | setDoubleValue (const double) |
| Set datum value from double data. | |
| virtual void | setIntegerValue (const int) |
| Set datum value from integer data. | |
| virtual bool | isEnabled (const int=Control) const |
| Get 'enabled' state of the specified subwidget. | |
| virtual void | setEnabled (const bool, const int) |
| Enable/disable subwidgets specified by element. | |
| void | show (const int=All) |
| Show subwidgets specified by element. | |
| void | hide (const int=All) |
| Hide subwidgets specified by element. | |
| virtual void | setShown (const bool, const int=All) |
| Show/hide subwidgets specified by flags. | |
| QWidget * | widget (const int) const |
| Get subwidget specified by element. | |
| void | setFocus () |
| Set the input focus to the control widget. | |
| virtual bool | isValid (const bool=true, const QString &=QString(), const QString &=QString()) const |
| Check if input data is valid. | |
| virtual QValidator * | validator (const bool=false) const |
| Create validator according to the datum type of value. | |
| void | addTo (QVBoxLayout *) |
| Add widgets to the vertical box layout. | |
| void | addTo (QHBoxLayout *) |
| Add widgets to the horizontal box layout. | |
| void | addTo (QGridLayout *, const int, const int, const bool=false) |
| Add widgets to the grid layout. | |
| virtual void | setAlignment (const int, const int=Label) |
| Set the aligment for QDS.Label and/or QDS.Units subwidgets. | |
| virtual bool | eventFilter (QObject *, QEvent *) |
| Event filter. | |
| operator QWidget * () const | |
| Overloaded operator used to retrieve main subwidget named QDS.Control. | |
| bool | isCustomTr () const |
| Return state of custom translation. | |
| void | enableCustomTr (const bool) |
| Change state of custom translation. | |
Static Public Member Functions | |
| static QString | units (const QString &) |
| Get displayable units string for specified data dictionary item. | |
| static QString | format (const QString &, const QString &, const bool=false) |
| Format the specified string as dictionary item value. | |
| static QString | format (const int, const QString &, const bool=false) |
| Format the specified integer as dictionary item value. | |
| static QString | format (const double, const QString &, const bool=false) |
| Format the specified double as dictionary item value. | |
| static QString | unitsToText (const QString &) |
| Convert units into text presentation. | |
| static QString | textToUnits (const QString &) |
| Convert text presentation into internal units format. | |
| static bool | load (const QString &) |
| Load datum definitions from XML file dictPath to the dictionary. | |
| static QString | unitSystemLabel (const QString &, const QString &=QString()) |
| Get the label of unit system sys. | |
| static QString | activeUnitSystem (const QString &=QString()) |
| Get the name of active unit system from the specified component comp. | |
| static void | setActiveUnitSystem (const QString &, const QString &=QString()) |
| Set the active unit system. | |
| static QString | toQString (const TCollection_AsciiString &) |
| Convert the OpenCascade ASCII string to Qt string. | |
| static QString | toQString (const TCollection_ExtendedString &) |
| Convert the OpenCascade Unicode string to Qt string. | |
| static QString | toQString (const Handle(TCollection_HAsciiString)&) |
| Convert the OpenCascade ASCII string to Qt string. | |
| static QString | toQString (const Handle(TCollection_HExtendedString)&) |
| Convert the OpenCascade Unicode string to Qt string. | |
| static TCollection_AsciiString | toAsciiString (const QString &) |
| Convert the Qt string to OpenCascade ASCII string. | |
| static TCollection_AsciiString | toAsciiString (const TCollection_ExtendedString &) |
| Convert the OpenCascade Unicode string to OpenCascade ASCII string. | |
| static TCollection_AsciiString | toAsciiString (const Handle(TCollection_HExtendedString)&) |
| Convert the OpenCascade Unicode string to OpenCascade ASCII string. | |
| static TCollection_ExtendedString | toExtString (const QString &) |
| Convert the Qt string to OpenCascade Unicode string. | |
| static TCollection_ExtendedString | toExtString (const TCollection_AsciiString &) |
| Convert the OpenCascade ASCII string to OpenCascade Unicode string. | |
Protected Slots | |
| virtual void | onParamChanged () |
| Called when datum value is changed. | |
Protected Member Functions | |
| QtxDoubleSpinBox * | spinBox () const |
| Get spin box widget. | |
| virtual QWidget * | createControl (QWidget *) |
| Create internal spin box as control widget. | |
| virtual QString | getString () const |
| Get string from the spin box. | |
| virtual void | setString (const QString &) |
| Set the string value to the spin box widget. | |
| virtual void | unitSystemChanged (const QString &) |
| Process notification about active units system changing. | |
| QLabel * | labelWidget () const |
| Get QDS.Label widget. | |
| QLabel * | unitsWidget () const |
| Get QDS.Units widget. | |
| QWidget * | controlWidget () const |
| Get QDS.Control widget. | |
| Handle (DDS_DicItem) dicItem() const | |
| void | setDicItem (const Handle(DDS_DicItem)&) |
| Set the dictionary item to the datum. | |
| int | flags () const |
| Get datum flags. | |
| void | invalidateCache () |
| Reset the numeric value cache. | |
| virtual QLabel * | createLabel (QWidget *) |
| Create QDS.Label widget. | |
| virtual QLabel * | createUnits (QWidget *) |
| Create QDS.Units widget. | |
| virtual bool | validate (const QString &) const |
| Validate the specified string. | |
| QString | prefix () const |
| Get prefix string from format. | |
| QString | suffix () const |
| Get suffix string from format. | |
| virtual QString | minValue () const |
| Get minimum value. | |
| virtual QString | maxValue () const |
| Get maximum value. | |
| void | initDatum () const |
| Perform initialization if it needed. | |
Static Protected Member Functions | |
| static QString | format (const QString &, const int, const int) |
| Format the given value according to the data dictionary item type. | |
| static QString | format (const QString &, const int, const double) |
| Format the given value according to the data dictionary item type. | |
| static QString | format (const QString &, const int, const QString &) |
| Format the given value according to the data dictionary item type. | |
| static QString | sprintf (const QString &, const int) |
| Wrapper around the standard sprintf() function. | |
| static QString | sprintf (const QString &, const double) |
| Wrapper around the standard sprintf() function.This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Process some non standard flags from format string. | |
| static QString | sprintf (const QString &, const QString &) |
| Wrapper around the standard sprintf() function.This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Process some non standard flags from format string. | |
| static void | insertDatum (QDS_Datum *) |
| Register given datum datum in the global list. | |
| static void | removeDatum (QDS_Datum *) |
| Remove given datum datum from the global list. | |
Private Slots | |
| void | onValueChanged (double) |
| Called when value in the spin box is changed. | |
enum QDS::DatumFlags [inherited] |
| QDS_SpinBoxDbl::QDS_SpinBoxDbl | ( | const QString & | id, |
| QWidget * | parent = 0, |
||
| const int | flags = All, |
||
| const QString & | comp = QString() |
||
| ) |
Create spin box datum object with datum identifier id and parent widget parent.
Parameter flags defines behaviour of datum and set of created subwidgets. Default value of this parameter is QDS.All.
Parameter comp specifies the component name which will be used when searching the dictionary item.
| id | datum identifier |
| parent | parent widget |
| flags | datum flags |
| comp | component |
| QDS_SpinBoxDbl::~QDS_SpinBoxDbl | ( | ) | [virtual] |
| double QDS_SpinBoxDbl::step | ( | ) | const |
References spinBox().
| void QDS_SpinBoxDbl::setStep | ( | const double | step | ) |
| step | new increment value |
References spinBox().
| void QDS_SpinBoxDbl::onValueChanged | ( | double | ) | [private, slot] |
Emit signals to notify about value changing in the spin box.
| val | current spin box value |
References getString(), QDS_Datum.onParamChanged(), and QDS_Datum.paramChanged().
| QtxDoubleSpinBox * QDS_SpinBoxDbl::spinBox | ( | ) | const [protected] |
References QDS_Datum.controlWidget().
| parent | parent widget |
Implements QDS_Datum.
References onValueChanged().
| QString QDS_SpinBoxDbl::getString | ( | ) | const [protected, virtual] |
| void QDS_SpinBoxDbl::setString | ( | const QString & | txt | ) | [protected, virtual] |
| txt | string value |
Implements QDS_Datum.
References QtxDoubleSpinBox.setCleared(), and spinBox().
| void QDS_SpinBoxDbl::unitSystemChanged | ( | const QString & | system | ) | [protected, virtual] |
Update spin box contents according to the data dictionary item properties: suffix, prefix, minimum, maximum
| system | new active units system |
Reimplemented from QDS_Datum.
References QDS_Datum.Handle(), QDS_Datum.isEmpty(), QDS_Datum.maxValue(), QDS_Datum.minValue(), QDS_Datum.prefix(), spinBox(), and QDS_Datum.suffix().
| QString QDS_Datum::id | ( | ) | const [inherited] |
References QDS_Datum.initDatum(), and QDS_Datum.myId.
| int QDS_Datum::type | ( | ) | const [inherited] |
References QDS_Datum.initDatum(), and DDS_DicItem.Unknown.
| QString QDS_Datum::label | ( | ) | const [inherited] |
References QDS_Datum.flags(), QDS_Datum.initDatum(), QDS_Datum.myTr, QDS.NotAccel, QDS_Datum.removeAccel(), and QDS.toQString().
| QString QDS_Datum::units | ( | ) | const [inherited] |
References QDS_Datum.initDatum(), and QDS.toQString().
| QString QDS_Datum::units | ( | const QString & | id | ) | [static, inherited] |
| id | data dictionary item ID |
References QDS_Datum.Handle(), QDS.toAsciiString(), QDS.toQString(), and QDS_Datum.unitsToText().
| QString QDS_Datum::filter | ( | ) | const [inherited] |
References QDS_Datum.initDatum(), and QDS.toQString().
| QString QDS_Datum::format | ( | ) | const [inherited] |
References QDS_Datum.initDatum(), and QDS.toQString().
| QString QDS_Datum::format | ( | const QString & | str, |
| const QString & | id, | ||
| const bool | convert = false |
||
| ) | [static, inherited] |
| str | string value being formatted |
| id | data dictionary ID |
| convert | if true, perform conversion from "SI" units system |
References QDS_Datum.format(), QDS_Datum.Handle(), QDS.toAsciiString(), QDS.toQString(), and DDS_DicItem.Unknown.
| QString QDS_Datum::format | ( | const int | num, |
| const QString & | id, | ||
| const bool | convert = false |
||
| ) | [static, inherited] |
| num | integer value being formatted |
| id | data dictionary ID |
| convert | if true, perform conversion from "SI" units system |
References QDS_Datum.format(), QDS_Datum.Handle(), QDS.toAsciiString(), QDS.toQString(), and DDS_DicItem.Unknown.
| QString QDS_Datum::format | ( | const double | num, |
| const QString & | id, | ||
| const bool | convert = false |
||
| ) | [static, inherited] |
| num | double value being formatted |
| id | data dictionary ID |
| convert | if true, perform conversion from "SI" units system |
References QDS_Datum.format(), QDS_Datum.Handle(), QDS.toAsciiString(), QDS.toQString(), and DDS_DicItem.Unknown.
| QString QDS_Datum::format | ( | const QString & | aFormat, |
| const int | aType, | ||
| const int | aValue | ||
| ) | [static, protected, inherited] |
| aFormat | format string |
| aType | data dictionary item type |
| aValue | integer value being formatted |
References DDS_DicItem.Float, DDS_DicItem.Integer, QDS_Datum.sprintf(), and DDS_DicItem.String.
| QString QDS_Datum::format | ( | const QString & | aFormat, |
| const int | aType, | ||
| const double | aValue | ||
| ) | [static, protected, inherited] |
| aFormat | format string |
| aType | data dictionary item type |
| aValue | double value being formatted |
References DDS_DicItem.Float, DDS_DicItem.Integer, and DDS_DicItem.String.
| QString QDS_Datum::format | ( | const QString & | aFormat, |
| const int | aType, | ||
| const QString & | aValue | ||
| ) | [static, protected, inherited] |
| aFormat | format string |
| aType | data dictionary item type |
| aValue | string value being formatted |
References DDS_DicItem.Float, DDS_DicItem.Integer, QDS_Datum.sprintf(), and DDS_DicItem.String.
| QString QDS_Datum::longDescription | ( | ) | const [inherited] |
References QDS_Datum.initDatum(), and QDS.toQString().
| QString QDS_Datum::shortDescription | ( | ) | const [inherited] |
References QDS_Datum.initDatum(), and QDS.toQString().
| QString QDS_Datum::defaultValue | ( | ) | const [inherited] |
References QDS_Datum.initDatum(), QDS_Datum.prefix(), QDS_Datum.suffix(), and QDS.toQString().
| QString QDS_Datum::minimumValue | ( | ) | const [inherited] |
References QDS_Datum.format(), QDS_Datum.initDatum(), DDS_DicItem.MinValue, and QDS_Datum.type().
| QString QDS_Datum::maximumValue | ( | ) | const [inherited] |
References QDS_Datum.format(), QDS_Datum.initDatum(), DDS_DicItem.MaxValue, and QDS_Datum.type().
| QStringList QDS_Datum::options | ( | ) | const [inherited] |
References QDS.toQString().
| QVariant QDS_Datum::option | ( | const QString & | name | ) | const [inherited] |
References QDS.toAsciiString(), and QDS.toQString().
| QString QDS_Datum::optionString | ( | const QString & | name | ) | const [inherited] |
References QDS.toAsciiString(), and QDS.toQString().
| double QDS_Datum::optionDouble | ( | const QString & | name | ) | const [inherited] |
References QDS_Datum.option().
| int QDS_Datum::optionInteger | ( | const QString & | name | ) | const [inherited] |
References QDS_Datum.option().
| QVariant QDS_Datum::value | ( | ) | const [virtual, inherited] |
References QDS_Datum.isEmpty(), and QDS_Datum.stringValue().
| QString QDS_Datum::stringValue | ( | ) | const [virtual, inherited] |
References QDS_Datum.getString(), QDS_Datum.initDatum(), QDS_Datum.mySourceValue, and QDS_Datum.myTargetValue.
| double QDS_Datum::doubleValue | ( | ) | const [virtual, inherited] |
The value is converted according to the measure units in the active units system to measure units in "SI" units system.
Reimplemented in QDS_ComboBox.
References QDS_Datum.getString(), QDS_Datum.initDatum(), QDS_Datum.mySourceValue, and QDS_Datum.myTargetValue.
| int QDS_Datum::integerValue | ( | ) | const [virtual, inherited] |
The value is converted according to the measure units in the active units system to measure units in "SI" units system.
Reimplemented in QDS_ComboBox.
References QDS_Datum.getString(), QDS_Datum.initDatum(), QDS_Datum.mySourceValue, and QDS_Datum.myTargetValue.
| QString QDS_Datum::text | ( | ) | const [inherited] |
Text consists of label, string value and units.
References QDS_Datum.initDatum(), QDS_Datum.label(), QDS_Datum.stringValue(), and QDS_Datum.units().
| bool QDS_Datum::isEmpty | ( | ) | const [virtual, inherited] |
false if datum control has value entered References QDS_Datum.stringValue().
| void QDS_Datum::reset | ( | ) | [virtual, inherited] |
Reimplemented in QDS_ComboBox.
References QDS_Datum.defaultValue(), QDS_Datum.format(), QDS_Datum.getString(), QDS_Datum.initDatum(), QDS_Datum.invalidateCache(), QDS_Datum.myFlags, QDS_Datum.mySourceValue, QDS.NotFormat, QDS_Datum.onParamChanged(), QDS_Datum.paramChanged(), QDS_Datum.setString(), and QDS_Datum.type().
| void QDS_Datum::clear | ( | ) | [virtual, inherited] |
Reimplemented in QDS_CheckBox.
References QDS_Datum.getString(), QDS_Datum.initDatum(), QDS_Datum.invalidateCache(), QDS_Datum.isEmpty(), QDS_Datum.mySourceValue, QDS_Datum.onParamChanged(), QDS_Datum.paramChanged(), and QDS_Datum.setString().
| void QDS_Datum::setValue | ( | const QVariant & | val | ) | [virtual, inherited] |
| val | new value |
References QDS_Datum.clear(), and QDS_Datum.setStringValue().
| void QDS_Datum::setStringValue | ( | const QString & | txt | ) | [virtual, inherited] |
| txt | new value |
References QDS_Datum.flags(), QDS_Datum.format(), QDS_Datum.getString(), QDS_Datum.initDatum(), QDS_Datum.mySourceValue, QDS_Datum.myTargetValue, QDS.NotFormat, QDS_Datum.onParamChanged(), QDS_Datum.paramChanged(), QDS_Datum.setString(), and QDS_Datum.type().
| void QDS_Datum::setDoubleValue | ( | const double | num | ) | [virtual, inherited] |
The value is converted from measure units in "SI" units system to the measure units in the active units system. Format the value using datum format internal if it is required.
| num | new value |
Reimplemented in QDS_ComboBox.
References QDS_Datum.flags(), QDS_Datum.format(), QDS_Datum.getString(), QDS_Datum.initDatum(), QDS_Datum.mySourceValue, QDS_Datum.myTargetValue, QDS.NotFormat, QDS_Datum.onParamChanged(), QDS_Datum.paramChanged(), QDS_Datum.setString(), and QDS_Datum.type().
| void QDS_Datum::setIntegerValue | ( | const int | num | ) | [virtual, inherited] |
The value is converted from measure units in "SI" units system to the measure units in the active units system. Format the value using datum format if it is required.
| num | new value |
Reimplemented in QDS_ComboBox.
References QDS_Datum.flags(), QDS_Datum.format(), QDS_Datum.getString(), QDS_Datum.initDatum(), QDS_Datum.mySourceValue, QDS_Datum.myTargetValue, QDS.NotFormat, QDS_Datum.onParamChanged(), QDS_Datum.paramChanged(), QDS_Datum.setString(), and QDS_Datum.type().
| bool QDS_Datum::isEnabled | ( | const int | element = Control | ) | const [virtual, inherited] |
| element | ORed subwidget flags (QDS.DatumFlags) |
true if all subwidgets specified by element are enabled References QDS.Control, QDS_Datum.controlWidget(), QDS_Datum.initDatum(), QDS.Label, QDS_Datum.labelWidget(), QDS.Units, and QDS_Datum.unitsWidget().
| void QDS_Datum::setEnabled | ( | const bool | on, |
| const int | element | ||
| ) | [virtual, inherited] |
Possible values of element: QDS.Label, QDS.Control, QDS.Units or their ORed combinations.
| on | new 'enabled' state |
| element | ORed subwidget flags (QDS.DatumFlags) |
References QDS.Control, QDS_Datum.controlWidget(), QDS_Datum.initDatum(), QDS.Label, QDS_Datum.labelWidget(), QDS.Units, and QDS_Datum.unitsWidget().
| void QDS_Datum::setEnabled | ( | bool | on | ) | [slot, inherited] |
| on | new 'enabled' state |
References QDS.Control, and QDS_Datum.setEnabled().
| void QDS_Datum::show | ( | const int | element = All | ) | [inherited] |
Possible values of element: QDS.Label, QDS.Control, QDS.Units or their ORed combinations.
| element | ORed subwidget flags (QDS.DatumFlags) |
References QDS_Datum.setShown().
| void QDS_Datum::hide | ( | const int | element = All | ) | [inherited] |
Possible values of element: QDS.Label, QDS.Control, QDS.Units or their ORed combinations.
| element | ORed subwidget flags (QDS.DatumFlags) |
References QDS_Datum.setShown().
| void QDS_Datum::setShown | ( | const bool | visible, |
| const int | flags = All |
||
| ) | [virtual, inherited] |
Possible values of flags: QDS.Label, QDS.Control, QDS.Units or their ORed combinations.
| visible | new 'visibility' state |
| flags | ORed subwidget flags (QDS.DatumFlags) |
References QDS_Datum.initDatum(), QDS.Units, and QDS_Datum.widget().
| QWidget * QDS_Datum::widget | ( | const int | element | ) | const [inherited] |
Possible values of element: QDS.Label, QDS.Control, QDS.Units.
| element | subwidget |
References QDS_Datum.initDatum(), and QDS_Datum.wrapper().
| void QDS_Datum::setFocus | ( | ) | [inherited] |
References QDS_Datum.controlWidget(), and QDS_Datum.initDatum().
| bool QDS_Datum::isValid | ( | const bool | msgBox = true, |
| const QString & | extMsg = QString(), |
||
| const QString & | extLabel = QString() |
||
| ) | const [virtual, inherited] |
If data is invalid and msgBox is true, the warning message box is shown.
| msgBox | if true, show warning message box if input is invalid |
| extMsg | warning message |
| extLabel | optional name of the variable (if QDS.Label control is not used) |
true if input data is valid References QDS_Datum.controlWidget(), DDS_DicItem.Float, QDS_Datum.format(), QDS_Datum.getString(), QDS_Datum.initDatum(), DDS_DicItem.Integer, QDS_Datum.isDoubleFormat(), QDS_Datum.isEmpty(), QDS_Datum.label(), QDS_Datum.maxValue(), QDS_Datum.minValue(), DDS_DicItem.String, QDS.toQString(), QDS_Datum.type(), and QDS_Datum.validate().
| QValidator * QDS_Datum::validator | ( | const bool | limits = false | ) | const [virtual, inherited] |
| limits | if true use minimum and maximum value limits |
References QDS_Datum.canonicalFormat(), QDS_Datum.filter(), DDS_DicItem.Float, QDS_Datum.format(), DDS_DicItem.Integer, QDS_Datum.maxValue(), QDS_Datum.minValue(), QDS_StringValidator.setLength(), DDS_DicItem.String, and QDS_Datum.type().
| void QDS_Datum::addTo | ( | QVBoxLayout * | l | ) | [inherited] |
| l | layout |
References QDS.Control, QDS_Datum.initDatum(), QDS.Label, QDS.Units, and QDS_Datum.wrapper().
| void QDS_Datum::addTo | ( | QHBoxLayout * | l | ) | [inherited] |
| l | layout |
References QDS.Control, QDS_Datum.initDatum(), QDS.Label, QDS.Units, QDS_Datum.unitsWidget(), and QDS_Datum.wrapper().
| void QDS_Datum::addTo | ( | QGridLayout * | theLay, |
| const int | theRow, | ||
| const int | theCol, | ||
| const bool | vertical = false |
||
| ) | [inherited] |
| theLay | layout |
| theRow | layout row index |
| theCol | layout column index |
| vertical | if true subwidgets are layouted vertically, otherwise - horizontally |
References QDS.Control, QDS_Datum.initDatum(), QDS.Label, QDS.Units, and QDS_Datum.wrapper().
| void QDS_Datum::setAlignment | ( | const int | align, |
| const int | type = Label |
||
| ) | [virtual, inherited] |
| align | alignment type (Qt.Alignment) |
| type | ORed subwidget flags |
Reimplemented in QDS_LineEdit.
References QDS_Datum.initDatum(), QDS.Label, QDS_Datum.labelWidget(), QDS.Units, and QDS_Datum.unitsWidget().
| QString QDS_Datum::unitsToText | ( | const QString & | uni | ) | [static, inherited] |
| uni | units to be converted |
| QString QDS_Datum::textToUnits | ( | const QString & | txt | ) | [static, inherited] |
| txt | text presentation of units (rich-text) |
Perform delayed initialisation. Reimplemented for internal reasons.
| o | event reciever object |
| e | event |
true if event should be filtered References QDS_Datum.initDatum().
| QDS_Datum::operator QWidget * | ( | ) | const [inherited] |
References QDS.Control, and QDS_Datum.widget().
| bool QDS_Datum::isCustomTr | ( | ) | const [inherited] |
References QDS_Datum.myTr.
| void QDS_Datum::enableCustomTr | ( | const bool | on | ) | [inherited] |
Custom translation means that text labels of datums are translated with help of standard Qt mechanism of internationalization. In this case special records should be placed into *.ts files under context "QDS". For example, if label has name "myLabel", the corresponding translation should be written: <context> <name>QDS</name> <message> <source>myLabel</source> <translation>myLabel translation</translation> </message> ...
If custom translation mechanism is deactivated, then labels will be shown with text got from xml data dictionary file
By default, the custom translation is deactivated
| on | - if it is true, custom translation is activated, otherwise, deactivated |
References QDS_Datum.label(), QDS_Datum.labelWidget(), and QDS_Datum.myTr.
| void QDS_Datum::paramChanged | ( | ) | [signal, inherited] |
| void QDS_Datum.paramChanged | ( | QString & | ) | [signal, inherited] |
| void QDS_Datum::onParamChanged | ( | ) | [protected, virtual, slot, inherited] |
Reimplemented in QDS_CheckBox, and QDS_LineEdit.
| QLabel * QDS_Datum::labelWidget | ( | ) | const [protected, inherited] |
References QDS_Datum.initDatum(), and QDS_Datum.myLabel.
| QLabel * QDS_Datum::unitsWidget | ( | ) | const [protected, inherited] |
References QDS_Datum.initDatum(), and QDS_Datum.myUnits.
| QWidget * QDS_Datum::controlWidget | ( | ) | const [protected, inherited] |
References QDS_Datum.initDatum(), and QDS_Datum.myControl.
| QDS_Datum.Handle | ( | DDS_DicItem | ) | const [protected, inherited] |
| void QDS_Datum::setDicItem | ( | const Handle(DDS_DicItem)& | item | ) | [protected, inherited] |
| item | handle to data dictionary item |
| int QDS_Datum::flags | ( | ) | const [protected, inherited] |
References QDS_Datum.myFlags.
| void QDS_Datum::invalidateCache | ( | ) | [protected, inherited] |
References QDS_Datum.myTargetValue.
| parent | parent widget |
| parent | parent widget |
| bool QDS_Datum::validate | ( | const QString & | txt | ) | const [protected, virtual, inherited] |
| txt | string to be validated |
true if string contains valid data References QDS_Datum.format(), QDS_Datum.isDoubleFormat(), DDS_DicItem.String, QDS_Datum.type(), DDS_DicItem.Unknown, and QDS_Datum.validator().
| QString QDS_Datum::prefix | ( | ) | const [protected, inherited] |
| QString QDS_Datum::suffix | ( | ) | const [protected, inherited] |
| QString QDS_Datum::minValue | ( | ) | const [protected, virtual, inherited] |
References QDS_Datum.minimumValue(), QDS_Datum.prefix(), and QDS_Datum.suffix().
| QString QDS_Datum::maxValue | ( | ) | const [protected, virtual, inherited] |
References QDS_Datum.maximumValue(), QDS_Datum.prefix(), and QDS_Datum.suffix().
| QString QDS_Datum::sprintf | ( | const QString & | fmt, |
| const int | val | ||
| ) | [static, protected, inherited] |
Process some non standard flags from format string.
| fmt | string format |
| val | value |
References QDS_Datum.canonicalFormat().
| QString QDS_Datum::sprintf | ( | const QString & | fmt, |
| const double | val | ||
| ) | [static, protected, inherited] |
| fmt | string format |
| val | value |
References QDS_Datum.canonicalFormat().
| QString QDS_Datum::sprintf | ( | const QString & | fmt, |
| const QString & | val | ||
| ) | [static, protected, inherited] |
| fmt | string format |
| val | value |
References QDS_Datum.canonicalFormat(), QDS_Datum.isDoubleFormat(), rx, and QDS_Datum.sprintf().
| void QDS_Datum::initDatum | ( | ) | const [protected, inherited] |
References QDS_Datum.initialize(), and QDS_Datum.myInitialised.
| bool QDS::load | ( | const QString & | dictPath | ) | [static, inherited] |
true if loading is successed or false otherwise. References QDS.toAsciiString().
| QString QDS::unitSystemLabel | ( | const QString & | sys, |
| const QString & | comp = QString() |
||
| ) | [static, inherited] |
If component comp is specified and not empty then the function searches the given unit system in the specified component, otherwise all components will be searched.
| sys | unit system |
| comp | component |
References Handle(), TCollection_AsciiString, QDS.toAsciiString(), and QDS.toQString().
| QString QDS::activeUnitSystem | ( | const QString & | comp = QString() | ) | [static, inherited] |
If component is not specified or empty string, then the first found component will be used.
If component exists, then active unit system name is returned. Otherwise, empty string is returned.
| comp | component |
References Handle(), QDS.toAsciiString(), and QDS.toQString().
| void QDS::setActiveUnitSystem | ( | const QString & | sys, |
| const QString & | comp = QString() |
||
| ) | [static, inherited] |
If not empty component name comp is specified, then the unit system will be activated in the given component, otherwise all components will be processed.
After the changing of active unit system function notifies about it all registered datums from processed components using method QDS_Datum.unitSystemChanged()
| unit | system to be set active |
| comp | component |
References QDS._datumList, QDS.activeUnitSystem(), Handle(), TCollection_AsciiString, QDS.toAsciiString(), and QDS_Datum.unitSystemChanged().
| QString QDS::toQString | ( | const TCollection_AsciiString & | src | ) | [static, inherited] |
| src | OCC ASCII string |
| QString QDS::toQString | ( | const TCollection_ExtendedString & | src | ) | [static, inherited] |
| src | OCC Unicode string |
References TCollection_AsciiString, and QDS.toQString().
| QString QDS::toQString | ( | const Handle(TCollection_HAsciiString)& | src | ) | [static, inherited] |
| QString QDS::toQString | ( | const Handle(TCollection_HExtendedString)& | src | ) | [static, inherited] |
| TCollection_AsciiString QDS::toAsciiString | ( | const QString & | src | ) | [static, inherited] |
| TCollection_AsciiString QDS::toAsciiString | ( | const TCollection_ExtendedString & | src | ) | [static, inherited] |
| TCollection_AsciiString QDS::toAsciiString | ( | const Handle(TCollection_HExtendedString)& | src | ) | [static, inherited] |
| src | handle to OCC Unicode string |
References TCollection_AsciiString, and QDS.toAsciiString().
| TCollection_ExtendedString QDS::toExtString | ( | const QString & | src | ) | [static, inherited] |
| src | Qt string |
| TCollection_ExtendedString QDS::toExtString | ( | const TCollection_AsciiString & | src | ) | [static, inherited] |
| src | OCC ASCII string |
| void QDS::insertDatum | ( | QDS_Datum * | datum | ) | [static, protected, inherited] |
This function is invoked automatically by QDS_Datum constructor.
| datum | datum being registered |
References QDS._datumList.
| void QDS::removeDatum | ( | QDS_Datum * | datum | ) | [static, protected, inherited] |
This function is invoked automatically by QDS_Datum destructor.
| datum | datum being unregistered |
References QDS._datumList.