diff options
Diffstat (limited to 'doc/html/canvas-example.html')
-rw-r--r-- | doc/html/canvas-example.html | 72 |
1 files changed, 36 insertions, 36 deletions
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: <a href="tqcanvasitem.html">TQCanvasItem</a>* moving; - <a href="ntqpoint.html">TQPoint</a> moving_start; + <a href="tqpoint.html">TQPoint</a> moving_start; }; class Main : public <a href="tqmainwindow.html">TQMainWindow</a> { @@ -124,7 +124,7 @@ private: FigureEditor *editor; <a href="tqpopupmenu.html">TQPopupMenu</a>* options; - <a href="ntqprinter.html">TQPrinter</a>* printer; + <a href="tqprinter.html">TQPrinter</a>* printer; int dbf_id; }; @@ -140,7 +140,7 @@ private: #include <<a href="tqmenubar-h.html">tqmenubar.h</a>> #include <<a href="qapplication-h.html">ntqapplication.h</a>> #include <<a href="tqpainter-h.html">tqpainter.h</a>> -#include <<a href="qprinter-h.html">ntqprinter.h</a>> +#include <<a href="tqprinter-h.html">tqprinter.h</a>> #include <<a href="qlabel-h.html">ntqlabel.h</a>> #include <<a href="tqimage-h.html">tqimage.h</a>> #include <<a href="qprogressdialog-h.html">ntqprogressdialog.h</a>> @@ -176,12 +176,12 @@ class ImageItem: public <a href="tqcanvasrectangle.html">TQCanvasRectangle</a> public: ImageItem( <a href="tqimage.html">TQImage</a> img, TQCanvas *canvas ); int rtti () const { return imageRTTI; } - bool hit( const <a href="ntqpoint.html">TQPoint</a>&) const; + bool hit( const <a href="tqpoint.html">TQPoint</a>&) const; protected: void drawShape( <a href="tqpainter.html">TQPainter</a> & ); private: <a href="tqimage.html">TQImage</a> image; - <a href="ntqpixmap.html">TQPixmap</a> pixmap; + <a href="tqpixmap.html">TQPixmap</a> pixmap; }; @@ -190,7 +190,7 @@ private: { <a name="x2935"></a><a name="x2932"></a> <a href="tqcanvasrectangle.html#setSize">setSize</a>( image.<a href="tqimage.html#width">width</a>(), image.<a href="tqimage.html#height">height</a>() ); -<a name="x2943"></a> pixmap.<a href="ntqpixmap.html#convertFromImage">convertFromImage</a>(image, OrderedAlphaDither); +<a name="x2943"></a> pixmap.<a href="tqpixmap.html#convertFromImage">convertFromImage</a>(image, OrderedAlphaDither); } @@ -199,10 +199,10 @@ private: p.<a href="tqpainter.html#drawPixmap">drawPixmap</a>( int(<a href="tqcanvasitem.html#x">x</a>()), int(<a href="tqcanvasitem.html#y">y</a>()), pixmap ); } -bool <a name="f624"></a>ImageItem::hit( const <a href="ntqpoint.html">TQPoint</a> &p ) const +bool <a name="f624"></a>ImageItem::hit( const <a href="tqpoint.html">TQPoint</a> &p ) const { -<a name="x2944"></a> int ix = p.<a href="ntqpoint.html#x">x</a>()-int(<a href="tqcanvasitem.html#x">x</a>()); -<a name="x2945"></a> int iy = p.<a href="ntqpoint.html#y">y</a>()-int(<a href="tqcanvasitem.html#y">y</a>()); +<a name="x2944"></a> int ix = p.<a href="tqpoint.html#x">x</a>()-int(<a href="tqcanvasitem.html#x">x</a>()); +<a name="x2945"></a> int iy = p.<a href="tqpoint.html#y">y</a>()-int(<a href="tqcanvasitem.html#y">y</a>()); <a name="x2934"></a> if ( !image.<a href="tqimage.html#valid">valid</a>( ix , iy ) ) return FALSE; <a name="x2933"></a> TQRgb pixel = image.<a href="tqimage.html#pixel">pixel</a>( ix, iy ); @@ -293,7 +293,7 @@ void NodeItem::<a href="tqcanvasitem.html#moveBy">moveBy</a>(double dx, double d <a name="x2951"></a>void FigureEditor::<a href="ntqscrollview.html#contentsMousePressEvent">contentsMousePressEvent</a>(TQMouseEvent* e) { - <a href="ntqpoint.html">TQPoint</a> p = inverseWorldMatrix().map(e->pos()); + <a href="tqpoint.html">TQPoint</a> p = inverseWorldMatrix().map(e->pos()); <a href="tqcanvasitemlist.html">TQCanvasItemList</a> l=<a href="tqcanvasitem.html#canvas">canvas</a>()->collisions(p); <a name="x2953"></a><a name="x2952"></a> for (TQCanvasItemList::Iterator it=l.<a href="tqvaluelist.html#begin">begin</a>(); it!=l.<a href="tqvaluelist.html#end">end</a>(); ++it) { if ( (*it)->rtti() == imageRTTI ) { @@ -321,9 +321,9 @@ void <a name="f622"></a>FigureEditor::clear() <a name="x2950"></a>void FigureEditor::<a href="ntqscrollview.html#contentsMouseMoveEvent">contentsMouseMoveEvent</a>(TQMouseEvent* e) { if ( moving ) { - <a href="ntqpoint.html">TQPoint</a> p = inverseWorldMatrix().map(e->pos()); - moving->moveBy(p.<a href="ntqpoint.html#x">x</a>() - moving_start.x(), - p.<a href="ntqpoint.html#y">y</a>() - moving_start.y()); + <a href="tqpoint.html">TQPoint</a> p = inverseWorldMatrix().map(e->pos()); + moving->moveBy(p.<a href="tqpoint.html#x">x</a>() - moving_start.x(), + p.<a href="tqpoint.html#y">y</a>() - moving_start.y()); moving_start = p; <a href="tqcanvasitem.html#canvas">canvas</a>()->update(); } @@ -585,70 +585,70 @@ void <a name="f633"></a>Main::shrink() void <a name="f634"></a>Main::rotateClockwise() { -<a name="x2931"></a> <a href="ntqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); -<a name="x2955"></a> m.<a href="ntqwmatrix.html#rotate">rotate</a>( 22.5 ); +<a name="x2931"></a> <a href="tqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); +<a name="x2955"></a> m.<a href="tqwmatrix.html#rotate">rotate</a>( 22.5 ); <a name="x2930"></a> editor-><a href="tqcanvasview.html#setWorldMatrix">setWorldMatrix</a>( m ); } void <a name="f635"></a>Main::rotateCounterClockwise() { - <a href="ntqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); - m.<a href="ntqwmatrix.html#rotate">rotate</a>( -22.5 ); + <a href="tqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); + m.<a href="tqwmatrix.html#rotate">rotate</a>( -22.5 ); editor-><a href="tqcanvasview.html#setWorldMatrix">setWorldMatrix</a>( m ); } void <a name="f636"></a>Main::zoomIn() { - <a href="ntqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); -<a name="x2956"></a> m.<a href="ntqwmatrix.html#scale">scale</a>( 2.0, 2.0 ); + <a href="tqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); +<a name="x2956"></a> m.<a href="tqwmatrix.html#scale">scale</a>( 2.0, 2.0 ); editor-><a href="tqcanvasview.html#setWorldMatrix">setWorldMatrix</a>( m ); } void <a name="f637"></a>Main::zoomOut() { - <a href="ntqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); - m.<a href="ntqwmatrix.html#scale">scale</a>( 0.5, 0.5 ); + <a href="tqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); + m.<a href="tqwmatrix.html#scale">scale</a>( 0.5, 0.5 ); editor-><a href="tqcanvasview.html#setWorldMatrix">setWorldMatrix</a>( m ); } void <a name="f638"></a>Main::mirror() { - <a href="ntqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); - m.<a href="ntqwmatrix.html#scale">scale</a>( -1, 1 ); + <a href="tqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); + m.<a href="tqwmatrix.html#scale">scale</a>( -1, 1 ); editor-><a href="tqcanvasview.html#setWorldMatrix">setWorldMatrix</a>( m ); } void <a name="f639"></a>Main::moveL() { - <a href="ntqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); -<a name="x2957"></a> m.<a href="ntqwmatrix.html#translate">translate</a>( -16, 0 ); + <a href="tqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); +<a name="x2957"></a> m.<a href="tqwmatrix.html#translate">translate</a>( -16, 0 ); editor-><a href="tqcanvasview.html#setWorldMatrix">setWorldMatrix</a>( m ); } void <a name="f640"></a>Main::moveR() { - <a href="ntqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); - m.<a href="ntqwmatrix.html#translate">translate</a>( +16, 0 ); + <a href="tqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); + m.<a href="tqwmatrix.html#translate">translate</a>( +16, 0 ); editor-><a href="tqcanvasview.html#setWorldMatrix">setWorldMatrix</a>( m ); } void <a name="f641"></a>Main::moveU() { - <a href="ntqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); - m.<a href="ntqwmatrix.html#translate">translate</a>( 0, -16 ); + <a href="tqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); + m.<a href="tqwmatrix.html#translate">translate</a>( 0, -16 ); editor-><a href="tqcanvasview.html#setWorldMatrix">setWorldMatrix</a>( m ); } void <a name="f642"></a>Main::moveD() { - <a href="ntqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); - m.<a href="ntqwmatrix.html#translate">translate</a>( 0, +16 ); + <a href="tqwmatrix.html">TQWMatrix</a> m = editor-><a href="tqcanvasview.html#worldMatrix">worldMatrix</a>(); + m.<a href="tqwmatrix.html#translate">translate</a>( 0, +16 ); editor-><a href="tqcanvasview.html#setWorldMatrix">setWorldMatrix</a>( m ); } void <a name="f643"></a>Main::print() { - if ( !printer ) printer = new <a href="ntqprinter.html">TQPrinter</a>; + if ( !printer ) printer = new <a href="tqprinter.html">TQPrinter</a>; if ( printer->setup(this) ) { <a href="tqpainter.html">TQPainter</a> pp(printer); <a name="x2908"></a> canvas.<a href="tqcanvas.html#drawArea">drawArea</a>(TQRect(0,0,canvas.<a href="tqcanvas.html#width">width</a>(),canvas.<a href="tqcanvas.html#height">height</a>()),&pp,FALSE); @@ -724,7 +724,7 @@ void <a name="f648"></a>Main::addHexagon() { <a href="tqcanvaspolygon.html">TQCanvasPolygon</a>* i = new <a href="tqcanvaspolygon.html">TQCanvasPolygon</a>(&canvas); const int size = canvas.<a href="tqcanvas.html#width">width</a>() / 25; - <a href="ntqpointarray.html">TQPointArray</a> pa(6); + <a href="tqpointarray.html">TQPointArray</a> 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 <a name="f649"></a>Main::addPolygon() { <a href="tqcanvaspolygon.html">TQCanvasPolygon</a>* i = new <a href="tqcanvaspolygon.html">TQCanvasPolygon</a>(&canvas); const int size = canvas.<a href="tqcanvas.html#width">width</a>()/2; - <a href="ntqpointarray.html">TQPointArray</a> pa(6); + <a href="tqpointarray.html">TQPointArray</a> 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 <a name="f650"></a>Main::addSpline() { <a href="tqcanvasspline.html">TQCanvasSpline</a>* i = new <a href="tqcanvasspline.html">TQCanvasSpline</a>(&canvas); const int size = canvas.<a href="tqcanvas.html#width">width</a>()/6; - <a href="ntqpointarray.html">TQPointArray</a> pa(12); + <a href="tqpointarray.html">TQPointArray</a> pa(12); pa[0] = TQPoint(0,0); pa[1] = TQPoint(size/2,0); pa[2] = TQPoint(size,size/2); @@ -805,7 +805,7 @@ void <a name="f653"></a>Main::addMesh() int y0 = 0; if ( !tb ) tb = new <a href="tqbrush.html">TQBrush</a>( TQt::red ); - if ( !tp ) tp = new <a href="ntqpen.html">TQPen</a>( TQt::black ); + if ( !tp ) tp = new <a href="tqpen.html">TQPen</a>( TQt::black ); int nodecount = 0; |