From 1e9fa8e06de5da7fcc268e9cccb2d6b21c5f53a3 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 20 Jul 2024 20:15:52 +0900 Subject: Rename graphics class nt* related files to equivalent tq* (part 2) Signed-off-by: Michele Calgaro --- doc/html/canvas-example.html | 72 ++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'doc/html/canvas-example.html') diff --git a/doc/html/canvas-example.html b/doc/html/canvas-example.html index d14444d2f..7b463722d 100644 --- a/doc/html/canvas-example.html +++ b/doc/html/canvas-example.html @@ -72,7 +72,7 @@ signals: private: TQCanvasItem* moving; - TQPoint moving_start; + TQPoint moving_start; }; class Main : public TQMainWindow { @@ -124,7 +124,7 @@ private: FigureEditor *editor; TQPopupMenu* options; - TQPrinter* printer; + TQPrinter* printer; int dbf_id; }; @@ -140,7 +140,7 @@ private: #include <tqmenubar.h> #include <ntqapplication.h> #include <tqpainter.h> -#include <ntqprinter.h> +#include <tqprinter.h> #include <ntqlabel.h> #include <tqimage.h> #include <ntqprogressdialog.h> @@ -176,12 +176,12 @@ class ImageItem: public TQCanvasRectangle public: ImageItem( TQImage img, TQCanvas *canvas ); int rtti () const { return imageRTTI; } - bool hit( const TQPoint&) const; + bool hit( const TQPoint&) const; protected: void drawShape( TQPainter & ); private: TQImage image; - TQPixmap pixmap; + TQPixmap pixmap; }; @@ -190,7 +190,7 @@ private: { setSize( image.width(), image.height() ); - pixmap.convertFromImage(image, OrderedAlphaDither); + pixmap.convertFromImage(image, OrderedAlphaDither); } @@ -199,10 +199,10 @@ private: p.drawPixmap( int(x()), int(y()), pixmap ); } -bool ImageItem::hit( const TQPoint &p ) const +bool ImageItem::hit( const TQPoint &p ) const { - int ix = p.x()-int(x()); - int iy = p.y()-int(y()); + int ix = p.x()-int(x()); + int iy = p.y()-int(y()); if ( !image.valid( ix , iy ) ) return FALSE; TQRgb pixel = image.pixel( ix, iy ); @@ -293,7 +293,7 @@ void NodeItem::moveBy(double dx, double d void FigureEditor::contentsMousePressEvent(TQMouseEvent* e) { - TQPoint p = inverseWorldMatrix().map(e->pos()); + TQPoint p = inverseWorldMatrix().map(e->pos()); TQCanvasItemList l=canvas()->collisions(p); for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { if ( (*it)->rtti() == imageRTTI ) { @@ -321,9 +321,9 @@ void FigureEditor::clear() void FigureEditor::contentsMouseMoveEvent(TQMouseEvent* e) { if ( moving ) { - TQPoint p = inverseWorldMatrix().map(e->pos()); - moving->moveBy(p.x() - moving_start.x(), - p.y() - moving_start.y()); + TQPoint p = inverseWorldMatrix().map(e->pos()); + moving->moveBy(p.x() - moving_start.x(), + p.y() - moving_start.y()); moving_start = p; canvas()->update(); } @@ -585,70 +585,70 @@ void Main::shrink() void Main::rotateClockwise() { - TQWMatrix m = editor->worldMatrix(); - m.rotate( 22.5 ); + TQWMatrix m = editor->worldMatrix(); + m.rotate( 22.5 ); editor->setWorldMatrix( m ); } void Main::rotateCounterClockwise() { - TQWMatrix m = editor->worldMatrix(); - m.rotate( -22.5 ); + TQWMatrix m = editor->worldMatrix(); + m.rotate( -22.5 ); editor->setWorldMatrix( m ); } void Main::zoomIn() { - TQWMatrix m = editor->worldMatrix(); - m.scale( 2.0, 2.0 ); + TQWMatrix m = editor->worldMatrix(); + m.scale( 2.0, 2.0 ); editor->setWorldMatrix( m ); } void Main::zoomOut() { - TQWMatrix m = editor->worldMatrix(); - m.scale( 0.5, 0.5 ); + TQWMatrix m = editor->worldMatrix(); + m.scale( 0.5, 0.5 ); editor->setWorldMatrix( m ); } void Main::mirror() { - TQWMatrix m = editor->worldMatrix(); - m.scale( -1, 1 ); + TQWMatrix m = editor->worldMatrix(); + m.scale( -1, 1 ); editor->setWorldMatrix( m ); } void Main::moveL() { - TQWMatrix m = editor->worldMatrix(); - m.translate( -16, 0 ); + TQWMatrix m = editor->worldMatrix(); + m.translate( -16, 0 ); editor->setWorldMatrix( m ); } void Main::moveR() { - TQWMatrix m = editor->worldMatrix(); - m.translate( +16, 0 ); + TQWMatrix m = editor->worldMatrix(); + m.translate( +16, 0 ); editor->setWorldMatrix( m ); } void Main::moveU() { - TQWMatrix m = editor->worldMatrix(); - m.translate( 0, -16 ); + TQWMatrix m = editor->worldMatrix(); + m.translate( 0, -16 ); editor->setWorldMatrix( m ); } void Main::moveD() { - TQWMatrix m = editor->worldMatrix(); - m.translate( 0, +16 ); + TQWMatrix m = editor->worldMatrix(); + m.translate( 0, +16 ); editor->setWorldMatrix( m ); } void Main::print() { - if ( !printer ) printer = new TQPrinter; + if ( !printer ) printer = new TQPrinter; if ( printer->setup(this) ) { TQPainter pp(printer); canvas.drawArea(TQRect(0,0,canvas.width(),canvas.height()),&pp,FALSE); @@ -724,7 +724,7 @@ void Main::addHexagon() { TQCanvasPolygon* i = new TQCanvasPolygon(&canvas); const int size = canvas.width() / 25; - TQPointArray pa(6); + TQPointArray pa(6); pa[0] = TQPoint(2*size,0); pa[1] = TQPoint(size,-size*173/100); pa[2] = TQPoint(-size,-size*173/100); @@ -742,7 +742,7 @@ void Main::addPolygon() { TQCanvasPolygon* i = new TQCanvasPolygon(&canvas); const int size = canvas.width()/2; - TQPointArray pa(6); + TQPointArray pa(6); pa[0] = TQPoint(0,0); pa[1] = TQPoint(size,size/5); pa[2] = TQPoint(size*4/5,size); @@ -760,7 +760,7 @@ void Main::addSpline() { TQCanvasSpline* i = new TQCanvasSpline(&canvas); const int size = canvas.width()/6; - TQPointArray pa(12); + TQPointArray pa(12); pa[0] = TQPoint(0,0); pa[1] = TQPoint(size/2,0); pa[2] = TQPoint(size,size/2); @@ -805,7 +805,7 @@ void Main::addMesh() int y0 = 0; if ( !tb ) tb = new TQBrush( TQt::red ); - if ( !tp ) tp = new TQPen( TQt::black ); + if ( !tp ) tp = new TQPen( TQt::black ); int nodecount = 0; -- cgit v1.2.3