diff options
Diffstat (limited to 'doc/html/picture-example.html')
-rw-r--r-- | doc/html/picture-example.html | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/doc/html/picture-example.html b/doc/html/picture-example.html index 797724478..1fdb0960b 100644 --- a/doc/html/picture-example.html +++ b/doc/html/picture-example.html @@ -48,7 +48,7 @@ a set of drawing commands. *****************************************************************************/ #include <<a href="qapplication-h.html">ntqapplication.h</a>> -#include <<a href="qpainter-h.html">ntqpainter.h</a>> +#include <<a href="tqpainter-h.html">tqpainter.h</a>> #include <<a href="qpicture-h.html">ntqpicture.h</a>> #include <<a href="qpixmap-h.html">ntqpixmap.h</a>> #include <<a href="tqwidget-h.html">tqwidget.h</a>> @@ -57,33 +57,33 @@ a set of drawing commands. #include <ctype.h> -void paintCar( <a href="ntqpainter.html">TQPainter</a> *p ) // paint a car +void paintCar( <a href="tqpainter.html">TQPainter</a> *p ) // paint a car { <a href="ntqpointarray.html">TQPointArray</a> a; - <a href="ntqbrush.html">TQBrush</a> brush( TQt::yellow, TQt::SolidPattern ); -<a name="x120"></a> p-><a href="ntqpainter.html#setBrush">setBrush</a>( brush ); // use solid, yellow brush + <a href="tqbrush.html">TQBrush</a> brush( TQt::yellow, TQt::SolidPattern ); +<a name="x120"></a> p-><a href="tqpainter.html#setBrush">setBrush</a>( brush ); // use solid, yellow brush <a name="x125"></a> a.setPoints( 5, 50,50, 350,50, 450,120, 450,250, 50,250 ); -<a name="x115"></a> p-><a href="ntqpainter.html#drawPolygon">drawPolygon</a>( a ); // draw car body +<a name="x115"></a> p-><a href="tqpainter.html#drawPolygon">drawPolygon</a>( a ); // draw car body - <a href="ntqfont.html">TQFont</a> f( "courier", 12, TQFont::Bold ); -<a name="x121"></a> p-><a href="ntqpainter.html#setFont">setFont</a>( f ); + <a href="tqfont.html">TQFont</a> f( "courier", 12, TQFont::Bold ); +<a name="x121"></a> p-><a href="tqpainter.html#setFont">setFont</a>( f ); - <a href="ntqcolor.html">TQColor</a> windowColor( 120, 120, 255 ); // a light blue color -<a name="x108"></a> brush.<a href="ntqbrush.html#setColor">setColor</a>( windowColor ); // set this brush color - p-><a href="ntqpainter.html#setBrush">setBrush</a>( brush ); // set brush -<a name="x116"></a> p-><a href="ntqpainter.html#drawRect">drawRect</a>( 80, 80, 250, 70 ); // car window -<a name="x117"></a> p-><a href="ntqpainter.html#drawText">drawText</a>( 180, 80, 150, 70, TQt::AlignCenter, "-- TQt --\nTrolltech AS" ); + <a href="tqcolor.html">TQColor</a> windowColor( 120, 120, 255 ); // a light blue color +<a name="x108"></a> brush.<a href="tqbrush.html#setColor">setColor</a>( windowColor ); // set this brush color + p-><a href="tqpainter.html#setBrush">setBrush</a>( brush ); // set brush +<a name="x116"></a> p-><a href="tqpainter.html#drawRect">drawRect</a>( 80, 80, 250, 70 ); // car window +<a name="x117"></a> p-><a href="tqpainter.html#drawText">drawText</a>( 180, 80, 150, 70, TQt::AlignCenter, "-- TQt --\nTrolltech AS" ); <a href="ntqpixmap.html">TQPixmap</a> pixmap; <a name="x124"></a> if ( pixmap.<a href="ntqpixmap.html#load">load</a>("flag.bmp") ) // load and draw image -<a name="x114"></a> p-><a href="ntqpainter.html#drawPixmap">drawPixmap</a>( 100, 85, pixmap ); +<a name="x114"></a> p-><a href="tqpainter.html#drawPixmap">drawPixmap</a>( 100, 85, pixmap ); -<a name="x119"></a> p-><a href="ntqpainter.html#setBackgroundMode">setBackgroundMode</a>( TQt::OpaqueMode ); // set opaque mode - p-><a href="ntqpainter.html#setBrush">setBrush</a>( TQt::DiagCrossPattern ); // black diagonal cross pattern -<a name="x112"></a> p-><a href="ntqpainter.html#drawEllipse">drawEllipse</a>( 90, 210, 80, 80 ); // back wheel - p-><a href="ntqpainter.html#setBrush">setBrush</a>( TQt::CrossPattern ); // black cross fill pattern - p-><a href="ntqpainter.html#drawEllipse">drawEllipse</a>( 310, 210, 80, 80 ); // front wheel +<a name="x119"></a> p-><a href="tqpainter.html#setBackgroundMode">setBackgroundMode</a>( TQt::OpaqueMode ); // set opaque mode + p-><a href="tqpainter.html#setBrush">setBrush</a>( TQt::DiagCrossPattern ); // black diagonal cross pattern +<a name="x112"></a> p-><a href="tqpainter.html#drawEllipse">drawEllipse</a>( 90, 210, 80, 80 ); // back wheel + p-><a href="tqpainter.html#setBrush">setBrush</a>( TQt::CrossPattern ); // black cross fill pattern + p-><a href="tqpainter.html#drawEllipse">drawEllipse</a>( 310, 210, 80, 80 ); // front wheel } @@ -93,7 +93,7 @@ public: PictureDisplay( const char *fileName ); ~PictureDisplay(); protected: - void paintEvent( <a href="qpaintevent.html">TQPaintEvent</a> * ); + void paintEvent( <a href="tqpaintevent.html">TQPaintEvent</a> * ); void keyPressEvent( <a href="qkeyevent.html">TQKeyEvent</a> * ); private: <a href="ntqpicture.html">TQPicture</a> *pict; @@ -116,13 +116,13 @@ PictureDisplay::~PictureDisplay() delete pict; } -void PictureDisplay::<a href="tqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * ) +void PictureDisplay::<a href="tqwidget.html#paintEvent">paintEvent</a>( <a href="tqpaintevent.html">TQPaintEvent</a> * ) { - <a href="ntqpainter.html">TQPainter</a> paint( this ); // paint widget + <a href="tqpainter.html">TQPainter</a> paint( this ); // paint widget if ( pict ) -<a name="x113"></a> paint.<a href="ntqpainter.html#drawPicture">drawPicture</a>( *pict ); // draw picture +<a name="x113"></a> paint.<a href="tqpainter.html#drawPicture">drawPicture</a>( *pict ); // draw picture else - paint.<a href="ntqpainter.html#drawText">drawText</a>( <a href="tqwidget.html#rect">rect</a>(), AlignCenter, name ); + paint.<a href="tqpainter.html#drawText">drawText</a>( <a href="tqwidget.html#rect">rect</a>(), AlignCenter, name ); } <a name="x127"></a>void PictureDisplay::<a href="tqwidget.html#keyPressEvent">keyPressEvent</a>( <a href="qkeyevent.html">TQKeyEvent</a> *k ) @@ -150,11 +150,11 @@ int main( int argc, char **argv ) if ( !TQFile::exists(fileName) ) { <a href="ntqpicture.html">TQPicture</a> pict; // our picture - <a href="ntqpainter.html">TQPainter</a> paint; // our painter + <a href="tqpainter.html">TQPainter</a> paint; // our painter -<a name="x111"></a> paint.<a href="ntqpainter.html#begin">begin</a>( &pict ); // begin painting onto picture +<a name="x111"></a> paint.<a href="tqpainter.html#begin">begin</a>( &pict ); // begin painting onto picture paintCar( &paint ); // paint! -<a name="x118"></a> paint.<a href="ntqpainter.html#end">end</a>(); // painting done +<a name="x118"></a> paint.<a href="tqpainter.html#end">end</a>(); // painting done <a name="x123"></a> pict.<a href="ntqpicture.html#save">save</a>( fileName ); // save picture <a name="x110"></a> TQMessageBox::<a href="ntqmessagebox.html#information">information</a>(0, "TQt Example - Picture", "Saved. Run me again!"); |