From 7552c6d73043b1040139033f6864db48ae5446cf Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 2 Jul 2024 21:37:22 +0900 Subject: Rename main window nt* related files to equivalent tq*. The file "ntqsession.h" was totally unnecessary and has been removed. Signed-off-by: Michele Calgaro --- doc/html/canvas-example.html | 134 +++++++++++++++++++++---------------------- 1 file changed, 67 insertions(+), 67 deletions(-) (limited to 'doc/html/canvas-example.html') 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.

#ifndef EXAMPLE_H
 #define EXAMPLE_H
 
-#include <ntqpopupmenu.h>
-#include <ntqmainwindow.h>
+#include <tqpopupmenu.h>
+#include <tqmainwindow.h>
 #include <ntqintdict.h>
 #include <tqcanvas.h>
 
@@ -75,7 +75,7 @@ private:
     TQPoint moving_start;
 };
 
-class Main : public TQMainWindow {
+class Main : public TQMainWindow {
     TQ_OBJECT
 
 public:
@@ -123,7 +123,7 @@ private:
     TQCanvas& canvas;
     FigureEditor *editor;
 
-    TQPopupMenu* options;
+    TQPopupMenu* options;
     TQPrinter* printer;
     int dbf_id;
 };
@@ -134,10 +134,10 @@ private:
 


Implementation:

#include <tqdatetime.h>
-#include <ntqmainwindow.h>
-#include <ntqstatusbar.h>
+#include <tqmainwindow.h>
+#include <tqstatusbar.h>
 #include <ntqmessagebox.h>
-#include <ntqmenubar.h>
+#include <tqmenubar.h>
 #include <ntqapplication.h>
 #include <ntqpainter.h>
 #include <ntqprinter.h>
@@ -433,65 +433,65 @@ static TQImage *butterflyimg;
 static TQImage *logoimg;
 
 Main::Main(TQCanvas& c, TQWidget* parent, const char* name, WFlags f) :
-    TQMainWindow(parent,name,f),
+    TQMainWindow(parent,name,f),
     canvas(c)
 {
     editor = new FigureEditor(canvas,this);
-    TQMenuBar* menu = menuBar();
-
-    TQPopupMenu* file = new TQPopupMenu( menu );
-    file->insertItem("&Fill canvas", this, TQ_SLOT(init()), CTRL+Key_F);
-    file->insertItem("&Erase canvas", this, TQ_SLOT(clear()), CTRL+Key_E);
-    file->insertItem("&New view", this, TQ_SLOT(newView()), CTRL+Key_N);
-    file->insertSeparator();
-    file->insertItem("&Print...", this, TQ_SLOT(print()), CTRL+Key_P);
-    file->insertSeparator();
-    file->insertItem("E&xit", tqApp, TQ_SLOT(quit()), CTRL+Key_Q);
-    menu->insertItem("&File", file);
-
-    TQPopupMenu* edit = new TQPopupMenu( menu );
-    edit->insertItem("Add &Circle", this, TQ_SLOT(addCircle()), ALT+Key_C);
-    edit->insertItem("Add &Hexagon", this, TQ_SLOT(addHexagon()), ALT+Key_H);
-    edit->insertItem("Add &Polygon", this, TQ_SLOT(addPolygon()), ALT+Key_P);
-    edit->insertItem("Add Spl&ine", this, TQ_SLOT(addSpline()), ALT+Key_I);
-    edit->insertItem("Add &Text", this, TQ_SLOT(addText()), ALT+Key_T);
-    edit->insertItem("Add &Line", this, TQ_SLOT(addLine()), ALT+Key_L);
-    edit->insertItem("Add &Rectangle", this, TQ_SLOT(addRectangle()), ALT+Key_R);
-    edit->insertItem("Add &Sprite", this, TQ_SLOT(addSprite()), ALT+Key_S);
-    edit->insertItem("Create &Mesh", this, TQ_SLOT(addMesh()), ALT+Key_M );
-    edit->insertItem("Add &Alpha-blended image", this, TQ_SLOT(addButterfly()), ALT+Key_A);
-    menu->insertItem("&Edit", edit);
-
-    TQPopupMenu* view = new TQPopupMenu( menu );
-    view->insertItem("&Enlarge", this, TQ_SLOT(enlarge()), SHIFT+CTRL+Key_Plus);
-    view->insertItem("Shr&ink", this, TQ_SLOT(shrink()), SHIFT+CTRL+Key_Minus);
-    view->insertSeparator();
-    view->insertItem("&Rotate clockwise", this, TQ_SLOT(rotateClockwise()), CTRL+Key_PageDown);
-    view->insertItem("Rotate &counterclockwise", this, TQ_SLOT(rotateCounterClockwise()), CTRL+Key_PageUp);
-    view->insertItem("&Zoom in", this, TQ_SLOT(zoomIn()), CTRL+Key_Plus);
-    view->insertItem("Zoom &out", this, TQ_SLOT(zoomOut()), CTRL+Key_Minus);
-    view->insertItem("Translate left", this, TQ_SLOT(moveL()), CTRL+Key_Left);
-    view->insertItem("Translate right", this, TQ_SLOT(moveR()), CTRL+Key_Right);
-    view->insertItem("Translate up", this, TQ_SLOT(moveU()), CTRL+Key_Up);
-    view->insertItem("Translate down", this, TQ_SLOT(moveD()), CTRL+Key_Down);
-    view->insertItem("&Mirror", this, TQ_SLOT(mirror()), CTRL+Key_Home);
-    menu->insertItem("&View", view);
-
-    options = new TQPopupMenu( menu );
-    dbf_id = options->insertItem("Double buffer", this, TQ_SLOT(toggleDoubleBuffer()));
-    options->setItemChecked(dbf_id, TRUE);
-    menu->insertItem("&Options",options);
-
-    menu->insertSeparator();
-
-    TQPopupMenu* help = new TQPopupMenu( menu );
-    help->insertItem("&About", this, TQ_SLOT(help()), Key_F1);
-    help->setItemChecked(dbf_id, TRUE);
-    menu->insertItem("&Help",help);
-
-    statusBar();
-
-    setCentralWidget(editor);
+    TQMenuBar* menu = menuBar();
+
+    TQPopupMenu* file = new TQPopupMenu( menu );
+    file->insertItem("&Fill canvas", this, TQ_SLOT(init()), CTRL+Key_F);
+    file->insertItem("&Erase canvas", this, TQ_SLOT(clear()), CTRL+Key_E);
+    file->insertItem("&New view", this, TQ_SLOT(newView()), CTRL+Key_N);
+    file->insertSeparator();
+    file->insertItem("&Print...", this, TQ_SLOT(print()), CTRL+Key_P);
+    file->insertSeparator();
+    file->insertItem("E&xit", tqApp, TQ_SLOT(quit()), CTRL+Key_Q);
+    menu->insertItem("&File", file);
+
+    TQPopupMenu* edit = new TQPopupMenu( menu );
+    edit->insertItem("Add &Circle", this, TQ_SLOT(addCircle()), ALT+Key_C);
+    edit->insertItem("Add &Hexagon", this, TQ_SLOT(addHexagon()), ALT+Key_H);
+    edit->insertItem("Add &Polygon", this, TQ_SLOT(addPolygon()), ALT+Key_P);
+    edit->insertItem("Add Spl&ine", this, TQ_SLOT(addSpline()), ALT+Key_I);
+    edit->insertItem("Add &Text", this, TQ_SLOT(addText()), ALT+Key_T);
+    edit->insertItem("Add &Line", this, TQ_SLOT(addLine()), ALT+Key_L);
+    edit->insertItem("Add &Rectangle", this, TQ_SLOT(addRectangle()), ALT+Key_R);
+    edit->insertItem("Add &Sprite", this, TQ_SLOT(addSprite()), ALT+Key_S);
+    edit->insertItem("Create &Mesh", this, TQ_SLOT(addMesh()), ALT+Key_M );
+    edit->insertItem("Add &Alpha-blended image", this, TQ_SLOT(addButterfly()), ALT+Key_A);
+    menu->insertItem("&Edit", edit);
+
+    TQPopupMenu* view = new TQPopupMenu( menu );
+    view->insertItem("&Enlarge", this, TQ_SLOT(enlarge()), SHIFT+CTRL+Key_Plus);
+    view->insertItem("Shr&ink", this, TQ_SLOT(shrink()), SHIFT+CTRL+Key_Minus);
+    view->insertSeparator();
+    view->insertItem("&Rotate clockwise", this, TQ_SLOT(rotateClockwise()), CTRL+Key_PageDown);
+    view->insertItem("Rotate &counterclockwise", this, TQ_SLOT(rotateCounterClockwise()), CTRL+Key_PageUp);
+    view->insertItem("&Zoom in", this, TQ_SLOT(zoomIn()), CTRL+Key_Plus);
+    view->insertItem("Zoom &out", this, TQ_SLOT(zoomOut()), CTRL+Key_Minus);
+    view->insertItem("Translate left", this, TQ_SLOT(moveL()), CTRL+Key_Left);
+    view->insertItem("Translate right", this, TQ_SLOT(moveR()), CTRL+Key_Right);
+    view->insertItem("Translate up", this, TQ_SLOT(moveU()), CTRL+Key_Up);
+    view->insertItem("Translate down", this, TQ_SLOT(moveD()), CTRL+Key_Down);
+    view->insertItem("&Mirror", this, TQ_SLOT(mirror()), CTRL+Key_Home);
+    menu->insertItem("&View", view);
+
+    options = new TQPopupMenu( menu );
+    dbf_id = options->insertItem("Double buffer", this, TQ_SLOT(toggleDoubleBuffer()));
+    options->setItemChecked(dbf_id, TRUE);
+    menu->insertItem("&Options",options);
+
+    menu->insertSeparator();
+
+    TQPopupMenu* help = new TQPopupMenu( menu );
+    help->insertItem("&About", this, TQ_SLOT(help()), Key_F1);
+    help->setItemChecked(dbf_id, TRUE);
+    menu->insertItem("&Help",help);
+
+    statusBar();
+
+    setCentralWidget(editor);
 
     printer = 0;
 
@@ -568,8 +568,8 @@ void Main::aboutTQt()
 
 void Main::toggleDoubleBuffer()
 {
-    bool s = !options->isItemChecked(dbf_id);
-    options->setItemChecked(dbf_id,s);
+    bool s = !options->isItemChecked(dbf_id);
+    options->setItemChecked(dbf_id,s);
     canvas.setDoubleBuffering(s);
 }
 
@@ -876,9 +876,9 @@ void Main::addRectangle()
 
 


Main: -

#include <ntqstatusbar.h>
+

#include <tqstatusbar.h>
 #include <ntqmessagebox.h>
-#include <ntqmenubar.h>
+#include <tqmenubar.h>
 #include <ntqapplication.h>
 #include <tqimage.h>
 
-- 
cgit v1.2.1