2
* Copyright (c) 1999 Matthias Elter <me@kde.org>
3
* Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
4
* Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program 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
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
#ifndef KIS_ZOOM_TOOL_H_
22
#define KIS_ZOOM_TOOL_H_
24
#include "kis_tool_non_paint.h"
26
#include "kis_tool_factory.h"
28
class KisCanvasSubject;
30
class KisToolZoom : public KisToolNonPaint {
32
typedef KisToolNonPaint super;
37
virtual ~KisToolZoom();
40
virtual void update(KisCanvasSubject *subject);
43
virtual void setup(KActionCollection *collection);
44
virtual void buttonPress(KisButtonPressEvent *e);
45
virtual void move(KisMoveEvent *e);
46
virtual void buttonRelease(KisButtonReleaseEvent *e);
47
virtual void paint(QPainter& gc);
48
virtual void paint(QPainter& gc, const QRect& rc);
52
void paintOutline(QPainter& gc, const QRect& rc);
55
KisCanvasSubject *m_subject;
62
class KisToolZoomFactory : public KisToolFactory {
63
typedef KisToolFactory super;
65
KisToolZoomFactory(KActionCollection * ac) : super(ac) {};
66
virtual ~KisToolZoomFactory(){};
68
virtual KisTool * createTool() {
69
KisTool * t = new KisToolZoom();
74
virtual KisID id() { return KisID("zoom", i18n("Zoom tool")); }
78
#endif // KIS_ZOOM_TOOL_H_