tool_zoom.h
1/*
2 * Kivio - Visual Modelling and Flowcharting
3 * Copyright (C) 2000-2001 theKompany.com & Dave Marotti
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19#ifndef TOOL_ZOOM_H
20#define TOOL_ZOOM_H
21
22#include "kivio_mousetool.h"
23
24class KivioView;
25class KivioPage;
26class KivioCanvas;
27class TDEPopupMenu;
28
29class TDERadioAction;
30class TDEAction;
31
32class TQCursor;
33
34class ZoomTool : public Kivio::MouseTool
35{
36 TQ_OBJECT
37
38 public:
39 ZoomTool(KivioView* parent);
40 virtual ~ZoomTool();
41
42 virtual bool processEvent(TQEvent* e);
43
44 void zoomRect(TQRect);
45
46 public slots:
47 void zoomActivated();
48 void handActivated();
49
50 void zoomPlus();
51 void zoomMinus();
52 void zoomWidth();
53 void zoomHeight();
54 void zoomPage();
55 void zoomSelected();
56 void zoomAllobjects();
57
58 virtual void setActivated(bool a);
59
60 protected:
61 void showPopupMenu(const TQPoint&);
62
63 signals:
64 void operationDone();
65
66 private:
67 TDERadioAction* m_zoomAction;
68 TDERadioAction* m_panAction;
69
70 TDEPopupMenu* m_pMenu;
71
72 TDEAction* m_pMinus;
73 TDEAction* m_pPlus;
74 TDEAction* m_pZoomWidth;
75 TDEAction* m_pZoomHeight;
76 TDEAction* m_pZoomSelected;
77 TDEAction* m_pZoomPage;
78 TDEAction* m_pZoomAllObjects;
79
80 TDEAction* m_pCurrent;
81
82 TQCursor* m_pPlusCursor;
83 TQCursor* m_pMinusCursor;
84 TQCursor* m_handCursor;
85
86 bool m_bDrawRubber;
87 bool m_bHandMode;
88 bool isHandMousePressed;
89 bool m_bLockKeyboard;
90 TQPoint mousePos;
91};
92
93#endif
Baseclass for mouse tools (like eg the select tool)