Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdial.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
5#ifndef QDIAL_H
6#define QDIAL_H
7
8#include <QtWidgets/qtwidgetsglobal.h>
9
10#include <QtWidgets/qabstractslider.h>
11
13
15
16class QDialPrivate;
17class QStyleOptionSlider;
18
19class Q_WIDGETS_EXPORT QDial: public QAbstractSlider
20{
22
23 Q_PROPERTY(bool wrapping READ wrapping WRITE setWrapping)
24 Q_PROPERTY(int notchSize READ notchSize)
25 Q_PROPERTY(qreal notchTarget READ notchTarget WRITE setNotchTarget)
26 Q_PROPERTY(bool notchesVisible READ notchesVisible WRITE setNotchesVisible)
27public:
28 explicit QDial(QWidget *parent = nullptr);
29
30 ~QDial();
31
32 bool wrapping() const;
33
34 int notchSize() const;
35
36 void setNotchTarget(double target);
37 qreal notchTarget() const;
38 bool notchesVisible() const;
39
40 QSize sizeHint() const override;
41 QSize minimumSizeHint() const override;
42
43public Q_SLOTS:
44 void setNotchesVisible(bool visible);
45 void setWrapping(bool on);
46
47protected:
48 bool event(QEvent *e) override;
49 void resizeEvent(QResizeEvent *re) override;
50 void paintEvent(QPaintEvent *pe) override;
51
52 void mousePressEvent(QMouseEvent *me) override;
53 void mouseReleaseEvent(QMouseEvent *me) override;
54 void mouseMoveEvent(QMouseEvent *me) override;
55
56 void sliderChange(SliderChange change) override;
57 virtual void initStyleOption(QStyleOptionSlider *option) const;
58
59
61 Q_DECLARE_PRIVATE(QDial)
62 Q_DISABLE_COPY(QDial)
63};
64
66
67#endif // QDIAL_H
The QAbstractSlider class provides an integer value within a range.
SliderChange
\value SliderRangeChange \value SliderOrientationChange \value SliderStepsChange \value SliderValueCh...
The QDial class provides a rounded range control (like a speedometer or potentiometer).
Definition qdial.h:20
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtGui
Definition qevent.h:196
The QPaintEvent class contains event parameters for paint events.
Definition qevent.h:486
The QResizeEvent class contains event parameters for resize events.
Definition qevent.h:548
\inmodule QtCore
Definition qsize.h:25
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
Combined button and popup list for selecting options.
GLenum target
struct _cl_event * event
GLuint GLenum option
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
double qreal
Definition qtypes.h:187
#define explicit
spinBox setWrapping(true)