1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
27 #if defined QDS_EXPORTS
28 #define QDS_EXPORT __declspec(dllexport)
30 #define QDS_EXPORT __declspec(dllimport)
37 #pragma warning ( disable:4251 )
38 #pragma warning ( disable:4786 )
44 #include <TCollection_HExtendedString.hxx>
45 #include <TCollection_HAsciiString.hxx>
53 //! Enum describes bit flags of the Qt datum view and behaviour
56 None = 0x00, //!< Non specified any flags (Default behaviour)
57 Label = 0x01, //!< Create subwidget for datum label
58 Control = 0x02, //!< Create subwidget for datum input control
59 Units = 0x04, //!< Create subwidget for datum units of measure
60 NotFormat = 0x08, //!< Don't format initial value
61 NotAccel = 0x10, //!< Not support accelerators in datum label
62 NotConvert = 0x20, //!< Don't convert numeric value
63 UnitsWithLabel = 0x40, //!< Display units of measure in label like "<label_text> (<units_text>) instead separate text"
64 All = Label | Control | Units //!< Create all subwidgets
68 static bool load( const QString& );
70 static QString unitSystemLabel( const QString&,
71 const QString& = QString() );
72 static QString activeUnitSystem( const QString& = QString() );
73 static void setActiveUnitSystem( const QString&,
74 const QString& = QString() );
76 static QString toQString( const TCollection_AsciiString& );
77 static QString toQString( const TCollection_ExtendedString& );
78 static QString toQString( const Handle(TCollection_HAsciiString)& );
79 static QString toQString( const Handle(TCollection_HExtendedString)& );
81 static TCollection_AsciiString toAsciiString( const QString& );
82 static TCollection_AsciiString toAsciiString( const TCollection_ExtendedString& );
83 static TCollection_AsciiString toAsciiString( const Handle(TCollection_HExtendedString)& );
85 static TCollection_ExtendedString toExtString( const QString& );
86 static TCollection_ExtendedString toExtString( const TCollection_AsciiString& );
89 static void insertDatum( QDS_Datum* );
90 static void removeDatum( QDS_Datum* );
93 static QList<QDS_Datum*> _datumList;