1 // Copyright (C) 2005 CEA/DEN, EDF R&D, OPEN CASCADE, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 #define QDS_EXPORT __declspec(dllexport)
26 #define QDS_EXPORT __declspec(dllimport)
33 #pragma warning ( disable:4251 )
34 #pragma warning ( disable:4786 )
38 #include <qvaluelist.h>
40 #include <TCollection_AsciiString.hxx>
42 #include <TCollection_ExtendedString.hxx>
45 class Handle(TCollection_HAsciiString);
46 class Handle(TCollection_HExtendedString);
51 /*! Enum describes bit flags of the Qt datum view and behaviour */
54 None = 0x00, //!< Non specified any flags (Default behaviour)
55 Label = 0x01, //!< Create subwidget for datum label
56 Control = 0x02, //!< Create subwidget for datum input control
57 Units = 0x04, //!< Create subwidget for datum units of measure
58 NotFormat = 0x08, //!< Don't format initial value
59 NotAccel = 0x10, //!< Not support accelerators in datum label
60 UnitsWithLabel = 0x20, //!< Display units of measure in label like "<label_text> (<units_text>) instead separate text"
61 All = Label | Control | Units //!< Create all subwidgets
65 static bool load( const QString& );
67 static QString unitSystemLabel( const QString&,
68 const QString& = QString::null );
69 static QString activeUnitSystem( const QString& = QString::null );
70 static void setActiveUnitSystem( const QString&,
71 const QString& = QString::null );
73 static QString toQString( const TCollection_AsciiString& );
74 static QString toQString( const TCollection_ExtendedString& );
75 static QString toQString( const Handle(TCollection_HAsciiString)& );
76 static QString toQString( const Handle(TCollection_HExtendedString)& );
78 static TCollection_AsciiString toAsciiString( const QString& );
79 static TCollection_AsciiString toAsciiString( const TCollection_ExtendedString& );
80 static TCollection_AsciiString toAsciiString( const Handle(TCollection_HExtendedString)& );
82 static TCollection_ExtendedString toExtString( const QString& );
83 static TCollection_ExtendedString toExtString( const TCollection_AsciiString& );
86 static void insertDatum( QDS_Datum* );
87 static void removeDatum( QDS_Datum* );
90 static QValueList<QDS_Datum*> _datumList;