diff options
Diffstat (limited to 'kchart/kchartWizardSetupAxesPage.cc')
-rw-r--r-- | kchart/kchartWizardSetupAxesPage.cc | 144 |
1 files changed, 72 insertions, 72 deletions
diff --git a/kchart/kchartWizardSetupAxesPage.cc b/kchart/kchartWizardSetupAxesPage.cc index 884188e2..3c48cbe9 100644 --- a/kchart/kchartWizardSetupAxesPage.cc +++ b/kchart/kchartWizardSetupAxesPage.cc @@ -2,12 +2,12 @@ #include "kchart_view.h" #include "kchart_part.h" -#include <qlabel.h> -#include <qframe.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqlayout.h> #include <klocale.h> #include <kfontdialog.h> #include <knumvalidator.h> @@ -15,143 +15,143 @@ #include <float.h> -#include <qspinbox.h> -#include <qpushbutton.h> -#include <qcolor.h> +#include <tqspinbox.h> +#include <tqpushbutton.h> +#include <tqcolor.h> #include "kchart_params.h" namespace KChart { -KChartWizardSetupAxesPage::KChartWizardSetupAxesPage( QWidget* parent, +KChartWizardSetupAxesPage::KChartWizardSetupAxesPage( TQWidget* tqparent, KChartPart* chart ) : - QWidget( parent ), + TQWidget( tqparent ), _chart( chart ) { chart3d=true; - QGridLayout *grid1 = new QGridLayout(this,2,2,KDialog::marginHint(), KDialog::spacingHint()); + TQGridLayout *grid1 = new TQGridLayout(this,2,2,KDialog::marginHint(), KDialog::spacingHint()); - QGroupBox* tmpQGroupBox; - tmpQGroupBox = new QGroupBox( this, "GroupBox_1" ); - tmpQGroupBox->setFrameStyle( 49 ); + TQGroupBox* tmpTQGroupBox; + tmpTQGroupBox = new TQGroupBox( this, "GroupBox_1" ); + tmpTQGroupBox->setFrameStyle( 49 ); - QGridLayout *grid2 = new QGridLayout(tmpQGroupBox,3,2,KDialog::marginHint(), KDialog::spacingHint()); + TQGridLayout *grid2 = new TQGridLayout(tmpTQGroupBox,3,2,KDialog::marginHint(), KDialog::spacingHint()); - //grid = new QCheckBox( i18n( "Has grid:" ), tmpQGroupBox ); - new QLabel( i18n( "Grid Lines" ), tmpQGroupBox ); - gridX = new QCheckBox( i18n( "X axis:" ), tmpQGroupBox ); - gridY = new QCheckBox( i18n( "Y axis:" ), tmpQGroupBox ); + //grid = new TQCheckBox( i18n( "Has grid:" ), tmpTQGroupBox ); + new TQLabel( i18n( "Grid Lines" ), tmpTQGroupBox ); + gridX = new TQCheckBox( i18n( "X axis:" ), tmpTQGroupBox ); + gridY = new TQCheckBox( i18n( "Y axis:" ), tmpTQGroupBox ); gridX->setChecked(_chart->params()->showGrid()); gridY->setChecked(_chart->params()->showGrid()); grid2->addWidget(gridX, 0, 0); grid2->addWidget(gridY, 1, 0); - gridColor=new KColorButton(tmpQGroupBox); + gridColor=new KColorButton(tmpTQGroupBox); // PENDING(kalle) Put back in // colorGrid=_chart->params()->GridColor; gridColor->setColor( colorGrid ); grid2->addWidget(gridColor, 0, 1); - border = new QCheckBox( i18n( "Border:" ), tmpQGroupBox ); + border = new TQCheckBox( i18n( "Border:" ), tmpTQGroupBox ); // PENDING(kalle) Put back in // border->setChecked( _chart->params()->border ); grid2->addWidget(border, 2, 0); border->setEnabled(false); - borderColor=new KColorButton(tmpQGroupBox); + borderColor=new KColorButton(tmpTQGroupBox); // PENDING(kalle) Put back in // colorBorder=_chart->params()->LineColor; borderColor->setColor( colorBorder ); grid2->addWidget(borderColor,2,1); borderColor->setEnabled(false); - grid1->addWidget(tmpQGroupBox,0,0); + grid1->addWidget(tmpTQGroupBox,0,0); - tmpQGroupBox = new QGroupBox( this, "GroupBox_2" ); - tmpQGroupBox->setFrameStyle( 49 ); + tmpTQGroupBox = new TQGroupBox( this, "GroupBox_2" ); + tmpTQGroupBox->setFrameStyle( 49 ); - grid2 = new QGridLayout(tmpQGroupBox,3,2,KDialog::marginHint(), KDialog::spacingHint()); + grid2 = new TQGridLayout(tmpTQGroupBox,3,2,KDialog::marginHint(), KDialog::spacingHint()); - QLabel *tmpLabel; - tmpLabel=new QLabel(tmpQGroupBox); + TQLabel *tmpLabel; + tmpLabel=new TQLabel(tmpTQGroupBox); tmpLabel->setText(i18n("Angle 3D:")); grid2->addWidget(tmpLabel,0,0); - angle = new QSpinBox(1, 90, 1,tmpQGroupBox ); + angle = new TQSpinBox(1, 90, 1,tmpTQGroupBox ); angle->setValue( _chart->params()->threeDBarAngle() ); grid2->addWidget(angle,0,1); - tmpLabel=new QLabel(tmpQGroupBox); + tmpLabel=new TQLabel(tmpTQGroupBox); tmpLabel->setText(i18n("Depth 3D:")); grid2->addWidget(tmpLabel,1,0); - depth = new QSpinBox(1, 40, 1, tmpQGroupBox); + depth = new TQSpinBox(1, 40, 1, tmpTQGroupBox); depth->setValue( static_cast<int>( _chart->params()->threeDBarDepth() ) ); grid2->addWidget(depth,1,1); // Bar width is computed automatically in KDChart (and can be // changed via gaps) - // tmpLabel=new QLabel(tmpQGroupBox); + // tmpLabel=new TQLabel(tmpTQGroupBox); // tmpLabel->setText(i18n("Bar width:")); // grid2->addWidget(tmpLabel,2,0); -// barWidth = new QSpinBox(1, 200, 1, tmpQGroupBox); +// barWidth = new TQSpinBox(1, 200, 1, tmpTQGroupBox); // barWidth->setValue(_chart->params()->bar_width); // grid2->addWidget(barWidth,2,1); - grid1->addWidget(tmpQGroupBox,0,1); + grid1->addWidget(tmpTQGroupBox,0,1); - tmpQGroupBox = new QGroupBox( this, "GroupBox_3" ); - tmpQGroupBox->setFrameStyle( 49 ); + tmpTQGroupBox = new TQGroupBox( this, "GroupBox_3" ); + tmpTQGroupBox->setFrameStyle( 49 ); - grid2 = new QGridLayout(tmpQGroupBox,3,2,KDialog::marginHint(), KDialog::spacingHint()); + grid2 = new TQGridLayout(tmpTQGroupBox,3,2,KDialog::marginHint(), KDialog::spacingHint()); - tmpLabel=new QLabel(tmpQGroupBox); + tmpLabel=new TQLabel(tmpTQGroupBox); tmpLabel->setText(i18n("Y interval:")); grid2->addWidget(tmpLabel,0,0); - QString tmp; - y_interval=new QLineEdit(tmpQGroupBox); + TQString tmp; + y_interval=new TQLineEdit(tmpTQGroupBox); y_interval->setValidator(new KFloatValidator( y_interval)); grid2->addWidget(y_interval,0,1); // PENDING(kalle) Put back in // if( _chart->params()->requested_yinterval != -DBL_MAX) // y_interval->setText( tmp.setNum(_chart->params()->requested_yinterval)); - tmpLabel=new QLabel(tmpQGroupBox); + tmpLabel=new TQLabel(tmpTQGroupBox); tmpLabel->setText(i18n("Y min:")); grid2->addWidget(tmpLabel,1,0); - y_min=new QLineEdit(tmpQGroupBox); + y_min=new TQLineEdit(tmpTQGroupBox); y_min->setValidator(new KFloatValidator( y_min)); grid2->addWidget(y_min,1,1); // PENDING(kalle) Put back in // if( _chart->params()->requested_ymin != DBL_MAX) // y_min->setText( tmp.setNum(_chart->params()->requested_ymin)); - tmpLabel=new QLabel(tmpQGroupBox); + tmpLabel=new TQLabel(tmpTQGroupBox); tmpLabel->setText(i18n("Y max:")); grid2->addWidget(tmpLabel,2,0); - y_max=new QLineEdit(tmpQGroupBox); + y_max=new TQLineEdit(tmpTQGroupBox); y_max->setValidator(new KFloatValidator( y_max)); grid2->addWidget(y_max,2,1); // PENDING(kalle) Put back in // if( _chart->params()->requested_ymax != -DBL_MAX) // y_max->setText( tmp.setNum(_chart->params()->requested_ymax)); - grid1->addWidget(tmpQGroupBox,1,0); - tmpQGroupBox->setEnabled(false); + grid1->addWidget(tmpTQGroupBox,1,0); + tmpTQGroupBox->setEnabled(false); - tmpQGroupBox = new QGroupBox( this, "GroupBox_3" ); - tmpQGroupBox->setFrameStyle( 49 ); + tmpTQGroupBox = new TQGroupBox( this, "GroupBox_3" ); + tmpTQGroupBox->setFrameStyle( 49 ); - grid2 = new QGridLayout(tmpQGroupBox,3,2,KDialog::marginHint(), KDialog::spacingHint()); + grid2 = new TQGridLayout(tmpTQGroupBox,3,2,KDialog::marginHint(), KDialog::spacingHint()); - tmpLabel=new QLabel(tmpQGroupBox); + tmpLabel=new TQLabel(tmpTQGroupBox); tmpLabel->setText(i18n("Y-label format:")); grid2->addWidget(tmpLabel,0,0); - ylabel_fmt=new QLineEdit(tmpQGroupBox); + ylabel_fmt=new TQLineEdit(tmpTQGroupBox); grid2->addWidget(ylabel_fmt,0,1); // PENDING(kalle) Put back in @@ -159,24 +159,24 @@ KChartWizardSetupAxesPage::KChartWizardSetupAxesPage( QWidget* parent, // int len=_chart->params()->ylabel_fmt.length(); // ylabel_fmt->setText(_chart->params()->ylabel_fmt.right(len-3)); // } - ylabelFont = new QPushButton( tmpQGroupBox); + ylabelFont = new TQPushButton( tmpTQGroupBox); grid2->addWidget(ylabelFont,1,0); ylabelFont->setText(i18n("Font...")); // PENDING(kalle) Put back in // ylabel=_chart->params()->yAxisFont(); - ylabelColor=new KColorButton(tmpQGroupBox); + ylabelColor=new KColorButton(tmpTQGroupBox); grid2->addWidget(ylabelColor,1,1); // PENDING(kalle) Put back in // ycolor=_chart->params()->YLabelColor; ylabelColor->setColor( ycolor ); #if 0 - tmpLabel=new QLabel(tmpQGroupBox); + tmpLabel=new TQLabel(tmpTQGroupBox); tmpLabel->setText(i18n("Y-label 2 format:")); grid2->addWidget(tmpLabel,2,0); - ylabel2_fmt=new QLineEdit(tmpQGroupBox); + ylabel2_fmt=new TQLineEdit(tmpTQGroupBox); grid2->addWidget(ylabel2_fmt,2,1); // PENDING(kalle) Put back in // if( !_chart->params()->ylabel2_fmt.isEmpty()) { @@ -184,20 +184,20 @@ KChartWizardSetupAxesPage::KChartWizardSetupAxesPage( QWidget* parent, // ylabel2_fmt->setText(_chart->params()->ylabel2_fmt.right(len-3)); // } #endif - tmpQGroupBox->setEnabled(false); - grid1->addWidget(tmpQGroupBox,1,1); + tmpTQGroupBox->setEnabled(false); + grid1->addWidget(tmpTQGroupBox,1,1); - connect(ylabelFont,SIGNAL(clicked()),this,SLOT(changeLabelFont())); + connect(ylabelFont,TQT_SIGNAL(clicked()),this,TQT_SLOT(changeLabelFont())); - connect(ylabelColor,SIGNAL(changed( const QColor & )), - this,SLOT(changeLabelColor(const QColor &))); - connect(borderColor,SIGNAL(changed( const QColor & )), - this,SLOT(changeBorderColor(const QColor &))); - connect(gridColor,SIGNAL(changed( const QColor & )), - this,SLOT(changeGridColor(const QColor &))); + connect(ylabelColor,TQT_SIGNAL(changed( const TQColor & )), + this,TQT_SLOT(changeLabelColor(const TQColor &))); + connect(borderColor,TQT_SIGNAL(changed( const TQColor & )), + this,TQT_SLOT(changeBorderColor(const TQColor &))); + connect(gridColor,TQT_SIGNAL(changed( const TQColor & )), + this,TQT_SLOT(changeGridColor(const TQColor &))); } @@ -206,28 +206,28 @@ KChartWizardSetupAxesPage::~KChartWizardSetupAxesPage() // _chart->removeAutoUpdate( preview ); } -void KChartWizardSetupAxesPage::changeLabelColor(const QColor &_color) +void KChartWizardSetupAxesPage::changeLabelColor(const TQColor &_color) { ycolor=_color; } -void KChartWizardSetupAxesPage::changeBorderColor(const QColor &_color) +void KChartWizardSetupAxesPage::changeBorderColor(const TQColor &_color) { colorBorder=_color; } -void KChartWizardSetupAxesPage::changeGridColor(const QColor &_color) +void KChartWizardSetupAxesPage::changeGridColor(const TQColor &_color) { colorGrid=_color; } void KChartWizardSetupAxesPage::changeLabelFont() { - if( KFontDialog::getFont( ylabel,false,this ) == QDialog::Rejected ) + if( KFontDialog::getFont( ylabel,false,this ) == TQDialog::Rejected ) return; } -void KChartWizardSetupAxesPage::paintEvent( QPaintEvent *) +void KChartWizardSetupAxesPage::paintEvent( TQPaintEvent *) { if(chart3d) { angle->setEnabled(true); @@ -277,7 +277,7 @@ void KChartWizardSetupAxesPage::apply() _chart->params()->setThreeDBarAngle( angle->value() ); // PENDING(kalle) Put back in // if(! ylabel_fmt->text().isEmpty()) { -// QString tmp="%g "+ylabel_fmt->text(); +// TQString tmp="%g "+ylabel_fmt->text(); // _chart->params()->ylabel_fmt=tmp; // } else { // _chart->params()->ylabel_fmt=""; @@ -289,7 +289,7 @@ void KChartWizardSetupAxesPage::apply() _chart->params()->setThreeDBarDepth( depth->value() ); // PENDING(kalle) Put back in // if(! ylabel2_fmt->text().isEmpty()) { -// QString tmp="%g "+ylabel2_fmt->text(); +// TQString tmp="%g "+ylabel2_fmt->text(); // _chart->params()->ylabel2_fmt=tmp; // } else { // _chart->params()->ylabel2_fmt=""; |