summaryrefslogtreecommitdiff
path: root/noncore/graphics/drawpad/tool.h
blob: 5848215ff670e1ff2fbeef9db280e5e66f1c4b56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/***************************************************************************
 *                                                                         *
 *   DrawPad - a drawing program for Opie Environment                      *
 *                                                                         *
 *   (C) 2002 by S. Prud'homme <prudhomme@laposte.net>                     *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef TOOL_H
#define TOOL_H

#include <qobject.h>

class DrawPad;
class DrawPadCanvas;

class Tool : public QObject
{
protected:
    Tool(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas);

public:
    virtual ~Tool();

    virtual void mousePressEvent(QMouseEvent* e) = 0;
    virtual void mouseReleaseEvent(QMouseEvent* e) = 0;
    virtual void mouseMoveEvent(QMouseEvent* e) = 0;

protected:
    DrawPad* m_pDrawPad;
    DrawPadCanvas* m_pDrawPadCanvas;
};

#endif // TOOL_H