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/ or email : webmaster.salome@opencascade.com
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
82 template <class> class QValueList;
85 #define QPtrList QList
86 #define QPtrListIterator QListIterator
89 typedef QValueList<int> QIntList;
90 typedef QValueList<short> QShortList;
91 typedef QValueList<double> QDoubleList;
95 \brief Set of auxiliary static methods
97 class QTX_EXPORT Qtx : public Qt
102 AlignOutLeft = AlignVCenter << 2,
103 AlignOutRight = AlignOutLeft << 2,
104 AlignOutTop = AlignOutRight << 2,
105 AlignOutBottom = AlignOutTop << 2
108 static void setTabOrder( QWidget*, ... );
109 static void setTabOrder( const QWidgetList& );
110 static void alignWidget( QWidget*, const QWidget*, const int );
112 static void simplifySeparators( QToolBar* );
113 static void simplifySeparators( QPopupMenu*, const bool = true );
115 static bool isParent( QObject*, QObject* );
117 static QString extension( const QString& );
118 static QString dir( const QString&, const bool = true );
119 static QString file( const QString&, const bool = true );
121 static QString library( const QString& );
123 static QString tmpDir();
124 static bool mkDir( const QString& );
125 static bool rmDir( const QString& );
126 static bool dos2unix( const QString& );
127 static QString addSlash( const QString& );
129 static int rgbSet( const QColor& );
130 static int rgbSet( const int, const int, const int );
132 static void rgbSet( const int, QColor& );
133 static void rgbSet( const int, int&, int&, int& );
135 static QColor scaleColor( const int, const int, const int );
136 static void scaleColors( const int, QValueList<QColor>& );
138 static QImage grayscale( const QImage& );
139 static QPixmap grayscale( const QPixmap& );
140 static QImage transparentImage( const int, const int, const int = -1 );
141 static QPixmap transparentPixmap( const int, const int, const int = -1 );
142 static QPixmap composite( const QPixmap&, const int, const int, const QPixmap& = QPixmap() );