Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickioscursorflashtimer_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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 QQUICKIOSCURSORFLASHTIMER_P_H
6#define QQUICKIOSCURSORFLASHTIMER_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 <QtQml/qqml.h>
20#include <QtCore/qobject.h>
21
22QT_BEGIN_NAMESPACE
23
24class QQuickIOSCursorFlashTimer : public QObject
25{
26 Q_OBJECT
27 Q_PROPERTY(bool visible READ visible WRITE setVisible NOTIFY visibleChanged FINAL)
28 Q_PROPERTY(int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged FINAL)
29 Q_PROPERTY(bool running READ running WRITE setRunning NOTIFY runningChanged FINAL)
30 QML_NAMED_ELEMENT(CursorFlashTimer)
31
32public:
33 explicit QQuickIOSCursorFlashTimer(QObject *parent = nullptr);
34
35 bool visible() const;
36 void setVisible(bool visible);
37
38 int cursorPosition() const;
39 void setCursorPosition(int cursorPosition);
40
41 bool running() const;
42 void setRunning(bool running);
43
44 void start();
45 void stop();
46
47 void timerEvent(QTimerEvent *event) override;
48
49Q_SIGNALS:
50 void visibleChanged();
51 void cursorPositionChanged();
52 void runningChanged(bool running);
53
54private:
55 bool m_visible = false;
56 int m_cursorPosition = 0;
57 int m_timer = 0;
58 bool m_running = false;
59};
60
62
63#endif // QQUICKIOSCURSORFLASHTIMER_P_H
QObject * parent
Definition qobject.h:73
\inmodule QtCore
Definition qobject.h:105