From 7552c6d73043b1040139033f6864db48ae5446cf Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 2 Jul 2024 21:37:22 +0900 Subject: Rename main window nt* related files to equivalent tq*. The file "ntqsession.h" was totally unnecessary and has been removed. Signed-off-by: Michele Calgaro --- doc/html/simple-application-example.html | 92 ++++++++++++++++---------------- 1 file changed, 46 insertions(+), 46 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 f550bc2c..70194e76 100644 --- a/doc/html/simple-application-example.html +++ b/doc/html/simple-application-example.html @@ -53,11 +53,11 @@ this example. #ifndef APPLICATION_H #define APPLICATION_H -#include <ntqmainwindow.h> +#include <tqmainwindow.h> class TQTextEdit; -class ApplicationWindow: public TQMainWindow +class ApplicationWindow: public TQMainWindow { TQ_OBJECT @@ -105,14 +105,14 @@ private: #include <tqimage.h> #include <ntqpixmap.h> -#include <ntqtoolbar.h> -#include <ntqtoolbutton.h> -#include <ntqpopupmenu.h> -#include <ntqmenubar.h> +#include <tqtoolbar.h> +#include <tqtoolbutton.h> +#include <tqpopupmenu.h> +#include <tqmenubar.h> #include <tqtextedit.h> #include <ntqfile.h> #include <ntqfiledialog.h> -#include <ntqstatusbar.h> +#include <tqstatusbar.h> #include <ntqmessagebox.h> #include <ntqprinter.h> #include <ntqapplication.h> @@ -128,27 +128,27 @@ private: #include "fileprint.xpm" ApplicationWindow::ApplicationWindow() - : TQMainWindow( 0, "example application main window", WDestructiveClose | WGroupLeader ) + : TQMainWindow( 0, "example application main window", WDestructiveClose | WGroupLeader ) { printer = new TQPrinter( TQPrinter::HighResolution ); TQPixmap openIcon, saveIcon, printIcon; - TQToolBar * fileTools = new TQToolBar( this, "file operations" ); - fileTools->setLabel( "File Operations" ); + TQToolBar * fileTools = new TQToolBar( this, "file operations" ); + fileTools->setLabel( "File Operations" ); openIcon = TQPixmap( fileopen ); TQToolButton * fileOpen - = new TQToolButton( openIcon, "Open File", TQString::null, + = new TQToolButton( openIcon, "Open File", TQString::null, this, TQ_SLOT(choose()), fileTools, "open file" ); saveIcon = TQPixmap( filesave ); TQToolButton * fileSave - = new TQToolButton( saveIcon, "Save File", TQString::null, + = new TQToolButton( saveIcon, "Save File", TQString::null, this, TQ_SLOT(save()), fileTools, "save file" ); printIcon = TQPixmap( fileprint ); TQToolButton * filePrint - = new TQToolButton( printIcon, "Print File", TQString::null, + = new TQToolButton( printIcon, "Print File", TQString::null, this, TQ_SLOT(print()), fileTools, "print file" ); @@ -178,50 +178,50 @@ private: TQWhatsThis::add( filePrint, filePrintText ); - TQPopupMenu * file = new TQPopupMenu( this ); - menuBar()->insertItem( "&File", file ); + TQPopupMenu * file = new TQPopupMenu( this ); + menuBar()->insertItem( "&File", file ); - file->insertItem( "&New", this, TQ_SLOT(newDoc()), CTRL+Key_N ); + file->insertItem( "&New", this, TQ_SLOT(newDoc()), CTRL+Key_N ); int id; - id = file->insertItem( openIcon, "&Open...", + id = file->insertItem( openIcon, "&Open...", this, TQ_SLOT(choose()), CTRL+Key_O ); - file->setWhatsThis( id, fileOpenText ); + file->setWhatsThis( id, fileOpenText ); - id = file->insertItem( saveIcon, "&Save", + id = file->insertItem( saveIcon, "&Save", this, TQ_SLOT(save()), CTRL+Key_S ); - file->setWhatsThis( id, fileSaveText ); + file->setWhatsThis( id, fileSaveText ); - id = file->insertItem( "Save &As...", this, TQ_SLOT(saveAs()) ); - file->setWhatsThis( id, fileSaveText ); + id = file->insertItem( "Save &As...", this, TQ_SLOT(saveAs()) ); + file->setWhatsThis( id, fileSaveText ); - file->insertSeparator(); + file->insertSeparator(); - id = file->insertItem( printIcon, "&Print...", + id = file->insertItem( printIcon, "&Print...", this, TQ_SLOT(print()), CTRL+Key_P ); - file->setWhatsThis( id, filePrintText ); + file->setWhatsThis( id, filePrintText ); - file->insertSeparator(); + file->insertSeparator(); - file->insertItem( "&Close", this, TQ_SLOT(close()), CTRL+Key_W ); + file->insertItem( "&Close", this, TQ_SLOT(close()), CTRL+Key_W ); - file->insertItem( "&Quit", tqApp, TQ_SLOT( closeAllWindows() ), CTRL+Key_Q ); + file->insertItem( "&Quit", tqApp, TQ_SLOT( closeAllWindows() ), CTRL+Key_Q ); - menuBar()->insertSeparator(); + menuBar()->insertSeparator(); - TQPopupMenu * help = new TQPopupMenu( this ); - menuBar()->insertItem( "&Help", help ); + TQPopupMenu * help = new TQPopupMenu( this ); + menuBar()->insertItem( "&Help", help ); - help->insertItem( "&About", this, TQ_SLOT(about()), Key_F1 ); - help->insertItem( "About &TQt", this, TQ_SLOT(aboutTQt()) ); - help->insertSeparator(); - help->insertItem( "What's &This", this, TQ_SLOT(whatsThis()), SHIFT+Key_F1 ); + help->insertItem( "&About", this, TQ_SLOT(about()), Key_F1 ); + help->insertItem( "About &TQt", this, TQ_SLOT(aboutTQt()) ); + help->insertSeparator(); + help->insertItem( "What's &This", this, TQ_SLOT(whatsThis()), SHIFT+Key_F1 ); e = new TQTextEdit( this, "editor" ); e->setFocus(); - setCentralWidget( e ); - statusBar()->message( "Ready", 2000 ); + setCentralWidget( e ); + statusBar()->message( "Ready", 2000 ); resize( 450, 600 ); } @@ -248,7 +248,7 @@ void ApplicationWindow::choose() if ( !fn.isEmpty() ) load( fn ); else - statusBar()->message( "Loading aborted", 2000 ); + statusBar()->message( "Loading aborted", 2000 ); } @@ -262,7 +262,7 @@ void ApplicationWindow::load( const T e->setText( ts.read() ); e->setModified( FALSE ); setCaption( fileName ); - statusBar()->message( "Loaded document " + fileName, 2000 ); + statusBar()->message( "Loaded document " + fileName, 2000 ); } @@ -276,7 +276,7 @@ void ApplicationWindow::save() TQString text = e->text(); TQFile f( filename ); if ( !f.open( IO_WriteOnly ) ) { - statusBar()->message( TQString("Could not write to %1").arg(filename), + statusBar()->message( TQString("Could not write to %1").arg(filename), 2000 ); return; } @@ -289,7 +289,7 @@ void ApplicationWindow::save() setCaption( filename ); - statusBar()->message( TQString( "File %1 saved" ).arg( filename ), 2000 ); + statusBar()->message( TQString( "File %1 saved" ).arg( filename ), 2000 ); } @@ -301,7 +301,7 @@ void ApplicationWindow::saveAs() filename = fn; save(); } else { - statusBar()->message( "Saving aborted", 2000 ); + statusBar()->message( "Saving aborted", 2000 ); } } @@ -310,10 +310,10 @@ void ApplicationWindow::print() { printer->setFullPage( TRUE ); if ( printer->setup(this) ) { // printer dialog - statusBar()->message( "Printing..." ); + statusBar()->message( "Printing..." ); TQPainter p; if( !p.begin( printer ) ) { // paint on printer - statusBar()->message( "Printing aborted", 2000 ); + statusBar()->message( "Printing aborted", 2000 ); return; } @@ -341,9 +341,9 @@ void ApplicationWindow::print() page++; } while (TRUE); - statusBar()->message( "Printing completed", 2000 ); + statusBar()->message( "Printing completed", 2000 ); } else { - statusBar()->message( "Printing aborted", 2000 ); + statusBar()->message( "Printing aborted", 2000 ); } } -- cgit v1.2.1