diff options
author | Michele Calgaro <[email protected]> | 2024-06-02 23:07:22 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-06-02 23:22:42 +0900 |
commit | 8ac0e970e4464d9f8f73c0fb34a178ff135be8c3 (patch) | |
tree | b95884617b9a37accc843676d5d42be4116a3f54 /doc/html/scribble-example.html | |
parent | 68b81013e8668f50fc18b7e26a520ec93a7a1251 (diff) | |
download | tqt3-8ac0e970e4464d9f8f73c0fb34a178ff135be8c3.tar.gz tqt3-8ac0e970e4464d9f8f73c0fb34a178ff135be8c3.zip |
Rename ntqwidget* related files to equivalent tqwidget*
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'doc/html/scribble-example.html')
-rw-r--r-- | doc/html/scribble-example.html | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/doc/html/scribble-example.html b/doc/html/scribble-example.html index a33542cf1..5c60e2591 100644 --- a/doc/html/scribble-example.html +++ b/doc/html/scribble-example.html @@ -54,7 +54,7 @@ in the canvas with different pens and save the result as picture. #include <<a href="qpen-h.html">ntqpen.h</a>> #include <<a href="qpoint-h.html">ntqpoint.h</a>> #include <<a href="qpixmap-h.html">ntqpixmap.h</a>> -#include <<a href="qwidget-h.html">ntqwidget.h</a>> +#include <<a href="tqwidget-h.html">tqwidget.h</a>> #include <<a href="qstring-h.html">ntqstring.h</a>> #include <<a href="qpointarray-h.html">ntqpointarray.h</a>> @@ -64,12 +64,12 @@ class TQPaintEvent; class TQToolButton; class TQSpinBox; -class Canvas : public <a href="ntqwidget.html">TQWidget</a> +class Canvas : public <a href="tqwidget.html">TQWidget</a> { <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> public: - Canvas( <a href="ntqwidget.html">TQWidget</a> *parent = 0, const char *name = 0 ); + Canvas( <a href="tqwidget.html">TQWidget</a> *parent = 0, const char *name = 0 ); void setPenColor( const <a href="ntqcolor.html">TQColor</a> &c ) <a name="x903"></a> { pen.<a href="ntqpen.html#setColor">setColor</a>( c ); } @@ -108,7 +108,7 @@ class Scribble : public <a href="ntqmainwindow.html">TQMainWindow</a> TQ_OBJECT public: - Scribble( <a href="ntqwidget.html">TQWidget</a> *parent = 0, const char *name = 0 ); + Scribble( <a href="tqwidget.html">TQWidget</a> *parent = 0, const char *name = 0 ); protected: Canvas* canvas; @@ -160,16 +160,16 @@ protected slots: const bool no_writing = FALSE; -<a name="f338"></a>Canvas::Canvas( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name ) - : <a href="ntqwidget.html">TQWidget</a>( parent, name, WStaticContents ), pen( TQt::red, 3 ), polyline(3), - mousePressed( FALSE ), buffer( <a href="ntqwidget.html#width">width</a>(), height() ) +<a name="f338"></a>Canvas::Canvas( <a href="tqwidget.html">TQWidget</a> *parent, const char *name ) + : <a href="tqwidget.html">TQWidget</a>( parent, name, WStaticContents ), pen( TQt::red, 3 ), polyline(3), + mousePressed( FALSE ), buffer( <a href="tqwidget.html#width">width</a>(), height() ) { <a name="x907"></a><a name="x906"></a> if ((tqApp-><a href="ntqapplication.html#argc">argc</a>() > 0) && !buffer.load(tqApp-><a href="ntqapplication.html#argv">argv</a>()[1])) - buffer.fill( <a href="ntqwidget.html#colorGroup">colorGroup</a>().base() ); - <a href="ntqwidget.html#setBackgroundMode">setBackgroundMode</a>( TQWidget::PaletteBase ); + buffer.fill( <a href="tqwidget.html#colorGroup">colorGroup</a>().base() ); + <a href="tqwidget.html#setBackgroundMode">setBackgroundMode</a>( TQWidget::PaletteBase ); #ifndef TQT_NO_CURSOR - <a href="ntqwidget.html#setCursor">setCursor</a>( TQt::crossCursor ); + <a href="tqwidget.html#setCursor">setCursor</a>( TQt::crossCursor ); #endif } @@ -181,22 +181,22 @@ void <a name="f339"></a>Canvas::save( const <a href="ntqstring.html">TQString</a void <a name="f340"></a>Canvas::clearScreen() { - buffer.fill( <a href="ntqwidget.html#colorGroup">colorGroup</a>().base() ); - <a href="ntqwidget.html#repaint">repaint</a>( FALSE ); + buffer.fill( <a href="tqwidget.html#colorGroup">colorGroup</a>().base() ); + <a href="tqwidget.html#repaint">repaint</a>( FALSE ); } -<a name="x949"></a>void Canvas::<a href="ntqwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) +<a name="x949"></a>void Canvas::<a href="tqwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) { mousePressed = TRUE; polyline[2] = polyline[1] = polyline[0] = e-><a href="qmouseevent.html#pos">pos</a>(); } -<a name="x950"></a>void Canvas::<a href="ntqwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> * ) +<a name="x950"></a>void Canvas::<a href="tqwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> * ) { mousePressed = FALSE; } -<a name="x948"></a>void Canvas::<a href="ntqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) +<a name="x948"></a>void Canvas::<a href="tqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) { if ( mousePressed ) { <a href="ntqpainter.html">TQPainter</a> painter; @@ -219,24 +219,24 @@ void <a name="f340"></a>Canvas::clearScreen() } } -<a name="x952"></a>void Canvas::<a href="ntqwidget.html#resizeEvent">resizeEvent</a>( <a href="qresizeevent.html">TQResizeEvent</a> *e ) +<a name="x952"></a>void Canvas::<a href="tqwidget.html#resizeEvent">resizeEvent</a>( <a href="qresizeevent.html">TQResizeEvent</a> *e ) { - TQWidget::<a href="ntqwidget.html#resizeEvent">resizeEvent</a>( e ); + TQWidget::<a href="tqwidget.html#resizeEvent">resizeEvent</a>( e ); - int w = <a href="ntqwidget.html#width">width</a>() > buffer.width() ? - <a href="ntqwidget.html#width">width</a>() : buffer.width(); - int h = <a href="ntqwidget.html#height">height</a>() > buffer.height() ? - <a href="ntqwidget.html#height">height</a>() : buffer.height(); + int w = <a href="tqwidget.html#width">width</a>() > buffer.width() ? + <a href="tqwidget.html#width">width</a>() : buffer.width(); + int h = <a href="tqwidget.html#height">height</a>() > buffer.height() ? + <a href="tqwidget.html#height">height</a>() : buffer.height(); <a href="ntqpixmap.html">TQPixmap</a> tmp( buffer ); buffer.resize( w, h ); - buffer.fill( <a href="ntqwidget.html#colorGroup">colorGroup</a>().base() ); + buffer.fill( <a href="tqwidget.html#colorGroup">colorGroup</a>().base() ); <a name="x922"></a><a name="x921"></a> <a href="ntqimage.html#bitBlt">bitBlt</a>( &buffer, 0, 0, &tmp, 0, 0, tmp.<a href="ntqpixmap.html#width">width</a>(), tmp.<a href="ntqpixmap.html#height">height</a>() ); } -<a name="x951"></a>void Canvas::<a href="ntqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> *e ) +<a name="x951"></a>void Canvas::<a href="tqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> *e ) { - TQWidget::<a href="ntqwidget.html#paintEvent">paintEvent</a>( e ); + TQWidget::<a href="tqwidget.html#paintEvent">paintEvent</a>( e ); <a name="x920"></a> <a href="ntqmemarray.html">TQMemArray</a><TQRect> rects = e-><a href="qpaintevent.html#region">region</a>().rects(); <a name="x913"></a> for ( uint i = 0; i < rects.<a href="ntqmemarray.html#count">count</a>(); i++ ) { @@ -247,7 +247,7 @@ void <a name="f340"></a>Canvas::clearScreen() //------------------------------------------------------ -<a name="f341"></a>Scribble::Scribble( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name ) +<a name="f341"></a>Scribble::Scribble( <a href="tqwidget.html">TQWidget</a> *parent, const char *name ) : <a href="ntqmainwindow.html">TQMainWindow</a>( parent, name ) { canvas = new Canvas( this ); @@ -287,8 +287,8 @@ void <a name="f342"></a>Scribble::slotSave() <a name="x912"></a> formats.<a href="ntqintdict.html#insert">insert</a>( menu-><a href="ntqmenudata.html#insertItem">insertItem</a>( TQString( "%1..." ).arg( str ) ), new <a href="ntqstring.html">TQString</a>( str ) ); } -<a name="x953"></a> menu-><a href="ntqwidget.html#setMouseTracking">setMouseTracking</a>( TRUE ); -<a name="x947"></a><a name="x946"></a><a name="x923"></a> int id = menu-><a href="ntqpopupmenu.html#exec">exec</a>( bSave-><a href="ntqwidget.html#mapToGlobal">mapToGlobal</a>( TQPoint( 0, bSave-><a href="ntqwidget.html#height">height</a>() + 1 ) ) ); +<a name="x953"></a> menu-><a href="tqwidget.html#setMouseTracking">setMouseTracking</a>( TRUE ); +<a name="x947"></a><a name="x946"></a><a name="x923"></a> int id = menu-><a href="ntqpopupmenu.html#exec">exec</a>( bSave-><a href="tqwidget.html#mapToGlobal">mapToGlobal</a>( TQPoint( 0, bSave-><a href="tqwidget.html#height">height</a>() + 1 ) ) ); if ( id != -1 ) { <a href="ntqstring.html">TQString</a> format = *formats[ id ]; @@ -341,14 +341,14 @@ int main( int argc, char **argv ) Scribble scribble; - scribble.<a href="ntqwidget.html#resize">resize</a>( 500, 350 ); - scribble.<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - Scribble"); + scribble.<a href="tqwidget.html#resize">resize</a>( 500, 350 ); + scribble.<a href="tqwidget.html#setCaption">setCaption</a>("TQt Example - Scribble"); a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( &scribble ); <a name="x954"></a> if ( TQApplication::<a href="ntqapplication.html#desktop">desktop</a>()->width() > 550 && TQApplication::<a href="ntqapplication.html#desktop">desktop</a>()->height() > 366 ) - scribble.<a href="ntqwidget.html#show">show</a>(); + scribble.<a href="tqwidget.html#show">show</a>(); else -<a name="x960"></a> scribble.<a href="ntqwidget.html#showMaximized">showMaximized</a>(); +<a name="x960"></a> scribble.<a href="tqwidget.html#showMaximized">showMaximized</a>(); return a.<a href="ntqapplication.html#exec">exec</a>(); } </pre> |