vzoomtool.h
1/* This file is part of the KDE project
2 Copyright (C) 2002, 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
21#ifndef __VZOOMTOOL_H__
22#define __VZOOMTOOL_H__
23
24#include "KoPoint.h"
25#include <tqstring.h>
26
27#include "vtool.h"
28
29class TQCursor;
30
31class KarbonView;
32
33class VZoomTool : public VTool
34{
35public:
36 VZoomTool( KarbonView *view );
37 ~VZoomTool();
38
39 virtual void activate();
40 virtual void deactivate();
41
42 virtual void setup( TDEActionCollection *collection );
43 virtual TQString uiname() { return i18n( "Zoom Tool" ); }
44 virtual TQString contextHelp();
45 virtual TQString statusText();
46
47protected:
48 void draw();
49
50 virtual void mouseButtonPress();
51 virtual void mouseButtonRelease();
52 virtual void mouseDrag();
53 virtual void mouseDragRelease();
54
55 virtual bool keyReleased( TQt::Key key );
56
57 virtual void rightMouseButtonRelease();
58
59 void recalc();
60
61 KoPoint m_current;
62
63private:
64 TQCursor* m_plusCursor;
65
66};
67
68#endif
69
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 bool keyReleased(TQt::Key)
Specified key released.
Definition vtool.h:250
virtual void rightMouseButtonRelease()
Right mouse button release.
Definition vtool.h:200
virtual void mouseButtonRelease()
Left mouse button release.
Definition vtool.h:195
virtual void draw(VPainter *painter)
Draws the actual tool state.
Definition vtool.h:158
virtual TQString uiname()
The name of the tool.
Definition vtool.h:93
virtual TQString statusText()
The tool status text.
Definition vtool.h:108
virtual void deactivate()
Deactivates the tool.
Definition vtool.h:83
virtual void activate()
Called during the tool activation.
Definition vtool.cpp:252
virtual TQString contextHelp()
The context help of the tool.
Definition vtool.h:98
virtual void setup(TDEActionCollection *)
Called after tool creation.
Definition vtool.h:144
virtual void mouseDrag()
Mouse drag.
Definition vtool.h:215
KarbonView * view() const
Returns the connected karbon part.
Definition vtool.cpp:66