summaryrefslogtreecommitdiffstats
path: root/doc/html/scribble-example.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/scribble-example.html')
-rw-r--r--doc/html/scribble-example.html238
1 files changed, 119 insertions, 119 deletions
diff --git a/doc/html/scribble-example.html b/doc/html/scribble-example.html
index d116a98dc..1b0acd04d 100644
--- a/doc/html/scribble-example.html
+++ b/doc/html/scribble-example.html
@@ -50,13 +50,13 @@ in the canvas with different pens and save the result as picture.
#ifndef SCRIBBLE_H
#define SCRIBBLE_H
-#include &lt;<a href="qmainwindow-h.html">qmainwindow.h</a>&gt;
-#include &lt;<a href="qpen-h.html">qpen.h</a>&gt;
-#include &lt;<a href="qpoint-h.html">qpoint.h</a>&gt;
-#include &lt;<a href="qpixmap-h.html">qpixmap.h</a>&gt;
-#include &lt;<a href="qwidget-h.html">qwidget.h</a>&gt;
-#include &lt;<a href="qstring-h.html">qstring.h</a>&gt;
-#include &lt;<a href="qpointarray-h.html">qpointarray.h</a>&gt;
+#include &lt;<a href="qmainwindow-h.html">ntqmainwindow.h</a>&gt;
+#include &lt;<a href="qpen-h.html">ntqpen.h</a>&gt;
+#include &lt;<a href="qpoint-h.html">ntqpoint.h</a>&gt;
+#include &lt;<a href="qpixmap-h.html">ntqpixmap.h</a>&gt;
+#include &lt;<a href="qwidget-h.html">ntqwidget.h</a>&gt;
+#include &lt;<a href="qstring-h.html">ntqstring.h</a>&gt;
+#include &lt;<a href="qpointarray-h.html">ntqpointarray.h</a>&gt;
class TQMouseEvent;
class TQResizeEvent;
@@ -64,26 +64,26 @@ class TQPaintEvent;
class TQToolButton;
class TQSpinBox;
-class Canvas : public <a href="qwidget.html">TQWidget</a>
+class Canvas : public <a href="ntqwidget.html">TQWidget</a>
{
<a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a>
public:
- Canvas( <a href="qwidget.html">TQWidget</a> *parent = 0, const char *name = 0 );
+ Canvas( <a href="ntqwidget.html">TQWidget</a> *parent = 0, const char *name = 0 );
- void setPenColor( const <a href="qcolor.html">TQColor</a> &amp;c )
-<a name="x903"></a> { pen.<a href="qpen.html#setColor">setColor</a>( c ); }
+ void setPenColor( const <a href="ntqcolor.html">TQColor</a> &amp;c )
+<a name="x903"></a> { pen.<a href="ntqpen.html#setColor">setColor</a>( c ); }
void setPenWidth( int w )
-<a name="x904"></a> { pen.<a href="qpen.html#setWidth">setWidth</a>( w ); }
+<a name="x904"></a> { pen.<a href="ntqpen.html#setWidth">setWidth</a>( w ); }
- <a href="qcolor.html">TQColor</a> penColor()
-<a name="x902"></a> { return pen.<a href="qpen.html#color">color</a>(); }
+ <a href="ntqcolor.html">TQColor</a> penColor()
+<a name="x902"></a> { return pen.<a href="ntqpen.html#color">color</a>(); }
int penWidth()
-<a name="x905"></a> { return pen.<a href="qpen.html#width">width</a>(); }
+<a name="x905"></a> { return pen.<a href="ntqpen.html#width">width</a>(); }
- void save( const <a href="qstring.html">TQString</a> &amp;filename, const <a href="qstring.html">TQString</a> &amp;format );
+ void save( const <a href="ntqstring.html">TQString</a> &amp;filename, const <a href="ntqstring.html">TQString</a> &amp;format );
void clearScreen();
@@ -94,27 +94,27 @@ protected:
void resizeEvent( <a href="qresizeevent.html">TQResizeEvent</a> *e );
void paintEvent( <a href="qpaintevent.html">TQPaintEvent</a> *e );
- <a href="qpen.html">TQPen</a> pen;
- <a href="qpointarray.html">TQPointArray</a> polyline;
+ <a href="ntqpen.html">TQPen</a> pen;
+ <a href="ntqpointarray.html">TQPointArray</a> polyline;
bool mousePressed;
- <a href="qpixmap.html">TQPixmap</a> buffer;
+ <a href="ntqpixmap.html">TQPixmap</a> buffer;
};
-class Scribble : public <a href="qmainwindow.html">TQMainWindow</a>
+class Scribble : public <a href="ntqmainwindow.html">TQMainWindow</a>
{
Q_OBJECT
public:
- Scribble( <a href="qwidget.html">TQWidget</a> *parent = 0, const char *name = 0 );
+ Scribble( <a href="ntqwidget.html">TQWidget</a> *parent = 0, const char *name = 0 );
protected:
Canvas* canvas;
- <a href="qspinbox.html">TQSpinBox</a> *bPWidth;
- <a href="qtoolbutton.html">TQToolButton</a> *bPColor, *bSave, *bClear;
+ <a href="ntqspinbox.html">TQSpinBox</a> *bPWidth;
+ <a href="ntqtoolbutton.html">TQToolButton</a> *bPColor, *bSave, *bClear;
protected slots:
void slotSave();
@@ -141,160 +141,160 @@ protected slots:
#include "scribble.h"
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
-#include &lt;<a href="qevent-h.html">qevent.h</a>&gt;
-#include &lt;<a href="qpainter-h.html">qpainter.h</a>&gt;
-#include &lt;<a href="qtoolbar-h.html">qtoolbar.h</a>&gt;
-#include &lt;<a href="qtoolbutton-h.html">qtoolbutton.h</a>&gt;
-#include &lt;<a href="qspinbox-h.html">qspinbox.h</a>&gt;
-#include &lt;<a href="qtooltip-h.html">qtooltip.h</a>&gt;
-#include &lt;<a href="qrect-h.html">qrect.h</a>&gt;
-#include &lt;<a href="qpoint-h.html">qpoint.h</a>&gt;
-#include &lt;<a href="qcolordialog-h.html">qcolordialog.h</a>&gt;
-#include &lt;<a href="qfiledialog-h.html">qfiledialog.h</a>&gt;
-#include &lt;<a href="qcursor-h.html">qcursor.h</a>&gt;
-#include &lt;<a href="qimage-h.html">qimage.h</a>&gt;
-#include &lt;<a href="qstrlist-h.html">qstrlist.h</a>&gt;
-#include &lt;<a href="qpopupmenu-h.html">qpopupmenu.h</a>&gt;
-#include &lt;<a href="qintdict-h.html">qintdict.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
+#include &lt;<a href="qevent-h.html">ntqevent.h</a>&gt;
+#include &lt;<a href="qpainter-h.html">ntqpainter.h</a>&gt;
+#include &lt;<a href="qtoolbar-h.html">ntqtoolbar.h</a>&gt;
+#include &lt;<a href="qtoolbutton-h.html">ntqtoolbutton.h</a>&gt;
+#include &lt;<a href="qspinbox-h.html">ntqspinbox.h</a>&gt;
+#include &lt;<a href="qtooltip-h.html">ntqtooltip.h</a>&gt;
+#include &lt;<a href="qrect-h.html">ntqrect.h</a>&gt;
+#include &lt;<a href="qpoint-h.html">ntqpoint.h</a>&gt;
+#include &lt;<a href="qcolordialog-h.html">ntqcolordialog.h</a>&gt;
+#include &lt;<a href="qfiledialog-h.html">ntqfiledialog.h</a>&gt;
+#include &lt;<a href="qcursor-h.html">ntqcursor.h</a>&gt;
+#include &lt;<a href="qimage-h.html">ntqimage.h</a>&gt;
+#include &lt;<a href="qstrlist-h.html">ntqstrlist.h</a>&gt;
+#include &lt;<a href="qpopupmenu-h.html">ntqpopupmenu.h</a>&gt;
+#include &lt;<a href="qintdict-h.html">ntqintdict.h</a>&gt;
const bool no_writing = FALSE;
-<a name="f338"></a>Canvas::Canvas( <a href="qwidget.html">TQWidget</a> *parent, const char *name )
- : <a href="qwidget.html">TQWidget</a>( parent, name, WStaticContents ), pen( TQt::red, 3 ), polyline(3),
- mousePressed( FALSE ), buffer( <a href="qwidget.html#width">width</a>(), height() )
+<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="x907"></a><a name="x906"></a> if ((qApp-&gt;<a href="qapplication.html#argc">argc</a>() &gt; 0) &amp;&amp; !buffer.load(qApp-&gt;<a href="qapplication.html#argv">argv</a>()[1]))
- buffer.fill( <a href="qwidget.html#colorGroup">colorGroup</a>().base() );
- <a href="qwidget.html#setBackgroundMode">setBackgroundMode</a>( TQWidget::PaletteBase );
+<a name="x907"></a><a name="x906"></a> if ((qApp-&gt;<a href="ntqapplication.html#argc">argc</a>() &gt; 0) &amp;&amp; !buffer.load(qApp-&gt;<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 );
#ifndef QT_NO_CURSOR
- <a href="qwidget.html#setCursor">setCursor</a>( TQt::crossCursor );
+ <a href="ntqwidget.html#setCursor">setCursor</a>( TQt::crossCursor );
#endif
}
-void <a name="f339"></a>Canvas::save( const <a href="qstring.html">TQString</a> &amp;filename, const <a href="qstring.html">TQString</a> &amp;format )
+void <a name="f339"></a>Canvas::save( const <a href="ntqstring.html">TQString</a> &amp;filename, const <a href="ntqstring.html">TQString</a> &amp;format )
{
if ( !no_writing )
-<a name="x942"></a> buffer.save( filename, format.<a href="qstring.html#upper">upper</a>() );
+<a name="x942"></a> buffer.save( filename, format.<a href="ntqstring.html#upper">upper</a>() );
}
void <a name="f340"></a>Canvas::clearScreen()
{
- buffer.fill( <a href="qwidget.html#colorGroup">colorGroup</a>().base() );
- <a href="qwidget.html#repaint">repaint</a>( FALSE );
+ buffer.fill( <a href="ntqwidget.html#colorGroup">colorGroup</a>().base() );
+ <a href="ntqwidget.html#repaint">repaint</a>( FALSE );
}
-<a name="x949"></a>void Canvas::<a href="qwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
+<a name="x949"></a>void Canvas::<a href="ntqwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
{
mousePressed = TRUE;
polyline[2] = polyline[1] = polyline[0] = e-&gt;<a href="qmouseevent.html#pos">pos</a>();
}
-<a name="x950"></a>void Canvas::<a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> * )
+<a name="x950"></a>void Canvas::<a href="ntqwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> * )
{
mousePressed = FALSE;
}
-<a name="x948"></a>void Canvas::<a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
+<a name="x948"></a>void Canvas::<a href="ntqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
{
if ( mousePressed ) {
- <a href="qpainter.html">TQPainter</a> painter;
- painter.<a href="qpainter.html#begin">begin</a>( &amp;buffer );
- painter.<a href="qpainter.html#setPen">setPen</a>( pen );
+ <a href="ntqpainter.html">TQPainter</a> painter;
+ painter.<a href="ntqpainter.html#begin">begin</a>( &amp;buffer );
+ painter.<a href="ntqpainter.html#setPen">setPen</a>( pen );
polyline[2] = polyline[1];
polyline[1] = polyline[0];
polyline[0] = e-&gt;<a href="qmouseevent.html#pos">pos</a>();
-<a name="x917"></a> painter.<a href="qpainter.html#drawPolyline">drawPolyline</a>( polyline );
-<a name="x918"></a> painter.<a href="qpainter.html#end">end</a>();
+<a name="x917"></a> painter.<a href="ntqpainter.html#drawPolyline">drawPolyline</a>( polyline );
+<a name="x918"></a> painter.<a href="ntqpainter.html#end">end</a>();
- <a href="qrect.html">TQRect</a> r = polyline.boundingRect();
-<a name="x928"></a> r = r.<a href="qrect.html#normalize">normalize</a>();
-<a name="x931"></a><a name="x927"></a> r.<a href="qrect.html#setLeft">setLeft</a>( r.<a href="qrect.html#left">left</a>() - penWidth() );
-<a name="x934"></a><a name="x933"></a> r.<a href="qrect.html#setTop">setTop</a>( r.<a href="qrect.html#top">top</a>() - penWidth() );
-<a name="x932"></a><a name="x929"></a> r.<a href="qrect.html#setRight">setRight</a>( r.<a href="qrect.html#right">right</a>() + penWidth() );
-<a name="x930"></a><a name="x925"></a> r.<a href="qrect.html#setBottom">setBottom</a>( r.<a href="qrect.html#bottom">bottom</a>() + penWidth() );
+ <a href="ntqrect.html">TQRect</a> r = polyline.boundingRect();
+<a name="x928"></a> r = r.<a href="ntqrect.html#normalize">normalize</a>();
+<a name="x931"></a><a name="x927"></a> r.<a href="ntqrect.html#setLeft">setLeft</a>( r.<a href="ntqrect.html#left">left</a>() - penWidth() );
+<a name="x934"></a><a name="x933"></a> r.<a href="ntqrect.html#setTop">setTop</a>( r.<a href="ntqrect.html#top">top</a>() - penWidth() );
+<a name="x932"></a><a name="x929"></a> r.<a href="ntqrect.html#setRight">setRight</a>( r.<a href="ntqrect.html#right">right</a>() + penWidth() );
+<a name="x930"></a><a name="x925"></a> r.<a href="ntqrect.html#setBottom">setBottom</a>( r.<a href="ntqrect.html#bottom">bottom</a>() + penWidth() );
-<a name="x937"></a><a name="x936"></a><a name="x926"></a> <a href="qimage.html#bitBlt">bitBlt</a>( this, r.<a href="qrect.html#x">x</a>(), r.<a href="qrect.html#y">y</a>(), &amp;buffer, r.<a href="qrect.html#x">x</a>(), r.<a href="qrect.html#y">y</a>(), r.<a href="qrect.html#width">width</a>(), r.<a href="qrect.html#height">height</a>() );
+<a name="x937"></a><a name="x936"></a><a name="x926"></a> <a href="ntqimage.html#bitBlt">bitBlt</a>( this, r.<a href="ntqrect.html#x">x</a>(), r.<a href="ntqrect.html#y">y</a>(), &amp;buffer, r.<a href="ntqrect.html#x">x</a>(), r.<a href="ntqrect.html#y">y</a>(), r.<a href="ntqrect.html#width">width</a>(), r.<a href="ntqrect.html#height">height</a>() );
}
}
-<a name="x952"></a>void Canvas::<a href="qwidget.html#resizeEvent">resizeEvent</a>( <a href="qresizeevent.html">TQResizeEvent</a> *e )
+<a name="x952"></a>void Canvas::<a href="ntqwidget.html#resizeEvent">resizeEvent</a>( <a href="qresizeevent.html">TQResizeEvent</a> *e )
{
- TQWidget::<a href="qwidget.html#resizeEvent">resizeEvent</a>( e );
+ TQWidget::<a href="ntqwidget.html#resizeEvent">resizeEvent</a>( e );
- int w = <a href="qwidget.html#width">width</a>() &gt; buffer.width() ?
- <a href="qwidget.html#width">width</a>() : buffer.width();
- int h = <a href="qwidget.html#height">height</a>() &gt; buffer.height() ?
- <a href="qwidget.html#height">height</a>() : buffer.height();
+ int w = <a href="ntqwidget.html#width">width</a>() &gt; buffer.width() ?
+ <a href="ntqwidget.html#width">width</a>() : buffer.width();
+ int h = <a href="ntqwidget.html#height">height</a>() &gt; buffer.height() ?
+ <a href="ntqwidget.html#height">height</a>() : buffer.height();
- <a href="qpixmap.html">TQPixmap</a> tmp( buffer );
+ <a href="ntqpixmap.html">TQPixmap</a> tmp( buffer );
buffer.resize( w, h );
- buffer.fill( <a href="qwidget.html#colorGroup">colorGroup</a>().base() );
-<a name="x922"></a><a name="x921"></a> <a href="qimage.html#bitBlt">bitBlt</a>( &amp;buffer, 0, 0, &amp;tmp, 0, 0, tmp.<a href="qpixmap.html#width">width</a>(), tmp.<a href="qpixmap.html#height">height</a>() );
+ buffer.fill( <a href="ntqwidget.html#colorGroup">colorGroup</a>().base() );
+<a name="x922"></a><a name="x921"></a> <a href="ntqimage.html#bitBlt">bitBlt</a>( &amp;buffer, 0, 0, &amp;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="qwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> *e )
+<a name="x951"></a>void Canvas::<a href="ntqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> *e )
{
- TQWidget::<a href="qwidget.html#paintEvent">paintEvent</a>( e );
+ TQWidget::<a href="ntqwidget.html#paintEvent">paintEvent</a>( e );
-<a name="x920"></a> <a href="qmemarray.html">TQMemArray</a>&lt;TQRect&gt; rects = e-&gt;<a href="qpaintevent.html#region">region</a>().rects();
-<a name="x913"></a> for ( uint i = 0; i &lt; rects.<a href="qmemarray.html#count">count</a>(); i++ ) {
- <a href="qrect.html">TQRect</a> r = rects[(int)i];
- <a href="qimage.html#bitBlt">bitBlt</a>( this, r.<a href="qrect.html#x">x</a>(), r.<a href="qrect.html#y">y</a>(), &amp;buffer, r.<a href="qrect.html#x">x</a>(), r.<a href="qrect.html#y">y</a>(), r.<a href="qrect.html#width">width</a>(), r.<a href="qrect.html#height">height</a>() );
+<a name="x920"></a> <a href="ntqmemarray.html">TQMemArray</a>&lt;TQRect&gt; rects = e-&gt;<a href="qpaintevent.html#region">region</a>().rects();
+<a name="x913"></a> for ( uint i = 0; i &lt; rects.<a href="ntqmemarray.html#count">count</a>(); i++ ) {
+ <a href="ntqrect.html">TQRect</a> r = rects[(int)i];
+ <a href="ntqimage.html#bitBlt">bitBlt</a>( this, r.<a href="ntqrect.html#x">x</a>(), r.<a href="ntqrect.html#y">y</a>(), &amp;buffer, r.<a href="ntqrect.html#x">x</a>(), r.<a href="ntqrect.html#y">y</a>(), r.<a href="ntqrect.html#width">width</a>(), r.<a href="ntqrect.html#height">height</a>() );
}
}
//------------------------------------------------------
-<a name="f341"></a>Scribble::Scribble( <a href="qwidget.html">TQWidget</a> *parent, const char *name )
- : <a href="qmainwindow.html">TQMainWindow</a>( parent, name )
+<a name="f341"></a>Scribble::Scribble( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name )
+ : <a href="ntqmainwindow.html">TQMainWindow</a>( parent, name )
{
canvas = new Canvas( this );
- <a href="qmainwindow.html#setCentralWidget">setCentralWidget</a>( canvas );
+ <a href="ntqmainwindow.html#setCentralWidget">setCentralWidget</a>( canvas );
- <a href="qtoolbar.html">TQToolBar</a> *tools = new <a href="qtoolbar.html">TQToolBar</a>( this );
+ <a href="ntqtoolbar.html">TQToolBar</a> *tools = new <a href="ntqtoolbar.html">TQToolBar</a>( this );
- bSave = new <a href="qtoolbutton.html">TQToolButton</a>( TQPixmap(), "Save", "Save as PNG image", this, SLOT( slotSave() ), tools );
-<a name="x944"></a> bSave-&gt;<a href="qbutton.html#setText">setText</a>( "Save as..." );
+ bSave = new <a href="ntqtoolbutton.html">TQToolButton</a>( TQPixmap(), "Save", "Save as PNG image", this, SLOT( slotSave() ), tools );
+<a name="x944"></a> bSave-&gt;<a href="ntqbutton.html#setText">setText</a>( "Save as..." );
-<a name="x943"></a> tools-&gt;<a href="qtoolbar.html#addSeparator">addSeparator</a>();
+<a name="x943"></a> tools-&gt;<a href="ntqtoolbar.html#addSeparator">addSeparator</a>();
- bPColor = new <a href="qtoolbutton.html">TQToolButton</a>( TQPixmap(), "Choose Pen Color", "Choose Pen Color", this, SLOT( slotColor() ), tools );
- bPColor-&gt;<a href="qbutton.html#setText">setText</a>( "Choose Pen Color..." );
+ bPColor = new <a href="ntqtoolbutton.html">TQToolButton</a>( TQPixmap(), "Choose Pen Color", "Choose Pen Color", this, SLOT( slotColor() ), tools );
+ bPColor-&gt;<a href="ntqbutton.html#setText">setText</a>( "Choose Pen Color..." );
- tools-&gt;<a href="qtoolbar.html#addSeparator">addSeparator</a>();
+ tools-&gt;<a href="ntqtoolbar.html#addSeparator">addSeparator</a>();
- bPWidth = new <a href="qspinbox.html">TQSpinBox</a>( 1, 20, 1, tools );
-<a name="x945"></a> TQToolTip::<a href="qtooltip.html#add">add</a>( bPWidth, "Choose Pen Width" );
-<a name="x939"></a> <a href="qobject.html#connect">connect</a>( bPWidth, SIGNAL( <a href="qspinbox.html#valueChanged">valueChanged</a>( int ) ), this, SLOT( slotWidth( int ) ) );
-<a name="x938"></a> bPWidth-&gt;<a href="qspinbox.html#setValue">setValue</a>( 3 );
+ bPWidth = new <a href="ntqspinbox.html">TQSpinBox</a>( 1, 20, 1, tools );
+<a name="x945"></a> TQToolTip::<a href="ntqtooltip.html#add">add</a>( bPWidth, "Choose Pen Width" );
+<a name="x939"></a> <a href="ntqobject.html#connect">connect</a>( bPWidth, SIGNAL( <a href="ntqspinbox.html#valueChanged">valueChanged</a>( int ) ), this, SLOT( slotWidth( int ) ) );
+<a name="x938"></a> bPWidth-&gt;<a href="ntqspinbox.html#setValue">setValue</a>( 3 );
- tools-&gt;<a href="qtoolbar.html#addSeparator">addSeparator</a>();
+ tools-&gt;<a href="ntqtoolbar.html#addSeparator">addSeparator</a>();
- bClear = new <a href="qtoolbutton.html">TQToolButton</a>( TQPixmap(), "Clear Screen", "Clear Screen", this, SLOT( slotClear() ), tools );
- bClear-&gt;<a href="qbutton.html#setText">setText</a>( "Clear Screen" );
+ bClear = new <a href="ntqtoolbutton.html">TQToolButton</a>( TQPixmap(), "Clear Screen", "Clear Screen", this, SLOT( slotClear() ), tools );
+ bClear-&gt;<a href="ntqbutton.html#setText">setText</a>( "Clear Screen" );
}
void <a name="f342"></a>Scribble::slotSave()
{
- <a href="qpopupmenu.html">TQPopupMenu</a> *menu = new <a href="qpopupmenu.html">TQPopupMenu</a>( 0 );
- <a href="qintdict.html">TQIntDict</a>&lt;TQString&gt; formats;
-<a name="x924"></a> formats.<a href="qptrcollection.html#setAutoDelete">setAutoDelete</a>( TRUE );
+ <a href="ntqpopupmenu.html">TQPopupMenu</a> *menu = new <a href="ntqpopupmenu.html">TQPopupMenu</a>( 0 );
+ <a href="ntqintdict.html">TQIntDict</a>&lt;TQString&gt; formats;
+<a name="x924"></a> formats.<a href="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>( TRUE );
for ( unsigned int i = 0; i &lt; TQImageIO::<a href="qimageio.html#outputFormats">outputFormats</a>().count(); i++ ) {
-<a name="x911"></a> <a href="qstring.html">TQString</a> str = TQString( TQImageIO::<a href="qimageio.html#outputFormats">outputFormats</a>().at( i ) );
-<a name="x912"></a> formats.<a href="qintdict.html#insert">insert</a>( menu-&gt;<a href="qmenudata.html#insertItem">insertItem</a>( TQString( "%1..." ).arg( str ) ), new <a href="qstring.html">TQString</a>( str ) );
+<a name="x911"></a> <a href="ntqstring.html">TQString</a> str = TQString( TQImageIO::<a href="qimageio.html#outputFormats">outputFormats</a>().at( i ) );
+<a name="x912"></a> formats.<a href="ntqintdict.html#insert">insert</a>( menu-&gt;<a href="ntqmenudata.html#insertItem">insertItem</a>( TQString( "%1..." ).arg( str ) ), new <a href="ntqstring.html">TQString</a>( str ) );
}
-<a name="x953"></a> menu-&gt;<a href="qwidget.html#setMouseTracking">setMouseTracking</a>( TRUE );
-<a name="x947"></a><a name="x946"></a><a name="x923"></a> int id = menu-&gt;<a href="qpopupmenu.html#exec">exec</a>( bSave-&gt;<a href="qwidget.html#mapToGlobal">mapToGlobal</a>( TQPoint( 0, bSave-&gt;<a href="qwidget.html#height">height</a>() + 1 ) ) );
+<a name="x953"></a> menu-&gt;<a href="ntqwidget.html#setMouseTracking">setMouseTracking</a>( TRUE );
+<a name="x947"></a><a name="x946"></a><a name="x923"></a> int id = menu-&gt;<a href="ntqpopupmenu.html#exec">exec</a>( bSave-&gt;<a href="ntqwidget.html#mapToGlobal">mapToGlobal</a>( TQPoint( 0, bSave-&gt;<a href="ntqwidget.html#height">height</a>() + 1 ) ) );
if ( id != -1 ) {
- <a href="qstring.html">TQString</a> format = *formats[ id ];
+ <a href="ntqstring.html">TQString</a> format = *formats[ id ];
-<a name="x941"></a> <a href="qstring.html">TQString</a> filename = TQFileDialog::<a href="qfiledialog.html#getSaveFileName">getSaveFileName</a>( <a href="qstring.html#TQString-null">TQString::null</a>, TQString( "*.%1" ).arg( format.<a href="qstring.html#lower">lower</a>() ), this );
- if ( !filename.<a href="qstring.html#isEmpty">isEmpty</a>() )
+<a name="x941"></a> <a href="ntqstring.html">TQString</a> filename = TQFileDialog::<a href="ntqfiledialog.html#getSaveFileName">getSaveFileName</a>( <a href="ntqstring.html#TQString-null">TQString::null</a>, TQString( "*.%1" ).arg( format.<a href="ntqstring.html#lower">lower</a>() ), this );
+ if ( !filename.<a href="ntqstring.html#isEmpty">isEmpty</a>() )
canvas-&gt;save( filename, format );
}
@@ -303,8 +303,8 @@ void <a name="f342"></a>Scribble::slotSave()
void <a name="f343"></a>Scribble::slotColor()
{
-<a name="x909"></a> <a href="qcolor.html">TQColor</a> c = TQColorDialog::<a href="qcolordialog.html#getColor">getColor</a>( canvas-&gt;penColor(), this );
-<a name="x908"></a> if ( c.<a href="qcolor.html#isValid">isValid</a>() )
+<a name="x909"></a> <a href="ntqcolor.html">TQColor</a> c = TQColorDialog::<a href="ntqcolordialog.html#getColor">getColor</a>( canvas-&gt;penColor(), this );
+<a name="x908"></a> if ( c.<a href="ntqcolor.html#isValid">isValid</a>() )
canvas-&gt;setPenColor( c );
}
@@ -332,24 +332,24 @@ void <a name="f345"></a>Scribble::slotClear()
*****************************************************************************/
#include "scribble.h"
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
int main( int argc, char **argv )
{
- <a href="qapplication.html">TQApplication</a> a( argc, argv );
+ <a href="ntqapplication.html">TQApplication</a> a( argc, argv );
Scribble scribble;
- scribble.<a href="qwidget.html#resize">resize</a>( 500, 350 );
- scribble.<a href="qwidget.html#setCaption">setCaption</a>("TQt Example - Scribble");
- a.<a href="qapplication.html#setMainWidget">setMainWidget</a>( &amp;scribble );
-<a name="x954"></a> if ( TQApplication::<a href="qapplication.html#desktop">desktop</a>()-&gt;width() &gt; 550
- &amp;&amp; TQApplication::<a href="qapplication.html#desktop">desktop</a>()-&gt;height() &gt; 366 )
- scribble.<a href="qwidget.html#show">show</a>();
+ scribble.<a href="ntqwidget.html#resize">resize</a>( 500, 350 );
+ scribble.<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - Scribble");
+ a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( &amp;scribble );
+<a name="x954"></a> if ( TQApplication::<a href="ntqapplication.html#desktop">desktop</a>()-&gt;width() &gt; 550
+ &amp;&amp; TQApplication::<a href="ntqapplication.html#desktop">desktop</a>()-&gt;height() &gt; 366 )
+ scribble.<a href="ntqwidget.html#show">show</a>();
else
-<a name="x960"></a> scribble.<a href="qwidget.html#showMaximized">showMaximized</a>();
- return a.<a href="qapplication.html#exec">exec</a>();
+<a name="x960"></a> scribble.<a href="ntqwidget.html#showMaximized">showMaximized</a>();
+ return a.<a href="ntqapplication.html#exec">exec</a>();
}
</pre>