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