00001 /*************************************************************************** 00002 * * 00003 * DrawPad - a drawing program for Opie Environment * 00004 * * 00005 * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * 00006 * * 00007 * This program is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation; either version 2 of the License, or * 00010 * (at your option) any later version. * 00011 * * 00012 ***************************************************************************/ 00013 00014 #ifndef TOOL_H 00015 #define TOOL_H 00016 00017 #include <qobject.h> 00018 00019 class DrawPad; 00020 class DrawPadCanvas; 00021 00022 class Tool : public QObject 00023 { 00024 protected: 00025 Tool(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas); 00026 00027 public: 00028 virtual ~Tool(); 00029 00030 virtual void mousePressEvent(QMouseEvent* e) = 0; 00031 virtual void mouseReleaseEvent(QMouseEvent* e) = 0; 00032 virtual void mouseMoveEvent(QMouseEvent* e) = 0; 00033 00034 protected: 00035 DrawPad* m_pDrawPad; 00036 DrawPadCanvas* m_pDrawPadCanvas; 00037 }; 00038 00039 #endif // TOOL_H
1.4.2