diff options
Diffstat (limited to 'doc/html/simple-application.html')
-rw-r--r-- | doc/html/simple-application.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/html/simple-application.html b/doc/html/simple-application.html index efe781b30..eb9fd6968 100644 --- a/doc/html/simple-application.html +++ b/doc/html/simple-application.html @@ -36,7 +36,7 @@ body { background: #ffffff; color: black; } <p> <p> This walkthrough shows simple use of <a href="tqmainwindow.html">TQMainWindow</a>, <a href="tqmenubar.html">TQMenuBar</a>, <a href="tqpopupmenu.html">TQPopupMenu</a>, <a href="tqtoolbar.html">TQToolBar</a> and <a href="tqstatusbar.html">TQStatusBar</a> - classes that every modern application window tends to use. (See also <a href="tutorial2.html">Tutorial #2</a>.) -<p> It also illustrates some aspects of <a href="ntqwhatsthis.html">TQWhatsThis</a> (for simple help) and a +<p> It also illustrates some aspects of <a href="tqwhatsthis.html">TQWhatsThis</a> (for simple help) and a typical <tt>main()</tt> using <a href="ntqapplication.html">TQApplication</a>. <p> Finally, it shows a typical print function based on <a href="tqprinter.html">TQPrinter</a>. <p> <h2> The declaration of ApplicationWindow @@ -228,7 +228,7 @@ function, as its mouse interface is unusual. "You can also select the <b>Open</b> command " "from the <b>File</b> menu.</p>"; - TQWhatsThis::<a href="ntqwhatsthis.html#add">add</a>( fileOpen, fileOpenText ); + TQWhatsThis::<a href="tqwhatsthis.html#add">add</a>( fileOpen, fileOpenText ); </pre> <p> With the above line we add the "What's This?" help-text to the <em>fileOpen</em> button... @@ -241,13 +241,13 @@ saved in <em>fileOpenText</em>) requests an image named "document-open", the <em "You can also select the <b>Save</b> command " "from the <b>File</b> menu.</p>"; - TQWhatsThis::<a href="ntqwhatsthis.html#add">add</a>( fileSave, fileSaveText ); + TQWhatsThis::<a href="tqwhatsthis.html#add">add</a>( fileSave, fileSaveText ); const char * filePrintText = "Click this button to print the file you " "are editing.\n" "You can also select the Print command " "from the File menu."; - TQWhatsThis::<a href="ntqwhatsthis.html#add">add</a>( filePrint, filePrintText ); + TQWhatsThis::<a href="tqwhatsthis.html#add">add</a>( filePrint, filePrintText ); </pre> <p> The "What's This?" help of the remaining two buttons doesn't make use of pixmaps, therefore all we need to do is to add the help-text to the @@ -463,21 +463,21 @@ and implicitly changes the window system caption to the new name. int dpiy = metrics.<a href="tqpaintdevicemetrics.html#logicalDpiY">logicalDpiY</a>(); int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins <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 href="ntqsimplerichtext.html">TQSimpleRichText</a> richText( TQStyleSheet::<a href="tqstylesheet.html#convertFromPlainText">convertFromPlainText</a>(e-><a href="tqtextedit.html#text">text</a>()), + <a href="tqsimplerichtext.html">TQSimpleRichText</a> richText( TQStyleSheet::<a href="tqstylesheet.html#convertFromPlainText">convertFromPlainText</a>(e-><a href="tqtextedit.html#text">text</a>()), TQFont(), e-><a href="tqtextedit.html#context">context</a>(), e-><a href="tqtextedit.html#styleSheet">styleSheet</a>(), e-><a href="tqtextedit.html#mimeSourceFactory">mimeSourceFactory</a>(), view.<a href="tqrect.html#height">height</a>() ); - richText.<a href="ntqsimplerichtext.html#setWidth">setWidth</a>( &p, view.<a href="tqrect.html#width">width</a>() ); + richText.<a href="tqsimplerichtext.html#setWidth">setWidth</a>( &p, view.<a href="tqrect.html#width">width</a>() ); int page = 1; do { - richText.<a href="ntqsimplerichtext.html#draw">draw</a>( &p, margin, margin, view, colorGroup() ); + richText.<a href="tqsimplerichtext.html#draw">draw</a>( &p, margin, margin, view, colorGroup() ); view.<a href="tqrect.html#moveBy">moveBy</a>( 0, view.<a href="tqrect.html#height">height</a>() ); p.<a href="tqpainter.html#translate">translate</a>( 0 , -view.<a href="tqrect.html#height">height</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 ) ), view.<a href="tqrect.html#bottom">bottom</a>() + p.<a href="tqpainter.html#fontMetrics">fontMetrics</a>().ascent() + 5, TQString::number( page ) ); - if ( view.<a href="tqrect.html#top">top</a>() - margin >= richText.<a href="ntqsimplerichtext.html#height">height</a>() ) + if ( view.<a href="tqrect.html#top">top</a>() - margin >= richText.<a href="tqsimplerichtext.html#height">height</a>() ) break; printer-><a href="tqprinter.html#newPage">newPage</a>(); page++; @@ -493,7 +493,7 @@ and implicitly changes the window system caption to the new name. tool button. <p> We present the user with the print setup dialog, and abandon printing if they cancel. -<p> We create a <a href="ntqsimplerichtext.html">TQSimpleRichText</a> object and give it the text. This object +<p> We create a <a href="tqsimplerichtext.html">TQSimpleRichText</a> object and give it the text. This object is able to format the text nicely as one long page. We achieve pagination by printing one paper page's worth of text from the TQSimpleRichText page at a time. |