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

rocs/VisualEditor

  • sources
  • kde-4.14
  • kdeedu
  • rocs
  • VisualEditor
  • Actions
AbstractAction.h
Go to the documentation of this file.
1 /*
2  This file is part of Rocs.
3  Copyright 2008 Tomaz Canabrava <tomaz.canabrava@gmail.com>
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public License as
7  published by the Free Software Foundation; either version 2 of
8  the License, or (at your option) any later version.
9 
10  This program 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
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef ACTION_ABSTRACTACTION_H
20 #define ACTION_ABSTRACTACTION_H
21 
22 #include <KToggleAction>
23 #include <QObject>
24 #include <QString>
25 
26 class QGraphicsSceneWheelEvent;
27 class GraphScene;
28 
35 // TODO: Changer the behavior of this class, so it sends itself instead of the type of action to the graphscene.
36 class AbstractAction : public KToggleAction
37 {
38  Q_OBJECT
39 public:
40 
45  AbstractAction(GraphScene *scene, QObject *parent);
46 
47  const QString& name() const;
48 public slots:
52  virtual bool executePress(QPointF pos);
53 
57  virtual bool executeMove(QPointF pos);
58 
62  virtual bool executeRelease(QPointF pos);
63 
68  virtual bool executeDoubleClick(QPointF pos);
72  virtual bool executeKeyPress(QKeyEvent *keyEvent);
73 
77  virtual bool executeKeyRelease(QKeyEvent *keyEvent);
78 
79 
80  virtual bool executeWheelEvent(QGraphicsSceneWheelEvent *wEvent);
82  void sendExecuteBit();
83 
84  bool eventFilter(QObject * watched, QEvent * event);
85 protected:
86 
88  GraphScene *_graphScene;
89 
90  QString _name;
91 };
92 
93 #endif
AbstractAction::name
const QString & name() const
Definition: AbstractAction.cpp:41
QEvent
QGraphicsSceneWheelEvent
AbstractAction::executeKeyRelease
virtual bool executeKeyRelease(QKeyEvent *keyEvent)
Definition: AbstractAction.cpp:117
AbstractAction
the base class for custom actions. This class provides the basic functionality for all custom actions...
Definition: AbstractAction.h:36
QPointF
AbstractAction::executeDoubleClick
virtual bool executeDoubleClick(QPointF pos)
Definition: AbstractAction.cpp:107
GraphScene
Definition: GraphScene.h:38
QObject
AbstractAction::_name
QString _name
Definition: AbstractAction.h:90
AbstractAction::executeRelease
virtual bool executeRelease(QPointF pos)
Definition: AbstractAction.cpp:102
AbstractAction::executePress
virtual bool executePress(QPointF pos)
Definition: AbstractAction.cpp:92
QString
AbstractAction::executeMove
virtual bool executeMove(QPointF pos)
Definition: AbstractAction.cpp:97
QKeyEvent
AbstractAction::_graphScene
GraphScene * _graphScene
Definition: AbstractAction.h:88
AbstractAction::AbstractAction
AbstractAction(GraphScene *scene, QObject *parent)
Definition: AbstractAction.cpp:30
AbstractAction::executeWheelEvent
virtual bool executeWheelEvent(QGraphicsSceneWheelEvent *wEvent)
Definition: AbstractAction.cpp:122
KToggleAction
AbstractAction::executeKeyPress
virtual bool executeKeyPress(QKeyEvent *keyEvent)
Definition: AbstractAction.cpp:112
AbstractAction::eventFilter
bool eventFilter(QObject *watched, QEvent *event)
Definition: AbstractAction.cpp:46
AbstractAction::sendExecuteBit
void sendExecuteBit()
Definition: AbstractAction.cpp:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

rocs/VisualEditor

Skip menu "rocs/VisualEditor"
  • Main Page
  • 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
  • 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