krita

kis_tool_non_paint.h

00001 /*
00002  *  Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program 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
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  */
00018 
00019 #ifndef KIS_TOOL_NON_PAINT_H_
00020 #define KIS_TOOL_NON_PAINT_H_
00021 
00022 #include <qcursor.h>
00023 #include <qcolor.h>
00024 #include <qwidget.h>
00025 
00026 #include "kis_global.h"
00027 #include "kis_types.h"
00028 #include "kis_tool.h"
00029 #include <koffice_export.h>
00030 
00031 class QEvent;
00032 class QKeyEvent;
00033 class QPaintEvent;
00034 class QRect;
00035 class KDialog;
00036 class KisCanvasSubject;
00037 
00038 
00039 class KRITACORE_EXPORT KisToolNonPaint : public KisTool {
00040 
00041     Q_OBJECT
00042     typedef KisTool super;
00043 
00044 public:
00045     KisToolNonPaint(const QString & UIName);
00046     virtual ~KisToolNonPaint();
00047 
00048 // CanvasObserver
00049 public:
00050     virtual void update(KisCanvasSubject *subject);
00051 
00052 // KisTool
00053 public:
00054     virtual void paint(KisCanvasPainter& gc);
00055     virtual void paint(KisCanvasPainter& gc, const QRect& rc);
00056 
00057     virtual void buttonPress(KisButtonPressEvent *e);
00058     virtual void move(KisMoveEvent *e);
00059     virtual void buttonRelease(KisButtonReleaseEvent *e);
00060     virtual void doubleClick(KisDoubleClickEvent *e);
00061     virtual void keyPress(QKeyEvent *e);
00062     virtual void keyRelease(QKeyEvent *e);
00063 
00064     virtual QCursor cursor();
00065     virtual void setCursor(const QCursor& cursor);
00066 
00067     virtual enumToolType toolType() { return TOOL_VIEW; }
00068 
00069 public slots:
00070     virtual void activate();
00071     virtual void deactivate();
00072 
00073 protected:
00074     void notifyModified() const;
00075 
00076 protected:
00077     KisCanvasSubject *m_subject;
00078 
00079 private:
00080     QCursor m_cursor;
00081 };
00082 
00083 #endif // KIS_TOOL_NON_PAINT_H_
00084 
KDE Home | KDE Accessibility Home | Description of Access Keys