summaryrefslogtreecommitdiffstats
path: root/src/DragWidget.h
blob: ed311d35bf6d133556afce49d89208522d65cc20 (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
#ifndef KVKBDDRAGWIDGET_H
#define KVKBDDRAGWIDGET_H
#include <tqwidget.h>
#include <tqpoint.h>
#include <tqevent.h>

class DragWidget : public TQWidget
{
Q_OBJECT
  
public:
	DragWidget(TQWidget *parent=0, const char *name="", WFlags f=0);
	virtual ~DragWidget();

	void setLocked(bool mode);
	const bool isLocked() const;

private:
	
	bool drag;

protected:
	void mouseMoveEvent ( TQMouseEvent * e );
	void mousePressEvent ( TQMouseEvent * e );
	void mouseReleaseEvent ( TQMouseEvent * e );
	TQPoint dragP;
	TQPoint gpress;
	bool locked;

};

#endif