diff options
Diffstat (limited to 'doc/html/tqaction-application-example.html')
-rw-r--r-- | doc/html/tqaction-application-example.html | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/doc/html/tqaction-application-example.html b/doc/html/tqaction-application-example.html index 444153767..3e8d44773 100644 --- a/doc/html/tqaction-application-example.html +++ b/doc/html/tqaction-application-example.html @@ -81,7 +81,7 @@ private slots: void aboutTQt(); private: - <a href="ntqprinter.html">TQPrinter</a> *printer; + <a href="tqprinter.html">TQPrinter</a> *printer; <a href="tqtextedit.html">TQTextEdit</a> *e; <a href="tqstring.html">TQString</a> filename; }; @@ -105,7 +105,7 @@ private: #include "application.h" #include <<a href="tqimage-h.html">tqimage.h</a>> -#include <<a href="qpixmap-h.html">ntqpixmap.h</a>> +#include <<a href="tqpixmap-h.html">tqpixmap.h</a>> #include <<a href="tqtoolbar-h.html">tqtoolbar.h</a>> #include <<a href="tqtoolbutton-h.html">tqtoolbutton.h</a>> #include <<a href="tqpopupmenu-h.html">tqpopupmenu.h</a>> @@ -115,7 +115,7 @@ private: #include <<a href="tqfiledialog-h.html">tqfiledialog.h</a>> #include <<a href="tqstatusbar-h.html">tqstatusbar.h</a>> #include <<a href="qmessagebox-h.html">ntqmessagebox.h</a>> -#include <<a href="qprinter-h.html">ntqprinter.h</a>> +#include <<a href="tqprinter-h.html">tqprinter.h</a>> #include <<a href="qapplication-h.html">ntqapplication.h</a>> #include <<a href="qaccel-h.html">ntqaccel.h</a>> #include <<a href="tqtextstream-h.html">tqtextstream.h</a>> @@ -133,7 +133,7 @@ private: <a name="f375"></a>ApplicationWindow::ApplicationWindow() : <a href="tqmainwindow.html">TQMainWindow</a>( 0, "example application main window", WDestructiveClose ) { - printer = new <a href="ntqprinter.html">TQPrinter</a>( TQPrinter::HighResolution ); + printer = new <a href="tqprinter.html">TQPrinter</a>( TQPrinter::HighResolution ); <a href="tqaction.html">TQAction</a> * fileNewAction; <a href="tqaction.html">TQAction</a> * fileOpenAction; @@ -321,8 +321,8 @@ void <a name="f380"></a>ApplicationWindow::saveAs() void <a name="f381"></a>ApplicationWindow::print() { -<a name="x1150"></a> printer-><a href="ntqprinter.html#setFullPage">setFullPage</a>( TRUE ); -<a name="x1151"></a> if ( printer-><a href="ntqprinter.html#setup">setup</a>(this) ) { // printer dialog +<a name="x1150"></a> printer-><a href="tqprinter.html#setFullPage">setFullPage</a>( TRUE ); +<a name="x1151"></a> if ( printer-><a href="tqprinter.html#setup">setup</a>(this) ) { // printer dialog <a href="tqmainwindow.html#statusBar">statusBar</a>()->message( "Printing..." ); <a href="tqpainter.html">TQPainter</a> p; if( !p.<a href="tqpainter.html#begin">begin</a>( printer ) ) { // paint on printer @@ -333,24 +333,24 @@ void <a name="f381"></a>ApplicationWindow::print() <a name="x1145"></a> <a href="tqpaintdevicemetrics.html">TQPaintDeviceMetrics</a> metrics( p.<a href="tqpainter.html#device">device</a>() ); <a name="x1142"></a> int dpiy = metrics.<a href="tqpaintdevicemetrics.html#logicalDpiY">logicalDpiY</a>(); int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins -<a name="x1143"></a><a name="x1141"></a> <a href="ntqrect.html">TQRect</a> view( margin, margin, metrics.<a href="tqpaintdevicemetrics.html#width">width</a>() - 2*margin, metrics.<a href="tqpaintdevicemetrics.html#height">height</a>() - 2*margin ); +<a name="x1143"></a><a name="x1141"></a> <a href="tqrect.html">TQRect</a> view( margin, margin, metrics.<a href="tqpaintdevicemetrics.html#width">width</a>() - 2*margin, metrics.<a href="tqpaintdevicemetrics.html#height">height</a>() - 2*margin ); <a name="x1163"></a> <a href="ntqsimplerichtext.html">TQSimpleRichText</a> richText( TQStyleSheet::<a href="tqstylesheet.html#convertFromPlainText">convertFromPlainText</a>(e-><a href="tqtextedit.html#text">text</a>()), TQFont(), <a name="x1164"></a> e-><a href="tqtextedit.html#context">context</a>(), <a name="x1169"></a> e-><a href="tqtextedit.html#styleSheet">styleSheet</a>(), <a name="x1166"></a> e-><a href="tqtextedit.html#mimeSourceFactory">mimeSourceFactory</a>(), - view.<a href="ntqrect.html#height">height</a>() ); -<a name="x1160"></a> richText.<a href="ntqsimplerichtext.html#setWidth">setWidth</a>( &p, view.<a href="ntqrect.html#width">width</a>() ); + view.<a href="tqrect.html#height">height</a>() ); +<a name="x1160"></a> richText.<a href="ntqsimplerichtext.html#setWidth">setWidth</a>( &p, view.<a href="tqrect.html#width">width</a>() ); int page = 1; do { <a name="x1158"></a> richText.<a href="ntqsimplerichtext.html#draw">draw</a>( &p, margin, margin, view, colorGroup() ); -<a name="x1154"></a> view.<a href="ntqrect.html#moveBy">moveBy</a>( 0, view.<a href="ntqrect.html#height">height</a>() ); -<a name="x1148"></a> p.<a href="tqpainter.html#translate">translate</a>( 0 , -view.<a href="ntqrect.html#height">height</a>() ); -<a name="x1155"></a><a name="x1147"></a> p.<a href="tqpainter.html#drawText">drawText</a>( view.<a href="ntqrect.html#right">right</a>() - p.<a href="tqpainter.html#fontMetrics">fontMetrics</a>().width( TQString::<a href="tqstring.html#number">number</a>( page ) ), -<a name="x1152"></a> view.<a href="ntqrect.html#bottom">bottom</a>() + p.<a href="tqpainter.html#fontMetrics">fontMetrics</a>().ascent() + 5, TQString::number( page ) ); -<a name="x1159"></a> if ( view.<a href="ntqrect.html#top">top</a>() - margin >= richText.<a href="ntqsimplerichtext.html#height">height</a>() ) +<a name="x1154"></a> view.<a href="tqrect.html#moveBy">moveBy</a>( 0, view.<a href="tqrect.html#height">height</a>() ); +<a name="x1148"></a> p.<a href="tqpainter.html#translate">translate</a>( 0 , -view.<a href="tqrect.html#height">height</a>() ); +<a name="x1155"></a><a name="x1147"></a> p.<a href="tqpainter.html#drawText">drawText</a>( view.<a href="tqrect.html#right">right</a>() - p.<a href="tqpainter.html#fontMetrics">fontMetrics</a>().width( TQString::<a href="tqstring.html#number">number</a>( page ) ), +<a name="x1152"></a> view.<a href="tqrect.html#bottom">bottom</a>() + p.<a href="tqpainter.html#fontMetrics">fontMetrics</a>().ascent() + 5, TQString::number( page ) ); +<a name="x1159"></a> if ( view.<a href="tqrect.html#top">top</a>() - margin >= richText.<a href="ntqsimplerichtext.html#height">height</a>() ) break; -<a name="x1149"></a> printer-><a href="ntqprinter.html#newPage">newPage</a>(); +<a name="x1149"></a> printer-><a href="tqprinter.html#newPage">newPage</a>(); page++; } while (TRUE); |