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

kig

  • sources
  • kde-4.12
  • kdeedu
  • kig
  • modes
dragrectmode.h
Go to the documentation of this file.
1 // Copyright (C) 2002 Dominique Devriese <devriese@kde.org>
2 
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
7 
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16 // 02110-1301, USA.
17 
18 
19 #ifndef KIG_MODES_DRAGRECTMODE_H
20 #define KIG_MODES_DRAGRECTMODE_H
21 
22 #include "mode.h"
23 
24 #include "../misc/rect.h"
25 
26 #include <qpoint.h>
27 #include <vector>
28 
29 class ObjectHolder;
30 
40 class DragRectMode
41  : public KigMode
42 {
43  QPoint mstart;
44  std::vector<ObjectHolder*> mret;
45  Rect mrect;
46  bool mnc;
47  bool mstartselected;
48  bool mcancelled;
49 private:
50  void clicked( const QPoint& p, KigWidget& w );
51  void clicked( const QMouseEvent* e, KigWidget& w );
52  void released( const QPoint& p, KigWidget& w, bool nc );
53  void released( QMouseEvent* e, KigWidget& w );
54  void moved( const QPoint& p, KigWidget& w );
55  void moved( QMouseEvent*, KigWidget& w );
56 
57  void leftClicked( QMouseEvent*, KigWidget* );
58  void leftMouseMoved( QMouseEvent*, KigWidget* );
59  void leftReleased( QMouseEvent*, KigWidget* );
60  void midClicked( QMouseEvent*, KigWidget* );
61  void midMouseMoved( QMouseEvent*, KigWidget* );
62  void midReleased( QMouseEvent*, KigWidget* );
63  void rightClicked( QMouseEvent*, KigWidget* );
64  void rightMouseMoved( QMouseEvent*, KigWidget* );
65  void rightReleased( QMouseEvent*, KigWidget* );
66  void mouseMoved( QMouseEvent*, KigWidget* );
67 
68  void cancelConstruction();
69 
70  void enableActions();
71 
72 public:
73  DragRectMode( const QPoint& start, KigPart& d, KigWidget& w );
74  DragRectMode( KigPart& d, KigWidget& w );
75  ~DragRectMode();
76 
80  std::vector<ObjectHolder*> ret() const;
81 
85  Rect rect() const;
86 
94  bool needClear() const;
95 
101  bool cancelled() const;
102 };
103 
104 #endif
DragRectMode::needClear
bool needClear() const
this returns false if the control or shift button were pressed when the mouse button was released...
Definition: dragrectmode.cc:82
Rect
This file is part of Kig, a KDE program for Interactive Geometry...
Definition: rect.h:34
DragRectMode::cancelled
bool cancelled() const
whether the user cancelled the rect mode.
Definition: dragrectmode.cc:170
DragRectMode::ret
std::vector< ObjectHolder * > ret() const
this returns the selected objects.
Definition: dragrectmode.cc:77
KigMode
this is an ABC of a class containing the current "Mode" of the Kig document...
Definition: mode.h:37
DragRectMode::rect
Rect rect() const
this returns the selected rect.
Definition: dragrectmode.cc:136
DragRectMode::~DragRectMode
~DragRectMode()
Definition: dragrectmode.cc:97
DragRectMode::DragRectMode
DragRectMode(const QPoint &start, KigPart &d, KigWidget &w)
Definition: dragrectmode.cc:29
ObjectHolder
An ObjectHolder represents an object as it is known to the document.
Definition: object_holder.h:40
KigWidget
This class is the real widget showing the document.
Definition: kig_view.h:50
KigPart
This is a "Part".
Definition: kig_part.h:68
mode.h
DragRectMode
DragRectMode is a mode that provides a rect for selecting the objects inside it.
Definition: dragrectmode.h:40
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kig

Skip menu "kig"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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