diff options
Diffstat (limited to 'doc/html/desktop-example.html')
-rw-r--r-- | doc/html/desktop-example.html | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/doc/html/desktop-example.html b/doc/html/desktop-example.html index 64ccac086..11d07cc15 100644 --- a/doc/html/desktop-example.html +++ b/doc/html/desktop-example.html @@ -94,17 +94,17 @@ void poly() static int yvel[maxpoints]; int head = 0; int tail = -maxcurves + 2; - <a href="ntqpointarray.html">TQPointArray</a> *a = new <a href="ntqpointarray.html">TQPointArray</a>[ maxcurves ]; + <a href="tqpointarray.html">TQPointArray</a> *a = new <a href="tqpointarray.html">TQPointArray</a>[ maxcurves ]; TQPointArray *p; -<a name="x1760"></a> <a href="ntqrect.html">TQRect</a> r = d-><a href="tqwidget.html#rect">rect</a>(); // desktop rectangle +<a name="x1760"></a> <a href="tqrect.html">TQRect</a> r = d-><a href="tqwidget.html#rect">rect</a>(); // desktop rectangle int i; for ( i=0; i<maxcurves; i++ ) a[i].resize( maxpoints ); p = &a[0]; for ( i=0; i<maxpoints; i++ ) { // setup first polygon points -<a name="x1756"></a> p->setPoint( i, (kindaRand()&0x7fff) % r.<a href="ntqrect.html#width">width</a>(), -<a name="x1749"></a> (kindaRand()&0x7fff) % r.<a href="ntqrect.html#height">height</a>() ); +<a name="x1756"></a> p->setPoint( i, (kindaRand()&0x7fff) % r.<a href="tqrect.html#width">width</a>(), +<a name="x1749"></a> (kindaRand()&0x7fff) % r.<a href="tqrect.html#height">height</a>() ); xvel[i] = velocity(i); yvel[i] = velocity(i); } @@ -118,8 +118,8 @@ void poly() if ( ++tail >= maxcurves ) tail = 0; -<a name="x1751"></a><a name="x1750"></a> int minx=r.<a href="ntqrect.html#left">left</a>(), maxx=r.<a href="ntqrect.html#right">right</a>(); -<a name="x1755"></a><a name="x1748"></a> int miny=r.<a href="ntqrect.html#top">top</a>(), maxy=r.<a href="ntqrect.html#bottom">bottom</a>(); +<a name="x1751"></a><a name="x1750"></a> int minx=r.<a href="tqrect.html#left">left</a>(), maxx=r.<a href="tqrect.html#right">right</a>(); +<a name="x1755"></a><a name="x1748"></a> int miny=r.<a href="tqrect.html#top">top</a>(), maxy=r.<a href="tqrect.html#bottom">bottom</a>(); int x, y; p = &a[head]; if ( ++head >= maxcurves ) @@ -170,16 +170,16 @@ void rotate() *p++ = (x+y)%128; } - <a href="ntqpixmap.html">TQPixmap</a> pm; + <a href="tqpixmap.html">TQPixmap</a> pm; pm = image; // convert image to pixmap -<a name="x1745"></a> pm.<a href="ntqpixmap.html#setOptimization">setOptimization</a>( TQPixmap::BestOptim ); // rotation will be faster +<a name="x1745"></a> pm.<a href="tqpixmap.html#setOptimization">setOptimization</a>( TQPixmap::BestOptim ); // rotation will be faster <a href="tqwidget.html">TQWidget</a> *d = TQApplication::<a href="ntqapplication.html#desktop">desktop</a>(); // w = desktop widget for ( i=0; i<=360; i += 2 ) { - <a href="ntqwmatrix.html">TQWMatrix</a> m; -<a name="x1764"></a> m.<a href="ntqwmatrix.html#rotate">rotate</a>( i ); // rotate coordinate system -<a name="x1747"></a> <a href="ntqpixmap.html">TQPixmap</a> rpm = pm.<a href="ntqpixmap.html#xForm">xForm</a>( m ); // rpm = rotated pixmap + <a href="tqwmatrix.html">TQWMatrix</a> m; +<a name="x1764"></a> m.<a href="tqwmatrix.html#rotate">rotate</a>( i ); // rotate coordinate system +<a name="x1747"></a> <a href="tqpixmap.html">TQPixmap</a> rpm = pm.<a href="tqpixmap.html#xForm">xForm</a>( m ); // rpm = rotated pixmap <a name="x1762"></a> d-><a href="tqwidget.html#setBackgroundPixmap">setBackgroundPixmap</a>( rpm ); // set desktop pixmap <a name="x1763"></a> d-><a href="tqwidget.html#update">update</a>(); // repaint desktop } @@ -189,17 +189,17 @@ void rotate() // Generates a marble-like pattern in pm. // -void generateStone( <a href="ntqpixmap.html">TQPixmap</a> *pm, +void generateStone( <a href="tqpixmap.html">TQPixmap</a> *pm, const <a href="tqcolor.html">TQColor</a> &c1, const <a href="tqcolor.html">TQColor</a> &c2, const <a href="tqcolor.html">TQColor</a> &c3 ) { <a href="tqpainter.html">TQPainter</a> p; - <a href="ntqpen.html">TQPen</a> p1 ( c1, 0 ); - <a href="ntqpen.html">TQPen</a> p2 ( c2, 0 ); - <a href="ntqpen.html">TQPen</a> p3 ( c3, 0 ); + <a href="tqpen.html">TQPen</a> p1 ( c1, 0 ); + <a href="tqpen.html">TQPen</a> p2 ( c2, 0 ); + <a href="tqpen.html">TQPen</a> p3 ( c3, 0 ); p.<a href="tqpainter.html#begin">begin</a>( pm ); -<a name="x1746"></a> for( int i = 0 ; i < pm-><a href="ntqpixmap.html#width">width</a>() ; i++ ) -<a name="x1743"></a> for( int j = 0 ; j < pm-><a href="ntqpixmap.html#height">height</a>() ; j++ ) { +<a name="x1746"></a> for( int i = 0 ; i < pm-><a href="tqpixmap.html#width">width</a>() ; i++ ) +<a name="x1743"></a> for( int j = 0 ; j < pm-><a href="tqpixmap.html#height">height</a>() ; j++ ) { int r = kindaRand(); if ( r < KINDA_RAND_MAX / 3 ) <a name="x1741"></a> p.<a href="tqpainter.html#setPen">setPen</a>( p1 ); @@ -251,7 +251,7 @@ public: void dropEvent( <a href="tqdropevent.html">TQDropEvent</a> * e ) { - <a href="ntqpixmap.html">TQPixmap</a> pmp; + <a href="tqpixmap.html">TQPixmap</a> pmp; <a name="x1732"></a> if ( TQImageDrag::<a href="tqimagedrag.html#decode">decode</a>( e, pmp ) ) { <a href="tqwidget.html#setBackgroundPixmap">setBackgroundPixmap</a>( pmp ); <a href="tqwidget.html#update">update</a>(); @@ -259,7 +259,7 @@ public: } private: - <a href="ntqpixmap.html">TQPixmap</a> *pm; + <a href="tqpixmap.html">TQPixmap</a> *pm; <a href="tqstring.html">TQString</a> text; }; @@ -282,19 +282,19 @@ void DesktopWidget::<a href="tqwidget.html#paintEvent">paintEvent</a>( <a href=" <a name="x1726"></a> <a href="tqcolor.html">TQColor</a> c2 = c1.<a href="tqcolor.html#light">light</a>(104); <a name="x1725"></a> <a href="tqcolor.html">TQColor</a> c3 = c1.<a href="tqcolor.html#dark">dark</a>(106); if ( !pm ) { - pm = new <a href="ntqpixmap.html">TQPixmap</a>( 64, 64 ); + pm = new <a href="tqpixmap.html">TQPixmap</a>( 64, 64 ); generateStone( pm, c1, c2, c3 ); <a href="tqwidget.html#setBackgroundPixmap">setBackgroundPixmap</a>( *pm ); <a href="tqwidget.html#update">update</a>(); } - <a href="ntqrect.html">TQRect</a> br = <a href="tqwidget.html#fontMetrics">fontMetrics</a>().boundingRect( text ); - <a href="ntqpixmap.html">TQPixmap</a> offscreen( br.<a href="ntqrect.html#width">width</a>(), br.<a href="ntqrect.html#height">height</a>() ); - int x = <a href="tqwidget.html#width">width</a>()/2 - br.<a href="ntqrect.html#width">width</a>()/2; - int y = <a href="tqwidget.html#height">height</a>()/2 - br.<a href="ntqrect.html#height">height</a>()/2; -<a name="x1742"></a> offscreen.<a href="ntqpixmap.html#fill">fill</a>( this, x, y ); + <a href="tqrect.html">TQRect</a> br = <a href="tqwidget.html#fontMetrics">fontMetrics</a>().boundingRect( text ); + <a href="tqpixmap.html">TQPixmap</a> offscreen( br.<a href="tqrect.html#width">width</a>(), br.<a href="tqrect.html#height">height</a>() ); + int x = <a href="tqwidget.html#width">width</a>()/2 - br.<a href="tqrect.html#width">width</a>()/2; + int y = <a href="tqwidget.html#height">height</a>()/2 - br.<a href="tqrect.html#height">height</a>()/2; +<a name="x1742"></a> offscreen.<a href="tqpixmap.html#fill">fill</a>( this, x, y ); <a href="tqpainter.html">TQPainter</a> p; p.<a href="tqpainter.html#begin">begin</a>( &offscreen ); -<a name="x1758"></a><a name="x1757"></a> drawShadeText( &p, -br.<a href="ntqrect.html#x">x</a>(), -br.<a href="ntqrect.html#y">y</a>(), text, c2, c3, 3 ); +<a name="x1758"></a><a name="x1757"></a> drawShadeText( &p, -br.<a href="tqrect.html#x">x</a>(), -br.<a href="tqrect.html#y">y</a>(), text, c2, c3, 3 ); p.<a href="tqpainter.html#end">end</a>(); <a href="tqimage.html#bitBlt">bitBlt</a>( this, x, y, &offscreen ); } @@ -315,24 +315,24 @@ void desktopText( const char *s = "Trolltech" ) <a href="tqcolor.html">TQColor</a> c2 = c1.<a href="tqcolor.html#light">light</a>(104); <a href="tqcolor.html">TQColor</a> c3 = c1.<a href="tqcolor.html#dark">dark</a>(106); - <a href="ntqpixmap.html">TQPixmap</a> pm(10,10); + <a href="tqpixmap.html">TQPixmap</a> pm(10,10); <a href="tqpainter.html">TQPainter</a> p; p.<a href="tqpainter.html#begin">begin</a>( &pm ); -<a name="x1738"></a> <a href="ntqrect.html">TQRect</a> r = p.<a href="tqpainter.html#fontMetrics">fontMetrics</a>().boundingRect( s ); +<a name="x1738"></a> <a href="tqrect.html">TQRect</a> r = p.<a href="tqpainter.html#fontMetrics">fontMetrics</a>().boundingRect( s ); p.<a href="tqpainter.html#end">end</a>(); int appWidth = tqApp-><a href="ntqapplication.html#desktop">desktop</a>()->width(); int appHeight = tqApp-><a href="ntqapplication.html#desktop">desktop</a>()->height(); - if ( r.<a href="ntqrect.html#width">width</a>() > appWidth - border*2 ) -<a name="x1753"></a> r.<a href="ntqrect.html#setWidth">setWidth</a>( appWidth - border*2 ); - if ( r.<a href="ntqrect.html#height">height</a>() > appHeight - border*2 ) -<a name="x1752"></a> r.<a href="ntqrect.html#setHeight">setHeight</a>( appHeight - border*2 ); + if ( r.<a href="tqrect.html#width">width</a>() > appWidth - border*2 ) +<a name="x1753"></a> r.<a href="tqrect.html#setWidth">setWidth</a>( appWidth - border*2 ); + if ( r.<a href="tqrect.html#height">height</a>() > appHeight - border*2 ) +<a name="x1752"></a> r.<a href="tqrect.html#setHeight">setHeight</a>( appHeight - border*2 ); -<a name="x1754"></a><a name="x1744"></a> pm.<a href="ntqpixmap.html#resize">resize</a>( r.<a href="ntqrect.html#size">size</a>() + TQSize( border*2, border*2 ) ); +<a name="x1754"></a><a name="x1744"></a> pm.<a href="tqpixmap.html#resize">resize</a>( r.<a href="tqrect.html#size">size</a>() + TQSize( border*2, border*2 ) ); generateStone( &pm, c1, c2, c3 ); p.<a href="tqpainter.html#begin">begin</a>( &pm ); - drawShadeText( &p, -r.<a href="ntqrect.html#x">x</a>() + border, -r.<a href="ntqrect.html#y">y</a>() + border, s, c2, c3 ); + drawShadeText( &p, -r.<a href="tqrect.html#x">x</a>() + border, -r.<a href="tqrect.html#y">y</a>() + border, s, c2, c3 ); p.<a href="tqpainter.html#end">end</a>(); tqApp-><a href="ntqapplication.html#desktop">desktop</a>()->setBackgroundPixmap( pm ); |