Convert features.groupbox to QT_[REQUIRE_]CONFIG
Change-Id: I034286043a880ab777ec3f2311572bdc38e7fafc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
414026ad9c
commit
39851c6905
@ -43,7 +43,9 @@
|
|||||||
|
|
||||||
#include "qaction.h"
|
#include "qaction.h"
|
||||||
#include "qapplication.h"
|
#include "qapplication.h"
|
||||||
|
#if QT_CONFIG(groupbox)
|
||||||
#include "qgroupbox.h"
|
#include "qgroupbox.h"
|
||||||
|
#endif
|
||||||
#if QT_CONFIG(label)
|
#if QT_CONFIG(label)
|
||||||
#include "qlabel.h"
|
#include "qlabel.h"
|
||||||
#endif
|
#endif
|
||||||
@ -95,7 +97,7 @@ static QString buddyString(const QWidget *widget)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef QT_NO_GROUPBOX
|
#if QT_CONFIG(groupbox)
|
||||||
QGroupBox *groupbox = qobject_cast<QGroupBox*>(parent);
|
QGroupBox *groupbox = qobject_cast<QGroupBox*>(parent);
|
||||||
if (groupbox)
|
if (groupbox)
|
||||||
return groupbox->title();
|
return groupbox->title();
|
||||||
@ -331,7 +333,7 @@ QAccessibleWidget::relations(QAccessible::Relation match /*= QAccessible::AllRel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifndef QT_NO_GROUPBOX
|
#if QT_CONFIG(groupbox)
|
||||||
QGroupBox *groupbox = qobject_cast<QGroupBox*>(parent);
|
QGroupBox *groupbox = qobject_cast<QGroupBox*>(parent);
|
||||||
if (groupbox && !groupbox->title().isEmpty()) {
|
if (groupbox && !groupbox->title().isEmpty()) {
|
||||||
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(groupbox);
|
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(groupbox);
|
||||||
|
@ -124,7 +124,7 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
|
|||||||
#endif
|
#endif
|
||||||
} else if (classname == QLatin1String("QLabel") || classname == QLatin1String("QLCDNumber")) {
|
} else if (classname == QLatin1String("QLabel") || classname == QLatin1String("QLCDNumber")) {
|
||||||
iface = new QAccessibleDisplay(widget);
|
iface = new QAccessibleDisplay(widget);
|
||||||
#ifndef QT_NO_GROUPBOX
|
#if QT_CONFIG(groupbox)
|
||||||
} else if (classname == QLatin1String("QGroupBox")) {
|
} else if (classname == QLatin1String("QGroupBox")) {
|
||||||
iface = new QAccessibleGroupBox(widget);
|
iface = new QAccessibleGroupBox(widget);
|
||||||
#endif
|
#endif
|
||||||
|
@ -62,7 +62,9 @@
|
|||||||
#if QT_CONFIG(label)
|
#if QT_CONFIG(label)
|
||||||
#include <qlabel.h>
|
#include <qlabel.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if QT_CONFIG(groupbox)
|
||||||
#include <qgroupbox.h>
|
#include <qgroupbox.h>
|
||||||
|
#endif
|
||||||
#if QT_CONFIG(lcdnumber)
|
#if QT_CONFIG(lcdnumber)
|
||||||
#include <qlcdnumber.h>
|
#include <qlcdnumber.h>
|
||||||
#endif
|
#endif
|
||||||
@ -566,7 +568,7 @@ QPoint QAccessibleDisplay::imagePosition() const
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_GROUPBOX
|
#if QT_CONFIG(groupbox)
|
||||||
QAccessibleGroupBox::QAccessibleGroupBox(QWidget *w)
|
QAccessibleGroupBox::QAccessibleGroupBox(QWidget *w)
|
||||||
: QAccessibleWidget(w)
|
: QAccessibleWidget(w)
|
||||||
{
|
{
|
||||||
|
@ -126,7 +126,7 @@ public:
|
|||||||
QPoint imagePosition() const Q_DECL_OVERRIDE;
|
QPoint imagePosition() const Q_DECL_OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef QT_NO_GROUPBOX
|
#if QT_CONFIG(groupbox)
|
||||||
class QAccessibleGroupBox : public QAccessibleWidget
|
class QAccessibleGroupBox : public QAccessibleWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -61,7 +61,9 @@
|
|||||||
#else
|
#else
|
||||||
#include <qlayout.h>
|
#include <qlayout.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if QT_CONFIG(groupbox)
|
||||||
#include <qgroupbox.h>
|
#include <qgroupbox.h>
|
||||||
|
#endif
|
||||||
#include <qmath.h>
|
#include <qmath.h>
|
||||||
#include <qmenu.h>
|
#include <qmenu.h>
|
||||||
#include <qpainter.h>
|
#include <qpainter.h>
|
||||||
@ -441,7 +443,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
|||||||
case PE_FrameLineEdit:
|
case PE_FrameLineEdit:
|
||||||
proxy()->drawPrimitive(PE_Frame, opt, p, widget);
|
proxy()->drawPrimitive(PE_Frame, opt, p, widget);
|
||||||
break;
|
break;
|
||||||
#ifndef QT_NO_GROUPBOX
|
#if QT_CONFIG(groupbox)
|
||||||
case PE_FrameGroupBox:
|
case PE_FrameGroupBox:
|
||||||
if (const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
|
if (const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
|
||||||
if (frame->features & QStyleOptionFrame::Flat) {
|
if (frame->features & QStyleOptionFrame::Flat) {
|
||||||
@ -457,7 +459,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif // QT_NO_GROUPBOX
|
#endif // QT_CONFIG(groupbox)
|
||||||
#if QT_CONFIG(dockwidget)
|
#if QT_CONFIG(dockwidget)
|
||||||
case PE_FrameDockWidget:
|
case PE_FrameDockWidget:
|
||||||
if (const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
|
if (const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(opt)) {
|
||||||
@ -3684,7 +3686,7 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif // QT_CONFIG(dial)
|
#endif // QT_CONFIG(dial)
|
||||||
#ifndef QT_NO_GROUPBOX
|
#if QT_CONFIG(groupbox)
|
||||||
case CC_GroupBox:
|
case CC_GroupBox:
|
||||||
if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)) {
|
if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)) {
|
||||||
// Draw frame
|
// Draw frame
|
||||||
@ -3745,7 +3747,7 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif // QT_NO_GROUPBOX
|
#endif // QT_CONFIG(groupbox)
|
||||||
#ifndef QT_NO_MDIAREA
|
#ifndef QT_NO_MDIAREA
|
||||||
case CC_MdiControls:
|
case CC_MdiControls:
|
||||||
{
|
{
|
||||||
@ -3916,7 +3918,7 @@ QStyle::SubControl QCommonStyle::hitTestComplexControl(ComplexControl cc, const
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif // QT_CONFIG(combobox)
|
#endif // QT_CONFIG(combobox)
|
||||||
#ifndef QT_NO_GROUPBOX
|
#if QT_CONFIG(groupbox)
|
||||||
case CC_GroupBox:
|
case CC_GroupBox:
|
||||||
if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)) {
|
if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)) {
|
||||||
QRect r;
|
QRect r;
|
||||||
@ -3931,7 +3933,7 @@ QStyle::SubControl QCommonStyle::hitTestComplexControl(ComplexControl cc, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif // QT_NO_GROUPBOX
|
#endif // QT_CONFIG(groupbox)
|
||||||
case CC_MdiControls:
|
case CC_MdiControls:
|
||||||
{
|
{
|
||||||
QRect r;
|
QRect r;
|
||||||
@ -4263,7 +4265,7 @@ QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex
|
|||||||
ret = visualRect(tb->direction, tb->rect, ret);
|
ret = visualRect(tb->direction, tb->rect, ret);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifndef QT_NO_GROUPBOX
|
#if QT_CONFIG(groupbox)
|
||||||
case CC_GroupBox: {
|
case CC_GroupBox: {
|
||||||
if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)) {
|
if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)) {
|
||||||
switch (sc) {
|
switch (sc) {
|
||||||
@ -4339,7 +4341,7 @@ QRect QCommonStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif // QT_NO_GROUPBOX
|
#endif // QT_CONFIG(groupbox)
|
||||||
#ifndef QT_NO_MDIAREA
|
#ifndef QT_NO_MDIAREA
|
||||||
case CC_MdiControls:
|
case CC_MdiControls:
|
||||||
{
|
{
|
||||||
@ -4883,12 +4885,12 @@ QSize QCommonStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
|
|||||||
if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt))
|
if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt))
|
||||||
sz += QSize(2*f->lineWidth, 2*f->lineWidth);
|
sz += QSize(2*f->lineWidth, 2*f->lineWidth);
|
||||||
break;
|
break;
|
||||||
#ifndef QT_NO_GROUPBOX
|
#if QT_CONFIG(groupbox)
|
||||||
case CT_GroupBox:
|
case CT_GroupBox:
|
||||||
if (const QGroupBox *grb = static_cast<const QGroupBox *>(widget))
|
if (const QGroupBox *grb = static_cast<const QGroupBox *>(widget))
|
||||||
sz += QSize(!grb->isFlat() ? 16 : 0, 0);
|
sz += QSize(!grb->isFlat() ? 16 : 0, 0);
|
||||||
break;
|
break;
|
||||||
#endif // QT_NO_GROUPBOX
|
#endif // QT_CONFIG(groupbox)
|
||||||
case CT_MdiControls:
|
case CT_MdiControls:
|
||||||
if (const QStyleOptionComplex *styleOpt = qstyleoption_cast<const QStyleOptionComplex *>(opt)) {
|
if (const QStyleOptionComplex *styleOpt = qstyleoption_cast<const QStyleOptionComplex *>(opt)) {
|
||||||
const int buttonSize = proxy()->pixelMetric(PM_TitleBarButtonSize, styleOpt, widget);
|
const int buttonSize = proxy()->pixelMetric(PM_TitleBarButtonSize, styleOpt, widget);
|
||||||
@ -4968,7 +4970,7 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
|
|||||||
ret = QDialogButtonBox::AcceptRole;
|
ret = QDialogButtonBox::AcceptRole;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifndef QT_NO_GROUPBOX
|
#if QT_CONFIG(groupbox)
|
||||||
case SH_GroupBox_TextLabelVerticalAlignment:
|
case SH_GroupBox_TextLabelVerticalAlignment:
|
||||||
ret = Qt::AlignVCenter;
|
ret = Qt::AlignVCenter;
|
||||||
break;
|
break;
|
||||||
@ -4976,7 +4978,7 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
|
|||||||
case SH_GroupBox_TextLabelColor:
|
case SH_GroupBox_TextLabelColor:
|
||||||
ret = opt ? int(opt->palette.color(QPalette::Text).rgba()) : 0;
|
ret = opt ? int(opt->palette.color(QPalette::Text).rgba()) : 0;
|
||||||
break;
|
break;
|
||||||
#endif // QT_NO_GROUPBOX
|
#endif // QT_CONFIG(groupbox)
|
||||||
|
|
||||||
case SH_ListViewExpand_SelectMouseType:
|
case SH_ListViewExpand_SelectMouseType:
|
||||||
case SH_TabBar_SelectMouseType:
|
case SH_TabBar_SelectMouseType:
|
||||||
|
@ -57,7 +57,9 @@
|
|||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
#include <qmainwindow.h>
|
#include <qmainwindow.h>
|
||||||
#include <qfont.h>
|
#include <qfont.h>
|
||||||
|
#if QT_CONFIG(groupbox)
|
||||||
#include <qgroupbox.h>
|
#include <qgroupbox.h>
|
||||||
|
#endif
|
||||||
#include <qpixmapcache.h>
|
#include <qpixmapcache.h>
|
||||||
#if QT_CONFIG(scrollbar)
|
#if QT_CONFIG(scrollbar)
|
||||||
#include <qscrollbar.h>
|
#include <qscrollbar.h>
|
||||||
|
@ -3290,7 +3290,7 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
|
|||||||
HIThemeGroupBoxDrawInfo gdi;
|
HIThemeGroupBoxDrawInfo gdi;
|
||||||
gdi.version = qt_mac_hitheme_version;
|
gdi.version = qt_mac_hitheme_version;
|
||||||
gdi.state = tds;
|
gdi.state = tds;
|
||||||
#ifndef QT_NO_GROUPBOX
|
#if QT_CONFIG(groupbox)
|
||||||
if (w && qobject_cast<QGroupBox *>(w->parentWidget()))
|
if (w && qobject_cast<QGroupBox *>(w->parentWidget()))
|
||||||
gdi.kind = kHIThemeGroupBoxKindSecondary;
|
gdi.kind = kHIThemeGroupBoxKindSecondary;
|
||||||
else
|
else
|
||||||
|
@ -68,7 +68,9 @@
|
|||||||
#include <qevent.h>
|
#include <qevent.h>
|
||||||
#include <qfocusframe.h>
|
#include <qfocusframe.h>
|
||||||
#include <qformlayout.h>
|
#include <qformlayout.h>
|
||||||
|
#if QT_CONFIG(groupbox)
|
||||||
#include <qgroupbox.h>
|
#include <qgroupbox.h>
|
||||||
|
#endif
|
||||||
#include <qhash.h>
|
#include <qhash.h>
|
||||||
#include <qheaderview.h>
|
#include <qheaderview.h>
|
||||||
#include <qlayout.h>
|
#include <qlayout.h>
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qgroupbox.h"
|
#include "qgroupbox.h"
|
||||||
#ifndef QT_NO_GROUPBOX
|
|
||||||
#include "qapplication.h"
|
#include "qapplication.h"
|
||||||
#include "qbitmap.h"
|
#include "qbitmap.h"
|
||||||
#include "qdrawutil.h"
|
#include "qdrawutil.h"
|
||||||
@ -751,9 +751,6 @@ void QGroupBox::mouseReleaseEvent(QMouseEvent *event)
|
|||||||
update(style()->subControlRect(QStyle::CC_GroupBox, &box, QStyle::SC_GroupBoxCheckBox, this));
|
update(style()->subControlRect(QStyle::CC_GroupBox, &box, QStyle::SC_GroupBoxCheckBox, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#include "moc_qgroupbox.cpp"
|
#include "moc_qgroupbox.cpp"
|
||||||
|
|
||||||
#endif //QT_NO_GROUPBOX
|
|
||||||
|
@ -43,11 +43,10 @@
|
|||||||
#include <QtWidgets/qtwidgetsglobal.h>
|
#include <QtWidgets/qtwidgetsglobal.h>
|
||||||
#include <QtWidgets/qframe.h>
|
#include <QtWidgets/qframe.h>
|
||||||
|
|
||||||
|
QT_REQUIRE_CONFIG(groupbox);
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
#ifndef QT_NO_GROUPBOX
|
|
||||||
|
|
||||||
class QGroupBoxPrivate;
|
class QGroupBoxPrivate;
|
||||||
class QStyleOptionGroupBox;
|
class QStyleOptionGroupBox;
|
||||||
class Q_WIDGETS_EXPORT QGroupBox : public QWidget
|
class Q_WIDGETS_EXPORT QGroupBox : public QWidget
|
||||||
@ -104,8 +103,6 @@ private:
|
|||||||
Q_PRIVATE_SLOT(d_func(), void _q_setChildrenEnabled(bool b))
|
Q_PRIVATE_SLOT(d_func(), void _q_setChildrenEnabled(bool b))
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QT_NO_GROUPBOX
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // QGROUPBOX_H
|
#endif // QGROUPBOX_H
|
||||||
|
@ -7,7 +7,6 @@ HEADERS += \
|
|||||||
widgets/qabstractspinbox_p.h \
|
widgets/qabstractspinbox_p.h \
|
||||||
widgets/qframe.h \
|
widgets/qframe.h \
|
||||||
widgets/qframe_p.h \
|
widgets/qframe_p.h \
|
||||||
widgets/qgroupbox.h \
|
|
||||||
widgets/qkeysequenceedit.h \
|
widgets/qkeysequenceedit.h \
|
||||||
widgets/qkeysequenceedit_p.h \
|
widgets/qkeysequenceedit_p.h \
|
||||||
widgets/qlineedit.h \
|
widgets/qlineedit.h \
|
||||||
@ -53,7 +52,6 @@ SOURCES += \
|
|||||||
widgets/qabstractspinbox.cpp \
|
widgets/qabstractspinbox.cpp \
|
||||||
widgets/qeffects.cpp \
|
widgets/qeffects.cpp \
|
||||||
widgets/qframe.cpp \
|
widgets/qframe.cpp \
|
||||||
widgets/qgroupbox.cpp \
|
|
||||||
widgets/qkeysequenceedit.cpp \
|
widgets/qkeysequenceedit.cpp \
|
||||||
widgets/qlineedit_p.cpp \
|
widgets/qlineedit_p.cpp \
|
||||||
widgets/qlineedit.cpp \
|
widgets/qlineedit.cpp \
|
||||||
@ -160,6 +158,11 @@ qtConfig(fontcombobox) {
|
|||||||
SOURCES += widgets/qfontcombobox.cpp
|
SOURCES += widgets/qfontcombobox.cpp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qtConfig(groupbox) {
|
||||||
|
HEADERS += widgets/qgroupbox.h
|
||||||
|
SOURCES += widgets/qgroupbox.cpp
|
||||||
|
}
|
||||||
|
|
||||||
qtConfig(label) {
|
qtConfig(label) {
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
widgets/qlabel.h \
|
widgets/qlabel.h \
|
||||||
|
Loading…
Reference in New Issue
Block a user