• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • lib
  • marble
kineticmodel.h
Go to the documentation of this file.
1 /*
2  This file is part of the Ofi Labs X2 project.
3 
4  Copyright (C) 2010 Ariya Hidayat <ariya.hidayat@gmail.com>
5 
6  Redistribution and use in source and binary forms, with or without
7  modification, are permitted provided that the following conditions are met:
8 
9  * Redistributions of source code must retain the above copyright
10  notice, this list of conditions and the following disclaimer.
11  * Redistributions in binary form must reproduce the above copyright
12  notice, this list of conditions and the following disclaimer in the
13  documentation and/or other materials provided with the distribution.
14  * Neither the name of the <organization> nor the
15  names of its contributors may be used to endorse or promote products
16  derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
22  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29 
30 #ifndef OFILABS_KINETICMODEL
31 #define OFILABS_KINETICMODEL
32 
33 #include <QObject>
34 #include <QScopedPointer>
35 #include <QPointF>
36 
37 class KineticModelPrivate;
38 
39 class KineticModel: public QObject
40 {
41  Q_OBJECT
42  Q_PROPERTY(int duration READ duration WRITE setDuration)
43  Q_PROPERTY(QPointF position READ position NOTIFY positionChanged)
44  Q_PROPERTY(int updateInterval READ updateInterval WRITE setUpdateInterval)
45 
46 public:
47  explicit KineticModel(QObject *parent = 0);
48  ~KineticModel();
49 
50  int duration() const;
51  QPointF position() const;
52  int updateInterval() const;
53 
54 public slots:
55  void setDuration(int ms);
56  void setPosition(QPointF position);
57  void setPosition(qreal posX, qreal posY);
58  void jumpToPosition(QPointF position);
59  void jumpToPosition(qreal posX, qreal posY);
60  void setUpdateInterval(int ms);
61  void stop();
62  void start();
63 
64 signals:
65  void positionChanged( qreal lon, qreal lat );
66  void finished();
67 
68 private slots:
69  void update();
70 
71 private:
72  QScopedPointer<KineticModelPrivate> d_ptr;
73  Q_DECLARE_PRIVATE(KineticModel);
74  Q_DISABLE_COPY(KineticModel);
75 };
76 
77 #endif
KineticModel::positionChanged
void positionChanged(qreal lon, qreal lat)
KineticModel::setUpdateInterval
void setUpdateInterval(int ms)
Definition: kineticmodel.cpp:134
KineticModel::updateInterval
int updateInterval() const
KineticModel::setDuration
void setDuration(int ms)
Definition: kineticmodel.cpp:81
KineticModel
Definition: kineticmodel.h:39
QObject
KineticModel::setPosition
void setPosition(QPointF position)
Definition: kineticmodel.cpp:91
KineticModel::jumpToPosition
void jumpToPosition(QPointF position)
Definition: kineticmodel.cpp:118
KineticModel::stop
void stop()
Definition: kineticmodel.cpp:139
KineticModel::duration
int duration() const
KineticModel::position
QPointF position() const
KineticModel::start
void start()
Definition: kineticmodel.cpp:148
KineticModel::finished
void finished()
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal