summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-06 19:46:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-06 19:46:53 +0000
commit0630a9067e5db373c6fd33bbe8145e29f18e9a54 (patch)
treeaad17078eced96ff4bd82e7d519cba81ad8ebd65
parent6adef930fe704aa9ccf619c49d996c8185bb11bb (diff)
downloadtqtinterface-0630a9067e5db373c6fd33bbe8145e29f18e9a54.tar.gz
tqtinterface-0630a9067e5db373c6fd33bbe8145e29f18e9a54.zip
Additional Qt4 support...
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface@1160009 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rwxr-xr-xqtinterface/convert_qt_tqt21
-rw-r--r--qtinterface/qt4/QtGui/private/qpixmapdata_p.h169
-rw-r--r--qtinterface/tqcstring.cpp25
-rw-r--r--qtinterface/tqglist.h4
-rw-r--r--qtinterface/tqmenudata.cpp9
-rw-r--r--qtinterface/tqpainter.cpp4
-rw-r--r--qtinterface/tqpixmap.cpp17
-rw-r--r--qtinterface/tqpopupmenu.h1
-rw-r--r--qtinterface/tqstring.cpp8
-rw-r--r--qtinterface/tqstyle.cpp8
-rw-r--r--qtinterface/tqstyle.h24
-rw-r--r--qtinterface/tqt.h66
-rw-r--r--qtinterface/tqt4/Qt/q3cstring.h3
-rw-r--r--qtinterface/tqt4/Qt/q3painter.h1
-rw-r--r--qtinterface/tqt4/Qt/qbytearray.h2
-rw-r--r--qtinterface/tqt4/Qt/qmenudata.h83
-rw-r--r--qtinterface/tqt4/Qt/qobject.h3
-rw-r--r--qtinterface/tqt4/Qt/qpixmap.h2
-rw-r--r--qtinterface/tqt4/Qt/qstyle.h894
-rw-r--r--qtinterface/tqwindowdefs.h2
20 files changed, 1279 insertions, 47 deletions
diff --git a/qtinterface/convert_qt_tqt2 b/qtinterface/convert_qt_tqt2
index 0aa0c3b..81e60f5 100755
--- a/qtinterface/convert_qt_tqt2
+++ b/qtinterface/convert_qt_tqt2
@@ -995,6 +995,7 @@ find ./ -type f -iname "*.c*" -exec sed -i 's/access != QMetaData::/tqaccess !=
find ./ -type f -iname "*.c*" -exec sed -i 's/colorTable()/ptrColorTable()/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/QStyleOption::Default/QStyleOption::TQSO_Default/g' {} \;
find ./ -type f -iname "*.c*" -exec sed -i 's/::qt_cast/tqqt_cast/g' {} \;
+find ./ -type f -iname "*.c*" -exec sed -i 's/mask()/tqmask()/g' {} \;
# Back out some common mistakes
find ./ -type f -iname "*.c*" -exec sed -i 's/\([_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]\)TQ/\1Q/g' {} \;
diff --git a/qtinterface/qt4/QtGui/private/qpixmapdata_p.h b/qtinterface/qt4/QtGui/private/qpixmapdata_p.h
new file mode 100644
index 0000000..77173b0
--- /dev/null
+++ b/qtinterface/qt4/QtGui/private/qpixmapdata_p.h
@@ -0,0 +1,169 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QPIXMAPDATA_P_H
+#define QPIXMAPDATA_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtGui/qpixmap.h>
+#include <QtCore/qatomic.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_GUI_EXPORT QPixmapData
+{
+public:
+ enum PixelType {
+ // WARNING: Do not change the first two
+ // Must match QPixmap::Type
+ PixmapType, BitmapType
+ };
+#if defined(Q_OS_SYMBIAN)
+ enum NativeType {
+ FbsBitmap,
+ SgImage
+ };
+#endif
+ enum ClassId { RasterClass, X11Class, MacClass, DirectFBClass,
+ OpenGLClass, OpenVGClass, CustomClass = 1024 };
+
+ QPixmapData(PixelType pixelType, int classId);
+ virtual ~QPixmapData();
+
+ virtual QPixmapData *createCompatiblePixmapData() const;
+
+ virtual void resize(int width, int height) = 0;
+ virtual void fromImage(const QImage &image,
+ Qt::ImageConversionFlags flags) = 0;
+
+ virtual bool fromFile(const QString &filename, const char *format,
+ Qt::ImageConversionFlags flags);
+ virtual bool fromData(const uchar *buffer, uint len, const char *format,
+ Qt::ImageConversionFlags flags);
+
+ virtual void copy(const QPixmapData *data, const QRect &rect);
+ virtual bool scroll(int dx, int dy, const QRect &rect);
+
+ virtual int metric(QPaintDevice::PaintDeviceMetric metric) const = 0;
+ virtual void fill(const QColor &color) = 0;
+ virtual QBitmap mask() const;
+ virtual void setMask(const QBitmap &mask);
+ virtual bool hasAlphaChannel() const = 0;
+ virtual QPixmap transformed(const QTransform &matrix,
+ Qt::TransformationMode mode) const;
+ virtual void setAlphaChannel(const QPixmap &alphaChannel);
+ virtual QPixmap alphaChannel() const;
+ virtual QImage toImage() const = 0;
+ virtual QPaintEngine* paintEngine() const = 0;
+
+ inline int serialNumber() const { return ser_no; }
+
+ inline PixelType pixelType() const { return type; }
+ inline ClassId classId() const { return static_cast<ClassId>(id); }
+
+ virtual QImage* buffer();
+
+ inline int width() const { return w; }
+ inline int height() const { return h; }
+ QT_DEPRECATED inline int numColors() const { return metric(QPaintDevice::PdmNumColors); }
+ inline int colorCount() const { return metric(QPaintDevice::PdmNumColors); }
+ inline int depth() const { return d; }
+ inline bool isNull() const { return is_null; }
+ inline qint64 cacheKey() const {
+ int classKey = id;
+ if (classKey >= 1024)
+ classKey = -(classKey >> 10);
+ return ((((qint64) classKey) << 56)
+ | (((qint64) ser_no) << 32)
+ | ((qint64) detach_no));
+ }
+
+#if defined(Q_OS_SYMBIAN)
+ virtual void* toNativeType(NativeType type);
+ virtual void fromNativeType(void* pixmap, NativeType type);
+#endif
+
+ static QPixmapData *create(int w, int h, PixelType type);
+
+protected:
+ void setSerialNumber(int serNo);
+ int w;
+ int h;
+ int d;
+ bool is_null;
+
+private:
+ friend class QPixmap;
+ friend class QX11PixmapData;
+ friend class QS60PixmapData;
+ friend class QImagePixmapCleanupHooks; // Needs to set is_cached
+ friend class QGLTextureCache; //Needs to check the reference count
+ friend class QExplicitlySharedDataPointer<QPixmapData>;
+
+ QAtomicInt ref;
+ int detach_no;
+
+ PixelType type;
+ int id;
+ int ser_no;
+ uint is_cached;
+};
+
+# define QT_XFORM_TYPE_MSBFIRST 0
+# define QT_XFORM_TYPE_LSBFIRST 1
+# if defined(Q_WS_WIN)
+# define QT_XFORM_TYPE_WINDOWSPIXMAP 2
+# endif
+extern bool qt_xForm_helper(const QTransform&, int, int, int, uchar*, int, int, int, const uchar*, int, int, int);
+
+QT_END_NAMESPACE
+
+#endif // QPIXMAPDATA_P_H
diff --git a/qtinterface/tqcstring.cpp b/qtinterface/tqcstring.cpp
index 32b9609..0ab1487 100644
--- a/qtinterface/tqcstring.cpp
+++ b/qtinterface/tqcstring.cpp
@@ -27,4 +27,29 @@ Boston, MA 02110-1301, USA.
QByteArray::operator QByteArray *() const
{ return (QByteArray*)(d->data); }
+#ifndef QT_NO_REGEXP
+
+int Q3CString::contains( const QRegExp &rx ) const
+{
+ QString d = QString::fromAscii( data() );
+ return d.count( rx );
+}
+
+Q3CString &Q3CString::replace( const QRegExp &rx, const char *str )
+{
+ QString d = QString::fromAscii( data() );
+ QString r = QString::fromAscii( str );
+ d.replace( rx, r );
+ setStr( d.ascii() );
+ return *this;
+}
+
+#endif //QT_NO_REGEXP
+
+QByteArray QByteArray::copy() const {
+ QByteArray copy(*this);
+ copy.detach();
+ return copy;
+}
+
#endif // USE_QT4 \ No newline at end of file
diff --git a/qtinterface/tqglist.h b/qtinterface/tqglist.h
index 4b75c9f..6187874 100644
--- a/qtinterface/tqglist.h
+++ b/qtinterface/tqglist.h
@@ -36,7 +36,9 @@ Boston, MA 02110-1301, USA.
#ifdef USE_QT4
// Reimplement the QGList class
-// For Qt4, this class was removed!
+// For Qt4, some changes are needed
+
+#include <Qt/q3glist.h>
#endif // USE_QT4
diff --git a/qtinterface/tqmenudata.cpp b/qtinterface/tqmenudata.cpp
index 2b11965..625c54d 100644
--- a/qtinterface/tqmenudata.cpp
+++ b/qtinterface/tqmenudata.cpp
@@ -21,3 +21,12 @@ Boston, MA 02110-1301, USA.
#include <tqt.h>
#include <tqmenudata.h>
+
+#ifdef USE_QT4
+
+Q3PopupMenu *QMenuItem::popup() const {
+ #warning "Badly broken/nonfunctional QMenuItem::popup() implementation!"
+ return &Q3PopupMenu(menu());
+}
+
+#endif // USE_QT4 \ No newline at end of file
diff --git a/qtinterface/tqpainter.cpp b/qtinterface/tqpainter.cpp
index c1281a1..26a5ba9 100644
--- a/qtinterface/tqpainter.cpp
+++ b/qtinterface/tqpainter.cpp
@@ -29,4 +29,8 @@ void Q3Painter::setRasterOp( Qt::RasterOp ) {
#warning "setRasterOp is unimplemented!"
}
+Q3Painter::Q3Painter( const QPaintDevice * pdev, bool unclipped ) : QPainter(const_cast<QPaintDevice *>(pdev)) {
+ setClipping(!unclipped);
+}
+
#endif // USE_QT4 \ No newline at end of file
diff --git a/qtinterface/tqpixmap.cpp b/qtinterface/tqpixmap.cpp
index 06dd536..1140a39 100644
--- a/qtinterface/tqpixmap.cpp
+++ b/qtinterface/tqpixmap.cpp
@@ -24,6 +24,9 @@ Boston, MA 02110-1301, USA.
#ifdef USE_QT4
+#include <Qt/qbitmap.h>
+#include <qt4/QtGui/private/qpixmapdata_p.h>
+
bool QPixmap::convertFromImage(const QImage &img, int flags) {
return convertFromImage(img, (Qt::ImageConversionFlags)flags);
}
@@ -37,13 +40,23 @@ void QPixmap::setOptimization( QPixmap::Optimization ) {
#warning "QPixmap::setOptimization unimplemented!"
}
-static QPixmap::Optimization defaultOptimization() {
+QPixmap::Optimization defaultOptimization() {
#warning "QPixmap::Optimization unimplemented!"
return QPixmap::NormalOptim;
}
-static void setDefaultOptimization( QPixmap::Optimization ) {
+void QPixmap::setDefaultOptimization( QPixmap::Optimization ) {
#warning "QPixmap::setDefaultOptimization unimplemented!"
}
+QPixmap::QPixmap( int w, int h, int depth, Optimization optim ) {
+ QPixmap(w, h);
+}
+
+const QBitmap *QPixmap::ptrmask() const {
+ QBitmap pm = mask();
+ QBitmap *pr = &pm;
+ return pr;
+}
+
#endif // USE_QT4 \ No newline at end of file
diff --git a/qtinterface/tqpopupmenu.h b/qtinterface/tqpopupmenu.h
index 8514556..abfcf19 100644
--- a/qtinterface/tqpopupmenu.h
+++ b/qtinterface/tqpopupmenu.h
@@ -39,6 +39,7 @@ Boston, MA 02110-1301, USA.
// For Qt4, some changes are needed
#include <Qt/q3popupmenu.h>
+#include <tqt4/Qt/qmenudata.h>
#endif // USE_QT4
diff --git a/qtinterface/tqstring.cpp b/qtinterface/tqstring.cpp
index 3ab8d5b..5062dc1 100644
--- a/qtinterface/tqstring.cpp
+++ b/qtinterface/tqstring.cpp
@@ -26,14 +26,6 @@ Boston, MA 02110-1301, USA.
#ifdef USE_QT4
-#ifndef QT_NO_REGEXP
-int Q3CString::contains( const QRegExp &rx ) const
-{
- QString d = QString::fromAscii( data() );
- return d.count( rx );
-}
-#endif
-
int Q3CString::contains( const char *a ) const
{
QString d = QString::fromAscii( data() );
diff --git a/qtinterface/tqstyle.cpp b/qtinterface/tqstyle.cpp
index 712a9d8..d8e9c0a 100644
--- a/qtinterface/tqstyle.cpp
+++ b/qtinterface/tqstyle.cpp
@@ -24,9 +24,13 @@ Boston, MA 02110-1301, USA.
#ifdef USE_QT4
-TQStyle::TQStyle() : QStyle(), def(TRUE) {}
+// TQStyle::TQStyle() : QStyle(), def(TRUE) {}
-bool TQStyle::isDefault() const {
+// bool TQStyle::isDefault() const {
+// return def;
+// }
+
+bool QStyle::isDefault() const {
return def;
}
diff --git a/qtinterface/tqstyle.h b/qtinterface/tqstyle.h
index 921f278..a881835 100644
--- a/qtinterface/tqstyle.h
+++ b/qtinterface/tqstyle.h
@@ -38,21 +38,21 @@ Boston, MA 02110-1301, USA.
// Reimplement the QStyle class
// For Qt4, some changes are needed
-#include <Qt/qstyle.h>
+#include <tqt4/Qt/qstyle.h>
#include <Qt/q3listview.h>
#include <tqt4/Qt/qstyleoption.h>
-class TQStyle : public QStyle {
-public:
- typedef QStyle::StateFlag StyleFlags;
- TQStyle();
- virtual ~TQStyle() {};
-
- bool isDefault() const;
-
-private:
- bool def;
-};
+// class TQStyle : public QStyle {
+// public:
+// typedef QStyle::StateFlag StyleFlags;
+// TQStyle();
+// virtual ~TQStyle() {};
+//
+// bool isDefault() const;
+//
+// private:
+// bool def;
+// };
#endif // USE_QT4
diff --git a/qtinterface/tqt.h b/qtinterface/tqt.h
index 9971813..0533d74 100644
--- a/qtinterface/tqt.h
+++ b/qtinterface/tqt.h
@@ -48,14 +48,23 @@ Boston, MA 02110-1301, USA.
#endif // __cplusplus
#ifdef USE_QT3
-#define tqchildren children
-#define tqaccess access
-#define tqcolorTable colorTable
-#define TQSO_Default Default
-#define tqqt_cast ::qt_cast
-#define TQ_Horizontal Horizontal
-#define TQ_Vertical Vertical
-#define TQImage_ScaleFree QImage::ScaleFree
+#define tqchildren children
+#define tqaccess access
+#define tqcolorTable colorTable
+#define tqmask mask
+#define TQSO_Default Default
+#define tqqt_cast ::qt_cast
+#define TQ_Horizontal Horizontal
+#define TQ_Vertical Vertical
+#define TQImage_ScaleFree QImage::ScaleFree
+#define TQ_Key_Shift Key_Shift
+#define TQ_Key_Control Key_Control
+#define TQ_Key_Alt Key_Alt
+#define TQ_Key_Meta Key_Meta
+#define TQ_Key_Super_L Key_Super_L
+#define TQ_Key_Super_R Key_Super_R
+#define TQ_Key_Hyper_L Key_Hyper_L
+#define TQ_Key_Hyper_R Key_Hyper_R
#define TQAlignCenter AlignCenter
#define TQNoBrush NoBrush
@@ -73,10 +82,12 @@ Boston, MA 02110-1301, USA.
#define tqdarkMagenta darkMagenta
#define tqdarkYellow darkYellow
#define tqwhite white
+#define tqwhiteptr &white
#define tqlightGray lightGray
#define tqgray gray
#define tqdarkGray darkGray
#define tqblack black
+#define tqblackptr &black
#define tqcolor0 color0
#define tqcolor1 color1
@@ -588,6 +599,7 @@ class QUObject;
#include <tqt4/Qt/qpixmap.h>
#include <tqt4/Qt/qwidget.h>
#include <tqt4/Qt/q3painter.h>
+#include <tqt4/Qt/qstyle.h>
#include <tqt4/Qt/qstyleoption.h>
#include <tqt4/Qt/qcommonstyle.h>
#include <tqt4/Qt/qapplication.h>
@@ -596,6 +608,7 @@ class QUObject;
#include <tqt4/Qt/qslider.h>
#include <tqt4/Qt/qscrollbar.h>
#include <tqt4/Qt/qfileinfo.h>
+#include <tqt4/Qt/qmenudata.h>
#include <Qt/q3strlist.h>
#include <Qt/qx11info_x11.h>
@@ -606,19 +619,29 @@ class QUObject;
#include <Qt/q3textstream.h>
#include <Qt/q3valuelist.h>
#include <Qt/q3url.h>
+#include <Qt/qdesktopwidget.h>
#include <Qt/qevent.h>
#include <tqlistiterator.h>
#endif // __cplusplus
-#define tqchildren ptrchildren
-#define tqaccess access()
-#define tqcolorTable ptrColorTable
-#define TQSO_Default SO_Default
-#define tqqt_cast qobject_cast
-#define TQ_Horizontal Qt::Horizontal
-#define TQ_Vertical Qt::Vertical
-#define TQImage_ScaleFree Qt::ScaleFree
+#define tqchildren ptrchildren
+#define tqaccess access()
+#define tqcolorTable ptrColorTable
+#define tqmask ptrmask
+#define TQSO_Default SO_Default
+#define tqqt_cast qobject_cast
+#define TQ_Horizontal Qt::Horizontal
+#define TQ_Vertical Qt::Vertical
+#define TQImage_ScaleFree Qt::ScaleFree
+#define TQ_Key_Shift Qt::Key_Shift
+#define TQ_Key_Control Qt::Key_Control
+#define TQ_Key_Alt Qt::Key_Alt
+#define TQ_Key_Meta Qt::Key_Meta
+#define TQ_Key_Super_L Qt::Key_Super_L
+#define TQ_Key_Super_R Qt::Key_Super_R
+#define TQ_Key_Hyper_L Qt::Key_Hyper_L
+#define TQ_Key_Hyper_R Qt::Key_Hyper_R
#define TQAlignCenter Qt::AlignCenter
#define TQNoBrush Qt::NoBrush
@@ -646,10 +669,12 @@ class QUObject;
#define tqdarkMagenta Qt::darkMagenta
#define tqdarkYellow Qt::darkYellow
#define tqwhite Qt::white
+#define tqwhiteptr &((QColor)Qt::white)
#define tqlightGray Qt::lightGray
#define tqgray Qt::gray
#define tqdarkGray Qt::darkGray
#define tqblack Qt::black
+#define tqblackptr &((QColor)Qt::black)
#define tqcolor0 Qt::color0
#define tqcolor1 Qt::color1
@@ -741,6 +766,7 @@ class QUObject;
#define WState Qt::WidgetAttribute
#define WState_Polished Qt::WA_WState_Polished
+#define WState_ForceHide Qt::WA_WState_ForceHide
#define WStyle_Customize Qt::WStyle_Customize
#define WType_Popup Qt::WType_Popup
@@ -949,9 +975,9 @@ class QUObject;
#define TQGLContext QGLContext
#define TQGLWidget QGLWidget
#define TQLNode QLNode
-#define TQGList QGList
-#define TQGListIterator QGListIterator
-#define TQGListStdIterator QGListStdIterator
+#define TQGList Q3GList
+#define TQGListIterator Q3GListIterator
+#define TQGListStdIterator Q3GListStdIterator
#define TQGPlugin QGPlugin
#define TQGrid Q3Grid
#define TQGridView Q3GridView
@@ -1149,7 +1175,7 @@ class QUObject;
#define TQStrIVec QStrIVec
#define TQStyleFactory QStyleFactory
#define TQStyleOption QStyleOption
-//#define TQStyle QStyle
+#define TQStyle QStyle
#define TQStyleHintReturn QStyleHintReturn
#define TQStylePlugin QStylePlugin
#define TQStyleSheetItem Q3StyleSheetItem
diff --git a/qtinterface/tqt4/Qt/q3cstring.h b/qtinterface/tqt4/Qt/q3cstring.h
index 240ff8e..615e0e7 100644
--- a/qtinterface/tqt4/Qt/q3cstring.h
+++ b/qtinterface/tqt4/Qt/q3cstring.h
@@ -99,6 +99,9 @@ public:
Q3CString &remove(uint index, uint len) { QByteArray::remove(index, len); return *this; }
Q3CString &replace(uint index, uint len, const char *c)
{ QByteArray::replace(index, len, c); return *this; }
+#ifndef QT_NO_REGEXP
+ Q3CString &replace( const QRegExp &, const char * );
+#endif
Q3CString &replace(char c, const Q3CString &after) { return replace(c, after.constData()); }
Q3CString &replace(char c, const char *after) { QByteArray::replace(c, after); return *this; }
Q3CString &replace(const Q3CString &b, const Q3CString &a)
diff --git a/qtinterface/tqt4/Qt/q3painter.h b/qtinterface/tqt4/Qt/q3painter.h
index 30fa445..aed5726 100644
--- a/qtinterface/tqt4/Qt/q3painter.h
+++ b/qtinterface/tqt4/Qt/q3painter.h
@@ -55,6 +55,7 @@ class Q_COMPAT_EXPORT Q3Painter : public QPainter
public:
Q3Painter() : QPainter() { }
Q3Painter(QPaintDevice *pdev) : QPainter(pdev) { }
+ Q3Painter( const QPaintDevice *, bool unclipped );
inline void drawRect(const QRect &rect);
inline void drawRect(int x1, int y1, int w, int h)
diff --git a/qtinterface/tqt4/Qt/qbytearray.h b/qtinterface/tqt4/Qt/qbytearray.h
index fbe0582..9ee2be3 100644
--- a/qtinterface/tqt4/Qt/qbytearray.h
+++ b/qtinterface/tqt4/Qt/qbytearray.h
@@ -223,6 +223,8 @@ public:
{ return rightJustified(int(width), aFill, aTruncate); }
#endif
+ QByteArray copy() const;
+
QByteArray &prepend(char c);
QByteArray &prepend(const char *s);
QByteArray &prepend(const char *s, int len);
diff --git a/qtinterface/tqt4/Qt/qmenudata.h b/qtinterface/tqt4/Qt/qmenudata.h
new file mode 100644
index 0000000..c66a365
--- /dev/null
+++ b/qtinterface/tqt4/Qt/qmenudata.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMENUDATA_H
+#define QMENUDATA_H
+
+#include <QtCore/qglobal.h>
+
+#ifdef QT3_SUPPORT
+#include <QtGui/qaction.h>
+#include <Qt/q3popupmenu.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class Q_GUI_EXPORT QMenuItem : public QAction
+{
+ Q_OBJECT
+
+public:
+ QMenuItem();
+
+ QT3_SUPPORT int id() const;
+ QT3_SUPPORT int signalValue() const;
+
+ Q3PopupMenu *popup() const;
+private:
+ friend class QMenu;
+ friend class QMenuBar;
+ void setId(int);
+ void setSignalValue(int);
+
+ Q_DISABLE_COPY(QMenuItem)
+};
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
+
+#endif // QMENUDATA_H
diff --git a/qtinterface/tqt4/Qt/qobject.h b/qtinterface/tqt4/Qt/qobject.h
index 9da8eab..918054d 100644
--- a/qtinterface/tqt4/Qt/qobject.h
+++ b/qtinterface/tqt4/Qt/qobject.h
@@ -295,9 +295,10 @@ protected:
protected:
QObject(QObjectPrivate &dd, QObject *parent = 0);
-protected:
+public:
QScopedPointer<QObjectData> d_ptr;
+protected:
static const QMetaObject staticQtMetaObject;
friend struct QMetaObject;
diff --git a/qtinterface/tqt4/Qt/qpixmap.h b/qtinterface/tqt4/Qt/qpixmap.h
index dc465a3..db2eda4 100644
--- a/qtinterface/tqt4/Qt/qpixmap.h
+++ b/qtinterface/tqt4/Qt/qpixmap.h
@@ -100,6 +100,7 @@ public:
inline void fill(const QWidget *widget, int xofs, int yofs) { fill(widget, QPoint(xofs, yofs)); }
QBitmap mask() const;
+ const QBitmap *ptrmask() const;
void setMask(const QBitmap &);
QPixmap alphaChannel() const;
@@ -237,6 +238,7 @@ public:
inline QT3_SUPPORT void resize(int width, int height) { resize_helper(QSize(width, height)); }
enum Optimization { DefaultOptim, NoOptim, MemoryOptim=NoOptim,
NormalOptim, BestOptim };
+ QPixmap( int w, int h, int depth, Optimization = DefaultOptim );
static Optimization defOptim;
Optimization optimization() const;
void setOptimization( Optimization );
diff --git a/qtinterface/tqt4/Qt/qstyle.h b/qtinterface/tqt4/Qt/qstyle.h
new file mode 100644
index 0000000..d454c7e
--- /dev/null
+++ b/qtinterface/tqt4/Qt/qstyle.h
@@ -0,0 +1,894 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QSTYLE_H
+#define QSTYLE_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qrect.h>
+#include <QtCore/qsize.h>
+#include <QtGui/qicon.h>
+#include <QtGui/qpixmap.h>
+#include <QtGui/qpalette.h>
+#include <QtGui/qsizepolicy.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Gui)
+
+class QAction;
+class QDebug;
+class QTab;
+class QFontMetrics;
+class QStyleHintReturn;
+class QStyleOption;
+class QStyleOptionComplex;
+class QStylePrivate;
+
+class Q_GUI_EXPORT QStyle : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(QStyle)
+
+protected:
+ QStyle(QStylePrivate &dd);
+
+private:
+ bool def;
+
+public:
+ QStyle();
+ virtual ~QStyle();
+
+ virtual void polish(QWidget *);
+ virtual void unpolish(QWidget *);
+
+ virtual void polish(QApplication *);
+ virtual void unpolish(QApplication *);
+
+ virtual void polish(QPalette &);
+
+ virtual QRect itemTextRect(const QFontMetrics &fm, const QRect &r,
+ int flags, bool enabled,
+ const QString &text) const;
+
+ virtual QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const;
+
+ virtual void drawItemText(QPainter *painter, const QRect &rect,
+ int flags, const QPalette &pal, bool enabled,
+ const QString &text, QPalette::ColorRole textRole = QPalette::NoRole) const;
+
+ virtual void drawItemPixmap(QPainter *painter, const QRect &rect,
+ int alignment, const QPixmap &pixmap) const;
+
+ virtual QPalette standardPalette() const;
+
+ enum StateFlag {
+ State_None = 0x00000000,
+#ifdef QT3_SUPPORT
+ State_Default = State_None,
+#endif
+ State_Enabled = 0x00000001,
+ State_Raised = 0x00000002,
+ State_Sunken = 0x00000004,
+ State_Off = 0x00000008,
+ State_NoChange = 0x00000010,
+ State_On = 0x00000020,
+ State_DownArrow = 0x00000040,
+ State_Horizontal = 0x00000080,
+ State_HasFocus = 0x00000100,
+ State_Top = 0x00000200,
+ State_Bottom = 0x00000400,
+ State_FocusAtBorder = 0x00000800,
+ State_AutoRaise = 0x00001000,
+ State_MouseOver = 0x00002000,
+ State_UpArrow = 0x00004000,
+ State_Selected = 0x00008000,
+ State_Active = 0x00010000,
+ State_Window = 0x00020000,
+ State_Open = 0x00040000,
+ State_Children = 0x00080000,
+ State_Item = 0x00100000,
+ State_Sibling = 0x00200000,
+ State_Editing = 0x00400000,
+ State_KeyboardFocusChange = 0x00800000,
+#ifdef QT_KEYPAD_NAVIGATION
+ State_HasEditFocus = 0x01000000,
+#endif
+ State_ReadOnly = 0x02000000,
+ State_Small = 0x04000000,
+ State_Mini = 0x08000000
+ };
+ Q_DECLARE_FLAGS(State, StateFlag)
+
+#ifdef QT3_SUPPORT
+ typedef State SFlags;
+#endif
+
+ typedef StateFlag StyleFlags;
+ typedef StateFlag StateFlags;
+ bool isDefault() const;
+
+ enum PrimitiveElement {
+ PE_Q3CheckListController,
+ PE_Q3CheckListExclusiveIndicator,
+ PE_Q3CheckListIndicator,
+ PE_Q3DockWindowSeparator,
+ PE_Q3Separator,
+
+ PE_Frame,
+ PE_FrameDefaultButton,
+ PE_FrameDockWidget,
+ PE_FrameFocusRect,
+ PE_FrameGroupBox,
+ PE_FrameLineEdit,
+ PE_FrameMenu,
+ PE_FrameStatusBar, // obsolete
+ PE_FrameStatusBarItem = PE_FrameStatusBar,
+ PE_FrameTabWidget,
+ PE_FrameWindow,
+ PE_FrameButtonBevel,
+ PE_FrameButtonTool,
+ PE_FrameTabBarBase,
+
+ PE_PanelButtonCommand,
+ PE_PanelButtonBevel,
+ PE_PanelButtonTool,
+ PE_PanelMenuBar,
+ PE_PanelToolBar,
+ PE_PanelLineEdit,
+
+ PE_IndicatorArrowDown,
+ PE_IndicatorArrowLeft,
+ PE_IndicatorArrowRight,
+ PE_IndicatorArrowUp,
+ PE_IndicatorBranch,
+ PE_IndicatorButtonDropDown,
+ PE_IndicatorViewItemCheck,
+ PE_IndicatorItemViewItemCheck = PE_IndicatorViewItemCheck,
+ PE_IndicatorCheckBox,
+ PE_IndicatorDockWidgetResizeHandle,
+ PE_IndicatorHeaderArrow,
+ PE_IndicatorMenuCheckMark,
+ PE_IndicatorProgressChunk,
+ PE_IndicatorRadioButton,
+ PE_IndicatorSpinDown,
+ PE_IndicatorSpinMinus,
+ PE_IndicatorSpinPlus,
+ PE_IndicatorSpinUp,
+ PE_IndicatorToolBarHandle,
+ PE_IndicatorToolBarSeparator,
+ PE_PanelTipLabel,
+ PE_IndicatorTabTear,
+ PE_PanelScrollAreaCorner,
+
+ PE_Widget,
+
+ PE_IndicatorColumnViewArrow,
+ PE_IndicatorItemViewItemDrop,
+
+ PE_PanelItemViewItem,
+ PE_PanelItemViewRow, // ### Qt 5: remove
+
+ PE_PanelStatusBar,
+
+ PE_IndicatorTabClose,
+ PE_PanelMenu,
+
+ // do not add any values below/greater this
+ PE_CustomBase = 0xf000000
+ };
+
+ virtual void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p,
+ const QWidget *w = 0) const = 0;
+ enum ControlElement {
+ CE_PushButton,
+ CE_PushButtonBevel,
+ CE_PushButtonLabel,
+
+ CE_CheckBox,
+ CE_CheckBoxLabel,
+
+ CE_RadioButton,
+ CE_RadioButtonLabel,
+
+ CE_TabBarTab,
+ CE_TabBarTabShape,
+ CE_TabBarTabLabel,
+
+ CE_ProgressBar,
+ CE_ProgressBarGroove,
+ CE_ProgressBarContents,
+ CE_ProgressBarLabel,
+
+ CE_MenuItem,
+ CE_MenuScroller,
+ CE_MenuVMargin,
+ CE_MenuHMargin,
+ CE_MenuTearoff,
+ CE_MenuEmptyArea,
+
+ CE_MenuBarItem,
+ CE_MenuBarEmptyArea,
+
+ CE_ToolButtonLabel,
+
+ CE_Header,
+ CE_HeaderSection,
+ CE_HeaderLabel,
+
+ CE_Q3DockWindowEmptyArea,
+ CE_ToolBoxTab,
+ CE_SizeGrip,
+ CE_Splitter,
+ CE_RubberBand,
+ CE_DockWidgetTitle,
+
+ CE_ScrollBarAddLine,
+ CE_ScrollBarSubLine,
+ CE_ScrollBarAddPage,
+ CE_ScrollBarSubPage,
+ CE_ScrollBarSlider,
+ CE_ScrollBarFirst,
+ CE_ScrollBarLast,
+
+ CE_FocusFrame,
+ CE_ComboBoxLabel,
+
+ CE_ToolBar,
+ CE_ToolBoxTabShape,
+ CE_ToolBoxTabLabel,
+ CE_HeaderEmptyArea,
+
+ CE_ColumnViewGrip,
+
+ CE_ItemViewItem,
+
+ CE_ShapedFrame,
+
+ // do not add any values below/greater than this
+ CE_CustomBase = 0xf0000000
+ };
+
+ virtual void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p,
+ const QWidget *w = 0) const = 0;
+
+ enum SubElement {
+ SE_PushButtonContents,
+ SE_PushButtonFocusRect,
+
+ SE_CheckBoxIndicator,
+ SE_CheckBoxContents,
+ SE_CheckBoxFocusRect,
+ SE_CheckBoxClickRect,
+
+ SE_RadioButtonIndicator,
+ SE_RadioButtonContents,
+ SE_RadioButtonFocusRect,
+ SE_RadioButtonClickRect,
+
+ SE_ComboBoxFocusRect,
+
+ SE_SliderFocusRect,
+
+ SE_Q3DockWindowHandleRect,
+
+ SE_ProgressBarGroove,
+ SE_ProgressBarContents,
+ SE_ProgressBarLabel,
+
+ // ### Qt 5: These values are unused; eliminate them
+ SE_DialogButtonAccept,
+ SE_DialogButtonReject,
+ SE_DialogButtonApply,
+ SE_DialogButtonHelp,
+ SE_DialogButtonAll,
+ SE_DialogButtonAbort,
+ SE_DialogButtonIgnore,
+ SE_DialogButtonRetry,
+ SE_DialogButtonCustom,
+
+ SE_ToolBoxTabContents,
+
+ SE_HeaderLabel,
+ SE_HeaderArrow,
+
+ SE_TabWidgetTabBar,
+ SE_TabWidgetTabPane,
+ SE_TabWidgetTabContents,
+ SE_TabWidgetLeftCorner,
+ SE_TabWidgetRightCorner,
+
+ SE_ViewItemCheckIndicator,
+ SE_ItemViewItemCheckIndicator = SE_ViewItemCheckIndicator,
+
+ SE_TabBarTearIndicator,
+
+ SE_TreeViewDisclosureItem,
+
+ SE_LineEditContents,
+ SE_FrameContents,
+
+ SE_DockWidgetCloseButton,
+ SE_DockWidgetFloatButton,
+ SE_DockWidgetTitleBarText,
+ SE_DockWidgetIcon,
+
+ SE_CheckBoxLayoutItem,
+ SE_ComboBoxLayoutItem,
+ SE_DateTimeEditLayoutItem,
+ SE_DialogButtonBoxLayoutItem, // ### remove
+ SE_LabelLayoutItem,
+ SE_ProgressBarLayoutItem,
+ SE_PushButtonLayoutItem,
+ SE_RadioButtonLayoutItem,
+ SE_SliderLayoutItem,
+ SE_SpinBoxLayoutItem,
+ SE_ToolButtonLayoutItem,
+
+ SE_FrameLayoutItem,
+ SE_GroupBoxLayoutItem,
+ SE_TabWidgetLayoutItem,
+
+ SE_ItemViewItemDecoration,
+ SE_ItemViewItemText,
+ SE_ItemViewItemFocusRect,
+
+ SE_TabBarTabLeftButton,
+ SE_TabBarTabRightButton,
+ SE_TabBarTabText,
+
+ SE_ShapedFrameContents,
+
+ SE_ToolBarHandle,
+
+ // do not add any values below/greater than this
+ SE_CustomBase = 0xf0000000
+ };
+
+ virtual QRect subElementRect(SubElement subElement, const QStyleOption *option,
+ const QWidget *widget = 0) const = 0;
+
+
+ enum ComplexControl {
+ CC_SpinBox,
+ CC_ComboBox,
+ CC_ScrollBar,
+ CC_Slider,
+ CC_ToolButton,
+ CC_TitleBar,
+ CC_Q3ListView,
+ CC_Dial,
+ CC_GroupBox,
+ CC_MdiControls,
+
+ // do not add any values below/greater than this
+ CC_CustomBase = 0xf0000000
+ };
+
+ enum SubControl {
+ SC_None = 0x00000000,
+
+ SC_ScrollBarAddLine = 0x00000001,
+ SC_ScrollBarSubLine = 0x00000002,
+ SC_ScrollBarAddPage = 0x00000004,
+ SC_ScrollBarSubPage = 0x00000008,
+ SC_ScrollBarFirst = 0x00000010,
+ SC_ScrollBarLast = 0x00000020,
+ SC_ScrollBarSlider = 0x00000040,
+ SC_ScrollBarGroove = 0x00000080,
+
+ SC_SpinBoxUp = 0x00000001,
+ SC_SpinBoxDown = 0x00000002,
+ SC_SpinBoxFrame = 0x00000004,
+ SC_SpinBoxEditField = 0x00000008,
+
+ SC_ComboBoxFrame = 0x00000001,
+ SC_ComboBoxEditField = 0x00000002,
+ SC_ComboBoxArrow = 0x00000004,
+ SC_ComboBoxListBoxPopup = 0x00000008,
+
+ SC_SliderGroove = 0x00000001,
+ SC_SliderHandle = 0x00000002,
+ SC_SliderTickmarks = 0x00000004,
+
+ SC_ToolButton = 0x00000001,
+ SC_ToolButtonMenu = 0x00000002,
+
+ SC_TitleBarSysMenu = 0x00000001,
+ SC_TitleBarMinButton = 0x00000002,
+ SC_TitleBarMaxButton = 0x00000004,
+ SC_TitleBarCloseButton = 0x00000008,
+ SC_TitleBarNormalButton = 0x00000010,
+ SC_TitleBarShadeButton = 0x00000020,
+ SC_TitleBarUnshadeButton = 0x00000040,
+ SC_TitleBarContextHelpButton = 0x00000080,
+ SC_TitleBarLabel = 0x00000100,
+
+ SC_Q3ListView = 0x00000001,
+ SC_Q3ListViewBranch = 0x00000002,
+ SC_Q3ListViewExpand = 0x00000004,
+
+ SC_DialGroove = 0x00000001,
+ SC_DialHandle = 0x00000002,
+ SC_DialTickmarks = 0x00000004,
+
+ SC_GroupBoxCheckBox = 0x00000001,
+ SC_GroupBoxLabel = 0x00000002,
+ SC_GroupBoxContents = 0x00000004,
+ SC_GroupBoxFrame = 0x00000008,
+
+ SC_MdiMinButton = 0x00000001,
+ SC_MdiNormalButton = 0x00000002,
+ SC_MdiCloseButton = 0x00000004,
+
+ SC_CustomBase = 0xf0000000,
+ SC_All = 0xffffffff
+ };
+ Q_DECLARE_FLAGS(SubControls, SubControl)
+
+#ifdef QT3_SUPPORT
+ typedef SubControls SCFlags;
+#endif
+
+ virtual void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p,
+ const QWidget *widget = 0) const = 0;
+ virtual SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt,
+ const QPoint &pt, const QWidget *widget = 0) const = 0;
+ virtual QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt,
+ SubControl sc, const QWidget *widget = 0) const = 0;
+
+ enum PixelMetric {
+ PM_ButtonMargin,
+ PM_ButtonDefaultIndicator,
+ PM_MenuButtonIndicator,
+ PM_ButtonShiftHorizontal,
+ PM_ButtonShiftVertical,
+
+ PM_DefaultFrameWidth,
+ PM_SpinBoxFrameWidth,
+ PM_ComboBoxFrameWidth,
+
+ PM_MaximumDragDistance,
+
+ PM_ScrollBarExtent,
+ PM_ScrollBarSliderMin,
+
+ PM_SliderThickness, // total slider thickness
+ PM_SliderControlThickness, // thickness of the business part
+ PM_SliderLength, // total length of slider
+ PM_SliderTickmarkOffset, //
+ PM_SliderSpaceAvailable, // available space for slider to move
+
+ PM_DockWidgetSeparatorExtent,
+ PM_DockWidgetHandleExtent,
+ PM_DockWidgetFrameWidth,
+
+ PM_TabBarTabOverlap,
+ PM_TabBarTabHSpace,
+ PM_TabBarTabVSpace,
+ PM_TabBarBaseHeight,
+ PM_TabBarBaseOverlap,
+
+ PM_ProgressBarChunkWidth,
+
+ PM_SplitterWidth,
+ PM_TitleBarHeight,
+
+ PM_MenuScrollerHeight,
+ PM_MenuHMargin,
+ PM_MenuVMargin,
+ PM_MenuPanelWidth,
+ PM_MenuTearoffHeight,
+ PM_MenuDesktopFrameWidth,
+
+ PM_MenuBarPanelWidth,
+ PM_MenuBarItemSpacing,
+ PM_MenuBarVMargin,
+ PM_MenuBarHMargin,
+
+ PM_IndicatorWidth,
+ PM_IndicatorHeight,
+ PM_ExclusiveIndicatorWidth,
+ PM_ExclusiveIndicatorHeight,
+ PM_CheckListButtonSize,
+ PM_CheckListControllerSize,
+
+ PM_DialogButtonsSeparator,
+ PM_DialogButtonsButtonWidth,
+ PM_DialogButtonsButtonHeight,
+
+ PM_MdiSubWindowFrameWidth,
+ PM_MDIFrameWidth = PM_MdiSubWindowFrameWidth, //obsolete
+ PM_MdiSubWindowMinimizedWidth,
+ PM_MDIMinimizedWidth = PM_MdiSubWindowMinimizedWidth, //obsolete
+
+ PM_HeaderMargin,
+ PM_HeaderMarkSize,
+ PM_HeaderGripMargin,
+ PM_TabBarTabShiftHorizontal,
+ PM_TabBarTabShiftVertical,
+ PM_TabBarScrollButtonWidth,
+
+ PM_ToolBarFrameWidth,
+ PM_ToolBarHandleExtent,
+ PM_ToolBarItemSpacing,
+ PM_ToolBarItemMargin,
+ PM_ToolBarSeparatorExtent,
+ PM_ToolBarExtensionExtent,
+
+ PM_SpinBoxSliderHeight,
+
+ PM_DefaultTopLevelMargin,
+ PM_DefaultChildMargin,
+ PM_DefaultLayoutSpacing,
+
+ PM_ToolBarIconSize,
+ PM_ListViewIconSize,
+ PM_IconViewIconSize,
+ PM_SmallIconSize,
+ PM_LargeIconSize,
+
+ PM_FocusFrameVMargin,
+ PM_FocusFrameHMargin,
+
+ PM_ToolTipLabelFrameWidth,
+ PM_CheckBoxLabelSpacing,
+ PM_TabBarIconSize,
+ PM_SizeGripSize,
+ PM_DockWidgetTitleMargin,
+ PM_MessageBoxIconSize,
+ PM_ButtonIconSize,
+
+ PM_DockWidgetTitleBarButtonMargin,
+
+ PM_RadioButtonLabelSpacing,
+ PM_LayoutLeftMargin,
+ PM_LayoutTopMargin,
+ PM_LayoutRightMargin,
+ PM_LayoutBottomMargin,
+ PM_LayoutHorizontalSpacing,
+ PM_LayoutVerticalSpacing,
+ PM_TabBar_ScrollButtonOverlap,
+
+ PM_TextCursorWidth,
+
+ PM_TabCloseIndicatorWidth,
+ PM_TabCloseIndicatorHeight,
+
+ PM_ScrollView_ScrollBarSpacing,
+ PM_SubMenuOverlap,
+
+ // do not add any values below/greater than this
+ PM_CustomBase = 0xf0000000
+ };
+
+ virtual int pixelMetric(PixelMetric metric, const QStyleOption *option = 0,
+ const QWidget *widget = 0) const = 0;
+
+ enum ContentsType {
+ CT_PushButton,
+ CT_CheckBox,
+ CT_RadioButton,
+ CT_ToolButton,
+ CT_ComboBox,
+ CT_Splitter,
+ CT_Q3DockWindow,
+ CT_ProgressBar,
+ CT_MenuItem,
+ CT_MenuBarItem,
+ CT_MenuBar,
+ CT_Menu,
+ CT_TabBarTab,
+ CT_Slider,
+ CT_ScrollBar,
+ CT_Q3Header,
+ CT_LineEdit,
+ CT_SpinBox,
+ CT_SizeGrip,
+ CT_TabWidget,
+ CT_DialogButtons,
+ CT_HeaderSection,
+ CT_GroupBox,
+ CT_MdiControls,
+ CT_ItemViewItem,
+ // do not add any values below/greater than this
+ CT_CustomBase = 0xf0000000
+ };
+
+ virtual QSize sizeFromContents(ContentsType ct, const QStyleOption *opt,
+ const QSize &contentsSize, const QWidget *w = 0) const = 0;
+
+ enum RequestSoftwareInputPanel {
+ RSIP_OnMouseClickAndAlreadyFocused,
+ RSIP_OnMouseClick
+ };
+
+ enum StyleHint {
+ SH_EtchDisabledText,
+ SH_DitherDisabledText,
+ SH_ScrollBar_MiddleClickAbsolutePosition,
+ SH_ScrollBar_ScrollWhenPointerLeavesControl,
+ SH_TabBar_SelectMouseType,
+ SH_TabBar_Alignment,
+ SH_Header_ArrowAlignment,
+ SH_Slider_SnapToValue,
+ SH_Slider_SloppyKeyEvents,
+ SH_ProgressDialog_CenterCancelButton,
+ SH_ProgressDialog_TextLabelAlignment,
+ SH_PrintDialog_RightAlignButtons,
+ SH_MainWindow_SpaceBelowMenuBar,
+ SH_FontDialog_SelectAssociatedText,
+ SH_Menu_AllowActiveAndDisabled,
+ SH_Menu_SpaceActivatesItem,
+ SH_Menu_SubMenuPopupDelay,
+ SH_ScrollView_FrameOnlyAroundContents,
+ SH_MenuBar_AltKeyNavigation,
+ SH_ComboBox_ListMouseTracking,
+ SH_Menu_MouseTracking,
+ SH_MenuBar_MouseTracking,
+ SH_ItemView_ChangeHighlightOnFocus,
+ SH_Widget_ShareActivation,
+ SH_Workspace_FillSpaceOnMaximize,
+ SH_ComboBox_Popup,
+ SH_TitleBar_NoBorder,
+ SH_Slider_StopMouseOverSlider,
+ SH_ScrollBar_StopMouseOverSlider = SH_Slider_StopMouseOverSlider, // obsolete
+ SH_BlinkCursorWhenTextSelected,
+ SH_RichText_FullWidthSelection,
+ SH_Menu_Scrollable,
+ SH_GroupBox_TextLabelVerticalAlignment,
+ SH_GroupBox_TextLabelColor,
+ SH_Menu_SloppySubMenus,
+ SH_Table_GridLineColor,
+ SH_LineEdit_PasswordCharacter,
+ SH_DialogButtons_DefaultButton,
+ SH_ToolBox_SelectedPageTitleBold,
+ SH_TabBar_PreferNoArrows,
+ SH_ScrollBar_LeftClickAbsolutePosition,
+ SH_Q3ListViewExpand_SelectMouseType,
+ SH_UnderlineShortcut,
+ SH_SpinBox_AnimateButton,
+ SH_SpinBox_KeyPressAutoRepeatRate,
+ SH_SpinBox_ClickAutoRepeatRate,
+ SH_Menu_FillScreenWithScroll,
+ SH_ToolTipLabel_Opacity,
+ SH_DrawMenuBarSeparator,
+ SH_TitleBar_ModifyNotification,
+ SH_Button_FocusPolicy,
+ SH_MenuBar_DismissOnSecondClick,
+ SH_MessageBox_UseBorderForButtonSpacing,
+ SH_TitleBar_AutoRaise,
+ SH_ToolButton_PopupDelay,
+ SH_FocusFrame_Mask,
+ SH_RubberBand_Mask,
+ SH_WindowFrame_Mask,
+ SH_SpinControls_DisableOnBounds,
+ SH_Dial_BackgroundRole,
+ SH_ComboBox_LayoutDirection,
+ SH_ItemView_EllipsisLocation,
+ SH_ItemView_ShowDecorationSelected,
+ SH_ItemView_ActivateItemOnSingleClick,
+ SH_ScrollBar_ContextMenu,
+ SH_ScrollBar_RollBetweenButtons,
+ SH_Slider_AbsoluteSetButtons,
+ SH_Slider_PageSetButtons,
+ SH_Menu_KeyboardSearch,
+ SH_TabBar_ElideMode,
+ SH_DialogButtonLayout,
+ SH_ComboBox_PopupFrameStyle,
+ SH_MessageBox_TextInteractionFlags,
+ SH_DialogButtonBox_ButtonsHaveIcons,
+ SH_SpellCheckUnderlineStyle,
+ SH_MessageBox_CenterButtons,
+ SH_Menu_SelectionWrap,
+ SH_ItemView_MovementWithoutUpdatingSelection,
+ SH_ToolTip_Mask,
+ SH_FocusFrame_AboveWidget,
+ SH_TextControl_FocusIndicatorTextCharFormat,
+ SH_WizardStyle,
+ SH_ItemView_ArrowKeysNavigateIntoChildren,
+ SH_Menu_Mask,
+ SH_Menu_FlashTriggeredItem,
+ SH_Menu_FadeOutOnHide,
+ SH_SpinBox_ClickAutoRepeatThreshold,
+ SH_ItemView_PaintAlternatingRowColorsForEmptyArea,
+ SH_FormLayoutWrapPolicy,
+ SH_TabWidget_DefaultTabPosition,
+ SH_ToolBar_Movable,
+ SH_FormLayoutFieldGrowthPolicy,
+ SH_FormLayoutFormAlignment,
+ SH_FormLayoutLabelAlignment,
+ SH_ItemView_DrawDelegateFrame,
+ SH_TabBar_CloseButtonPosition,
+ SH_DockWidget_ButtonsHaveFrame,
+ SH_ToolButtonStyle,
+ SH_RequestSoftwareInputPanel,
+ // Add new style hint values here
+
+#ifdef QT3_SUPPORT
+ SH_GUIStyle = 0x00000100,
+ SH_ScrollBar_BackgroundMode,
+ // Add other compat values here
+
+ SH_UnderlineAccelerator = SH_UnderlineShortcut,
+#endif
+ SH_CustomBase = 0xf0000000
+ };
+
+ virtual int styleHint(StyleHint stylehint, const QStyleOption *opt = 0,
+ const QWidget *widget = 0, QStyleHintReturn* returnData = 0) const = 0;
+
+ enum StandardPixmap {
+ SP_TitleBarMenuButton,
+ SP_TitleBarMinButton,
+ SP_TitleBarMaxButton,
+ SP_TitleBarCloseButton,
+ SP_TitleBarNormalButton,
+ SP_TitleBarShadeButton,
+ SP_TitleBarUnshadeButton,
+ SP_TitleBarContextHelpButton,
+ SP_DockWidgetCloseButton,
+ SP_MessageBoxInformation,
+ SP_MessageBoxWarning,
+ SP_MessageBoxCritical,
+ SP_MessageBoxQuestion,
+ SP_DesktopIcon,
+ SP_TrashIcon,
+ SP_ComputerIcon,
+ SP_DriveFDIcon,
+ SP_DriveHDIcon,
+ SP_DriveCDIcon,
+ SP_DriveDVDIcon,
+ SP_DriveNetIcon,
+ SP_DirOpenIcon,
+ SP_DirClosedIcon,
+ SP_DirLinkIcon,
+ SP_FileIcon,
+ SP_FileLinkIcon,
+ SP_ToolBarHorizontalExtensionButton,
+ SP_ToolBarVerticalExtensionButton,
+ SP_FileDialogStart,
+ SP_FileDialogEnd,
+ SP_FileDialogToParent,
+ SP_FileDialogNewFolder,
+ SP_FileDialogDetailedView,
+ SP_FileDialogInfoView,
+ SP_FileDialogContentsView,
+ SP_FileDialogListView,
+ SP_FileDialogBack,
+ SP_DirIcon,
+ SP_DialogOkButton,
+ SP_DialogCancelButton,
+ SP_DialogHelpButton,
+ SP_DialogOpenButton,
+ SP_DialogSaveButton,
+ SP_DialogCloseButton,
+ SP_DialogApplyButton,
+ SP_DialogResetButton,
+ SP_DialogDiscardButton,
+ SP_DialogYesButton,
+ SP_DialogNoButton,
+ SP_ArrowUp,
+ SP_ArrowDown,
+ SP_ArrowLeft,
+ SP_ArrowRight,
+ SP_ArrowBack,
+ SP_ArrowForward,
+ SP_DirHomeIcon,
+ SP_CommandLink,
+ SP_VistaShield,
+ SP_BrowserReload,
+ SP_BrowserStop,
+ SP_MediaPlay,
+ SP_MediaStop,
+ SP_MediaPause,
+ SP_MediaSkipForward,
+ SP_MediaSkipBackward,
+ SP_MediaSeekForward,
+ SP_MediaSeekBackward,
+ SP_MediaVolume,
+ SP_MediaVolumeMuted,
+ // do not add any values below/greater than this
+ SP_CustomBase = 0xf0000000
+ };
+
+ virtual QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt = 0,
+ const QWidget *widget = 0) const = 0;
+
+ QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = 0,
+ const QWidget *widget = 0) const;
+
+ virtual QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap,
+ const QStyleOption *opt) const = 0;
+
+ static QRect visualRect(Qt::LayoutDirection direction, const QRect &boundingRect,
+ const QRect &logicalRect);
+ static QPoint visualPos(Qt::LayoutDirection direction, const QRect &boundingRect,
+ const QPoint &logicalPos);
+ static int sliderPositionFromValue(int min, int max, int val, int space,
+ bool upsideDown = false);
+ static int sliderValueFromPosition(int min, int max, int pos, int space,
+ bool upsideDown = false);
+ static Qt::Alignment visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment);
+ static QRect alignedRect(Qt::LayoutDirection direction, Qt::Alignment alignment,
+ const QSize &size, const QRect &rectangle);
+
+ int layoutSpacing(QSizePolicy::ControlType control1,
+ QSizePolicy::ControlType control2, Qt::Orientation orientation,
+ const QStyleOption *option = 0, const QWidget *widget = 0) const;
+ int combinedLayoutSpacing(QSizePolicy::ControlTypes controls1,
+ QSizePolicy::ControlTypes controls2, Qt::Orientation orientation,
+ QStyleOption *option = 0, QWidget *widget = 0) const;
+
+ const QStyle * proxy() const;
+
+protected Q_SLOTS:
+ QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *opt = 0,
+ const QWidget *widget = 0) const;
+ int layoutSpacingImplementation(QSizePolicy::ControlType control1,
+ QSizePolicy::ControlType control2,
+ Qt::Orientation orientation,
+ const QStyleOption *option = 0,
+ const QWidget *widget = 0) const;
+
+private:
+ Q_DISABLE_COPY(QStyle)
+ friend class QWidget;
+ friend class QWidgetPrivate;
+ friend class QApplication;
+ friend class QProxyStyle;
+ friend class QProxyStylePrivate;
+ void setProxy(QStyle *style);
+};
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(QStyle::State)
+Q_DECLARE_OPERATORS_FOR_FLAGS(QStyle::SubControls)
+
+Q_GUI_EXPORT QDebug operator<<(QDebug debug, QStyle::State state);
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif // QSTYLE_H
diff --git a/qtinterface/tqwindowdefs.h b/qtinterface/tqwindowdefs.h
index 9d5a34c..010ae74 100644
--- a/qtinterface/tqwindowdefs.h
+++ b/qtinterface/tqwindowdefs.h
@@ -36,7 +36,7 @@ Boston, MA 02110-1301, USA.
// Pull in Qt4 qwindowdefs defines
-#include <qwindowdefs.h>
+#include <Qt/qwindowdefs.h>
#endif // USE_QT4