diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kspread/plugins/calculator/kcalc.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread/plugins/calculator/kcalc.cpp')
-rw-r--r-- | kspread/plugins/calculator/kcalc.cpp | 576 |
1 files changed, 288 insertions, 288 deletions
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"\ "[email protected]\n"\ "[email protected]\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; |