1
/****************************************************************************
5
Copyright (C) 2003 Mike Pilone <mpilone@slac.com>
6
Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
8
Distributed under the terms of the GNU General Public License version 2.
10
****************************************************************************/
12
#ifndef GESTURE_RECORDER_H
13
#define GESTURE_RECORDER_H
15
#include "triggers/gestures.h"
17
#include <QtGui/QFrame>
22
* This widget tracks mouse movements when the left mouse button has been
23
* pressed while the cursor was over the widget.
24
* The events are sent to a Stroke. When the mouse button is released the Stroke
25
* is instructed to process the data; the processed data will then be emitted in
26
* a "recorded" signal.
29
class GestureRecorder : public QFrame
35
GestureRecorder(QWidget *parent, const char *name="FIXXXXXMMEEEEEEEEEEEEE");
40
void mousePressEvent(QMouseEvent *);
41
void mouseReleaseEvent(QMouseEvent *);
42
void mouseMoveEvent(QMouseEvent *);
46
void recorded(const KHotKeys::StrokePoints &data);
49
bool _mouseButtonDown;
50
KHotKeys::Stroke stroke;