karbon

vzoomtool.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002, The Karbon Developers
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 
00019 */
00020 
00021 #ifndef __VZOOMTOOL_H__
00022 #define __VZOOMTOOL_H__
00023 
00024 #include "KoPoint.h"
00025 #include <qstring.h>
00026 
00027 #include "vtool.h"
00028 
00029 class QCursor;
00030 
00031 class KarbonView;
00032 
00033 class VZoomTool : public VTool
00034 {
00035 public:
00036     VZoomTool( KarbonView *view );
00037     ~VZoomTool();
00038 
00039     virtual void activate();
00040     virtual void deactivate();
00041 
00042     virtual void setup( KActionCollection *collection );
00043     virtual QString uiname() { return i18n( "Zoom Tool" ); }
00044     virtual QString contextHelp();
00045     virtual QString statusText();
00046 
00047 protected:
00048     void draw();
00049 
00050     virtual void mouseButtonPress();
00051     virtual void mouseButtonRelease();
00052     virtual void mouseDrag();
00053     virtual void mouseDragRelease();
00054 
00055     virtual bool keyReleased( Qt::Key key );
00056 
00057     virtual void rightMouseButtonRelease();
00058 
00059     void recalc();
00060 
00061     KoPoint m_current;
00062 
00063 private:
00064     QCursor* m_plusCursor;
00065 
00066 };
00067 
00068 #endif
00069 
KDE Home | KDE Accessibility Home | Description of Access Keys