diff options
author | Timothy Pearson <[email protected]> | 2011-11-08 12:31:36 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-11-08 12:31:36 -0600 |
commit | d796c9dd933ab96ec83b9a634feedd5d32e1ba3f (patch) | |
tree | 6e3dcca4f77e20ec8966c666aac7c35bd4704053 /examples/canvas/canvas.h | |
download | tqt3-d796c9dd933ab96ec83b9a634feedd5d32e1ba3f.tar.gz tqt3-d796c9dd933ab96ec83b9a634feedd5d32e1ba3f.zip |
Test conversion to TQt3 from Qt3 8c6fc1f8e35fd264dd01c582ca5e7549b32ab731
Diffstat (limited to 'examples/canvas/canvas.h')
-rw-r--r-- | examples/canvas/canvas.h | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/examples/canvas/canvas.h b/examples/canvas/canvas.h new file mode 100644 index 000000000..178e5c0c3 --- /dev/null +++ b/examples/canvas/canvas.h @@ -0,0 +1,91 @@ +#ifndef EXAMPLE_H +#define EXAMPLE_H + +#include <qpopupmenu.h> +#include <qmainwindow.h> +#include <qintdict.h> +#include <qcanvas.h> + +class BouncyLogo : public TQCanvasSprite { + void initPos(); + void initSpeed(); +public: + BouncyLogo(TQCanvas*); + void advance(int); + int rtti() const; +}; + + +class FigureEditor : public TQCanvasView { + Q_OBJECT + +public: + FigureEditor(TQCanvas&, TQWidget* parent=0, const char* name=0, WFlags f=0); + void clear(); + +protected: + void contentsMousePressEvent(TQMouseEvent*); + void contentsMouseMoveEvent(TQMouseEvent*); + +signals: + void status(const TQString&); + +private: + TQCanvasItem* moving; + TQPoint moving_start; +}; + +class Main : public TQMainWindow { + Q_OBJECT + +public: + Main(TQCanvas&, TQWidget* parent=0, const char* name=0, WFlags f=0); + ~Main(); + +public slots: + void help(); + +private slots: + void aboutTQt(); + void newView(); + void clear(); + void init(); + + void addSprite(); + void addCircle(); + void addHexagon(); + void addPolygon(); + void addSpline(); + void addText(); + void addLine(); + void addRectangle(); + void addMesh(); + void addLogo(); + void addButterfly(); + + void enlarge(); + void shrink(); + void rotateClockwise(); + void rotateCounterClockwise(); + void zoomIn(); + void zoomOut(); + void mirror(); + void moveL(); + void moveR(); + void moveU(); + void moveD(); + + void print(); + + void toggleDoubleBuffer(); + +private: + TQCanvas& canvas; + FigureEditor *editor; + + TQPopupMenu* options; + TQPrinter* printer; + int dbf_id; +}; + +#endif |