52 #include <QDoubleSpinBox> 55 #include <private/qmath_p.h> 59 #ifndef QT_NO_ACCESSIBILITY 61 #ifndef QT_NO_SCROLLBAR 123 if (entry)
switch (rel) {
182 if (!
widget()->isEnabled())
185 if (action ==
Press) {
309 if (!
widget()->isEnabled())
312 if (action ==
Press) {
335 Q_ASSERT(qobject_cast<QDoubleSpinBox *>(widget));
376 rect = spinBoxOption.
rect;
465 #endif // QT_NO_SPINBOX 467 #ifndef QT_NO_SCROLLBAR 627 #endif // QT_NO_SCROLLBAR 676 if (!
slider()->isVisible())
717 if (!child || child == 2)
815 Q_ASSERT(qobject_cast<QAbstractSlider *>(w));
857 #endif // QT_NO_SLIDER 864 Q_ASSERT(qobject_cast<QDial *>(widget));
871 if (!
dial()->isVisible())
880 qreal radius =
qMin(width, height) / 2.0;
881 qreal delta = radius / 6.0;
882 qreal dx = delta + (width - 2 * radius) / 2.0;
883 qreal dy = delta + (height - 2 * radius) / 2.0;
884 rect =
QRect(
int(dx),
int(dy),
int(radius * 2 - 2 * delta),
int(radius * 2 - 2 * delta));
885 if (
dial()->notchesVisible()) {
886 rect.translate(
int(-radius / 6),
int(-radius / 6));
887 rect.setWidth(rect.width() + int(radius / 3));
888 rect.setHeight(rect.height() + int(radius / 3));
909 int radius =
qMin(width, height) / 2;
912 int bigLineSize = radius / 6;
915 if (bigLineSize > radius / 2)
916 bigLineSize = radius / 2;
917 int len = radius - bigLineSize - 5;
924 0.5 + yc - len *
qSin(angle));
926 0.5 + yc - back *
qSin(angle +
Q_PI * 5 / 6));
928 0.5 + yc - back *
qSin(angle -
Q_PI * 5 / 6));
949 if (textType ==
Name) {
992 #endif // QT_NO_ACCESSIBILITY
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QVariant class acts like a union for the most common Qt data types.
QAccessibleSlider(QWidget *w)
Constructs a QAccessibleScrollBar object for w.
T qobject_cast(QObject *object)
Role role(int child) const
Reimplemented Function
int value
the slider's current value
QRect rect(int child) const
Reimplemented Function
SubControl
This enum describes the available sub controls.
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
#define QT_END_NAMESPACE
This macro expands to.
int navigate(RelationFlag rel, int entry, QAccessibleInterface **target) const
Reimplemented Function
QDoubleSpinBox * doubleSpinBox() const
Returns the underlying QDoubleSpinBox.
QAccessibleAbstractSlider(QWidget *w, Role r=Slider)
virtual QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget=0) const =0
Returns the rectangle containing the specified subControl of the given complex control (with the styl...
QObject * object() const
Returns a pointer to the QObject this interface implementation provides information for...
QVariant invokeMethodEx(Method method, int child, const QVariantList ¶ms)
Role role(int child) const
Reimplemented Function
QVariant invokeMethodEx(Method method, int child, const QVariantList ¶ms)
int childCount() const
Reimplemented Function
Role
This enum defines the role of an accessible object.
The QPointF class defines a point in the plane using floating point precision.
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
void setCurrentValue(const QVariant &value)
int width() const
Returns the width of the rectangle.
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int navigate(RelationFlag rel, int entry, QAccessibleInterface **target) const
Reimplemented Function
QSpinBox * spinBox() const
Returns the underlying QSpinBox.
QAccessibleAbstractSpinBox(QWidget *w)
QString Q_GUI_EXPORT qt_accStripAmp(const QString &text)
int height() const
Returns the height of the rectangle.
The QString class provides a Unicode character string.
State state(int child) const
Reimplemented Function
int maximum
the slider's maximum value
QRectF boundingRect() const
Returns the bounding rectangle of the polygon, or QRectF(0,0,0,0) if the polygon is empty...
bool doAction(int action, int child, const QVariantList ¶ms)
Reimplemented Function
QString actionText(int action, Text t, int child) const
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
int minimum
the sliders's minimum value
void stepUp()
Steps up by one linestep Calling this slot is analogous to calling stepBy(1);.
QRect rect(int child) const
Reimplemented Function
QString text(Text textType, int child) const
Returns the value of the text property t of the object, or of the object's child if child is not 0...
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool isEmpty(const char *str)
void stepDown()
Steps down by one linestep Calling this slot is analogous to calling stepBy(-1);. ...
RelationFlag
This enum type defines bit flags that can be combined to indicate the relationship between two access...
void initFrom(const QWidget *w)
The QStyleOptionSpinBox class is used to describe the parameters necessary for drawing a spin box...
Method
This enum describes the possible types of methods that can be invoked on an accessible object...
QString text(Text t, int child) const
Reimplemented Function
The QPolygonF class provides a vector of points using floating point precision.
Qt::Orientation orientation() const
int childCount() const
Reimplemented Function
Type
This enum type defines the types of variable that a QVariant can contain.
Role role(int child) const
Returns the role of the object, or of the object's child if child is not 0.
State state(int child) const
Reimplemented Function
int defaultAction(int child) const
Returns the default action for the given child.
QAccessibleSpinBox(QWidget *w)
Constructs a QAccessibleSpinWidget object for w.
The QSlider widget provides a vertical or horizontal slider.
bool invertedAppearance() const
The QAbstractSpinBox class provides a spinbox and a line edit to display values.
The State element defines configurations of objects and properties.
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
virtual QString textFromValue(double val) const
This virtual function is used by the spin box whenever it needs to display the given value...
QRect toRect() const
Returns a QRect based on the values of this rectangle.
QSlider * slider() const
Returns the slider.
bool wrapping
whether wrapping is enabled
QAbstractSpinBox * abstractSpinBox() const
Returns the underlying QAbstractSpinBox.
QAccessibleDial(QWidget *w)
qreal angle(const QPointF &p1, const QPointF &p2)
QString text(Text t, int child) const
Reimplemented Function
State state(int child) const
Reimplemented Function
QString text(Text t, int child) const
Reimplemented Function
The QDoubleSpinBox class provides a spin box widget that takes doubles.
int y() const
Returns the y-coordinate of the rectangle's top edge.
The QAccessibleInterface class defines an interface that exposes information about accessible objects...
Type type() const
Returns the storage type of the value stored in the variant.
State state(int child) const
Returns the current state of the object, or of the object's child if child is not 0...
QStyleOptionSlider Q_GUI_EXPORT qt_qscrollbarStyleOption(QScrollBar *scrollBar)
Returns the style option for scroll bar.
int x() const
Returns the x-coordinate of the rectangle's left edge.
QVariant invokeMethodEx(Method method, int child, const QVariantList ¶ms)
The QPoint class defines a point in the plane using integer precision.
QRect rect(int child) const
Returns the geometry of the object, or of the object's child if child is not 0.
The QRect class defines a rectangle in the plane using integer precision.
The QAbstractSlider class provides an integer value within a range.
The QSpinBox class provides a spin box widget.
The QDial class provides a rounded range control (like a speedometer or potentiometer).
T qvariant_cast(const QVariant &)
int y() const
Returns the y coordinate of this point.
int childCount() const
Reimplemented Function
QVariant property(const char *name) const
Returns the value of the object's name property.
int childCount() const
Returns the number of children that belong to this object.
bool doAction(int action, int child, const QVariantList ¶ms)
Reimplemented Function
The QStyleOptionSlider class is used to describe the parameters needed for drawing a slider...
QAbstractSlider * abstractSlider() const
int x() const
Returns the x coordinate of this point.
QStyleOptionSlider Q_GUI_EXPORT qt_qsliderStyleOption(QSlider *slider)
Returns the style option for slider.
QRect rect(int child) const
Reimplemented Function
QVariant invokeMethodEx(QAccessible::Method method, int child, const QVariantList ¶ms)
void setCurrentValue(const QVariant &value)
Role role(int child) const
Reimplemented Function
QRect rect
the area that should be used for various calculations and painting
QAccessibleDoubleSpinBox(QWidget *widget)
QString text
the spin box's text, including any prefix and suffix
The Text item allows you to add formatted text to a scene.