diff options
Diffstat (limited to 'doc/html/qmag-example.html')
-rw-r--r-- | doc/html/qmag-example.html | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/doc/html/qmag-example.html b/doc/html/qmag-example.html index d2e3e52e9..5debea21f 100644 --- a/doc/html/qmag-example.html +++ b/doc/html/qmag-example.html @@ -54,7 +54,7 @@ magnified area as a .bmp file. #include <<a href="qcombobox-h.html">ntqcombobox.h</a>> #include <<a href="qpushbutton-h.html">ntqpushbutton.h</a>> -#include <<a href="qpixmap-h.html">ntqpixmap.h</a>> +#include <<a href="tqpixmap-h.html">tqpixmap.h</a>> #include <<a href="tqimage-h.html">tqimage.h</a>> #include <<a href="qlabel-h.html">ntqlabel.h</a>> #include <<a href="tqfiledialog-h.html">tqfiledialog.h</a>> @@ -62,7 +62,7 @@ magnified area as a .bmp file. #include <<a href="qapplication-h.html">ntqapplication.h</a>> #include <<a href="tqpainter-h.html">tqpainter.h</a>> -#include <<a href="qwmatrix-h.html">ntqwmatrix.h</a>> +#include <<a href="tqwmatrix-h.html">tqwmatrix.h</a>> class MagWidget : public <a href="tqwidget.html">TQWidget</a> @@ -95,8 +95,8 @@ private: <a href="ntqpushbutton.html">TQPushButton</a> *saveButton; <a href="ntqpushbutton.html">TQPushButton</a> *multiSaveButton; <a href="ntqpushbutton.html">TQPushButton</a> *quitButton; - <a href="ntqpixmap.html">TQPixmap</a> pm; // pixmap, magnified - <a href="ntqpixmap.html">TQPixmap</a> p; // pixmap + <a href="tqpixmap.html">TQPixmap</a> pm; // pixmap, magnified + <a href="tqpixmap.html">TQPixmap</a> p; // pixmap <a href="tqimage.html">TQImage</a> image; // image of pixmap (for RGB) <a href="ntqlabel.html">TQLabel</a> *rgb; int yoffset; // pixels in addition to the actual picture @@ -232,11 +232,11 @@ void <a name="f486"></a>MagWidget::setRefresh( int index ) void <a name="f487"></a>MagWidget::save() { -<a name="x1785"></a> if ( !p.<a href="ntqpixmap.html#isNull">isNull</a>() ) { +<a name="x1785"></a> if ( !p.<a href="tqpixmap.html#isNull">isNull</a>() ) { <a href="tqobject.html#killTimers">killTimers</a>(); <a name="x1775"></a> <a href="tqstring.html">TQString</a> fn = TQFileDialog::<a href="tqfiledialog.html#getSaveFileName">getSaveFileName</a>(); <a name="x1792"></a> if ( !fn.<a href="tqstring.html#isEmpty">isEmpty</a>() ) -<a name="x1786"></a> p.<a href="ntqpixmap.html#save">save</a>( fn, "BMP" ); +<a name="x1786"></a> p.<a href="tqpixmap.html#save">save</a>( fn, "BMP" ); if ( r ) <a href="tqobject.html#startTimer">startTimer</a>( timer[r] ); } @@ -244,13 +244,13 @@ void <a name="f487"></a>MagWidget::save() void <a name="f488"></a>MagWidget::multiSave() { - if ( !p.<a href="ntqpixmap.html#isNull">isNull</a>() ) { + if ( !p.<a href="tqpixmap.html#isNull">isNull</a>() ) { multifn = ""; // stops saving multifn = TQFileDialog::<a href="tqfiledialog.html#getSaveFileName">getSaveFileName</a>(); if ( multifn.<a href="tqstring.html#isEmpty">isEmpty</a>() ) <a name="x1789"></a> multiSaveButton-><a href="ntqpushbutton.html#setOn">setOn</a>(FALSE); if ( !r ) - p.<a href="ntqpixmap.html#save">save</a>( multifn, "BMP" ); + p.<a href="tqpixmap.html#save">save</a>( multifn, "BMP" ); } else { multiSaveButton-><a href="ntqpushbutton.html#setOn">setOn</a>(FALSE); } @@ -283,11 +283,11 @@ void <a name="f489"></a>MagWidget::grab() else if ( y < 0 ) y = 0; -<a name="x1784"></a> p = TQPixmap::<a href="ntqpixmap.html#grabWindow">grabWindow</a>( TQApplication::<a href="ntqapplication.html#desktop">desktop</a>()->winId(), x, y, w, h ); -<a name="x1783"></a> image = p.<a href="ntqpixmap.html#convertToImage">convertToImage</a>(); - <a href="ntqwmatrix.html">TQWMatrix</a> m; // after getting it, scale it -<a name="x1809"></a> m.<a href="ntqwmatrix.html#scale">scale</a>( (double)z, (double)z ); -<a name="x1787"></a> pm = p.<a href="ntqpixmap.html#xForm">xForm</a>( m ); +<a name="x1784"></a> p = TQPixmap::<a href="tqpixmap.html#grabWindow">grabWindow</a>( TQApplication::<a href="ntqapplication.html#desktop">desktop</a>()->winId(), x, y, w, h ); +<a name="x1783"></a> image = p.<a href="tqpixmap.html#convertToImage">convertToImage</a>(); + <a href="tqwmatrix.html">TQWMatrix</a> m; // after getting it, scale it +<a name="x1809"></a> m.<a href="tqwmatrix.html#scale">scale</a>( (double)z, (double)z ); +<a name="x1787"></a> pm = p.<a href="tqpixmap.html#xForm">xForm</a>( m ); <a name="x1770"></a> if ( !multiSaveButton || !multiSaveButton-><a href="ntqbutton.html#isOn">isOn</a>() ) <a href="tqwidget.html#repaint">repaint</a>( FALSE ); // and finally repaint, flicker-free @@ -296,7 +296,7 @@ void <a name="f489"></a>MagWidget::grab() <a name="x1803"></a>void MagWidget::<a href="tqwidget.html#paintEvent">paintEvent</a>( <a href="tqpaintevent.html">TQPaintEvent</a> * ) { - if ( !pm.<a href="ntqpixmap.html#isNull">isNull</a>() ) { + if ( !pm.<a href="tqpixmap.html#isNull">isNull</a>() ) { <a href="tqpainter.html">TQPainter</a> paint( this ); <a name="x1782"></a> paint.<a href="tqpainter.html#drawPixmap">drawPixmap</a>( 0, zoom ? zoom-><a href="tqwidget.html#height">height</a>()+4 : 0, pm, 0,0, width(), height()-yoffset ); @@ -366,7 +366,7 @@ void <a name="f490"></a>MagWidget::grabAround(TQPoint pos) <a name="x1800"></a>void MagWidget::<a href="tqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) { - if ( grabbing || pm.<a href="ntqpixmap.html#isNull">isNull</a>() || + if ( grabbing || pm.<a href="tqpixmap.html#isNull">isNull</a>() || e-><a href="qmouseevent.html#pos">pos</a>().y() > height() - (zoom ? zoom-><a href="tqwidget.html#fontMetrics">fontMetrics</a>().height() - 4 : 0) || e-><a href="qmouseevent.html#pos">pos</a>().y() < (zoom ? zoom-><a href="tqwidget.html#height">height</a>()+4 : 4) ) { rgb-><a href="ntqlabel.html#setText">setText</a>( "" ); @@ -408,7 +408,7 @@ void <a name="f490"></a>MagWidget::grabAround(TQPoint pos) <a name="x1794"></a> multifn.<a href="tqstring.html#replace">replace</a>(num, <a name="x1793"></a> TQString().setNum(multifn.<a href="tqstring.html#mid">mid</a>(start,len).toInt()+1) ); - p.<a href="ntqpixmap.html#save">save</a>( multifn, "BMP" ); + p.<a href="tqpixmap.html#save">save</a>( multifn, "BMP" ); } */ } |