Convert features.dial to QT_[REQUIRE_]CONFIG
Change-Id: I9fea2451fe3567fdd1af1540e9a55f218f54b569 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
parent
b75bc0f75c
commit
c36a5aee70
@ -193,7 +193,7 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
|
||||
} else if (classname == QLatin1String("QDialogButtonBox")) {
|
||||
iface = new QAccessibleDialogButtonBox(widget);
|
||||
#endif
|
||||
#ifndef QT_NO_DIAL
|
||||
#if QT_CONFIG(dial)
|
||||
} else if (classname == QLatin1String("QDial")) {
|
||||
iface = new QAccessibleDial(widget);
|
||||
#endif
|
||||
|
@ -40,7 +40,9 @@
|
||||
#include "rangecontrols_p.h"
|
||||
|
||||
#include <qslider.h>
|
||||
#if QT_CONFIG(dial)
|
||||
#include <qdial.h>
|
||||
#endif
|
||||
#include <qspinbox.h>
|
||||
#include <qscrollbar.h>
|
||||
#include <qstyle.h>
|
||||
@ -48,7 +50,6 @@
|
||||
#include <qdebug.h>
|
||||
#include <qglobal.h>
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QDial>
|
||||
#include <QtWidgets/qlineedit.h>
|
||||
#include <qmath.h>
|
||||
#include <private/qmath_p.h>
|
||||
@ -398,7 +399,7 @@ QAbstractSlider *QAccessibleAbstractSlider::abstractSlider() const
|
||||
|
||||
#endif // QT_NO_SLIDER
|
||||
|
||||
#ifndef QT_NO_DIAL
|
||||
#if QT_CONFIG(dial)
|
||||
// ======================================= QAccessibleDial ======================================
|
||||
QAccessibleDial::QAccessibleDial(QWidget *widget)
|
||||
: QAccessibleAbstractSlider(widget, QAccessible::Dial)
|
||||
@ -419,7 +420,7 @@ QDial *QAccessibleDial::dial() const
|
||||
{
|
||||
return static_cast<QDial*>(object());
|
||||
}
|
||||
#endif // QT_NO_DIAL
|
||||
#endif // QT_CONFIG(dial)
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
||||
|
@ -186,7 +186,7 @@ protected:
|
||||
};
|
||||
#endif // QT_NO_SLIDER
|
||||
|
||||
#ifndef QT_NO_DIAL
|
||||
#if QT_CONFIG(dial)
|
||||
class QAccessibleDial : public QAccessibleAbstractSlider
|
||||
{
|
||||
public:
|
||||
@ -197,7 +197,7 @@ public:
|
||||
protected:
|
||||
QDial *dial() const;
|
||||
};
|
||||
#endif // QT_NO_DIAL
|
||||
#endif // QT_CONFIG(dial)
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
||||
|
@ -3084,7 +3084,7 @@ QRect QCommonStyle::subElementRect(SubElement sr, const QStyleOption *opt,
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DIAL
|
||||
#if QT_CONFIG(dial)
|
||||
|
||||
// in lieu of std::array, minimal API
|
||||
template <int N>
|
||||
@ -3132,7 +3132,7 @@ static StaticPolygonF<3> calcArrow(const QStyleOptionSlider *dial, qreal &a)
|
||||
return arrow;
|
||||
}
|
||||
|
||||
#endif // QT_NO_DIAL
|
||||
#endif // QT_CONFIG(dial)
|
||||
|
||||
/*!
|
||||
\reimp
|
||||
@ -3590,7 +3590,7 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl
|
||||
}
|
||||
}
|
||||
break;
|
||||
#ifndef QT_NO_DIAL
|
||||
#if QT_CONFIG(dial)
|
||||
case CC_Dial:
|
||||
if (const QStyleOptionSlider *dial = qstyleoption_cast<const QStyleOptionSlider *>(opt)) {
|
||||
// OK, this is more a port of things over
|
||||
@ -3683,7 +3683,7 @@ void QCommonStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCompl
|
||||
p->restore();
|
||||
}
|
||||
break;
|
||||
#endif // QT_NO_DIAL
|
||||
#endif // QT_CONFIG(dial)
|
||||
#ifndef QT_NO_GROUPBOX
|
||||
case CC_GroupBox:
|
||||
if (const QStyleOptionGroupBox *groupBox = qstyleoption_cast<const QStyleOptionGroupBox *>(opt)) {
|
||||
|
@ -6101,7 +6101,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
#ifndef QT_NO_DIAL
|
||||
#if QT_CONFIG(dial)
|
||||
case CC_Dial:
|
||||
if (const QStyleOptionSlider *dial = qstyleoption_cast<const QStyleOptionSlider *>(opt))
|
||||
QStyleHelper::drawDial(dial, p);
|
||||
|
@ -131,7 +131,7 @@ bool hasAncestor(QObject *obj, QAccessible::Role role)
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
|
||||
|
||||
#ifndef QT_NO_DIAL
|
||||
#if QT_CONFIG(dial)
|
||||
|
||||
int calcBigLineSize(int radius)
|
||||
{
|
||||
@ -350,7 +350,7 @@ void drawDial(const QStyleOptionSlider *option, QPainter *painter)
|
||||
painter->drawEllipse(dialRect);
|
||||
painter->restore();
|
||||
}
|
||||
#endif //QT_NO_DIAL
|
||||
#endif //QT_CONFIG(dial)
|
||||
|
||||
void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect,
|
||||
int left, int top, int right,
|
||||
|
@ -72,12 +72,12 @@ namespace QStyleHelper
|
||||
{
|
||||
QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size);
|
||||
qreal dpiScaled(qreal value);
|
||||
#ifndef QT_NO_DIAL
|
||||
#if QT_CONFIG(dial)
|
||||
qreal angle(const QPointF &p1, const QPointF &p2);
|
||||
QPolygonF calcLines(const QStyleOptionSlider *dial);
|
||||
int calcBigLineSize(int radius);
|
||||
void drawDial(const QStyleOptionSlider *dial, QPainter *painter);
|
||||
#endif //QT_NO_DIAL
|
||||
#endif //QT_CONFIG(dial)
|
||||
void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect,
|
||||
int left = 0, int top = 0, int right = 0,
|
||||
int bottom = 0);
|
||||
|
@ -3225,12 +3225,12 @@ void QWindowsXPStyle::drawComplexControl(ComplexControl cc, const QStyleOptionCo
|
||||
}
|
||||
break;
|
||||
#endif //QT_NO_MDIAREA
|
||||
#ifndef QT_NO_DIAL
|
||||
#if QT_CONFIG(dial)
|
||||
case CC_Dial:
|
||||
if (const QStyleOptionSlider *dial = qstyleoption_cast<const QStyleOptionSlider *>(option))
|
||||
QStyleHelper::drawDial(dial, p);
|
||||
break;
|
||||
#endif // QT_NO_DIAL
|
||||
#endif // QT_CONFIG(dial)
|
||||
default:
|
||||
QWindowsStyle::drawComplexControl(cc, option, p, widget);
|
||||
break;
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include "qdial.h"
|
||||
|
||||
#ifndef QT_NO_DIAL
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qbitmap.h>
|
||||
#include <qcolor.h>
|
||||
@ -480,5 +478,3 @@ bool QDial::event(QEvent *e)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qdial.cpp"
|
||||
|
||||
#endif // QT_NO_DIAL
|
||||
|
@ -43,12 +43,11 @@
|
||||
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
|
||||
#if QT_CONFIG(dial)
|
||||
|
||||
#include <QtWidgets/qabstractslider.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(dial);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QDialPrivate;
|
||||
class QStyleOptionSlider;
|
||||
@ -101,6 +100,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_CONFIG(dial)
|
||||
|
||||
#endif // QDIAL_H
|
||||
|
@ -5,7 +5,6 @@ HEADERS += \
|
||||
widgets/qbuttongroup_p.h \
|
||||
widgets/qabstractspinbox.h \
|
||||
widgets/qabstractspinbox_p.h \
|
||||
widgets/qdial.h \
|
||||
widgets/qframe.h \
|
||||
widgets/qframe_p.h \
|
||||
widgets/qgroupbox.h \
|
||||
@ -58,7 +57,6 @@ HEADERS += \
|
||||
SOURCES += \
|
||||
widgets/qbuttongroup.cpp \
|
||||
widgets/qabstractspinbox.cpp \
|
||||
widgets/qdial.cpp \
|
||||
widgets/qeffects.cpp \
|
||||
widgets/qframe.cpp \
|
||||
widgets/qgroupbox.cpp \
|
||||
@ -152,6 +150,11 @@ qtConfig(datetimeedit) {
|
||||
widgets/qdatetimeedit.cpp
|
||||
}
|
||||
|
||||
qtConfig(dial) {
|
||||
HEADERS += widgets/qdial.h
|
||||
SOURCES += widgets/qdial.cpp
|
||||
}
|
||||
|
||||
qtConfig(dockwidget) {
|
||||
HEADERS += \
|
||||
widgets/qdockwidget.h \
|
||||
|
Loading…
Reference in New Issue
Block a user