summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qcdestyle.cpp4
-rw-r--r--src/widgets/styles/qcdestyle.h5
-rw-r--r--src/widgets/styles/qcleanlooksstyle.cpp4
-rw-r--r--src/widgets/styles/qcleanlooksstyle.h5
-rw-r--r--src/widgets/styles/qcleanlooksstyle_p.h4
-rw-r--r--src/widgets/styles/qcommonstyle.cpp4
-rw-r--r--src/widgets/styles/qcommonstyle.h5
-rw-r--r--src/widgets/styles/qcommonstyle_p.h4
-rw-r--r--src/widgets/styles/qcommonstylepixmaps_p.h4
-rw-r--r--src/widgets/styles/qdrawutil.cpp4
-rw-r--r--src/widgets/styles/qdrawutil.h5
-rw-r--r--src/widgets/styles/qgtkpainter.cpp4
-rw-r--r--src/widgets/styles/qgtkpainter_p.h4
-rw-r--r--src/widgets/styles/qgtkstyle.cpp4
-rw-r--r--src/widgets/styles/qgtkstyle.h5
-rw-r--r--src/widgets/styles/qgtkstyle_p.cpp4
-rw-r--r--src/widgets/styles/qgtkstyle_p.h4
-rw-r--r--src/widgets/styles/qmacstyle.qdoc4
-rw-r--r--src/widgets/styles/qmacstyle_mac.h5
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm10
-rw-r--r--src/widgets/styles/qmacstyle_mac_p.h4
-rw-r--r--src/widgets/styles/qmacstylepixmaps_mac_p.h4
-rw-r--r--src/widgets/styles/qmotifstyle.cpp23
-rw-r--r--src/widgets/styles/qmotifstyle.h5
-rw-r--r--src/widgets/styles/qmotifstyle_p.h4
-rw-r--r--src/widgets/styles/qplastiquestyle.cpp7
-rw-r--r--src/widgets/styles/qplastiquestyle.h5
-rw-r--r--src/widgets/styles/qproxystyle.cpp4
-rw-r--r--src/widgets/styles/qproxystyle.h5
-rw-r--r--src/widgets/styles/qproxystyle_p.h4
-rw-r--r--src/widgets/styles/qstyle.cpp6
-rw-r--r--src/widgets/styles/qstyle.h5
-rw-r--r--src/widgets/styles/qstyle_p.h4
-rw-r--r--src/widgets/styles/qstylefactory.cpp16
-rw-r--r--src/widgets/styles/qstylefactory.h5
-rw-r--r--src/widgets/styles/qstylehelper.cpp4
-rw-r--r--src/widgets/styles/qstylehelper_p.h4
-rw-r--r--src/widgets/styles/qstyleoption.cpp1607
-rw-r--r--src/widgets/styles/qstyleoption.h269
-rw-r--r--src/widgets/styles/qstylepainter.cpp4
-rw-r--r--src/widgets/styles/qstylepainter.h5
-rw-r--r--src/widgets/styles/qstyleplugin.cpp4
-rw-r--r--src/widgets/styles/qstyleplugin.h7
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp4
-rw-r--r--src/widgets/styles/qstylesheetstyle_default.cpp7
-rw-r--r--src/widgets/styles/qstylesheetstyle_p.h4
-rw-r--r--src/widgets/styles/qwindowscestyle.cpp4
-rw-r--r--src/widgets/styles/qwindowscestyle.h5
-rw-r--r--src/widgets/styles/qwindowscestyle_p.h4
-rw-r--r--src/widgets/styles/qwindowsmobilestyle.cpp4
-rw-r--r--src/widgets/styles/qwindowsmobilestyle.h5
-rw-r--r--src/widgets/styles/qwindowsmobilestyle_p.h4
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp4
-rw-r--r--src/widgets/styles/qwindowsstyle.h5
-rw-r--r--src/widgets/styles/qwindowsstyle_p.h4
-rw-r--r--src/widgets/styles/qwindowsvistastyle.cpp4
-rw-r--r--src/widgets/styles/qwindowsvistastyle.h5
-rw-r--r--src/widgets/styles/qwindowsvistastyle_p.h4
-rw-r--r--src/widgets/styles/qwindowsxpstyle.cpp110
-rw-r--r--src/widgets/styles/qwindowsxpstyle.h5
-rw-r--r--src/widgets/styles/qwindowsxpstyle_p.h9
61 files changed, 475 insertions, 1813 deletions
diff --git a/src/widgets/styles/qcdestyle.cpp b/src/widgets/styles/qcdestyle.cpp
index 518461c279..f7cf3b2fba 100644
--- a/src/widgets/styles/qcdestyle.cpp
+++ b/src/widgets/styles/qcdestyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qcdestyle.h b/src/widgets/styles/qcdestyle.h
index b5293d30f3..fa9ec099d5 100644
--- a/src/widgets/styles/qcdestyle.h
+++ b/src/widgets/styles/qcdestyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#if !defined(QT_NO_STYLE_CDE)
diff --git a/src/widgets/styles/qcleanlooksstyle.cpp b/src/widgets/styles/qcleanlooksstyle.cpp
index 42f9b38bd4..67b3c59b29 100644
--- a/src/widgets/styles/qcleanlooksstyle.cpp
+++ b/src/widgets/styles/qcleanlooksstyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qcleanlooksstyle.h b/src/widgets/styles/qcleanlooksstyle.h
index 94b3aa889c..cd37eadb1e 100644
--- a/src/widgets/styles/qcleanlooksstyle.h
+++ b/src/widgets/styles/qcleanlooksstyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#if !defined(QT_NO_STYLE_CLEANLOOKS)
diff --git a/src/widgets/styles/qcleanlooksstyle_p.h b/src/widgets/styles/qcleanlooksstyle_p.h
index d9968bb531..ad7e00ef81 100644
--- a/src/widgets/styles/qcleanlooksstyle_p.h
+++ b/src/widgets/styles/qcleanlooksstyle_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index c874770fdb..db783d14d4 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qcommonstyle.h b/src/widgets/styles/qcommonstyle.h
index e023c702da..6fe7411413 100644
--- a/src/widgets/styles/qcommonstyle.h
+++ b/src/widgets/styles/qcommonstyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -47,7 +47,6 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QCommonStylePrivate;
diff --git a/src/widgets/styles/qcommonstyle_p.h b/src/widgets/styles/qcommonstyle_p.h
index 10a9cd875a..0c783324e2 100644
--- a/src/widgets/styles/qcommonstyle_p.h
+++ b/src/widgets/styles/qcommonstyle_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qcommonstylepixmaps_p.h b/src/widgets/styles/qcommonstylepixmaps_p.h
index 73c183d485..decfac637f 100644
--- a/src/widgets/styles/qcommonstylepixmaps_p.h
+++ b/src/widgets/styles/qcommonstylepixmaps_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qdrawutil.cpp b/src/widgets/styles/qdrawutil.cpp
index fd8a272851..15788e34f5 100644
--- a/src/widgets/styles/qdrawutil.cpp
+++ b/src/widgets/styles/qdrawutil.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qdrawutil.h b/src/widgets/styles/qdrawutil.h
index 74347b09c1..611c1fb8bd 100644
--- a/src/widgets/styles/qdrawutil.h
+++ b/src/widgets/styles/qdrawutil.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,7 +50,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QPainter;
class QPalette;
diff --git a/src/widgets/styles/qgtkpainter.cpp b/src/widgets/styles/qgtkpainter.cpp
index a9d1ed2281..3d8cb98135 100644
--- a/src/widgets/styles/qgtkpainter.cpp
+++ b/src/widgets/styles/qgtkpainter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qgtkpainter_p.h b/src/widgets/styles/qgtkpainter_p.h
index b0874d2315..ff512f2894 100644
--- a/src/widgets/styles/qgtkpainter_p.h
+++ b/src/widgets/styles/qgtkpainter_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp
index 30e1371354..87d335baad 100644
--- a/src/widgets/styles/qgtkstyle.cpp
+++ b/src/widgets/styles/qgtkstyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qgtkstyle.h b/src/widgets/styles/qgtkstyle.h
index 26665dcd51..38a6e15db2 100644
--- a/src/widgets/styles/qgtkstyle.h
+++ b/src/widgets/styles/qgtkstyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -51,7 +51,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#if !defined(QT_NO_STYLE_GTK)
diff --git a/src/widgets/styles/qgtkstyle_p.cpp b/src/widgets/styles/qgtkstyle_p.cpp
index f3b41e0ba1..40ad9f2a95 100644
--- a/src/widgets/styles/qgtkstyle_p.cpp
+++ b/src/widgets/styles/qgtkstyle_p.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qgtkstyle_p.h b/src/widgets/styles/qgtkstyle_p.h
index 656a187ded..95988fa8b1 100644
--- a/src/widgets/styles/qgtkstyle_p.h
+++ b/src/widgets/styles/qgtkstyle_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qmacstyle.qdoc b/src/widgets/styles/qmacstyle.qdoc
index 97baf80e9d..d48a65c41f 100644
--- a/src/widgets/styles/qmacstyle.qdoc
+++ b/src/widgets/styles/qmacstyle.qdoc
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -21,6 +20,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qmacstyle_mac.h b/src/widgets/styles/qmacstyle_mac.h
index 7a3a4248b3..b42f0e36f2 100644
--- a/src/widgets/styles/qmacstyle_mac.h
+++ b/src/widgets/styles/qmacstyle_mac.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#if defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index ca9b5cf234..09cb9cc016 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -44,6 +44,8 @@
.../doc/src/qstyles.qdoc.
*/
+#include <Cocoa/Cocoa.h>
+
#include "qmacstyle_mac.h"
#include "qmacstyle_mac_p.h"
#include "qmacstylepixmaps_mac_p.h"
@@ -2103,7 +2105,7 @@ void QMacStyle::unpolish(QWidget* w)
}
}
- if (QRubberBand *rubber = ::qobject_cast<QRubberBand*>(w)) {
+ if (QRubberBand *rubber = qobject_cast<QRubberBand*>(w)) {
rubber->setWindowOpacity(1.0);
rubber->setAttribute(Qt::WA_PaintOnScreen, true);
rubber->setAttribute(Qt::WA_NoSystemBackground, true);
@@ -3536,7 +3538,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
QCommonStyle::drawControl(ce, opt, p, w);
break;
case CE_PushButtonBevel:
- if (const QStyleOptionButton *btn = ::qstyleoption_cast<const QStyleOptionButton *>(opt)) {
+ if (const QStyleOptionButton *btn = qstyleoption_cast<const QStyleOptionButton *>(opt)) {
if (!(btn->state & (State_Raised | State_Sunken | State_On)))
break;
diff --git a/src/widgets/styles/qmacstyle_mac_p.h b/src/widgets/styles/qmacstyle_mac_p.h
index 1739a382f3..8f7edd51d5 100644
--- a/src/widgets/styles/qmacstyle_mac_p.h
+++ b/src/widgets/styles/qmacstyle_mac_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qmacstylepixmaps_mac_p.h b/src/widgets/styles/qmacstylepixmaps_mac_p.h
index 3f852a63f3..1a293d9f3c 100644
--- a/src/widgets/styles/qmacstylepixmaps_mac_p.h
+++ b/src/widgets/styles/qmacstylepixmaps_mac_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qmotifstyle.cpp b/src/widgets/styles/qmotifstyle.cpp
index fc697454c1..331b70f153 100644
--- a/src/widgets/styles/qmotifstyle.cpp
+++ b/src/widgets/styles/qmotifstyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -2254,25 +2254,6 @@ static const char * const qt_minimize_xpm[] = {
" ",
" "};
-#if 0 // ### not used???
-static const char * const qt_normalize_xpm[] = {
- "12 12 2 1",
- " s None c None",
- ". c black",
- " ",
- " ",
- " . ",
- " .. ",
- " ... ",
- " .... ",
- " ..... ",
- " ...... ",
- " ....... ",
- " ",
- " ",
- " "};
-#endif
-
static const char * const qt_normalizeup_xpm[] = {
"12 12 2 1",
" s None c None",
diff --git a/src/widgets/styles/qmotifstyle.h b/src/widgets/styles/qmotifstyle.h
index 0aa506d2ac..fa957f392a 100644
--- a/src/widgets/styles/qmotifstyle.h
+++ b/src/widgets/styles/qmotifstyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#if !defined(QT_NO_STYLE_MOTIF)
diff --git a/src/widgets/styles/qmotifstyle_p.h b/src/widgets/styles/qmotifstyle_p.h
index 83394059e8..76a6a1035d 100644
--- a/src/widgets/styles/qmotifstyle_p.h
+++ b/src/widgets/styles/qmotifstyle_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qplastiquestyle.cpp b/src/widgets/styles/qplastiquestyle.cpp
index 750d0765ef..79893f066d 100644
--- a/src/widgets/styles/qplastiquestyle.cpp
+++ b/src/widgets/styles/qplastiquestyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -3784,10 +3784,9 @@ void QPlastiqueStyle::drawComplexControl(ComplexControl control, const QStyleOpt
if (!QPixmapCache::find(handlePixmapName, cache)) {
cache = QPixmap(handle.size());
- cache.fill(Qt::white);
+ cache.fill(Qt::transparent);
QRect pixmapRect(0, 0, handle.width(), handle.height());
QPainter handlePainter(&cache);
- handlePainter.fillRect(pixmapRect, option->palette.background());
// draw handle
if (horizontal) {
diff --git a/src/widgets/styles/qplastiquestyle.h b/src/widgets/styles/qplastiquestyle.h
index 837e07a75f..3247f66811 100644
--- a/src/widgets/styles/qplastiquestyle.h
+++ b/src/widgets/styles/qplastiquestyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#if !defined(QT_NO_STYLE_PLASTIQUE)
diff --git a/src/widgets/styles/qproxystyle.cpp b/src/widgets/styles/qproxystyle.cpp
index 56e3dc56b4..5bcd83a6ea 100644
--- a/src/widgets/styles/qproxystyle.cpp
+++ b/src/widgets/styles/qproxystyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qproxystyle.h b/src/widgets/styles/qproxystyle.h
index e5d05eb3e5..87839e1278 100644
--- a/src/widgets/styles/qproxystyle.h
+++ b/src/widgets/styles/qproxystyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#if !defined(QT_NO_STYLE_PROXY)
diff --git a/src/widgets/styles/qproxystyle_p.h b/src/widgets/styles/qproxystyle_p.h
index 3dc960afcd..24504e3d3b 100644
--- a/src/widgets/styles/qproxystyle_p.h
+++ b/src/widgets/styles/qproxystyle_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp
index e4000bef19..3ff5aea0ca 100644
--- a/src/widgets/styles/qstyle.cpp
+++ b/src/widgets/styles/qstyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -1594,7 +1594,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\value RSIP_OnMouseClick Requests an input panel if the user clicks on the
widget.
- \sa QEvent::RequestSoftwareInputPanel, QInputContext
+ \sa QInputMethod
*/
/*!
diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h
index fcc8412414..a8ec8c8c3e 100644
--- a/src/widgets/styles/qstyle.h
+++ b/src/widgets/styles/qstyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -54,7 +54,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QAction;
class QDebug;
diff --git a/src/widgets/styles/qstyle_p.h b/src/widgets/styles/qstyle_p.h
index 3fd221938d..3da4c458d2 100644
--- a/src/widgets/styles/qstyle_p.h
+++ b/src/widgets/styles/qstyle_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qstylefactory.cpp b/src/widgets/styles/qstylefactory.cpp
index cc19a895d0..ef555fbdb1 100644
--- a/src/widgets/styles/qstylefactory.cpp
+++ b/src/widgets/styles/qstylefactory.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -69,9 +69,6 @@
#ifndef QT_NO_STYLE_WINDOWSMOBILE
#include "qwindowsmobilestyle.h"
#endif
-#ifndef QT_NO_STYLE_S60
-#include "qs60style.h"
-#endif
QT_BEGIN_NAMESPACE
@@ -158,11 +155,6 @@ QStyle *QStyleFactory::create(const QString& key)
ret = new QCDEStyle;
else
#endif
-#ifndef QT_NO_STYLE_S60
- if (style == QLatin1String("s60"))
- ret = new QS60Style;
- else
-#endif
#ifndef QT_NO_STYLE_PLASTIQUE
if (style == QLatin1String("plastique"))
ret = new QPlastiqueStyle;
@@ -242,10 +234,6 @@ QStringList QStyleFactory::keys()
if (!list.contains(QLatin1String("CDE")))
list << QLatin1String("CDE");
#endif
-#ifndef QT_NO_STYLE_S60
- if (!list.contains(QLatin1String("S60")))
- list << QLatin1String("S60");
-#endif
#ifndef QT_NO_STYLE_PLASTIQUE
if (!list.contains(QLatin1String("Plastique")))
list << QLatin1String("Plastique");
diff --git a/src/widgets/styles/qstylefactory.h b/src/widgets/styles/qstylefactory.h
index f98d37b26e..3551e62613 100644
--- a/src/widgets/styles/qstylefactory.h
+++ b/src/widgets/styles/qstylefactory.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QStyle;
diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp
index 8f2d7364c1..818671f85f 100644
--- a/src/widgets/styles/qstylehelper.cpp
+++ b/src/widgets/styles/qstylehelper.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qstylehelper_p.h b/src/widgets/styles/qstylehelper_p.h
index a193e2ec78..a7bc64abcd 100644
--- a/src/widgets/styles/qstylehelper_p.h
+++ b/src/widgets/styles/qstylehelper_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index 0e4a1e98f8..63e7b8775e 100644
--- a/src/widgets/styles/qstyleoption.cpp
+++ b/src/widgets/styles/qstyleoption.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -110,12 +110,12 @@ QT_BEGIN_NAMESPACE
\value SO_Default QStyleOption
\value SO_DockWidget \l QStyleOptionDockWidget
\value SO_FocusRect \l QStyleOptionFocusRect
- \value SO_Frame \l QStyleOptionFrame \l QStyleOptionFrameV2
+ \value SO_Frame \l QStyleOptionFrame
\value SO_GraphicsItem \l QStyleOptionGraphicsItem
\value SO_GroupBox \l QStyleOptionGroupBox
\value SO_Header \l QStyleOptionHeader
\value SO_MenuItem \l QStyleOptionMenuItem
- \value SO_ProgressBar \l QStyleOptionProgressBar \l QStyleOptionProgressBarV2
+ \value SO_ProgressBar \l QStyleOptionProgressBar
\value SO_RubberBand \l QStyleOptionRubberBand
\value SO_SizeGrip \l QStyleOptionSizeGrip
\value SO_Slider \l QStyleOptionSlider
@@ -455,13 +455,11 @@ QStyleOptionFocusRect::QStyleOptionFocusRect(int version)
\inmodule QtWidgets
QStyleOptionFrame is used for drawing several built-in Qt widgets,
- including QFrame, QGroupBox, QLineEdit, and QMenu. Note that to
- describe the parameters necessary for drawing a frame in Qt 4.1 or
- above, you must use the QStyleOptionFrameV2 subclass.
+ including QFrame, QGroupBox, QLineEdit, and QMenu.
An instance of the QStyleOptionFrame class has
\l{QStyleOption::type} {type} SO_Frame and \l{QStyleOption::version}
- {version} 1.
+ {version} 3.
The type is used internally by QStyleOption, its subclasses, and
qstyleoption_cast() to determine the type of style option. In
@@ -471,13 +469,24 @@ QStyleOptionFocusRect::QStyleOptionFocusRect(int version)
without breaking compatibility. If you use qstyleoption_cast(),
you normally do not need to check it.
- If you create your own QStyle subclass, you should handle both
- QStyleOptionFrame and QStyleOptionFrameV2.
-
For an example demonstrating how style options can be used, see
the \l {widgets/styles}{Styles} example.
- \sa QStyleOptionFrameV2, QStyleOption
+ \sa QStyleOption
+*/
+
+/*!
+ \typedef QStyleOptionFrameV2
+ \relates QStyleOptionFrame
+
+ Synonym for QStyleOptionFrame.
+*/
+
+/*!
+ \typedef QStyleOptionFrameV3
+ \relates QStyleOptionFrame
+
+ Synonym for QStyleOptionFrame.
*/
/*!
@@ -486,7 +495,8 @@ QStyleOptionFocusRect::QStyleOptionFocusRect(int version)
*/
QStyleOptionFrame::QStyleOptionFrame()
- : QStyleOption(Version, SO_Frame), lineWidth(0), midLineWidth(0)
+ : QStyleOption(Version, SO_Frame), lineWidth(0), midLineWidth(0),
+ features(None), frameShape(QFrame::NoFrame)
{
}
@@ -494,7 +504,8 @@ QStyleOptionFrame::QStyleOptionFrame()
\internal
*/
QStyleOptionFrame::QStyleOptionFrame(int version)
- : QStyleOption(version, SO_Frame), lineWidth(0), midLineWidth(0)
+ : QStyleOption(version, SO_Frame), lineWidth(0), midLineWidth(0),
+ features(None), frameShape(QFrame::NoFrame)
{
}
@@ -526,7 +537,7 @@ QStyleOptionFrame::QStyleOptionFrame(int version)
This enum is used to hold information about the version of the style option, and
is defined for each QStyleOption subclass.
- \value Version 1
+ \value Version 3
The version is used by QStyleOption subclasses to implement
extensions without breaking compatibility. If you use
@@ -556,110 +567,7 @@ QStyleOptionFrame::QStyleOptionFrame(int version)
*/
/*!
- \class QStyleOptionFrameV2
- \brief The QStyleOptionFrameV2 class is used to describe the
- parameters necessary for drawing a frame in Qt 4.1 or above.
-
- \since 4.1
- \inmodule QtWidgets
-
- QStyleOptionFrameV2 inherits QStyleOptionFrame which is used for
- drawing several built-in Qt widgets, including QFrame, QGroupBox,
- QLineEdit, and QMenu.
-
- An instance of the QStyleOptionFrameV2 class has
- \l{QStyleOption::type} {type} SO_Frame and
- \l{QStyleOption::version} {version} 2. The type is used
- internally by QStyleOption, its subclasses, and
- qstyleoption_cast() to determine the type of style option. In
- general you do not need to worry about this unless you want to
- create your own QStyleOption subclass and your own styles. The
- version is used by QStyleOption subclasses to implement extensions
- without breaking compatibility. If you use qstyleoption_cast(),
- you normally do not need to check it.
-
- If you create your own QStyle subclass, you should handle both
- QStyleOptionFrame and QStyleOptionFrameV2. One way to achieve this
- is to use the QStyleOptionFrameV2 copy constructor. For example:
-
- \snippet doc/src/snippets/qstyleoption/main.cpp 1
-
- In the example above: If the \c frameOption's version is 1, \l
- FrameFeature is set to \l None for \c frameOptionV2. If \c
- frameOption's version is 2, the constructor will simply copy the
- \c frameOption's \l FrameFeature value.
-
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
- \sa QStyleOptionFrame, QStyleOption
-*/
-
-/*!
- Constructs a QStyleOptionFrameV2 object.
-*/
-QStyleOptionFrameV2::QStyleOptionFrameV2()
- : QStyleOptionFrame(Version), features(None)
-{
-}
-
-/*!
- \fn QStyleOptionFrameV2::QStyleOptionFrameV2(const QStyleOptionFrameV2 &other)
-
- Constructs a QStyleOptionFrameV2 copy of the \a other style option.
-*/
-
-/*!
- \internal
-*/
-QStyleOptionFrameV2::QStyleOptionFrameV2(int version)
- : QStyleOptionFrame(version), features(None)
-{
-}
-
-/*!
- Constructs a QStyleOptionFrameV2 copy of the \a other style option
- which can be either of the QStyleOptionFrameV2 or
- QStyleOptionFrame types.
-
- If the \a other style option's version is 1, the new style option's \l
- FrameFeature value is set to \l QStyleOptionFrameV2::None. If its
- version is 2, its \l FrameFeature value is simply copied to the
- new style option.
-
- \sa version
-*/
-QStyleOptionFrameV2::QStyleOptionFrameV2(const QStyleOptionFrame &other)
-{
- QStyleOptionFrame::operator=(other);
-
- const QStyleOptionFrameV2 *f2 = qstyleoption_cast<const QStyleOptionFrameV2 *>(&other);
- features = f2 ? f2->features : FrameFeatures(QStyleOptionFrameV2::None);
- version = Version;
-}
-
-/*!
- Assigns the \a other style option to this style option. The \a
- other style option can be either of the QStyleOptionFrameV2 or
- QStyleOptionFrame types.
-
- If the \a{other} style option's version is 1, this style option's
- \l FrameFeature value is set to \l QStyleOptionFrameV2::None. If
- its version is 2, its \l FrameFeature value is simply copied to
- this style option.
-*/
-QStyleOptionFrameV2 &QStyleOptionFrameV2::operator=(const QStyleOptionFrame &other)
-{
- QStyleOptionFrame::operator=(other);
-
- const QStyleOptionFrameV2 *f2 = qstyleoption_cast<const QStyleOptionFrameV2 *>(&other);
- features = f2 ? f2->features : FrameFeatures(QStyleOptionFrameV2::None);
- version = Version;
- return *this;
-}
-
-/*!
- \enum QStyleOptionFrameV2::FrameFeature
+ \enum QStyleOptionFrame::FrameFeature
This enum describes the different types of features a frame can have.
@@ -668,503 +576,20 @@ QStyleOptionFrameV2 &QStyleOptionFrameV2::operator=(const QStyleOptionFrame &oth
*/
/*!
- \variable QStyleOptionFrameV2::features
+ \variable QStyleOptionFrame::features
\brief a bitwise OR of the features that describe this frame.
\sa FrameFeature
*/
/*!
- \enum QStyleOptionFrameV2::StyleOptionVersion
-
- This enum is used to hold information about the version of the
- style option, and is defined for each QStyleOption subclass.
-
- \value Version 2
-
- The version is used by QStyleOption subclasses to implement
- extensions without breaking compatibility. If you use
- qstyleoption_cast(), you normally do not need to check it.
-
- \sa StyleOptionType
-*/
-
-/*!
- \class QStyleOptionFrameV3
- \brief The QStyleOptionFrameV3 class is used to describe the
- parameters necessary for drawing a frame in Qt 4.1 or above.
-
- \since 4.5
- \inmodule QtWidgets
-
- QStyleOptionFrameV3 inherits QStyleOptionFrameV2
-
- An instance of the QStyleOptionFrameV3 class has
- \l{QStyleOption::type} {type} SO_Frame and
- \l{QStyleOption::version} {version} 3. The type is used
- internally by QStyleOption, its subclasses, and
- qstyleoption_cast() to determine the type of style option. In
- general you do not need to worry about this unless you want to
- create your own QStyleOption subclass and your own styles. The
- version is used by QStyleOption subclasses to implement extensions
- without breaking compatibility. If you use qstyleoption_cast(),
- you normally do not need to check it.
-
- \sa QStyleOptionFrameV2, QStyleOption
-*/
-
-/*!
- Constructs a QStyleOptionFrameV3 object.
-*/
-QStyleOptionFrameV3::QStyleOptionFrameV3()
- : QStyleOptionFrameV2(Version), frameShape(QFrame::NoFrame), unused(0)
-{
-}
-
-/*!
- \fn QStyleOptionFrameV3::QStyleOptionFrameV3(const QStyleOptionFrameV3 &other)
-
- Constructs a QStyleOptionFrameV3 copy of the \a other style option.
-*/
-
-/*!
- \internal
-*/
-QStyleOptionFrameV3::QStyleOptionFrameV3(int version)
- : QStyleOptionFrameV2(version), frameShape(QFrame::NoFrame), unused(0)
-{
-}
-
-/*!
- Constructs a QStyleOptionFrameV3 copy of the \a other style option
- which can be either of the QStyleOptionFrameV3 or
- QStyleOptionFrame types.
-
- If the \a other style option's version is 1, the new style
- option's \l FrameFeature value is set to
- \l{QStyleOptionFrameV2::None}. If its version is 2 or lower,
- \l{QStyleOptionFrameV3::frameShape} value is QFrame::NoFrame
-
- \sa version
-*/
-QStyleOptionFrameV3::QStyleOptionFrameV3(const QStyleOptionFrame &other)
-{
- operator=(other);
-}
-
-/*!
- Assigns the \a other style option to this style option. The \a
- other style option can be either of the QStyleOptionFrameV3,
- QStyleOptionFrameV2 or QStyleOptionFrame types.
-
- If the \a other style option's version is 1, the new style
- option's \l FrameFeature value is set to
- \l{QStyleOptionFrameV2::None}. If its version is 2 or lower,
- \l{QStyleOptionFrameV3::frameShape} value is QFrame::NoFrame
-*/
-QStyleOptionFrameV3 &QStyleOptionFrameV3::operator=(const QStyleOptionFrame &other)
-{
- QStyleOptionFrameV2::operator=(other);
-
- const QStyleOptionFrameV3 *f3 = qstyleoption_cast<const QStyleOptionFrameV3 *>(&other);
- frameShape = f3 ? f3->frameShape : QFrame::NoFrame;
- version = Version;
- return *this;
-}
-
-
-/*!
- \variable QStyleOptionFrameV3::frameShape
+ \variable QStyleOptionFrame::frameShape
\brief This property holds the frame shape value of the frame.
\sa QFrame::frameShape
*/
/*!
- \enum QStyleOptionFrameV3::StyleOptionVersion
-
- This enum is used to hold information about the version of the style option, and
- is defined for each QStyleOption subclass.
-
- \value Version 3
-
- The version is used by QStyleOption subclasses to implement
- extensions without breaking compatibility. If you use
- qstyleoption_cast(), you normally do not need to check it.
-
- \sa StyleOptionType
-*/
-
-/*!
- \class QStyleOptionViewItemV2
- \brief The QStyleOptionViewItemV2 class is used to describe the
- parameters necessary for drawing a frame in Qt 4.2 or above.
- \since 4.2
- \inmodule QtWidgets
-
- QStyleOptionViewItemV2 inherits QStyleOptionViewItem.
-
- An instance of the QStyleOptionViewItemV2 class has
- \l{QStyleOption::type} {type} SO_ViewItem and
- \l{QStyleOption::version} {version} 2. The type is used internally
- by QStyleOption, its subclasses, and qstyleoption_cast() to
- determine the type of style option. In general you do not need to
- worry about this unless you want to create your own QStyleOption
- subclass and your own styles. The version is used by QStyleOption
- subclasses to implement extensions without breaking
- compatibility. If you use qstyleoption_cast(), you normally do not
- need to check it.
-
- See QStyleOptionFrameV2's detailed description for a discussion
- of how to handle "V2" classes.
-
- \sa QStyleOptionViewItem, QStyleOption
-*/
-
-/*!
- \enum QStyleOptionViewItemV2::StyleOptionVersion
-
- This enum is used to hold information about the version of the
- style option, and is defined for each QStyleOption subclass.
-
- \value Version 2
-
- The version is used by QStyleOption subclasses to implement
- extensions without breaking compatibility. If you use
- qstyleoption_cast(), you normally do not need to check it.
-
- \sa StyleOptionType
-*/
-
-/*!
- \variable QStyleOptionViewItemV2::features
- \brief a bitwise OR of the features that describe this view item
-
- \sa ViewItemFeature
-*/
-
-/*!
- Constructs a QStyleOptionViewItemV2 object.
-*/
-QStyleOptionViewItemV2::QStyleOptionViewItemV2()
- : QStyleOptionViewItem(Version), features(None)
-{
-}
-
-/*!
- \fn QStyleOptionViewItemV2::QStyleOptionViewItemV2(const QStyleOptionViewItemV2 &other)
-
- Constructs a copy of \a other.
-*/
-
-/*!
- Constructs a QStyleOptionViewItemV2 copy of the \a other style option
- which can be either of the QStyleOptionViewItemV2 or
- QStyleOptionViewItem types.
-
- If the \a other style option's version is 1, the new style option's \l
- ViewItemFeature value is set to \l QStyleOptionViewItemV2::None. If its
- version is 2, its \l ViewItemFeature value is simply copied to the
- new style option.
-
- \sa version
-*/
-QStyleOptionViewItemV2::QStyleOptionViewItemV2(const QStyleOptionViewItem &other)
- : QStyleOptionViewItem(Version)
-{
- (void)QStyleOptionViewItemV2::operator=(other);
-}
-
-/*!
- \internal
-*/
-QStyleOptionViewItemV2::QStyleOptionViewItemV2(int version)
- : QStyleOptionViewItem(version)
-{
-
-}
-
-/*!
- Assigns the \a other style option to this style option. The \a
- other style option can be either of the QStyleOptionViewItemV2 or
- QStyleOptionViewItem types.
-
- If the \a{other} style option's version is 1, this style option's
- \l ViewItemFeature value is set to \l QStyleOptionViewItemV2::None.
- If its version is 2, its \l ViewItemFeature value is simply copied
- to this style option.
-*/
-QStyleOptionViewItemV2 &QStyleOptionViewItemV2::operator=(const QStyleOptionViewItem &other)
-{
- QStyleOptionViewItem::operator=(other);
- const QStyleOptionViewItemV2 *v2 = qstyleoption_cast<const QStyleOptionViewItemV2 *>(&other);
- features = v2 ? v2->features : ViewItemFeatures(QStyleOptionViewItemV2::None);
- return *this;
-}
-
-/*!
- \enum QStyleOptionViewItemV2::ViewItemFeature
-
- This enum describes the different types of features an item can have.
-
- \value None Indicates a normal item.
- \value WrapText Indicates an item with wrapped text.
- \value Alternate Indicates that the item's background is rendered using alternateBase.
- \value HasCheckIndicator Indicates that the item has a check state indicator.
- \value HasDisplay Indicates that the item has a display role.
- \value HasDecoration Indicates that the item has a decoration role.
-*/
-
-
-
-/*!
- \class QStyleOptionViewItemV3
- \brief The QStyleOptionViewItemV3 class is used to describe the
- parameters necessary for drawing a frame in Qt 4.3 or above.
- \since 4.3
- \inmodule QtWidgets
-
- QStyleOptionViewItemV3 inherits QStyleOptionViewItem.
-
- An instance of the QStyleOptionViewItemV3 class has
- \l{QStyleOption::type} {type} SO_ViewItem and \l{QStyleOption::version}
- {version} 3. The type is used internally by QStyleOption, its subclasses,
- and qstyleoption_cast() to determine the type of style option. In general
- you do not need to worry about this unless you want to create your own
- QStyleOption subclass and your own styles. The version is used by
- QStyleOption subclasses to implement extensions without breaking
- compatibility. If you use qstyleoption_cast(), you normally do not need to
- check it.
-
- See QStyleOptionFrameV2's detailed description for a discussion
- of how to handle "V2" and other versioned classes.
-
- \sa QStyleOptionViewItem, QStyleOption
-*/
-
-/*!
- \enum QStyleOptionViewItemV3::StyleOptionVersion
-
- This enum is used to hold information about the version of the
- style option, and is defined for each QStyleOption subclass.
-
- \value Version 3
-
- The version is used by QStyleOption subclasses to implement
- extensions without breaking compatibility. If you use
- qstyleoption_cast(), you normally do not need to check it.
-
- \sa StyleOptionType
-*/
-
-/*!
- Constructs a QStyleOptionViewItemV3 object.
-*/
-QStyleOptionViewItemV3::QStyleOptionViewItemV3()
- : QStyleOptionViewItemV2(Version), widget(0)
-{
-}
-
-/*!
- Constructs a copy of \a other.
-*/
-QStyleOptionViewItemV3::QStyleOptionViewItemV3(const QStyleOptionViewItem &other)
- : QStyleOptionViewItemV2(Version), widget(0)
-{
- (void)QStyleOptionViewItemV3::operator=(other);
-}
-
-/*!
- \fn QStyleOptionViewItemV3::QStyleOptionViewItemV3(const QStyleOptionViewItemV3 &other)
-
- Constructs a copy of \a other.
-*/
-
-/*!
- Assigns the \a other style option to this style option. The \a
- other style option can be an instance of the QStyleOptionViewItemV2,
- QStyleOptionViewItemV3 or QStyleOptionViewItem types.
-*/
-QStyleOptionViewItemV3 &QStyleOptionViewItemV3::operator = (const QStyleOptionViewItem &other)
-{
- QStyleOptionViewItemV2::operator=(other);
- const QStyleOptionViewItemV3 *v3 = qstyleoption_cast<const QStyleOptionViewItemV3*>(&other);
- locale = v3 ? v3->locale : QLocale();
- widget = v3 ? v3->widget : 0;
- return *this;
-}
-
-/*!
- \internal
-*/
-QStyleOptionViewItemV3::QStyleOptionViewItemV3(int version)
- : QStyleOptionViewItemV2(version), widget(0)
-{
-}
-
-#ifndef QT_NO_ITEMVIEWS
-
-/*!
- \class QStyleOptionViewItemV4
- \brief The QStyleOptionViewItemV4 class is used to describe the
- parameters necessary for drawing a frame in Qt 4.4 or above.
- \since 4.4
- \inmodule QtWidgets
-
- QStyleOptionViewItemV4 inherits QStyleOptionViewItemV3.
-
- An instance of the QStyleOptionViewItemV4 class has
- \l{QStyleOption::type} {type} SO_ViewItem and
- \l{QStyleOption::version} {version} 4. The type is used internally
- by QStyleOption, its subclasses, and qstyleoption_cast() to
- determine the type of style option. In general you do not need to
- worry about this unless you want to create your own QStyleOption
- subclass and your own styles. The version is used by QStyleOption
- subclasses to implement extensions without breaking
- compatibility. If you use qstyleoption_cast(), you normally do not
- need to check it.
-
- See QStyleOptionViewItemV3's detailed description for a discussion
- of how to handle "V3" classes.
-
- \sa QStyleOptionViewItem, QStyleOption
-*/
-
-/*!
- \variable QStyleOptionViewItemV4::index
-
- The model index that is to be drawn.
-*/
-
-/*!
- \variable QStyleOptionViewItemV4::checkState
-
- If this view item is checkable, i.e.,
- ViewItemFeature::HasCheckIndicator is true, \c checkState is true
- if the item is checked; otherwise, it is false.
-
-*/
-
-/*!
- \variable QStyleOptionViewItemV4::icon
-
- The icon (if any) to be drawn in the view item.
-*/
-
-
-/*!
- \variable QStyleOptionViewItemV4::text
-
- The text (if any) to be drawn in the view item.
-*/
-
-/*!
- \variable QStyleOptionViewItemV4::backgroundBrush
-
- The QBrush that should be used to paint the view items
- background.
-*/
-
-/*!
- \variable QStyleOptionViewItemV4::viewItemPosition
-
- Gives the position of this view item relative to other items. See
- the \l{QStyleOptionViewItemV4::}{ViewItemPosition} enum for the
- details.
-*/
-
-/*!
- \enum QStyleOptionViewItemV4::StyleOptionVersion
-
- This enum is used to hold information about the version of the
- style option, and is defined for each QStyleOption subclass.
-
- \value Version 4
-
- The version is used by QStyleOption subclasses to implement
- extensions without breaking compatibility. If you use
- qstyleoption_cast(), you normally do not need to check it.
-
- \sa StyleOptionType
-*/
-
-/*!
- \enum QStyleOptionViewItemV4::ViewItemPosition
-
- This enum is used to represent the placement of the item on
- a row. This can be used to draw items differently depending
- on their placement, for example by putting rounded edges at
- the beginning and end, and straight edges in between.
-
- \value Invalid The ViewItemPosition is unknown and should be
- disregarded.
- \value Beginning The item appears at the beginning of the row.
- \value Middle The item appears in the middle of the row.
- \value End The item appears at the end of the row.
- \value OnlyOne The item is the only one on the row, and is
- therefore both at the beginning and the end.
-*/
-
-
-/*!
- Constructs a QStyleOptionViewItemV4 object.
-*/
-QStyleOptionViewItemV4::QStyleOptionViewItemV4()
-: QStyleOptionViewItemV3(Version), checkState(Qt::Unchecked), viewItemPosition(QStyleOptionViewItemV4::Invalid)
-{
-}
-
-/*!
- \fn QStyleOptionViewItemV4::QStyleOptionViewItemV4(const QStyleOptionViewItemV4 &other)
-
- Constructs a copy of \a other.
-*/
-
-/*!
- Constructs a QStyleOptionViewItemV4 copy of the \a other style option
- which can be either of the QStyleOptionViewItemV3 or
- QStyleOptionViewItem types.
-
- \sa version
-*/
-QStyleOptionViewItemV4::QStyleOptionViewItemV4(const QStyleOptionViewItem &other)
- : QStyleOptionViewItemV3(Version)
-{
- (void)QStyleOptionViewItemV4::operator=(other);
-}
-
-/*!
- Assigns the \a other style option to this style option. The \a
- other style option can be either of the QStyleOptionViewItemV3 or
- QStyleOptionViewItem types.
-*/
-QStyleOptionViewItemV4 &QStyleOptionViewItemV4::operator = (const QStyleOptionViewItem &other)
-{
- QStyleOptionViewItemV3::operator=(other);
- if (const QStyleOptionViewItemV4 *v4 = qstyleoption_cast<const QStyleOptionViewItemV4*>(&other)) {
- index = v4->index;
- checkState = v4->checkState;
- text = v4->text;
- viewItemPosition = v4->viewItemPosition;
- backgroundBrush = v4->backgroundBrush;
- icon = v4->icon;
- } else {
- viewItemPosition = QStyleOptionViewItemV4::Invalid;
- checkState = Qt::Unchecked;
- }
- return *this;
-}
-
-/*!
- \internal
-*/
-QStyleOptionViewItemV4::QStyleOptionViewItemV4(int version)
- : QStyleOptionViewItemV3(version)
-{
-}
-#endif // QT_NO_ITEMVIEWS
-
-/*!
\class QStyleOptionGroupBox
\brief The QStyleOptionGroupBox class describes the parameters for
drawing a group box.
@@ -1264,7 +689,7 @@ QStyleOptionViewItemV4::QStyleOptionViewItemV4(int version)
The frame is flat by default.
- \sa QStyleOptionFrameV2::FrameFeature
+ \sa QStyleOptionFrame::FrameFeature
*/
/*!
@@ -1281,7 +706,7 @@ QStyleOptionViewItemV4::QStyleOptionViewItemV4(int version)
variables to their default values.
*/
QStyleOptionGroupBox::QStyleOptionGroupBox()
- : QStyleOptionComplex(Version, Type), features(QStyleOptionFrameV2::None),
+ : QStyleOptionComplex(Version, Type), features(QStyleOptionFrame::None),
textAlignment(Qt::AlignLeft), lineWidth(0), midLineWidth(0)
{
}
@@ -1296,7 +721,7 @@ QStyleOptionGroupBox::QStyleOptionGroupBox()
\internal
*/
QStyleOptionGroupBox::QStyleOptionGroupBox(int version)
- : QStyleOptionComplex(version, Type), features(QStyleOptionFrameV2::None),
+ : QStyleOptionComplex(version, Type), features(QStyleOptionFrame::None),
textAlignment(Qt::AlignLeft), lineWidth(0), midLineWidth(0)
{
}
@@ -1808,13 +1233,11 @@ QStyleOptionToolBar::QStyleOptionToolBar(int version)
\inmodule QtWidgets
The QStyleOptionTab class is used for drawing several built-in Qt
- widgets including \l QTabBar and the panel for \l QTabWidget. Note
- that to describe the parameters necessary for drawing a frame in
- Qt 4.1 or above, you must use the QStyleOptionFrameV2 subclass.
+ widgets including \l QTabBar and the panel for \l QTabWidget.
- An instance of the QStyleOptiontabV2 class has
+ An instance of the QStyleOptionTab class has
\l{QStyleOption::type} {type} \l SO_Tab and
- \l{QStyleOption::version} {version} 1. The type is used internally
+ \l{QStyleOption::version} {version} 3. The type is used internally
by QStyleOption, its subclasses, and qstyleoption_cast() to
determine the type of style option. In general you do not need to
worry about this unless you want to create your own QStyleOption
@@ -1823,13 +1246,24 @@ QStyleOptionToolBar::QStyleOptionToolBar(int version)
compatibility. If you use qstyleoption_cast(), you normally do not
need to check it.
- If you create your own QStyle subclass, you should handle both
- QStyleOptionTab and QStyleOptionTabV2.
-
For an example demonstrating how style options can be used, see
the \l {widgets/styles}{Styles} example.
- \sa QStyleOptionTabV2, QStyleOption
+ \sa QStyleOption
+*/
+
+/*!
+ \typedef QStyleOptionTabV2
+ \relates QStyleOptionTab
+
+ Synonym for QStyleOptionTab.
+*/
+
+/*!
+ \typedef QStyleOptionTabV3
+ \relates QStyleOptionTab
+
+ Synonym for QStyleOptionTab.
*/
/*!
@@ -1842,7 +1276,8 @@ QStyleOptionTab::QStyleOptionTab()
shape(QTabBar::RoundedNorth),
row(0),
position(Beginning),
- selectedPosition(NotAdjacent), cornerWidgets(QStyleOptionTab::NoCornerWidgets)
+ selectedPosition(NotAdjacent), cornerWidgets(QStyleOptionTab::NoCornerWidgets),
+ documentMode(false)
{
}
@@ -1854,7 +1289,8 @@ QStyleOptionTab::QStyleOptionTab(int version)
shape(QTabBar::RoundedNorth),
row(0),
position(Beginning),
- selectedPosition(NotAdjacent), cornerWidgets(QStyleOptionTab::NoCornerWidgets)
+ selectedPosition(NotAdjacent), cornerWidgets(QStyleOptionTab::NoCornerWidgets),
+ documentMode(false)
{
}
@@ -1886,7 +1322,7 @@ QStyleOptionTab::QStyleOptionTab(int version)
This enum is used to hold information about the version of the style option, and
is defined for each QStyleOption subclass.
- \value Version 1
+ \value Version 3
The version is used by QStyleOption subclasses to implement
extensions without breaking compatibility. If you use
@@ -1990,60 +1426,8 @@ QStyleOptionTab::QStyleOptionTab(int version)
The default value is \l Beginning, i.e. the tab is the first tab
in the tab bar.
*/
-
-/*!
- \class QStyleOptionTabV2
- \brief The QStyleOptionTabV2 class is used to describe the
- parameters necessary for drawing a tabs in Qt 4.1 or above.
-
- \since 4.1
- \inmodule QtWidgets
-
- An instance of the QStyleOptionTabV2 class has
- \l{QStyleOption::type} {type} \l SO_Tab and
- \l{QStyleOption::version} {version} 2. The type is used internally
- by QStyleOption, its subclasses, and qstyleoption_cast() to
- determine the type of style option. In general you do not need to
- worry about this unless you want to create your own QStyleOption
- subclass and your own styles. The version is used by QStyleOption
- subclasses to implement extensions without breaking
- compatibility. If you use qstyleoption_cast(), you normally do not
- need to check it.
-
- If you create your own QStyle subclass, you should handle both
- QStyleOptionTab and QStyleOptionTabV2. One way to achieve this is
- to use the QStyleOptionTabV2 copy constructor. For example:
-
- \snippet doc/src/snippets/qstyleoption/main.cpp 3
-
- In the example above: If \c tabOption's version is 1, the extra
- member (\l iconSize) will be set to an invalid size for \c tabV2.
- If \c tabOption's version is 2, the constructor will simply copy
- the \c tab's iconSize.
-
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
- \sa QStyleOptionTab, QStyleOption
-*/
-
/*!
- \enum QStyleOptionTabV2::StyleOptionVersion
-
- This enum is used to hold information about the version of the style option, and
- is defined for each QStyleOption subclass.
-
- \value Version 2
-
- The version is used by QStyleOption subclasses to implement
- extensions without breaking compatibility. If you use
- qstyleoption_cast(), you normally do not need to check it.
-
- \sa StyleOptionType
-*/
-
-/*!
- \variable QStyleOptionTabV2::iconSize
+ \variable QStyleOptionTab::iconSize
\brief the size for the icons
The default value is QSize(-1, -1), i.e. an invalid size; use
@@ -2053,216 +1437,26 @@ QStyleOptionTab::QStyleOptionTab(int version)
*/
/*!
- Constructs a QStyleOptionTabV2.
-*/
-QStyleOptionTabV2::QStyleOptionTabV2()
- : QStyleOptionTab(Version)
-{
-}
-
-/*!
- \internal
-*/
-QStyleOptionTabV2::QStyleOptionTabV2(int version)
- : QStyleOptionTab(version)
-{
-}
-
-/*!
- \fn QStyleOptionTabV2::QStyleOptionTabV2(const QStyleOptionTabV2 &other)
-
- Constructs a copy of the \a other style option.
-*/
-
-/*!
- Constructs a QStyleOptionTabV2 copy of the \a other style option
- which can be either of the QStyleOptionTabV2 or QStyleOptionTab
- types.
-
- If the other style option's version is 1, the new style option's
- \c iconSize is set to an invalid value. If its version is 2, its
- \c iconSize value is simply copied to the new style option.
-*/
-QStyleOptionTabV2::QStyleOptionTabV2(const QStyleOptionTab &other)
- : QStyleOptionTab(Version)
-{
- if (const QStyleOptionTabV2 *tab = qstyleoption_cast<const QStyleOptionTabV2 *>(&other)) {
- *this = *tab;
- } else {
- *((QStyleOptionTab *)this) = other;
- version = Version;
- }
-}
-
-/*!
- Assigns the \a other style option to this QStyleOptionTabV2. The
- \a other style option can be either of the QStyleOptionTabV2 or
- QStyleOptionTab types.
-
- If the other style option's version is 1, this style option's \c
- iconSize is set to an invalid size. If its version is 2, its \c
- iconSize value is simply copied to this style option.
-*/
-QStyleOptionTabV2 &QStyleOptionTabV2::operator=(const QStyleOptionTab &other)
-{
- QStyleOptionTab::operator=(other);
-
- if (const QStyleOptionTabV2 *tab = qstyleoption_cast<const QStyleOptionTabV2 *>(&other))
- iconSize = tab->iconSize;
- else
- iconSize = QSize();
- return *this;
-}
-
-/*!
- \class QStyleOptionTabV3
- \brief The QStyleOptionTabV3 class is used to describe the
- parameters necessary for drawing a tabs in Qt 4.5 or above.
-
- \since 4.5
- \inmodule QtWidgets
-
- An instance of the QStyleOptionTabV3 class has
- \l{QStyleOption::type} {type} \l SO_Tab and
- \l{QStyleOption::version} {version} 3. The type is used internally
- by QStyleOption, its subclasses, and qstyleoption_cast() to
- determine the type of style option. In general you do not need to
- worry about this unless you want to create your own QStyleOption
- subclass and your own styles. The version is used by QStyleOption
- subclasses to implement extensions without breaking
- compatibility. If you use qstyleoption_cast(), you normally do not
- need to check it.
-
- If you create your own QStyle subclass, you should handle both
- QStyleOptionTab, QStyleOptionTabV2 and QStyleOptionTabV3.
- One way to achieve this is to use the QStyleOptionTabV3 copy
- constructor. For example:
-
- \snippet doc/src/snippets/qstyleoption/main.cpp 3
-
- In the example above: If \c tabOption's version is 1, the extra
- member (\l{QStyleOptionTabV2::iconSize}{iconSize}) will be set to
- an invalid size for \c tabV2. If \c tabOption's version is 2, the
- constructor will simply copy the \c tab's iconSize.
-
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
- \sa QStyleOptionTab, QStyleOption
-*/
-
-/*!
- \enum QStyleOptionTabV3::StyleOptionVersion
-
- This enum is used to hold information about the version of the style option, and
- is defined for each QStyleOption subclass.
-
- \value Version 3
-
- The version is used by QStyleOption subclasses to implement
- extensions without breaking compatibility. If you use
- qstyleoption_cast(), you normally do not need to check it.
-
- \sa StyleOptionType
-*/
-
-/*!
- \variable QStyleOptionTabV3::documentMode
+ \variable QStyleOptionTab::documentMode
\brief whether the tabbar is in document mode.
The default value is false;
*/
/*!
- \variable QStyleOptionTabV3::leftButtonSize
+ \variable QStyleOptionTab::leftButtonSize
\brief the size for the left widget on the tab.
The default value is QSize(-1, -1), i.e. an invalid size;
*/
/*!
- \variable QStyleOptionTabV3::rightButtonSize
+ \variable QStyleOptionTab::rightButtonSize
\brief the size for the right widget on the tab.
The default value is QSize(-1, -1), i.e. an invalid size;
*/
-/*!
- Constructs a QStyleOptionTabV3.
-*/
-
-QStyleOptionTabV3::QStyleOptionTabV3()
- : QStyleOptionTabV2(Version)
- , documentMode(false)
-{
-}
-
-/*!
- \internal
-*/
-QStyleOptionTabV3::QStyleOptionTabV3(int version)
- : QStyleOptionTabV2(version)
-{
-}
-
-/*!
- \fn QStyleOptionTabV3::QStyleOptionTabV3(const QStyleOptionTabV3 &other)
-
- Constructs a copy of the \a other style option.
-*/
-
-/*!
- \fn QStyleOptionTabV3::QStyleOptionTabV3(const QStyleOptionTabV2 &other)
-
- Constructs a copy of the \a other style option.
-*/
-
-/*!
- Constructs a QStyleOptionTabV3 copy of the \a other style option
- which can be either of the QStyleOptionTabV3, QStyleOptionTabV2
- or QStyleOptionTab types.
-
- If the other style option's version is 1 or 2, the new style option's
- \c leftButtonSize and \c rightButtonSize is set to an invalid value. If
- its version is 3, its \c leftButtonSize and \c rightButtonSize values
- are simply copied to the new style option.
-*/
-QStyleOptionTabV3::QStyleOptionTabV3(const QStyleOptionTab &other)
- : QStyleOptionTabV2(Version)
-{
- if (const QStyleOptionTabV3 *tab = qstyleoption_cast<const QStyleOptionTabV3 *>(&other)) {
- *this = *tab;
- } else {
- *((QStyleOptionTabV2 *)this) = other;
- version = Version;
- }
-}
-
-/*!
- Assigns the \a other style option to this QStyleOptionTabV3. The
- \a other style option can be either of the QStyleOptionTabV3,
- QStyleOptionTabV2 or QStyleOptionTab types.
-
- If the other style option's version is 1 or 2, the new style option's
- \c leftButtonSize and \c rightButtonSize is set to an invalid value. If
- its version is 3, its \c leftButtonSize and \c rightButtonSize values
- are simply copied to the new style option.
-*/
-QStyleOptionTabV3 &QStyleOptionTabV3::operator=(const QStyleOptionTab &other)
-{
- QStyleOptionTabV2::operator=(other);
-
- if (const QStyleOptionTabV3 *tab = qstyleoption_cast<const QStyleOptionTabV3 *>(&other)) {
- leftButtonSize = tab->leftButtonSize;
- rightButtonSize = tab->rightButtonSize;
- } else {
- leftButtonSize = QSize();
- rightButtonSize = QSize();
- documentMode = false;
- }
- return *this;
-}
-
#endif // QT_NO_TABBAR
/*!
@@ -2271,12 +1465,9 @@ QStyleOptionTabV3 &QStyleOptionTabV3::operator=(const QStyleOptionTab &other)
parameters necessary for drawing a progress bar.
\inmodule QtWidgets
-
- Since Qt 4.1, Qt uses the QStyleOptionProgressBarV2 subclass for
- drawing QProgressBar.
An instance of the QStyleOptionProgressBar class has type
- SO_ProgressBar and version 1.
+ SO_ProgressBar and version 2.
The type is used internally by QStyleOption, its subclasses, and
qstyleoption_cast() to determine the type of style option. In
@@ -2286,13 +1477,17 @@ QStyleOptionTabV3 &QStyleOptionTabV3::operator=(const QStyleOptionTab &other)
without breaking compatibility. If you use qstyleoption_cast(),
you normally do not need to check it.
- If you create your own QStyle subclass, you should handle both
- QStyleOptionProgressBar and QStyleOptionProgressBarV2.
-
For an example demonstrating how style options can be used, see
the \l {widgets/styles}{Styles} example.
- \sa QStyleOptionProgressBarV2, QStyleOption
+ \sa QStyleOption
+*/
+
+/*!
+ \typedef QStyleOptionProgressBarV2
+ \relates QStyleOptionProgressBar
+
+ Synonym for QStyleOptionProgressBar.
*/
/*!
@@ -2302,7 +1497,8 @@ QStyleOptionTabV3 &QStyleOptionTabV3::operator=(const QStyleOptionTab &other)
QStyleOptionProgressBar::QStyleOptionProgressBar()
: QStyleOption(QStyleOptionProgressBar::Version, SO_ProgressBar),
- minimum(0), maximum(0), progress(0), textAlignment(Qt::AlignLeft), textVisible(false)
+ minimum(0), maximum(0), progress(0), textAlignment(Qt::AlignLeft), textVisible(false),
+ orientation(Qt::Horizontal), invertedAppearance(false), bottomToTop(false)
{
}
@@ -2311,7 +1507,8 @@ QStyleOptionProgressBar::QStyleOptionProgressBar()
*/
QStyleOptionProgressBar::QStyleOptionProgressBar(int version)
: QStyleOption(version, SO_ProgressBar),
- minimum(0), maximum(0), progress(0), textAlignment(Qt::AlignLeft), textVisible(false)
+ minimum(0), maximum(0), progress(0), textAlignment(Qt::AlignLeft), textVisible(false),
+ orientation(Qt::Horizontal), invertedAppearance(false), bottomToTop(false)
{
}
@@ -2343,7 +1540,7 @@ QStyleOptionProgressBar::QStyleOptionProgressBar(int version)
This enum is used to hold information about the version of the style option, and
is defined for each QStyleOption subclass.
- \value Version 1
+ \value Version 2
The version is used by QStyleOption subclasses to implement
extensions without breaking compatibility. If you use
@@ -2414,118 +1611,7 @@ QStyleOptionProgressBar::QStyleOptionProgressBar(int version)
*/
/*!
- \class QStyleOptionProgressBarV2
- \brief The QStyleOptionProgressBarV2 class is used to describe the
- parameters necessary for drawing a progress bar in Qt 4.1 or above.
-
- \since 4.1
- \inmodule QtWidgets
-
- An instance of this class has \l{QStyleOption::type} {type}
- SO_ProgressBar and \l{QStyleOption::version} {version} 2.
-
- The type is used internally by QStyleOption, its subclasses, and
- qstyleoption_cast() to determine the type of style option. In
- general you do not need to worry about this unless you want to
- create your own QStyleOption subclass and your own styles. The
- version is used by QStyleOption subclasses to implement extensions
- without breaking compatibility. If you use qstyleoption_cast(),
- you normally do not need to check it.
-
- If you create your own QStyle subclass, you should handle both
- QStyleOptionProgressBar and QStyleOptionProgressBarV2. One way
- to achieve this is to use the QStyleOptionProgressBarV2 copy
- constructor. For example:
-
- \snippet doc/src/snippets/qstyleoption/main.cpp 2
-
- In the example above: If the \c progressBarOption's version is 1,
- the extra members (\l orientation, \l invertedAppearance, and \l
- bottomToTop) are set to default values for \c progressBarV2. If
- the \c progressBarOption's version is 2, the constructor will
- simply copy the extra members to progressBarV2.
-
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
- \sa QStyleOptionProgressBar, QStyleOption
-*/
-
-/*!
- Constructs a QStyleOptionProgressBarV2, initializing he members
- variables to their default values.
-*/
-
-QStyleOptionProgressBarV2::QStyleOptionProgressBarV2()
- : QStyleOptionProgressBar(2),
- orientation(Qt::Horizontal), invertedAppearance(false), bottomToTop(false)
-{
-}
-
-/*!
- \internal
-*/
-QStyleOptionProgressBarV2::QStyleOptionProgressBarV2(int version)
- : QStyleOptionProgressBar(version),
- orientation(Qt::Horizontal), invertedAppearance(false), bottomToTop(false)
-{
-}
-
-/*!
- Constructs a copy of the \a other style option which can be either
- of the QStyleOptionProgressBar and QStyleOptionProgressBarV2
- types.
-
- If the \a{other} style option's version is 1, the extra members (\l
- orientation, \l invertedAppearance, and \l bottomToTop) are set
- to default values for the new style option. If \a{other}'s version
- is 2, the extra members are simply copied.
-
- \sa version
-*/
-QStyleOptionProgressBarV2::QStyleOptionProgressBarV2(const QStyleOptionProgressBar &other)
- : QStyleOptionProgressBar(2), orientation(Qt::Horizontal), invertedAppearance(false), bottomToTop(false)
-{
- const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(&other);
- if (pb2)
- *this = *pb2;
- else
- *((QStyleOptionProgressBar *)this) = other;
-}
-
-/*!
- Constructs a copy of the \a other style option.
-*/
-QStyleOptionProgressBarV2::QStyleOptionProgressBarV2(const QStyleOptionProgressBarV2 &other)
- : QStyleOptionProgressBar(2), orientation(Qt::Horizontal), invertedAppearance(false), bottomToTop(false)
-{
- *this = other;
-}
-
-/*!
- Assigns the \a other style option to this style option. The \a
- other style option can be either of the QStyleOptionProgressBarV2
- or QStyleOptionProgressBar types.
-
- If the \a{other} style option's version is 1, the extra members
- (\l orientation, \l invertedAppearance, and \l bottomToTop) are
- set to default values for this style option. If \a{other}'s
- version is 2, the extra members are simply copied to this style
- option.
-*/
-QStyleOptionProgressBarV2 &QStyleOptionProgressBarV2::operator=(const QStyleOptionProgressBar &other)
-{
- QStyleOptionProgressBar::operator=(other);
-
- const QStyleOptionProgressBarV2 *pb2 = qstyleoption_cast<const QStyleOptionProgressBarV2 *>(&other);
- orientation = pb2 ? pb2->orientation : Qt::Horizontal;
- invertedAppearance = pb2 ? pb2->invertedAppearance : false;
- bottomToTop = pb2 ? pb2->bottomToTop : false;
- return *this;
-}
-
-/*!
- \variable QStyleOptionProgressBarV2::orientation
+ \variable QStyleOptionProgressBar::orientation
\brief the progress bar's orientation (horizontal or vertical);
the default orentation is Qt::Horizontal
@@ -2533,7 +1619,7 @@ QStyleOptionProgressBarV2 &QStyleOptionProgressBarV2::operator=(const QStyleOpti
*/
/*!
- \variable QStyleOptionProgressBarV2::invertedAppearance
+ \variable QStyleOptionProgressBar::invertedAppearance
\brief whether the progress bar's appearance is inverted
The default value is false.
@@ -2542,7 +1628,7 @@ QStyleOptionProgressBarV2 &QStyleOptionProgressBarV2::operator=(const QStyleOpti
*/
/*!
- \variable QStyleOptionProgressBarV2::bottomToTop
+ \variable QStyleOptionProgressBar::bottomToTop
\brief whether the text reads from bottom to top when the progress
bar is vertical
@@ -2552,38 +1638,6 @@ QStyleOptionProgressBarV2 &QStyleOptionProgressBarV2::operator=(const QStyleOpti
*/
/*!
- \enum QStyleOptionProgressBarV2::StyleOptionType
-
- This enum is used to hold information about the type of the style option, and
- is defined for each QStyleOption subclass.
-
- \value Type The type of style option provided (\l{SO_ProgressBar} for this class).
-
- The type is used internally by QStyleOption, its subclasses, and
- qstyleoption_cast() to determine the type of style option. In
- general you do not need to worry about this unless you want to
- create your own QStyleOption subclass and your own styles.
-
- \sa StyleOptionVersion
-*/
-
-/*!
- \enum QStyleOptionProgressBarV2::StyleOptionVersion
-
- This enum is used to hold information about the version of the style option, and
- is defined for each QStyleOption subclass.
-
- \value Version 2
-
- The version is used by QStyleOption subclasses to implement
- extensions without breaking compatibility. If you use
- qstyleoption_cast(), you normally do not need to check it.
-
- \sa StyleOptionType
-*/
-
-
-/*!
\class QStyleOptionMenuItem
\brief The QStyleOptionMenuItem class is used to describe the
parameter necessary for drawing a menu item.
@@ -3576,13 +2630,20 @@ QStyleOptionQ3DockWindow::QStyleOptionQ3DockWindow(int version)
*/
/*!
+ \typedef QStyleOptionDockWidgetV2
+ \relates QStyleOptionDockWidget
+
+ Synonym for QStyleOptionDockWidget.
+*/
+
+/*!
Constructs a QStyleOptionDockWidget, initializing the member
variables to their default values.
*/
QStyleOptionDockWidget::QStyleOptionDockWidget()
: QStyleOption(Version, SO_DockWidget), closable(false),
- movable(false), floatable(false)
+ movable(false), floatable(false), verticalTitleBar(false)
{
}
@@ -3591,34 +2652,7 @@ QStyleOptionDockWidget::QStyleOptionDockWidget()
*/
QStyleOptionDockWidget::QStyleOptionDockWidget(int version)
: QStyleOption(version, SO_DockWidget), closable(false),
- movable(false), floatable(false)
-{
-}
-
-QStyleOptionDockWidgetV2::QStyleOptionDockWidgetV2()
- : QStyleOptionDockWidget(Version), verticalTitleBar(false)
-{
-}
-
-QStyleOptionDockWidgetV2::QStyleOptionDockWidgetV2(
- const QStyleOptionDockWidget &other)
- : QStyleOptionDockWidget(Version)
-{
- (void)QStyleOptionDockWidgetV2::operator=(other);
-}
-
-QStyleOptionDockWidgetV2 &QStyleOptionDockWidgetV2::operator = (
- const QStyleOptionDockWidget &other)
-{
- QStyleOptionDockWidget::operator=(other);
- const QStyleOptionDockWidgetV2 *v2
- = qstyleoption_cast<const QStyleOptionDockWidgetV2*>(&other);
- verticalTitleBar = v2 ? v2->verticalTitleBar : false;
- return *this;
-}
-
-QStyleOptionDockWidgetV2::QStyleOptionDockWidgetV2(int version)
- : QStyleOptionDockWidget(version), verticalTitleBar(false)
+ movable(false), floatable(false), verticalTitleBar(false)
{
}
@@ -3650,7 +2684,7 @@ QStyleOptionDockWidgetV2::QStyleOptionDockWidgetV2(int version)
This enum is used to hold information about the version of the style option, and
is defined for each QStyleOption subclass.
- \value Version 1
+ \value Version 2
The version is used by QStyleOption subclasses to implement
extensions without breaking compatibility. If you use
@@ -3693,7 +2727,7 @@ QStyleOptionDockWidgetV2::QStyleOptionDockWidgetV2(int version)
parameters for drawing a tool button.
\inmodule QtWidgets
-
+
QStyleOptionToolButton contains all the information that QStyle
functions need to draw QToolButton.
@@ -3857,7 +2891,7 @@ QStyleOptionToolButton::QStyleOptionToolButton(int version)
parameter for drawing a combobox.
\inmodule QtWidgets
-
+
QStyleOptionButton contains all the information that QStyle
functions need to draw QComboBox.
@@ -3985,7 +3019,7 @@ QStyleOptionComboBox::QStyleOptionComboBox(int version)
parameters needed for drawing a tool box.
\inmodule QtWidgets
-
+
QStyleOptionToolBox contains all the information that QStyle
functions need to draw QToolBox.
@@ -4001,12 +3035,19 @@ QStyleOptionComboBox::QStyleOptionComboBox(int version)
*/
/*!
+ \typedef QStyleOptionToolBoxV2
+ \relates QStyleOptionToolBox
+
+ Synonym for QStyleOptionToolBox.
+*/
+
+/*!
Creates a QStyleOptionToolBox, initializing the members variables
to their default values.
*/
QStyleOptionToolBox::QStyleOptionToolBox()
- : QStyleOption(Version, SO_ToolBox)
+ : QStyleOption(Version, SO_ToolBox), position(Beginning), selectedPosition(NotAdjacent)
{
}
@@ -4014,7 +3055,7 @@ QStyleOptionToolBox::QStyleOptionToolBox()
\internal
*/
QStyleOptionToolBox::QStyleOptionToolBox(int version)
- : QStyleOption(version, SO_ToolBox)
+ : QStyleOption(version, SO_ToolBox), position(Beginning), selectedPosition(NotAdjacent)
{
}
@@ -4046,7 +3087,7 @@ QStyleOptionToolBox::QStyleOptionToolBox(int version)
This enum is used to hold information about the version of the style option, and
is defined for each QStyleOption subclass.
- \value Version 1
+ \value Version 2
The version is used by QStyleOption subclasses to implement
extensions without breaking compatibility. If you use
@@ -4071,104 +3112,7 @@ QStyleOptionToolBox::QStyleOptionToolBox(int version)
*/
/*!
- \class QStyleOptionToolBoxV2
- \brief The QStyleOptionToolBoxV2 class is used to describe the parameters necessary for drawing a frame in Qt 4.3 or above.
-
- \since 4.3
- \inmodule QtWidgets
-
- QStyleOptionToolBoxV2 inherits QStyleOptionToolBox which is used for
- drawing the tabs in a QToolBox.
-
- An instance of the QStyleOptionToolBoxV2 class has
- \l{QStyleOption::type} {type} SO_ToolBox and
- \l{QStyleOption::version} {version} 2. The type is used
- internally by QStyleOption, its subclasses, and
- qstyleoption_cast() to determine the type of style option. In
- general you do not need to worry about this unless you want to
- create your own QStyleOption subclass and your own styles. The
- version is used by QStyleOption subclasses to implement extensions
- without breaking compatibility. If you use qstyleoption_cast(),
- you normally do not need to check it.
-
- If you create your own QStyle subclass, you should handle both
- QStyleOptionToolBox and QStyleOptionToolBoxV2.
-
- \sa QStyleOptionToolBox, QStyleOption
-*/
-
-/*!
- Contsructs a QStyleOptionToolBoxV2 object.
-*/
-QStyleOptionToolBoxV2::QStyleOptionToolBoxV2()
- : QStyleOptionToolBox(Version), position(Beginning), selectedPosition(NotAdjacent)
-{
-}
-
-/*!
- \fn QStyleOptionToolBoxV2::QStyleOptionToolBoxV2(const QStyleOptionToolBoxV2 &other)
-
- Constructs a QStyleOptionToolBoxV2 copy of the \a other style option.
-*/
-
-/*!
- \internal
-*/
-QStyleOptionToolBoxV2::QStyleOptionToolBoxV2(int version)
- : QStyleOptionToolBox(version), position(Beginning), selectedPosition(NotAdjacent)
-{
-}
-
-/*!
- Constructs a QStyleOptionToolBoxV2 copy of the \a other style option
- which can be either of the QStyleOptionToolBoxV2 or
- QStyleOptionToolBox types.
-
- If the \a other style option's version is 1, the new style
- option's \l{QStyleOptionTab::position} {position} value is set to
- \l QStyleOptionToolBoxV2::Beginning and \l selectedPosition is set
- to \l QStyleOptionToolBoxV2::NotAdjacent. If its version is 2, the
- \l{QStyleOptionTab::position} {position} selectedPosition values
- are simply copied to the new style option.
-
- \sa version
-*/
-QStyleOptionToolBoxV2::QStyleOptionToolBoxV2(const QStyleOptionToolBox &other)
-{
- QStyleOptionToolBox::operator=(other);
-
- const QStyleOptionToolBoxV2 *f2 = qstyleoption_cast<const QStyleOptionToolBoxV2 *>(&other);
- position = f2 ? f2->position : Beginning;
- selectedPosition = f2 ? f2->selectedPosition : NotAdjacent;
- version = Version;
-}
-
-/*!
- Assigns the \a other style option to this style option. The \a
- other style option can be either of the QStyleOptionToolBoxV2 or
- QStyleOptionToolBox types.
-
- If the \a{other} style option's version is 1, this style option's
- \l{QStyleOptionTab::position} {position} and \l selectedPosition
- values are set to \l QStyleOptionToolBoxV2::Beginning and \l
- QStyleOptionToolBoxV2::NotAdjacent respectively. If its
- \l{QStyleOption::version} {version} is 2, these values are simply
- copied to this style option.
-*/
-QStyleOptionToolBoxV2 &QStyleOptionToolBoxV2::operator=(const QStyleOptionToolBox &other)
-{
- QStyleOptionToolBox::operator=(other);
-
- const QStyleOptionToolBoxV2 *f2 = qstyleoption_cast<const QStyleOptionToolBoxV2 *>(&other);
- position = f2 ? f2->position : Beginning;
- selectedPosition = f2 ? f2->selectedPosition : NotAdjacent;
- version = Version;
- return *this;
-}
-
-
-/*!
- \enum QStyleOptionToolBoxV2::SelectedPosition
+ \enum QStyleOptionToolBox::SelectedPosition
This enum describes the position of the selected tab. Some styles
need to draw a tab differently depending on whether or not it is
@@ -4182,15 +3126,7 @@ QStyleOptionToolBoxV2 &QStyleOptionToolBoxV2::operator=(const QStyleOptionToolBo
*/
/*!
- \enum QStyleOptionToolBoxV2::StyleOptionVersion
-
- This enum holds the version of this style option
-
- \value Version 2
-*/
-
-/*!
- \enum QStyleOptionToolBoxV2::TabPosition
+ \enum QStyleOptionToolBox::TabPosition
This enum describes tab positions relative to other tabs.
@@ -4202,7 +3138,7 @@ QStyleOptionToolBoxV2 &QStyleOptionToolBoxV2::operator=(const QStyleOptionToolBo
*/
/*!
- \variable QStyleOptionToolBoxV2::selectedPosition
+ \variable QStyleOptionToolBox::selectedPosition
\brief the position of the selected tab in relation to this tab
The default value is NotAdjacent, i.e. the tab is not adjacent to
@@ -4216,7 +3152,7 @@ QStyleOptionToolBoxV2 &QStyleOptionToolBoxV2::operator=(const QStyleOptionToolBo
parameters needed for drawing a rubber band.
\inmodule QtWidgets
-
+
QStyleOptionRubberBand contains all the information that
QStyle functions need to draw QRubberBand.
@@ -4307,7 +3243,7 @@ QStyleOptionRubberBand::QStyleOptionRubberBand(int version)
parameters for drawing a title bar.
\inmodule QtWidgets
-
+
QStyleOptionTitleBar contains all the information that QStyle
functions need to draw the title bar of a QMdiSubWindow.
@@ -4412,13 +3348,14 @@ QStyleOptionTitleBar::QStyleOptionTitleBar(int version)
\sa Qt::WindowFlags
*/
+#ifndef QT_NO_ITEMVIEWS
/*!
\class QStyleOptionViewItem
\brief The QStyleOptionViewItem class is used to describe the
parameters used to draw an item in a view widget.
\inmodule QtWidgets
-
+
QStyleOptionViewItem contains all the information that QStyle
functions need to draw the items for Qt's model/view classes.
@@ -4435,6 +3372,27 @@ QStyleOptionTitleBar::QStyleOptionTitleBar(int version)
*/
/*!
+ \typedef QStyleOptionViewItemV2
+ \relates QStyleOptionViewItem
+
+ Synonym for QStyleOptionViewItem.
+*/
+
+/*!
+ \typedef QStyleOptionViewItemV3
+ \relates QStyleOptionViewItem
+
+ Synonym for QStyleOptionViewItem.
+*/
+
+/*!
+ \typedef QStyleOptionViewItemV4
+ \relates QStyleOptionViewItem
+
+ Synonym for QStyleOptionViewItem.
+*/
+
+/*!
\enum QStyleOptionViewItem::Position
This enum describes the position of the item's decoration.
@@ -4479,7 +3437,8 @@ QStyleOptionViewItem::QStyleOptionViewItem()
: QStyleOption(Version, SO_ViewItem),
displayAlignment(Qt::AlignLeft), decorationAlignment(Qt::AlignLeft),
textElideMode(Qt::ElideMiddle), decorationPosition(Left),
- showDecorationSelected(false)
+ showDecorationSelected(false), features(None), widget(0),
+ checkState(Qt::Unchecked), viewItemPosition(QStyleOptionViewItem::Invalid)
{
}
@@ -4490,7 +3449,8 @@ QStyleOptionViewItem::QStyleOptionViewItem(int version)
: QStyleOption(version, SO_ViewItem),
displayAlignment(Qt::AlignLeft), decorationAlignment(Qt::AlignLeft),
textElideMode(Qt::ElideMiddle), decorationPosition(Left),
- showDecorationSelected(false)
+ showDecorationSelected(false), features(None), widget(0),
+ checkState(Qt::Unchecked), viewItemPosition(QStyleOptionViewItem::Invalid)
{
}
@@ -4522,7 +3482,7 @@ QStyleOptionViewItem::QStyleOptionViewItem(int version)
This enum is used to hold information about the version of the style option, and
is defined for each QStyleOption subclass.
- \value Version 1
+ \value Version 4
The version is used by QStyleOption subclasses to implement
extensions without breaking compatibility. If you use
@@ -4573,6 +3533,87 @@ QStyleOptionViewItem::QStyleOptionViewItem(int version)
*/
/*!
+ \variable QStyleOptionViewItem::features
+ \brief a bitwise OR of the features that describe this view item
+
+ \sa ViewItemFeature
+*/
+
+/*!
+ \enum QStyleOptionViewItem::ViewItemFeature
+
+ This enum describes the different types of features an item can have.
+
+ \value None Indicates a normal item.
+ \value WrapText Indicates an item with wrapped text.
+ \value Alternate Indicates that the item's background is rendered using alternateBase.
+ \value HasCheckIndicator Indicates that the item has a check state indicator.
+ \value HasDisplay Indicates that the item has a display role.
+ \value HasDecoration Indicates that the item has a decoration role.
+*/
+
+/*!
+ \variable QStyleOptionViewItem::index
+
+ The model index that is to be drawn.
+*/
+
+/*!
+ \variable QStyleOptionViewItem::checkState
+
+ If this view item is checkable, i.e.,
+ ViewItemFeature::HasCheckIndicator is true, \c checkState is true
+ if the item is checked; otherwise, it is false.
+
+*/
+
+/*!
+ \variable QStyleOptionViewItem::icon
+
+ The icon (if any) to be drawn in the view item.
+*/
+
+
+/*!
+ \variable QStyleOptionViewItem::text
+
+ The text (if any) to be drawn in the view item.
+*/
+
+/*!
+ \variable QStyleOptionViewItem::backgroundBrush
+
+ The QBrush that should be used to paint the view items
+ background.
+*/
+
+/*!
+ \variable QStyleOptionViewItem::viewItemPosition
+
+ Gives the position of this view item relative to other items. See
+ the \l{QStyleOptionViewItem::}{ViewItemPosition} enum for the
+ details.
+*/
+
+/*!
+ \enum QStyleOptionViewItem::ViewItemPosition
+
+ This enum is used to represent the placement of the item on
+ a row. This can be used to draw items differently depending
+ on their placement, for example by putting rounded edges at
+ the beginning and end, and straight edges in between.
+
+ \value Invalid The ViewItemPosition is unknown and should be
+ disregarded.
+ \value Beginning The item appears at the beginning of the row.
+ \value Middle The item appears in the middle of the row.
+ \value End The item appears at the end of the row.
+ \value OnlyOne The item is the only one on the row, and is
+ therefore both at the beginning and the end.
+*/
+
+#endif // QT_NO_ITEMVIEWS
+/*!
\fn T qstyleoption_cast<T>(const QStyleOption *option)
\relates QStyleOption
@@ -4601,7 +3642,7 @@ QStyleOptionViewItem::QStyleOptionViewItem(int version)
parameters for drawing the frame around a tab widget.
\inmodule QtWidgets
-
+
QStyleOptionTabWidgetFrame contains all the information that
QStyle functions need to draw the frame around QTabWidget.
@@ -4617,6 +3658,13 @@ QStyleOptionViewItem::QStyleOptionViewItem(int version)
*/
/*!
+ \typedef QStyleOptionTabWidgetFrameV2
+ \relates QStyleOptionTabWidgetFrame
+
+ Synonym for QStyleOptionTabWidgetFrame.
+*/
+
+/*!
Constructs a QStyleOptionTabWidgetFrame, initializing the members
variables to their default values.
*/
@@ -4661,7 +3709,7 @@ QStyleOptionTabWidgetFrame::QStyleOptionTabWidgetFrame(int version)
This enum is used to hold information about the version of the style option, and
is defined for each QStyleOption subclass.
- \value Version 1
+ \value Version 2
The version is used by QStyleOption subclasses to implement
extensions without breaking compatibility. If you use
@@ -4714,30 +3762,7 @@ QStyleOptionTabWidgetFrame::QStyleOptionTabWidgetFrame(int version)
/*!
-
- \class QStyleOptionTabWidgetFrameV2
- \brief The QStyleOptionTabWidgetFrameV2 class is used to describe the
- parameters for drawing the frame around a tab widget.
-
- \inmodule QtWidgets
-
- QStyleOptionTabWidgetFrameV2 contains all the information that
- QStyle functions need to draw the frame around QTabWidget.
-
- For performance reasons, the access to the member variables is
- direct (i.e., using the \c . or \c -> operator). This low-level feel
- makes the structures straightforward to use and emphasizes that
- these are simply parameters used by the style functions.
-
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
- \sa QStyleOption, QTabWidget
-*/
-
-
-/*!
- \variable QStyleOptionTabWidgetFrameV2::tabBarRect
+ \variable QStyleOptionTabWidgetFrame::tabBarRect
\brief the rectangle containing all the tabs
The default value is a null rectangle, i.e. a rectangle with both
@@ -4745,7 +3770,7 @@ QStyleOptionTabWidgetFrame::QStyleOptionTabWidgetFrame(int version)
*/
/*!
- \variable QStyleOptionTabWidgetFrameV2::selectedTabRect
+ \variable QStyleOptionTabWidgetFrame::selectedTabRect
\brief the rectangle containing the selected tab
This rectangle is contained within the tabBarRect. The default
@@ -4753,87 +3778,6 @@ QStyleOptionTabWidgetFrame::QStyleOptionTabWidgetFrame(int version)
and the height set to 0.
*/
-
-/*!
- Constructs a QStyleOptionTabWidgetFrameV2, initializing the members
- variables to their default values.
-*/
-
-QStyleOptionTabWidgetFrameV2::QStyleOptionTabWidgetFrameV2()
- : QStyleOptionTabWidgetFrame(Version)
-{
-}
-
-
-/*! \internal */
-QStyleOptionTabWidgetFrameV2::QStyleOptionTabWidgetFrameV2(int version)
- : QStyleOptionTabWidgetFrame(version)
-{
-}
-
-
-/*! \fn QStyleOptionTabWidgetFrameV2::QStyleOptionTabWidgetFrameV2(const QStyleOptionTabWidgetFrameV2 &other)
- Constructs a QStyleOptionTabWidgetFrameV2 copy of the \a other style option.
-
- If the \a other style option's version is 1, the new style option's \l
- selectedTabRect and tabBarRect will contain null rects
-
- \sa version
-*/
-
-/*!
- Constructs a QStyleOptionTabWidgetFrameV2 copy of the \a other style option.
-
- If the \a other style option's version is 1, the new style option's \l
- selectedTabRect and tabBarRect will contain null rects
-
- \sa version
-*/
-QStyleOptionTabWidgetFrameV2::QStyleOptionTabWidgetFrameV2(const QStyleOptionTabWidgetFrame &other)
-{
- QStyleOptionTabWidgetFrameV2::operator=(other);
-
-}
-
-
-/*!
- Assigns the \a other style option to this style option. The \a
- other style option can be either of the QStyleOptionFrameV2 or
- QStyleOptionFrame types.
-
- If the \a{other} style option's version is 1, this style option's
- QStyleOptionFrameV2::FrameFeature value is set to
- QStyleOptionFrameV2::None. If its version is 2, its
- \l{QStyleOptionFrameV2::}{FrameFeature} value is simply copied to
- this style option.
-*/
-QStyleOptionTabWidgetFrameV2 &QStyleOptionTabWidgetFrameV2::operator=(const QStyleOptionTabWidgetFrame &other)
-{
- QStyleOptionTabWidgetFrame::operator=(other);
- if (const QStyleOptionTabWidgetFrameV2 *f2 = qstyleoption_cast<const QStyleOptionTabWidgetFrameV2 *>(&other)) {
- selectedTabRect = f2->selectedTabRect;
- tabBarRect = f2->tabBarRect;
- }
- return *this;
-}
-
-
-/*!
- \enum QStyleOptionTabWidgetFrameV2::StyleOptionVersion
-
- This enum is used to hold information about the version of the style option, and
- is defined for each QStyleOption subclass.
-
- \value Version 2
-
- The version is used by QStyleOption subclasses to implement
- extensions without breaking compatibility. If you use
- qstyleoption_cast(), you normally do not need to check it.
-
- \sa StyleOptionType
-*/
-
-
#endif // QT_NO_TABWIDGET
#ifndef QT_NO_TABBAR
@@ -4845,7 +3789,7 @@ QStyleOptionTabWidgetFrameV2 &QStyleOptionTabWidgetFrameV2::operator=(const QSty
overlaps with.
\inmodule QtWidgets
-
+
QStyleOptionTabBarBase contains all the information that QStyle
functions need to draw the tab bar base. Note that this is only
drawn for a standalone QTabBar (one that isn't part of a
@@ -4863,17 +3807,26 @@ QStyleOptionTabWidgetFrameV2 &QStyleOptionTabWidgetFrameV2::operator=(const QSty
*/
/*!
+ \typedef QStyleOptionTabBarBaseV2
+ \relates QStyleOptionTabBarBase
+
+ Synonym for QStyleOptionTabBarBase.
+*/
+
+/*!
Construct a QStyleOptionTabBarBase, initializing the members
vaiables to their default values.
*/
QStyleOptionTabBarBase::QStyleOptionTabBarBase()
- : QStyleOption(Version, SO_TabBarBase), shape(QTabBar::RoundedNorth)
+ : QStyleOption(Version, SO_TabBarBase), shape(QTabBar::RoundedNorth),
+ documentMode(false)
{
}
/*! \internal */
QStyleOptionTabBarBase::QStyleOptionTabBarBase(int version)
- : QStyleOption(version, SO_TabBarBase), shape(QTabBar::RoundedNorth)
+ : QStyleOption(version, SO_TabBarBase), shape(QTabBar::RoundedNorth),
+ documentMode(false)
{
}
@@ -4905,7 +3858,7 @@ QStyleOptionTabBarBase::QStyleOptionTabBarBase(int version)
This enum is used to hold information about the version of the style option, and
is defined for each QStyleOption subclass.
- \value Version 1
+ \value Version 2
The version is used by QStyleOption subclasses to implement
extensions without breaking compatibility. If you use
@@ -4940,96 +3893,12 @@ QStyleOptionTabBarBase::QStyleOptionTabBarBase(int version)
/*!
- \class QStyleOptionTabBarBaseV2
- \brief The QStyleOptionTabBarBaseV2 class is used to describe
- the base of a tab bar, i.e. the part that the tab bar usually
- overlaps with.
- \since 4.5
- \inmodule QtWidgets
-
- QStyleOptionTabBarBase contains all the information that QStyle
- functions need to draw the tab bar base.
-
- For performance reasons, the access to the member variables is
- direct (i.e., using the \c . or \c -> operator). This low-level feel
- makes the structures straightforward to use and emphasizes that
- these are simply parameters used by the style functions.
-
- For an example demonstrating how style options can be used, see
- the \l {widgets/styles}{Styles} example.
-
- \sa QStyleOption, QTabBar::drawBase()
-*/
-
-/*!
- \enum QStyleOptionTabBarBaseV2::StyleOptionVersion
-
- This enum is used to hold information about the version of the style option, and
- is defined for each QStyleOption subclass.
-
- \value Version 2
-
- The version is used by QStyleOption subclasses to implement
- extensions without breaking compatibility. If you use
- qstyleoption_cast(), you normally do not need to check it.
-
- \sa StyleOptionType
-*/
-
-/*!
- \variable QStyleOptionTabBarBaseV2::documentMode
+ \variable QStyleOptionTabBarBase::documentMode
\brief whether the tabbar is in document mode.
The default value is false;
*/
-/*!
- Construct a QStyleOptionTabBarBaseV2, initializing the members
- vaiables to their default values.
-*/
-QStyleOptionTabBarBaseV2::QStyleOptionTabBarBaseV2()
- : QStyleOptionTabBarBase(Version)
- , documentMode(false)
-{
-}
-
-/*!
- \fn QStyleOptionTabBarBaseV2::QStyleOptionTabBarBaseV2(const QStyleOptionTabBarBaseV2 &other)
-
- Constructs a copy of \a other.
-*/
-
-/*!
- Constructs a copy of \a other.
-*/
-QStyleOptionTabBarBaseV2::QStyleOptionTabBarBaseV2(const QStyleOptionTabBarBase &other)
- : QStyleOptionTabBarBase(Version)
-{
- (void)QStyleOptionTabBarBaseV2::operator=(other);
-}
-
-/*!
- Constructs a QStyleOptionTabBarBaseV2 copy of the \a other style option
- which can be either of the QStyleOptionTabBarBaseV2, or QStyleOptionTabBarBase types.
-
- If the other style option's version is not 1, the new style option's
- \c documentMode is set to false. If its version is 2, its \c documentMode value
- is simply copied to the new style option.
-*/
-QStyleOptionTabBarBaseV2 &QStyleOptionTabBarBaseV2::operator = (const QStyleOptionTabBarBase &other)
-{
- QStyleOptionTabBarBase::operator=(other);
- const QStyleOptionTabBarBaseV2 *v2 = qstyleoption_cast<const QStyleOptionTabBarBaseV2*>(&other);
- documentMode = v2 ? v2->documentMode : false;
- return *this;
-}
-
-/*! \internal */
-QStyleOptionTabBarBaseV2::QStyleOptionTabBarBaseV2(int version)
- : QStyleOptionTabBarBase(version), documentMode(false)
-{
-}
-
#endif // QT_NO_TABBAR
#ifndef QT_NO_SIZEGRIP
diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h
index 56203a6615..677a48ec20 100644
--- a/src/widgets/styles/qstyleoption.h
+++ b/src/widgets/styles/qstyleoption.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -60,7 +60,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QDebug;
@@ -119,64 +118,36 @@ class Q_WIDGETS_EXPORT QStyleOptionFrame : public QStyleOption
{
public:
enum StyleOptionType { Type = SO_Frame };
- enum StyleOptionVersion { Version = 1 };
+ enum StyleOptionVersion { Version = 3 };
int lineWidth;
int midLineWidth;
-
- QStyleOptionFrame();
- QStyleOptionFrame(const QStyleOptionFrame &other) : QStyleOption(Version, Type) { *this = other; }
-
-protected:
- QStyleOptionFrame(int version);
-};
-
-class Q_WIDGETS_EXPORT QStyleOptionFrameV2 : public QStyleOptionFrame
-{
-public:
- enum StyleOptionVersion { Version = 2 };
enum FrameFeature {
None = 0x00,
Flat = 0x01
};
Q_DECLARE_FLAGS(FrameFeatures, FrameFeature)
FrameFeatures features;
+ QFrame::Shape frameShape;
- QStyleOptionFrameV2();
- QStyleOptionFrameV2(const QStyleOptionFrameV2 &other) : QStyleOptionFrame(Version) { *this = other; }
- QStyleOptionFrameV2(const QStyleOptionFrame &other);
- QStyleOptionFrameV2 &operator=(const QStyleOptionFrame &other);
+ QStyleOptionFrame();
+ QStyleOptionFrame(const QStyleOptionFrame &other) : QStyleOption(Version, Type) { *this = other; }
protected:
- QStyleOptionFrameV2(int version);
+ QStyleOptionFrame(int version);
};
-Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionFrameV2::FrameFeatures)
-
-
-class Q_WIDGETS_EXPORT QStyleOptionFrameV3 : public QStyleOptionFrameV2
-{
-public:
- enum StyleOptionVersion { Version = 3 };
- QFrame::Shape frameShape : 4;
- uint unused : 28;
-
- QStyleOptionFrameV3();
- QStyleOptionFrameV3(const QStyleOptionFrameV3 &other) : QStyleOptionFrameV2(Version) { *this = other; }
- QStyleOptionFrameV3(const QStyleOptionFrame &other);
- QStyleOptionFrameV3 &operator=(const QStyleOptionFrame &other);
-
-protected:
- QStyleOptionFrameV3(int version);
-};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionFrame::FrameFeatures)
+typedef QStyleOptionFrame QStyleOptionFrameV2;
+typedef QStyleOptionFrame QStyleOptionFrameV3;
#ifndef QT_NO_TABWIDGET
class Q_WIDGETS_EXPORT QStyleOptionTabWidgetFrame : public QStyleOption
{
public:
enum StyleOptionType { Type = SO_TabWidgetFrame };
- enum StyleOptionVersion { Version = 1 };
+ enum StyleOptionVersion { Version = 2 };
int lineWidth;
int midLineWidth;
@@ -184,6 +155,8 @@ public:
QSize tabBarSize;
QSize rightCornerWidgetSize;
QSize leftCornerWidgetSize;
+ QRect tabBarRect;
+ QRect selectedTabRect;
QStyleOptionTabWidgetFrame();
inline QStyleOptionTabWidgetFrame(const QStyleOptionTabWidgetFrame &other)
@@ -193,25 +166,8 @@ protected:
QStyleOptionTabWidgetFrame(int version);
};
-class Q_WIDGETS_EXPORT QStyleOptionTabWidgetFrameV2 : public QStyleOptionTabWidgetFrame
-{
-public:
- enum StyleOptionVersion { Version = 2 };
-
- QRect tabBarRect;
- QRect selectedTabRect;
-
- QStyleOptionTabWidgetFrameV2();
- QStyleOptionTabWidgetFrameV2(const QStyleOptionTabWidgetFrameV2 &other) :
- QStyleOptionTabWidgetFrame(Version) { *this = other; }
- QStyleOptionTabWidgetFrameV2(const QStyleOptionTabWidgetFrame &other);
- QStyleOptionTabWidgetFrameV2 &operator=(const QStyleOptionTabWidgetFrame &other);
-
-protected:
- QStyleOptionTabWidgetFrameV2(int version);
-};
-
-#endif
+typedef QStyleOptionTabWidgetFrame QStyleOptionTabWidgetFrameV2;
+#endif // QT_NO_TABWIDGET
#ifndef QT_NO_TABBAR
@@ -219,11 +175,12 @@ class Q_WIDGETS_EXPORT QStyleOptionTabBarBase : public QStyleOption
{
public:
enum StyleOptionType { Type = SO_TabBarBase };
- enum StyleOptionVersion { Version = 1 };
+ enum StyleOptionVersion { Version = 2 };
QTabBar::Shape shape;
QRect tabBarRect;
QRect selectedTabRect;
+ bool documentMode;
QStyleOptionTabBarBase();
QStyleOptionTabBarBase(const QStyleOptionTabBarBase &other) : QStyleOption(Version, Type) { *this = other; }
@@ -232,21 +189,8 @@ protected:
QStyleOptionTabBarBase(int version);
};
-class Q_WIDGETS_EXPORT QStyleOptionTabBarBaseV2 : public QStyleOptionTabBarBase
-{
-public:
- enum StyleOptionVersion { Version = 2 };
- bool documentMode;
- QStyleOptionTabBarBaseV2();
- QStyleOptionTabBarBaseV2(const QStyleOptionTabBarBaseV2 &other) : QStyleOptionTabBarBase(Version) { *this = other; }
- QStyleOptionTabBarBaseV2(const QStyleOptionTabBarBase &other);
- QStyleOptionTabBarBaseV2 &operator=(const QStyleOptionTabBarBase &other);
-
-protected:
- QStyleOptionTabBarBaseV2(int version);
-};
-
-#endif
+typedef QStyleOptionTabBarBase QStyleOptionTabBarBaseV2;
+#endif // QT_NO_TABBAR
class Q_WIDGETS_EXPORT QStyleOptionHeader : public QStyleOption
{
@@ -305,7 +249,7 @@ class Q_WIDGETS_EXPORT QStyleOptionTab : public QStyleOption
{
public:
enum StyleOptionType { Type = SO_Tab };
- enum StyleOptionVersion { Version = 1 };
+ enum StyleOptionVersion { Version = 3 };
enum TabPosition { Beginning, Middle, End, OnlyOneTab };
enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected };
@@ -320,6 +264,10 @@ public:
TabPosition position;
SelectedPosition selectedPosition;
CornerWidgets cornerWidgets;
+ QSize iconSize;
+ bool documentMode;
+ QSize leftButtonSize;
+ QSize rightButtonSize;
QStyleOptionTab();
QStyleOptionTab(const QStyleOptionTab &other) : QStyleOption(Version, Type) { *this = other; }
@@ -330,38 +278,9 @@ protected:
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionTab::CornerWidgets)
-class Q_WIDGETS_EXPORT QStyleOptionTabV2 : public QStyleOptionTab
-{
-public:
- enum StyleOptionVersion { Version = 2 };
- QSize iconSize;
- QStyleOptionTabV2();
- QStyleOptionTabV2(const QStyleOptionTabV2 &other) : QStyleOptionTab(Version) { *this = other; }
- QStyleOptionTabV2(const QStyleOptionTab &other);
- QStyleOptionTabV2 &operator=(const QStyleOptionTab &other);
-
-protected:
- QStyleOptionTabV2(int version);
-};
-
-class Q_WIDGETS_EXPORT QStyleOptionTabV3 : public QStyleOptionTabV2
-{
-public:
- enum StyleOptionVersion { Version = 3 };
- bool documentMode;
- QSize leftButtonSize;
- QSize rightButtonSize;
- QStyleOptionTabV3();
- QStyleOptionTabV3(const QStyleOptionTabV3 &other) : QStyleOptionTabV2(Version) { *this = other; }
- QStyleOptionTabV3(const QStyleOptionTabV2 &other) : QStyleOptionTabV2(Version) { *this = other; }
- QStyleOptionTabV3(const QStyleOptionTab &other);
- QStyleOptionTabV3 &operator=(const QStyleOptionTab &other);
-
-protected:
- QStyleOptionTabV3(int version);
-};
-
-#endif
+typedef QStyleOptionTab QStyleOptionTabV2;
+typedef QStyleOptionTab QStyleOptionTabV3;
+#endif // QT_NO_TABBAR
#ifndef QT_NO_TOOLBAR
@@ -389,15 +308,13 @@ protected:
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionToolBar::ToolBarFeatures)
-#endif
-
-
+#endif // QT_NO_TOOLBAR
class Q_WIDGETS_EXPORT QStyleOptionProgressBar : public QStyleOption
{
public:
enum StyleOptionType { Type = SO_ProgressBar };
- enum StyleOptionVersion { Version = 1 };
+ enum StyleOptionVersion { Version = 2 };
int minimum;
int maximum;
@@ -405,6 +322,9 @@ public:
QString text;
Qt::Alignment textAlignment;
bool textVisible;
+ Qt::Orientation orientation;
+ bool invertedAppearance;
+ bool bottomToTop;
QStyleOptionProgressBar();
QStyleOptionProgressBar(const QStyleOptionProgressBar &other) : QStyleOption(Version, Type) { *this = other; }
@@ -413,24 +333,7 @@ protected:
QStyleOptionProgressBar(int version);
};
-// Adds style info for vertical progress bars
-class Q_WIDGETS_EXPORT QStyleOptionProgressBarV2 : public QStyleOptionProgressBar
-{
-public:
- enum StyleOptionType { Type = SO_ProgressBar };
- enum StyleOptionVersion { Version = 2 };
- Qt::Orientation orientation;
- bool invertedAppearance;
- bool bottomToTop;
-
- QStyleOptionProgressBarV2();
- QStyleOptionProgressBarV2(const QStyleOptionProgressBar &other);
- QStyleOptionProgressBarV2(const QStyleOptionProgressBarV2 &other);
- QStyleOptionProgressBarV2 &operator=(const QStyleOptionProgressBar &other);
-
-protected:
- QStyleOptionProgressBarV2(int version);
-};
+typedef QStyleOptionProgressBar QStyleOptionProgressBarV2;
class Q_WIDGETS_EXPORT QStyleOptionMenuItem : public QStyleOption
{
@@ -505,12 +408,13 @@ class Q_WIDGETS_EXPORT QStyleOptionDockWidget : public QStyleOption
{
public:
enum StyleOptionType { Type = SO_DockWidget };
- enum StyleOptionVersion { Version = 1 };
+ enum StyleOptionVersion { Version = 2 };
QString title;
bool closable;
bool movable;
bool floatable;
+ bool verticalTitleBar;
QStyleOptionDockWidget();
QStyleOptionDockWidget(const QStyleOptionDockWidget &other) : QStyleOption(Version, Type) { *this = other; }
@@ -519,28 +423,15 @@ protected:
QStyleOptionDockWidget(int version);
};
-class Q_WIDGETS_EXPORT QStyleOptionDockWidgetV2 : public QStyleOptionDockWidget
-{
-public:
- enum StyleOptionVersion { Version = 2 };
-
- bool verticalTitleBar;
+typedef QStyleOptionDockWidget QStyleOptionDockWidgetV2;
- QStyleOptionDockWidgetV2();
- QStyleOptionDockWidgetV2(const QStyleOptionDockWidgetV2 &other)
- : QStyleOptionDockWidget(Version) { *this = other; }
- QStyleOptionDockWidgetV2(const QStyleOptionDockWidget &other);
- QStyleOptionDockWidgetV2 &operator = (const QStyleOptionDockWidget &other);
-
-protected:
- QStyleOptionDockWidgetV2(int version);
-};
+#ifndef QT_NO_ITEMVIEWS
class Q_WIDGETS_EXPORT QStyleOptionViewItem : public QStyleOption
{
public:
enum StyleOptionType { Type = SO_ViewItem };
- enum StyleOptionVersion { Version = 1 };
+ enum StyleOptionVersion { Version = 4 };
enum Position { Left, Right, Top, Bottom };
@@ -552,18 +443,6 @@ public:
QFont font;
bool showDecorationSelected;
- QStyleOptionViewItem();
- QStyleOptionViewItem(const QStyleOptionViewItem &other) : QStyleOption(Version, Type) { *this = other; }
-
-protected:
- QStyleOptionViewItem(int version);
-};
-
-class Q_WIDGETS_EXPORT QStyleOptionViewItemV2 : public QStyleOptionViewItem
-{
-public:
- enum StyleOptionVersion { Version = 2 };
-
enum ViewItemFeature {
None = 0x00,
WrapText = 0x01,
@@ -576,40 +455,9 @@ public:
ViewItemFeatures features;
- QStyleOptionViewItemV2();
- QStyleOptionViewItemV2(const QStyleOptionViewItemV2 &other) : QStyleOptionViewItem(Version) { *this = other; }
- QStyleOptionViewItemV2(const QStyleOptionViewItem &other);
- QStyleOptionViewItemV2 &operator=(const QStyleOptionViewItem &other);
-
-protected:
- QStyleOptionViewItemV2(int version);
-};
-
-Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionViewItemV2::ViewItemFeatures)
-
-class Q_WIDGETS_EXPORT QStyleOptionViewItemV3 : public QStyleOptionViewItemV2
-{
-public:
- enum StyleOptionVersion { Version = 3 };
-
QLocale locale;
const QWidget *widget;
- QStyleOptionViewItemV3();
- QStyleOptionViewItemV3(const QStyleOptionViewItemV3 &other)
- : QStyleOptionViewItemV2(Version) { *this = other; }
- QStyleOptionViewItemV3(const QStyleOptionViewItem &other);
- QStyleOptionViewItemV3 &operator = (const QStyleOptionViewItem &other);
-
-protected:
- QStyleOptionViewItemV3(int version);
-};
-
-#ifndef QT_NO_ITEMVIEWS
-class Q_WIDGETS_EXPORT QStyleOptionViewItemV4 : public QStyleOptionViewItemV3
-{
-public:
- enum StyleOptionVersion { Version = 4 };
enum ViewItemPosition { Invalid, Beginning, Middle, End, OnlyOne };
QModelIndex index;
@@ -619,52 +467,45 @@ public:
ViewItemPosition viewItemPosition;
QBrush backgroundBrush;
- QStyleOptionViewItemV4();
- QStyleOptionViewItemV4(const QStyleOptionViewItemV4 &other)
- : QStyleOptionViewItemV3(Version) { *this = other; }
- QStyleOptionViewItemV4(const QStyleOptionViewItem &other);
- QStyleOptionViewItemV4 &operator = (const QStyleOptionViewItem &other);
+ QStyleOptionViewItem();
+ QStyleOptionViewItem(const QStyleOptionViewItem &other) : QStyleOption(Version, Type) { *this = other; }
protected:
- QStyleOptionViewItemV4(int version);
+ QStyleOptionViewItem(int version);
};
-#endif
+
+Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionViewItem::ViewItemFeatures)
+
+typedef QStyleOptionViewItem QStyleOptionViewItemV2;
+typedef QStyleOptionViewItem QStyleOptionViewItemV3;
+typedef QStyleOptionViewItem QStyleOptionViewItemV4;
+
+#endif // QT_NO_ITEMVIEWS
class Q_WIDGETS_EXPORT QStyleOptionToolBox : public QStyleOption
{
public:
enum StyleOptionType { Type = SO_ToolBox };
- enum StyleOptionVersion { Version = 1 };
+ enum StyleOptionVersion { Version = 2 };
QString text;
QIcon icon;
- QStyleOptionToolBox();
- QStyleOptionToolBox(const QStyleOptionToolBox &other) : QStyleOption(Version, Type) { *this = other; }
-
-protected:
- QStyleOptionToolBox(int version);
-};
-
-class Q_WIDGETS_EXPORT QStyleOptionToolBoxV2 : public QStyleOptionToolBox
-{
-public:
- enum StyleOptionVersion { Version = 2 };
enum TabPosition { Beginning, Middle, End, OnlyOneTab };
enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected };
TabPosition position;
SelectedPosition selectedPosition;
- QStyleOptionToolBoxV2();
- QStyleOptionToolBoxV2(const QStyleOptionToolBoxV2 &other) : QStyleOptionToolBox(Version) { *this = other; }
- QStyleOptionToolBoxV2(const QStyleOptionToolBox &other);
- QStyleOptionToolBoxV2 &operator=(const QStyleOptionToolBox &other);
+ QStyleOptionToolBox();
+ QStyleOptionToolBox(const QStyleOptionToolBox &other) : QStyleOption(Version, Type) { *this = other; }
protected:
- QStyleOptionToolBoxV2(int version);
+ QStyleOptionToolBox(int version);
};
+typedef QStyleOptionToolBox QStyleOptionToolBoxV2;
+
#ifndef QT_NO_RUBBERBAND
class Q_WIDGETS_EXPORT QStyleOptionRubberBand : public QStyleOption
{
diff --git a/src/widgets/styles/qstylepainter.cpp b/src/widgets/styles/qstylepainter.cpp
index 9870f01dd0..b15b9d1a38 100644
--- a/src/widgets/styles/qstylepainter.cpp
+++ b/src/widgets/styles/qstylepainter.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qstylepainter.h b/src/widgets/styles/qstylepainter.h
index 56c6684507..f30124aa25 100644
--- a/src/widgets/styles/qstylepainter.h
+++ b/src/widgets/styles/qstylepainter.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -50,7 +50,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QStylePainter : public QPainter
{
diff --git a/src/widgets/styles/qstyleplugin.cpp b/src/widgets/styles/qstyleplugin.cpp
index 8a169d9797..74c29f39c8 100644
--- a/src/widgets/styles/qstyleplugin.cpp
+++ b/src/widgets/styles/qstyleplugin.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qstyleplugin.h b/src/widgets/styles/qstyleplugin.h
index c9a35caaa4..883952eced 100644
--- a/src/widgets/styles/qstyleplugin.h
+++ b/src/widgets/styles/qstyleplugin.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -49,7 +49,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
class QStyle;
@@ -58,7 +57,7 @@ struct Q_WIDGETS_EXPORT QStyleFactoryInterface : public QFactoryInterface
virtual QStyle *create(const QString &key) = 0;
};
-#define QStyleFactoryInterface_iid "com.trolltech.Qt.QStyleFactoryInterface"
+#define QStyleFactoryInterface_iid "org.qt-project.Qt.QStyleFactoryInterface"
Q_DECLARE_INTERFACE(QStyleFactoryInterface, QStyleFactoryInterface_iid)
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index b384ff7681..30c6ed5e74 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qstylesheetstyle_default.cpp b/src/widgets/styles/qstylesheetstyle_default.cpp
index 580232f326..f22a6d16b5 100644
--- a/src/widgets/styles/qstylesheetstyle_default.cpp
+++ b/src/widgets/styles/qstylesheetstyle_default.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -158,8 +158,7 @@ StyleSheet QStyleSheetStyle::getDefaultStyleSheet() const
// pixmap based style doesn't support any features
bool styleIsPixmapBased = baseStyle()->inherits("QMacStyle")
|| baseStyle()->inherits("QWindowsXPStyle")
- || baseStyle()->inherits("QGtkStyle")
- || baseStyle()->inherits("QS60Style");
+ || baseStyle()->inherits("QGtkStyle");
/*QLineEdit {
diff --git a/src/widgets/styles/qstylesheetstyle_p.h b/src/widgets/styles/qstylesheetstyle_p.h
index 2d89f784d4..42a29b82f2 100644
--- a/src/widgets/styles/qstylesheetstyle_p.h
+++ b/src/widgets/styles/qstylesheetstyle_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qwindowscestyle.cpp b/src/widgets/styles/qwindowscestyle.cpp
index fd3a391e54..72f7426268 100644
--- a/src/widgets/styles/qwindowscestyle.cpp
+++ b/src/widgets/styles/qwindowscestyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qwindowscestyle.h b/src/widgets/styles/qwindowscestyle.h
index dbb83a910e..70d2c3c7c2 100644
--- a/src/widgets/styles/qwindowscestyle.h
+++ b/src/widgets/styles/qwindowscestyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#if !defined(QT_NO_STYLE_WINDOWSCE)
diff --git a/src/widgets/styles/qwindowscestyle_p.h b/src/widgets/styles/qwindowscestyle_p.h
index 6b3b9a8bfe..505826ecf3 100644
--- a/src/widgets/styles/qwindowscestyle_p.h
+++ b/src/widgets/styles/qwindowscestyle_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qwindowsmobilestyle.cpp b/src/widgets/styles/qwindowsmobilestyle.cpp
index efba73fe80..284d42dacc 100644
--- a/src/widgets/styles/qwindowsmobilestyle.cpp
+++ b/src/widgets/styles/qwindowsmobilestyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qwindowsmobilestyle.h b/src/widgets/styles/qwindowsmobilestyle.h
index 65eb08707f..e80c8251a5 100644
--- a/src/widgets/styles/qwindowsmobilestyle.h
+++ b/src/widgets/styles/qwindowsmobilestyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#if !defined(QT_NO_STYLE_WINDOWSMOBILE)
diff --git a/src/widgets/styles/qwindowsmobilestyle_p.h b/src/widgets/styles/qwindowsmobilestyle_p.h
index 23b395e3a6..d536afe50e 100644
--- a/src/widgets/styles/qwindowsmobilestyle_p.h
+++ b/src/widgets/styles/qwindowsmobilestyle_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp
index 1029433fe6..295d46963e 100644
--- a/src/widgets/styles/qwindowsstyle.cpp
+++ b/src/widgets/styles/qwindowsstyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qwindowsstyle.h b/src/widgets/styles/qwindowsstyle.h
index 5392409882..3f0f99dee6 100644
--- a/src/widgets/styles/qwindowsstyle.h
+++ b/src/widgets/styles/qwindowsstyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#if !defined(QT_NO_STYLE_WINDOWS)
diff --git a/src/widgets/styles/qwindowsstyle_p.h b/src/widgets/styles/qwindowsstyle_p.h
index 9861172873..c1bcd28c2a 100644
--- a/src/widgets/styles/qwindowsstyle_p.h
+++ b/src/widgets/styles/qwindowsstyle_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp
index bbc07a5bd9..1aecb64acf 100644
--- a/src/widgets/styles/qwindowsvistastyle.cpp
+++ b/src/widgets/styles/qwindowsvistastyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qwindowsvistastyle.h b/src/widgets/styles/qwindowsvistastyle.h
index dec8f16aee..139a125a52 100644
--- a/src/widgets/styles/qwindowsvistastyle.h
+++ b/src/widgets/styles/qwindowsvistastyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#if !defined(QT_NO_STYLE_WINDOWSVISTA)
diff --git a/src/widgets/styles/qwindowsvistastyle_p.h b/src/widgets/styles/qwindowsvistastyle_p.h
index 8ed2ec421e..7205ad2d19 100644
--- a/src/widgets/styles/qwindowsvistastyle_p.h
+++ b/src/widgets/styles/qwindowsvistastyle_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp
index d8b33f3b0f..63d275a391 100644
--- a/src/widgets/styles/qwindowsxpstyle.cpp
+++ b/src/widgets/styles/qwindowsxpstyle.cpp
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -136,7 +136,24 @@ static const int windowsRightBorder = 12; // right border on windows
extern Q_WIDGETS_EXPORT HDC qt_win_display_dc();
extern QRegion qt_region_from_HRGN(HRGN rgn);
+static inline QBackingStore *backingStoreForWidget(const QWidget *widget)
+{
+ if (QBackingStore *backingStore = widget->backingStore())
+ return backingStore;
+ if (const QWidget *topLevel = widget->nativeParentWidget())
+ if (QBackingStore *topLevelBackingStore = topLevel->backingStore())
+ return topLevelBackingStore;
+ return 0;
+}
+static inline HDC hdcForWidgetBackingStore(const QWidget *widget)
+{
+ if (QBackingStore *backingStore = backingStoreForWidget(widget)) {
+ QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
+ return static_cast<HDC>(nativeInterface->nativeResourceForBackingStore(QByteArrayLiteral("getDC"), backingStore));
+ }
+ return 0;
+}
// Theme data helper ------------------------------------------------------------------------------
/* \internal
@@ -159,14 +176,14 @@ HTHEME XPThemeData::handle()
return 0;
if (!htheme && QWindowsXPStylePrivate::handleMap)
- htheme = QWindowsXPStylePrivate::handleMap->operator[](name);
+ htheme = QWindowsXPStylePrivate::handleMap->value(name);
if (!htheme) {
htheme = pOpenThemeData(QWindowsXPStylePrivate::winId(widget), (wchar_t*)name.utf16());
if (htheme) {
if (!QWindowsXPStylePrivate::handleMap)
- QWindowsXPStylePrivate::handleMap = new QMap<QString, HTHEME>;
- QWindowsXPStylePrivate::handleMap->operator[](name) = htheme;
+ QWindowsXPStylePrivate::handleMap = new QWindowsXPStylePrivate::ThemeHandleMap;
+ QWindowsXPStylePrivate::handleMap->insert(name, htheme);
}
}
@@ -197,11 +214,8 @@ HRGN XPThemeData::mask(QWidget *widget)
HRGN hrgn;
HDC dc = 0;
- if (widget) {
- QBackingStore *backingStore = widget->backingStore();
- QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
- dc = static_cast<HDC>(nativeInterface->nativeResourceForBackingStore("getDC", backingStore));
- }
+ if (widget)
+ dc = hdcForWidgetBackingStore(widget);
RECT nativeRect = toRECT(rect);
pGetThemeBackgroundRegion(handle(), dc, partId, stateId, &nativeRect, &hrgn);
return hrgn;
@@ -209,7 +223,6 @@ HRGN XPThemeData::mask(QWidget *widget)
// QWindowsXPStylePrivate -------------------------------------------------------------------------
// Static initializations
-QWidget *QWindowsXPStylePrivate::limboWidget = 0;
QPixmap *QWindowsXPStylePrivate::tabbody = 0;
QMap<QString,HTHEME> *QWindowsXPStylePrivate::handleMap = 0;
bool QWindowsXPStylePrivate::use_xp = false;
@@ -289,14 +302,7 @@ void QWindowsXPStylePrivate::cleanup(bool force)
use_xp = false;
cleanupHandleMap();
- if (limboWidget) {
- if (QApplication::closingDown())
- delete limboWidget;
- else
- limboWidget->deleteLater();
- }
delete tabbody;
- limboWidget = 0;
tabbody = 0;
}
@@ -307,11 +313,13 @@ void QWindowsXPStylePrivate::cleanup(bool force)
*/
void QWindowsXPStylePrivate::cleanupHandleMap()
{
+ typedef ThemeHandleMap::const_iterator ConstIterator;
+
if (!handleMap)
return;
- QMap<QString, HTHEME>::Iterator it;
- for (it = handleMap->begin(); it != handleMap->end(); ++it)
+ const ConstIterator cend = handleMap->constEnd();
+ for (ConstIterator it = handleMap->constBegin(); it != cend; ++it)
pCloseThemeData(it.value());
delete handleMap;
handleMap = 0;
@@ -325,20 +333,22 @@ void QWindowsXPStylePrivate::cleanupHandleMap()
*/
HWND QWindowsXPStylePrivate::winId(const QWidget *widget)
{
- if (widget && widget->internalWinId()) {
- QWidget *w = const_cast<QWidget *>(widget);
- return QApplicationPrivate::getHWNDForWidget(w);
- }
- if (!limboWidget) {
- limboWidget = new QWidget(0);
- limboWidget->createWinId();
- limboWidget->setObjectName(QLatin1String("xp_limbo_widget"));
- // We don't need this internal widget to appear in QApplication::topLevelWidgets()
- if (QWidgetPrivate::allWidgets)
- QWidgetPrivate::allWidgets->remove(limboWidget);
- }
+ if (widget)
+ if (const HWND hwnd = QApplicationPrivate::getHWNDForWidget(const_cast<QWidget *>(widget)))
+ return hwnd;
- return QApplicationPrivate::getHWNDForWidget(limboWidget);
+ const QWidgetList toplevels = QApplication::topLevelWidgets();
+ if (!toplevels.isEmpty())
+ if (const HWND topLevelHwnd = QApplicationPrivate::getHWNDForWidget(toplevels.front()))
+ return topLevelHwnd;
+
+ if (QDesktopWidget *desktop = qApp->desktop())
+ if (const HWND desktopHwnd = QApplicationPrivate::getHWNDForWidget(desktop))
+ return desktopHwnd;
+
+ Q_ASSERT(false);
+
+ return 0;
}
/*! \internal
@@ -686,25 +696,18 @@ void QWindowsXPStylePrivate::drawBackground(XPThemeData &themeData)
translucentToplevel = win->testAttribute(Qt::WA_TranslucentBackground);
}
- HDC dc = 0;
- if (themeData.widget) {
- QBackingStore *backingStore = themeData.widget->backingStore();
- QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
- dc = static_cast<HDC>(nativeInterface->nativeResourceForBackingStore("getDC", backingStore ));
- }
-
- bool useFallback = dc == 0
- || painter->opacity() != 1.0
- || themeData.rotate
- || complexXForm
- || themeData.mirrorVertically
- || (themeData.mirrorHorizontally && pDrawThemeBackgroundEx == 0)
- || translucentToplevel;
-
- if (!useFallback)
+ // Draw on backing store DC only for real widgets.
+ const bool useFallback = !themeData.widget || painter->device()->devType() != QInternal::Widget
+ || painter->opacity() != 1.0 || themeData.rotate
+ || complexXForm || themeData.mirrorVertically
+ || (themeData.mirrorHorizontally && pDrawThemeBackgroundEx == 0)
+ || translucentToplevel;
+ const HDC dc = useFallback ? HDC(0) : hdcForWidgetBackingStore(themeData.widget);
+ if (dc && !useFallback) {
drawBackgroundDirectly(themeData);
- else
+ } else {
drawBackgroundThruNativeBuffer(themeData);
+ }
painter->restore();
}
@@ -718,11 +721,8 @@ void QWindowsXPStylePrivate::drawBackgroundDirectly(XPThemeData &themeData)
{
QPainter *painter = themeData.painter;
HDC dc = 0;
- if (themeData.widget) {
- QBackingStore *backingStore = themeData.widget->backingStore();
- QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
- dc = static_cast<HDC>(nativeInterface->nativeResourceForBackingStore("getDC", backingStore));
- }
+ if (themeData.widget)
+ dc = hdcForWidgetBackingStore(themeData.widget);
QPoint redirectionDelta(int(painter->deviceMatrix().dx()),
int(painter->deviceMatrix().dy()));
diff --git a/src/widgets/styles/qwindowsxpstyle.h b/src/widgets/styles/qwindowsxpstyle.h
index 87bccc2271..6e0eb57688 100644
--- a/src/widgets/styles/qwindowsxpstyle.h
+++ b/src/widgets/styles/qwindowsxpstyle.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -48,7 +48,6 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-QT_MODULE(Gui)
#if !defined(QT_NO_STYLE_WINDOWSXP)
diff --git a/src/widgets/styles/qwindowsxpstyle_p.h b/src/widgets/styles/qwindowsxpstyle_p.h
index 1fb89cb478..0e42bbfa39 100644
--- a/src/widgets/styles/qwindowsxpstyle_p.h
+++ b/src/widgets/styles/qwindowsxpstyle_p.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -286,6 +286,8 @@ class QWindowsXPStylePrivate : public QWindowsStylePrivate
{
Q_DECLARE_PUBLIC(QWindowsXPStyle)
public:
+ typedef QMap<QString, HTHEME> ThemeHandleMap;
+
QWindowsXPStylePrivate()
: QWindowsStylePrivate(), hasInitColors(false), bufferDC(0), bufferBitmap(0), nullBitmap(0),
bufferPixels(0), bufferW(0), bufferH(0)
@@ -326,7 +328,7 @@ public:
QRgb sliderTickColor;
bool hasInitColors;
- static QMap<QString,HTHEME> *handleMap;
+ static ThemeHandleMap *handleMap;
QIcon dockFloat, dockClose;
@@ -338,7 +340,6 @@ private:
static QBasicAtomicInt ref;
static bool use_xp;
- static QWidget *limboWidget;
static QPixmap *tabbody;
QHash<ThemeMapKey, ThemeMapData> alphaCache;