From 42957a3f812a1db64a9ae452baa2d3fbc35f2466 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 12 Aug 2024 22:02:11 +0900 Subject: Rename more widget nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/chart-setdataform-cpp.html | 100 ++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'doc/html/chart-setdataform-cpp.html') diff --git a/doc/html/chart-setdataform-cpp.html b/doc/html/chart-setdataform-cpp.html index c181d80ee..be4e67b53 100644 --- a/doc/html/chart-setdataform-cpp.html +++ b/doc/html/chart-setdataform-cpp.html @@ -40,7 +40,7 @@ body { background: #ffffff; color: black; } #include <ntqlayout.h> #include <tqpixmap.h> #include <tqpushbutton.h> -#include <ntqtable.h> +#include <tqtable.h> #include "images/pattern01.xpm" #include "images/pattern02.xpm" @@ -74,29 +74,29 @@ const int MAX_PATTERNS = 14; tableButtonBox = new TQVBoxLayout( this, 11, 6, "table button box layout" ); - table = new TQTable( this, "data table" ); - table->setNumCols( 5 ); - table->setNumRows( ChartForm::MAX_ELEMENTS ); - table->setColumnReadOnly( 1, TRUE ); - table->setColumnReadOnly( 2, TRUE ); - table->setColumnReadOnly( 4, TRUE ); - table->setColumnWidth( 0, 80 ); - table->setColumnWidth( 1, 60 ); // Columns 1 and 4 must be equal - table->setColumnWidth( 2, 60 ); - table->setColumnWidth( 3, 200 ); - table->setColumnWidth( 4, 60 ); - TQHeader *th = table->horizontalHeader(); - th->setLabel( 0, "Value" ); - th->setLabel( 1, "Color" ); - th->setLabel( 2, "Pattern" ); - th->setLabel( 3, "Label" ); - th->setLabel( 4, "Color" ); + table = new TQTable( this, "data table" ); + table->setNumCols( 5 ); + table->setNumRows( ChartForm::MAX_ELEMENTS ); + table->setColumnReadOnly( 1, TRUE ); + table->setColumnReadOnly( 2, TRUE ); + table->setColumnReadOnly( 4, TRUE ); + table->setColumnWidth( 0, 80 ); + table->setColumnWidth( 1, 60 ); // Columns 1 and 4 must be equal + table->setColumnWidth( 2, 60 ); + table->setColumnWidth( 3, 200 ); + table->setColumnWidth( 4, 60 ); + TQHeader *th = table->horizontalHeader(); + th->setLabel( 0, "Value" ); + th->setLabel( 1, "Color" ); + th->setLabel( 2, "Pattern" ); + th->setLabel( 3, "Label" ); + th->setLabel( 4, "Color" ); tableButtonBox->addWidget( table ); buttonBox = new TQHBoxLayout( 0, 0, 6, "button box layout" ); colorPushButton = new TQPushButton( this, "color button" ); - colorPushButton->setText( "&Color..." ); + colorPushButton->setText( "&Color..." ); colorPushButton->setEnabled( FALSE ); buttonBox->addWidget( colorPushButton ); @@ -105,26 +105,26 @@ const int MAX_PATTERNS = 14; buttonBox->addItem( spacer ); okPushButton = new TQPushButton( this, "ok button" ); - okPushButton->setText( "OK" ); + okPushButton->setText( "OK" ); okPushButton->setDefault( TRUE ); buttonBox->addWidget( okPushButton ); cancelPushButton = new TQPushButton( this, "cancel button" ); - cancelPushButton->setText( "Cancel" ); - cancelPushButton->setAccel( Key_Escape ); + cancelPushButton->setText( "Cancel" ); + cancelPushButton->setAccel( Key_Escape ); buttonBox->addWidget( cancelPushButton ); tableButtonBox->addLayout( buttonBox ); - connect( table, TQ_SIGNAL( clicked(int,int,int,const TQPoint&) ), + connect( table, TQ_SIGNAL( clicked(int,int,int,const TQPoint&) ), this, TQ_SLOT( setColor(int,int) ) ); - connect( table, TQ_SIGNAL( currentChanged(int,int) ), + connect( table, TQ_SIGNAL( currentChanged(int,int) ), this, TQ_SLOT( currentChanged(int,int) ) ); - connect( table, TQ_SIGNAL( valueChanged(int,int) ), + connect( table, TQ_SIGNAL( valueChanged(int,int) ), this, TQ_SLOT( valueChanged(int,int) ) ); - connect( colorPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( setColor() ) ); - connect( okPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) ); - connect( cancelPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) ); + connect( colorPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( setColor() ) ); + connect( okPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) ); + connect( cancelPushButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) ); TQPixmap patterns[MAX_PATTERNS]; patterns[0] = TQPixmap( pattern01 ); @@ -142,35 +142,35 @@ const int MAX_PATTERNS = 14; patterns[12] = TQPixmap( pattern13 ); patterns[13] = TQPixmap( pattern14 ); - TQRect rect = table->cellRect( 0, 1 ); + TQRect rect = table->cellRect( 0, 1 ); TQPixmap pix( rect.width(), rect.height() ); for ( int i = 0; i < ChartForm::MAX_ELEMENTS; ++i ) { Element element = (*m_elements)[i]; if ( element.isValid() ) - table->setText( + table->setText( i, 0, TQString( "%1" ).arg( element.value(), 0, 'f', m_decimalPlaces ) ); TQColor color = element.valueColor(); pix.fill( color ); - table->setPixmap( i, 1, pix ); - table->setText( i, 1, color.name() ); + table->setPixmap( i, 1, pix ); + table->setText( i, 1, color.name() ); TQComboBox *combobox = new TQComboBox; for ( int j = 0; j < MAX_PATTERNS; ++j ) combobox->insertItem( patterns[j] ); combobox->setCurrentItem( element.valuePattern() - 1 ); - table->setCellWidget( i, 2, combobox ); + table->setCellWidget( i, 2, combobox ); - table->setText( i, 3, element.label() ); + table->setText( i, 3, element.label() ); color = element.labelColor(); pix.fill( color ); - table->setPixmap( i, 4, pix ); - table->setText( i, 4, color.name() ); + table->setPixmap( i, 4, pix ); + table->setText( i, 4, color.name() ); } } @@ -186,20 +186,20 @@ void SetDataForm::valueChanged( int row, int col ) { if ( col == 0 ) { bool ok; - double d = table->text( row, col ).toDouble( &ok ); + double d = table->text( row, col ).toDouble( &ok ); if ( ok && d > EPSILON ) - table->setText( + table->setText( row, col, TQString( "%1" ).arg( d, 0, 'f', m_decimalPlaces ) ); - else if ( !table->text( row, col ).isEmpty() ) - table->setText( row, col, table->text( row, col ) + "?" ); + else if ( !table->text( row, col ).isEmpty() ) + table->setText( row, col, table->text( row, col ) + "?" ); } } void SetDataForm::setColor() { - setColor( table->currentRow(), table->currentColumn() ); + setColor( table->currentRow(), table->currentColumn() ); table->setFocus(); } @@ -210,13 +210,13 @@ void SetDataForm::setColor( int row, int col ) return; TQColor color = TQColorDialog::getColor( - TQColor( table->text( row, col ) ), + TQColor( table->text( row, col ) ), this, "color dialog" ); if ( color.isValid() ) { - TQPixmap pix = table->pixmap( row, col ); + TQPixmap pix = table->pixmap( row, col ); pix.fill( color ); - table->setPixmap( row, col, pix ); - table->setText( row, col, color.name() ); + table->setPixmap( row, col, pix ); + table->setText( row, col, color.name() ); } } @@ -226,16 +226,16 @@ void SetDataForm::accept() bool ok; for ( int i = 0; i < ChartForm::MAX_ELEMENTS; ++i ) { Element &element = (*m_elements)[i]; - double d = table->text( i, 0 ).toDouble( &ok ); + double d = table->text( i, 0 ).toDouble( &ok ); if ( ok ) element.setValue( d ); else element.setValue( Element::INVALID ); - element.setValueColor( TQColor( table->text( i, 1 ) ) ); + element.setValueColor( TQColor( table->text( i, 1 ) ) ); element.setValuePattern( - ((TQComboBox*)table->cellWidget( i, 2 ))->currentItem() + 1 ); - element.setLabel( table->text( i, 3 ) ); - element.setLabelColor( TQColor( table->text( i, 4 ) ) ); + ((TQComboBox*)table->cellWidget( i, 2 ))->currentItem() + 1 ); + element.setLabel( table->text( i, 3 ) ); + element.setLabelColor( TQColor( table->text( i, 4 ) ) ); } TQDialog::accept(); -- cgit v1.2.3