1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, 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/
20 // Author: Sergey TELKOV
25 #if defined QTX_EXPORTS
27 #define QTX_EXPORT _declspec( dllexport )
33 #define QTX_EXPORT _declspec( dllimport )
45 #ifndef INCLUDE_MENUITEM_DEF
46 #define INCLUDE_MENUITEM_DEF
49 #include <qnamespace.h>
54 #if QT_VERSION >= 0x30000
79 template <class> class QValueList;
82 #define QPtrList QList
83 #define QPtrListIterator QListIterator
86 typedef QValueList<int> QIntList;
87 typedef QValueList<short> QShortList;
88 typedef QValueList<double> QDoubleList;
90 class QTX_EXPORT Qtx : public Qt
95 AlignOutLeft = AlignVCenter << 2,
96 AlignOutRight = AlignOutLeft << 2,
97 AlignOutTop = AlignOutRight << 2,
98 AlignOutBottom = AlignOutTop << 2
101 static void setTabOrder( QWidget*, ... );
102 static void setTabOrder( const QWidgetList& );
103 static void alignWidget( QWidget*, const QWidget*, const int );
105 static void simplifySeparators( QToolBar* );
106 static void simplifySeparators( QPopupMenu*, const bool = true );
108 static bool isParent( QObject*, QObject* );
110 static QString extension( const QString& );
111 static QString dir( const QString&, const bool = true );
112 static QString file( const QString&, const bool = true );
114 static QString library( const QString& );
116 static QString tmpDir();
117 static bool mkDir( const QString& );
118 static bool rmDir( const QString& );
119 static bool dos2unix( const QString& );
120 static QString addSlash( const QString& );
122 static int rgbSet( const QColor& );
123 static int rgbSet( const int, const int, const int );
125 static void rgbSet( const int, QColor& );
126 static void rgbSet( const int, int&, int&, int& );
128 static QColor scaleColor( const int, const int, const int );
129 static void scaleColors( const int, QValueList<QColor>& );