kivio

tool_zoom.h

00001 /*
00002  * Kivio - Visual Modelling and Flowcharting
00003  * Copyright (C) 2000-2001 theKompany.com & Dave Marotti
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  */
00019 #ifndef TOOL_ZOOM_H
00020 #define TOOL_ZOOM_H
00021 
00022 #include "kivio_mousetool.h"
00023 
00024 class KivioView;
00025 class KivioPage;
00026 class KivioCanvas;
00027 class KPopupMenu;
00028 
00029 class KRadioAction;
00030 class KAction;
00031 
00032 class QCursor;
00033 
00034 class ZoomTool : public Kivio::MouseTool
00035 {
00036   Q_OBJECT
00037   public:
00038     ZoomTool(KivioView* parent);
00039     virtual ~ZoomTool();
00040   
00041     virtual bool processEvent(QEvent* e);
00042   
00043     void zoomRect(QRect);
00044   
00045   public slots:
00046     void zoomActivated();
00047     void handActivated();
00048   
00049     void zoomPlus();
00050     void zoomMinus();
00051     void zoomWidth();
00052     void zoomHeight();
00053     void zoomPage();
00054     void zoomSelected();
00055     void zoomAllobjects();
00056     
00057     virtual void setActivated(bool a);
00058   
00059   protected:
00060     void showPopupMenu(const QPoint&);
00061   
00062   signals:
00063     void operationDone();
00064   
00065   private:
00066     KRadioAction* m_zoomAction;
00067     KRadioAction* m_panAction;
00068   
00069     KPopupMenu* m_pMenu;
00070   
00071     KAction* m_pMinus;
00072     KAction* m_pPlus;
00073     KAction* m_pZoomWidth;
00074     KAction* m_pZoomHeight;
00075     KAction* m_pZoomSelected;
00076     KAction* m_pZoomPage;
00077     KAction* m_pZoomAllObjects;
00078   
00079     KAction* m_pCurrent;
00080   
00081     QCursor* m_pPlusCursor;
00082     QCursor* m_pMinusCursor;
00083     QCursor* m_handCursor;
00084   
00085     bool m_bDrawRubber;
00086     bool m_bHandMode;
00087     bool isHandMousePressed;
00088     bool m_bLockKeyboard;
00089     QPoint mousePos;
00090 };
00091 
00092 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys