From e6077c30d14e9d662e8843c554db86c0d366d0b6 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 6 Jun 2024 13:44:12 +0900 Subject: Rename str nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/mdi-example.html | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'doc/html/mdi-example.html') diff --git a/doc/html/mdi-example.html b/doc/html/mdi-example.html index 09489ad9b..118552fd1 100644 --- a/doc/html/mdi-example.html +++ b/doc/html/mdi-example.html @@ -67,7 +67,7 @@ public: MDIWindow( TQWidget* parent, const char* name, int wflags ); ~MDIWindow(); - void load( const TQString& fn ); + void load( const TQString& fn ); void save(); void saveAs(); void print( TQPrinter* ); @@ -76,12 +76,12 @@ protected: void closeEvent( TQCloseEvent * ); signals: - void message(const TQString&, int ); + void message(const TQString&, int ); private: TQTextEdit* medit; TQMovie * mmovie; - TQString filename; + TQString filename; }; @@ -187,7 +187,7 @@ const char * filePrintText = "Click this button to print the file you " openIcon = TQPixmap( fileopen ); TQToolButton * fileOpen - = new TQToolButton( openIcon, "Open File", TQString::null, + = new TQToolButton( openIcon, "Open File", TQString::null, this, TQ_SLOT(load()), fileTools, "open file" ); saveIcon = TQPixmap( filesave ); @@ -272,7 +272,7 @@ ApplicationWindow::~ApplicationWindow() MDIWindow* ApplicationWindow::newDoc() { MDIWindow* w = new MDIWindow( ws, 0, WDestructiveClose ); - connect( w, TQ_SIGNAL( message(const TQString&, int) ), statusBar(), TQ_SLOT( message(const TQString&, int )) ); + connect( w, TQ_SIGNAL( message(const TQString&, int) ), statusBar(), TQ_SLOT( message(const TQString&, int )) ); w->setCaption("unnamed document"); w->setIcon( TQPixmap("document.xpm") ); // show the very first window in maximized mode @@ -285,8 +285,8 @@ MDIWindow* ApplicationWindow::newDoc() void ApplicationWindow::load() { - TQString fn = TQFileDialog::getOpenFileName( TQString::null, TQString::null, this ); - if ( !fn.isEmpty() ) { + TQString fn = TQFileDialog::getOpenFileName( TQString::null, TQString::null, this ); + if ( !fn.isEmpty() ) { MDIWindow* w = newDoc(); w->load( fn ); } else { @@ -449,14 +449,14 @@ void MDIWindow::closeEvent( MDIWindow::load( const TQString& fn ) +void MDIWindow::load( const TQString& fn ) { filename = fn; TQFile f( filename ); if ( !f.open( IO_ReadOnly ) ) return; - if(fn.contains(".gif")) { + if(fn.contains(".gif")) { TQWidget * tmp=new TQWidget(this); setFocusProxy(tmp); setCentralWidget(tmp); @@ -473,7 +473,7 @@ void MDIWindow::load( const TQString mmovie = 0; TQTextStream t(&f); - TQString s = t.read(); + TQString s = t.read(); medit->setText( s ); f.close(); @@ -490,7 +490,7 @@ void MDIWindow::save() return; } - TQString text = medit->text(); + TQString text = medit->text(); TQFile f( filename ); if ( !f.open( IO_WriteOnly ) ) { emit message( TQString("Could not write to %1").arg(filename), @@ -509,8 +509,8 @@ void MDIWindow::save() void MDIWindow::saveAs() { - TQString fn = TQFileDialog::getSaveFileName( filename, TQString::null, this ); - if ( !fn.isEmpty() ) { + TQString fn = TQFileDialog::getSaveFileName( filename, TQString::null, this ); + if ( !fn.isEmpty() ) { filename = fn; save(); } else { @@ -545,12 +545,12 @@ void MDIWindow::print( TQPrinter 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 ) ), + 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() ) break; - TQString msg( "Printing (page " ); - msg += TQString::number( ++pageNo ); + TQString msg( "Printing (page " ); + msg += TQString::number( ++pageNo ); msg += ")..."; emit message( msg, 0 ); printer->newPage(); -- cgit v1.2.3