From 0e787fb7f5b56b4fe87cd8ada64ae740bbca87bc Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 24 Jul 2024 19:37:05 +0900 Subject: Rename text class nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/simple-application.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'doc/html/simple-application.html') 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; }

This walkthrough shows simple use of TQMainWindow, TQMenuBar, TQPopupMenu, TQToolBar and TQStatusBar - classes that every modern application window tends to use. (See also Tutorial #2.) -

It also illustrates some aspects of TQWhatsThis (for simple help) and a +

It also illustrates some aspects of TQWhatsThis (for simple help) and a typical main() using TQApplication.

Finally, it shows a typical print function based on TQPrinter.

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::add( fileOpen, fileOpenText ); + TQWhatsThis::add( fileOpen, fileOpenText );

With the above line we add the "What's This?" help-text to the fileOpen button... @@ -241,13 +241,13 @@ saved in fileOpenText) requests an image named "document-open", the add( fileSave, fileSaveText ); + TQWhatsThis::add( 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::add( filePrint, filePrintText ); + TQWhatsThis::add( filePrint, filePrintText );

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.logicalDpiY(); int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins TQRect view( margin, margin, metrics.width() - 2*margin, metrics.height() - 2*margin ); - TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()), + TQSimpleRichText richText( TQStyleSheet::convertFromPlainText(e->text()), TQFont(), e->context(), e->styleSheet(), e->mimeSourceFactory(), view.height() ); - richText.setWidth( &p, view.width() ); + richText.setWidth( &p, view.width() ); int page = 1; do { - richText.draw( &p, margin, margin, view, colorGroup() ); + richText.draw( &p, margin, margin, view, colorGroup() ); view.moveBy( 0, view.height() ); p.translate( 0 , -view.height() ); p.drawText( view.right() - p.fontMetrics().width( TQString::number( page ) ), view.bottom() + p.fontMetrics().ascent() + 5, TQString::number( page ) ); - if ( view.top() - margin >= richText.height() ) + if ( view.top() - margin >= richText.height() ) break; printer->newPage(); page++; @@ -493,7 +493,7 @@ and implicitly changes the window system caption to the new name. tool button.

We present the user with the print setup dialog, and abandon printing if they cancel. -

We create a TQSimpleRichText object and give it the text. This object +

We create a TQSimpleRichText 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. -- cgit v1.2.3