Marble

kineticmodel.h
1 /*
2  This file is part of the Ofi Labs X2 project.
3 
4  SPDX-FileCopyrightText: 2010 Ariya Hidayat <[email protected]>
5  SPDX-License-Identifier: BSD-3-Clause
6 */
7 
8 #ifndef OFILABS_KINETICMODEL
9 #define OFILABS_KINETICMODEL
10 
11 #include <QObject>
12 #include <QScopedPointer>
13 #include <QPointF>
14 
15 class KineticModelPrivate;
16 
17 class KineticModel: public QObject
18 {
19  Q_OBJECT
20  Q_PROPERTY(int duration READ duration WRITE setDuration)
21  Q_PROPERTY(QPointF position READ position NOTIFY positionChanged)
22  Q_PROPERTY(int updateInterval READ updateInterval WRITE setUpdateInterval)
23 
24 public:
25  explicit KineticModel(QObject *parent = nullptr);
26  ~KineticModel() override;
27 
28  int duration() const;
29  QPointF position() const;
30  int updateInterval() const;
31  bool hasVelocity() const;
32 
33 public Q_SLOTS:
34  void setDuration(int ms);
35  void setPosition(const QPointF& position);
36  void setPosition(qreal posX, qreal posY);
37  void setHeading(qreal heading);
38  void jumpToPosition(const QPointF& position);
39  void jumpToPosition(qreal posX, qreal posY);
40  void setUpdateInterval(int ms);
41  void stop();
42  void start();
43 
44 Q_SIGNALS:
45  void positionChanged( qreal lon, qreal lat );
46  void headingChanged( qreal heading );
47  void finished();
48 
49 private Q_SLOTS:
50  void update();
51 
52 private:
54  Q_DECLARE_PRIVATE(KineticModel);
55  Q_DISABLE_COPY(KineticModel);
56 };
57 
58 #endif
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SLOTSQ_SLOTS
void stop(Ekos::AlignState mode)
Q_SCRIPTABLE Q_NOREPLY void start()
Q_SIGNALSQ_SIGNALS
void update(Part *part, const QByteArray &data, qint64 dataSize)
Q_DISABLE_COPY(Class)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.