From 82ecd83484c9fa1ede059986ab771e74e33e68ef Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 16 Aug 2024 19:11:00 +0900 Subject: Rename layout nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/tutorial2-08.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'doc/html/tutorial2-08.html') diff --git a/doc/html/tutorial2-08.html b/doc/html/tutorial2-08.html index 210da5231..5feb2b199 100644 --- a/doc/html/tutorial2-08.html +++ b/doc/html/tutorial2-08.html @@ -65,8 +65,8 @@ enter label text and choose a label color for each label. TQPushButton *cancelPushButton; protected: - TQVBoxLayout *tableButtonBox; - TQHBoxLayout *buttonBox; + TQVBoxLayout *tableButtonBox; + TQHBoxLayout *buttonBox; private: ElementVector *m_elements; @@ -104,7 +104,7 @@ member functions. resize( 540, 440 );

We set a caption for the dialog and resize it. -

        tableButtonBox = new TQVBoxLayout( this, 11, 6, "table button box layout" );
+

        tableButtonBox = new TQVBoxLayout( this, 11, 6, "table button box layout" );
 

The layout of the form is quite simple. The buttons will be grouped together in a horizontal layout and the table and the button layout @@ -126,7 +126,7 @@ will be grouped together vertically using the tableButtonBox layout. th->setLabel( 2, "Pattern" ); th->setLabel( 3, "Label" ); th->setLabel( 4, "Color" ); - tableButtonBox->addWidget( table ); + tableButtonBox->addWidget( table );

We create a new TQTable with five columns, and the same number of rows as we have elements in the elements vector. We make the color and @@ -136,37 +136,37 @@ navigating to a color and clicking the Color button. The pattern will be in a combobox, changeable simply by the user selecting a different pattern. Next we set suitable initial widths, insert labels for each column and finally add the table to the tableButtonBox layout. -

        buttonBox = new TQHBoxLayout( 0, 0, 6, "button box layout" );
+

        buttonBox = new TQHBoxLayout( 0, 0, 6, "button box layout" );
 

We create a horizontal box layout to hold the buttons.

        colorPushButton = new TQPushButton( this, "color button" );
         colorPushButton->setText( "&Color..." );
         colorPushButton->setEnabled( FALSE );
-        buttonBox->addWidget( colorPushButton );
+        buttonBox->addWidget( colorPushButton );
 

We create a color button and add it to the buttonBox layout. We disable the button; we will only enable it when the focus is actually on a color cell. -

        TQSpacerItem *spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding,
+

        TQSpacerItem *spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding,
                                                      TQSizePolicy::Minimum );
-        buttonBox->addItem( spacer );
+        buttonBox->addItem( spacer );
 

Since we want to separate the color button from the OK and Cancel buttons we next create a spacer and add that to the buttonBox layout.

        okPushButton = new TQPushButton( this, "ok button" );
         okPushButton->setText( "OK" );
         okPushButton->setDefault( TRUE );
-        buttonBox->addWidget( okPushButton );
+        buttonBox->addWidget( okPushButton );
 
         cancelPushButton = new TQPushButton( this, "cancel button" );
         cancelPushButton->setText( "Cancel" );
         cancelPushButton->setAccel( Key_Escape );
-        buttonBox->addWidget( cancelPushButton );
+        buttonBox->addWidget( cancelPushButton );
 

The OK and Cancel buttons are created and added to the buttonBox. We make the OK button the dialog's default button, and we make the Esc key an accelerator for the Cancel button. -

        tableButtonBox->addLayout( buttonBox );
+

        tableButtonBox->addLayout( buttonBox );
 

We add the buttonBox layout to the tableButtonBox and the layout is complete. -- cgit v1.2.3