diff options
Diffstat (limited to 'doc/html/canvas-example.html')
-rw-r--r-- | doc/html/canvas-example.html | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/doc/html/canvas-example.html b/doc/html/canvas-example.html index c12c9b421..f8286ba22 100644 --- a/doc/html/canvas-example.html +++ b/doc/html/canvas-example.html @@ -41,8 +41,8 @@ example provides a taste of what can be done. <p> <pre>#ifndef EXAMPLE_H #define EXAMPLE_H -#include <<a href="qpopupmenu-h.html">ntqpopupmenu.h</a>> -#include <<a href="qmainwindow-h.html">ntqmainwindow.h</a>> +#include <<a href="tqpopupmenu-h.html">tqpopupmenu.h</a>> +#include <<a href="tqmainwindow-h.html">tqmainwindow.h</a>> #include <<a href="qintdict-h.html">ntqintdict.h</a>> #include <<a href="tqcanvas-h.html">tqcanvas.h</a>> @@ -75,7 +75,7 @@ private: <a href="ntqpoint.html">TQPoint</a> moving_start; }; -class Main : public <a href="ntqmainwindow.html">TQMainWindow</a> { +class Main : public <a href="tqmainwindow.html">TQMainWindow</a> { TQ_OBJECT public: @@ -123,7 +123,7 @@ private: <a href="tqcanvas.html">TQCanvas</a>& canvas; FigureEditor *editor; - <a href="ntqpopupmenu.html">TQPopupMenu</a>* options; + <a href="tqpopupmenu.html">TQPopupMenu</a>* options; <a href="ntqprinter.html">TQPrinter</a>* printer; int dbf_id; }; @@ -134,10 +134,10 @@ private: <p> <hr> <p> Implementation: <p> <pre>#include <<a href="tqdatetime-h.html">tqdatetime.h</a>> -#include <<a href="qmainwindow-h.html">ntqmainwindow.h</a>> -#include <<a href="qstatusbar-h.html">ntqstatusbar.h</a>> +#include <<a href="tqmainwindow-h.html">tqmainwindow.h</a>> +#include <<a href="tqstatusbar-h.html">tqstatusbar.h</a>> #include <<a href="qmessagebox-h.html">ntqmessagebox.h</a>> -#include <<a href="qmenubar-h.html">ntqmenubar.h</a>> +#include <<a href="tqmenubar-h.html">tqmenubar.h</a>> #include <<a href="qapplication-h.html">ntqapplication.h</a>> #include <<a href="qpainter-h.html">ntqpainter.h</a>> #include <<a href="qprinter-h.html">ntqprinter.h</a>> @@ -433,65 +433,65 @@ static TQImage *butterflyimg; static TQImage *logoimg; <a name="f625"></a>Main::Main(TQCanvas& c, TQWidget* parent, const char* name, WFlags f) : - <a href="ntqmainwindow.html">TQMainWindow</a>(parent,name,f), + <a href="tqmainwindow.html">TQMainWindow</a>(parent,name,f), canvas(c) { editor = new FigureEditor(canvas,this); - <a href="ntqmenubar.html">TQMenuBar</a>* menu = <a href="ntqmainwindow.html#menuBar">menuBar</a>(); - - <a href="ntqpopupmenu.html">TQPopupMenu</a>* file = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menu ); -<a name="x2936"></a> file-><a href="ntqmenudata.html#insertItem">insertItem</a>("&Fill canvas", this, TQ_SLOT(init()), CTRL+Key_F); - file-><a href="ntqmenudata.html#insertItem">insertItem</a>("&Erase canvas", this, TQ_SLOT(clear()), CTRL+Key_E); - file-><a href="ntqmenudata.html#insertItem">insertItem</a>("&New view", this, TQ_SLOT(newView()), CTRL+Key_N); - file-><a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); - file-><a href="ntqmenudata.html#insertItem">insertItem</a>("&Print...", this, TQ_SLOT(print()), CTRL+Key_P); - file-><a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); - file-><a href="ntqmenudata.html#insertItem">insertItem</a>("E&xit", tqApp, TQ_SLOT(<a href="ntqapplication.html#quit">quit</a>()), CTRL+Key_Q); - menu-><a href="ntqmenudata.html#insertItem">insertItem</a>("&File", file); - - <a href="ntqpopupmenu.html">TQPopupMenu</a>* edit = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menu ); - edit-><a href="ntqmenudata.html#insertItem">insertItem</a>("Add &Circle", this, TQ_SLOT(addCircle()), ALT+Key_C); - edit-><a href="ntqmenudata.html#insertItem">insertItem</a>("Add &Hexagon", this, TQ_SLOT(addHexagon()), ALT+Key_H); - edit-><a href="ntqmenudata.html#insertItem">insertItem</a>("Add &Polygon", this, TQ_SLOT(addPolygon()), ALT+Key_P); - edit-><a href="ntqmenudata.html#insertItem">insertItem</a>("Add Spl&ine", this, TQ_SLOT(addSpline()), ALT+Key_I); - edit-><a href="ntqmenudata.html#insertItem">insertItem</a>("Add &Text", this, TQ_SLOT(addText()), ALT+Key_T); - edit-><a href="ntqmenudata.html#insertItem">insertItem</a>("Add &Line", this, TQ_SLOT(addLine()), ALT+Key_L); - edit-><a href="ntqmenudata.html#insertItem">insertItem</a>("Add &Rectangle", this, TQ_SLOT(addRectangle()), ALT+Key_R); - edit-><a href="ntqmenudata.html#insertItem">insertItem</a>("Add &Sprite", this, TQ_SLOT(addSprite()), ALT+Key_S); - edit-><a href="ntqmenudata.html#insertItem">insertItem</a>("Create &Mesh", this, TQ_SLOT(addMesh()), ALT+Key_M ); - edit-><a href="ntqmenudata.html#insertItem">insertItem</a>("Add &Alpha-blended image", this, TQ_SLOT(addButterfly()), ALT+Key_A); - menu-><a href="ntqmenudata.html#insertItem">insertItem</a>("&Edit", edit); - - <a href="ntqpopupmenu.html">TQPopupMenu</a>* view = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menu ); - view-><a href="ntqmenudata.html#insertItem">insertItem</a>("&Enlarge", this, TQ_SLOT(enlarge()), SHIFT+CTRL+Key_Plus); - view-><a href="ntqmenudata.html#insertItem">insertItem</a>("Shr&ink", this, TQ_SLOT(shrink()), SHIFT+CTRL+Key_Minus); - view-><a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); - view-><a href="ntqmenudata.html#insertItem">insertItem</a>("&Rotate clockwise", this, TQ_SLOT(rotateClockwise()), CTRL+Key_PageDown); - view-><a href="ntqmenudata.html#insertItem">insertItem</a>("Rotate &counterclockwise", this, TQ_SLOT(rotateCounterClockwise()), CTRL+Key_PageUp); - view-><a href="ntqmenudata.html#insertItem">insertItem</a>("&Zoom in", this, TQ_SLOT(zoomIn()), CTRL+Key_Plus); - view-><a href="ntqmenudata.html#insertItem">insertItem</a>("Zoom &out", this, TQ_SLOT(zoomOut()), CTRL+Key_Minus); - view-><a href="ntqmenudata.html#insertItem">insertItem</a>("Translate left", this, TQ_SLOT(moveL()), CTRL+Key_Left); - view-><a href="ntqmenudata.html#insertItem">insertItem</a>("Translate right", this, TQ_SLOT(moveR()), CTRL+Key_Right); - view-><a href="ntqmenudata.html#insertItem">insertItem</a>("Translate up", this, TQ_SLOT(moveU()), CTRL+Key_Up); - view-><a href="ntqmenudata.html#insertItem">insertItem</a>("Translate down", this, TQ_SLOT(moveD()), CTRL+Key_Down); - view-><a href="ntqmenudata.html#insertItem">insertItem</a>("&Mirror", this, TQ_SLOT(mirror()), CTRL+Key_Home); - menu-><a href="ntqmenudata.html#insertItem">insertItem</a>("&View", view); - - options = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menu ); - dbf_id = options-><a href="ntqmenudata.html#insertItem">insertItem</a>("Double buffer", this, TQ_SLOT(toggleDoubleBuffer())); -<a name="x2939"></a> options-><a href="ntqmenudata.html#setItemChecked">setItemChecked</a>(dbf_id, TRUE); - menu-><a href="ntqmenudata.html#insertItem">insertItem</a>("&Options",options); - - menu-><a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); - - <a href="ntqpopupmenu.html">TQPopupMenu</a>* help = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( menu ); - help-><a href="ntqmenudata.html#insertItem">insertItem</a>("&About", this, TQ_SLOT(help()), Key_F1); - help-><a href="ntqmenudata.html#setItemChecked">setItemChecked</a>(dbf_id, TRUE); - menu-><a href="ntqmenudata.html#insertItem">insertItem</a>("&Help",help); - - <a href="ntqmainwindow.html#statusBar">statusBar</a>(); - - <a href="ntqmainwindow.html#setCentralWidget">setCentralWidget</a>(editor); + <a href="tqmenubar.html">TQMenuBar</a>* menu = <a href="tqmainwindow.html#menuBar">menuBar</a>(); + + <a href="tqpopupmenu.html">TQPopupMenu</a>* file = new <a href="tqpopupmenu.html">TQPopupMenu</a>( menu ); +<a name="x2936"></a> file-><a href="tqmenudata.html#insertItem">insertItem</a>("&Fill canvas", this, TQ_SLOT(init()), CTRL+Key_F); + file-><a href="tqmenudata.html#insertItem">insertItem</a>("&Erase canvas", this, TQ_SLOT(clear()), CTRL+Key_E); + file-><a href="tqmenudata.html#insertItem">insertItem</a>("&New view", this, TQ_SLOT(newView()), CTRL+Key_N); + file-><a href="tqmenudata.html#insertSeparator">insertSeparator</a>(); + file-><a href="tqmenudata.html#insertItem">insertItem</a>("&Print...", this, TQ_SLOT(print()), CTRL+Key_P); + file-><a href="tqmenudata.html#insertSeparator">insertSeparator</a>(); + file-><a href="tqmenudata.html#insertItem">insertItem</a>("E&xit", tqApp, TQ_SLOT(<a href="ntqapplication.html#quit">quit</a>()), CTRL+Key_Q); + menu-><a href="tqmenudata.html#insertItem">insertItem</a>("&File", file); + + <a href="tqpopupmenu.html">TQPopupMenu</a>* edit = new <a href="tqpopupmenu.html">TQPopupMenu</a>( menu ); + edit-><a href="tqmenudata.html#insertItem">insertItem</a>("Add &Circle", this, TQ_SLOT(addCircle()), ALT+Key_C); + edit-><a href="tqmenudata.html#insertItem">insertItem</a>("Add &Hexagon", this, TQ_SLOT(addHexagon()), ALT+Key_H); + edit-><a href="tqmenudata.html#insertItem">insertItem</a>("Add &Polygon", this, TQ_SLOT(addPolygon()), ALT+Key_P); + edit-><a href="tqmenudata.html#insertItem">insertItem</a>("Add Spl&ine", this, TQ_SLOT(addSpline()), ALT+Key_I); + edit-><a href="tqmenudata.html#insertItem">insertItem</a>("Add &Text", this, TQ_SLOT(addText()), ALT+Key_T); + edit-><a href="tqmenudata.html#insertItem">insertItem</a>("Add &Line", this, TQ_SLOT(addLine()), ALT+Key_L); + edit-><a href="tqmenudata.html#insertItem">insertItem</a>("Add &Rectangle", this, TQ_SLOT(addRectangle()), ALT+Key_R); + edit-><a href="tqmenudata.html#insertItem">insertItem</a>("Add &Sprite", this, TQ_SLOT(addSprite()), ALT+Key_S); + edit-><a href="tqmenudata.html#insertItem">insertItem</a>("Create &Mesh", this, TQ_SLOT(addMesh()), ALT+Key_M ); + edit-><a href="tqmenudata.html#insertItem">insertItem</a>("Add &Alpha-blended image", this, TQ_SLOT(addButterfly()), ALT+Key_A); + menu-><a href="tqmenudata.html#insertItem">insertItem</a>("&Edit", edit); + + <a href="tqpopupmenu.html">TQPopupMenu</a>* view = new <a href="tqpopupmenu.html">TQPopupMenu</a>( menu ); + view-><a href="tqmenudata.html#insertItem">insertItem</a>("&Enlarge", this, TQ_SLOT(enlarge()), SHIFT+CTRL+Key_Plus); + view-><a href="tqmenudata.html#insertItem">insertItem</a>("Shr&ink", this, TQ_SLOT(shrink()), SHIFT+CTRL+Key_Minus); + view-><a href="tqmenudata.html#insertSeparator">insertSeparator</a>(); + view-><a href="tqmenudata.html#insertItem">insertItem</a>("&Rotate clockwise", this, TQ_SLOT(rotateClockwise()), CTRL+Key_PageDown); + view-><a href="tqmenudata.html#insertItem">insertItem</a>("Rotate &counterclockwise", this, TQ_SLOT(rotateCounterClockwise()), CTRL+Key_PageUp); + view-><a href="tqmenudata.html#insertItem">insertItem</a>("&Zoom in", this, TQ_SLOT(zoomIn()), CTRL+Key_Plus); + view-><a href="tqmenudata.html#insertItem">insertItem</a>("Zoom &out", this, TQ_SLOT(zoomOut()), CTRL+Key_Minus); + view-><a href="tqmenudata.html#insertItem">insertItem</a>("Translate left", this, TQ_SLOT(moveL()), CTRL+Key_Left); + view-><a href="tqmenudata.html#insertItem">insertItem</a>("Translate right", this, TQ_SLOT(moveR()), CTRL+Key_Right); + view-><a href="tqmenudata.html#insertItem">insertItem</a>("Translate up", this, TQ_SLOT(moveU()), CTRL+Key_Up); + view-><a href="tqmenudata.html#insertItem">insertItem</a>("Translate down", this, TQ_SLOT(moveD()), CTRL+Key_Down); + view-><a href="tqmenudata.html#insertItem">insertItem</a>("&Mirror", this, TQ_SLOT(mirror()), CTRL+Key_Home); + menu-><a href="tqmenudata.html#insertItem">insertItem</a>("&View", view); + + options = new <a href="tqpopupmenu.html">TQPopupMenu</a>( menu ); + dbf_id = options-><a href="tqmenudata.html#insertItem">insertItem</a>("Double buffer", this, TQ_SLOT(toggleDoubleBuffer())); +<a name="x2939"></a> options-><a href="tqmenudata.html#setItemChecked">setItemChecked</a>(dbf_id, TRUE); + menu-><a href="tqmenudata.html#insertItem">insertItem</a>("&Options",options); + + menu-><a href="tqmenudata.html#insertSeparator">insertSeparator</a>(); + + <a href="tqpopupmenu.html">TQPopupMenu</a>* help = new <a href="tqpopupmenu.html">TQPopupMenu</a>( menu ); + help-><a href="tqmenudata.html#insertItem">insertItem</a>("&About", this, TQ_SLOT(help()), Key_F1); + help-><a href="tqmenudata.html#setItemChecked">setItemChecked</a>(dbf_id, TRUE); + menu-><a href="tqmenudata.html#insertItem">insertItem</a>("&Help",help); + + <a href="tqmainwindow.html#statusBar">statusBar</a>(); + + <a href="tqmainwindow.html#setCentralWidget">setCentralWidget</a>(editor); printer = 0; @@ -568,8 +568,8 @@ void <a name="f630"></a>Main::aboutTQt() void <a name="f631"></a>Main::toggleDoubleBuffer() { -<a name="x2938"></a> bool s = !options-><a href="ntqmenudata.html#isItemChecked">isItemChecked</a>(dbf_id); - options-><a href="ntqmenudata.html#setItemChecked">setItemChecked</a>(dbf_id,s); +<a name="x2938"></a> bool s = !options-><a href="tqmenudata.html#isItemChecked">isItemChecked</a>(dbf_id); + options-><a href="tqmenudata.html#setItemChecked">setItemChecked</a>(dbf_id,s); <a name="x2911"></a> canvas.<a href="tqcanvas.html#setDoubleBuffering">setDoubleBuffering</a>(s); } @@ -876,9 +876,9 @@ void <a name="f654"></a>Main::addRectangle() <p> <hr> <p> Main: -<p> <pre>#include <<a href="qstatusbar-h.html">ntqstatusbar.h</a>> +<p> <pre>#include <<a href="tqstatusbar-h.html">tqstatusbar.h</a>> #include <<a href="qmessagebox-h.html">ntqmessagebox.h</a>> -#include <<a href="qmenubar-h.html">ntqmenubar.h</a>> +#include <<a href="tqmenubar-h.html">tqmenubar.h</a>> #include <<a href="qapplication-h.html">ntqapplication.h</a>> #include <<a href="tqimage-h.html">tqimage.h</a>> |