• 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
ZoomAction.h
Go to the documentation of this file.
1 /*
2  This file is part of Rocs.
3  Copyright 2011 Tomaz Canabrava <tomaz.canabrava@gmail.com>
4  Copyright 2012 Andreas Cord-Landwehr <cola@uni-paderborn.de>
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) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 
22 #ifndef ZOOMACTION_H
23 #define ZOOMACTION_H
24 
25 #include "VisualEditorExport.h"
26 #include "AbstractAction.h"
27 #include <QRectF>
28 #include <QPointF>
29 
30 class QGraphicsRectItem;
31 class QGraphicsView;
32 class QKeyEvent;
33 class QGraphicsSceneWheelEvent;
34 
35 class ZoomAction : public AbstractAction
36 {
37  Q_OBJECT
38 
39 public:
40  ZoomAction(GraphScene* scene, QObject* parent);
41  bool executePress(QPointF pos);
42  bool executeMove(QPointF pos);
43  bool executeRelease(QPointF pos);
44  bool executeDoubleClick(QPointF pos);
45  bool executeKeyRelease(QKeyEvent* keyEvent);
46  bool executeWheelEvent(QGraphicsSceneWheelEvent *wEvent);
47 
48 public slots:
49  void zoomOut(QPointF zoomCenter);
50  void zoomIn(QPointF zoomCenter);
51  void zoomInCenter();
52  void zoomOutCenter();
53  void zoomReset();
54 
55 private:
56  GraphScene* _scene;
57  QRectF m_zoomArea;
58  qreal m_currentZoomFactor;
59  QGraphicsRectItem *m_zoomRectItem;
60  QPointF m_beginZoom;
61  QPointF m_endZoom;
62  int m_steps;
63 };
64 
65 #endif // ZOOM_H
ZoomAction::zoomIn
void zoomIn(QPointF zoomCenter)
Definition: ZoomAction.cpp:136
ZoomAction::executePress
bool executePress(QPointF pos)
Definition: ZoomAction.cpp:45
QGraphicsSceneWheelEvent
VisualEditorExport.h
AbstractAction.h
ZoomAction::zoomInCenter
void zoomInCenter()
Definition: ZoomAction.cpp:131
AbstractAction
the base class for custom actions. This class provides the basic functionality for all custom actions...
Definition: AbstractAction.h:36
QPointF
ZoomAction::executeKeyRelease
bool executeKeyRelease(QKeyEvent *keyEvent)
Definition: ZoomAction.cpp:100
GraphScene
Definition: GraphScene.h:38
QObject
ZoomAction::zoomReset
void zoomReset()
Definition: ZoomAction.cpp:154
ZoomAction::executeMove
bool executeMove(QPointF pos)
Definition: ZoomAction.cpp:62
QKeyEvent
QGraphicsRectItem
QRectF
ZoomAction::executeDoubleClick
bool executeDoubleClick(QPointF pos)
Definition: ZoomAction.cpp:94
ZoomAction::executeWheelEvent
bool executeWheelEvent(QGraphicsSceneWheelEvent *wEvent)
Definition: ZoomAction.cpp:120
ZoomAction::zoomOut
void zoomOut(QPointF zoomCenter)
Definition: ZoomAction.cpp:148
ZoomAction
Definition: ZoomAction.h:35
ZoomAction::executeRelease
bool executeRelease(QPointF pos)
Definition: ZoomAction.cpp:83
ZoomAction::ZoomAction
ZoomAction(GraphScene *scene, QObject *parent)
Definition: ZoomAction.cpp:34
QGraphicsView
ZoomAction::zoomOutCenter
void zoomOutCenter()
Definition: ZoomAction.cpp:142
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