chalk

kis_qpaintdevice_canvas.h
1/*
2 * Copyright (c) 1999 Matthias Elter <me@kde.org>
3 * Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20#ifndef KIS_TQPAINTDEVICE_CANVAS_H_
21#define KIS_TQPAINTDEVICE_CANVAS_H_
22
23#ifdef HAVE_CONFIG_H
24#include <config.h>
25#endif
26
27#include <tqwidget.h>
28
29#include "kis_global.h"
30#include "kis_canvas.h"
31
32#ifdef Q_MOC_RUN
33#define TQ_WS_X11
34#endif // Q_MOC_RUN
35
36#ifdef TQ_WS_X11
37#include <X11/Xlib.h>
38#endif // TQ_WS_X11
39
40class KisTQPaintDeviceCanvasWidget : public virtual TQWidget, public virtual KisCanvasWidget {
41public:
42 KisTQPaintDeviceCanvasWidget(TQWidget *parent = 0, const char *name = 0);
43 ~KisTQPaintDeviceCanvasWidget();
44
45 virtual KisCanvasWidgetPainter *createPainter();
46
47#if defined(EXTENDED_X11_TABLET_SUPPORT)
48 virtual void selectTabletDeviceEvents();
49#endif
50
51protected:
52 virtual void paintEvent(TQPaintEvent *event);
53 virtual void mousePressEvent(TQMouseEvent *event);
54 virtual void mouseReleaseEvent(TQMouseEvent *event);
55 virtual void mouseDoubleClickEvent(TQMouseEvent *event);
56 virtual void mouseMoveEvent(TQMouseEvent *event);
57 virtual void tabletEvent(TQTabletEvent *event);
58 virtual void enterEvent(TQEvent *event );
59 virtual void leaveEvent(TQEvent *event);
60 virtual void wheelEvent(TQWheelEvent *event);
61 virtual void keyPressEvent(TQKeyEvent *event);
62 virtual void keyReleaseEvent(TQKeyEvent *event);
63 virtual void dragEnterEvent(TQDragEnterEvent *event);
64 virtual void dropEvent(TQDropEvent *event);
65#ifdef TQ_WS_X11
66 bool x11Event(XEvent *event);
67#endif // TQ_WS_X11
68};
69
70#endif // KIS_TQPAINTDEVICE_CANVAS_H_
71