Last change
on this file since 165 was 160, checked in by dmik, 19 years ago |
Imported table and iconview modules and a bunch of dependent examples from the official release 3.3.1 from Trolltech.
|
-
Property svn:keywords
set to
Id
|
File size:
754 bytes
|
Line | |
---|
1 | #ifndef CANVASVIEW_H
|
---|
2 | #define CANVASVIEW_H
|
---|
3 |
|
---|
4 | #include "element.h"
|
---|
5 | #include "canvastext.h"
|
---|
6 |
|
---|
7 | #include <qcanvas.h>
|
---|
8 |
|
---|
9 |
|
---|
10 | class QPoint;
|
---|
11 |
|
---|
12 |
|
---|
13 | class CanvasView : public QCanvasView
|
---|
14 | {
|
---|
15 | Q_OBJECT
|
---|
16 | public:
|
---|
17 | CanvasView( QCanvas *canvas, ElementVector *elements,
|
---|
18 | QWidget* parent = 0, const char* name = "canvas view",
|
---|
19 | WFlags f = 0 )
|
---|
20 | : QCanvasView( canvas, parent, name, f ),
|
---|
21 | m_elements( elements ) {}
|
---|
22 |
|
---|
23 | protected:
|
---|
24 | void viewportResizeEvent( QResizeEvent *e );
|
---|
25 | void contentsMousePressEvent( QMouseEvent *e );
|
---|
26 | void contentsMouseMoveEvent( QMouseEvent *e );
|
---|
27 | void contentsContextMenuEvent( QContextMenuEvent *e );
|
---|
28 |
|
---|
29 | private:
|
---|
30 | QCanvasItem *m_movingItem;
|
---|
31 | QPoint m_pos;
|
---|
32 | ElementVector *m_elements;
|
---|
33 | };
|
---|
34 |
|
---|
35 |
|
---|
36 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.