Add feature.abstractslider
Change-Id: Ib5d0186162fc3b750e6440c74b1181787093ef97 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
parent
cf7d3b524d
commit
b53d7664c9
@ -330,10 +330,17 @@
|
|||||||
"section": "Widgets",
|
"section": "Widgets",
|
||||||
"output": [ "publicFeature", "feature" ]
|
"output": [ "publicFeature", "feature" ]
|
||||||
},
|
},
|
||||||
|
"abstractslider": {
|
||||||
|
"label": "QAbstractSlider",
|
||||||
|
"purpose": "Common super class for widgets like QScrollBar, QSlider and QDial.",
|
||||||
|
"section": "Widgets",
|
||||||
|
"output": [ "publicFeature" ]
|
||||||
|
},
|
||||||
"slider": {
|
"slider": {
|
||||||
"label": "QSlider",
|
"label": "QSlider",
|
||||||
"purpose": "Provides sliders controlling a bounded value.",
|
"purpose": "Provides sliders controlling a bounded value.",
|
||||||
"section": "Widgets",
|
"section": "Widgets",
|
||||||
|
"condition": "features.abstractslider",
|
||||||
"output": [ "publicFeature", "feature" ]
|
"output": [ "publicFeature", "feature" ]
|
||||||
},
|
},
|
||||||
"scrollbar": {
|
"scrollbar": {
|
||||||
|
@ -3294,7 +3294,9 @@ void QFusionStyle::polish(QWidget *widget)
|
|||||||
#if QT_CONFIG(splitter)
|
#if QT_CONFIG(splitter)
|
||||||
|| qobject_cast<QSplitterHandle *>(widget)
|
|| qobject_cast<QSplitterHandle *>(widget)
|
||||||
#endif
|
#endif
|
||||||
|
#if QT_CONFIG(abstractslider)
|
||||||
|| qobject_cast<QAbstractSlider *>(widget)
|
|| qobject_cast<QAbstractSlider *>(widget)
|
||||||
|
#endif
|
||||||
#if QT_CONFIG(spinbox)
|
#if QT_CONFIG(spinbox)
|
||||||
|| qobject_cast<QAbstractSpinBox *>(widget)
|
|| qobject_cast<QAbstractSpinBox *>(widget)
|
||||||
#endif
|
#endif
|
||||||
@ -3333,7 +3335,9 @@ void QFusionStyle::unpolish(QWidget *widget)
|
|||||||
#if QT_CONFIG(splitter)
|
#if QT_CONFIG(splitter)
|
||||||
|| qobject_cast<QSplitterHandle *>(widget)
|
|| qobject_cast<QSplitterHandle *>(widget)
|
||||||
#endif
|
#endif
|
||||||
|
#if QT_CONFIG(abstractslider)
|
||||||
|| qobject_cast<QAbstractSlider *>(widget)
|
|| qobject_cast<QAbstractSlider *>(widget)
|
||||||
|
#endif
|
||||||
#if QT_CONFIG(spinbox)
|
#if QT_CONFIG(spinbox)
|
||||||
|| qobject_cast<QAbstractSpinBox *>(widget)
|
|| qobject_cast<QAbstractSpinBox *>(widget)
|
||||||
#endif
|
#endif
|
||||||
|
@ -2426,9 +2426,11 @@ static bool unstylable(const QWidget *w)
|
|||||||
static quint64 extendedPseudoClass(const QWidget *w)
|
static quint64 extendedPseudoClass(const QWidget *w)
|
||||||
{
|
{
|
||||||
quint64 pc = w->isWindow() ? quint64(PseudoClass_Window) : 0;
|
quint64 pc = w->isWindow() ? quint64(PseudoClass_Window) : 0;
|
||||||
|
#if QT_CONFIG(abstractslider)
|
||||||
if (const QAbstractSlider *slider = qobject_cast<const QAbstractSlider *>(w)) {
|
if (const QAbstractSlider *slider = qobject_cast<const QAbstractSlider *>(w)) {
|
||||||
pc |= ((slider->orientation() == Qt::Vertical) ? PseudoClass_Vertical : PseudoClass_Horizontal);
|
pc |= ((slider->orientation() == Qt::Vertical) ? PseudoClass_Vertical : PseudoClass_Horizontal);
|
||||||
} else
|
} else
|
||||||
|
#endif
|
||||||
#ifndef QT_NO_COMBOBOX
|
#ifndef QT_NO_COMBOBOX
|
||||||
if (const QComboBox *combo = qobject_cast<const QComboBox *>(w)) {
|
if (const QComboBox *combo = qobject_cast<const QComboBox *>(w)) {
|
||||||
if (combo->isEditable())
|
if (combo->isEditable())
|
||||||
|
@ -43,6 +43,8 @@
|
|||||||
#include <QtWidgets/qtwidgetsglobal.h>
|
#include <QtWidgets/qtwidgetsglobal.h>
|
||||||
#include <QtWidgets/qwidget.h>
|
#include <QtWidgets/qwidget.h>
|
||||||
|
|
||||||
|
QT_REQUIRE_CONFIG(abstractslider);
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,6 +57,8 @@
|
|||||||
#include "private/qwidget_p.h"
|
#include "private/qwidget_p.h"
|
||||||
#include "qstyle.h"
|
#include "qstyle.h"
|
||||||
|
|
||||||
|
QT_REQUIRE_CONFIG(abstractslider);
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class QAbstractSliderPrivate : public QWidgetPrivate
|
class QAbstractSliderPrivate : public QWidgetPrivate
|
||||||
|
@ -42,13 +42,14 @@
|
|||||||
#define QDIAL_H
|
#define QDIAL_H
|
||||||
|
|
||||||
#include <QtWidgets/qtwidgetsglobal.h>
|
#include <QtWidgets/qtwidgetsglobal.h>
|
||||||
|
|
||||||
|
#if QT_CONFIG(dial)
|
||||||
|
|
||||||
#include <QtWidgets/qabstractslider.h>
|
#include <QtWidgets/qabstractslider.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
#ifndef QT_NO_DIAL
|
|
||||||
|
|
||||||
class QDialPrivate;
|
class QDialPrivate;
|
||||||
class QStyleOptionSlider;
|
class QStyleOptionSlider;
|
||||||
|
|
||||||
@ -98,8 +99,8 @@ private:
|
|||||||
Q_DISABLE_COPY(QDial)
|
Q_DISABLE_COPY(QDial)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QT_NO_DIAL
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // QT_CONFIG(dial)
|
||||||
|
|
||||||
#endif // QDIAL_H
|
#endif // QDIAL_H
|
||||||
|
@ -42,13 +42,13 @@
|
|||||||
|
|
||||||
#include <QtWidgets/qtwidgetsglobal.h>
|
#include <QtWidgets/qtwidgetsglobal.h>
|
||||||
#include <QtWidgets/qwidget.h>
|
#include <QtWidgets/qwidget.h>
|
||||||
|
|
||||||
|
#if QT_CONFIG(scrollbar)
|
||||||
|
|
||||||
#include <QtWidgets/qabstractslider.h>
|
#include <QtWidgets/qabstractslider.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
#ifndef QT_NO_SCROLLBAR
|
|
||||||
|
|
||||||
class QScrollBarPrivate;
|
class QScrollBarPrivate;
|
||||||
class QStyleOptionSlider;
|
class QStyleOptionSlider;
|
||||||
|
|
||||||
@ -94,8 +94,8 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QT_NO_SCROLLBAR
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // QT_CONFIG(scrollbar)
|
||||||
|
|
||||||
#endif // QSCROLLBAR_H
|
#endif // QSCROLLBAR_H
|
||||||
|
@ -41,13 +41,14 @@
|
|||||||
#define QSLIDER_H
|
#define QSLIDER_H
|
||||||
|
|
||||||
#include <QtWidgets/qtwidgetsglobal.h>
|
#include <QtWidgets/qtwidgetsglobal.h>
|
||||||
|
|
||||||
|
#if QT_CONFIG(slider)
|
||||||
|
|
||||||
#include <QtWidgets/qabstractslider.h>
|
#include <QtWidgets/qabstractslider.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
#ifndef QT_NO_SLIDER
|
|
||||||
|
|
||||||
class QSliderPrivate;
|
class QSliderPrivate;
|
||||||
class QStyleOptionSlider;
|
class QStyleOptionSlider;
|
||||||
class Q_WIDGETS_EXPORT QSlider : public QAbstractSlider
|
class Q_WIDGETS_EXPORT QSlider : public QAbstractSlider
|
||||||
@ -99,8 +100,8 @@ private:
|
|||||||
Q_DECLARE_PRIVATE(QSlider)
|
Q_DECLARE_PRIVATE(QSlider)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QT_NO_SLIDER
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // QT_CONFIG(slider)
|
||||||
|
|
||||||
#endif // QSLIDER_H
|
#endif // QSLIDER_H
|
||||||
|
@ -5,8 +5,6 @@ HEADERS += \
|
|||||||
widgets/qbuttongroup_p.h \
|
widgets/qbuttongroup_p.h \
|
||||||
widgets/qabstractbutton.h \
|
widgets/qabstractbutton.h \
|
||||||
widgets/qabstractbutton_p.h \
|
widgets/qabstractbutton_p.h \
|
||||||
widgets/qabstractslider.h \
|
|
||||||
widgets/qabstractslider_p.h \
|
|
||||||
widgets/qabstractspinbox.h \
|
widgets/qabstractspinbox.h \
|
||||||
widgets/qabstractspinbox_p.h \
|
widgets/qabstractspinbox_p.h \
|
||||||
widgets/qcalendarwidget.h \
|
widgets/qcalendarwidget.h \
|
||||||
@ -79,7 +77,6 @@ HEADERS += \
|
|||||||
SOURCES += \
|
SOURCES += \
|
||||||
widgets/qbuttongroup.cpp \
|
widgets/qbuttongroup.cpp \
|
||||||
widgets/qabstractbutton.cpp \
|
widgets/qabstractbutton.cpp \
|
||||||
widgets/qabstractslider.cpp \
|
|
||||||
widgets/qabstractspinbox.cpp \
|
widgets/qabstractspinbox.cpp \
|
||||||
widgets/qcalendarwidget.cpp \
|
widgets/qcalendarwidget.cpp \
|
||||||
widgets/qcombobox.cpp \
|
widgets/qcombobox.cpp \
|
||||||
@ -131,6 +128,15 @@ SOURCES += \
|
|||||||
widgets/qtoolbararealayout.cpp \
|
widgets/qtoolbararealayout.cpp \
|
||||||
widgets/qplaintextedit.cpp
|
widgets/qplaintextedit.cpp
|
||||||
|
|
||||||
|
qtConfig(abstractslider) {
|
||||||
|
HEADERS += \
|
||||||
|
widgets/qabstractslider.h \
|
||||||
|
widgets/qabstractslider_p.h
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
widgets/qabstractslider.cpp
|
||||||
|
}
|
||||||
|
|
||||||
qtConfig(checkbox) {
|
qtConfig(checkbox) {
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
widgets/qcheckbox.h
|
widgets/qcheckbox.h
|
||||||
|
Loading…
x
Reference in New Issue
Block a user