From 0cf411b09cf5d8970b873a338a69eae98d5ce5d8 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 8 Jun 2024 12:56:43 +0900 Subject: Rename text nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/simple-application-example.html | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'doc/html/simple-application-example.html') diff --git a/doc/html/simple-application-example.html b/doc/html/simple-application-example.html index f3cbfce2a..9b90e57f8 100644 --- a/doc/html/simple-application-example.html +++ b/doc/html/simple-application-example.html @@ -81,7 +81,7 @@ private slots: private: TQPrinter *printer; - TQTextEdit *e; + TQTextEdit *e; TQString filename; }; @@ -109,7 +109,7 @@ private: #include <ntqtoolbutton.h> #include <ntqpopupmenu.h> #include <ntqmenubar.h> -#include <ntqtextedit.h> +#include <tqtextedit.h> #include <ntqfile.h> #include <ntqfiledialog.h> #include <ntqstatusbar.h> @@ -117,7 +117,7 @@ private: #include <ntqprinter.h> #include <ntqapplication.h> #include <ntqaccel.h> -#include <ntqtextstream.h> +#include <tqtextstream.h> #include <ntqpainter.h> #include <ntqpaintdevicemetrics.h> #include <ntqwhatsthis.h> @@ -218,7 +218,7 @@ private: help->insertSeparator(); help->insertItem( "What's &This", this, TQ_SLOT(whatsThis()), SHIFT+Key_F1 ); - e = new TQTextEdit( this, "editor" ); + e = new TQTextEdit( this, "editor" ); e->setFocus(); setCentralWidget( e ); statusBar()->message( "Ready", 2000 ); @@ -258,9 +258,9 @@ void ApplicationWindow::load( const T if ( !f.open( IO_ReadOnly ) ) return; - TQTextStream ts( &f ); - e->setText( ts.read() ); - e->setModified( FALSE ); + TQTextStream ts( &f ); + e->setText( ts.read() ); + e->setModified( FALSE ); setCaption( fileName ); statusBar()->message( "Loaded document " + fileName, 2000 ); } @@ -273,7 +273,7 @@ void ApplicationWindow::save() return; } - TQString text = e->text(); + TQString text = e->text(); TQFile f( filename ); if ( !f.open( IO_WriteOnly ) ) { statusBar()->message( TQString("Could not write to %1").arg(filename), @@ -281,11 +281,11 @@ void ApplicationWindow::save() return; } - TQTextStream t( &f ); + TQTextStream t( &f ); t << text; f.close(); - e->setModified( FALSE ); + e->setModified( FALSE ); setCaption( filename ); @@ -321,11 +321,11 @@ void ApplicationWindow::print() 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(), + e->context(), + e->styleSheet(), + e->mimeSourceFactory(), view.height() ); richText.setWidth( &p, view.width() ); int page = 1; @@ -349,7 +349,7 @@ void ApplicationWindow::print() void ApplicationWindow::closeEvent( TQCloseEvent* ce ) { - if ( !e->isModified() ) { + if ( !e->isModified() ) { ce->accept(); return; } -- cgit v1.2.3