krita
kis_qpaintdevice_canvas.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KIS_QPAINTDEVICE_CANVAS_H_
00021 #define KIS_QPAINTDEVICE_CANVAS_H_
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include <config.h>
00025 #endif
00026
00027 #include <qwidget.h>
00028
00029 #include "kis_global.h"
00030 #include "kis_canvas.h"
00031
00032 #ifdef Q_WS_X11
00033 #include <X11/Xlib.h>
00034 #endif // Q_WS_X11
00035
00036 class KisQPaintDeviceCanvasWidget : public virtual QWidget, public virtual KisCanvasWidget {
00037 public:
00038 KisQPaintDeviceCanvasWidget(QWidget *parent = 0, const char *name = 0);
00039 ~KisQPaintDeviceCanvasWidget();
00040
00041 virtual KisCanvasWidgetPainter *createPainter();
00042
00043 #if defined(EXTENDED_X11_TABLET_SUPPORT)
00044 virtual void selectTabletDeviceEvents();
00045 #endif
00046
00047 protected:
00048 virtual void paintEvent(QPaintEvent *event);
00049 virtual void mousePressEvent(QMouseEvent *event);
00050 virtual void mouseReleaseEvent(QMouseEvent *event);
00051 virtual void mouseDoubleClickEvent(QMouseEvent *event);
00052 virtual void mouseMoveEvent(QMouseEvent *event);
00053 virtual void tabletEvent(QTabletEvent *event);
00054 virtual void enterEvent(QEvent *event );
00055 virtual void leaveEvent(QEvent *event);
00056 virtual void wheelEvent(QWheelEvent *event);
00057 virtual void keyPressEvent(QKeyEvent *event);
00058 virtual void keyReleaseEvent(QKeyEvent *event);
00059 virtual void dragEnterEvent(QDragEnterEvent *event);
00060 virtual void dropEvent(QDropEvent *event);
00061 #ifdef Q_WS_X11
00062 bool x11Event(XEvent *event);
00063 #endif // Q_WS_X11
00064 };
00065
00066 #endif // KIS_QPAINTDEVICE_CANVAS_H_
00067
|