From e7adaed5298cb9fc7c41ec33b68a7d584d709674 Mon Sep 17 00:00:00 2001 From: Debao Zhang Date: Sat, 17 Mar 2012 03:18:12 -0700 Subject: QtWidgets: Cleanup Q3* items Clear all the Q3* items away, expect QStyle::SH_Q3ListViewExpand_SelectMouseType which is still used by QTreeView. So simply removed Q3 from its name. Change-Id: Ia79f0283137b6751ba68791ae55df1d8bd7ea74a Reviewed-by: Friedemann Kleint --- src/tools/uic/qclass_lib_map.h | 3 - src/widgets/itemviews/qtreeview.cpp | 4 +- src/widgets/kernel/qaction.cpp | 2 +- src/widgets/kernel/qapplication.h | 1 - src/widgets/kernel/qapplication_qpa.cpp | 5 +- src/widgets/styles/qcommonstyle.cpp | 14 +- src/widgets/styles/qmacstyle_mac.mm | 56 +---- src/widgets/styles/qmotifstyle.cpp | 148 ----------- src/widgets/styles/qplastiquestyle.cpp | 6 +- src/widgets/styles/qstyle.cpp | 48 +--- src/widgets/styles/qstyle.h | 31 +-- src/widgets/styles/qstyleoption.cpp | 388 ----------------------------- src/widgets/styles/qstyleoption.h | 68 +---- src/widgets/styles/qwindowscestyle.cpp | 5 +- src/widgets/styles/qwindowsmobilestyle.cpp | 5 +- src/widgets/styles/qwindowsstyle.cpp | 3 +- src/widgets/styles/qwindowsxpstyle.cpp | 14 +- src/widgets/widgets/qmenu.h | 1 - src/widgets/widgets/qtabwidget.h | 1 - 19 files changed, 24 insertions(+), 779 deletions(-) (limited to 'src') diff --git a/src/tools/uic/qclass_lib_map.h b/src/tools/uic/qclass_lib_map.h index fb181e27f7..5a4f4c3004 100644 --- a/src/tools/uic/qclass_lib_map.h +++ b/src/tools/uic/qclass_lib_map.h @@ -875,8 +875,6 @@ QT_CLASS_LIB(QStyleOptionToolBar, QtWidgets, qstyleoption.h) QT_CLASS_LIB(QStyleOptionProgressBar, QtWidgets, qstyleoption.h) QT_CLASS_LIB(QStyleOptionProgressBarV2, QtWidgets, qstyleoption.h) QT_CLASS_LIB(QStyleOptionMenuItem, QtWidgets, qstyleoption.h) -QT_CLASS_LIB(QStyleOptionQ3ListViewItem, QtWidgets, qstyleoption.h) -QT_CLASS_LIB(QStyleOptionQ3DockWindow, QtWidgets, qstyleoption.h) QT_CLASS_LIB(QStyleOptionDockWidget, QtWidgets, qstyleoption.h) QT_CLASS_LIB(QStyleOptionDockWidgetV2, QtWidgets, qstyleoption.h) QT_CLASS_LIB(QStyleOptionViewItem, QtWidgets, qstyleoption.h) @@ -889,7 +887,6 @@ QT_CLASS_LIB(QStyleOptionRubberBand, QtWidgets, qstyleoption.h) QT_CLASS_LIB(QStyleOptionComplex, QtWidgets, qstyleoption.h) QT_CLASS_LIB(QStyleOptionSlider, QtWidgets, qstyleoption.h) QT_CLASS_LIB(QStyleOptionSpinBox, QtWidgets, qstyleoption.h) -QT_CLASS_LIB(QStyleOptionQ3ListView, QtWidgets, qstyleoption.h) QT_CLASS_LIB(QStyleOptionToolButton, QtWidgets, qstyleoption.h) QT_CLASS_LIB(QStyleOptionComboBox, QtWidgets, qstyleoption.h) QT_CLASS_LIB(QStyleOptionTitleBar, QtWidgets, qstyleoption.h) diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp index 6166823754..04b3645c87 100644 --- a/src/widgets/itemviews/qtreeview.cpp +++ b/src/widgets/itemviews/qtreeview.cpp @@ -1849,7 +1849,7 @@ void QTreeView::mousePressEvent(QMouseEvent *event) { Q_D(QTreeView); bool handled = false; - if (style()->styleHint(QStyle::SH_Q3ListViewExpand_SelectMouseType, 0, this) == QEvent::MouseButtonPress) + if (style()->styleHint(QStyle::SH_ListViewExpand_SelectMouseType, 0, this) == QEvent::MouseButtonPress) handled = d->expandOrCollapseItemAtPos(event->pos()); if (!handled && d->itemDecorationAt(event->pos()) == -1) QAbstractItemView::mousePressEvent(event); @@ -1866,7 +1866,7 @@ void QTreeView::mouseReleaseEvent(QMouseEvent *event) } else { if (state() == QAbstractItemView::DragSelectingState) setState(QAbstractItemView::NoState); - if (style()->styleHint(QStyle::SH_Q3ListViewExpand_SelectMouseType, 0, this) == QEvent::MouseButtonRelease) + if (style()->styleHint(QStyle::SH_ListViewExpand_SelectMouseType, 0, this) == QEvent::MouseButtonRelease) d->expandOrCollapseItemAtPos(event->pos()); } } diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp index f450d13a39..c4f7995087 100644 --- a/src/widgets/kernel/qaction.cpp +++ b/src/widgets/kernel/qaction.cpp @@ -879,7 +879,7 @@ QString QAction::statusTip() const the action. The text may contain rich text. There is no default "What's This?" text. - \sa QWhatsThis Q3StyleSheet + \sa QWhatsThis */ void QAction::setWhatsThis(const QString &whatsthis) { diff --git a/src/widgets/kernel/qapplication.h b/src/widgets/kernel/qapplication.h index 55ed6998fa..08e29e449e 100644 --- a/src/widgets/kernel/qapplication.h +++ b/src/widgets/kernel/qapplication.h @@ -243,7 +243,6 @@ private: friend class QWidgetPrivate; friend class QWidgetWindow; friend class QETWidget; - friend class Q3AccelManager; friend class QTranslator; friend class QWidgetAnimator; #ifndef QT_NO_SHORTCUT diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp index 97fc794252..7c969b4928 100644 --- a/src/widgets/kernel/qapplication_qpa.cpp +++ b/src/widgets/kernel/qapplication_qpa.cpp @@ -305,7 +305,6 @@ void QApplicationPrivate::initializeWidgetPaletteHash() setPossiblePalette(platformTheme->palette(QPlatformTheme::ToolButtonPalette), "QToolButton"); setPossiblePalette(platformTheme->palette(QPlatformTheme::ButtonPalette), "QAbstractButton"); setPossiblePalette(platformTheme->palette(QPlatformTheme::HeaderPalette), "QHeaderView"); - setPossiblePalette(platformTheme->palette(QPlatformTheme::HeaderPalette), "Q3Header"); setPossiblePalette(platformTheme->palette(QPlatformTheme::ItemViewPalette), "QAbstractItemView"); setPossiblePalette(platformTheme->palette(QPlatformTheme::MessageBoxLabelPelette), "QMessageBoxLabel"); setPossiblePalette(platformTheme->palette(QPlatformTheme::TabBarPalette), "QTabBar"); @@ -354,10 +353,8 @@ void QApplicationPrivate::initializeWidgetFontHash() fontHash->insert(QByteArrayLiteral("QAbstractItemView"), *font); if (const QFont *font = theme->font(QPlatformTheme::ListViewFont)) fontHash->insert(QByteArrayLiteral("QListViewFont"), *font); - if (const QFont *font = theme->font(QPlatformTheme::HeaderViewFont)) { + if (const QFont *font = theme->font(QPlatformTheme::HeaderViewFont)) fontHash->insert(QByteArrayLiteral("QHeaderViewFont"), *font); - fontHash->insert(QByteArrayLiteral("Q3Header"), *font); - } if (const QFont *font = theme->font(QPlatformTheme::ListBoxFont)) fontHash->insert(QByteArrayLiteral("QListBox"), *font); if (const QFont *font = theme->font(QPlatformTheme::ComboMenuItemFont)) diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 174e94e63d..ca06cda2b0 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -460,9 +460,6 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q } p->restore(); break; - case PE_Q3DockWindowSeparator: - proxy()->drawPrimitive(PE_IndicatorToolBarSeparator, opt, p, widget); - break; case PE_IndicatorToolBarSeparator: { QPoint p1, p2; @@ -4106,10 +4103,8 @@ QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex } int frameWidth = 0; - if (!(widget && widget->inherits("Q3GroupBox")) - && ((groupBox->features & QStyleOptionFrameV2::Flat) == 0)) { + if ((groupBox->features & QStyleOptionFrameV2::Flat) == 0) frameWidth = proxy()->pixelMetric(PM_DefaultFrameWidth, groupBox, widget); - } ret = frameRect.adjusted(frameWidth, frameWidth + topHeight - topMargin, -frameWidth, -frameWidth); break; @@ -4233,10 +4228,6 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid case PM_DialogButtonsButtonHeight: ret = int(QStyleHelper::dpiScaled(30.)); break; - case PM_CheckListControllerSize: - case PM_CheckListButtonSize: - ret = int(QStyleHelper::dpiScaled(16.)); - break; case PM_TitleBarHeight: { if (const QStyleOptionTitleBar *tb = qstyleoption_cast(opt)) { if ((tb->titleBarFlags & Qt::WindowType_Mask) == Qt::Tool) { @@ -4711,7 +4702,6 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, case CT_MenuBar: case CT_Menu: case CT_MenuBarItem: - case CT_Q3Header: case CT_Slider: case CT_ProgressBar: case CT_TabBarTab: @@ -4756,7 +4746,7 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget break; #endif // QT_NO_GROUPBOX - case SH_Q3ListViewExpand_SelectMouseType: + case SH_ListViewExpand_SelectMouseType: case SH_TabBar_SelectMouseType: ret = QEvent::MouseButtonPress; break; diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 7e07cc1532..55c603896b 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -2145,20 +2145,6 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW else ret = sz.height(); break; } - case PM_CheckListButtonSize: { - switch (d->aquaSizeConstrain(opt, widget)) { - case QAquaSizeUnknown: - case QAquaSizeLarge: - GetThemeMetric(kThemeMetricCheckBoxWidth, &ret); - break; - case QAquaSizeMini: - GetThemeMetric(kThemeMetricMiniCheckBoxWidth, &ret); - break; - case QAquaSizeSmall: - GetThemeMetric(kThemeMetricSmallCheckBoxWidth, &ret); - break; - } - break; } case PM_DialogButtonsButtonWidth: { QSize sz; ret = d->aquaSizeConstrain(opt, 0, QStyle::CT_PushButton, QSize(-1, -1), &sz); @@ -2583,7 +2569,7 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w case SH_ScrollBar_StopMouseOverSlider: ret = true; break; - case SH_Q3ListViewExpand_SelectMouseType: + case SH_ListViewExpand_SelectMouseType: ret = QEvent::MouseButtonRelease; break; case SH_TabBar_SelectMouseType: @@ -3094,8 +3080,6 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai p->restore(); break; } case PE_IndicatorViewItemCheck: - case PE_Q3CheckListExclusiveIndicator: - case PE_Q3CheckListIndicator: case PE_IndicatorRadioButton: case PE_IndicatorCheckBox: { bool drawColorless = (!(opt->state & State_Active)) @@ -3108,8 +3092,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai bdi.adornment = kThemeDrawIndicatorOnly; if (opt->state & State_HasFocus) bdi.adornment |= kThemeAdornmentFocus; - bool isRadioButton = (pe == PE_Q3CheckListExclusiveIndicator - || pe == PE_IndicatorRadioButton); + bool isRadioButton = (pe == PE_IndicatorRadioButton); switch (d->aquaSizeConstrain(opt, w)) { case QAquaSizeUnknown: case QAquaSizeLarge: @@ -3137,11 +3120,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai bdi.value = kThemeButtonOn; else bdi.value = kThemeButtonOff; - HIRect macRect; - if (pe == PE_Q3CheckListExclusiveIndicator || pe == PE_Q3CheckListIndicator) - macRect = qt_hirectForQRect(opt->rect); - else - macRect = qt_hirectForQRect(opt->rect); + HIRect macRect = qt_hirectForQRect(opt->rect); if (!drawColorless) HIThemeDrawButton(&macRect, &bdi, cg, kHIThemeOrientationNormal, 0); else @@ -4931,35 +4910,6 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex } } break; - case CC_Q3ListView: - if (const QStyleOptionQ3ListView *lv = qstyleoption_cast(opt)) { - if (lv->subControls & SC_Q3ListView) - QWindowsStyle::drawComplexControl(cc, lv, p, widget); - if (lv->subControls & (SC_Q3ListViewBranch | SC_Q3ListViewExpand)) { - int y = lv->rect.y(); - int h = lv->rect.height(); - int x = lv->rect.right() - 10; - for (int i = 1; i < lv->items.size() && y < h; ++i) { - QStyleOptionQ3ListViewItem item = lv->items.at(i); - if (y + item.height > 0 && (item.childCount > 0 - || (item.features & (QStyleOptionQ3ListViewItem::Expandable - | QStyleOptionQ3ListViewItem::Visible)) - == (QStyleOptionQ3ListViewItem::Expandable - | QStyleOptionQ3ListViewItem::Visible))) { - QStyleOption treeOpt(0); - treeOpt.rect.setRect(x, y + item.height / 2 - 4, 9, 9); - treeOpt.palette = lv->palette; - treeOpt.state = lv->state; - treeOpt.state |= State_Children; - if (item.state & State_Open) - treeOpt.state |= State_Open; - proxy()->drawPrimitive(PE_IndicatorBranch, &treeOpt, p, widget); - } - y += item.totalHeight; - } - } - } - break; case CC_SpinBox: if (const QStyleOptionSpinBox *sb = qstyleoption_cast(opt)) { QStyleOptionSpinBox newSB = *sb; diff --git a/src/widgets/styles/qmotifstyle.cpp b/src/widgets/styles/qmotifstyle.cpp index 331b70f153..f02771ab61 100644 --- a/src/widgets/styles/qmotifstyle.cpp +++ b/src/widgets/styles/qmotifstyle.cpp @@ -346,41 +346,6 @@ void QMotifStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QP const QWidget *w) const { switch(pe) { - case PE_Q3CheckListExclusiveIndicator: - if (const QStyleOptionQ3ListView *lv = qstyleoption_cast(opt)) { - if (lv->items.isEmpty()) - return; - - if (lv->state & State_Enabled) - p->setPen(QPen(opt->palette.text().color())); - else - p->setPen(QPen(lv->palette.color(QPalette::Disabled, QPalette::Text))); - QPolygon a; - - int cx = opt->rect.width()/2 - 1; - int cy = opt->rect.height()/2; - int e = opt->rect.width()/2 - 1; - for (int i = 0; i < 3; i++) { //penWidth 2 doesn't quite work - a.setPoints(4, cx-e, cy, cx, cy-e, cx+e, cy, cx, cy+e); - p->drawPolygon(a); - e--; - } - if (opt->state & State_On) { - if (lv->state & State_Enabled) - p->setPen(QPen(opt->palette.text().color())); - else - p->setPen(QPen(lv->palette.color(QPalette::Disabled, - QPalette::Text))); - QBrush saveBrush = p->brush(); - p->setBrush(opt->palette.text()); - e = e - 2; - a.setPoints(4, cx-e, cy, cx, cy-e, cx+e, cy, cx, cy+e); - p->drawPolygon(a); - p->setBrush(saveBrush); - } - } - break; - case PE_FrameTabWidget: case PE_FrameWindow: qDrawShadePanel(p, opt->rect, opt->palette, QStyle::State_None, proxy()->pixelMetric(PM_DefaultFrameWidth)); @@ -1672,105 +1637,6 @@ void QMotifStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComple break; } #endif - case CC_Q3ListView: - if (opt->subControls & (SC_Q3ListViewBranch | SC_Q3ListViewExpand)) { - int i; - if (opt->subControls & SC_Q3ListView) - QCommonStyle::drawComplexControl(cc, opt, p, widget); - if (const QStyleOptionQ3ListView *lv = qstyleoption_cast(opt)) { - QStyleOptionQ3ListViewItem item = lv->items.at(0); - int y = opt->rect.y(); - int c; - QPolygon dotlines; - if ((opt->activeSubControls & SC_All) && (opt->subControls & SC_Q3ListViewExpand)) { - c = 2; - dotlines.resize(2); - dotlines[0] = QPoint(opt->rect.right(), opt->rect.top()); - dotlines[1] = QPoint(opt->rect.right(), opt->rect.bottom()); - } else { - int linetop = 0, linebot = 0; - // each branch needs at most two lines, ie. four end points - dotlines.resize(item.childCount * 4); - c = 0; - - // skip the stuff above the exposed rectangle - for (i = 1; i < lv->items.size(); ++i) { - QStyleOptionQ3ListViewItem child = lv->items.at(i); - if (child.height + y > 0) - break; - y += child.totalHeight; - } - - int bx = opt->rect.width() / 2; - - // paint stuff in the magical area - while (i < lv->items.size() && y < lv->rect.height()) { - QStyleOptionQ3ListViewItem child = lv->items.at(i); - if (child.features & QStyleOptionQ3ListViewItem::Visible) { - int lh; - if (!(item.features & QStyleOptionQ3ListViewItem::MultiLine)) - lh = child.height; - else - lh = p->fontMetrics().height() + 2 * lv->itemMargin; - lh = qMax(lh, QApplication::globalStrut().height()); - if (lh % 2 > 0) - lh++; - linebot = y + lh/2; - if ((child.features & QStyleOptionQ3ListViewItem::Expandable || child.childCount > 0) && - child.height > 0) { - // needs a box - p->setPen(opt->palette.text().color()); - p->drawRect(bx-4, linebot-4, 9, 9); - QPolygon a; - if ((child.state & State_Open)) - a.setPoints(3, bx-2, linebot-2, - bx, linebot+2, - bx+2, linebot-2); //Qt::RightArrow - else - a.setPoints(3, bx-2, linebot-2, - bx+2, linebot, - bx-2, linebot+2); //Qt::DownArrow - p->setBrush(opt->palette.text()); - p->drawPolygon(a); - p->setBrush(Qt::NoBrush); - // dotlinery - dotlines[c++] = QPoint(bx, linetop); - dotlines[c++] = QPoint(bx, linebot - 5); - dotlines[c++] = QPoint(bx + 5, linebot); - dotlines[c++] = QPoint(opt->rect.width(), linebot); - linetop = linebot + 5; - } else { - // just dotlinery - dotlines[c++] = QPoint(bx+1, linebot); - dotlines[c++] = QPoint(opt->rect.width(), linebot); - } - y += child.totalHeight; - } - ++i; - } - - // Expand line height to edge of rectangle if there's any - // visible child below - while (i < lv->items.size() && lv->items.at(i).height <= 0) - ++i; - if (i < lv->items.size()) - linebot = opt->rect.height(); - - if (linetop < linebot) { - dotlines[c++] = QPoint(bx, linetop); - dotlines[c++] = QPoint(bx, linebot); - } - } - - int line; // index into dotlines - p->setPen(opt->palette.text().color()); - if (opt->subControls & SC_Q3ListViewBranch) for(line = 0; line < c; line += 2) { - p->drawLine(dotlines[line].x(), dotlines[line].y(), - dotlines[line+1].x(), dotlines[line+1].y()); - } - } - break; } - default: QCommonStyle::drawComplexControl(cc, opt, p, widget); break; @@ -2123,20 +1989,6 @@ QMotifStyle::subElementRect(SubElement sr, const QStyleOption *opt, const QWidge break; } - case SE_Q3DockWindowHandleRect: - if (const QStyleOptionQ3DockWindow *dw = qstyleoption_cast(opt)) { - if (!dw->docked || !dw->closeEnabled) - rect.setRect(0, 0, opt->rect.width(), opt->rect.height()); - else { - if (dw->state == State_Horizontal) - rect.setRect(2, 15, opt->rect.width()-2, opt->rect.height() - 15); - else - rect.setRect(0, 2, opt->rect.width() - 15, opt->rect.height() - 2); - } - rect = visualRect(dw->direction, dw->rect, rect); - } - break; - case SE_ProgressBarLabel: case SE_ProgressBarGroove: case SE_ProgressBarContents: diff --git a/src/widgets/styles/qplastiquestyle.cpp b/src/widgets/styles/qplastiquestyle.cpp index 79893f066d..0bf443fe00 100644 --- a/src/widgets/styles/qplastiquestyle.cpp +++ b/src/widgets/styles/qplastiquestyle.cpp @@ -5631,8 +5631,7 @@ void QPlastiqueStyle::polish(QWidget *widget) if (widget->inherits("QWorkspaceTitleBar") || widget->inherits("QDockSeparator") - || widget->inherits("QDockWidgetSeparator") - || widget->inherits("Q3DockWindowResizeHandle")) { + || widget->inherits("QDockWidgetSeparator")) { widget->setAttribute(Qt::WA_Hover); } @@ -5687,8 +5686,7 @@ void QPlastiqueStyle::unpolish(QWidget *widget) if (widget->inherits("QWorkspaceTitleBar") || widget->inherits("QDockSeparator") - || widget->inherits("QDockWidgetSeparator") - || widget->inherits("Q3DockWindowResizeHandle")) { + || widget->inherits("QDockWidgetSeparator")) { widget->setAttribute(Qt::WA_Hover, false); } diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index db387fecec..d78a2ee2fb 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -596,8 +596,6 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value PE_IndicatorCheckBox On/off indicator, for example, a QCheckBox. \value PE_IndicatorRadioButton Exclusive on/off indicator, for example, a QRadioButton. - \value PE_Q3DockWindowSeparator Item separator for Qt 3 compatible dock window - and toolbar contents. \value PE_IndicatorDockWidgetResizeHandle Resize handle for dock windows. \value PE_Frame Generic frame @@ -619,16 +617,10 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value PE_FrameWindow Frame around a MDI window or a docking window. - \value PE_Q3Separator Qt 3 compatible generic separator. - \value PE_IndicatorMenuCheckMark Check mark used in a menu. \value PE_IndicatorProgressChunk Section of a progress bar indicator; see also QProgressBar. - \value PE_Q3CheckListController Qt 3 compatible controller part of a list view item. - \value PE_Q3CheckListIndicator Qt 3 compatible checkbox part of a list view item. - \value PE_Q3CheckListExclusiveIndicator Qt 3 compatible radio button part of a list view item. - \value PE_IndicatorBranch Lines used to represent the branch of a tree in a tree view. \value PE_IndicatorToolBarHandle The handle of a toolbar. \value PE_IndicatorToolBarSeparator The separator in a toolbar. @@ -740,9 +732,6 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \row \li \l State_On \li Indicates the indicator is checked. \row \li \l PE_IndicatorRadioButton \li \l QStyleOptionButton \li \l State_On \li Indicates that a radio button is selected. - \row \li{1,3} \l PE_Q3CheckListExclusiveIndicator, \l PE_Q3CheckListIndicator - \li{1,3} \l QStyleOptionQ3ListView \li \l State_On - \li Indicates whether or not the controller is selected. \row \li \l State_NoChange \li Indicates a "tri-state" controller. \row \li \l State_Enabled \li Indicates the controller is enabled. \row \li{1,4} \l PE_IndicatorBranch \li{1,4} \l QStyleOption @@ -760,9 +749,6 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \row \li \l PE_IndicatorToolBarHandle \li \l QStyleOption \li \l State_Horizontal \li Indicates that the window handle is horizontal instead of vertical. - \row \li \l PE_Q3DockWindowSeparator \li \l QStyleOption - \li \l State_Horizontal \li Indicates that the separator is horizontal - instead of vertical. \row \li \l PE_IndicatorSpinPlus, \l PE_IndicatorSpinMinus, \l PE_IndicatorSpinUp, \l PE_IndicatorSpinDown, \li \l QStyleOptionSpinBox @@ -826,8 +812,6 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value CE_MenuHMargin The horizontal extra space on the left/right of a menu. \value CE_MenuVMargin The vertical extra space on the top/bottom of a menu. - \value CE_Q3DockWindowEmptyArea The empty area of a QDockWidget. - \value CE_ToolBoxTab The toolbox's tab and label within a QToolBox. \value CE_SizeGrip Window resize handle; see also QSizeGrip. @@ -988,22 +972,11 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value SE_SpinBoxLayoutItem Area that counts for the parent layout. - \value SE_Q3DockWindowHandleRect Area for the tear-off handle. - \value SE_ProgressBarGroove Area for the groove. \value SE_ProgressBarContents Area for the progress indicator. \value SE_ProgressBarLabel Area for the text label. \value SE_ProgressBarLayoutItem Area that counts for the parent layout. - \omitvalue SE_DialogButtonAccept - \omitvalue SE_DialogButtonReject - \omitvalue SE_DialogButtonApply - \omitvalue SE_DialogButtonHelp - \omitvalue SE_DialogButtonAll - \omitvalue SE_DialogButtonRetry - \omitvalue SE_DialogButtonAbort - \omitvalue SE_DialogButtonIgnore - \omitvalue SE_DialogButtonCustom \omitvalue SE_ViewItemCheckIndicator \value SE_FrameContents Area for a frame's contents. @@ -1087,7 +1060,6 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \row \li \l SE_RadioButtonContents \li \l QStyleOptionButton \row \li \l SE_RadioButtonFocusRect \li \l QStyleOptionButton \row \li \l SE_ComboBoxFocusRect \li \l QStyleOptionComboBox - \row \li \l SE_Q3DockWindowHandleRect \li \l QStyleOptionQ3DockWindow \row \li \l SE_ProgressBarGroove \li \l QStyleOptionProgressBar \row \li \l SE_ProgressBarContents \li \l QStyleOptionProgressBar \row \li \l SE_ProgressBarLabel \li \l QStyleOptionProgressBar @@ -1107,7 +1079,6 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value CC_Slider A slider, like QSlider. \value CC_ToolButton A tool button, like QToolButton. \value CC_TitleBar A Title bar, like those used in QMdiSubWindow. - \value CC_Q3ListView Used for drawing the Q3ListView class. \value CC_GroupBox A group box, like QGroupBox. \value CC_Dial A dial, like QDial. \value CC_MdiControls The minimize, close, and normal @@ -1157,7 +1128,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value SC_ToolButton Tool button (see also QToolButton). \value SC_ToolButtonMenu Sub-control for opening a popup menu in a - tool button; see also Q3PopupMenu. + tool button. \value SC_TitleBarSysMenu System menu button (i.e., restore, close, etc.). \value SC_TitleBarMinButton Minimize button. @@ -1169,9 +1140,6 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value SC_TitleBarUnshadeButton Unshade button. \value SC_TitleBarContextHelpButton Context Help button. - \value SC_Q3ListView The list view area. - \value SC_Q3ListViewExpand Expand item (i.e., show/hide child items). - \value SC_DialHandle The handle of the dial (i.e. what you use to control the dial). \value SC_DialGroove The groove for the dial. \value SC_DialTickmarks The tickmarks for the dial. @@ -1189,7 +1157,6 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, in the menu bar. \value SC_All Special value that matches all sub-controls. - \omitvalue SC_Q3ListViewBranch \omitvalue SC_CustomBase \sa ComplexControl @@ -1257,9 +1224,6 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \row \li \l{CC_TitleBar} \li \l QStyleOptionTitleBar \li \l State_Enabled \li Set if the title bar is enabled. - \row \li \l{CC_Q3ListView} \li \l QStyleOptionQ3ListView - \li \l State_Enabled \li Set if the list view is enabled. - \endtable \sa drawPrimitive(), drawControl() @@ -1418,11 +1382,6 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value PM_MenuTearoffHeight Height of a tear off area in a QMenu. \value PM_MenuDesktopFrameWidth The frame width for the menu on the desktop. - \value PM_CheckListButtonSize Area (width/height) of the - checkbox/radio button in a Q3CheckListItem. - \value PM_CheckListControllerSize Area (width/height) of the - controller in a Q3CheckListItem. - \omitvalue PM_DialogButtonsSeparator \omitvalue PM_DialogButtonsButtonWidth \omitvalue PM_DialogButtonsButtonHeight @@ -1520,11 +1479,9 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value CT_CheckBox A check box, like QCheckBox. \value CT_ComboBox A combo box, like QComboBox. \omitvalue CT_DialogButtons - \value CT_Q3DockWindow A Q3DockWindow. \value CT_HeaderSection A header section, like QHeader. \value CT_LineEdit A line edit, like QLineEdit. \value CT_Menu A menu, like QMenu. - \value CT_Q3Header A Qt 3 header section, like Q3Header. \value CT_MenuBar A menu bar, like QMenuBar. \value CT_MenuBarItem A menu bar item, like the buttons in a QMenuBar. \value CT_MenuItem A menu item, like QMenuItem. @@ -1575,7 +1532,6 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \row \li \l CT_ToolButton \li \l QStyleOptionToolButton \row \li \l CT_ComboBox \li \l QStyleOptionComboBox \row \li \l CT_Splitter \li \l QStyleOption - \row \li \l CT_Q3DockWindow \li \l QStyleOptionQ3DockWindow \row \li \l CT_ProgressBar \li \l QStyleOptionProgressBar \row \li \l CT_MenuItem \li \l QStyleOptionMenuItem \endtable @@ -1712,7 +1668,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value SH_TabBar_SelectMouseType Which type of mouse event should cause a tab to be selected. - \value SH_Q3ListViewExpand_SelectMouseType Which type of mouse event should + \value SH_ListViewExpand_SelectMouseType Which type of mouse event should cause a list view expansion to be selected. \value SH_TabBar_PreferNoArrows Whether a tab bar should suggest a size diff --git a/src/widgets/styles/qstyle.h b/src/widgets/styles/qstyle.h index a8ec8c8c3e..985e7a88aa 100644 --- a/src/widgets/styles/qstyle.h +++ b/src/widgets/styles/qstyle.h @@ -136,12 +136,6 @@ public: enum PrimitiveElement { - PE_Q3CheckListController, - PE_Q3CheckListExclusiveIndicator, - PE_Q3CheckListIndicator, - PE_Q3DockWindowSeparator, - PE_Q3Separator, - PE_Frame, PE_FrameDefaultButton, PE_FrameDockWidget, @@ -243,7 +237,6 @@ public: CE_HeaderSection, CE_HeaderLabel, - CE_Q3DockWindowEmptyArea, CE_ToolBoxTab, CE_SizeGrip, CE_Splitter, @@ -297,23 +290,10 @@ public: SE_SliderFocusRect, - SE_Q3DockWindowHandleRect, - SE_ProgressBarGroove, SE_ProgressBarContents, SE_ProgressBarLabel, - // ### Qt 5: These values are unused; eliminate them - SE_DialogButtonAccept, - SE_DialogButtonReject, - SE_DialogButtonApply, - SE_DialogButtonHelp, - SE_DialogButtonAll, - SE_DialogButtonAbort, - SE_DialogButtonIgnore, - SE_DialogButtonRetry, - SE_DialogButtonCustom, - SE_ToolBoxTabContents, SE_HeaderLabel, @@ -383,7 +363,6 @@ public: CC_Slider, CC_ToolButton, CC_TitleBar, - CC_Q3ListView, CC_Dial, CC_GroupBox, CC_MdiControls, @@ -431,10 +410,6 @@ public: SC_TitleBarContextHelpButton = 0x00000080, SC_TitleBarLabel = 0x00000100, - SC_Q3ListView = 0x00000001, - SC_Q3ListViewBranch = 0x00000002, - SC_Q3ListViewExpand = 0x00000004, - SC_DialGroove = 0x00000001, SC_DialHandle = 0x00000002, SC_DialTickmarks = 0x00000004, @@ -514,8 +489,6 @@ public: PM_IndicatorHeight, PM_ExclusiveIndicatorWidth, PM_ExclusiveIndicatorHeight, - PM_CheckListButtonSize, - PM_CheckListControllerSize, PM_DialogButtonsSeparator, PM_DialogButtonsButtonWidth, @@ -596,7 +569,6 @@ public: CT_ToolButton, CT_ComboBox, CT_Splitter, - CT_Q3DockWindow, CT_ProgressBar, CT_MenuItem, CT_MenuBarItem, @@ -605,7 +577,6 @@ public: CT_TabBarTab, CT_Slider, CT_ScrollBar, - CT_Q3Header, CT_LineEdit, CT_SpinBox, CT_SizeGrip, @@ -669,7 +640,7 @@ public: SH_ToolBox_SelectedPageTitleBold, SH_TabBar_PreferNoArrows, SH_ScrollBar_LeftClickAbsolutePosition, - SH_Q3ListViewExpand_SelectMouseType, + SH_ListViewExpand_SelectMouseType, SH_UnderlineShortcut, SH_SpinBox_AnimateButton, SH_SpinBox_KeyPressAutoRepeatRate, diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp index d72ba1bac5..0b0c6e2393 100644 --- a/src/widgets/styles/qstyleoption.cpp +++ b/src/widgets/styles/qstyleoption.cpp @@ -136,12 +136,6 @@ QT_BEGIN_NAMESPACE \value SO_ComplexCustomBase Reserved for custom QStyleOptions; all custom complex controls values must be above this value - Some style options are defined for various Qt3Support controls: - - \value SO_Q3DockWindow \l QStyleOptionQ3DockWindow - \value SO_Q3ListView \l QStyleOptionQ3ListView - \value SO_Q3ListViewItem \l QStyleOptionQ3ListViewItem - \sa type */ @@ -2232,382 +2226,6 @@ QStyleOptionSpinBox::QStyleOptionSpinBox(int version) */ #endif // QT_NO_SPINBOX -/*! - \class QStyleOptionQ3ListViewItem - \brief The QStyleOptionQ3ListViewItem class is used to describe an - item drawn in a Q3ListView. - - \inmodule QtWidgets - - This class is used for drawing the compatibility Q3ListView's - items. \b {It is not recommended for new classes}. - - QStyleOptionQ3ListViewItem contains all the information that - QStyle functions need to draw the Q3ListView items. - - 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, QStyleOptionQ3ListView, Q3ListViewItem -*/ - -/*! - \enum QStyleOptionQ3ListViewItem::Q3ListViewItemFeature - - This enum describes the features a list view item can have. - - \value None A standard item. - \value Expandable The item has children that can be shown. - \value MultiLine The item is more than one line tall. - \value Visible The item is visible. - \value ParentControl The item's parent is a type of item control (Q3CheckListItem::Controller). - - \sa features, Q3ListViewItem::isVisible(), Q3ListViewItem::multiLinesEnabled(), - Q3ListViewItem::isExpandable() -*/ - -/*! - Constructs a QStyleOptionQ3ListViewItem, initializing the members - variables to their default values. -*/ - -QStyleOptionQ3ListViewItem::QStyleOptionQ3ListViewItem() - : QStyleOption(Version, SO_Q3ListViewItem), features(None), height(0), totalHeight(0), - itemY(0), childCount(0) -{ -} - -/*! - \internal -*/ -QStyleOptionQ3ListViewItem::QStyleOptionQ3ListViewItem(int version) - : QStyleOption(version, SO_Q3ListViewItem), features(None), height(0), totalHeight(0), - itemY(0), childCount(0) -{ -} - -/*! - \fn QStyleOptionQ3ListViewItem::QStyleOptionQ3ListViewItem(const QStyleOptionQ3ListViewItem &other) - - Constructs a copy of the \a other style option. -*/ - -/*! - \enum QStyleOptionQ3ListViewItem::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_Q3ListViewItem} 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 QStyleOptionQ3ListViewItem::StyleOptionVersion - - This enum is used to hold information about the version of the style option, and - is defined for each QStyleOption subclass. - - \value Version 1 - - 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 QStyleOptionQ3ListViewItem::features - \brief the features for this item - - This variable is a bitwise OR of the features of the item. The deafult value is \l None. - - \sa Q3ListViewItemFeature -*/ - -/*! - \variable QStyleOptionQ3ListViewItem::height - \brief the height of the item - - This doesn't include the height of the item's children. The default height is 0. - - \sa Q3ListViewItem::height() -*/ - -/*! - \variable QStyleOptionQ3ListViewItem::totalHeight - \brief the total height of the item, including its children - - The default total height is 0. - - \sa Q3ListViewItem::totalHeight() -*/ - -/*! - \variable QStyleOptionQ3ListViewItem::itemY - \brief the Y-coordinate for the item - - The default value is 0. - - \sa Q3ListViewItem::itemPos() -*/ - -/*! - \variable QStyleOptionQ3ListViewItem::childCount - \brief the number of children the item has -*/ - -/*! - \class QStyleOptionQ3ListView - \brief The QStyleOptionQ3ListView class is used to describe the - parameters for drawing a Q3ListView. - - \inmodule QtWidgets - - This class is used for drawing the compatibility Q3ListView. \b - {It is not recommended for new classes}. - - QStyleOptionQ3ListView contains all the information that QStyle - functions need to draw Q3ListView. - - 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 QStyleOptionComplex, Q3ListView, QStyleOptionQ3ListViewItem -*/ - -/*! - Creates a QStyleOptionQ3ListView, initializing the members - variables to their default values. -*/ - -QStyleOptionQ3ListView::QStyleOptionQ3ListView() - : QStyleOptionComplex(Version, SO_Q3ListView), viewportBGRole(QPalette::Base), - sortColumn(0), itemMargin(0), treeStepSize(0), rootIsDecorated(false) -{ -} - -/*! - \internal -*/ -QStyleOptionQ3ListView::QStyleOptionQ3ListView(int version) - : QStyleOptionComplex(version, SO_Q3ListView), viewportBGRole(QPalette::Base), - sortColumn(0), itemMargin(0), treeStepSize(0), rootIsDecorated(false) -{ -} - -/*! - \fn QStyleOptionQ3ListView::QStyleOptionQ3ListView(const QStyleOptionQ3ListView &other) - - Constructs a copy of the \a other style option. -*/ - -/*! - \enum QStyleOptionQ3ListView::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_Q3ListView} 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 QStyleOptionQ3ListView::StyleOptionVersion - - This enum is used to hold information about the version of the style option, and - is defined for each QStyleOption subclass. - - \value Version 1 - - 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 QStyleOptionQ3ListView::items - \brief a list of items in the Q3ListView - - This is a list of \l {QStyleOptionQ3ListViewItem}s. The first item - can be used for most of the calculation that are needed for - drawing a list view. Any additional items are the children of - this first item, which may be used for additional information. - - \sa QStyleOptionQ3ListViewItem -*/ - -/*! - \variable QStyleOptionQ3ListView::viewportPalette - \brief the palette of Q3ListView's viewport - - By default, the application's default palette is used. -*/ - -/*! - \variable QStyleOptionQ3ListView::viewportBGRole - \brief the background role of Q3ListView's viewport - - The default value is QPalette::Base. - - \sa QWidget::backgroundRole() -*/ - -/*! - \variable QStyleOptionQ3ListView::sortColumn - \brief the sort column of the list view - - The default value is 0. - - \sa Q3ListView::sortColumn() -*/ - -/*! - \variable QStyleOptionQ3ListView::itemMargin - \brief the margin for items in the list view - - The default value is 0. - - \sa Q3ListView::itemMargin() -*/ - -/*! - \variable QStyleOptionQ3ListView::treeStepSize - \brief the number of pixel to offset children items from their - parents - - The default value is 0. - - \sa Q3ListView::treeStepSize() -*/ - -/*! - \variable QStyleOptionQ3ListView::rootIsDecorated - \brief whether root items are decorated - - The default value is false. - - \sa Q3ListView::rootIsDecorated() -*/ - -/*! - \class QStyleOptionQ3DockWindow - \brief The QStyleOptionQ3DockWindow class is used to describe the - parameters for drawing various parts of a Q3DockWindow. - - \inmodule QtWidgets - - This class is used for drawing the old Q3DockWindow and its - parts. \b {It is not recommended for new classes}. - - QStyleOptionQ3DockWindow contains all the information that QStyle - functions need to draw Q3DockWindow and its parts. - - 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, Q3DockWindow -*/ - -/*! - Constructs a QStyleOptionQ3DockWindow, initializing the member - variables to their default values. -*/ - -QStyleOptionQ3DockWindow::QStyleOptionQ3DockWindow() - : QStyleOption(Version, SO_Q3DockWindow), docked(false), closeEnabled(false) -{ -} - -/*! - \internal -*/ -QStyleOptionQ3DockWindow::QStyleOptionQ3DockWindow(int version) - : QStyleOption(version, SO_Q3DockWindow), docked(false), closeEnabled(false) -{ -} - -/*! - \fn QStyleOptionQ3DockWindow::QStyleOptionQ3DockWindow(const QStyleOptionQ3DockWindow &other) - - Constructs a copy of the \a other style option. -*/ - -/*! - \enum QStyleOptionQ3DockWindow::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_Q3DockWindow} 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 QStyleOptionQ3DockWindow::StyleOptionVersion - - This enum is used to hold information about the version of the style option, and - is defined for each QStyleOption subclass. - - \value Version 1 - - 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 QStyleOptionQ3DockWindow::docked - \brief whether the dock window is currently docked - - The default value is false. -*/ - -/*! - \variable QStyleOptionQ3DockWindow::closeEnabled - \brief whether the dock window has a close button - - The default value is false. -*/ - /*! \class QStyleOptionDockWidget \brief The QStyleOptionDockWidget class is used to describe the @@ -4376,12 +3994,8 @@ QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType) debug << "SO_ToolBox"; break; case QStyleOption::SO_Header: debug << "SO_Header"; break; - case QStyleOption::SO_Q3DockWindow: - debug << "SO_Q3DockWindow"; break; case QStyleOption::SO_DockWidget: debug << "SO_DockWidget"; break; - case QStyleOption::SO_Q3ListViewItem: - debug << "SO_Q3ListViewItem"; break; case QStyleOption::SO_ViewItem: debug << "SO_ViewItem"; break; case QStyleOption::SO_TabWidgetFrame: @@ -4400,8 +4014,6 @@ QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType) debug << "SO_ToolButton"; break; case QStyleOption::SO_ComboBox: debug << "SO_ComboBox"; break; - case QStyleOption::SO_Q3ListView: - debug << "SO_Q3ListView"; break; case QStyleOption::SO_TitleBar: debug << "SO_TitleBar"; break; case QStyleOption::SO_CustomBase: diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h index 677a48ec20..588898637f 100644 --- a/src/widgets/styles/qstyleoption.h +++ b/src/widgets/styles/qstyleoption.h @@ -68,12 +68,12 @@ class Q_WIDGETS_EXPORT QStyleOption public: enum OptionType { SO_Default, SO_FocusRect, SO_Button, SO_Tab, SO_MenuItem, - SO_Frame, SO_ProgressBar, SO_ToolBox, SO_Header, SO_Q3DockWindow, - SO_DockWidget, SO_Q3ListViewItem, SO_ViewItem, SO_TabWidgetFrame, + SO_Frame, SO_ProgressBar, SO_ToolBox, SO_Header, + SO_DockWidget, SO_ViewItem, SO_TabWidgetFrame, SO_TabBarBase, SO_RubberBand, SO_ToolBar, SO_GraphicsItem, SO_Complex = 0xf0000, SO_Slider, SO_SpinBox, SO_ToolButton, SO_ComboBox, - SO_Q3ListView, SO_TitleBar, SO_GroupBox, SO_SizeGrip, + SO_TitleBar, SO_GroupBox, SO_SizeGrip, SO_CustomBase = 0xf00, SO_ComplexCustomBase = 0xf000000 @@ -363,47 +363,6 @@ protected: QStyleOptionMenuItem(int version); }; -class Q_WIDGETS_EXPORT QStyleOptionQ3ListViewItem : public QStyleOption -{ -public: - enum StyleOptionType { Type = SO_Q3ListViewItem }; - enum StyleOptionVersion { Version = 1 }; - - enum Q3ListViewItemFeature { None = 0x00, Expandable = 0x01, MultiLine = 0x02, Visible = 0x04, - ParentControl = 0x08 }; - Q_DECLARE_FLAGS(Q3ListViewItemFeatures, Q3ListViewItemFeature) - - Q3ListViewItemFeatures features; - int height; - int totalHeight; - int itemY; - int childCount; - - QStyleOptionQ3ListViewItem(); - QStyleOptionQ3ListViewItem(const QStyleOptionQ3ListViewItem &other) : QStyleOption(Version, Type) { *this = other; } - -protected: - QStyleOptionQ3ListViewItem(int version); -}; - -Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionQ3ListViewItem::Q3ListViewItemFeatures) - -class Q_WIDGETS_EXPORT QStyleOptionQ3DockWindow : public QStyleOption -{ -public: - enum StyleOptionType { Type = SO_Q3DockWindow }; - enum StyleOptionVersion { Version = 1 }; - - bool docked; - bool closeEnabled; - - QStyleOptionQ3DockWindow(); - QStyleOptionQ3DockWindow(const QStyleOptionQ3DockWindow &other) : QStyleOption(Version, Type) { *this = other; } - -protected: - QStyleOptionQ3DockWindow(int version); -}; - class Q_WIDGETS_EXPORT QStyleOptionDockWidget : public QStyleOption { public: @@ -585,27 +544,6 @@ protected: }; #endif // QT_NO_SPINBOX -class Q_WIDGETS_EXPORT QStyleOptionQ3ListView : public QStyleOptionComplex -{ -public: - enum StyleOptionType { Type = SO_Q3ListView }; - enum StyleOptionVersion { Version = 1 }; - - QList items; - QPalette viewportPalette; - QPalette::ColorRole viewportBGRole; - int sortColumn; - int itemMargin; - int treeStepSize; - bool rootIsDecorated; - - QStyleOptionQ3ListView(); - QStyleOptionQ3ListView(const QStyleOptionQ3ListView &other) : QStyleOptionComplex(Version, Type) { *this = other; } - -protected: - QStyleOptionQ3ListView(int version); -}; - class Q_WIDGETS_EXPORT QStyleOptionToolButton : public QStyleOptionComplex { public: diff --git a/src/widgets/styles/qwindowscestyle.cpp b/src/widgets/styles/qwindowscestyle.cpp index 5bd2de290a..49d4e74aaf 100644 --- a/src/widgets/styles/qwindowscestyle.cpp +++ b/src/widgets/styles/qwindowscestyle.cpp @@ -264,14 +264,13 @@ void QWindowsCEStyle::drawPrimitive(PrimitiveElement element, const QStyleOption option->rect.x() + 1, option->rect.y() + option->rect.height() - 1); //fall through... } - case PE_IndicatorViewItemCheck: - case PE_Q3CheckListIndicator: { + case PE_IndicatorViewItemCheck: { if (!doRestore) { painter->save(); doRestore = true; } int arrowSize= 2; - if (element == PE_Q3CheckListIndicator || element == PE_IndicatorViewItemCheck) { + if (element == PE_IndicatorViewItemCheck) { QLinearGradient linearGradient(QPoint(option->rect.x(),option->rect.y()), QPoint(option->rect.x()+option->rect.width(), option->rect.y()+option->rect.height())); linearGradient.setColorAt(0, windowsCECheckBoxGradientColorBegin); diff --git a/src/widgets/styles/qwindowsmobilestyle.cpp b/src/widgets/styles/qwindowsmobilestyle.cpp index 30269751ca..863bd1aa62 100644 --- a/src/widgets/styles/qwindowsmobilestyle.cpp +++ b/src/widgets/styles/qwindowsmobilestyle.cpp @@ -4875,13 +4875,12 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp } //fall through... } - case PE_IndicatorViewItemCheck: - case PE_Q3CheckListIndicator: { + case PE_IndicatorViewItemCheck: { if (!doRestore) { painter->save(); doRestore = true; } - if (element == PE_Q3CheckListIndicator || element == PE_IndicatorViewItemCheck) { + if (element == PE_IndicatorViewItemCheck) { painter->setPen(option->palette.shadow().color()); if (option->state & State_NoChange) painter->setBrush(option->palette.brush(QPalette::Button)); diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index 295d46963e..c7870d18c2 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -1467,12 +1467,11 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, p->setPen(opt->palette.text().color()); } // Fall through! case PE_IndicatorViewItemCheck: - case PE_Q3CheckListIndicator: if (!doRestore) { p->save(); doRestore = true; } - if (pe == PE_Q3CheckListIndicator || pe == PE_IndicatorViewItemCheck) { + if (pe == PE_IndicatorViewItemCheck) { const QStyleOptionViewItem *itemViewOpt = qstyleoption_cast(opt); p->setPen(itemViewOpt && itemViewOpt->showDecorationSelected diff --git a/src/widgets/styles/qwindowsxpstyle.cpp b/src/widgets/styles/qwindowsxpstyle.cpp index 8b745ba114..a342486339 100644 --- a/src/widgets/styles/qwindowsxpstyle.cpp +++ b/src/widgets/styles/qwindowsxpstyle.cpp @@ -1178,8 +1178,7 @@ void QWindowsXPStyle::polish(QWidget *widget) || qobject_cast(widget) || qobject_cast(widget) #endif // QT_NO_SPINBOX - || widget->inherits("QWorkspaceChild") - || widget->inherits("Q3TitleBar")) + || widget->inherits("QWorkspaceChild")) widget->setAttribute(Qt::WA_Hover); #ifndef QT_NO_RUBBERBAND @@ -1250,8 +1249,7 @@ void QWindowsXPStyle::unpolish(QWidget *widget) || qobject_cast(widget) || qobject_cast(widget) #endif // QT_NO_SPINBOX - || widget->inherits("QWorkspaceChild") - || widget->inherits("Q3TitleBar")) + || widget->inherits("QWorkspaceChild")) widget->setAttribute(Qt::WA_Hover, false); QWindowsStyle::unpolish(widget); } @@ -1822,14 +1820,6 @@ case PE_Frame: } break; - case PE_Q3DockWindowSeparator: - name = QLatin1String("TOOLBAR"); - if (flags & State_Horizontal) - partId = TP_SEPARATOR; - else - partId = TP_SEPARATORVERT; - break; - case PE_FrameWindow: if (const QStyleOptionFrame *frm = qstyleoption_cast(option)) { diff --git a/src/widgets/widgets/qmenu.h b/src/widgets/widgets/qmenu.h index 1fa7195170..e4e6390a9d 100644 --- a/src/widgets/widgets/qmenu.h +++ b/src/widgets/widgets/qmenu.h @@ -190,7 +190,6 @@ private: friend class QMenuBar; friend class QMenuBarPrivate; friend class QTornOffMenu; - friend class Q3PopupMenu; friend class QComboBox; friend class QAction; friend class QToolButtonPrivate; diff --git a/src/widgets/widgets/qtabwidget.h b/src/widgets/widgets/qtabwidget.h index 26d9243eb9..4e8d4d4583 100644 --- a/src/widgets/widgets/qtabwidget.h +++ b/src/widgets/widgets/qtabwidget.h @@ -175,7 +175,6 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_removeTab(int)) Q_PRIVATE_SLOT(d_func(), void _q_tabMoved(int, int)) void setUpLayout(bool = false); - friend class Q3TabDialog; }; #endif // QT_NO_TABWIDGET -- cgit v1.2.3