From 8ac0e970e4464d9f8f73c0fb34a178ff135be8c3 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 2 Jun 2024 23:07:22 +0900 Subject: Rename ntqwidget* related files to equivalent tqwidget* Signed-off-by: Michele Calgaro --- doc/html/simple-application.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'doc/html/simple-application.html') diff --git a/doc/html/simple-application.html b/doc/html/simple-application.html index 51631c84b..84a590eaf 100644 --- a/doc/html/simple-application.html +++ b/doc/html/simple-application.html @@ -116,8 +116,8 @@ includes application.h when ntqtextedit.hTQApplication a( argc, argv ); ApplicationWindow *mw = new ApplicationWindow(); - mw->setCaption( "TQt Example - Application" ); - mw->show(); + mw->setCaption( "TQt Example - Application" ); + mw->show(); a.connect( &a, TQ_SIGNAL(lastWindowClosed()), &a, TQ_SLOT(quit()) ); return a.exec(); } @@ -135,8 +135,8 @@ parse argc and argv. TQApplication itself takes care of X11-sp command-line options like -geometry, so the program will automatically behave the way X clients are expected to.

        ApplicationWindow *mw = new ApplicationWindow();
-        mw->setCaption( "TQt Example - Application" );
-        mw->show();
+        mw->setCaption( "TQt Example - Application" );
+        mw->show();
 

We create an ApplicationWindow as a top-level widget, set its window system caption to "Document 1", and show() it. @@ -291,7 +291,7 @@ example for a shorter and easier approach.) 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 );

... the Print command with "What's This?" help, another separator and @@ -299,7 +299,7 @@ two more commands (Close and Quit) without "What's This?" and In case of the Close command, the signal is connected to the close() slot of the respective ApplicationWindow object whilst the Quit command affects the entire application. -

Because ApplicationWindow is a TQWidget, the close() function +

Because ApplicationWindow is a TQWidget, the close() function triggers a call to closeEvent() which we will implement later.

@@ -320,7 +320,7 @@ will be aligned to the right if the windows system style requires it. commands. Depending on the style it will appear on the right hand side of the menu bar or not.

        e = new TQTextEdit( this, "editor" );
-        e->setFocus();
+        e->setFocus();
         setCentralWidget( e );
 

Now we create a simple text-editor, set the initial focus to it, @@ -334,7 +334,7 @@ our simple application is a text editor. :)

We make the statusbar say "Ready" for two seconds at startup, just to tell the user that the window has finished initialization and can be used. -

        resize( 450, 600 );
+

        resize( 450, 600 );
 

Finally it's time to resize the new window to a a nice default size.

    }
@@ -355,8 +355,8 @@ and used in the constructor.
 
    void ApplicationWindow::newDoc()
     {
         ApplicationWindow *ed = new ApplicationWindow;
-        ed->setCaption("TQt Example - Application");
-        ed->show();
+        ed->setCaption("TQt Example - Application");
+        ed->show();
     }
 

This slot, connected to the File|New menu item, simply creates a @@ -385,7 +385,7 @@ error message in the statusbar. TQTextStream ts( &f ); e->setText( ts.read() ); e->setModified( FALSE ); - setCaption( fileName ); + setCaption( fileName ); statusBar()->message( "Loaded document " + fileName, 2000 ); }

@@ -423,7 +423,7 @@ code in the load() function.

Tell the editor that the contents haven't been edited since the last save. When the user does some further editing and wishes to close the window without explicit saving, ApplicationWindow::closeEvent() will ask about it. -

        setCaption( filename );
+

        setCaption( filename );
 

It may be that the document was saved under a different name than the old caption suggests, so we set the window caption just to be sure. @@ -500,7 +500,7 @@ TQSimpleRichText page at a time.

Now let's see what happens when a user wishes to close() an ApplicationWindow.

-

    void ApplicationWindow::closeEvent( TQCloseEvent* ce )
+
    void ApplicationWindow::closeEvent( TQCloseEvent* ce )
     {
 

This event gets to process window system close events. A close event is -- cgit v1.2.3