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

okteta

  • sources
  • kde-4.12
  • kdesdk
  • okteta
  • gui
  • controller
mousenavigator.h
Go to the documentation of this file.
1 /*
2  This file is part of the Okteta Gui library, made within the KDE community.
3 
4  Copyright 2008-2009 Friedrich W. H. Kossebau <kossebau@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #ifndef OKTETA_MOUSENAVIGATOR_H
24 #define OKTETA_MOUSENAVIGATOR_H
25 
26 // lib
27 #include "abstractmousecontroller.h"
28 // Qt
29 #include <QtCore/QObject>
30 #include <QtCore/QPoint>
31 
32 class QMouseEvent;
33 class QTimer;
34 
35 
36 namespace Okteta
37 {
38 
39 class MouseNavigator : public QObject, public AbstractMouseController
40 {
41  Q_OBJECT
42 
43  public:
44  MouseNavigator( AbstractByteArrayView* view, AbstractMouseController* parent );
45 
46  virtual ~MouseNavigator();
47 
48  public: // AbstractMouseController API
49  virtual bool handleMousePressEvent( QMouseEvent* mouseEvent );
50  virtual bool handleMouseMoveEvent( QMouseEvent* mouseEvent );
51  virtual bool handleMouseReleaseEvent( QMouseEvent* mouseEvent );
52  virtual bool handleMouseDoubleClickEvent( QMouseEvent* mouseEvent );
53 
54  protected:
56  void handleMouseMove( const QPoint& point );
57 
58  protected Q_SLOTS:
60  void autoScrollTimerDone();
62  void startDrag();
63 
64  protected:
66  QTimer* mScrollTimer;
67 /* QTimer *ChangeIntervalTimer, */
69  QTimer* mDragStartTimer;
71  QTimer* mTrippleClickTimer;
72 
73  protected:
75  QPoint mDoubleClickPoint;
77  int mDoubleClickLine;
79  QPoint mDragStartPoint;
80 
81  protected: // parameters
83  bool mLMBPressed:1;
85  bool mInLMBDoubleClick:1;
87  bool mInDnD:1;
89  bool mDragStartPossible:1;
90 };
91 
92 }
93 
94 #endif
Okteta::MouseNavigator::MouseNavigator
MouseNavigator(AbstractByteArrayView *view, AbstractMouseController *parent)
Definition: mousenavigator.cpp:43
Okteta::MouseNavigator::handleMouseMove
void handleMouseMove(const QPoint &point)
handles the move of the mouse with pressed buttons
Definition: mousenavigator.cpp:310
Okteta::MouseNavigator::handleMouseReleaseEvent
virtual bool handleMouseReleaseEvent(QMouseEvent *mouseEvent)
Definition: mousenavigator.cpp:201
abstractmousecontroller.h
Okteta::AbstractByteArrayView
Definition: abstractbytearrayview.h:55
QObject
Okteta::MouseNavigator::handleMouseDoubleClickEvent
virtual bool handleMouseDoubleClickEvent(QMouseEvent *mouseEvent)
Definition: mousenavigator.cpp:269
Okteta::MouseNavigator::mDoubleClickPoint
QPoint mDoubleClickPoint
point at which the current double click happended (used by TrippleClick)
Definition: mousenavigator.h:75
Okteta::MouseNavigator::autoScrollTimerDone
void autoScrollTimerDone()
gets called by the scroll timer (for mouse selection)
Definition: mousenavigator.cpp:303
Okteta::MouseNavigator::mDragStartPossible
bool mDragStartPossible
flag if a drag might have started
Definition: mousenavigator.h:89
Okteta::MouseNavigator::mDragStartPoint
QPoint mDragStartPoint
point at which the current dragging started
Definition: mousenavigator.h:79
Okteta::MouseNavigator::startDrag
void startDrag()
Definition: mousenavigator.cpp:382
Okteta::AbstractMouseController
Definition: abstractmousecontroller.h:33
Okteta::MouseNavigator::mLMBPressed
bool mLMBPressed
flag if the left mouse button is pressed
Definition: mousenavigator.h:83
Okteta::MouseNavigator::mDragStartTimer
QTimer * mDragStartTimer
Timer to start a drag.
Definition: mousenavigator.h:69
Okteta::MouseNavigator::handleMouseMoveEvent
virtual bool handleMouseMoveEvent(QMouseEvent *mouseEvent)
Definition: mousenavigator.cpp:163
Okteta::MouseNavigator
Definition: mousenavigator.h:39
Okteta::MouseNavigator::mInDnD
bool mInDnD
flag if a Drag'n'Drop is happening
Definition: mousenavigator.h:87
Okteta::MouseNavigator::~MouseNavigator
virtual ~MouseNavigator()
Definition: mousenavigator.cpp:411
Okteta::MouseNavigator::mDoubleClickLine
int mDoubleClickLine
line in which the current double click happended (used by TrippleClick)
Definition: mousenavigator.h:77
Okteta::MouseNavigator::mInLMBDoubleClick
bool mInLMBDoubleClick
flag if a double click is happening
Definition: mousenavigator.h:85
Okteta::MouseNavigator::mScrollTimer
QTimer * mScrollTimer
Timer that triggers ensureCursorVisible function calls.
Definition: mousenavigator.h:66
Okteta::MouseNavigator::mTrippleClickTimer
QTimer * mTrippleClickTimer
timer to measure whether the time between a double click and the following counts for a tripleclick ...
Definition: mousenavigator.h:71
Okteta::MouseNavigator::handleMousePressEvent
virtual bool handleMousePressEvent(QMouseEvent *mouseEvent)
Definition: mousenavigator.cpp:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

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

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

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