diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-07-01 22:09:14 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-07-08 08:53:47 +0900 |
| commit | c03a4800879ab62692e017e01c825ba12a421ad0 (patch) | |
| tree | 57aeff4300eb9fa64d193569f56b2d98305b49a2 /examples/chart | |
| parent | 030b165ac197ce4c2eb62c7700dc4c10604637aa (diff) | |
| download | tqt-c03a4800879ab62692e017e01c825ba12a421ad0.tar.gz tqt-c03a4800879ab62692e017e01c825ba12a421ad0.zip | |
Replace TRUE/FALSE with boolean values true/false - part 2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'examples/chart')
| -rw-r--r-- | examples/chart/canvasview.cpp | 2 | ||||
| -rw-r--r-- | examples/chart/chartform.cpp | 28 | ||||
| -rw-r--r-- | examples/chart/chartform.h | 2 | ||||
| -rw-r--r-- | examples/chart/chartform_files.cpp | 6 | ||||
| -rw-r--r-- | examples/chart/optionsform.cpp | 6 | ||||
| -rw-r--r-- | examples/chart/optionsform.h | 2 | ||||
| -rw-r--r-- | examples/chart/setdataform.cpp | 10 | ||||
| -rw-r--r-- | examples/chart/setdataform.h | 2 |
8 files changed, 29 insertions, 29 deletions
diff --git a/examples/chart/canvasview.cpp b/examples/chart/canvasview.cpp index 19a197179..8207bc4e5 100644 --- a/examples/chart/canvasview.cpp +++ b/examples/chart/canvasview.cpp @@ -40,7 +40,7 @@ void CanvasView::contentsMouseMoveEvent( TQMouseEvent *e ) m_movingItem->moveBy( offset.x(), offset.y() ); m_pos = e->pos(); ChartForm *form = (ChartForm*)parent(); - form->setChanged( TRUE ); + form->setChanged( true ); int chartType = form->chartType(); CanvasText *item = (CanvasText*)m_movingItem; int i = item->index(); diff --git a/examples/chart/chartform.cpp b/examples/chart/chartform.cpp index d585c4f78..98ac96f6b 100644 --- a/examples/chart/chartform.cpp +++ b/examples/chart/chartform.cpp @@ -95,23 +95,23 @@ ChartForm::ChartForm( const TQString& filename ) TQActionGroup *chartGroup = new TQActionGroup( this ); // Connected later - chartGroup->setExclusive( TRUE ); + chartGroup->setExclusive( true ); optionsPieChartAction = new TQAction( "Pie Chart", TQPixmap( options_piechart ), "&Pie Chart", CTRL+Key_I, chartGroup, "pie chart" ); - optionsPieChartAction->setToggleAction( TRUE ); + optionsPieChartAction->setToggleAction( true ); optionsHorizontalBarChartAction = new TQAction( "Horizontal Bar Chart", TQPixmap( options_horizontalbarchart ), "&Horizontal Bar Chart", CTRL+Key_H, chartGroup, "horizontal bar chart" ); - optionsHorizontalBarChartAction->setToggleAction( TRUE ); + optionsHorizontalBarChartAction->setToggleAction( true ); optionsVerticalBarChartAction = new TQAction( "Vertical Bar Chart", TQPixmap( options_verticalbarchart ), "&Vertical Bar Chart", CTRL+Key_V, chartGroup, "Vertical bar chart" ); - optionsVerticalBarChartAction->setToggleAction( TRUE ); + optionsVerticalBarChartAction->setToggleAction( true ); optionsSetFontAction = new TQAction( @@ -252,7 +252,7 @@ void ChartForm::init() { setCaption( "Chart" ); m_filename = TQString::null; - m_changed = FALSE; + m_changed = false; m_elements[0] = Element( Element::INVALID, red ); m_elements[1] = Element( Element::INVALID, cyan ); @@ -392,13 +392,13 @@ bool ChartForm::okToClear() break; case 1: // Cancel default: - return FALSE; + return false; case 2: // Abandon break; } } - return TRUE; + return true; } @@ -424,7 +424,7 @@ void ChartForm::optionsSetData() { SetDataForm *setDataForm = new SetDataForm( &m_elements, m_decimalPlaces, this ); if ( setDataForm->exec() ) { - m_changed = TRUE; + m_changed = true; drawElements(); } delete setDataForm; @@ -436,13 +436,13 @@ void ChartForm::setChartType( ChartType chartType ) m_chartType = chartType; switch ( m_chartType ) { case PIE: - optionsPieChartAction->setOn( TRUE ); + optionsPieChartAction->setOn( true ); break; case VERTICAL_BAR: - optionsVerticalBarChartAction->setOn( TRUE ); + optionsVerticalBarChartAction->setOn( true ); break; case HORIZONTAL_BAR: - optionsHorizontalBarChartAction->setOn( TRUE ); + optionsHorizontalBarChartAction->setOn( true ); break; } } @@ -482,13 +482,13 @@ void ChartForm::optionsSetOptions() optionsForm->setFont( m_font ); switch ( m_addValues ) { case NO: - optionsForm->noRadioButton->setChecked( TRUE ); + optionsForm->noRadioButton->setChecked( true ); break; case YES: - optionsForm->yesRadioButton->setChecked( TRUE ); + optionsForm->yesRadioButton->setChecked( true ); break; case AS_PERCENTAGE: - optionsForm->asPercentageRadioButton->setChecked( TRUE ); + optionsForm->asPercentageRadioButton->setChecked( true ); break; } optionsForm->decimalPlacesSpinBox->setValue( m_decimalPlaces ); diff --git a/examples/chart/chartform.h b/examples/chart/chartform.h index dde411bd3..04622ee58 100644 --- a/examples/chart/chartform.h +++ b/examples/chart/chartform.h @@ -29,7 +29,7 @@ public: ~ChartForm(); int chartType() { return m_chartType; } - void setChanged( bool changed = TRUE ) { m_changed = changed; } + void setChanged( bool changed = true ) { m_changed = changed; } void drawElements(); TQPopupMenu *optionsMenu; // Why public? See canvasview.cpp diff --git a/examples/chart/chartform_files.cpp b/examples/chart/chartform_files.cpp index 7c3feeb5d..16205106d 100644 --- a/examples/chart/chartform_files.cpp +++ b/examples/chart/chartform_files.cpp @@ -52,7 +52,7 @@ void ChartForm::load( const TQString& filename ) updateRecentFiles( filename ); drawElements(); - m_changed = FALSE; + m_changed = false; } @@ -78,7 +78,7 @@ void ChartForm::fileSave() setCaption( TQString( "Chart -- %1" ).arg( m_filename ) ); statusBar()->message( TQString( "Saved \'%1\'" ).arg( m_filename ), 2000 ); - m_changed = FALSE; + m_changed = false; } @@ -104,7 +104,7 @@ void ChartForm::filePrint() if ( m_printer->setup() ) { TQPainter painter( m_printer ); m_canvas->drawArea( TQRect( 0, 0, m_canvas->width(), m_canvas->height() ), - &painter, FALSE ); + &painter, false ); if ( !m_printer->outputFileName().isEmpty() ) statusBar()->message( TQString( "Printed \'%1\'" ). arg( m_printer->outputFileName() ), 2000 ); diff --git a/examples/chart/optionsform.cpp b/examples/chart/optionsform.cpp index 731447e48..2b65eaeec 100644 --- a/examples/chart/optionsform.cpp +++ b/examples/chart/optionsform.cpp @@ -30,7 +30,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name, chartTypeTextLabel = new TQLabel( "&Chart Type", this ); chartTypeLayout->addWidget( chartTypeTextLabel ); - chartTypeComboBox = new TQComboBox( FALSE, this ); + chartTypeComboBox = new TQComboBox( false, this ); chartTypeComboBox->insertItem( TQPixmap( options_piechart ), "Pie Chart" ); chartTypeComboBox->insertItem( TQPixmap( options_verticalbarchart ), "Vertical Bar Chart" ); @@ -66,7 +66,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name, addValuesButtonGroupLayout->setAlignment( TQt::AlignTop ); noRadioButton = new TQRadioButton( "&No", addValuesButtonGroup ); - noRadioButton->setChecked( TRUE ); + noRadioButton->setChecked( true ); addValuesButtonGroupLayout->addWidget( noRadioButton ); yesRadioButton = new TQRadioButton( "&Yes", addValuesButtonGroup ); @@ -97,7 +97,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name, buttonsLayout->addItem( spacer ); okPushButton = new TQPushButton( "OK", this ); - okPushButton->setDefault( TRUE ); + okPushButton->setDefault( true ); buttonsLayout->addWidget( okPushButton ); cancelPushButton = new TQPushButton( "Cancel", this ); diff --git a/examples/chart/optionsform.h b/examples/chart/optionsform.h index 93454721a..709f3c1ef 100644 --- a/examples/chart/optionsform.h +++ b/examples/chart/optionsform.h @@ -20,7 +20,7 @@ class OptionsForm : public TQDialog TQ_OBJECT public: OptionsForm( TQWidget* parent = 0, const char* name = "options form", - bool modal = FALSE, WFlags f = 0 ); + bool modal = false, WFlags f = 0 ); ~OptionsForm() {} TQFont font() const { return m_font; } diff --git a/examples/chart/setdataform.cpp b/examples/chart/setdataform.cpp index 0e62e0352..de357abd7 100644 --- a/examples/chart/setdataform.cpp +++ b/examples/chart/setdataform.cpp @@ -43,9 +43,9 @@ SetDataForm::SetDataForm( ElementVector *elements, int decimalPlaces, 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->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 ); @@ -63,7 +63,7 @@ SetDataForm::SetDataForm( ElementVector *elements, int decimalPlaces, colorPushButton = new TQPushButton( this, "color button" ); colorPushButton->setText( "&Color..." ); - colorPushButton->setEnabled( FALSE ); + colorPushButton->setEnabled( false ); buttonBox->addWidget( colorPushButton ); TQSpacerItem *spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, @@ -72,7 +72,7 @@ SetDataForm::SetDataForm( ElementVector *elements, int decimalPlaces, okPushButton = new TQPushButton( this, "ok button" ); okPushButton->setText( "OK" ); - okPushButton->setDefault( TRUE ); + okPushButton->setDefault( true ); buttonBox->addWidget( okPushButton ); cancelPushButton = new TQPushButton( this, "cancel button" ); diff --git a/examples/chart/setdataform.h b/examples/chart/setdataform.h index 49867679e..4cf7a4f9b 100644 --- a/examples/chart/setdataform.h +++ b/examples/chart/setdataform.h @@ -17,7 +17,7 @@ class SetDataForm: public TQDialog public: SetDataForm( ElementVector *elements, int decimalPlaces, TQWidget *parent = 0, const char *name = "set data form", - bool modal = TRUE, WFlags f = 0 ); + bool modal = true, WFlags f = 0 ); ~SetDataForm() {} public slots: |
