A set of usefull static functions.
#include <QDS.h>
Public Types | |
enum | DatumFlags { None = 0x00, Label = 0x01, Control = 0x02, Units = 0x04, NotFormat = 0x08, NotAccel = 0x10, NotConvert = 0x20, UnitsWithLabel = 0x40, All = Label | Control | Units } |
Enum describes bit flags of the Qt datum view and behaviour. More... | |
Static Public Member Functions | |
static bool | load (const QString &) |
Load datum definitions from XML file dictPath to the dictionary. More... | |
static QString | unitSystemLabel (const QString &, const QString &=QString()) |
Get the label of unit system sys. More... | |
static QString | activeUnitSystem (const QString &=QString()) |
Get the name of active unit system from the specified component comp. More... | |
static void | setActiveUnitSystem (const QString &, const QString &=QString()) |
Set the active unit system. More... | |
static QString | toQString (const TCollection_AsciiString &) |
Convert the OpenCascade ASCII string to Qt string. More... | |
static QString | toQString (const TCollection_ExtendedString &) |
Convert the OpenCascade Unicode string to Qt string. More... | |
static QString | toQString (const Handle(TCollection_HAsciiString)&) |
Convert the OpenCascade ASCII string to Qt string. More... | |
static QString | toQString (const Handle(TCollection_HExtendedString)&) |
Convert the OpenCascade Unicode string to Qt string. More... | |
static TCollection_AsciiString | toAsciiString (const QString &) |
Convert the Qt string to OpenCascade ASCII string. More... | |
static TCollection_AsciiString | toAsciiString (const TCollection_ExtendedString &) |
Convert the OpenCascade Unicode string to OpenCascade ASCII string. More... | |
static TCollection_AsciiString | toAsciiString (const Handle(TCollection_HExtendedString)&) |
Convert the OpenCascade Unicode string to OpenCascade ASCII string. More... | |
static TCollection_ExtendedString | toExtString (const QString &) |
Convert the Qt string to OpenCascade Unicode string. More... | |
static TCollection_ExtendedString | toExtString (const TCollection_AsciiString &) |
Convert the OpenCascade ASCII string to OpenCascade Unicode string. More... | |
Static Protected Member Functions | |
static void | insertDatum (QDS_Datum *) |
Register given datum datum in the global list. More... | |
static void | removeDatum (QDS_Datum *) |
Remove given datum datum from the global list. More... | |
Static Private Attributes | |
static QList< QDS_Datum * > | _datumList |
enum QDS::DatumFlags |
|
static |
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(), toAsciiString(), and toQString().
|
staticprotected |
This function is invoked automatically by QDS_Datum constructor.
datum | datum being registered |
References _datumList.
|
static |
true
if loading is successed or false
otherwise. References Load(), and toAsciiString().
|
staticprotected |
This function is invoked automatically by QDS_Datum destructor.
datum | datum being unregistered |
References _datumList.
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 _datumList, activeUnitSystem(), Handle(), toAsciiString(), and QDS_Datum::unitSystemChanged().
|
static |
src | Qt string |
|
static |
src | OCC Unicode string |
|
static |
src | Qt string |
|
static |
src | OCC ASCII string |
|
static |
src | OCC ASCII string |
|
static |
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(), toAsciiString(), and toQString().