diff options
Diffstat (limited to 'kspread/plugins/calculator')
-rw-r--r-- | kspread/plugins/calculator/configdlg.cpp | 62 | ||||
-rw-r--r-- | kspread/plugins/calculator/configdlg.h | 75 | ||||
-rw-r--r-- | kspread/plugins/calculator/dlabel.cpp | 8 | ||||
-rw-r--r-- | kspread/plugins/calculator/dlabel.h | 9 | ||||
-rw-r--r-- | kspread/plugins/calculator/kcalc.cpp | 576 | ||||
-rw-r--r-- | kspread/plugins/calculator/kcalc.h | 207 | ||||
-rw-r--r-- | kspread/plugins/calculator/kcalc_core.cpp | 170 | ||||
-rw-r--r-- | kspread/plugins/calculator/kcalctype.h | 2 | ||||
-rw-r--r-- | kspread/plugins/calculator/main.cpp | 34 | ||||
-rw-r--r-- | kspread/plugins/calculator/main.h | 22 | ||||
-rw-r--r-- | kspread/plugins/calculator/stats.cpp | 2 | ||||
-rw-r--r-- | kspread/plugins/calculator/stats.h | 10 |
12 files changed, 591 insertions, 586 deletions
diff --git a/kspread/plugins/calculator/configdlg.cpp b/kspread/plugins/calculator/configdlg.cpp index 9273b91a..545ddcb5 100644 --- a/kspread/plugins/calculator/configdlg.cpp +++ b/kspread/plugins/calculator/configdlg.cpp @@ -29,7 +29,7 @@ #include <klocale.h> #include <kdialog.h> -#include <qlayout.h> +#include <tqlayout.h> // Undefine HAVE_LONG_DOUBLE for Beta 4 since RedHat 5.0 comes with a borken // glibc @@ -38,21 +38,21 @@ #undef HAVE_LONG_DOUBLE #endif -ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct) - : QDialog(parent, name) +ConfigDlg::ConfigDlg(TQWidget *tqparent, const char *name, DefStruct *defstruct) + : TQDialog(tqparent, name) { defst = defstruct; - QVBoxLayout *lay1 = new QVBoxLayout( this ); + TQVBoxLayout *lay1 = new TQVBoxLayout( this ); lay1->setMargin( KDialog::marginHint() ); lay1->setSpacing( KDialog::spacingHint() ); - box = new QGroupBox(0, Qt::Vertical, i18n("Defaults"), this, "box"); - box->layout()->setSpacing(KDialog::spacingHint()); - box->layout()->setMargin(KDialog::marginHint()); + box = new TQGroupBox(0, Qt::Vertical, i18n("Defaults"), this, "box"); + box->tqlayout()->setSpacing(KDialog::spacingHint()); + box->tqlayout()->setMargin(KDialog::marginHint()); - QGridLayout *grid1 = new QGridLayout(box->layout(),8,2); - label1 = new QLabel(box); + TQGridLayout *grid1 = new TQGridLayout(box->tqlayout(),8,2); + label1 = new TQLabel(box); label1->setText(i18n("Foreground color:")); grid1->addWidget(label1,0,0); @@ -60,10 +60,10 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct) grid1->addWidget(button1,0,1); button1->setColor( defst->forecolor ); - connect(button1 , SIGNAL( changed( const QColor & ) ), - this, SLOT( set_fore_color( const QColor & ) ) ); + connect(button1 , TQT_SIGNAL( changed( const TQColor & ) ), + this, TQT_SLOT( set_fore_color( const TQColor & ) ) ); - label2 = new QLabel(box); + label2 = new TQLabel(box); grid1->addWidget(label2,1,0); label2->setText(i18n("Background color:")); @@ -71,14 +71,14 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct) grid1->addWidget(button2,1,1); button2->setColor( defst->backcolor ); - connect(button2 , SIGNAL( changed( const QColor & ) ), - this, SLOT( set_background_color( const QColor & ) ) ); + connect(button2 , TQT_SIGNAL( changed( const TQColor & ) ), + this, TQT_SLOT( set_background_color( const TQColor & ) ) ); - // connect(button2,SIGNAL(clicked()),this,SLOT(set_background_color())); + // connect(button2,TQT_SIGNAL(clicked()),this,TQT_SLOT(set_background_color())); - label5 = new QLabel(box); + label5 = new TQLabel(box); grid1->addWidget(label5,2,0); label5->setText(i18n("Precision:")); @@ -89,7 +89,7 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct) maxprec = 12 ; #endif - precspin = new QSpinBox( box ); + precspin = new TQSpinBox( box ); precspin->setRange( 0, maxprec ); grid1->addWidget(precspin,2,1); @@ -99,7 +99,7 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct) precspin->setValue(maxprec); - cb = new QCheckBox(box); + cb = new TQCheckBox(box); grid1->addWidget(cb,3,0); cb->setText(i18n("Set fixed precision at:")); if(defst->fixed) @@ -112,7 +112,7 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct) fixprec = 10 ; #endif - precspin2 = new QSpinBox( box ); + precspin2 = new TQSpinBox( box ); precspin2->setRange(0,fixprec); grid1->addWidget(precspin2,3,1); @@ -123,42 +123,42 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct) - cb2 = new QCheckBox(box); + cb2 = new TQCheckBox(box); grid1->addWidget(cb2,4,0); cb2->setText(i18n("Beep on error")); if(defst->beep) cb2->setChecked(true); - stylegroup = new QButtonGroup(box,"stylegroup"); + stylegroup = new TQButtonGroup(box,"stylegroup"); grid1->addMultiCellWidget(stylegroup,5,7,0,1); - stylegroup->setFrameStyle(QFrame::NoFrame); + stylegroup->setFrameStyle(TQFrame::NoFrame); - QGridLayout *grid2 = new QGridLayout(stylegroup,2,2,KDialog::marginHint(), KDialog::spacingHint()); + TQGridLayout *grid2 = new TQGridLayout(stylegroup,2,2,KDialog::marginHint(), KDialog::spacingHint()); - trigstyle = new QRadioButton(i18n("Trigonometry mode"),stylegroup,"trigstyle"); + trigstyle = new TQRadioButton(i18n("Trigonometry mode"),stylegroup,"trigstyle"); grid2->addWidget(trigstyle,0,0); trigstyle->adjustSize(); trigstyle->setChecked(defst->style == 0 ); - statstyle = new QRadioButton(i18n("Statistical mode"),stylegroup,"Stats"); + statstyle = new TQRadioButton(i18n("Statistical mode"),stylegroup,"Stats"); grid2->addWidget(statstyle,1,0); statstyle->adjustSize(); statstyle->setChecked(defst->style == 1 ); - sheetstyle = new QRadioButton(i18n("Sheet mode"),stylegroup,"Sheet"); + sheetstyle = new TQRadioButton(i18n("Sheet mode"),stylegroup,"Sheet"); grid2->addWidget(sheetstyle,2,0); sheetstyle->adjustSize(); sheetstyle->setChecked(defst->style == 2 ); - button3 = new QPushButton(stylegroup); + button3 = new TQPushButton(stylegroup); grid2->addWidget(button3,0,1); button3->setText(i18n("Help")); - connect(button3,SIGNAL(clicked()),this,SLOT(help())); + connect(button3,TQT_SIGNAL(clicked()),this,TQT_SLOT(help())); lay1->addWidget(box); - connect(parent,SIGNAL(applyButtonPressed()),SLOT(okButton())); + connect(tqparent,TQT_SIGNAL(applyButtonPressed()),TQT_SLOT(okButton())); } void ConfigDlg::help() @@ -186,12 +186,12 @@ void ConfigDlg::cancelbutton() reject(); } -void ConfigDlg::set_fore_color(const QColor &_color) +void ConfigDlg::set_fore_color(const TQColor &_color) { defst->forecolor=_color; } -void ConfigDlg::set_background_color( const QColor &_color ) +void ConfigDlg::set_background_color( const TQColor &_color ) { defst->backcolor=_color; } diff --git a/kspread/plugins/calculator/configdlg.h b/kspread/plugins/calculator/configdlg.h index 0de8262e..7462f028 100644 --- a/kspread/plugins/calculator/configdlg.h +++ b/kspread/plugins/calculator/configdlg.h @@ -31,42 +31,43 @@ #ifndef _CONFIG_DLG_H_ #define _CONFIG_DLG_H_ -#include <qgroupbox.h> -#include <qcheckbox.h> -#include <qdialog.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qpainter.h> -#include <qlabel.h> -#include <qframe.h> -#include <qspinbox.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> +#include <tqdialog.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqpainter.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqspinbox.h> #include <kcolorbutton.h> #include "kcalc.h" -class ConfigDlg : public QDialog { +class ConfigDlg : public TQDialog { Q_OBJECT + TQ_OBJECT public: - ConfigDlg(QWidget *parent=0, const char *name=0, DefStruct *defstruct=NULL); + ConfigDlg(TQWidget *tqparent=0, const char *name=0, DefStruct *defstruct=NULL); ~ConfigDlg() {} DefStruct *defst ; - QLineEdit *mail; - QLineEdit *print; + TQLineEdit *mail; + TQLineEdit *print; private slots: void okButton(); void cancelbutton(); - void set_fore_color(const QColor &); - void set_background_color(const QColor &); + void set_fore_color(const TQColor &); + void set_background_color(const TQColor &); void help(); signals: @@ -78,34 +79,34 @@ public: private: - QGroupBox *box; + TQGroupBox *box; - QPushButton *ok; - QPushButton *cancel; + TQPushButton *ok; + TQPushButton *cancel; - QLabel *label1; + TQLabel *label1; KColorButton *button1; - QLabel *label2; + TQLabel *label2; KColorButton *button2; - QLabel *label3; - QPushButton *button3; - QLabel *label5; - - QGroupBox *gbox; - QCheckBox *cb; - QCheckBox *cb2; - QSpinBox* precspin; - QSpinBox* precspin2; - QCheckBox *mybox; - QCheckBox *frame3d; - - QButtonGroup *stylegroup; - QLabel *stylelabel; - QRadioButton *trigstyle; - QRadioButton *statstyle; - QRadioButton *sheetstyle; + TQLabel *label3; + TQPushButton *button3; + TQLabel *label5; + + TQGroupBox *gbox; + TQCheckBox *cb; + TQCheckBox *cb2; + TQSpinBox* precspin; + TQSpinBox* precspin2; + TQCheckBox *mybox; + TQCheckBox *frame3d; + + TQButtonGroup *stylegroup; + TQLabel *stylelabel; + TQRadioButton *trigstyle; + TQRadioButton *statstyle; + TQRadioButton *sheetstyle; }; #endif diff --git a/kspread/plugins/calculator/dlabel.cpp b/kspread/plugins/calculator/dlabel.cpp index b35f2666..011642c5 100644 --- a/kspread/plugins/calculator/dlabel.cpp +++ b/kspread/plugins/calculator/dlabel.cpp @@ -2,7 +2,7 @@ $Id: dlabel.cpp 466447 2005-10-02 17:54:10Z zander $ KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu @@ -26,14 +26,14 @@ #include "dlabel.h" -DLabel::DLabel(QWidget *parent, const char *name) - :QLabel(parent,name){ +DLabel::DLabel(TQWidget *tqparent, const char *name) + :TQLabel(tqparent,name){ button = 0; lit = false; } -void DLabel::mousePressEvent(QMouseEvent *e){ +void DLabel::mousePressEvent(TQMouseEvent *e){ if(e->button() == LeftButton){ lit = !lit; diff --git a/kspread/plugins/calculator/dlabel.h b/kspread/plugins/calculator/dlabel.h index 9222e990..1ed80096 100644 --- a/kspread/plugins/calculator/dlabel.h +++ b/kspread/plugins/calculator/dlabel.h @@ -29,22 +29,23 @@ #ifndef _D_LABEL_H_ #define _D_LABEL_H_ -#include <qlabel.h> +#include <tqlabel.h> -class DLabel : public QLabel { +class DLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: -DLabel(QWidget *parent=0, const char *name=0); +DLabel(TQWidget *tqparent=0, const char *name=0); ~DLabel() {} protected: - void mousePressEvent ( QMouseEvent *); + void mousePressEvent ( TQMouseEvent *); public: bool isLit(); diff --git a/kspread/plugins/calculator/kcalc.cpp b/kspread/plugins/calculator/kcalc.cpp index 1726653b..a8cdc22a 100644 --- a/kspread/plugins/calculator/kcalc.cpp +++ b/kspread/plugins/calculator/kcalc.cpp @@ -26,12 +26,12 @@ #include "version.h" #include <klocale.h> #include <knotifyclient.h> -#include <qlayout.h> -#include <qobjectlist.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqobjectlist.h> +#include <tqpushbutton.h> #include <kapplication.h> #include <kglobalsettings.h> -#include <qstyle.h> +#include <tqstyle.h> #include <kdialog.h> #include <kconfig.h> #include <kglobal.h> @@ -41,91 +41,91 @@ extern last_input_type last_input; extern item_contents display_data; extern num_base current_base; -QPtrList<CALCAMNT> temp_stack; +TQPtrList<CALCAMNT> temp_stack; -QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *name ) - : QDialog( parent, name ) +TQtCalculator :: TQtCalculator( Calculator *_corba, TQWidget *tqparent, const char *name ) + : TQDialog( tqparent, name ) { corba = _corba; mInternalSpacing=4; key_pressed = false; - selection_timer = new QTimer; - status_timer = new QTimer; + selection_timer = new TQTimer; + status_timer = new TQTimer; - connect(status_timer,SIGNAL(timeout()),this,SLOT(clear_status_label())); - connect(selection_timer,SIGNAL(timeout()),this,SLOT(selection_timed_out())); + connect(status_timer,TQT_SIGNAL(timeout()),this,TQT_SLOT(clear_status_label())); + connect(selection_timer,TQT_SIGNAL(timeout()),this,TQT_SLOT(selection_timed_out())); readSettings(); - QFont buttonfont( KGlobalSettings::generalFont() ); - buttonfont.setStyleStrategy( QFont::PreferAntialias ); + TQFont buttonfont( KGlobalSettings::generalFont() ); + buttonfont.setStyleStrategy( TQFont::PreferAntialias ); // Set the window caption/title - // connect(kapp,SIGNAL(kdisplayPaletteChanged()),this,SLOT(set_colors())); + // connect(kapp,TQT_SIGNAL(kdisplayPaletteChanged()),this,TQT_SLOT(set_colors())); // setCaption( kapp->caption() ); // create help button - QPushButton *pb; + TQPushButton *pb; - pb = new QPushButton( this, "helpbutton" ); + pb = new TQPushButton( this, "helpbutton" ); pb->setText( "kCalc" ); - pb->setFont( QFont("times",12,QFont::Bold,FALSE) ); - QToolTip::add( pb, i18n("KCalc Setup/Help") ); + pb->setFont( TQFont("times",12,TQFont::Bold,FALSE) ); + TQToolTip::add( pb, i18n("KCalc Setup/Help") ); - connect( pb, SIGNAL(clicked()), SLOT(configclicked()) ); + connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(configclicked()) ); // Create the display calc_display = new DLabel( this, "display" ); - calc_display->setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); - calc_display->setAlignment( AlignRight|AlignVCenter ); + calc_display->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken ); + calc_display->tqsetAlignment( AlignRight|AlignVCenter ); calc_display->setFocus(); - calc_display->setFocusPolicy( QWidget::StrongFocus ); + calc_display->setFocusPolicy( TQ_StrongFocus ); - connect(calc_display,SIGNAL(clicked()),this,SLOT(display_selected())); + connect(calc_display,TQT_SIGNAL(clicked()),this,TQT_SLOT(display_selected())); - statusINVLabel = new QLabel( this, "INV" ); + statusINVLabel = new TQLabel( this, "INV" ); Q_CHECK_PTR( statusINVLabel ); - statusINVLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); - statusINVLabel->setAlignment( AlignCenter ); + statusINVLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); + statusINVLabel->tqsetAlignment( AlignCenter ); statusINVLabel->setText("NORM"); - statusHYPLabel = new QLabel( this, "HYP" ); + statusHYPLabel = new TQLabel( this, "HYP" ); Q_CHECK_PTR( statusHYPLabel ); - statusHYPLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); - statusHYPLabel->setAlignment( AlignCenter ); + statusHYPLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); + statusHYPLabel->tqsetAlignment( AlignCenter ); - statusERRORLabel = new QLabel( this, "ERROR" ); + statusERRORLabel = new TQLabel( this, "ERROR" ); Q_CHECK_PTR( statusERRORLabel ); - statusERRORLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); - statusERRORLabel->setAlignment( AlignLeft|AlignVCenter ); + statusERRORLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); + statusERRORLabel->tqsetAlignment( AlignLeft|AlignVCenter ); // create angle button group - QAccel *accel = new QAccel( this ); + TQAccel *accel = new TQAccel( this ); - QButtonGroup *angle_group = new QButtonGroup( 3, Horizontal,this, "AngleButtons" ); + TQButtonGroup *angle_group = new TQButtonGroup( 3,Qt::Horizontal,this, "AngleButtons" ); angle_group->setTitle(i18n( "Angle") ); - anglebutton[0] = new QRadioButton( angle_group ); + anglebutton[0] = new TQRadioButton( angle_group ); anglebutton[0]->setText( "&Deg" ) ; anglebutton[0]->setChecked( TRUE); accel->connectItem( accel->insertItem(Key_D + ALT), this , - SLOT(Deg_Selected()) ); + TQT_SLOT(Deg_Selected()) ); - anglebutton[1] = new QRadioButton( angle_group ); + anglebutton[1] = new TQRadioButton( angle_group ); anglebutton[1]->setText( "&Rad" ); accel->connectItem( accel->insertItem(Key_R + ALT), this , - SLOT(Rad_Selected()) ); + TQT_SLOT(Rad_Selected()) ); - anglebutton[2] = new QRadioButton( angle_group ); + anglebutton[2] = new TQRadioButton( angle_group ); anglebutton[2]->setText( "&Gra" ); accel->connectItem( accel->insertItem(Key_G + ALT), this , - SLOT(Gra_Selected()) ); + TQT_SLOT(Gra_Selected()) ); - connect( angle_group, SIGNAL(clicked(int)), SLOT(angle_selected(int)) ); + connect( angle_group, TQT_SIGNAL(clicked(int)), TQT_SLOT(angle_selected(int)) ); ////////////////////////////////////////////////////////////////////// @@ -135,31 +135,31 @@ QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *n - QButtonGroup *base_group = new QButtonGroup( 4, Horizontal,this, "BaseButtons" ); + TQButtonGroup *base_group = new TQButtonGroup( 4,Qt::Horizontal,this, "BaseButtons" ); base_group->setTitle( i18n("Base") ); - basebutton[0] = new QRadioButton( base_group ); + basebutton[0] = new TQRadioButton( base_group ); basebutton[0]->setText( "&Hex" ); accel->connectItem( accel->insertItem(Key_H + ALT), this , - SLOT(Hex_Selected()) ); + TQT_SLOT(Hex_Selected()) ); - basebutton[1] = new QRadioButton( base_group ); + basebutton[1] = new TQRadioButton( base_group ); basebutton[1]->setText( "D&ec" ); basebutton[1]->setChecked(TRUE); accel->connectItem( accel->insertItem(Key_E + ALT), this , - SLOT(Dec_Selected()) ); + TQT_SLOT(Dec_Selected()) ); - basebutton[2] = new QRadioButton( base_group ); + basebutton[2] = new TQRadioButton( base_group ); basebutton[2]->setText( "&Oct" ); accel->connectItem( accel->insertItem(Key_O + ALT), this , - SLOT(Oct_Selected()) ); + TQT_SLOT(Oct_Selected()) ); - basebutton[3] = new QRadioButton( base_group); + basebutton[3] = new TQRadioButton( base_group); basebutton[3]->setText( "&Bin" ); accel->connectItem( accel->insertItem(Key_B + ALT), this , - SLOT(Bin_Selected()) ); + TQT_SLOT(Bin_Selected()) ); - connect( base_group, SIGNAL(clicked(int)), SLOT(base_selected(int)) ); + connect( base_group, TQT_SIGNAL(clicked(int)), TQT_SLOT(base_selected(int)) ); //////////////////////////////////////////////////////////////////////// // @@ -167,222 +167,222 @@ QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *n // - // First the widgets that are the parents of the buttons - mSmallPage = new QWidget(this); - mLargePage = new QWidget(this); + // First the widgets that are the tqparents of the buttons + mSmallPage = new TQWidget(this); + mLargePage = new TQWidget(this); - pbhyp = new QPushButton("Hyp", mSmallPage, "hypbutton" ); - connect( pbhyp, SIGNAL(toggled(bool)), SLOT(pbhyptoggled(bool))); + pbhyp = new TQPushButton("Hyp", mSmallPage, "hypbutton" ); + connect( pbhyp, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbhyptoggled(bool))); pbhyp->setToggleButton(TRUE); - pbinv = new QPushButton( "Inv", mSmallPage, "InverseButton" ); - connect( pbinv, SIGNAL(toggled(bool)), SLOT(pbinvtoggled(bool))); + pbinv = new TQPushButton( "Inv", mSmallPage, "InverseButton" ); + connect( pbinv, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbinvtoggled(bool))); pbinv->setToggleButton(TRUE); - pbA = new QPushButton("A",mSmallPage, "Abutton" ); - connect( pbA, SIGNAL(toggled(bool)), SLOT(pbAtoggled(bool))); + pbA = new TQPushButton("A",mSmallPage, "Abutton" ); + connect( pbA, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbAtoggled(bool))); pbA->setToggleButton(TRUE); - pbSin = new QPushButton("Sin",mSmallPage, "Sinbutton" ); - connect( pbSin, SIGNAL(toggled(bool)), SLOT(pbSintoggled(bool))); + pbSin = new TQPushButton("Sin",mSmallPage, "Sinbutton" ); + connect( pbSin, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbSintoggled(bool))); pbSin->setToggleButton(TRUE); - pbplusminus = new QPushButton( "+/-", mSmallPage, "plusminusbutton" ); - connect( pbplusminus, SIGNAL(toggled(bool)), SLOT(pbplusminustoggled(bool))); + pbplusminus = new TQPushButton( "+/-", mSmallPage, "plusminusbutton" ); + connect( pbplusminus, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbplusminustoggled(bool))); pbplusminus->setToggleButton(TRUE); pbplusminus->setFont(buttonfont); - pbB = new QPushButton("B", mSmallPage, "Bbutton" ); - connect( pbB, SIGNAL(toggled(bool)), SLOT(pbBtoggled(bool))); + pbB = new TQPushButton("B", mSmallPage, "Bbutton" ); + connect( pbB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbBtoggled(bool))); pbB->setToggleButton(TRUE); - pbCos = new QPushButton("Cos",mSmallPage, "Cosbutton" ); + pbCos = new TQPushButton("Cos",mSmallPage, "Cosbutton" ); pbCos->setText( "Cos" ); - connect( pbCos, SIGNAL(toggled(bool)), SLOT(pbCostoggled(bool))); + connect( pbCos, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbCostoggled(bool))); pbCos->setToggleButton(TRUE); - pbreci = new QPushButton("1/x",mSmallPage, "recibutton" ); - connect( pbreci, SIGNAL(toggled(bool)), SLOT(pbrecitoggled(bool))); + pbreci = new TQPushButton("1/x",mSmallPage, "recibutton" ); + connect( pbreci, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbrecitoggled(bool))); pbreci->setToggleButton(TRUE); - pbC = new QPushButton( "C", mSmallPage, "Cbutton" ); - connect( pbC, SIGNAL(toggled(bool)), SLOT(pbCtoggled(bool))); + pbC = new TQPushButton( "C", mSmallPage, "Cbutton" ); + connect( pbC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbCtoggled(bool))); pbC->setToggleButton(TRUE); - pbTan = new QPushButton("Tan" ,mSmallPage, "Tanbutton" ); - connect( pbTan, SIGNAL(toggled(bool)), SLOT(pbTantoggled(bool))); + pbTan = new TQPushButton("Tan" ,mSmallPage, "Tanbutton" ); + connect( pbTan, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbTantoggled(bool))); pbTan->setToggleButton(TRUE); - pbfactorial = new QPushButton("x!",mSmallPage, "factorialbutton" ); - connect( pbfactorial, SIGNAL(toggled(bool)), SLOT(pbfactorialtoggled(bool))); + pbfactorial = new TQPushButton("x!",mSmallPage, "factorialbutton" ); + connect( pbfactorial, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbfactorialtoggled(bool))); pbfactorial->setToggleButton(TRUE); - pbD = new QPushButton("D",mSmallPage, "Dbutton" ); - connect( pbD, SIGNAL(toggled(bool)), SLOT(pbDtoggled(bool))); + pbD = new TQPushButton("D",mSmallPage, "Dbutton" ); + connect( pbD, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbDtoggled(bool))); pbD->setToggleButton(TRUE); - pblog = new QPushButton("Log",mSmallPage, "logbutton" ); - connect( pblog, SIGNAL(toggled(bool)), SLOT(pblogtoggled(bool))); + pblog = new TQPushButton("Log",mSmallPage, "logbutton" ); + connect( pblog, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pblogtoggled(bool))); pblog->setToggleButton(TRUE); - pbsquare = new QPushButton( "x^2", mSmallPage, "squarebutton" ); - connect( pbsquare, SIGNAL(toggled(bool)), SLOT(pbsquaretoggled(bool))); + pbsquare = new TQPushButton( "x^2", mSmallPage, "squarebutton" ); + connect( pbsquare, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbsquaretoggled(bool))); pbsquare->setToggleButton(TRUE); - pbE = new QPushButton("E",mSmallPage, "Ebutton" ); - connect( pbE, SIGNAL(toggled(bool)), SLOT(pbEtoggled(bool))); + pbE = new TQPushButton("E",mSmallPage, "Ebutton" ); + connect( pbE, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbEtoggled(bool))); pbE->setToggleButton(TRUE); - pbln = new QPushButton( "Ln", mSmallPage, "lnbutton" ); - connect( pbln, SIGNAL(toggled(bool)), SLOT(pblntoggled(bool))); + pbln = new TQPushButton( "Ln", mSmallPage, "lnbutton" ); + connect( pbln, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pblntoggled(bool))); pbln->setToggleButton(TRUE); - pbpower = new QPushButton("x^y",mSmallPage, "powerbutton" ); - connect( pbpower, SIGNAL(toggled(bool)), SLOT(pbpowertoggled(bool))); + pbpower = new TQPushButton("x^y",mSmallPage, "powerbutton" ); + connect( pbpower, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbpowertoggled(bool))); pbpower->setToggleButton(TRUE); - pbF = new QPushButton("F",mSmallPage, "Fbutton" ); - connect( pbF, SIGNAL(toggled(bool)), SLOT(pbFtoggled(bool))); + pbF = new TQPushButton("F",mSmallPage, "Fbutton" ); + connect( pbF, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbFtoggled(bool))); pbF->setToggleButton(TRUE); - pbEE = new QPushButton("EE",mLargePage, "EEbutton" ); + pbEE = new TQPushButton("EE",mLargePage, "EEbutton" ); pbEE->setToggleButton(TRUE); - connect( pbEE, SIGNAL(toggled(bool)), SLOT(EEtoggled(bool))); + connect( pbEE, TQT_SIGNAL(toggled(bool)), TQT_SLOT(EEtoggled(bool))); - pbMR = new QPushButton("MR",mLargePage, "MRbutton" ); - connect( pbMR, SIGNAL(toggled(bool)), SLOT(pbMRtoggled(bool))); + pbMR = new TQPushButton("MR",mLargePage, "MRbutton" ); + connect( pbMR, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbMRtoggled(bool))); pbMR->setToggleButton(TRUE); pbMR->setFont(buttonfont); - pbMplusminus = new QPushButton("M+-",mLargePage, "Mplusminusbutton" ); - connect( pbMplusminus, SIGNAL(toggled(bool)), SLOT(pbMplusminustoggled(bool))); + pbMplusminus = new TQPushButton("M+-",mLargePage, "Mplusminusbutton" ); + connect( pbMplusminus, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbMplusminustoggled(bool))); pbMplusminus->setToggleButton(TRUE); - pbMC = new QPushButton("MC",mLargePage, "MCbutton" ); - connect( pbMC, SIGNAL(toggled(bool)), SLOT(pbMCtoggled(bool))); + pbMC = new TQPushButton("MC",mLargePage, "MCbutton" ); + connect( pbMC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbMCtoggled(bool))); pbMC->setToggleButton(TRUE); - pbClear = new QPushButton("C",mLargePage, "Clearbutton" ); - connect( pbClear, SIGNAL(toggled(bool)), SLOT(pbCleartoggled(bool))); + pbClear = new TQPushButton("C",mLargePage, "Clearbutton" ); + connect( pbClear, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbCleartoggled(bool))); pbClear->setToggleButton(TRUE); - pbAC = new QPushButton("AC", mLargePage, "ACbutton" ); - connect( pbAC, SIGNAL(toggled(bool)), SLOT(pbACtoggled(bool))); + pbAC = new TQPushButton("AC", mLargePage, "ACbutton" ); + connect( pbAC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbACtoggled(bool))); pbAC->setToggleButton(TRUE); - pb7 = new QPushButton("7",mLargePage, "7button" ); - connect( pb7, SIGNAL(toggled(bool)), SLOT(pb7toggled(bool))); + pb7 = new TQPushButton("7",mLargePage, "7button" ); + connect( pb7, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb7toggled(bool))); pb7->setToggleButton(TRUE); - pb8 = new QPushButton("8",mLargePage, "8button" ); - connect( pb8, SIGNAL(toggled(bool)), SLOT(pb8toggled(bool))); + pb8 = new TQPushButton("8",mLargePage, "8button" ); + connect( pb8, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb8toggled(bool))); pb8->setToggleButton(TRUE); - pb9 = new QPushButton("9",mLargePage,"9button" ); - connect( pb9, SIGNAL(toggled(bool)), SLOT(pb9toggled(bool))); + pb9 = new TQPushButton("9",mLargePage,"9button" ); + connect( pb9, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb9toggled(bool))); pb9->setToggleButton(TRUE); - pbparenopen = new QPushButton("(",mLargePage, "parenopenbutton" ); - connect( pbparenopen, SIGNAL(toggled(bool)), SLOT(pbparenopentoggled(bool))); + pbparenopen = new TQPushButton("(",mLargePage, "parenopenbutton" ); + connect( pbparenopen, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbparenopentoggled(bool))); pbparenopen->setToggleButton(TRUE); - pbparenclose = new QPushButton(")",mLargePage, "parenclosebutton" ); - connect( pbparenclose, SIGNAL(toggled(bool)), SLOT(pbparenclosetoggled(bool))); + pbparenclose = new TQPushButton(")",mLargePage, "parenclosebutton" ); + connect( pbparenclose, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbparenclosetoggled(bool))); pbparenclose->setToggleButton(TRUE); - pband = new QPushButton("And",mLargePage, "andbutton" ); - connect( pband, SIGNAL(toggled(bool)), SLOT(pbandtoggled(bool))); + pband = new TQPushButton("And",mLargePage, "andbutton" ); + connect( pband, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbandtoggled(bool))); pband->setToggleButton(TRUE); pband->setFont(buttonfont); - pb4 = new QPushButton("4",mLargePage, "4button" ); - connect( pb4, SIGNAL(toggled(bool)), SLOT(pb4toggled(bool))); + pb4 = new TQPushButton("4",mLargePage, "4button" ); + connect( pb4, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb4toggled(bool))); pb4->setToggleButton(TRUE); - pb5 = new QPushButton("5",mLargePage, "5button" ); - connect( pb5, SIGNAL(toggled(bool)), SLOT(pb5toggled(bool))); + pb5 = new TQPushButton("5",mLargePage, "5button" ); + connect( pb5, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb5toggled(bool))); pb5->setToggleButton(TRUE); - pb6 = new QPushButton("6",mLargePage, "6button" ); - connect( pb6, SIGNAL(toggled(bool)), SLOT(pb6toggled(bool))); + pb6 = new TQPushButton("6",mLargePage, "6button" ); + connect( pb6, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb6toggled(bool))); pb6->setToggleButton(TRUE); - pbX = new QPushButton("X",mLargePage, "Multiplybutton" ); - connect( pbX, SIGNAL(toggled(bool)), SLOT(pbXtoggled(bool))); + pbX = new TQPushButton("X",mLargePage, "Multiplybutton" ); + connect( pbX, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbXtoggled(bool))); pbX->setToggleButton(TRUE); - pbdivision = new QPushButton("/",mLargePage, "divisionbutton" ); - connect( pbdivision, SIGNAL(toggled(bool)), SLOT(pbdivisiontoggled(bool))); + pbdivision = new TQPushButton("/",mLargePage, "divisionbutton" ); + connect( pbdivision, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbdivisiontoggled(bool))); pbdivision->setToggleButton(TRUE); - pbor = new QPushButton("Or",mLargePage, "orbutton" ); - connect( pbor, SIGNAL(toggled(bool)), SLOT(pbortoggled(bool))); + pbor = new TQPushButton("Or",mLargePage, "orbutton" ); + connect( pbor, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbortoggled(bool))); pbor->setToggleButton(TRUE); - pb1 = new QPushButton("1",mLargePage, "1button" ); - connect( pb1, SIGNAL(toggled(bool)), SLOT(pb1toggled(bool))); + pb1 = new TQPushButton("1",mLargePage, "1button" ); + connect( pb1, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb1toggled(bool))); pb1->setToggleButton(TRUE); - pb2 = new QPushButton("2",mLargePage, "2button" ); + pb2 = new TQPushButton("2",mLargePage, "2button" ); - connect( pb2, SIGNAL(toggled(bool)), SLOT(pb2toggled(bool))); + connect( pb2, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb2toggled(bool))); pb2->setToggleButton(TRUE); - pb3 = new QPushButton("3",mLargePage, "3button" ); - connect( pb3, SIGNAL(toggled(bool)), SLOT(pb3toggled(bool))); + pb3 = new TQPushButton("3",mLargePage, "3button" ); + connect( pb3, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb3toggled(bool))); pb3->setToggleButton(TRUE); - pbplus = new QPushButton("+",mLargePage, "plusbutton" ); - connect( pbplus, SIGNAL(toggled(bool)), SLOT(pbplustoggled(bool))); + pbplus = new TQPushButton("+",mLargePage, "plusbutton" ); + connect( pbplus, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbplustoggled(bool))); pbplus->setToggleButton(TRUE); - pbminus = new QPushButton("-",mLargePage, "minusbutton" ); - connect( pbminus, SIGNAL(toggled(bool)), SLOT(pbminustoggled(bool))); + pbminus = new TQPushButton("-",mLargePage, "minusbutton" ); + connect( pbminus, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbminustoggled(bool))); pbminus->setToggleButton(TRUE); - pbshift = new QPushButton("Lsh",mLargePage, "shiftbutton" ); - connect( pbshift, SIGNAL(toggled(bool)), SLOT(pbshifttoggled(bool))); + pbshift = new TQPushButton("Lsh",mLargePage, "shiftbutton" ); + connect( pbshift, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbshifttoggled(bool))); pbshift->setToggleButton(TRUE); - pbperiod = new QPushButton(".",mLargePage, "periodbutton" ); - connect( pbperiod, SIGNAL(toggled(bool)), SLOT(pbperiodtoggled(bool))); + pbperiod = new TQPushButton(".",mLargePage, "periodbutton" ); + connect( pbperiod, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbperiodtoggled(bool))); pbperiod->setToggleButton(TRUE); - pb0 = new QPushButton("0",mLargePage, "0button" ); - connect( pb0, SIGNAL(toggled(bool)), SLOT(pb0toggled(bool))); + pb0 = new TQPushButton("0",mLargePage, "0button" ); + connect( pb0, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb0toggled(bool))); pb0->setToggleButton(TRUE); - pbequal = new QPushButton("=",mLargePage, "equalbutton" ); - connect( pbequal, SIGNAL(toggled(bool)), SLOT(pbequaltoggled(bool))); + pbequal = new TQPushButton("=",mLargePage, "equalbutton" ); + connect( pbequal, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbequaltoggled(bool))); pbequal->setToggleButton(TRUE); - pbpercent = new QPushButton("%",mLargePage, "percentbutton" ); - connect( pbpercent, SIGNAL(toggled(bool)), SLOT(pbpercenttoggled(bool))); + pbpercent = new TQPushButton("%",mLargePage, "percentbutton" ); + connect( pbpercent, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbpercenttoggled(bool))); pbpercent->setToggleButton(TRUE); - pbnegate = new QPushButton("Cmp",mLargePage, "OneComplementbutton" ); - connect( pbnegate, SIGNAL(toggled(bool)), SLOT(pbnegatetoggled(bool))); + pbnegate = new TQPushButton("Cmp",mLargePage, "OneComplementbutton" ); + connect( pbnegate, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbnegatetoggled(bool))); pbnegate->setToggleButton(TRUE); - pbmod = new QPushButton("Mod",mLargePage, "modbutton" ); - connect( pbmod, SIGNAL(toggled(bool)), SLOT(pbmodtoggled(bool))); + pbmod = new TQPushButton("Mod",mLargePage, "modbutton" ); + connect( pbmod, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbmodtoggled(bool))); pbmod->setToggleButton(TRUE); - QGridLayout *smallBtnLayout = new QGridLayout(mSmallPage, 6, 3, 0, + TQGridLayout *smallBtnLayout = new TQGridLayout(mSmallPage, 6, 3, 0, mInternalSpacing); - QGridLayout *largeBtnLayout = new QGridLayout(mLargePage, 5, 6, 0, + TQGridLayout *largeBtnLayout = new TQGridLayout(mLargePage, 5, 6, 0, mInternalSpacing); - QHBoxLayout *topLayout = new QHBoxLayout(); - QHBoxLayout *radioLayout = new QHBoxLayout(); - QHBoxLayout *btnLayout = new QHBoxLayout(); - QHBoxLayout *statusLayout = new QHBoxLayout(); + TQHBoxLayout *topLayout = new TQHBoxLayout(); + TQHBoxLayout *radioLayout = new TQHBoxLayout(); + TQHBoxLayout *btnLayout = new TQHBoxLayout(); + TQHBoxLayout *statusLayout = new TQHBoxLayout(); // bring them all together - QVBoxLayout *mainLayout = new QVBoxLayout(this, mInternalSpacing, + TQVBoxLayout *mainLayout = new TQVBoxLayout(this, mInternalSpacing, mInternalSpacing ); mainLayout->addLayout(topLayout ); @@ -390,12 +390,12 @@ QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *n mainLayout->addLayout(btnLayout); mainLayout->addLayout(statusLayout); - // button layout + // button tqlayout btnLayout->addWidget(mSmallPage,0,AlignTop); btnLayout->addSpacing(mInternalSpacing); btnLayout->addWidget(mLargePage,0,AlignTop); - // small button layout + // small button tqlayout smallBtnLayout->addWidget(pbhyp, 0, 0); smallBtnLayout->addWidget(pbinv, 0, 1); smallBtnLayout->addWidget(pbA, 0, 2); @@ -427,7 +427,7 @@ QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *n smallBtnLayout->setRowStretch(4, 0); smallBtnLayout->setRowStretch(5, 0); - // large button layout + // large button tqlayout largeBtnLayout->addWidget(pbEE, 0, 0); largeBtnLayout->addWidget(pbMR, 0, 1); largeBtnLayout->addWidget(pbMplusminus, 0, 2); @@ -472,11 +472,11 @@ QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *n topLayout->addWidget(calc_display, 10); - // radiobutton layout + // radiobutton tqlayout radioLayout->addWidget(base_group); radioLayout->addWidget(angle_group); - // status layout + // status tqlayout statusLayout->addWidget(statusINVLabel); statusLayout->addWidget(statusHYPLabel); statusLayout->addWidget(statusERRORLabel, 10); @@ -542,22 +542,22 @@ QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *n InitializeCalculator(); } -QtCalculator::~QtCalculator() +TQtCalculator::~TQtCalculator() { delete selection_timer; delete status_timer; } -void QtCalculator::set_display_font() +void TQtCalculator::set_display_font() { calc_display->setFont(kcalcdefaults.font); } -void QtCalculator::updateGeometry() +void TQtCalculator::updateGeometry() { - QObjectList *l; - QSize s; + TQObjectList *l; + TQSize s; int margin; // @@ -568,9 +568,9 @@ void QtCalculator::updateGeometry() // // Button groups (base and angle) // - //QButtonGroup *g; - //g = (QButtonGroup*)(anglebutton[0]->parentWidget()); - //g = (QButtonGroup*)(basebutton[0]->parentWidget()); + //TQButtonGroup *g; + //g = (TQButtonGroup*)(anglebutton[0]->tqparentWidget()); + //g = (TQButtonGroup*)(basebutton[0]->tqparentWidget()); // // Calculator buttons @@ -578,38 +578,38 @@ void QtCalculator::updateGeometry() s.setWidth(mSmallPage->fontMetrics().width("MMM")); s.setHeight(mSmallPage->fontMetrics().lineSpacing()); - l = (QObjectList*)mSmallPage->children(); // silence please + l = (TQObjectList*)mSmallPage->tqchildren(); // silence please for(uint i=0; i < l->count(); i++) { - QObject *o = l->at(i); + TQObject *o = l->at(i); if( o->isWidgetType() ) { - margin = QApplication::style(). - pixelMetric(QStyle::PM_ButtonMargin, ((QWidget *)o))*2; - ((QWidget*)o)->setMinimumSize(s.width()+margin, s.height()+margin); - ((QWidget*)o)->installEventFilter( this ); - ((QWidget*)o)->setAcceptDrops(true); + margin = TQApplication::style(). + tqpixelMetric(TQStyle::PM_ButtonMargin, ((TQWidget *)o))*2; + ((TQWidget*)o)->setMinimumSize(s.width()+margin, s.height()+margin); + ((TQWidget*)o)->installEventFilter( this ); + ((TQWidget*)o)->setAcceptDrops(true); } } - l = (QObjectList*)mLargePage->children(); // silence please + l = (TQObjectList*)mLargePage->tqchildren(); // silence please - int h1 = pbF->minimumSize().height(); + int h1 = pbF->tqminimumSize().height(); int h2 = (int)((((float)h1 + 4.0) / 5.0)); s.setWidth(mLargePage->fontMetrics().width("MMM") + - QApplication::style(). - pixelMetric(QStyle::PM_ButtonMargin, pbF)*2); + TQApplication::style(). + tqpixelMetric(TQStyle::PM_ButtonMargin, pbF)*2); s.setHeight(h1 + h2); for(uint i = 0; i < l->count(); i++) { - QObject *o = l->at(i); + TQObject *o = l->at(i); if(o->isWidgetType()) { - ((QWidget*)o)->setFixedSize(s); - ((QWidget*)o)->installEventFilter(this); - ((QWidget*)o)->setAcceptDrops(true); + ((TQWidget*)o)->setFixedSize(s); + ((TQWidget*)o)->installEventFilter(this); + ((TQWidget*)o)->setAcceptDrops(true); } } @@ -621,15 +621,15 @@ void QtCalculator::updateGeometry() statusINVLabel->setMinimumWidth(s.width()); statusHYPLabel->setMinimumWidth(s.width()); - //setFixedSize(minimumSize()); + //setFixedSize(tqminimumSize()); } -void QtCalculator::exit() +void TQtCalculator::exit() { - // QApplication::exit(); + // TQApplication::exit(); } -void QtCalculator::Hex_Selected() +void TQtCalculator::Hex_Selected() { basebutton[0]->setChecked(TRUE); basebutton[1]->setChecked(FALSE); @@ -639,7 +639,7 @@ void QtCalculator::Hex_Selected() } -void QtCalculator::Dec_Selected() +void TQtCalculator::Dec_Selected() { basebutton[0]->setChecked(FALSE); basebutton[1]->setChecked(TRUE); @@ -649,7 +649,7 @@ void QtCalculator::Dec_Selected() } -void QtCalculator::Oct_Selected() +void TQtCalculator::Oct_Selected() { basebutton[0]->setChecked(FALSE); basebutton[1]->setChecked(FALSE); @@ -660,7 +660,7 @@ void QtCalculator::Oct_Selected() -void QtCalculator::Bin_Selected() +void TQtCalculator::Bin_Selected() { basebutton[0]->setChecked(FALSE); basebutton[1]->setChecked(FALSE); @@ -669,7 +669,7 @@ void QtCalculator::Bin_Selected() SetBin(); } -void QtCalculator::Deg_Selected() +void TQtCalculator::Deg_Selected() { anglebutton[0]->setChecked(TRUE); anglebutton[1]->setChecked(FALSE); @@ -678,7 +678,7 @@ void QtCalculator::Deg_Selected() } -void QtCalculator::Rad_Selected() +void TQtCalculator::Rad_Selected() { anglebutton[0]->setChecked(FALSE); anglebutton[1]->setChecked(TRUE); @@ -688,7 +688,7 @@ void QtCalculator::Rad_Selected() } -void QtCalculator::Gra_Selected() +void TQtCalculator::Gra_Selected() { anglebutton[0]->setChecked(FALSE); anglebutton[1]->setChecked(FALSE); @@ -697,10 +697,10 @@ void QtCalculator::Gra_Selected() } -void QtCalculator::helpclicked(){ +void TQtCalculator::helpclicked(){ } -void QtCalculator::keyPressEvent( QKeyEvent *e ){ +void TQtCalculator::keyPressEvent( TQKeyEvent *e ){ switch (e->key() ){ @@ -936,7 +936,7 @@ void QtCalculator::keyPressEvent( QKeyEvent *e ){ } } -void QtCalculator::keyReleaseEvent( QKeyEvent *e ){ +void TQtCalculator::keyReleaseEvent( TQKeyEvent *e ){ switch (e->key() ){ case Key_Next: @@ -1150,11 +1150,11 @@ void QtCalculator::keyReleaseEvent( QKeyEvent *e ){ clear_buttons(); } -void QtCalculator::clear_buttons(){ +void TQtCalculator::clear_buttons(){ } -void QtCalculator::EEtoggled(bool myboolean){ +void TQtCalculator::EEtoggled(bool myboolean){ if(myboolean) EE(); @@ -1162,327 +1162,327 @@ void QtCalculator::EEtoggled(bool myboolean){ pbEE->setOn(FALSE); } -void QtCalculator::pbinvtoggled(bool myboolean){ +void TQtCalculator::pbinvtoggled(bool myboolean){ if(myboolean) SetInverse(); if(pbinv->isOn() && (!key_pressed)) pbinv->setOn(FALSE); } -void QtCalculator::pbhyptoggled(bool myboolean){ +void TQtCalculator::pbhyptoggled(bool myboolean){ if(myboolean) EnterHyp(); if(pbhyp->isOn() && (!key_pressed)) pbhyp->setOn(FALSE); } -void QtCalculator::pbMRtoggled(bool myboolean){ +void TQtCalculator::pbMRtoggled(bool myboolean){ if(myboolean) MR(); if(pbMR->isOn() && (!key_pressed)) pbMR->setOn(FALSE); } -void QtCalculator::pbAtoggled(bool myboolean){ +void TQtCalculator::pbAtoggled(bool myboolean){ if(myboolean) buttonA(); if(pbA->isOn() && (!key_pressed)) pbA->setOn(FALSE); } -void QtCalculator::pbSintoggled(bool myboolean){ +void TQtCalculator::pbSintoggled(bool myboolean){ if(myboolean) ExecSin(); if(pbSin->isOn() && (!key_pressed)) pbSin->setOn(FALSE); } -void QtCalculator::pbplusminustoggled(bool myboolean){ +void TQtCalculator::pbplusminustoggled(bool myboolean){ if(myboolean) EnterNegate(); if(pbplusminus->isOn() && (!key_pressed)) pbplusminus->setOn(FALSE); } -void QtCalculator::pbMplusminustoggled(bool myboolean){ +void TQtCalculator::pbMplusminustoggled(bool myboolean){ if(myboolean) Mplusminus(); if(pbMplusminus->isOn() && (!key_pressed)) pbMplusminus->setOn(FALSE); } -void QtCalculator::pbBtoggled(bool myboolean){ +void TQtCalculator::pbBtoggled(bool myboolean){ if(myboolean) buttonB(); if(pbB->isOn() && (!key_pressed)) pbB->setOn(FALSE); } -void QtCalculator::pbCostoggled(bool myboolean){ +void TQtCalculator::pbCostoggled(bool myboolean){ if(myboolean) ExecCos(); if(pbCos->isOn() && (!key_pressed)) pbCos->setOn(FALSE); } -void QtCalculator::pbrecitoggled(bool myboolean){ +void TQtCalculator::pbrecitoggled(bool myboolean){ if(myboolean) EnterRecip(); if(pbreci->isOn() && (!key_pressed)) pbreci->setOn(FALSE); } -void QtCalculator::pbCtoggled(bool myboolean){ +void TQtCalculator::pbCtoggled(bool myboolean){ if(myboolean) buttonC(); if(pbC->isOn() && (!key_pressed)) pbC->setOn(FALSE); } -void QtCalculator::pbTantoggled(bool myboolean){ +void TQtCalculator::pbTantoggled(bool myboolean){ if(myboolean) ExecTan(); if(pbTan->isOn() && (!key_pressed)) pbTan->setOn(FALSE); } -void QtCalculator::pbfactorialtoggled(bool myboolean){ +void TQtCalculator::pbfactorialtoggled(bool myboolean){ if(myboolean) EnterFactorial(); if(pbfactorial->isOn() && (!key_pressed)) pbfactorial->setOn(FALSE); } -void QtCalculator::pbDtoggled(bool myboolean){ +void TQtCalculator::pbDtoggled(bool myboolean){ if(myboolean) buttonD(); if(pbD->isOn() && (!key_pressed)) pbD->setOn(FALSE); } -void QtCalculator::pblogtoggled(bool myboolean){ +void TQtCalculator::pblogtoggled(bool myboolean){ if(myboolean) EnterLogr(); if(pblog->isOn() && (!key_pressed)) pblog->setOn(FALSE); } -void QtCalculator::pbsquaretoggled(bool myboolean){ +void TQtCalculator::pbsquaretoggled(bool myboolean){ if(myboolean) EnterSquare(); if(pbsquare->isOn() && (!key_pressed)) pbsquare->setOn(FALSE); } -void QtCalculator::pbEtoggled(bool myboolean){ +void TQtCalculator::pbEtoggled(bool myboolean){ if(myboolean) buttonE(); if(pbE->isOn() && (!key_pressed)) pbE->setOn(FALSE); } -void QtCalculator::pblntoggled(bool myboolean){ +void TQtCalculator::pblntoggled(bool myboolean){ if(myboolean) EnterLogn(); if(pbln->isOn() && (!key_pressed)) pbln->setOn(FALSE); } -void QtCalculator::pbpowertoggled(bool myboolean){ +void TQtCalculator::pbpowertoggled(bool myboolean){ if(myboolean) Power(); if(pbpower->isOn() && (!key_pressed)) pbpower->setOn(FALSE); } -void QtCalculator::pbFtoggled(bool myboolean){ +void TQtCalculator::pbFtoggled(bool myboolean){ if(myboolean) buttonF(); if(pbF->isOn() && (!key_pressed)) pbF->setOn(FALSE); } -void QtCalculator::pbMCtoggled(bool myboolean){ +void TQtCalculator::pbMCtoggled(bool myboolean){ if(myboolean) MC(); if(pbMC->isOn() && (!key_pressed)) pbMC->setOn(FALSE); } -void QtCalculator::pbCleartoggled(bool myboolean){ +void TQtCalculator::pbCleartoggled(bool myboolean){ if(myboolean) Clear(); if(pbClear->isOn() && (!key_pressed)) pbClear->setOn(FALSE); } -void QtCalculator::pbACtoggled(bool myboolean){ +void TQtCalculator::pbACtoggled(bool myboolean){ if(myboolean) ClearAll(); if(pbAC->isOn() && (!key_pressed)) pbAC->setOn(FALSE); } -void QtCalculator::pb7toggled(bool myboolean){ +void TQtCalculator::pb7toggled(bool myboolean){ if(myboolean) button7(); if(pb7->isOn() && (!key_pressed)) pb7->setOn(FALSE); } -void QtCalculator::pb8toggled(bool myboolean){ +void TQtCalculator::pb8toggled(bool myboolean){ if(myboolean) button8(); if(pb8->isOn() && (!key_pressed)) pb8->setOn(FALSE); } -void QtCalculator::pb9toggled(bool myboolean){ +void TQtCalculator::pb9toggled(bool myboolean){ if(myboolean) button9(); if(pb9->isOn() && (!key_pressed)) pb9->setOn(FALSE); } -void QtCalculator::pbparenopentoggled(bool myboolean){ +void TQtCalculator::pbparenopentoggled(bool myboolean){ if(myboolean) EnterOpenParen(); if(pbparenopen->isOn() && (!key_pressed)) pbparenopen->setOn(FALSE); } -void QtCalculator::pbparenclosetoggled(bool myboolean){ +void TQtCalculator::pbparenclosetoggled(bool myboolean){ if(myboolean) EnterCloseParen(); if(pbparenclose->isOn() && (!key_pressed)) pbparenclose->setOn(FALSE); } -void QtCalculator::pbandtoggled(bool myboolean){ +void TQtCalculator::pbandtoggled(bool myboolean){ if(myboolean) And(); if(pband->isOn() && (!key_pressed)) pband->setOn(FALSE); } -void QtCalculator::pb4toggled(bool myboolean){ +void TQtCalculator::pb4toggled(bool myboolean){ if(myboolean) button4(); if(pb4->isOn() && (!key_pressed)) pb4->setOn(FALSE); } -void QtCalculator::pb5toggled(bool myboolean){ +void TQtCalculator::pb5toggled(bool myboolean){ if(myboolean) button5(); if(pb5->isOn() && (!key_pressed)) pb5->setOn(FALSE); } -void QtCalculator::pb6toggled(bool myboolean){ +void TQtCalculator::pb6toggled(bool myboolean){ if(myboolean) button6(); if(pb6->isOn() && (!key_pressed)) pb6->setOn(FALSE); } -void QtCalculator::pbXtoggled(bool myboolean){ +void TQtCalculator::pbXtoggled(bool myboolean){ if(myboolean) Multiply(); if(pbX->isOn() && (!key_pressed)) pbX->setOn(FALSE); } -void QtCalculator::pbdivisiontoggled(bool myboolean){ +void TQtCalculator::pbdivisiontoggled(bool myboolean){ if(myboolean) Divide(); if(pbdivision->isOn() && (!key_pressed)) pbdivision->setOn(FALSE); } -void QtCalculator::pbortoggled(bool myboolean){ +void TQtCalculator::pbortoggled(bool myboolean){ if(myboolean) Or(); if(pbor->isOn() && (!key_pressed)) pbor->setOn(FALSE); } -void QtCalculator::pb1toggled(bool myboolean){ +void TQtCalculator::pb1toggled(bool myboolean){ if(myboolean) button1(); if(pb1->isOn() && (!key_pressed)) pb1->setOn(FALSE); } -void QtCalculator::pb2toggled(bool myboolean){ +void TQtCalculator::pb2toggled(bool myboolean){ if(myboolean) button2(); if(pb2->isOn() && (!key_pressed)) pb2->setOn(FALSE); } -void QtCalculator::pb3toggled(bool myboolean){ +void TQtCalculator::pb3toggled(bool myboolean){ if(myboolean) button3(); if(pb3->isOn() && (!key_pressed)) pb3->setOn(FALSE); } -void QtCalculator::pbplustoggled(bool myboolean){ +void TQtCalculator::pbplustoggled(bool myboolean){ if(myboolean) Plus(); if(pbplus->isOn() && (!key_pressed)) pbplus->setOn(FALSE); } -void QtCalculator::pbminustoggled(bool myboolean){ +void TQtCalculator::pbminustoggled(bool myboolean){ if(myboolean) Minus(); if(pbminus->isOn() && (!key_pressed)) pbminus->setOn(FALSE); } -void QtCalculator::pbshifttoggled(bool myboolean){ +void TQtCalculator::pbshifttoggled(bool myboolean){ if(myboolean) Shift(); if(pbshift->isOn() && (!key_pressed)) pbshift->setOn(FALSE); } -void QtCalculator::pbperiodtoggled(bool myboolean){ +void TQtCalculator::pbperiodtoggled(bool myboolean){ if(myboolean) EnterDecimal(); if(pbperiod->isOn() && (!key_pressed)) pbperiod->setOn(FALSE); } -void QtCalculator::pb0toggled(bool myboolean){ +void TQtCalculator::pb0toggled(bool myboolean){ if(myboolean) button0(); if(pb0->isOn() && (!key_pressed)) pb0->setOn(FALSE); } -void QtCalculator::pbequaltoggled(bool myboolean){ +void TQtCalculator::pbequaltoggled(bool myboolean){ if(myboolean) EnterEqual(); if(pbequal->isOn() && (!key_pressed)) pbequal->setOn(FALSE); } -void QtCalculator::pbpercenttoggled(bool myboolean){ +void TQtCalculator::pbpercenttoggled(bool myboolean){ if(myboolean) EnterPercent(); if(pbpercent->isOn() && (!key_pressed)) pbpercent->setOn(FALSE); } -void QtCalculator::pbnegatetoggled(bool myboolean){ +void TQtCalculator::pbnegatetoggled(bool myboolean){ if(myboolean) EnterNotCmp(); if(pbnegate->isOn() && (!key_pressed)) pbnegate->setOn(FALSE); } -void QtCalculator::pbmodtoggled(bool myboolean) { +void TQtCalculator::pbmodtoggled(bool myboolean) { if(myboolean) Mod(); if(pbmod->isOn() && (!key_pressed)) pbmod->setOn(FALSE); } -void QtCalculator::configclicked(){ +void TQtCalculator::configclicked(){ - QTabDialog * tabdialog; - tabdialog = new QTabDialog(0,"tabdialog",TRUE); + TQTabDialog * tabdialog; + tabdialog = new TQTabDialog(0,"tabdialog",TRUE); tabdialog->setCaption( i18n("KCalc Configuration") ); tabdialog->resize( 360, 390 ); tabdialog->setCancelButton( i18n("&Cancel") ); tabdialog->setOKButton(i18n("&OK")); - QWidget *about = new QWidget(tabdialog,"about"); - QVBoxLayout *lay1 = new QVBoxLayout( about ); + TQWidget *about = new TQWidget(tabdialog,"about"); + TQVBoxLayout *lay1 = new TQVBoxLayout( about ); lay1->setMargin( KDialog::marginHint() ); lay1->setSpacing( KDialog::spacingHint() ); - QGroupBox *box = new QGroupBox(0,Qt::Vertical,about,"box"); - box->layout()->setSpacing(KDialog::spacingHint()); - box->layout()->setMargin(KDialog::marginHint()); - QGridLayout *grid1 = new QGridLayout(box->layout(),2,2); - QLabel *label = new QLabel(box,"label"); - QLabel *label2 = new QLabel(box,"label2"); + TQGroupBox *box = new TQGroupBox(0,Qt::Vertical,about,"box"); + box->tqlayout()->setSpacing(KDialog::spacingHint()); + box->tqlayout()->setMargin(KDialog::marginHint()); + TQGridLayout *grid1 = new TQGridLayout(box->tqlayout(),2,2); + TQLabel *label = new TQLabel(box,"label"); + TQLabel *label2 = new TQLabel(box,"label2"); box->setTitle(i18n("About")); grid1->addWidget(label,0,1); grid1->addMultiCellWidget(label2,2,2,0,1); - QString labelstring = "KCalc "KCALCVERSION"\n"\ + TQString labelstring = "KCalc "KCALCVERSION"\n"\ "Bernd Johannes Wuebben\n"\ "wuebben@math.cornell.edu\n"\ "wuebben@kde.org\n"\ "Copyright (C) 1996-98\n"\ "\n\n"; - QString labelstring2 = + TQString labelstring2 = #ifdef HAVE_LONG_DOUBLE i18n( "Base type: long double\n"); #else @@ -1494,16 +1494,16 @@ void QtCalculator::configclicked(){ "enabled. See the README for details."); #endif - label->setAlignment(AlignLeft|WordBreak|ExpandTabs); + label->tqsetAlignment(AlignLeft|WordBreak|ExpandTabs); label->setText(labelstring); - label2->setAlignment(AlignLeft|WordBreak|ExpandTabs); + label2->tqsetAlignment(AlignLeft|WordBreak|ExpandTabs); label2->setText(labelstring2); // HACK - // QPixmap pm( BarIcon( "kcalclogo" ) ); - QPixmap pm; - QLabel *logo = new QLabel(box); + // TQPixmap pm( BarIcon( "kcalclogo" ) ); + TQPixmap pm; + TQLabel *logo = new TQLabel(box); logo->setPixmap(pm); grid1->addWidget(logo,0,0); lay1->addWidget(box); @@ -1525,7 +1525,7 @@ void QtCalculator::configclicked(){ tabdialog->addTab(about,i18n("About")); - if(tabdialog->exec() == QDialog::Accepted){ + if(tabdialog->exec() == TQDialog::Accepted){ kcalcdefaults.forecolor = newdefstruct.forecolor; @@ -1540,13 +1540,13 @@ void QtCalculator::configclicked(){ set_precision(); set_style(); updateGeometry(); - resize(minimumSize()); + resize(tqminimumSize()); } delete configdlg; } -void QtCalculator::set_style(){ +void TQtCalculator::set_style(){ switch(kcalcdefaults.style){ case 0:{ @@ -1582,10 +1582,10 @@ void QtCalculator::set_style(){ } } -void QtCalculator::readSettings() +void TQtCalculator::readSettings() { - QColor tmpC(189, 255, 180); - QColor blackC(0,0,0); + TQColor tmpC(189, 255, 180); + TQColor blackC(0,0,0); KConfig *config = KGlobal::config(); config->setGroup("CalcPlugin"); @@ -1604,7 +1604,7 @@ void QtCalculator::readSettings() kcalcdefaults.beep = config->readBoolEntry("beep", true); } -void QtCalculator::writeSettings() +void TQtCalculator::writeSettings() { KConfig *config = KGlobal::config(); @@ -1622,13 +1622,13 @@ void QtCalculator::writeSettings() config->sync(); } -void QtCalculator::display_selected(){ +void TQtCalculator::display_selected(){ if(calc_display->Button() == LeftButton){ if(calc_display->isLit()){ - QClipboard *cb = QApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); cb->setText(calc_display->text()); selection_timer->start(100); @@ -1643,7 +1643,7 @@ void QtCalculator::display_selected(){ } else{ - QClipboard *cb = QApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); CALCAMNT result; result = (CALCAMNT) cb->text().toDouble(); @@ -1655,7 +1655,7 @@ void QtCalculator::display_selected(){ } -void QtCalculator::selection_timed_out(){ +void TQtCalculator::selection_timed_out(){ // printf("selection timed out\n"); selection_timer->stop(); @@ -1666,13 +1666,13 @@ void QtCalculator::selection_timed_out(){ } -void QtCalculator::clear_status_label(){ +void TQtCalculator::clear_status_label(){ statusERRORLabel->setText(""); status_timer->stop(); } -void QtCalculator::setStatusLabel(const QString& string){ +void TQtCalculator::setStatusLabel(const TQString& string){ statusERRORLabel->setText(string); status_timer->start(3000,TRUE); @@ -1680,9 +1680,9 @@ void QtCalculator::setStatusLabel(const QString& string){ } -void QtCalculator::invertColors(){ +void TQtCalculator::invertColors(){ - QColor tmpcolor; + TQColor tmpcolor; if(calc_display->isLit()){ tmpcolor = kcalcdefaults.backcolor; @@ -1699,19 +1699,19 @@ void QtCalculator::invertColors(){ } } -void QtCalculator::closeEvent( QCloseEvent*e ) +void TQtCalculator::closeEvent( TQCloseEvent*e ) { writeSettings(); e->accept(); } -void QtCalculator::set_colors(){ +void TQtCalculator::set_colors(){ - QPalette mypalette = (calc_display->palette()).copy(); + TQPalette mypalette = (calc_display->palette()).copy(); - QColorGroup cgrp = mypalette.active(); - QColorGroup ncgrp(kcalcdefaults.forecolor, + TQColorGroup cgrp = mypalette.active(); + TQColorGroup ncgrp(kcalcdefaults.forecolor, cgrp.background(), cgrp.light(), cgrp.dark(), @@ -1728,12 +1728,12 @@ void QtCalculator::set_colors(){ } -void QtCalculator::set_precision(){ +void TQtCalculator::set_precision(){ UpdateDisplay(); } -void QtCalculator::temp_stack_next(){ +void TQtCalculator::temp_stack_next(){ CALCAMNT *number; @@ -1759,7 +1759,7 @@ void QtCalculator::temp_stack_next(){ } -void QtCalculator::temp_stack_prev(){ +void TQtCalculator::temp_stack_prev(){ CALCAMNT *number; diff --git a/kspread/plugins/calculator/kcalc.h b/kspread/plugins/calculator/kcalc.h index 752ae96e..7e665e6c 100644 --- a/kspread/plugins/calculator/kcalc.h +++ b/kspread/plugins/calculator/kcalc.h @@ -2,7 +2,7 @@ $Id: kcalc.h 466447 2005-10-02 17:54:10Z zander $ KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu @@ -24,8 +24,8 @@ */ -#ifndef QTCALC_H -#define QTCALC_H +#ifndef TQTCALC_H +#define TQTCALC_H #include <queue> using std::queue; @@ -34,28 +34,28 @@ using std::queue; #include <stdlib.h> #include <ctype.h> -#include <qlistbox.h> -#include <qclipboard.h> -#include <qptrlist.h> -#include <qaccel.h> -#include <qtabdialog.h> -#include <qwidget.h> -#include <qtimer.h> -#include <qdialog.h> -#include <qpixmap.h> -#include <qapplication.h> -#include <qfont.h> -#include <qlabel.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qtooltip.h> -#include <qstring.h> -#include <qrect.h> +#include <tqlistbox.h> +#include <tqclipboard.h> +#include <tqptrlist.h> +#include <tqaccel.h> +#include <tqtabdialog.h> +#include <tqwidget.h> +#include <tqtimer.h> +#include <tqdialog.h> +#include <tqpixmap.h> +#include <tqapplication.h> +#include <tqfont.h> +#include <tqlabel.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqtooltip.h> +#include <tqstring.h> +#include <tqrect.h> #include "dlabel.h" @@ -184,30 +184,31 @@ item_contents *TopTypeStack(item_type rqstd_type); typedef struct _DefStruct{ - QColor forecolor; - QColor backcolor; + TQColor forecolor; + TQColor backcolor; int precision; int fixedprecision; int style; bool fixed; bool beep; - QFont font; + TQFont font; }DefStruct; class Calculator; -class QtCalculator : public QDialog +class TQtCalculator : public TQDialog { Q_OBJECT + TQ_OBJECT public: - QtCalculator( Calculator* _corba, QWidget *parent=0, const char *name=0 ); - ~QtCalculator(); + TQtCalculator( Calculator* _corba, TQWidget *tqparent=0, const char *name=0 ); + ~TQtCalculator(); - void keyPressEvent( QKeyEvent *e ); - void keyReleaseEvent( QKeyEvent *e ); - void closeEvent( QCloseEvent *e ); + void keyPressEvent( TQKeyEvent *e ); + void keyReleaseEvent( TQKeyEvent *e ); + void closeEvent( TQCloseEvent *e ); void readSettings(); void writeSettings(); void set_precision(); @@ -228,7 +229,7 @@ public: void setLabel( const char *_text ); void setValue( double _value ); - void setData( const QRect& _range, const char *_sheet ); + void setData( const TQRect& _range, const char *_sheet ); void useData(); public slots: @@ -240,7 +241,7 @@ public slots: void selection_timed_out(); void clear_buttons(); void clear_status_label(); - void setStatusLabel(const QString&); + void setStatusLabel(const TQString&); void EnterDigit(int data); void EnterDecimal(); void EnterStackFunction(int data); @@ -369,79 +370,79 @@ public: private: void updateGeometry(); - QTimer* selection_timer; - QLabel* statusINVLabel; - QLabel* statusHYPLabel; - QLabel* statusERRORLabel; + TQTimer* selection_timer; + TQLabel* statusINVLabel; + TQLabel* statusHYPLabel; + TQLabel* statusERRORLabel; DLabel* calc_display; - QRadioButton* anglebutton[3]; - QRadioButton* basebutton[4]; - QPushButton* pbhyp; - QPushButton* pbEE; - QPushButton* pbinv; - QPushButton* pbMR; - QPushButton* pbA; - QPushButton* pbSin; - QPushButton* pbplusminus; - QPushButton* pbMplusminus; - QPushButton* pbB; - QPushButton* pbCos; - QPushButton* pbreci; - QPushButton* pbC; - QPushButton* pbTan; - QPushButton* pbfactorial; - QPushButton* pbD; - QPushButton* pblog; - QPushButton* pbsquare; - QPushButton* pbE; - QPushButton* pbln; - QPushButton* pbpower; - QPushButton* pbF; - QPushButton* pbMC; - QPushButton* pbClear; - QPushButton* pbAC; - QPushButton* pb7; - QPushButton* pb8; - QPushButton* pb9; - QPushButton* pbparenopen; - QPushButton* pbparenclose; - QPushButton* pband; - QPushButton* pb4; - QPushButton* pb5; - QPushButton* pb6; - QPushButton* pbX; - QPushButton* pbdivision; - QPushButton* pbor; - QPushButton* pb1; - QPushButton* pb2; - QPushButton* pb3; - QPushButton* pbplus; - QPushButton* pbminus; - QPushButton* pbshift; - QPushButton* pbperiod; - QPushButton* pb0; - QPushButton* pbequal; - QPushButton* pbpercent; - QPushButton* pbnegate; - QPushButton* pbmod; - - QPtrList<QPushButton> mNumButtonList; - QPtrList<QPushButton> mFunctionButtonList; - QPtrList<QPushButton> mHexButtonList; - QPtrList<QPushButton> mMemButtonList; - QPtrList<QPushButton> mOperationButtonList; + TQRadioButton* anglebutton[3]; + TQRadioButton* basebutton[4]; + TQPushButton* pbhyp; + TQPushButton* pbEE; + TQPushButton* pbinv; + TQPushButton* pbMR; + TQPushButton* pbA; + TQPushButton* pbSin; + TQPushButton* pbplusminus; + TQPushButton* pbMplusminus; + TQPushButton* pbB; + TQPushButton* pbCos; + TQPushButton* pbreci; + TQPushButton* pbC; + TQPushButton* pbTan; + TQPushButton* pbfactorial; + TQPushButton* pbD; + TQPushButton* pblog; + TQPushButton* pbsquare; + TQPushButton* pbE; + TQPushButton* pbln; + TQPushButton* pbpower; + TQPushButton* pbF; + TQPushButton* pbMC; + TQPushButton* pbClear; + TQPushButton* pbAC; + TQPushButton* pb7; + TQPushButton* pb8; + TQPushButton* pb9; + TQPushButton* pbparenopen; + TQPushButton* pbparenclose; + TQPushButton* pband; + TQPushButton* pb4; + TQPushButton* pb5; + TQPushButton* pb6; + TQPushButton* pbX; + TQPushButton* pbdivision; + TQPushButton* pbor; + TQPushButton* pb1; + TQPushButton* pb2; + TQPushButton* pb3; + TQPushButton* pbplus; + TQPushButton* pbminus; + TQPushButton* pbshift; + TQPushButton* pbperiod; + TQPushButton* pb0; + TQPushButton* pbequal; + TQPushButton* pbpercent; + TQPushButton* pbnegate; + TQPushButton* pbmod; + + TQPtrList<TQPushButton> mNumButtonList; + TQPtrList<TQPushButton> mFunctionButtonList; + TQPtrList<TQPushButton> mHexButtonList; + TQPtrList<TQPushButton> mMemButtonList; + TQPtrList<TQPushButton> mOperationButtonList; bool key_pressed; KStats stats; - QListBox *paper; - QTimer *status_timer; + TQListBox *paper; + TQTimer *status_timer; - QRect sheet_range; - QString sheet_name; + TQRect sheet_range; + TQString sheet_name; Calculator* corba; - QWidget *mSmallPage; - QWidget *mLargePage; + TQWidget *mSmallPage; + TQWidget *mLargePage; int mInternalSpacing; }; -#endif //QTCLAC_H +#endif //TQTCLAC_H diff --git a/kspread/plugins/calculator/kcalc_core.cpp b/kspread/plugins/calculator/kcalc_core.cpp index 43221b21..e82e56c9 100644 --- a/kspread/plugins/calculator/kcalc_core.cpp +++ b/kspread/plugins/calculator/kcalc_core.cpp @@ -2,7 +2,7 @@ $Id: kcalc_core.cpp 541875 2006-05-17 14:42:51Z zander $ kCalculator, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no The stack engine conatined in this file was take from Martin Bartlett's xfrmcalc @@ -62,7 +62,7 @@ int isinf(double x) { return !finite(x) && x==x; } #endif -extern QPtrList<CALCAMNT> temp_stack; +extern TQPtrList<CALCAMNT> temp_stack; last_input_type last_input; char display_str[DSP_SIZE+1]; @@ -157,7 +157,7 @@ int precedence[14] = { 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 6 }; }; -void QtCalculator::InitializeCalculator(void) { +void TQtCalculator::InitializeCalculator(void) { // // Basic initialization involves initializing the calcultion @@ -196,13 +196,13 @@ void fpe_handler(int fpe_parm) } -void QtCalculator::setData( const QRect& _range, const char *_sheet ) +void TQtCalculator::setData( const TQRect& _range, const char *_sheet ) { sheet_range = _range; sheet_name = _sheet; } -void QtCalculator::setValue( double _value ) +void TQtCalculator::setValue( double _value ) { last_input = DIGIT; DISPLAY_AMOUNT = _value; @@ -213,7 +213,7 @@ void QtCalculator::setValue( double _value ) UpdateDisplay(); } -void QtCalculator::setLabel( const char *_text ) +void TQtCalculator::setLabel( const char *_text ) { last_input = DIGIT; DISPLAY_AMOUNT = 0L; @@ -224,7 +224,7 @@ void QtCalculator::setLabel( const char *_text ) calc_display->setText( _text ); } -void QtCalculator::RefreshCalculator(void) +void TQtCalculator::RefreshCalculator(void) { InitStack(); display_error = 0; @@ -237,12 +237,12 @@ void QtCalculator::RefreshCalculator(void) decimal_point = 0; } -void QtCalculator::EnterDigit(int data) +void TQtCalculator::EnterDigit(int data) { if(eestate){ - QString string; + TQString string; string.setNum(data); strcat(display_str, string.latin1()); DISPLAY_AMOUNT = (CALCAMNT) strtod(display_str,0); @@ -282,66 +282,66 @@ void QtCalculator::EnterDigit(int data) UpdateDisplay(); } -void QtCalculator::button0() +void TQtCalculator::button0() { EnterDigit(0); } -void QtCalculator::button1() +void TQtCalculator::button1() { EnterDigit(1); } -void QtCalculator::button2() +void TQtCalculator::button2() { if (current_base == NB_BINARY) return; EnterDigit(2); } -void QtCalculator::button3() +void TQtCalculator::button3() { if (current_base == NB_BINARY) return; EnterDigit(3); } -void QtCalculator::button4() +void TQtCalculator::button4() { if (current_base == NB_BINARY) return; EnterDigit(4); } -void QtCalculator::button5() +void TQtCalculator::button5() { if (current_base == NB_BINARY) return; EnterDigit(5); } -void QtCalculator::button6() +void TQtCalculator::button6() { if (current_base == NB_BINARY) return; EnterDigit(6); } -void QtCalculator::button7() +void TQtCalculator::button7() { if (current_base == NB_BINARY) return; EnterDigit(7); } -void QtCalculator::button8() +void TQtCalculator::button8() { if ((current_base == NB_BINARY) || (current_base == NB_OCTAL)) return; EnterDigit(8); } -void QtCalculator::button9() +void TQtCalculator::button9() { if ((current_base == NB_BINARY) || (current_base == NB_OCTAL)) return; @@ -349,7 +349,7 @@ void QtCalculator::button9() } -void QtCalculator::buttonA() +void TQtCalculator::buttonA() { if ((current_base == NB_BINARY) || (current_base == NB_OCTAL) || (current_base == NB_DECIMAL)) @@ -358,7 +358,7 @@ void QtCalculator::buttonA() } -void QtCalculator::buttonB() +void TQtCalculator::buttonB() { if ((current_base == NB_BINARY) || (current_base == NB_OCTAL) || (current_base == NB_DECIMAL)) @@ -367,7 +367,7 @@ void QtCalculator::buttonB() } -void QtCalculator::buttonC() +void TQtCalculator::buttonC() { if ((current_base == NB_BINARY) || (current_base == NB_OCTAL) || (current_base == NB_DECIMAL)) @@ -376,7 +376,7 @@ void QtCalculator::buttonC() } -void QtCalculator::buttonD() +void TQtCalculator::buttonD() { if ((current_base == NB_BINARY) || (current_base == NB_OCTAL) || (current_base == NB_DECIMAL)) @@ -385,7 +385,7 @@ void QtCalculator::buttonD() } -void QtCalculator::buttonE() +void TQtCalculator::buttonE() { if ((current_base == NB_BINARY) || (current_base == NB_OCTAL) || (current_base == NB_DECIMAL)) @@ -393,7 +393,7 @@ void QtCalculator::buttonE() EnterDigit(14); } -void QtCalculator::buttonF() +void TQtCalculator::buttonF() { if ((current_base == NB_BINARY) || (current_base == NB_OCTAL) || (current_base == NB_DECIMAL)) @@ -403,7 +403,7 @@ void QtCalculator::buttonF() -void QtCalculator::EnterDecimal() +void TQtCalculator::EnterDecimal() { if(eestate){ @@ -440,7 +440,7 @@ void QtCalculator::EnterDecimal() } -void QtCalculator::Or() +void TQtCalculator::Or() { eestate = false; if (inverse){ @@ -453,7 +453,7 @@ void QtCalculator::Or() last_input = OPERATION; } -void QtCalculator::And() +void TQtCalculator::And() { eestate = false; last_input = OPERATION; @@ -461,7 +461,7 @@ void QtCalculator::And() } -void QtCalculator::Shift() +void TQtCalculator::Shift() { eestate = false; last_input = OPERATION; @@ -475,14 +475,14 @@ void QtCalculator::Shift() } -void QtCalculator::Plus() +void TQtCalculator::Plus() { eestate = false; last_input = OPERATION; EnterStackFunction(6); } -void QtCalculator::Minus() +void TQtCalculator::Minus() { eestate = false; last_input = OPERATION; @@ -490,21 +490,21 @@ void QtCalculator::Minus() } -void QtCalculator::Multiply() +void TQtCalculator::Multiply() { eestate = false; last_input = OPERATION; EnterStackFunction(8); } -void QtCalculator::Divide() +void TQtCalculator::Divide() { eestate = false; last_input = OPERATION; EnterStackFunction(9); } -void QtCalculator::Mod() +void TQtCalculator::Mod() { eestate = false; last_input = OPERATION; @@ -517,7 +517,7 @@ void QtCalculator::Mod() } } -void QtCalculator::Power() +void TQtCalculator::Power() { eestate = false; last_input = OPERATION; @@ -533,7 +533,7 @@ void QtCalculator::Power() -void QtCalculator::EnterStackFunction(int data) +void TQtCalculator::EnterStackFunction(int data) { item_contents new_item; int new_precedence; @@ -568,14 +568,14 @@ void QtCalculator::EnterStackFunction(int data) PushStack(&new_item); } -void QtCalculator::EnterNegate() +void TQtCalculator::EnterNegate() { if(eestate){ - QString string; + TQString string; string = display_str; int pos; - pos = string.findRev('e',-1,false); + pos = string.tqfindRev('e',-1,false); if(pos == -1) return; @@ -602,7 +602,7 @@ void QtCalculator::EnterNegate() last_input = DIGIT; } -void QtCalculator::EnterOpenParen() +void TQtCalculator::EnterOpenParen() { eestate = false; last_input = OPERATION; @@ -611,7 +611,7 @@ void QtCalculator::EnterOpenParen() } -void QtCalculator::EnterCloseParen() +void TQtCalculator::EnterCloseParen() { eestate = false; last_input = OPERATION; @@ -624,7 +624,7 @@ void QtCalculator::EnterCloseParen() } -void QtCalculator::EnterRecip() +void TQtCalculator::EnterRecip() { eestate = false; last_input = OPERATION; @@ -633,7 +633,7 @@ void QtCalculator::EnterRecip() UpdateDisplay(); } -void QtCalculator::EnterInt() +void TQtCalculator::EnterInt() { eestate = false; CALCAMNT work_amount1 = 0.0, work_amount2 = 0.0; @@ -653,7 +653,7 @@ void QtCalculator::EnterInt() } -void QtCalculator::EnterFactorial() +void TQtCalculator::EnterFactorial() { eestate = false; CALCAMNT work_amount1, work_amount2; @@ -682,7 +682,7 @@ void QtCalculator::EnterFactorial() } -void QtCalculator::EnterSquare() +void TQtCalculator::EnterSquare() { eestate = false; if (!inverse){ @@ -699,7 +699,7 @@ void QtCalculator::EnterSquare() } -void QtCalculator::EnterNotCmp() +void TQtCalculator::EnterNotCmp() { eestate = false; CALCAMNT boh_work_d; @@ -718,7 +718,7 @@ void QtCalculator::EnterNotCmp() } -void QtCalculator::EnterHyp() +void TQtCalculator::EnterHyp() { switch(kcalcdefaults.style){ @@ -762,7 +762,7 @@ void QtCalculator::EnterHyp() } -void QtCalculator::ExecSin(){ +void TQtCalculator::ExecSin(){ switch(kcalcdefaults.style){ @@ -792,7 +792,7 @@ void QtCalculator::ExecSin(){ } -void QtCalculator::ComputeSum() +void TQtCalculator::ComputeSum() { inverse = false; eestate = false; @@ -805,7 +805,7 @@ void QtCalculator::ComputeSum() UpdateDisplay(); } -void QtCalculator::ComputeMul() +void TQtCalculator::ComputeMul() { inverse = false; eestate = false; @@ -818,7 +818,7 @@ void QtCalculator::ComputeMul() UpdateDisplay(); } -void QtCalculator::ComputeMin() +void TQtCalculator::ComputeMin() { inverse = false; eestate = false; @@ -831,7 +831,7 @@ void QtCalculator::ComputeMin() UpdateDisplay(); } -void QtCalculator::ComputeMax() +void TQtCalculator::ComputeMax() { inverse = false; eestate = false; @@ -844,7 +844,7 @@ void QtCalculator::ComputeMax() UpdateDisplay(); } -void QtCalculator::ComputeMean(){ +void TQtCalculator::ComputeMean(){ if(!inverse){ eestate = false; @@ -870,7 +870,7 @@ void QtCalculator::ComputeMean(){ } -void QtCalculator::ComputeSin() +void TQtCalculator::ComputeSin() { CALCAMNT work_amount; eestate = false; @@ -936,7 +936,7 @@ void QtCalculator::ComputeSin() } -void QtCalculator::ExecCos(){ +void TQtCalculator::ExecCos(){ switch(kcalcdefaults.style){ @@ -966,7 +966,7 @@ void QtCalculator::ExecCos(){ } -void QtCalculator::ComputeStd(){ +void TQtCalculator::ComputeStd(){ if(!inverse){ // std (n-1) inverse = false; @@ -1000,7 +1000,7 @@ void QtCalculator::ComputeStd(){ } -void QtCalculator::ComputeCos() +void TQtCalculator::ComputeCos() { CALCAMNT work_amount; eestate = false; @@ -1069,7 +1069,7 @@ void QtCalculator::ComputeCos() } -void QtCalculator::ExecTan(){ +void TQtCalculator::ExecTan(){ switch(kcalcdefaults.style){ @@ -1093,7 +1093,7 @@ void QtCalculator::ExecTan(){ } -void QtCalculator::ComputeMedean(){ +void TQtCalculator::ComputeMedean(){ if(!inverse){ // std (n-1) inverse = false; @@ -1125,7 +1125,7 @@ void QtCalculator::ComputeMedean(){ } -void QtCalculator::ComputeTan() +void TQtCalculator::ComputeTan() { CALCAMNT work_amount; eestate = false; @@ -1196,7 +1196,7 @@ void QtCalculator::ComputeTan() } -void QtCalculator::EnterPercent() +void TQtCalculator::EnterPercent() { eestate = false; last_input = OPERATION; @@ -1206,7 +1206,7 @@ void QtCalculator::EnterPercent() } -void QtCalculator::EnterLogr() +void TQtCalculator::EnterLogr() { switch(kcalcdefaults.style){ @@ -1267,7 +1267,7 @@ void QtCalculator::EnterLogr() } } -void QtCalculator::EnterLogn() +void TQtCalculator::EnterLogn() { switch(kcalcdefaults.style){ @@ -1321,7 +1321,7 @@ void QtCalculator::EnterLogn() } -void QtCalculator::base_selected(int number){ +void TQtCalculator::base_selected(int number){ switch(number){ case 0: @@ -1342,7 +1342,7 @@ void QtCalculator::base_selected(int number){ } -void QtCalculator::angle_selected(int number){ +void TQtCalculator::angle_selected(int number){ switch(number){ case 0: @@ -1359,7 +1359,7 @@ void QtCalculator::angle_selected(int number){ } } -void QtCalculator::SetInverse(){ +void TQtCalculator::SetInverse(){ inverse = ! inverse; if (inverse){ @@ -1371,20 +1371,20 @@ void QtCalculator::SetInverse(){ } -void QtCalculator::SetDeg() { +void TQtCalculator::SetDeg() { angle_mode = ANG_DEGREE; } -void QtCalculator::SetGra() { +void TQtCalculator::SetGra() { angle_mode = ANG_GRADIENT; } -void QtCalculator::SetRad() { +void TQtCalculator::SetRad() { angle_mode = ANG_RADIAN; } -void QtCalculator::SetHex() { +void TQtCalculator::SetHex() { /* * Set Hex Mode */ @@ -1397,7 +1397,7 @@ void QtCalculator::SetHex() { UpdateDisplay(); } -void QtCalculator::SetOct() { +void TQtCalculator::SetOct() { /* * Set Oct Mode */ @@ -1410,7 +1410,7 @@ void QtCalculator::SetOct() { UpdateDisplay(); } -void QtCalculator::SetBin() { +void TQtCalculator::SetBin() { /* * Set Bin Mode */ @@ -1423,7 +1423,7 @@ void QtCalculator::SetBin() { UpdateDisplay(); } -void QtCalculator::SetDec() +void TQtCalculator::SetDec() { /* * Set Dec Mode @@ -1438,7 +1438,7 @@ void QtCalculator::SetDec() } -void QtCalculator::EE() +void TQtCalculator::EE() { if(inverse){ DISPLAY_AMOUNT = pi; @@ -1458,7 +1458,7 @@ void QtCalculator::EE() } -void QtCalculator::MR() +void TQtCalculator::MR() { eestate = false; last_input = OPERATION; @@ -1468,7 +1468,7 @@ void QtCalculator::MR() } -void QtCalculator::Mplusminus() +void TQtCalculator::Mplusminus() { eestate = false; @@ -1481,14 +1481,14 @@ void QtCalculator::Mplusminus() } } -void QtCalculator::MC() +void TQtCalculator::MC() { memory_num = 0; refresh_display = 1; } -void QtCalculator::EnterEqual() +void TQtCalculator::EnterEqual() { eestate = false; last_input = OPERATION; @@ -1522,7 +1522,7 @@ void QtCalculator::EnterEqual() } -void QtCalculator::Clear(){ +void TQtCalculator::Clear(){ eestate = false; @@ -1552,7 +1552,7 @@ void QtCalculator::Clear(){ } -void QtCalculator::ClearAll() +void TQtCalculator::ClearAll() { eestate = false; @@ -1565,7 +1565,7 @@ void QtCalculator::ClearAll() -void QtCalculator::UpdateDisplay() +void TQtCalculator::UpdateDisplay() { // this needs to be rewritten based on whether we are currently @@ -1720,11 +1720,11 @@ int cvb(char *out_str, long amount, int max_digits) lead_one = 1, lead_one_count = 0, work_size = sizeof(amount) * CHAR_BIT; - unsigned long bit_mask = (1 << ((sizeof(amount) * CHAR_BIT) - 1)); + unsigned long bit_tqmask = (1 << ((sizeof(amount) * CHAR_BIT) - 1)); - while (bit_mask) { + while (bit_tqmask) { - if (amount & bit_mask) { + if (amount & bit_tqmask) { if (lead_one) lead_one_count++; lead_zero = 0; @@ -1734,7 +1734,7 @@ int cvb(char *out_str, long amount, int max_digits) if (!lead_zero) work_str[work_char++] = '0'; } - bit_mask >>= 1; + bit_tqmask >>= 1; } if (!work_char) work_str[work_char++] = '0'; diff --git a/kspread/plugins/calculator/kcalctype.h b/kspread/plugins/calculator/kcalctype.h index b051f107..b4c0b4ff 100644 --- a/kspread/plugins/calculator/kcalctype.h +++ b/kspread/plugins/calculator/kcalctype.h @@ -2,7 +2,7 @@ $Id: kcalctype.h 466447 2005-10-02 17:54:10Z zander $ KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu diff --git a/kspread/plugins/calculator/main.cpp b/kspread/plugins/calculator/main.cpp index 35887547..c6efb99f 100644 --- a/kspread/plugins/calculator/main.cpp +++ b/kspread/plugins/calculator/main.cpp @@ -43,8 +43,8 @@ K_EXPORT_COMPONENT_FACTORY( libkspreadcalc, CalcFactory ) KInstance* CalcFactory::s_global = 0; -CalcFactory::CalcFactory( QObject* parent, const char* name ) - : KLibFactory( parent, name ) +CalcFactory::CalcFactory( TQObject* tqparent, const char* name ) + : KLibFactory( tqparent, name ) { s_global = new KInstance( "kspreadcalc" ); } @@ -54,15 +54,15 @@ CalcFactory::~CalcFactory() delete s_global; } -QObject* CalcFactory::createObject( QObject* parent, const char* name, const char* /*classname*/, const QStringList & ) +TQObject* CalcFactory::createObject( TQObject* tqparent, const char* name, const char* /*classname*/, const TQStringList & ) { - if ( !parent->inherits("KSpread::View") ) + if ( !tqparent->inherits("KSpread::View") ) { - kdError() << "CalcFactory: KSpread::View expected. Parent is " << parent->className() << endl; + kdError() << "CalcFactory: KSpread::View expected. Parent is " << tqparent->className() << endl; return 0; } - QObject *obj = new Calculator( (View*)parent, name ); + TQObject *obj = new Calculator( (View*)tqparent, name ); return obj; } @@ -77,17 +77,17 @@ KInstance* CalcFactory::global() * ***************************************************/ -Calculator::Calculator( View* parent, const char* name ) - : KParts::Plugin( parent, name ) +Calculator::Calculator( View* tqparent, const char* name ) + : KParts::Plugin( tqparent, name ) { m_calc = 0; - m_view = parent; + m_view = tqparent; KGlobal::locale()->insertCatalogue("kspreadcalc_calc"); - parent->installEventFilter( this ); + tqparent->installEventFilter( this ); (void)new KAction( i18n("Calculator"), SmallIcon("kcalc", CalcFactory::global()), - 0, this, SLOT( showCalculator() ), actionCollection(), "kspreadcalc"); + 0, this, TQT_SLOT( showCalculator() ), actionCollection(), "kspreadcalc"); } void Calculator::showCalculator() @@ -99,7 +99,7 @@ void Calculator::showCalculator() return; } - m_calc = new QtCalculator( this, (View*)parent() ); + m_calc = new TQtCalculator( this, (View*)tqparent() ); m_calc->setFixedSize( 9 + 100 + 9 + 233 + 9, 239); m_calc->show(); m_calc->raise(); @@ -109,7 +109,7 @@ Calculator::~Calculator() { } -bool Calculator::eventFilter( QObject*, QEvent* ev ) +bool Calculator::eventFilter( TQObject*, TQEvent* ev ) { if ( !m_calc ) return FALSE; @@ -145,7 +145,7 @@ bool Calculator::eventFilter( QObject*, QEvent* ev ) // Multiple cells selected ? m_calc->setData( event->rect(), event->sheet().latin1() ); - QString str = util_rangeName( sheet, event->rect() ); + TQString str = util_rangeName( sheet, event->rect() ); m_calc->setLabel( str.latin1() ); return FALSE; @@ -156,7 +156,7 @@ bool Calculator::eventFilter( QObject*, QEvent* ev ) /*************************************************** * - * QtCalculator + * TQtCalculator * ***************************************************/ @@ -164,7 +164,7 @@ bool Calculator::eventFilter( QObject*, QEvent* ev ) * This is a hook that makes the calculator to * ask KSpread for the values of the selected cells. */ -void QtCalculator::useData() +void TQtCalculator::useData() { stats.clearAll(); @@ -193,7 +193,7 @@ void QtCalculator::useData() delete []v; - sheet_name = QString::null; + sheet_name = TQString(); } #include "main.moc" diff --git a/kspread/plugins/calculator/main.h b/kspread/plugins/calculator/main.h index 08e9b5c9..dc5eb3a5 100644 --- a/kspread/plugins/calculator/main.h +++ b/kspread/plugins/calculator/main.h @@ -20,16 +20,16 @@ #ifndef __my_app_h__ #define __my_app_h__ -#include <qptrlist.h> -#include <qstring.h> -#include <qobject.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqobject.h> #include <klibloader.h> #include <kparts/plugin.h> #include <koffice_export.h> -class QtCalculator; +class TQtCalculator; class KInstance; namespace KSpread @@ -40,12 +40,13 @@ class View; class CalcFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: - CalcFactory( QObject* parent = 0, const char* name = 0 ); + CalcFactory( TQObject* tqparent = 0, const char* name = 0 ); ~CalcFactory(); - virtual QObject* createObject( QObject* parent = 0, const char* name = 0, - const char* classname = "QObject", const QStringList &args = QStringList() ); + virtual TQObject* createObject( TQObject* tqparent = 0, const char* name = 0, + const char* classname = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList() ); static KInstance* global(); @@ -56,8 +57,9 @@ private: class KSPREAD_EXPORT Calculator : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - Calculator( View* parent, const char* name = 0 ); + Calculator( View* tqparent, const char* name = 0 ); ~Calculator(); View* view() { return m_view; } @@ -66,10 +68,10 @@ protected slots: void showCalculator(); protected: - bool eventFilter( QObject*, QEvent* ); + bool eventFilter( TQObject*, TQEvent* ); private: - QtCalculator* m_calc; + TQtCalculator* m_calc; View* m_view; }; diff --git a/kspread/plugins/calculator/stats.cpp b/kspread/plugins/calculator/stats.cpp index 14ce24b9..5413701b 100644 --- a/kspread/plugins/calculator/stats.cpp +++ b/kspread/plugins/calculator/stats.cpp @@ -2,7 +2,7 @@ $Id: stats.cpp 466447 2005-10-02 17:54:10Z zander $ KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu diff --git a/kspread/plugins/calculator/stats.h b/kspread/plugins/calculator/stats.h index 1f325a20..3c20881f 100644 --- a/kspread/plugins/calculator/stats.h +++ b/kspread/plugins/calculator/stats.h @@ -2,7 +2,7 @@ $Id: stats.h 466447 2005-10-02 17:54:10Z zander $ KCalc, a scientific calculator for the X window system using the - Qt widget libraries, available at no cost at http://www.troll.no + TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1996 Bernd Johannes Wuebben wuebben@math.cornell.edu @@ -27,7 +27,7 @@ #ifndef KSTATS_H #define KSTATS_H -#include <qptrlist.h> +#include <tqptrlist.h> #include <math.h> #include "kcalctype.h" @@ -59,17 +59,17 @@ public: private: - QPtrList<CALCAMNT> data; + TQPtrList<CALCAMNT> data; bool error_flag; }; -class MyList : public QPtrList<CALCAMNT> +class MyList : public TQPtrList<CALCAMNT> { public: - MyList() : QPtrList<CALCAMNT>() {}; + MyList() : TQPtrList<CALCAMNT>() {}; protected: int compareItems(Item item1,Item item2); |