source: vendor/trolltech/current/examples/canvas/canvas.h

Last change on this file was 67, checked in by dmik, 19 years ago

Imported canvas and session manager sources from the official release 3.3.1 from Trolltech.

  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1#ifndef EXAMPLE_H
2#define EXAMPLE_H
3
4#include <qpopupmenu.h>
5#include <qmainwindow.h>
6#include <qintdict.h>
7#include <qcanvas.h>
8
9class BouncyLogo : public QCanvasSprite {
10 void initPos();
11 void initSpeed();
12public:
13 BouncyLogo(QCanvas*);
14 void advance(int);
15 int rtti() const;
16};
17
18
19class FigureEditor : public QCanvasView {
20 Q_OBJECT
21
22public:
23 FigureEditor(QCanvas&, QWidget* parent=0, const char* name=0, WFlags f=0);
24 void clear();
25
26protected:
27 void contentsMousePressEvent(QMouseEvent*);
28 void contentsMouseMoveEvent(QMouseEvent*);
29
30signals:
31 void status(const QString&);
32
33private:
34 QCanvasItem* moving;
35 QPoint moving_start;
36};
37
38class Main : public QMainWindow {
39 Q_OBJECT
40
41public:
42 Main(QCanvas&, QWidget* parent=0, const char* name=0, WFlags f=0);
43 ~Main();
44
45public slots:
46 void help();
47
48private slots:
49 void aboutQt();
50 void newView();
51 void clear();
52 void init();
53
54 void addSprite();
55 void addCircle();
56 void addHexagon();
57 void addPolygon();
58 void addSpline();
59 void addText();
60 void addLine();
61 void addRectangle();
62 void addMesh();
63 void addLogo();
64 void addButterfly();
65
66 void enlarge();
67 void shrink();
68 void rotateClockwise();
69 void rotateCounterClockwise();
70 void zoomIn();
71 void zoomOut();
72 void mirror();
73 void moveL();
74 void moveR();
75 void moveU();
76 void moveD();
77
78 void print();
79
80 void toggleDoubleBuffer();
81
82private:
83 QCanvas& canvas;
84 FigureEditor *editor;
85
86 QPopupMenu* options;
87 QPrinter* printer;
88 int dbf_id;
89};
90
91#endif
Note: See TracBrowser for help on using the repository browser.