Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qquickswitch_p.h
Go to the documentation of this file.
1
// Copyright (C) 2017 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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QQUICKSWITCH_P_H
6
#
define
QQUICKSWITCH_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtQuickTemplates2
/
private
/
qquickabstractbutton_p
.
h
>
20
21
QT_BEGIN_NAMESPACE
22
23
class
QQuickSwitchPrivate;
24
25
class
Q_QUICKTEMPLATES2_EXPORT
QQuickSwitch
:
public
QQuickAbstractButton
26
{
27
Q_OBJECT
28
Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
29
Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL)
30
QML_NAMED_ELEMENT(Switch)
31
QML_ADDED_IN_VERSION(2, 0)
32
33
public
:
34
explicit
QQuickSwitch(QQuickItem *parent =
nullptr
);
35
36
qreal position()
const
;
37
void
setPosition(qreal position);
38
39
qreal visualPosition()
const
;
40
41
Q_SIGNALS:
42
void
positionChanged();
43
void
visualPositionChanged();
44
45
protected
:
46
void
mouseMoveEvent(QMouseEvent *event) override;
47
#
if
QT_CONFIG
(
quicktemplates2_multitouch
)
48
void
touchEvent(QTouchEvent *event) override;
49
#
endif
50
51
void
mirrorChange() override;
52
53
void
nextCheckState() override;
54
void
buttonChange(ButtonChange change) override;
55
56
QFont defaultFont()
const
override;
57
58
private
:
59
Q_DISABLE_COPY(QQuickSwitch)
60
Q_DECLARE_PRIVATE(QQuickSwitch)
61
};
62
63
QT_END_NAMESPACE
64
65
#
endif
// QQUICKSWITCH_P_H
QQuickSwitch
Definition
qquickswitch_p.h:26
qtdeclarative
src
quicktemplates
qquickswitch_p.h
Generated on
for Qt by
1.18.0