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

liblancelot

  • sources
  • kde-4.14
  • workspace
  • kdeplasma-addons
  • libs
  • lancelot
  • widgets
kineticscroll_p.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 Igor Trindade Oliveira <igor.oliveira@indt.org.br>
3  Copyright (C) 2009 Adenilson Cavalcanti <adenilson.silva@idnt.org.br>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef PLASMA_KINETICSCROLLING_H
20 #define PLASMA_KINETICSCROLLING_H
21 
22 class QGraphicsSceneMouseEvent;
23 class QGraphicsWidget;
24 class QGraphicsSceneWheelEvent;
25 class QKeyEvent;
26 #include <QObject>
27 #include <QPointF>
28 #include <QtCore/QAbstractAnimation>
29 
30 
31 namespace Plasma
32 {
33 
34 class KineticScrollingPrivate;
35 
36 class KineticScrolling: public QObject
37 {
38  Q_OBJECT
39 public:
40  KineticScrolling(QGraphicsWidget *parent);
41  ~KineticScrolling();
42  void setWidget(QGraphicsWidget *parent);
43  void stop();
44 
45 Q_SIGNALS:
46  void stateChanged(QAbstractAnimation::State newState,
47  QAbstractAnimation::State oldState);
48 
49 protected:
50  void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
51  void mousePressEvent(QGraphicsSceneMouseEvent *event);
52  void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
53  void wheelReleaseEvent(QGraphicsSceneWheelEvent *event);
54  void keyPressEvent(QKeyEvent *event);
55 
56 private:
57  KineticScrollingPrivate *d;
58  void resetAnimation(QPointF finalPosition, int duration);
59  void setScrollValue(QPointF value);
60  QPointF thresholdPosition(QPointF value) const;
61  void duration();
62 
63 private Q_SLOTS:
64  void overshoot();
65 
66 protected:
67  bool eventFilter(QObject *watched, QEvent *event);
68 
69 };
70 
71 }
72 
73 #endif
Plasma::KineticScrolling::~KineticScrolling
~KineticScrolling()
Definition: kineticscroll.cpp:132
QEvent
QGraphicsSceneWheelEvent
Plasma::KineticScrolling::KineticScrolling
KineticScrolling(QGraphicsWidget *parent)
Definition: kineticscroll.cpp:126
Plasma::KineticScrolling::wheelReleaseEvent
void wheelReleaseEvent(QGraphicsSceneWheelEvent *event)
Definition: kineticscroll.cpp:280
Plasma::KineticScrolling::eventFilter
bool eventFilter(QObject *watched, QEvent *event)
Definition: kineticscroll.cpp:380
Plasma::KineticScrolling::stop
void stop()
Definition: kineticscroll.cpp:374
QPointF
QObject::event
virtual bool event(QEvent *e)
Plasma::KineticScrolling::stateChanged
void stateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState)
QObject
QGraphicsSceneMouseEvent
QGraphicsWidget
Plasma::KineticScrolling::mouseReleaseEvent
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Definition: kineticscroll.cpp:264
Plasma::KineticScrolling::mousePressEvent
void mousePressEvent(QGraphicsSceneMouseEvent *event)
Definition: kineticscroll.cpp:225
Plasma::KineticScrolling::keyPressEvent
void keyPressEvent(QKeyEvent *event)
Definition: kineticscroll.cpp:313
QKeyEvent
Plasma::KineticScrolling
Definition: kineticscroll_p.h:36
QObject::parent
QObject * parent() const
Plasma::KineticScrolling::mouseMoveEvent
void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Definition: kineticscroll.cpp:241
Plasma::KineticScrolling::setWidget
void setWidget(QGraphicsWidget *parent)
Definition: kineticscroll.cpp:346
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:43:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

liblancelot

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

workspace API Reference

Skip menu "workspace API Reference"
  • kdeplasma-addons
  •       GroupingDesktop
  •     liblancelot

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