karbon

vimagetool.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 __VIMAGETOOL_H__
00022 #define __VIMAGETOOL_H__
00023 
00024 #include <qstring.h>
00025 
00026 #include "vtool.h"
00027 #include <commands/vcommand.h>
00028 
00029 class KarbonView;
00030 class VImage;
00031 class QCursor;
00032 
00033 class VImageTool : public VTool
00034 {
00035 public:
00036     VImageTool( KarbonView *view );
00037     ~VImageTool(); 
00038 
00039     virtual void activate();
00040     virtual void deactivate();
00041 
00042     virtual void setup( KActionCollection *collection );
00043     virtual QString uiname() { return i18n( "Image Tool" ); }
00044     virtual QString contextHelp();
00045     virtual QString statusText();
00046 
00047 protected:
00048     class VInsertImageCmd : public VCommand
00049     {
00050     public:
00051         VInsertImageCmd( VDocument* doc, const QString& name, VImage *image, KoPoint pos );
00052         virtual ~VInsertImageCmd() {}
00053 
00054         virtual void execute();
00055         virtual void unexecute();
00056         virtual bool changesSelection() const { return true; }
00057 
00058     protected:
00059         VImage  *m_image;
00060         KoPoint m_pos;
00061     };
00062 
00063     virtual void mouseButtonRelease();
00064 
00065 private:
00066     QCursor* m_cursor;
00067 };
00068 
00069 #endif
00070 
KDE Home | KDE Accessibility Home | Description of Access Keys