blob: a066c1b1f26e4933d2740ac8961796c9f3301469 (
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
|
#ifndef CANVASVIEW_H
#define CANVASVIEW_H
#include "element.h"
#include "canvastext.h"
#include <ntqcanvas.h>
class TQPoint;
class CanvasView : public TQCanvasView
{
TQ_OBJECT
public:
CanvasView( TQCanvas *canvas, ElementVector *elements,
TQWidget* parent = 0, const char* name = "canvas view",
WFlags f = 0 )
: TQCanvasView( canvas, parent, name, f ), m_movingItem(0),
m_elements( elements ) {}
protected:
void viewportResizeEvent( TQResizeEvent *e );
void contentsMousePressEvent( TQMouseEvent *e );
void contentsMouseMoveEvent( TQMouseEvent *e );
void contentsContextMenuEvent( TQContextMenuEvent *e );
private:
TQCanvasItem *m_movingItem;
TQPoint m_pos;
ElementVector *m_elements;
};
#endif
|