karbon

vrotatetool.h
1/* This file is part of the KDE project
2 Copyright (C) 2001, 2002, 2003 The Karbon Developers
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef __VROTATETOOL_H__
21#define __VROTATETOOL_H__
22
23#include "vselection.h"
24#include "vtool.h"
25
26
27class VRotateTool : public VTool
28{
29public:
30 VRotateTool( KarbonView *view );
31 virtual ~VRotateTool();
32
33 virtual void activate();
34
35 virtual void setup(TDEActionCollection *collection);
36 virtual TQString uiname() { return i18n( "Rotate Tool" ); }
37 virtual enumToolType toolType() { return TOOL_MANIPULATION; }
38 virtual TQString statusText();
39 virtual uint priority() { return 0; }
40
41protected:
42 virtual void draw();
43
44 virtual void mouseButtonPress();
45 virtual void mouseDrag();
46 virtual void mouseDragRelease();
47
48 virtual void cancel();
49
50private:
51 void recalc();
52
53 KoPoint m_center;
54 double m_angle;
55
56 VHandleNode m_activeNode;
57
58 // A list of temporary objects:
59 VObjectList m_objects;
60};
61
62#endif
63
The base class for all karbon tools.
Definition vtool.h:52
virtual void mouseDragRelease()
Mouse button release.
Definition vtool.h:220
virtual void mouseButtonPress()
Left mouse button press.
Definition vtool.h:185
virtual TQString uiname()
The name of the tool.
Definition vtool.h:93
virtual void cancel()
Cancels all tool operations.
Definition vtool.h:255
virtual TQString statusText()
The tool status text.
Definition vtool.h:108
virtual void activate()
Called during the tool activation.
Definition vtool.cpp:252
virtual uint priority()
Position in toolbox.
Definition vtool.h:114
virtual enumToolType toolType()
The tool type.
Definition vtool.h:103
virtual void mouseDrag()
Mouse drag.
Definition vtool.h:215
KarbonView * view() const
Returns the connected karbon part.
Definition vtool.cpp:66