Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QDS Class Reference

A set of usefull static functions.

#include <QDS.h>

Inheritance diagram for QDS:
Inheritance graph

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
 

Member Enumeration Documentation

Enumerator
None 

Non specified any flags (Default behaviour)

Label 

Create subwidget for datum label.

Control 

Create subwidget for datum input control.

Units 

Create subwidget for datum units of measure.

NotFormat 

Don't format initial value.

NotAccel 

Not support accelerators in datum label.

NotConvert 

Don't convert numeric value.

UnitsWithLabel 

Display units of measure in label like "<label_text> (<units_text>) instead separate text".

All 

Create all subwidgets.

Member Function Documentation

QString QDS::activeUnitSystem ( const QString &  comp = QString())
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.

Parameters
compcomponent
Returns
name of the active unit system

References Handle(), toAsciiString(), and toQString().

void QDS::insertDatum ( QDS_Datum datum)
staticprotected

This function is invoked automatically by QDS_Datum constructor.

Parameters
datumdatum being registered

References _datumList.

bool QDS::load ( const QString &  dictPath)
static
Returns
true if loading is successed or false otherwise.

References Load(), and toAsciiString().

void QDS::removeDatum ( QDS_Datum datum)
staticprotected

This function is invoked automatically by QDS_Datum destructor.

Parameters
datumdatum being unregistered

References _datumList.

void QDS::setActiveUnitSystem ( const QString &  sys,
const QString &  comp = QString() 
)
static

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()

Parameters
unitsystem to be set active
compcomponent

References _datumList, activeUnitSystem(), Handle(), toAsciiString(), and QDS_Datum::unitSystemChanged().

TCollection_AsciiString QDS::toAsciiString ( const QString &  src)
static
Parameters
srcQt string
Returns
OCC ASCII string
TCollection_AsciiString QDS::toAsciiString ( const TCollection_ExtendedString &  src)
static
Parameters
srcOCC Unicode string
Returns
OCC ASCII string
TCollection_AsciiString QDS::toAsciiString ( const Handle(TCollection_HExtendedString)&  src)
static
Parameters
srchandle to OCC Unicode string
Returns
OCC ASCII string

References toAsciiString().

TCollection_ExtendedString QDS::toExtString ( const QString &  src)
static
Parameters
srcQt string
Returns
OCC Unicode string
TCollection_ExtendedString QDS::toExtString ( const TCollection_AsciiString &  src)
static
Parameters
srcOCC ASCII string
Returns
OCC Unicode string
QString QDS::toQString ( const TCollection_AsciiString &  src)
static
Parameters
srcOCC ASCII string
Returns
Qt string
QString QDS::toQString ( const TCollection_ExtendedString &  src)
static
Parameters
srcOCC Unicode string
Returns
Qt string

References toQString().

QString QDS::toQString ( const Handle(TCollection_HAsciiString)&  src)
static
Parameters
srchandle to OCC ASCII string
Returns
Qt string

References toQString().

QString QDS::toQString ( const Handle(TCollection_HExtendedString)&  src)
static
Parameters
srchandle to OCC Unicode string
Returns
Qt string

References toQString().

QString QDS::unitSystemLabel ( const QString &  sys,
const QString &  comp = QString() 
)
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.

Parameters
sysunit system
compcomponent
Returns
unit system lavel or empty string if unit system is not found

References Handle(), toAsciiString(), and toQString().

Member Data Documentation

QList< QDS_Datum * > QDS::_datumList
staticprivate

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