From fef846914f8db6dc117e206ef913d519bf6bb33e Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 29 Jul 2024 12:43:23 +0900 Subject: Rename basic widget nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/tutorial2-09.html | 48 +++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'doc/html/tutorial2-09.html') diff --git a/doc/html/tutorial2-09.html b/doc/html/tutorial2-09.html index 174c2d3e1..4f86c92ef 100644 --- a/doc/html/tutorial2-09.html +++ b/doc/html/tutorial2-09.html @@ -39,7 +39,7 @@ apply to all data sets in one place.

(Extracts from optionsform.h.)

-

    class OptionsForm : public TQDialog
+
    class OptionsForm : public TQDialog
     {
         TQ_OBJECT
     public:
@@ -51,18 +51,18 @@ apply to all data sets in one place.
         void setFont( TQFont font );
 
         TQLabel *chartTypeTextLabel;
-        TQComboBox *chartTypeComboBox;
-        TQPushButton *fontPushButton;
+        TQComboBox *chartTypeComboBox;
+        TQPushButton *fontPushButton;
         TQLabel *fontTextLabel;
         TQFrame *addValuesFrame;
         TQButtonGroup *addValuesButtonGroup;
-        TQRadioButton *noRadioButton;
-        TQRadioButton *yesRadioButton;
-        TQRadioButton *asPercentageRadioButton;
+        TQRadioButton *noRadioButton;
+        TQRadioButton *yesRadioButton;
+        TQRadioButton *asPercentageRadioButton;
         TQLabel *decimalPlacesTextLabel;
-        TQSpinBox *decimalPlacesSpinBox;
-        TQPushButton *okPushButton;
-        TQPushButton *cancelPushButton;
+        TQSpinBox *decimalPlacesSpinBox;
+        TQPushButton *okPushButton;
+        TQPushButton *cancelPushButton;
 
     protected slots:
         void chooseFont();
@@ -97,12 +97,12 @@ things based on the changes the user makes.
 
 

    OptionsForm::OptionsForm( TQWidget* parent, const char* name,
                               bool modal, WFlags f )
-        : TQDialog( parent, name, modal, f )
+        : TQDialog( parent, name, modal, f )
     {
         setCaption( "Chart -- Options" );
         resize( 320, 290 );
 
-

We pass all the arguments on to the TQDialog constructor, set a caption +

We pass all the arguments on to the TQDialog constructor, set a caption and set an initial size.

The layout of the form will be to have the chart type label and combo box in a horizontal box layout, and similarly for the font button and @@ -120,11 +120,11 @@ vertical box layout.

        chartTypeTextLabel = new TQLabel( "&Chart Type", this );
         chartTypeLayout->addWidget( chartTypeTextLabel );
 
-        chartTypeComboBox = new TQComboBox( FALSE, this );
-        chartTypeComboBox->insertItem( TQPixmap( options_piechart ), "Pie Chart" );
-        chartTypeComboBox->insertItem( TQPixmap( options_verticalbarchart ),
+        chartTypeComboBox = new TQComboBox( FALSE, this );
+        chartTypeComboBox->insertItem( TQPixmap( options_piechart ), "Pie Chart" );
+        chartTypeComboBox->insertItem( TQPixmap( options_verticalbarchart ),
                                        "Vertical Bar Chart" );
-        chartTypeComboBox->insertItem( TQPixmap( options_horizontalbarchart ),
+        chartTypeComboBox->insertItem( TQPixmap( options_horizontalbarchart ),
                                        "Horizontal Bar Chart" );
         chartTypeLayout->addWidget( chartTypeComboBox );
         optionsFormLayout->addLayout( chartTypeLayout );
@@ -136,7 +136,7 @@ to the horizontal layout and add the horizontal layout to the form's
 vertical layout.
 

        fontLayout = new TQHBoxLayout( 0, 0, 6 );
 
-        fontPushButton = new TQPushButton( "&Font...", this );
+        fontPushButton = new TQPushButton( "&Font...", this );
         fontLayout->addWidget( fontPushButton );
         TQSpacerItem* spacer = new TQSpacerItem( 0, 0,
                                                TQSizePolicy::Expanding,
@@ -164,14 +164,14 @@ know what font the user is using).
                                             addValuesButtonGroup->layout() );
         addValuesButtonGroupLayout->setAlignment( TQt::AlignTop );
 
-        noRadioButton = new TQRadioButton( "&No", addValuesButtonGroup );
-        noRadioButton->setChecked( TRUE );
+        noRadioButton = new TQRadioButton( "&No", addValuesButtonGroup );
+        noRadioButton->setChecked( TRUE );
         addValuesButtonGroupLayout->addWidget( noRadioButton );
 
-        yesRadioButton = new TQRadioButton( "&Yes", addValuesButtonGroup );
+        yesRadioButton = new TQRadioButton( "&Yes", addValuesButtonGroup );
         addValuesButtonGroupLayout->addWidget( yesRadioButton );
 
-        asPercentageRadioButton = new TQRadioButton( "As &Percentage",
+        asPercentageRadioButton = new TQRadioButton( "As &Percentage",
                                                     addValuesButtonGroup );
         addValuesButtonGroupLayout->addWidget( asPercentageRadioButton );
         addValuesFrameLayout->addWidget( addValuesButtonGroup );
@@ -186,17 +186,17 @@ create the radio buttons, making "No" the default.
 horizontal layouts, and the buttons are laid out in a very similar way
 to the buttons in the set data form.
 

        connect( fontPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( chooseFont() ) );
-        connect( okPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
-        connect( cancelPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
+        connect( okPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
+        connect( cancelPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
 

We only need three connections:

  1. When the user clicks the font button we execute our own chooseFont() slot. -
  2. If the user clicks OK we call TQDialog::accept(); it is up to the +
  3. If the user clicks OK we call TQDialog::accept(); it is up to the caller to read the data from the dialog's widgets and perform any necessary actions. -
  4. If the user clicks Cancel we call TQDialog::reject(). +
  5. If the user clicks Cancel we call TQDialog::reject().

        chartTypeTextLabel->setBuddy( chartTypeComboBox );
         decimalPlacesTextLabel->setBuddy( decimalPlacesSpinBox );
-- 
cgit v1.2.3