diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-04-09 20:52:09 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-04-09 20:52:09 +0200 |
commit | 91d2d7482c36e67cb36df9d1dcdbd989911e4ceb (patch) | |
tree | c842adfbb1a172d9b61241d7dde70354e821bb75 /src/kqalculate.cpp | |
parent | 4870c0c8c53d3df6ba954b2b4d8ebd87a8c43060 (diff) | |
download | qalculate-tde-91d2d7482c36e67cb36df9d1dcdbd989911e4ceb.tar.gz qalculate-tde-91d2d7482c36e67cb36df9d1dcdbd989911e4ceb.zip |
Initial TQt conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src/kqalculate.cpp')
-rw-r--r-- | src/kqalculate.cpp | 1030 |
1 files changed, 515 insertions, 515 deletions
diff --git a/src/kqalculate.cpp b/src/kqalculate.cpp index 657f53b..537db41 100644 --- a/src/kqalculate.cpp +++ b/src/kqalculate.cpp @@ -56,49 +56,49 @@ #include <kglobalsettings.h> #include <kuniqueapplication.h> #include <kstringhandler.h> -#include <qtable.h> +#include <tqtable.h> #include <kseparator.h> #include <kiconloader.h> -#include <qframe.h> -#include <qvariant.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qclipboard.h> -#include <qstylesheet.h> +#include <tqframe.h> +#include <tqvariant.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqclipboard.h> +#include <tqstylesheet.h> #include <kcompletion.h> #include <klineedit.h> -#include <qlabel.h> +#include <tqlabel.h> #include <kmessagebox.h> -#include <qpixmap.h> -#include <qpicture.h> -#include <qpainter.h> -#include <qfontmetrics.h> +#include <tqpixmap.h> +#include <tqpicture.h> +#include <tqpainter.h> +#include <tqfontmetrics.h> #include <sys/stat.h> #include <unistd.h> #include <time.h> #include <math.h> #include <dirent.h> #include <pthread.h> -#include <qsimplerichtext.h> -#include <qstatusbar.h> -#include <qwidgetstack.h> +#include <tqsimplerichtext.h> +#include <tqstatusbar.h> +#include <tqwidgetstack.h> #include <ktextbrowser.h> #include <kpushbutton.h> #include "qalculateresultdisplay.h" -#include <qbitmap.h> -#include <qscrollview.h> -#include <qobject.h> +#include <tqbitmap.h> +#include <tqscrollview.h> +#include <tqobject.h> #include <kapplication.h> #include <kaction.h> -#include <qspinbox.h> +#include <tqspinbox.h> #include <kprogress.h> #include <kpopupmenu.h> #include <kmenubar.h> -#include <qlayout.h> -#include <qtimer.h> +#include <tqlayout.h> +#include <tqtimer.h> #include <kcompletionbox.h> -#include <qstringlist.h> -#include <qcombobox.h> +#include <tqstringlist.h> +#include <tqcombobox.h> #include <ksystemtray.h> #if KDE_VERSION_MAJOR > 3 || KDE_VERSION_MINOR > 1 #include <kactionclasses.h> @@ -106,38 +106,38 @@ #if KDE_VERSION_MAJOR > 3 || KDE_VERSION_MINOR >= 4 #include <kaccelmanager.h> #endif -#include <qbuttongroup.h> -#include <qvbuttongroup.h> -#include <qradiobutton.h> -#include <qgrid.h> +#include <tqbuttongroup.h> +#include <tqvbuttongroup.h> +#include <tqradiobutton.h> +#include <tqgrid.h> #include <kfiledialog.h> -#include <qimage.h> +#include <tqimage.h> #include <kaccel.h> #include <kio/netaccess.h> #if KDE_VERSION_MAJOR > 3 || KDE_VERSION_MINOR >= 2 #include <kinputdialog.h> #endif #include <kdeversion.h> -#include <qstyle.h> +#include <tqstyle.h> #include <kglobalaccel.h> #include <kkeydialog.h> #include <kkeybutton.h> #include <kcombobox.h> MathStructure *mstruct, *matrix_mstruct, *parsed_mstruct, *parsed_tostruct; -QString result_text, result_history_text, parsed_text; -QWidget *expressionWidget, *resultWidget, *statusWidget_l; -QWidget *topWidget; +TQString result_text, result_history_text, parsed_text; +TQWidget *expressionWidget, *resultWidget, *statusWidget_l; +TQWidget *topWidget; KQalculate *mainWin = 0; bool prev_result_approx; extern bool close_to_systray; extern bool display_expression_status; -extern QColor status_error_color; -extern QColor status_warning_color; +extern TQColor status_error_color; +extern TQColor status_warning_color; extern int use_icon_buttons; extern bool enable_expression_completion; -extern QString initial_history; +extern TQString initial_history; extern tree_struct function_cats, unit_cats, variable_cats; extern vector<void*> ia_units, ia_variables, ia_functions; extern vector<MathFunction*> recent_functions; @@ -157,11 +157,11 @@ extern bool save_mode_on_exit, save_defs_on_exit; extern bool canplot; extern bool use_custom_result_font, use_custom_expression_font, use_custom_status_font; -extern QString custom_result_font, custom_expression_font, custom_status_font; +extern TQString custom_result_font, custom_expression_font, custom_status_font; -extern QTimer *error_timer; +extern TQTimer *error_timer; -extern QStringList expression_history; +extern TQStringList expression_history; bool expression_has_changed, expression_has_changed2, had_errors_before, had_warnings_before, block_result_update; @@ -176,9 +176,9 @@ extern bool show_keypad, show_history, show_stack; extern vector<mode_struct> modes; -extern QValueVector<QString> inhistory; -extern QValueVector<int> inhistory_type; -extern QValueVector<int> inhistory_id; +extern TQValueVector<TQString> inhistory; +extern TQValueVector<int> inhistory_type; +extern TQValueVector<int> inhistory_id; extern int inhistory_current_id; int initial_inhistory_index = 0; @@ -190,7 +190,7 @@ const MathStructure *KQalculate::getResultPart(int i) { #if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2 #include <kiconloader.h> #include <kconfig.h> -QPixmap loadSystrayIcon(const QString &icon) { +TQPixmap loadSystrayIcon(const TQString &icon) { KConfig *appCfg = kapp->config(); KConfigGroupSaver configSaver(appCfg, "System Tray"); int iconWidth = appCfg->readNumEntry("systrayIconWidth", 22); @@ -226,7 +226,7 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) vans_id_start[4] = -1; vans_id_end[4] = -1; - QStyleSheet::setDefaultSheet(new QalculateStyleSheet()); + TQStyleSheet::setDefaultSheet(new QalculateStyleSheet()); insert_matrix_dialog = NULL; preferences_dialog = NULL; @@ -265,11 +265,11 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) ActionHide = new KAction(i18n("Hide"), "hide", 0, this, SLOT(hide()), actionCollection(), "hide"); showSystemTrayIcon(close_to_systray); - setCentralWidget(new QWidget(this)); - QVBoxLayout *mainLayout = new QVBoxLayout(centralWidget(), 11, 6); - mainLayout->setResizeMode(QLayout::Minimum); + setCentralWidget(new TQWidget(this)); + TQVBoxLayout *mainLayout = new TQVBoxLayout(centralWidget(), 11, 6); + mainLayout->setResizeMode(TQLayout::Minimum); - QHBoxLayout *topLayout = new QHBoxLayout(0, 0, 6); + TQHBoxLayout *topLayout = new TQHBoxLayout(0, 0, 6); bool use_button_pixmaps = false; if(use_icon_buttons > 0) { @@ -280,51 +280,51 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) use_button_pixmaps = config.readBoolEntry("ShowIconsOnPushButtons", false); } - if(use_button_pixmaps) leftButtonsLayout = new QVBoxLayout(0, 0, 3); - else leftButtonsLayout = new QVBoxLayout(0, 0, 6); + if(use_button_pixmaps) leftButtonsLayout = new TQVBoxLayout(0, 0, 3); + else leftButtonsLayout = new TQVBoxLayout(0, 0, 6); if(use_button_pixmaps) executeButton = new QalculateButton(KApplication::kApplication()->iconLoader()->loadIconSet("exec", KIcon::Small, ICON_SIZE_SMALL_MEDIUM), "", centralWidget()); else if(rpn_mode) executeButton = new QalculateButton(i18n("Enter"), centralWidget()); else executeButton = new QalculateButton(i18n("="), centralWidget()); - executeButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed, false); - if(rpn_mode) QToolTip::add(executeButton, i18n("Calculate expression and add to stack")); - else QToolTip::add(executeButton, i18n("Calculate expression")); + executeButton->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed, false); + if(rpn_mode) TQToolTip::add(executeButton, i18n("Calculate expression and add to stack")); + else TQToolTip::add(executeButton, i18n("Calculate expression")); leftButtonsLayout->addWidget(executeButton); - leftButtonsSeparator = new KSeparator(Qt::Horizontal, centralWidget()); + leftButtonsSeparator = new KSeparator(TQt::Horizontal, centralWidget()); leftButtonsLayout->addWidget(leftButtonsSeparator); if(use_button_pixmaps) leftButtonsSeparator->hide(); if(use_button_pixmaps) storeButton = new QalculateButton(KApplication::kApplication()->iconLoader()->loadIconSet("filesaveas", KIcon::Small, ICON_SIZE_SMALL_MEDIUM), "", centralWidget()); else storeButton = new QalculateButton(i18n("Store"), centralWidget()); - storeButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed, false); - QToolTip::add(storeButton, i18n("Store result as variable")); + storeButton->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed, false); + TQToolTip::add(storeButton, i18n("Store result as variable")); leftButtonsLayout->addWidget(storeButton); if(use_button_pixmaps) convertButton = new QalculateButton(KApplication::kApplication()->iconLoader()->loadIconSet("qalculate_convert", KIcon::Small, ICON_SIZE_SMALL_MEDIUM), "", centralWidget()); else convertButton = new QalculateButton(i18n("Convert"), centralWidget()); - convertButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed, false); - QToolTip::add(convertButton, i18n("Convert units in result")); + convertButton->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed, false); + TQToolTip::add(convertButton, i18n("Convert units in result")); leftButtonsLayout->addWidget(convertButton); - leftButtonsLayout->addItem(new QSpacerItem(1, 1, QSizePolicy::Minimum, QSizePolicy::Minimum)); + leftButtonsLayout->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Minimum, TQSizePolicy::Minimum)); - QVBoxLayout *expressionLayout = new QVBoxLayout(0, 0, 0); + TQVBoxLayout *expressionLayout = new TQVBoxLayout(0, 0, 0); expressionEdit = new QalculateExpressionEdit(true, centralWidget()); expressionLayout->addWidget(expressionEdit); expressionEdit->setFocus(); expressionEdit->expression_history = expression_history; if(!enable_expression_completion) expressionEdit->disableCompletion(); - QToolTip::add(expressionEdit, i18n("Enter expression here")); - QHBoxLayout *statusLayout = new QHBoxLayout(0, 0, 6); + TQToolTip::add(expressionEdit, i18n("Enter expression here")); + TQHBoxLayout *statusLayout = new TQHBoxLayout(0, 0, 6); statusLabel_l = new QalculateParseLabel(centralWidget()); - statusLabel_l->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum, false); + statusLabel_l->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum, false); statusLabel_l->setLineWidth(0); statusLabel_l->setMargin(0); - statusLabel_l->setAlignment(int(QLabel::AlignTop | QLabel::AlignLeft)); + statusLabel_l->setAlignment(int(TQLabel::AlignTop | TQLabel::AlignLeft)); if(!display_expression_status) statusLabel_l->hide(); statusLayout->addWidget(statusLabel_l); - statusLabel_r = new QLabel(i18n("status"), centralWidget()); - statusLabel_r->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum, false); + statusLabel_r = new TQLabel(i18n("status"), centralWidget()); + statusLabel_r->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum, false); statusLabel_r->setLineWidth(0); statusLabel_r->setMargin(0); - statusLabel_r->setTextFormat(Qt::RichText); - statusLabel_r->setAlignment(int(QLabel::AlignTop | QLabel::AlignRight)); + statusLabel_r->setTextFormat(TQt::RichText); + statusLabel_r->setAlignment(int(TQLabel::AlignTop | TQLabel::AlignRight)); statusLayout->addWidget(statusLabel_r); expressionLayout->addLayout(statusLayout); resultLabel = new QalculateResultDisplay(centralWidget()); @@ -335,32 +335,32 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) topLayout->addLayout(leftButtonsLayout); mainLayout->addLayout(topLayout); - resultLabel->setWordWrap(QTextEdit::WidgetWidth); + resultLabel->setWordWrap(TQTextEdit::WidgetWidth); resultLabel->setMargin(0); - bottomLine = new KSeparator(Qt::Horizontal, centralWidget()); + bottomLine = new KSeparator(TQt::Horizontal, centralWidget()); mainLayout->addWidget(bottomLine); - mainStack = new QWidgetStack(centralWidget()); + mainStack = new TQWidgetStack(centralWidget()); mainStack->setEnabled(true); - mainStack->setSizePolicy(QSizePolicy((QSizePolicy::SizeType) 5, (QSizePolicy::SizeType) 7, 0, 0, mainStack->sizePolicy().hasHeightForWidth())); + mainStack->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType) 5, (TQSizePolicy::SizeType) 7, 0, 0, mainStack->sizePolicy().hasHeightForWidth())); - keypadPage = new QWidget(mainStack); - QVBoxLayout *keypadPageLayout = new QVBoxLayout(keypadPage, 0, 12); + keypadPage = new TQWidget(mainStack); + TQVBoxLayout *keypadPageLayout = new TQVBoxLayout(keypadPage, 0, 12); - keypadPageLayout->addWidget(new KSeparator(Qt::Horizontal, keypadPage)); + keypadPageLayout->addWidget(new KSeparator(TQt::Horizontal, keypadPage)); - QHBoxLayout *keypadTopLayout = new QHBoxLayout(0, 0, 6); + TQHBoxLayout *keypadTopLayout = new TQHBoxLayout(0, 0, 6); kpExact = new QalculateButton(i18n("Exact"), keypadPage); - QToolTip::add(kpExact, i18n("Toggle exact mode")); + TQToolTip::add(kpExact, i18n("Toggle exact mode")); kpExact->setToggleButton(true); keypadTopLayout->addWidget(kpExact); kpFraction = new QalculateButton(i18n("Fraction"), keypadPage); - QToolTip::add(kpFraction, i18n("Toggle fractional display")); + TQToolTip::add(kpFraction, i18n("Toggle fractional display")); kpFraction->setToggleButton(true); keypadTopLayout->addWidget(kpFraction); - kpNumericCombo = new QComboBox(true, keypadPage); - QToolTip::add(kpNumericCombo, i18n("Numerical display")); + kpNumericCombo = new TQComboBox(true, keypadPage); + TQToolTip::add(kpNumericCombo, i18n("Numerical display")); kpNumericCombo->setEditable(false); keypadTopLayout->addWidget(kpNumericCombo); kpNumericCombo->insertItem(i18n("Normal")); @@ -368,8 +368,8 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) kpNumericCombo->insertItem(i18n("Scientific")); kpNumericCombo->insertItem(i18n("Pure")); kpNumericCombo->insertItem(i18n("Simple")); - kpBaseCombo = new QComboBox(true, keypadPage); - QToolTip::add(kpBaseCombo, i18n("Base in result")); + kpBaseCombo = new TQComboBox(true, keypadPage); + TQToolTip::add(kpBaseCombo, i18n("Base in result")); kpBaseCombo->setEditable(false); keypadTopLayout->addWidget(kpBaseCombo); keypadPageLayout->addLayout(keypadTopLayout); @@ -382,73 +382,73 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) kpBaseCombo->insertItem(i18n("Roman")); kpBaseCombo->insertItem(i18n("Other...")); - QHBoxLayout *keypadBottomLayout = new QHBoxLayout(0, 0, 24); + TQHBoxLayout *keypadBottomLayout = new TQHBoxLayout(0, 0, 24); - QGridLayout *keypadFunctionsLayout = new QGridLayout(0, 5, 3, 0, 6); + TQGridLayout *keypadFunctionsLayout = new TQGridLayout(0, 5, 3, 0, 6); functionsButton = new QalculateButton(i18n("f(x)"), keypadPage); - QFont fb_font(functionsButton->font()); + TQFont fb_font(functionsButton->font()); fb_font.setItalic(true); functionsButton->setFont(fb_font); - QToolTip::add(functionsButton, i18n("Open functions manager")); + TQToolTip::add(functionsButton, i18n("Open functions manager")); keypadFunctionsLayout->addWidget(functionsButton, 0, 0); kpSqrt = new QalculateButton(i18n("sqrt"), keypadPage); - QToolTip::add(kpSqrt, i18n("Square root")); + TQToolTip::add(kpSqrt, i18n("Square root")); keypadFunctionsLayout->addWidget(kpSqrt, 1, 0); kpRaise = new QalculateButton(keypadPage); kpRaise->setMarkup(i18n("x<sup>y</sup>")); - QToolTip::add(kpRaise, i18n("Raise (Ctrl+*)")); + TQToolTip::add(kpRaise, i18n("Raise (Ctrl+*)")); keypadFunctionsLayout->addWidget(kpRaise, 0, 1); kpSquare = new QalculateButton(keypadPage); kpSquare->setMarkup(i18n("x<sup>2</sup>")); - QToolTip::add(kpSquare, i18n("Square")); + TQToolTip::add(kpSquare, i18n("Square")); keypadFunctionsLayout->addWidget(kpSquare, 0, 2); kpLog = new QalculateButton(i18n("log"), keypadPage); - QToolTip::add(kpLog, i18n("Base-10 logarithm")); + TQToolTip::add(kpLog, i18n("Base-10 logarithm")); keypadFunctionsLayout->addWidget(kpLog, 1, 1); kpLn = new QalculateButton(i18n("ln"), keypadPage); - QToolTip::add(kpLn, i18n("Natural logarithm")); + TQToolTip::add(kpLn, i18n("Natural logarithm")); keypadFunctionsLayout->addWidget(kpLn, 1, 2); kpFactorial = new QalculateButton(i18n("x!"), keypadPage); - QToolTip::add(kpFactorial, i18n("Factorial")); + TQToolTip::add(kpFactorial, i18n("Factorial")); keypadFunctionsLayout->addWidget(kpFactorial, 2, 0); kpCos = new QalculateButton(i18n("cos"), keypadPage); - QToolTip::add(kpCos, i18n("Cosine")); + TQToolTip::add(kpCos, i18n("Cosine")); keypadFunctionsLayout->addWidget(kpCos, 2, 1); kpTan = new QalculateButton(i18n("tan"), keypadPage); - QToolTip::add(kpTan, i18n("Tangent")); + TQToolTip::add(kpTan, i18n("Tangent")); keypadFunctionsLayout->addWidget(kpTan, 2, 2); kpHyp = new QalculateButton(i18n("hyp"), keypadPage); - QToolTip::add(kpHyp, i18n("Toggle hyperbolic functions")); + TQToolTip::add(kpHyp, i18n("Toggle hyperbolic functions")); kpHyp->setToggleButton(true); keypadFunctionsLayout->addWidget(kpHyp, 3, 0); kpInv = new QalculateButton(i18n("inv"), keypadPage); - QToolTip::add(kpInv, i18n("Toggle inverse functions")); + TQToolTip::add(kpInv, i18n("Toggle inverse functions")); kpInv->setToggleButton(true); keypadFunctionsLayout->addWidget(kpInv, 3, 1); kpSin = new QalculateButton(i18n("sin"), keypadPage); - QToolTip::add(kpSin, i18n("Sine")); + TQToolTip::add(kpSin, i18n("Sine")); keypadFunctionsLayout->addWidget(kpSin, 3, 2); - QHBoxLayout *keypadAngleLayout = new QHBoxLayout(0, 0, 6); - kpAngleGroup = new QButtonGroup(); + TQHBoxLayout *keypadAngleLayout = new TQHBoxLayout(0, 0, 6); + kpAngleGroup = new TQButtonGroup(); kpAngleGroup->setExclusive(true); - kpDegreesButton = new QRadioButton(i18n("Deg"), keypadPage); - QToolTip::add(kpDegreesButton, i18n("Angle Unit: Degrees")); + kpDegreesButton = new TQRadioButton(i18n("Deg"), keypadPage); + TQToolTip::add(kpDegreesButton, i18n("Angle Unit: Degrees")); kpAngleGroup->insert(kpDegreesButton, 0); keypadAngleLayout->addWidget(kpDegreesButton); - kpRadiansButton = new QRadioButton(i18n("Rad"), keypadPage); - QToolTip::add(kpRadiansButton, i18n("Angle Unit: Radians")); + kpRadiansButton = new TQRadioButton(i18n("Rad"), keypadPage); + TQToolTip::add(kpRadiansButton, i18n("Angle Unit: Radians")); kpAngleGroup->insert(kpRadiansButton, 1); keypadAngleLayout->addWidget(kpRadiansButton); - kpGradiansButton = new QRadioButton(i18n("Gra"), keypadPage); - QToolTip::add(kpGradiansButton, i18n("Angle Unit: Gradians")); + kpGradiansButton = new TQRadioButton(i18n("Gra"), keypadPage); + TQToolTip::add(kpGradiansButton, i18n("Angle Unit: Gradians")); kpAngleGroup->insert(kpGradiansButton, 2); keypadAngleLayout->addWidget(kpGradiansButton); - kpNoAngleUnitButton = new QRadioButton(i18n("None"), keypadPage); + kpNoAngleUnitButton = new TQRadioButton(i18n("None"), keypadPage); kpAngleGroup->insert(kpNoAngleUnitButton, 3); keypadAngleLayout->addWidget(kpNoAngleUnitButton); kpNoAngleUnitButton->hide(); - keypadAngleLayout->addItem(new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum)); + keypadAngleLayout->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); keypadFunctionsLayout->addMultiCellLayout(keypadAngleLayout, 4, 4, 0, 2); #if KDE_VERSION_MAJOR > 3 || KDE_VERSION_MINOR >= 4 @@ -460,7 +460,7 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) keypadBottomLayout->addLayout(keypadFunctionsLayout); - QGridLayout *keypadBasicsLayout = new QGridLayout(0, 1, 1, 0, 6); + TQGridLayout *keypadBasicsLayout = new TQGridLayout(0, 1, 1, 0, 6); kp7 = new QalculateButton(i18n("7"), keypadPage); keypadBasicsLayout->addWidget(kp7, 0, 0); kp8 = new QalculateButton(i18n("8"), keypadPage); @@ -482,63 +482,63 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) kp0 = new QalculateButton(i18n("0"), keypadPage); keypadBasicsLayout->addWidget(kp0, 3, 0); kpDot = new QalculateButton(".", keypadPage); - QToolTip::add(kpDot, i18n("Decimal point")); + TQToolTip::add(kpDot, i18n("Decimal point")); keypadBasicsLayout->addWidget(kpDot, 3, 1); kpExp = new QalculateButton(i18n("EXP"), keypadPage); - QToolTip::add(kpExp, i18n("10^x (Ctrl+Shift+E)")); + TQToolTip::add(kpExp, i18n("10^x (Ctrl+Shift+E)")); keypadBasicsLayout->addWidget(kpExp, 3, 2); kpDel = new QalculateButton(i18n("Del"), keypadPage); - QToolTip::add(kpDel, i18n("Delete")); + TQToolTip::add(kpDel, i18n("Delete")); keypadBasicsLayout->addWidget(kpDel, 0, 3); kpClear = new QalculateButton(i18n("AC"), keypadPage); - QToolTip::add(kpClear, i18n("Clear")); + TQToolTip::add(kpClear, i18n("Clear")); keypadBasicsLayout->addWidget(kpClear, 0, 4); kpTimes = new QalculateButton("*", keypadPage); - QToolTip::add(kpTimes, i18n("Multiply")); + TQToolTip::add(kpTimes, i18n("Multiply")); keypadBasicsLayout->addWidget(kpTimes, 1, 3); kpDivision = new QalculateButton("/", keypadPage); - QToolTip::add(kpDivision, i18n("Divide")); + TQToolTip::add(kpDivision, i18n("Divide")); keypadBasicsLayout->addWidget(kpDivision, 1, 4); kpPlus = new QalculateButton("+", keypadPage); - QToolTip::add(kpPlus, i18n("Add")); + TQToolTip::add(kpPlus, i18n("Add")); keypadBasicsLayout->addWidget(kpPlus, 2, 3); kpMinus = new QalculateButton("-", keypadPage); - QToolTip::add(kpMinus, i18n("Subtract")); + TQToolTip::add(kpMinus, i18n("Subtract")); keypadBasicsLayout->addWidget(kpMinus, 2, 4); kpAns = new QalculateButton(i18n("Ans"), keypadPage); - QToolTip::add(kpAns, i18n("Previous result")); + TQToolTip::add(kpAns, i18n("Previous result")); keypadBasicsLayout->addWidget(kpAns, 3, 3); if(rpn_mode) kpEquals = new QalculateButton(i18n("Ent"), keypadPage); else kpEquals = new QalculateButton(i18n("="), keypadPage); - if(rpn_mode) QToolTip::add(kpEquals, i18n("Calculate expression and add to stack")); - else QToolTip::add(kpEquals, i18n("Calculate expression")); + if(rpn_mode) TQToolTip::add(kpEquals, i18n("Calculate expression and add to stack")); + else TQToolTip::add(kpEquals, i18n("Calculate expression")); keypadBasicsLayout->addWidget(kpEquals, 3, 4); keypadBottomLayout->addLayout(keypadBasicsLayout); keypadPageLayout->addLayout(keypadBottomLayout); - keypadPageLayout->addWidget(new KSeparator(Qt::Horizontal, keypadPage)); + keypadPageLayout->addWidget(new KSeparator(TQt::Horizontal, keypadPage)); mainStack->addWidget(keypadPage, 0); - historyPage = new QWidget(mainStack, "historyPage"); - QVBoxLayout *historyPageLayout = new QVBoxLayout(historyPage, 0, 0); + historyPage = new TQWidget(mainStack, "historyPage"); + TQVBoxLayout *historyPageLayout = new TQVBoxLayout(historyPage, 0, 0); historyBrowser = new QalculateHistoryBrowser(historyPage, "historyBrowser"); historyBrowser->setTextFormat(KTextBrowser::RichText); historyBrowser->setWordWrap(KTextBrowser::NoWrap); historyPageLayout->addWidget(historyBrowser); mainStack->addWidget(historyPage, 1); - stackPage = new QWidget(mainStack, "stackPage"); - QHBoxLayout *stackPageLayout = new QHBoxLayout(stackPage, 0, 6); + stackPage = new TQWidget(mainStack, "stackPage"); + TQHBoxLayout *stackPageLayout = new TQHBoxLayout(stackPage, 0, 6); stackList = new QalculateRPNStackListView(stackPage, "stackList"); stackList->addColumn(i18n("Index")); stackList->addColumn(i18n("Value")); - stackList->setColumnAlignment(0, Qt::AlignCenter); - stackList->setColumnAlignment(1, Qt::AlignRight); + stackList->setColumnAlignment(0, TQt::AlignCenter); + stackList->setColumnAlignment(1, TQt::AlignRight); stackList->setFullWidth(true); - stackList->setResizeMode(QListView::LastColumn); - stackList->setSelectionMode(QListView::Single); + stackList->setResizeMode(TQListView::LastColumn); + stackList->setSelectionMode(TQListView::Single); stackList->setAllColumnsShowFocus(true); stackList->setRootIsDecorated(false); stackList->setItemsMovable(true); @@ -549,66 +549,66 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) stackList->setRenameable(1, true); stackList->setRenameable(0, false); stackPageLayout->addWidget(stackList); - if(use_button_pixmaps) stackPageButtonsLayout = new QVBoxLayout(stackPageLayout, 3); - else stackPageButtonsLayout = new QVBoxLayout(stackPageLayout, 6); + if(use_button_pixmaps) stackPageButtonsLayout = new TQVBoxLayout(stackPageLayout, 3); + else stackPageButtonsLayout = new TQVBoxLayout(stackPageLayout, 6); if(use_button_pixmaps) registerUpButton = new QalculateButton(KApplication::kApplication()->iconLoader()->loadIconSet("up", KIcon::Small, ICON_SIZE_SMALL_MEDIUM), "", stackPage); else registerUpButton = new QalculateButton(i18n("Up"), stackPage); - QToolTip::add(registerUpButton, i18n("Move selected register up")); - registerUpButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed, false); + TQToolTip::add(registerUpButton, i18n("Move selected register up")); + registerUpButton->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed, false); stackPageButtonsLayout->addWidget(registerUpButton); if(use_button_pixmaps) registerDownButton = new QalculateButton(KApplication::kApplication()->iconLoader()->loadIconSet("down", KIcon::Small, ICON_SIZE_SMALL_MEDIUM), "", stackPage); else registerDownButton = new QalculateButton(i18n("Down"), stackPage); - QToolTip::add(registerDownButton, i18n("Move selected register down")); - registerDownButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed, false); + TQToolTip::add(registerDownButton, i18n("Move selected register down")); + registerDownButton->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed, false); stackPageButtonsLayout->addWidget(registerDownButton); if(use_button_pixmaps) editRegisterButton = new QalculateButton(KApplication::kApplication()->iconLoader()->loadIconSet("edit", KIcon::Small, ICON_SIZE_SMALL_MEDIUM), "", stackPage); else editRegisterButton = new QalculateButton(i18n("Edit"), stackPage); - QToolTip::add(editRegisterButton, i18n("Edit value of selected register")); - editRegisterButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed, false); + TQToolTip::add(editRegisterButton, i18n("Edit value of selected register")); + editRegisterButton->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed, false); stackPageButtonsLayout->addWidget(editRegisterButton); if(use_button_pixmaps) deleteRegisterButton = new QalculateButton(KApplication::kApplication()->iconLoader()->loadIconSet("editdelete", KIcon::Small, ICON_SIZE_SMALL_MEDIUM), "", stackPage); else deleteRegisterButton = new QalculateButton(i18n("Delete"), stackPage); - QToolTip::add(deleteRegisterButton, i18n("Delete selected register")); - deleteRegisterButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed, false); + TQToolTip::add(deleteRegisterButton, i18n("Delete selected register")); + deleteRegisterButton->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed, false); stackPageButtonsLayout->addWidget(deleteRegisterButton); if(use_button_pixmaps) clearStackButton = new QalculateButton(KApplication::kApplication()->iconLoader()->loadIconSet("view_remove", KIcon::Small, ICON_SIZE_SMALL_MEDIUM), "", stackPage); else clearStackButton = new QalculateButton(i18n("Clear"), stackPage); - QToolTip::add(clearStackButton, i18n("Clear the RPN stack")); - clearStackButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed, false); + TQToolTip::add(clearStackButton, i18n("Clear the RPN stack")); + clearStackButton->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed, false); registerUpButton->setEnabled(false); registerDownButton->setEnabled(false); editRegisterButton->setEnabled(false); deleteRegisterButton->setEnabled(false); clearStackButton->setEnabled(false); stackPageButtonsLayout->addWidget(clearStackButton); - stackPageButtonsLayout->addItem(new QSpacerItem(1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding)); + stackPageButtonsLayout->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); mainStack->addWidget(stackPage, 2); updateButtonWidths(); mainLayout->addWidget(mainStack); - QHBoxLayout *bottomLayout = new QHBoxLayout(0, 0, 6); - keypadButton = new QPushButton(i18n("Keypad"), centralWidget()); - QToolTip::add(keypadButton, i18n("Show/hide keypad")); + TQHBoxLayout *bottomLayout = new TQHBoxLayout(0, 0, 6); + keypadButton = new TQPushButton(i18n("Keypad"), centralWidget()); + TQToolTip::add(keypadButton, i18n("Show/hide keypad")); keypadButton->setToggleButton(true); bottomLayout->addWidget(keypadButton); - historyButton = new QPushButton(i18n("History"), centralWidget()); - QToolTip::add(historyButton, i18n("Show/hide history")); + historyButton = new TQPushButton(i18n("History"), centralWidget()); + TQToolTip::add(historyButton, i18n("Show/hide history")); historyButton->setToggleButton(true); bottomLayout->addWidget(historyButton); - stackButton = new QPushButton(i18n("RPN Stack"), centralWidget()); - QToolTip::add(stackButton, i18n("Show/hide RPN stack")); + stackButton = new TQPushButton(i18n("RPN Stack"), centralWidget()); + TQToolTip::add(stackButton, i18n("Show/hide RPN stack")); stackButton->setToggleButton(true); bottomLayout->addWidget(stackButton); if(!rpn_mode) stackButton->hide(); - bottomLayout->addItem(new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum)); + bottomLayout->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum)); mainLayout->addLayout(bottomLayout); connect(stackList, SIGNAL(selectionChanged()), this, SLOT(registerSelected())); - connect(stackList, SIGNAL(itemRenamed(QListViewItem*)), this, SLOT(stackRegisterSet(QListViewItem*))); + connect(stackList, SIGNAL(itemRenamed(TQListViewItem*)), this, SLOT(stackRegisterSet(TQListViewItem*))); connect(stackList, SIGNAL(moved()), this, SLOT(stackRegisterMoved())); - connect(stackList, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), this, SLOT(popupStackMenu(KListView*, QListViewItem*, const QPoint&))); + connect(stackList, SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), this, SLOT(popupStackMenu(KListView*, TQListViewItem*, const TQPoint&))); connect(registerUpButton, SIGNAL(clicked()), this, SLOT(registerUp())); connect(registerDownButton, SIGNAL(clicked()), this, SLOT(registerDown())); connect(editRegisterButton, SIGNAL(clicked()), this, SLOT(editRegister())); @@ -654,7 +654,7 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) //connect(kpMod, SIGNAL(clicked()), this, SLOT(insertMod())); connect(kpFactorial, SIGNAL(clicked()), this, SLOT(insertFactorial())); //connect(expressionEdit, SIGNAL(returnPressed()), this, SLOT(execute())); - connect(expressionEdit, SIGNAL(textChanged(const QString&)), this, SLOT(onExpressionChanged())); + connect(expressionEdit, SIGNAL(textChanged(const TQString&)), this, SLOT(onExpressionChanged())); connect(storeButton, SIGNAL(clicked()), this, SLOT(storeResult())); connect(executeButton, SIGNAL(clicked()), this, SLOT(execute())); connect(convertButton, SIGNAL(clicked()), this, SLOT(convertToUnitExpression())); @@ -673,36 +673,36 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) bottomLine->hide(); stackButton->setOn(true); mainStack->raiseWidget(2); - mainStack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, false); - resultLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum, false); + mainStack->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, false); + resultLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum, false); } else if(show_keypad) { bottomLine->hide(); keypadButton->setOn(true); mainStack->raiseWidget(0); - mainStack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum, false); - resultLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, false); + mainStack->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum, false); + resultLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, false); } else if(show_history) { bottomLine->hide(); historyButton->setOn(true); mainStack->raiseWidget(1); - mainStack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, false); - resultLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum, false); + mainStack->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, false); + resultLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum, false); } else { mainStack->hide(); - mainStack->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum, false); - resultLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, false); + mainStack->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum, false); + resultLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, false); } initial_history = ""; - for(QValueVector<QString>::size_type i = 0; i < inhistory.size(); i++) { + for(TQValueVector<TQString>::size_type i = 0; i < inhistory.size(); i++) { switch(inhistory_type[i]) { case QALCULATE_HISTORY_EXPRESSION: { if(i != 0) { initial_history += "<br><hr>"; } initial_history += "<a name=\""; - initial_history += QString::number(inhistory_id[i]); + initial_history += TQString::number(inhistory_id[i]); initial_history += "\">"; initial_history += inhistory[i]; initial_history += "</a>"; @@ -727,13 +727,13 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) } case QALCULATE_HISTORY_RESULT: { initial_history += "<a name=\""; - initial_history += QString::number(inhistory_id[i]); + initial_history += TQString::number(inhistory_id[i]); initial_history += "\">"; initial_history += "= "; initial_history += "</a>"; initial_history += "<b>"; initial_history += "<a name=\""; - initial_history += QString::number(inhistory_id[i]); + initial_history += TQString::number(inhistory_id[i]); initial_history += "\">"; initial_history += inhistory[i]; initial_history += "</a>"; @@ -743,7 +743,7 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) } case QALCULATE_HISTORY_RESULT_APPROXIMATE: { initial_history += "<a name=\""; - initial_history += QString::number(inhistory_id[i]); + initial_history += TQString::number(inhistory_id[i]); initial_history += "\">"; if(printops.use_unicode_signs && can_display_unicode_string_function(SIGN_ALMOST_EQUAL, (void*) historyBrowser)) { initial_history += SIGN_ALMOST_EQUAL " "; @@ -755,7 +755,7 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) initial_history += "</a>"; initial_history += "<b>"; initial_history += "<a name=\""; - initial_history += QString::number(inhistory_id[i]); + initial_history += TQString::number(inhistory_id[i]); initial_history += "\">"; initial_history += inhistory[i]; initial_history += "</a>"; @@ -767,7 +767,7 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) initial_history += " = "; initial_history += "<font color=\"gray40\"><i>"; initial_history += "<a name=\""; - initial_history += QString::number(inhistory_id[i]); + initial_history += TQString::number(inhistory_id[i]); initial_history += "\">"; initial_history += inhistory[i]; initial_history += "</a>"; @@ -786,7 +786,7 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) } initial_history += "<font color=\"gray40\"><i>"; initial_history += "<a name=\""; - initial_history += QString::number(inhistory_id[i]); + initial_history += TQString::number(inhistory_id[i]); initial_history += "\">"; initial_history += inhistory[i]; initial_history += "</a>"; @@ -822,14 +822,14 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) initial_history = ""; if(use_custom_result_font) { - QFont new_font(resultLabel->font()); + TQFont new_font(resultLabel->font()); new_font.fromString(custom_result_font); resultLabel->setFont(new_font); } else { resultLabel->unsetFont(); } if(use_custom_expression_font) { - QFont new_font(expressionEdit->font()); + TQFont new_font(expressionEdit->font()); new_font.fromString(custom_expression_font); expressionEdit->setFont(new_font); } else { @@ -841,7 +841,7 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) setupActions(); - stackMenu = new QPopupMenu(this); + stackMenu = new TQPopupMenu(this); ActionEditRegister->plug(stackMenu); ActionDeleteRegister->plug(stackMenu); stackMenu->insertSeparator(); @@ -870,36 +870,36 @@ KQalculate::KQalculate(KUniqueApplication *parent, const char* name, WFlags fl) setAutoSaveSettings(); if(show_history || (rpn_mode && show_stack)) { - resize(QSize(10, height()).expandedTo(minimumSizeHint())); + resize(TQSize(10, height()).expandedTo(minimumSizeHint())); } else if(show_keypad) { resize(minimumSizeHint()); } else { - resize(QSize(width(), 10).expandedTo(minimumSizeHint())); + resize(TQSize(width(), 10).expandedTo(minimumSizeHint())); } - menu_functions = (QPopupMenu*) factory()->container("functions", this); - menu_variables = (QPopupMenu*) factory()->container("variables", this); - menu_units = (QPopupMenu*) factory()->container("units", this); - menu_to_unit = (QPopupMenu*) factory()->container("convert_to_unit", this); - menu_set_prefix = (QPopupMenu*) factory()->container("set_prefix", this); - menu_modes = (QPopupMenu*) factory()->container("modes", this); + menu_functions = (TQPopupMenu*) factory()->container("functions", this); + menu_variables = (TQPopupMenu*) factory()->container("variables", this); + menu_units = (TQPopupMenu*) factory()->container("units", this); + menu_to_unit = (TQPopupMenu*) factory()->container("convert_to_unit", this); + menu_set_prefix = (TQPopupMenu*) factory()->container("set_prefix", this); + menu_modes = (TQPopupMenu*) factory()->container("modes", this); - QObject::connect(menu_modes, SIGNAL(activated(int)), this, SLOT(onModesMenuItemActivated(int))); + TQObject::connect(menu_modes, SIGNAL(activated(int)), this, SLOT(onModesMenuItemActivated(int))); for(size_t i = 0; i < modes.size(); i++) { menu_modes->insertItem(modes[i].name, -1, i); if(i > 1) { ModeObject *mo = new ModeObject(i); mo->i_mode = i; mode_objects.push_back(mo); - accel()->insert(QString("Load mode: ") + modes[i].name, i18n("Load meta mode: %1").arg(modes[i].name), QString::null, modes[i].shortcut, mo, SLOT(loadMode())); + accel()->insert(TQString("Load mode: ") + modes[i].name, i18n("Load meta mode: %1").arg(modes[i].name), TQString::null, modes[i].shortcut, mo, SLOT(loadMode())); } } - QObject::connect(menu_functions, SIGNAL(activated(int)), this, SLOT(onFunctionMenuItemActivated(int))); - QObject::connect(menu_variables, SIGNAL(activated(int)), this, SLOT(onVariableMenuItemActivated(int))); - QObject::connect(menu_units, SIGNAL(activated(int)), this, SLOT(onUnitMenuItemActivated(int))); - QObject::connect(menu_to_unit, SIGNAL(activated(int)), this, SLOT(onConvertToUnitMenuItemActivated(int))); - QObject::connect(menu_set_prefix, SIGNAL(activated(int)), this, SLOT(onSetPrefixMenuItemActivated(int))); + TQObject::connect(menu_functions, SIGNAL(activated(int)), this, SLOT(onFunctionMenuItemActivated(int))); + TQObject::connect(menu_variables, SIGNAL(activated(int)), this, SLOT(onVariableMenuItemActivated(int))); + TQObject::connect(menu_units, SIGNAL(activated(int)), this, SLOT(onUnitMenuItemActivated(int))); + TQObject::connect(menu_to_unit, SIGNAL(activated(int)), this, SLOT(onConvertToUnitMenuItemActivated(int))); + TQObject::connect(menu_set_prefix, SIGNAL(activated(int)), this, SLOT(onSetPrefixMenuItemActivated(int))); } @@ -907,7 +907,7 @@ KQalculate::~KQalculate() {} void KQalculate::updateStatusLabelFonts() { if(use_custom_status_font) { - QFont new_font(statusLabel_l->font()); + TQFont new_font(statusLabel_l->font()); new_font.fromString(custom_status_font); statusLabel_l->setFont(new_font); new_font.setPointSizeFloat(new_font.pointSizeFloat() / 1.2); @@ -915,7 +915,7 @@ void KQalculate::updateStatusLabelFonts() { } else { statusLabel_l->unsetFont(); statusLabel_r->unsetFont(); - QFont new_font = statusLabel_l->font(); + TQFont new_font = statusLabel_l->font(); new_font.setPointSizeFloat(new_font.pointSizeFloat() / 1.2); statusLabel_l->setFont(new_font); new_font = statusLabel_r->font(); @@ -937,10 +937,10 @@ void KQalculate::updateButtonWidths() { executeButton->setMinimumWidth(button_width); } -void KQalculate::fontChange(const QFont &old_font) { +void KQalculate::fontChange(const TQFont &old_font) { updateStatusLabelFonts(); functionsButton->unsetFont(); - QFont fb_font(functionsButton->font()); + TQFont fb_font(functionsButton->font()); fb_font.setItalic(true); functionsButton->setFont(fb_font); kpSquare->setMarkup(i18n("x<sup>2</sup>")); @@ -953,7 +953,7 @@ void KQalculate::fontChange(const QFont &old_font) { void KQalculate::showSystemTrayIcon(bool do_show) { if(do_show && !trayicon) { trayicon = new KSystemTray(this); - QObject::connect(trayicon, SIGNAL(quitSelected()), qApp, SLOT(quit())); + TQObject::connect(trayicon, SIGNAL(quitSelected()), tqApp, SLOT(quit())); #if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2 trayicon->setPixmap(loadSystrayIcon(PACKAGE)); #else @@ -963,7 +963,7 @@ void KQalculate::showSystemTrayIcon(bool do_show) { KPopupMenu* traypop = trayicon->contextMenu(); ActionHideSystemTrayIcon->plug(traypop, 1); #endif - QToolTip::add(trayicon, i18n("Qalculate! - Scientific Calculator")); + TQToolTip::add(trayicon, i18n("Qalculate! - Scientific Calculator")); } if(do_show) { trayicon->show(); @@ -1005,11 +1005,11 @@ void KQalculate::setupActions() { ActionClose = NULL; } globalAccel = new KGlobalAccel(this); - globalAccel->insert("Show/hide Qalculate!", i18n("Show/hide main Qalculate! window"), QString::null, KShortcut(), KShortcut(), this, SLOT(showHide())); + globalAccel->insert("Show/hide Qalculate!", i18n("Show/hide main Qalculate! window"), TQString::null, KShortcut(), KShortcut(), this, SLOT(showHide())); globalAccel->readSettings(); globalAccel->updateConnections(); ActionConfigureGlobalShortcuts = new KAction(i18n("Configure &Global Shortcuts..."), "configure_shortcuts", 0, this, SLOT(configureGlobalShortcuts()), actionCollection(), "configure_global_shortcuts"); - ActionQuit = KStdAction::quit(qApp, SLOT(quit()), actionCollection()); + ActionQuit = KStdAction::quit(tqApp, SLOT(quit()), actionCollection()); ActionManageVariables = new KAction(i18n("Manage Variables"), Key_F2, this, SLOT(manageVariables()), actionCollection(), "manage_variables"); ActionManageFunctions = new KAction(i18n("Manage Functions"), Key_F3, this, SLOT(manageFunctions()), actionCollection(), "manage_functions"); ActionManageUnits = new KAction(i18n("Manage Units"), Key_F4, this, SLOT(manageUnits()), actionCollection(), "manage_units"); @@ -1054,15 +1054,15 @@ void KQalculate::setupActions() { ActionNumericalDisplaySimple = new KRadioAction(i18n("Simple"), 0, this, SLOT(numericalDisplaySimple()), actionCollection(), "numerical_display_simple"); ActionNumericalDisplaySimple->setExclusiveGroup("group_numberical_display"); ActionIndicateInfiniteSeries = new KToggleAction(i18n("Indicate Infinite Series"), 0, actionCollection(), "indicate_infinite_series"); - QObject::connect(ActionIndicateInfiniteSeries, SIGNAL(toggled(bool)), this, SLOT(indicateInfiniteSeries(bool))); + TQObject::connect(ActionIndicateInfiniteSeries, SIGNAL(toggled(bool)), this, SLOT(indicateInfiniteSeries(bool))); ActionSortMinusLast = new KToggleAction(i18n("Sort Minus Last"), 0, actionCollection(), "sort_minus_last"); - QObject::connect(ActionSortMinusLast, SIGNAL(toggled(bool)), this, SLOT(sortMinusLast(bool))); + TQObject::connect(ActionSortMinusLast, SIGNAL(toggled(bool)), this, SLOT(sortMinusLast(bool))); ActionNegativeExponents = new KToggleAction(i18n("Negative Exponents"), 0, actionCollection(), "negative_exponents"); - QObject::connect(ActionNegativeExponents, SIGNAL(toggled(bool)), this, SLOT(negativeExponents(bool))); + TQObject::connect(ActionNegativeExponents, SIGNAL(toggled(bool)), this, SLOT(negativeExponents(bool))); ActionShowEndingZeroes = new KToggleAction(i18n("Show Ending Zeroes"), 0, actionCollection(), "show_ending_zeroes"); - QObject::connect(ActionShowEndingZeroes, SIGNAL(toggled(bool)), this, SLOT(showEndingZeroes(bool))); + TQObject::connect(ActionShowEndingZeroes, SIGNAL(toggled(bool)), this, SLOT(showEndingZeroes(bool))); ActionRoundHalfwayNumbersToEven = new KToggleAction(i18n("Round Halfway Numbers to Even"), 0, actionCollection(), "round_halfway_numbers_to_even"); - QObject::connect(ActionRoundHalfwayNumbersToEven, SIGNAL(toggled(bool)), this, SLOT(roundHalfwayNumbersToEven(bool))); + TQObject::connect(ActionRoundHalfwayNumbersToEven, SIGNAL(toggled(bool)), this, SLOT(roundHalfwayNumbersToEven(bool))); ActionFractionalDisplayDecimal = new KRadioAction(i18n("Decimal"), 0, this, SLOT(fractionalDisplayDecimal()), actionCollection(), "fractional_display_decimal"); ActionFractionalDisplayDecimal->setExclusiveGroup("group_fractional_display"); ActionFractionalDisplayDecimalTryExact = new KRadioAction(i18n("Decimal (Try Exact)"), 0, this, SLOT(fractionalDisplayDecimalTryExact()), actionCollection(), "fractional_display_decimal_try_exact"); @@ -1072,13 +1072,13 @@ void KQalculate::setupActions() { ActionFractionalDisplayCombined = new KRadioAction(i18n("Combined"), 0, this, SLOT(fractionalDisplayCombined()), actionCollection(), "fractional_display_combined"); ActionFractionalDisplayCombined->setExclusiveGroup("group_fractional_display"); ActionEnablePrefixes = new KToggleAction(i18n("Enable Prefixes"), 0, actionCollection(), "enable_prefixes"); - QObject::connect(ActionEnablePrefixes, SIGNAL(toggled(bool)), this, SLOT(enablePrefixes(bool))); + TQObject::connect(ActionEnablePrefixes, SIGNAL(toggled(bool)), this, SLOT(enablePrefixes(bool))); ActionEnableUseOfAllPrefixes = new KToggleAction(i18n("Enable Use of All SI Prefixes"), 0, actionCollection(), "enable_use_of_all_prefixes"); - QObject::connect(ActionEnableUseOfAllPrefixes, SIGNAL(toggled(bool)), this, SLOT(enableUseOfAllPrefixes(bool))); + TQObject::connect(ActionEnableUseOfAllPrefixes, SIGNAL(toggled(bool)), this, SLOT(enableUseOfAllPrefixes(bool))); ActionEnableDenominatorPrefixes = new KToggleAction(i18n("Enable Denominator Prefixes"), 0, actionCollection(), "enable_denominator_prefixes"); - QObject::connect(ActionEnableDenominatorPrefixes, SIGNAL(toggled(bool)), this, SLOT(enableDenominatorPrefixes(bool))); + TQObject::connect(ActionEnableDenominatorPrefixes, SIGNAL(toggled(bool)), this, SLOT(enableDenominatorPrefixes(bool))); ActionPlaceUnitsSeparately = new KToggleAction(i18n("Place Units Separately"), 0, actionCollection(), "place_units_separately"); - QObject::connect(ActionPlaceUnitsSeparately, SIGNAL(toggled(bool)), this, SLOT(placeUnitsSeparately(bool))); + TQObject::connect(ActionPlaceUnitsSeparately, SIGNAL(toggled(bool)), this, SLOT(placeUnitsSeparately(bool))); ActionAutoNoConversion = new KRadioAction(i18n("No Automatic Conversion"), 0, this, SLOT(autoNoConversion()), actionCollection(), "auto_no_conversion"); ActionAutoNoConversion->setExclusiveGroup("group_auto_conversion"); ActionAutoConvertToBaseUnits = new KRadioAction(i18n("Convert to Base Units"), 0, this, SLOT(autoConvertToBaseUnits()), actionCollection(), "auto_convert_to_base_units"); @@ -1094,21 +1094,21 @@ void KQalculate::setupActions() { ActionAngleUnitNone = new KRadioAction(i18n("None"), 0, this, SLOT(angleUnitNone()), actionCollection(), "angle_unit_none"); ActionAngleUnitNone->setExclusiveGroup("group_angle_unit"); ActionAbbreviateNames = new KToggleAction(i18n("Abbreviate Names"), 0, actionCollection(), "abbreviate_names"); - QObject::connect(ActionAbbreviateNames, SIGNAL(toggled(bool)), this, SLOT(abbreviateNames(bool))); + TQObject::connect(ActionAbbreviateNames, SIGNAL(toggled(bool)), this, SLOT(abbreviateNames(bool))); ActionEnableVariables = new KToggleAction(i18n("Enable Variables"), 0, actionCollection(), "enable_variables"); - QObject::connect(ActionEnableVariables, SIGNAL(toggled(bool)), this, SLOT(enableVariables(bool))); + TQObject::connect(ActionEnableVariables, SIGNAL(toggled(bool)), this, SLOT(enableVariables(bool))); ActionEnableFunctions = new KToggleAction(i18n("Enable Functions"), 0, actionCollection(), "enable_functions"); - QObject::connect(ActionEnableFunctions, SIGNAL(toggled(bool)), this, SLOT(enableFunctions(bool))); + TQObject::connect(ActionEnableFunctions, SIGNAL(toggled(bool)), this, SLOT(enableFunctions(bool))); ActionEnableUnits = new KToggleAction(i18n("Enable Units"), 0, actionCollection(), "enable_units"); - QObject::connect(ActionEnableUnits, SIGNAL(toggled(bool)), this, SLOT(enableUnits(bool))); + TQObject::connect(ActionEnableUnits, SIGNAL(toggled(bool)), this, SLOT(enableUnits(bool))); ActionEnableUnknowns = new KToggleAction(i18n("Enable Unknowns"), 0, actionCollection(), "enable_unknowns"); - QObject::connect(ActionEnableUnknowns, SIGNAL(toggled(bool)), this, SLOT(enableUnknowns(bool))); + TQObject::connect(ActionEnableUnknowns, SIGNAL(toggled(bool)), this, SLOT(enableUnknowns(bool))); ActionCalculateVariables = new KToggleAction(i18n("Calculate Variables"), 0, actionCollection(), "calculate_variables"); - QObject::connect(ActionCalculateVariables, SIGNAL(toggled(bool)), this, SLOT(calculateVariables(bool))); + TQObject::connect(ActionCalculateVariables, SIGNAL(toggled(bool)), this, SLOT(calculateVariables(bool))); ActionAllowComplexResult = new KToggleAction(i18n("Allow Complex Result"), 0, actionCollection(), "allow_complex_result"); - QObject::connect(ActionAllowComplexResult, SIGNAL(toggled(bool)), this, SLOT(allowComplexResult(bool))); + TQObject::connect(ActionAllowComplexResult, SIGNAL(toggled(bool)), this, SLOT(allowComplexResult(bool))); ActionAllowInfiniteResult = new KToggleAction(i18n("Allow Infinite Result"), 0, actionCollection(), "allow_infinite_result"); - QObject::connect(ActionAllowInfiniteResult, SIGNAL(toggled(bool)), this, SLOT(allowInfiniteResult(bool))); + TQObject::connect(ActionAllowInfiniteResult, SIGNAL(toggled(bool)), this, SLOT(allowInfiniteResult(bool))); ActionApproximationTryExact = new KRadioAction(i18n("Try Exact"), 0, this, SLOT(approximationTryExact()), actionCollection(), "approximation_try_exact"); ActionApproximationTryExact->setExclusiveGroup("group_approximation"); ActionApproximationAlwaysExact = new KRadioAction(i18n("Always Exact"), 0, this, SLOT(approximationAlwaysExact()), actionCollection(), "approximation_always_exact"); @@ -1142,9 +1142,9 @@ void KQalculate::setupActions() { ActionAssumptionSignNonPositive = new KRadioAction(i18n("Non-Positive"), 0, this, SLOT(assumptionSignNonPositive()), actionCollection(), "assumption_sign_non_positive"); ActionAssumptionSignNonPositive->setExclusiveGroup("group_assumption_sign"); ActionNonZeroDenominators = new KToggleAction(i18n("Non-Zero Denominators"), 0, actionCollection(), "non_zero_denominators"); - QObject::connect(ActionNonZeroDenominators, SIGNAL(toggled(bool)), this, SLOT(nonZeroDenominators(bool))); + TQObject::connect(ActionNonZeroDenominators, SIGNAL(toggled(bool)), this, SLOT(nonZeroDenominators(bool))); ActionWarnAboutDenominatorsAssumedNonZero = new KToggleAction(i18n("Warn About Denominators Assumed Non-Zero"), 0, actionCollection(), "warn_about_denominators_assumed_nonzero"); - QObject::connect(ActionWarnAboutDenominatorsAssumedNonZero, SIGNAL(toggled(bool)), this, SLOT(warnAboutDenominatorsAssumedNonZero(bool))); + TQObject::connect(ActionWarnAboutDenominatorsAssumedNonZero, SIGNAL(toggled(bool)), this, SLOT(warnAboutDenominatorsAssumedNonZero(bool))); ActionAlgebraicModeSimplify = new KRadioAction(i18n("Simplify"), 0, this, SLOT(algebraicModeSimplify()), actionCollection(), "algebraic_mode_simplify"); ActionAlgebraicModeSimplify->setExclusiveGroup("group_alebraic_mode"); ActionAlgebraicModeFactorize = new KRadioAction(i18n("Factorize"), 0, this, SLOT(algebraicModeFactorize()), actionCollection(), "algebraic_mode_factorize"); @@ -1152,13 +1152,13 @@ void KQalculate::setupActions() { ActionAlgebraicModeNone = new KRadioAction(i18n("None"), 0, this, SLOT(algebraicModeNone()), actionCollection(), "algebraic_mode_none"); ActionAlgebraicModeNone->setExclusiveGroup("group_alebraic_mode"); ActionReadPrecision = new KToggleAction(i18n("Read Precision"), 0, actionCollection(), "read_precision"); - QObject::connect(ActionReadPrecision, SIGNAL(toggled(bool)), this, SLOT(readPrecision(bool))); + TQObject::connect(ActionReadPrecision, SIGNAL(toggled(bool)), this, SLOT(readPrecision(bool))); ActionLimitImplicitMultiplication = new KToggleAction(i18n("Limit Implicit Multiplication"), 0, actionCollection(), "limit_implicit_multiplication"); - QObject::connect(ActionLimitImplicitMultiplication, SIGNAL(toggled(bool)), this, SLOT(limitImplicitMultiplication(bool))); + TQObject::connect(ActionLimitImplicitMultiplication, SIGNAL(toggled(bool)), this, SLOT(limitImplicitMultiplication(bool))); ActionRPNMode = new KToggleAction(i18n("RPN Mode"), CTRL+Key_R, actionCollection(), "rpn_mode"); - QObject::connect(ActionRPNMode, SIGNAL(toggled(bool)), this, SLOT(rpnMode(bool))); + TQObject::connect(ActionRPNMode, SIGNAL(toggled(bool)), this, SLOT(rpnMode(bool))); ActionRPNSyntax = new KToggleAction(i18n("RPN Syntax"), 0, actionCollection(), "rpn_syntax"); - QObject::connect(ActionRPNSyntax, SIGNAL(toggled(bool)), this, SLOT(rpnSyntax(bool))); + TQObject::connect(ActionRPNSyntax, SIGNAL(toggled(bool)), this, SLOT(rpnSyntax(bool))); ActionPrecision = new KAction(i18n("Precision"), 0, this, SLOT(precision()), actionCollection(), "precision"); ActionDecimals = new KAction(i18n("Decimals"), 0, this, SLOT(decimals()), actionCollection(), "decimals"); ActionSaveModeAs = new KAction(i18n("Save Mode..."), "filesave", 0, this, SLOT(saveModeAs()), actionCollection(), "save_mode_as"); @@ -1394,7 +1394,7 @@ void KQalculate::setModeActions() { #define STR_MARKUP_ADD(str, str_add) if(ips.power_depth > 0) {str += TEXT_TAGS "<sup>"; str += str_add; str += "</sup>" TEXT_TAGS_END;} else {str += str_add;} -#define STR_MARKUP_PREPEND(str, str_add) QString str_prepend; if(ips.power_depth > 0) {str_prepend += TEXT_TAGS "<sup>"; str_prepend += str_add; str_prepend += "</sup>" TEXT_TAGS_END;} else {str_prepend += str_add;} str.prepend(str_prepend); +#define STR_MARKUP_PREPEND(str, str_add) TQString str_prepend; if(ips.power_depth > 0) {str_prepend += TEXT_TAGS "<sup>"; str_prepend += str_add; str_prepend += "</sup>" TEXT_TAGS_END;} else {str_prepend += str_add;} str.prepend(str_prepend); #define STR_MARKUP_BEGIN(str) if(ips.power_depth > 0) {str += TEXT_TAGS "<sup>";} #define STR_MARKUP_END(str) if(ips.power_depth > 0) {str +="</sup>" TEXT_TAGS_END;} @@ -1405,11 +1405,11 @@ void KQalculate::setModeActions() { #define STR_MARKUP_BEGIN_CURSIVE(str) if(ips.power_depth > 0) {str += TEXT_TAGS "<i><sup>";} else {str += "<i>";} #define STR_MARKUP_END_CURSIVE(str) if(ips.power_depth > 0) {str +="</sup></i>" TEXT_TAGS_END;} else {str += "</i>";} -QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &cg, PrintOptions po = default_print_options, InternalPrintStruct ips = top_ips, bool in_matrix = false) { +TQString draw_structure(MathStructure &m, const TQFont &font, const TQColorGroup &cg, PrintOptions po = default_print_options, InternalPrintStruct ips = top_ips, bool in_matrix = false) { if(ips.depth == 0 && po.is_approximate) *po.is_approximate = false; - QString mstr; + TQString mstr; InternalPrintStruct ips_n = ips; if(m.isApproximate()) ips_n.parent_approximate = true; @@ -1436,11 +1436,11 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c if(po.base != BASE_DECIMAL && po.base != BASE_HEXADECIMAL && po.base > 0 && po.base <= 36) { if(ips.power_depth == 0) { mstr += "<sub>"; - mstr += QString::number(po.base); + mstr += TQString::number(po.base); mstr += "</sub>"; } else { mstr += TEXT_TAGS_SMALL "<sup>"; - mstr += QString::number(po.base); + mstr += TQString::number(po.base); mstr += "</sup>" TEXT_TAGS_SMALL_END; } } @@ -1450,14 +1450,14 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c case STRUCT_SYMBOLIC: { result_parts.push_back(m); mstr = "<a name=\""; - mstr += QString::number(result_parts.size()); + mstr += TQString::number(result_parts.size()); mstr += "\">"; STR_MARKUP_BEGIN_CURSIVE(mstr); mstr += m.symbol().c_str(); STR_MARKUP_END_CURSIVE(mstr); mstr += "</a>"; mstr += "<a name=\""; - mstr += QString::number(result_parts.size()); + mstr += TQString::number(result_parts.size()); mstr += "\"></a>"; break; } @@ -1465,7 +1465,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c ips_n.depth++; - vector<QString> terms; + vector<TQString> terms; vector<bool> do_space; for(size_t i = 0; i < m.size(); i++) { if(m[i].type() == STRUCT_NEGATE && i > 0) { @@ -1512,7 +1512,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c ips_n.depth++; - QString mul_str; + TQString mul_str; if(po.use_unicode_signs && po.multiplication_sign == MULTIPLICATION_SIGN_DOT && (!po.can_display_unicode_string_function || (*po.can_display_unicode_string_function) (SIGN_MULTIDOT, po.can_display_unicode_string_arg))) { STR_MARKUP_ADD(mul_str, SIGN_MULTIDOT); } else if(po.use_unicode_signs && po.multiplication_sign == MULTIPLICATION_SIGN_DOT && (!po.can_display_unicode_string_function || (*po.can_display_unicode_string_function) (SIGN_MULTIBULLET, po.can_display_unicode_string_arg))) { @@ -1527,7 +1527,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c bool par_prev = false; vector<int> nm; - vector<QString> terms; + vector<TQString> terms; vector<bool> do_space; for(size_t i = 0; i < m.size(); i++) { ips_n.wrap = m[i].needsParenthesis(po, ips_n, m, i + 1, ips.division_depth > 0 || ips.power_depth > 0, ips.power_depth > 0); @@ -1596,7 +1596,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c ips_n.division_depth--; } } - QString num_str, den_str; + TQString num_str, den_str; if(m.type() == STRUCT_DIVISION) { ips_n.wrap = (!m[0].isDivision() || !flat || ips.division_depth > 0 || ips.power_depth > 0) && m[0].needsParenthesis(po, ips_n, m, 1, flat, ips.power_depth > 0); num_str = draw_structure(m[0], font, cg, po, ips_n); @@ -1614,7 +1614,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c } if(flat) { - QString div_str; + TQString div_str; if(po.use_unicode_signs && po.division_sign == DIVISION_SIGN_DIVISION && (!po.can_display_unicode_string_function || (*po.can_display_unicode_string_function) (SIGN_DIVISION, po.can_display_unicode_string_arg))) { STR_MARKUP_ADD(div_str, " " SIGN_DIVISION " "); } else if(po.use_unicode_signs && po.division_sign == DIVISION_SIGN_DIVISION_SLASH && (!po.can_display_unicode_string_function || (*po.can_display_unicode_string_function) (SIGN_DIVISION_SLASH, po.can_display_unicode_string_arg))) { @@ -1634,26 +1634,26 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c den_str.prepend(TEXT_TAGS); den_str += TEXT_TAGS_END; - QSimpleRichText text_r(num_str, font); text_r.setWidth(10000); + TQSimpleRichText text_r(num_str, font); text_r.setWidth(10000); num_w = text_r.widthUsed(); - QSimpleRichText text_rn(den_str, font); text_rn.setWidth(10000); + TQSimpleRichText text_rn(den_str, font); text_rn.setWidth(10000); den_w = text_rn.widthUsed(); w = den_w; if(num_w > w) w = num_w; w += 2; - QSimpleRichText textsmall("<font size=\"1\">X</font>", font); + TQSimpleRichText textsmall("<font size=\"1\">X</font>", font); h = (int) (textsmall.height() / 1.5); h += h % 2; string filename = getLocalDir(); if(saved_divisionline_height != h) { - QPixmap *pixmap = new QPixmap(10, h); + TQPixmap *pixmap = new TQPixmap(10, h); pixmap->fill(cg.background()); - QPainter p(pixmap); - QPen ppen = p.pen(); + TQPainter p(pixmap); + TQPen ppen = p.pen(); ppen.setColor(cg.foreground()); p.setPen(ppen); p.drawLine(0, h / 2, 10, h / 2); @@ -1682,9 +1682,9 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c mstr = "</td><td width=1 align=\"center\" valign=\"middle\">"; mstr += num_str; mstr += "<br><font size=1><img align=\"middle\" width="; - mstr += QString::number(w); + mstr += TQString::number(w); mstr += " height="; - mstr += QString::number(h); + mstr += TQString::number(h); mstr += " src=\""; mstr += filename.c_str(); mstr += "\"><br></font>"; @@ -1725,7 +1725,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c ips_n.depth++; bool do_space = true; - QString tstr; + TQString tstr; ips_n.wrap = m[0][1].needsParenthesis(po, ips_n, m[0], 2, ips.division_depth > 0 || ips.power_depth > 0, ips.power_depth > 0); tstr = draw_structure(m[0][1], font, cg, po, ips_n); do_space = !tstr.endsWith("valign=\"middle\">"); @@ -1816,7 +1816,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c ips_n.depth++; - QString str; + TQString str; if(m.type() == STRUCT_COMPARISON) { switch(m.comparisonType()) { case COMPARISON_EQUALS: { @@ -1876,7 +1876,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c } bool do_space = true, do_space_prev = true; - QString tstr; + TQString tstr; for(size_t i = 0; i < m.size(); i++) { do_space_prev = do_space; ips_n.wrap = m[i].needsParenthesis(po, ips_n, m, i + 1, ips.division_depth > 0 || ips.power_depth > 0, ips.power_depth > 0); @@ -1939,7 +1939,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c if(!in_matrix) { result_parts.push_back(m); mstr = "<a name=\""; - mstr += QString::number(result_parts.size()); + mstr += TQString::number(result_parts.size()); mstr += "\">"; } @@ -1966,12 +1966,12 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c result_parts.push_back(m); mstr = "<a name=\""; - mstr += QString::number(result_parts.size()); + mstr += TQString::number(result_parts.size()); mstr += "\">"; STR_MARKUP_BEGIN(mstr); - QString str; + TQString str; const ExpressionName *ename = &m.unit()->preferredDisplayName(po.abbreviate_names, po.use_unicode_signs, m.isPlural(), po.use_reference_names, po.can_display_unicode_string_function, po.can_display_unicode_string_arg); if(m.prefix()) { str += m.prefix()->name(po.abbreviate_names && ename->abbreviation && (ename->suffix || ename->name.find("_") == string::npos), po.use_unicode_signs, po.can_display_unicode_string_function, po.can_display_unicode_string_arg).c_str(); @@ -2005,7 +2005,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c STR_MARKUP_END(mstr); mstr += "</a>"; mstr += "<a name=\""; - mstr += QString::number(result_parts.size()); + mstr += TQString::number(result_parts.size()); mstr += "\"></a>"; break; @@ -2014,7 +2014,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c result_parts.push_back(m); mstr = "<a name=\""; - mstr += QString::number(result_parts.size()); + mstr += TQString::number(result_parts.size()); mstr += "\">"; if(m.variable() == CALCULATOR->v_i) { STR_MARKUP_BEGIN(mstr); @@ -2022,7 +2022,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c STR_MARKUP_BEGIN_CURSIVE(mstr); } - QString str; + TQString str; const ExpressionName *ename = &m.variable()->preferredDisplayName(po.abbreviate_names, po.use_unicode_signs, false, po.use_reference_names, po.can_display_unicode_string_function, po.can_display_unicode_string_arg); if(ename->suffix && ename->name.length() > 1) { size_t i = ename->name.rfind('_'); @@ -2058,7 +2058,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c mstr += "</a>"; /*result_parts.push_back(m); mstr += "<a name=\""; - mstr += QString::number(result_parts.size()); + mstr += TQString::number(result_parts.size()); mstr += "\"></a>";*/ break; } @@ -2068,12 +2068,12 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c result_parts.push_back(m); mstr = "<a name=\""; - mstr += QString::number(result_parts.size()); + mstr += TQString::number(result_parts.size()); mstr += "\">"; STR_MARKUP_BEGIN(mstr); - QString str; + TQString str; const ExpressionName *ename = &m.function()->preferredDisplayName(po.abbreviate_names, po.use_unicode_signs, false, po.use_reference_names, po.can_display_unicode_string_function, po.can_display_unicode_string_arg); if(ename->suffix && ename->name.length() > 1) { size_t i = ename->name.rfind('_'); @@ -2130,7 +2130,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c STR_MARKUP_ADD(mstr, ")"); } if(ips.depth == 0 && !(m.isComparison() && (!(*po.is_approximate || m.isApproximate()) || (m.comparisonType() == COMPARISON_EQUALS && po.use_unicode_signs && (!po.can_display_unicode_string_function || (*po.can_display_unicode_string_function) (SIGN_ALMOST_EQUAL, po.can_display_unicode_string_arg)))))) { - QString equals_str; + TQString equals_str; if(*po.is_approximate || m.isApproximate()) { if(po.use_unicode_signs && (!po.can_display_unicode_string_function || (*po.can_display_unicode_string_function) (SIGN_ALMOST_EQUAL, po.can_display_unicode_string_arg))) { equals_str = SIGN_ALMOST_EQUAL " "; @@ -2156,7 +2156,7 @@ QString draw_structure(MathStructure &m, const QFont &font, const QColorGroup &c void KQalculate::update_status_text() { - QString str; + TQString str; bool b = false; if(evalops.approximation == APPROXIMATION_EXACT) { @@ -2196,7 +2196,7 @@ void KQalculate::update_status_text() { } default: { STATUS_SPACE - str += QString::number(evalops.parse_options.base); + str += TQString::number(evalops.parse_options.base); break; } } @@ -2258,7 +2258,7 @@ void KQalculate::update_status_text() { if(str != statusLabel_r->text()) { statusLabel_r->setText(str); - qApp->processEvents(); + tqApp->processEvents(); displayParseStatus(); } @@ -2354,7 +2354,7 @@ void *view_proc(void *pipe) { } else if(mm) { printops.allow_non_usable = true; printops.can_display_unicode_string_arg = (void*) win->resultLabel; - QFont font(win->resultLabel->font()); + TQFont font(win->resultLabel->font()); result_text = draw_structure(m, font, win->resultLabel->colorGroup(), printops); if(result_text.find("</td>") >= 0) { result_text.prepend("<div align=\"right\"><table width=1 cellspacing=0 cellpadding=0 border=0><tr><td width=1 align=\"center\" valign=\"middle\">"); @@ -2382,8 +2382,8 @@ void KQalculate::clearresult() { void reduceDivLineSize(QalculateResultDisplay *resultLabel) { - QString str = result_text; - QColorGroup cg = resultLabel->colorGroup(); + TQString str = result_text; + TQColorGroup cg = resultLabel->colorGroup(); int rt_i = 0; while(true) { @@ -2394,7 +2394,7 @@ void reduceDivLineSize(QalculateResultDisplay *resultLabel) { i2 = str.find("<br>", 0); if(i2 < 0) break; int width_i = rt_i + i2 + 43; - QString num_str = str; + TQString num_str = str; num_str.truncate(i2); i2 = str.find("<br>", i2 + 4); @@ -2403,32 +2403,32 @@ void reduceDivLineSize(QalculateResultDisplay *resultLabel) { rt_i += i2 + 11; i2 = str.find("</td><td width=1 align=\"center\" valign=\"middle\">", 0); if(i2 < 0) break; - QString den_str = str; + TQString den_str = str; den_str.truncate(i2); str.remove(0, i2 + 48); rt_i += i2 + 48; int den_w, num_w, w = 0, h = 0; - QSimpleRichText text_r(num_str, resultLabel->font()); text_r.setWidth(10000); + TQSimpleRichText text_r(num_str, resultLabel->font()); text_r.setWidth(10000); num_w = text_r.widthUsed(); - QSimpleRichText text_rn(den_str, resultLabel->font()); text_rn.setWidth(10000); + TQSimpleRichText text_rn(den_str, resultLabel->font()); text_rn.setWidth(10000); den_w = text_rn.widthUsed(); w = den_w; if(num_w > w) w = num_w; w += 2; - QSimpleRichText textsmall("<font size=\"1\">X</font>", resultLabel->font()); + TQSimpleRichText textsmall("<font size=\"1\">X</font>", resultLabel->font()); h = (int) (textsmall.height() / 1.5); h += h % 2; string filename = getLocalDir(); if(saved_divisionline_height != h) { - QPixmap *pixmap = new QPixmap(10, h); + TQPixmap *pixmap = new TQPixmap(10, h); pixmap->fill(cg.background()); - QPainter p(pixmap); - QPen ppen = p.pen(); + TQPainter p(pixmap); + TQPen ppen = p.pen(); ppen.setColor(cg.foreground()); p.setPen(ppen); p.drawLine(0, h / 2, 10, h / 2); @@ -2455,7 +2455,7 @@ void reduceDivLineSize(QalculateResultDisplay *resultLabel) { int height_i = result_text.find(" height=", width_i); if(height_i < 0) break; - num_str = QString::number(w); + num_str = TQString::number(w); result_text.replace(width_i, height_i - width_i, num_str); int i_diff = num_str.length() - (height_i - width_i); rt_i += i_diff; @@ -2463,7 +2463,7 @@ void reduceDivLineSize(QalculateResultDisplay *resultLabel) { height_i += 8; int height_i_end = result_text.find(" src=", height_i); if(height_i_end < 0) break; - num_str = QString::number(h); + num_str = TQString::number(h); result_text.replace(height_i, height_i_end - height_i, num_str); i_diff = num_str.length() - (height_i_end - height_i); rt_i += i_diff; @@ -2476,11 +2476,11 @@ Prefix *set_result_prefix; bool set_result_update_history; bool set_result_update_parse; bool set_result_force; -QString set_result_transformation; +TQString set_result_transformation; size_t set_result_stack_index; bool set_result_register_moved; -void KQalculate::setResult(Prefix *prefix, bool update_history, bool update_parse, bool force, QString transformation, size_t stack_index, bool register_moved) { +void KQalculate::setResult(Prefix *prefix, bool update_history, bool update_parse, bool force, TQString transformation, size_t stack_index, bool register_moved) { if(expression_has_changed && !rpn_mode) { if(!force) return; execute_expression(); @@ -2493,7 +2493,7 @@ void KQalculate::setResult(Prefix *prefix, bool update_history, bool update_pars set_result_transformation = transformation; set_result_stack_index = stack_index; set_result_register_moved = register_moved; - QTimer::singleShot(0, this, SLOT(setResult2())); + TQTimer::singleShot(0, this, SLOT(setResult2())); } void KQalculate::setResult2() { if(block_result_update) return; @@ -2502,7 +2502,7 @@ void KQalculate::setResult2() { bool update_parse = set_result_update_parse; bool force = set_result_force; bool register_moved = set_result_register_moved; - QString transformation = set_result_transformation; + TQString transformation = set_result_transformation; size_t stack_index = set_result_stack_index; if(!rpn_mode) stack_index = 0; @@ -2522,21 +2522,21 @@ void KQalculate::setResult2() { int inhistory_index = 0; if(update_history) { if(update_parse || register_moved) { - QString text; + TQString text; if(register_moved) { text = i18n("RPN Register Moved"); - inhistory.insert(inhistory.begin(), QString::null); + inhistory.insert(inhistory.begin(), TQString::null); inhistory_type.insert(inhistory_type.begin(), QALCULATE_HISTORY_REGISTER_MOVED); inhistory_id.insert(inhistory_id.begin(), inhistory_current_id); inhistory_current_id++; inhistory_index++; } else { - QString text2 = result_history_text; + TQString text2 = result_history_text; text2.replace("&", "&"); text2.replace(">", ">"); text2.replace("<", "<"); text = "<a name=\""; - text += QString::number(inhistory_current_id); + text += TQString::number(inhistory_current_id); text += "\">"; text += text2; text += "</a>"; @@ -2568,7 +2568,7 @@ void KQalculate::setResult2() { inhistory_index++; transformation.insert(0, "<i>"); transformation += ": </i><br>"; - QString text = historyBrowser->text(); + TQString text = historyBrowser->text(); text.insert(initial_result_index, transformation); historyBrowser->setText(text); initial_result_index += transformation.length() - 4; @@ -2644,7 +2644,7 @@ void KQalculate::setResult2() { rtime.tv_nsec = 100000000; while(b_busy) { dialog->progressBar()->advance(1); - qApp->processEvents(); + tqApp->processEvents(); nanosleep(&rtime, NULL); if(dialog->wasCancelled()) on_abort_display(); } @@ -2657,16 +2657,16 @@ void KQalculate::setResult2() { if(stack_index == 0) { if(do_wrap) { - resultLabel->setVScrollBarMode(QScrollView::Auto); + resultLabel->setVScrollBarMode(TQScrollView::Auto); resultLabel->setRightMargin(10); - resultLabel->setWordWrap(QTextEdit::NoWrap); + resultLabel->setWordWrap(TQTextEdit::NoWrap); } else { - resultLabel->setVScrollBarMode(QScrollView::AlwaysOff); - resultLabel->setWordWrap(QTextEdit::NoWrap); + resultLabel->setVScrollBarMode(TQScrollView::AlwaysOff); + resultLabel->setWordWrap(TQTextEdit::NoWrap); resultLabel->setRightMargin(0); - QString str = result_text; + TQString str = result_text; str.replace("width=1 ", ""); - QSimpleRichText testrt(str, resultLabel->font()); + TQSimpleRichText testrt(str, resultLabel->font()); testrt.setWidth(resultLabel->visibleWidth() * 4); if(testrt.widthUsed() > resultLabel->visibleWidth()) { result_text.replace("<font size=5", "<font size=4"); @@ -2689,9 +2689,9 @@ void KQalculate::setResult2() { if(parsed_text.length() > 500000) { parsed_text = "(...)"; } - QString new_text; + TQString new_text; if(update_parse) { - QString str = " "; + TQString str = " "; if(!parsed_approx) { str += "="; inhistory_type.insert(inhistory_type.begin() + inhistory_index, QALCULATE_HISTORY_PARSE); @@ -2704,7 +2704,7 @@ void KQalculate::setResult2() { inhistory_type.insert(inhistory_type.begin() + inhistory_index, QALCULATE_HISTORY_PARSE_APPROXIMATE); } str += " "; - QString str2 = parsed_text; + TQString str2 = parsed_text; str2.replace("&", "&"); str2.replace(">", ">"); str2.replace("<", "<"); @@ -2714,7 +2714,7 @@ void KQalculate::setResult2() { str += str2; new_text += "<font color=\"gray40\"><i>"; new_text += "<a name=\""; - new_text += QString::number(inhistory_current_id); + new_text += TQString::number(inhistory_current_id); new_text += "\">"; new_text += str; new_text += "</a>"; @@ -2725,7 +2725,7 @@ void KQalculate::setResult2() { if(stack_index == 0) { display_errors(&new_text, &inhistory_index); new_text += "<a name=\""; - new_text += QString::number(inhistory_current_id); + new_text += TQString::number(inhistory_current_id); new_text += "\">"; if(!(*printops.is_approximate) && !mstruct->isApproximate() && (update_parse || !prev_result_approx)) { inhistory_type.insert(inhistory_type.begin() + inhistory_index, QALCULATE_HISTORY_RESULT); @@ -2735,7 +2735,7 @@ void KQalculate::setResult2() { if(printops.use_unicode_signs && can_display_unicode_string_function(SIGN_ALMOST_EQUAL, (void*) historyBrowser)) { new_text += SIGN_ALMOST_EQUAL; } else { - QString str_approx = "= "; + TQString str_approx = "= "; str_approx += i18n("approx."); new_text += str_approx; } @@ -2749,13 +2749,13 @@ void KQalculate::setResult2() { RPNRegisterChanged(result_history_text, stack_index); } if(stack_index == 0) { - QString str2 = result_history_text; + TQString str2 = result_history_text; str2.replace("&", "&"); str2.replace(">", ">"); str2.replace("<", "<"); new_text += "<b>"; new_text += "<a name=\""; - new_text += QString::number(inhistory_current_id); + new_text += TQString::number(inhistory_current_id); new_text += "\">"; new_text += str2; new_text += " </a>"; @@ -2763,7 +2763,7 @@ void KQalculate::setResult2() { inhistory.insert(inhistory.begin() + inhistory_index, str2); inhistory_id.insert(inhistory_id.begin() + inhistory_index, inhistory_current_id); inhistory_current_id++; - QString text = historyBrowser->text(); + TQString text = historyBrowser->text(); initial_result_index = history_index + new_text.length() + 4; initial_inhistory_index = inhistory_index + 1; if(!update_parse && transformation.isEmpty()) { @@ -2780,7 +2780,7 @@ void KQalculate::setResult2() { display_errors(); if(!register_moved && stack_index == 0 && mstruct->isMatrix() && matrix_mstruct->isMatrix()) { - qApp->processEvents(); + tqApp->processEvents(); expressionEdit->setFocus(); if(update_history && update_parse && force) expressionEdit->selectAll(); insertMatrixVector(matrix_mstruct, false, true, true); @@ -2833,7 +2833,7 @@ void KQalculate::executeCommand(int command_type) { if(expression_has_changed && !rpn_mode) { execute_expression(); } - QTimer::singleShot(0, this, SLOT(executeCommand2())); + TQTimer::singleShot(0, this, SLOT(executeCommand2())); } void KQalculate::executeCommand2() { int command_type = execute_command_command_type; @@ -2867,7 +2867,7 @@ void KQalculate::executeCommand2() { KProgressDialog *dialog = NULL; if(b_busy) { - QString progress_str; + TQString progress_str; switch(command_type) { case COMMAND_FACTORIZE: { progress_str = i18n("Factorizing..."); @@ -2892,7 +2892,7 @@ void KQalculate::executeCommand2() { rtime.tv_nsec = 100000000; while(b_busy) { dialog->progressBar()->advance(1); - qApp->processEvents(); + tqApp->processEvents(); nanosleep(&rtime, NULL); if(dialog->wasCancelled()) { on_abort_command(); @@ -2990,7 +2990,7 @@ void KQalculate::execute_expression(bool force) { execute_expression_force = force; execute_expression_do_stack = false; execute_expression_do_mathoperation = false; - QTimer::singleShot(0, this, SLOT(execute_expression2())); + TQTimer::singleShot(0, this, SLOT(execute_expression2())); } void KQalculate::execute_expression2() { @@ -3001,7 +3001,7 @@ void KQalculate::execute_expression2() { MathOperation op = execute_expression_op; MathFunction *f = execute_expression_f; - QString str; + TQString str; if(do_stack) { str = getRPNRegister(stack_index)->text(1).stripWhiteSpace(); @@ -3149,7 +3149,7 @@ void KQalculate::execute_expression2() { rtime.tv_nsec = 100000000; while(CALCULATOR->busy()) { dialog->progressBar()->advance(1); - qApp->processEvents(); + tqApp->processEvents(); nanosleep(&rtime, NULL); if(dialog->wasCancelled()) CALCULATOR->abort(); } @@ -3217,17 +3217,17 @@ void KQalculate::execute_expression2() { error_timer->start(100); } -void KQalculate::display_errors(QString *new_text, int *inhistory_index) { +void KQalculate::display_errors(TQString *new_text, int *inhistory_index) { if(!CALCULATOR->message()) return; error_timer->stop(); bool error = false; MessageType mtype; - QStringList strlst; - QString error_str = ""; + TQStringList strlst; + TQString error_str = ""; while(true) { mtype = CALCULATOR->message()->type(); if(mtype == MESSAGE_ERROR || mtype == MESSAGE_WARNING) { - QString text = CALCULATOR->message()->message().c_str(); + TQString text = CALCULATOR->message()->message().c_str(); text.replace("&", "&"); text.replace(">", ">"); text.replace("<", "<"); @@ -3274,7 +3274,7 @@ void save_defs() { void KQalculate::create_vmenu() { - QPopupMenu *sub, *sub3; + TQPopupMenu *sub, *sub3; menu_variables->clear(); sub = menu_variables; @@ -3291,14 +3291,14 @@ void KQalculate::create_vmenu() { menu_variables_ids.clear(); - stack<QPopupMenu*> menus; + stack<TQPopupMenu*> menus; menus.push(sub); sub3 = sub; while(titem) { - sub = new QPopupMenu(); - QObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onVariableMenuItemActivated(int))); + sub = new TQPopupMenu(); + TQObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onVariableMenuItemActivated(int))); if(titem->item.find('&') != string::npos) { - QString str2 = titem->item.c_str(); + TQString str2 = titem->item.c_str(); str2.replace("&", "&&"); sub3->insertItem(str2, sub, -1, 0); } else { @@ -3310,7 +3310,7 @@ void KQalculate::create_vmenu() { v = (Variable*) titem->objects[i]; if(v->isActive() && !v->isHidden()) { if(v->title(true).find('&') != string::npos) { - QString str2 = v->title(true).c_str(); + TQString str2 = v->title(true).c_str(); str2.replace("&", "&&"); menu_variables_ids[sub->insertItem(str2)] = v; } else { @@ -3369,7 +3369,7 @@ void KQalculate::update_vmenu() { void KQalculate::create_fmenu() { - QPopupMenu *sub, *sub3; + TQPopupMenu *sub, *sub3; menu_functions->clear(); sub = menu_functions; @@ -3386,14 +3386,14 @@ void KQalculate::create_fmenu() { menu_functions_ids.clear(); - stack<QPopupMenu*> menus; + stack<TQPopupMenu*> menus; menus.push(sub); sub3 = sub; while(titem) { - sub = new QPopupMenu(); - QObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onFunctionMenuItemActivated(int))); + sub = new TQPopupMenu(); + TQObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onFunctionMenuItemActivated(int))); if(titem->item.find('&') != string::npos) { - QString str2 = titem->item.c_str(); + TQString str2 = titem->item.c_str(); str2.replace("&", "&&"); sub3->insertItem(str2, sub, -1, 0); } else { @@ -3405,7 +3405,7 @@ void KQalculate::create_fmenu() { f = (MathFunction*) titem->objects[i]; if(f->isActive() && !f->isHidden()) { if(f->title(true).find('&') != string::npos) { - QString str2 = f->title(true).c_str(); + TQString str2 = f->title(true).c_str(); str2.replace("&", "&&"); menu_functions_ids[sub->insertItem(str2)] = f; } else { @@ -3467,7 +3467,7 @@ void KQalculate::update_fmenu() { void KQalculate::create_umenu() { - QPopupMenu *sub, *sub3; + TQPopupMenu *sub, *sub3; menu_units->clear(); sub = menu_units; @@ -3484,14 +3484,14 @@ void KQalculate::create_umenu() { menu_units_ids.clear(); - stack<QPopupMenu*> menus; + stack<TQPopupMenu*> menus; menus.push(sub); sub3 = sub; while(titem) { - sub = new QPopupMenu(); - QObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onUnitMenuItemActivated(int))); + sub = new TQPopupMenu(); + TQObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onUnitMenuItemActivated(int))); if(titem->item.find('&') != string::npos) { - QString str2 = titem->item.c_str(); + TQString str2 = titem->item.c_str(); str2.replace("&", "&&"); sub3->insertItem(str2, sub, -1, 0); } else { @@ -3503,7 +3503,7 @@ void KQalculate::create_umenu() { u = (Unit*) titem->objects[i]; if(u->isActive() && !u->isHidden()) { if(u->title(true).find('&') != string::npos) { - QString str2 = u->title(true).c_str(); + TQString str2 = u->title(true).c_str(); str2.replace("&", "&&"); menu_units_ids[sub->insertItem(str2)] = u; } else { @@ -3532,25 +3532,25 @@ void KQalculate::create_umenu() { } } - sub = new QPopupMenu(); - QObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onUnitsPrefixMenuItemActivated(int))); + sub = new TQPopupMenu(); + TQObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onUnitsPrefixMenuItemActivated(int))); menu_units->insertSeparator(); menu_units->insertItem(i18n("Prefixes"), sub); int index = 0; Prefix *p = CALCULATOR->getPrefix(index); while(p) { - QString pstr; + TQString pstr; switch(p->type()) { case PREFIX_DECIMAL: { - QTextOStream(&pstr) << p->name(false, true, &can_display_unicode_string_function, (void*) menu_units).c_str() << "\t(10e" << ((DecimalPrefix*) p)->exponent() << ")"; + TQTextOStream(&pstr) << p->name(false, true, &can_display_unicode_string_function, (void*) menu_units).c_str() << "\t(10e" << ((DecimalPrefix*) p)->exponent() << ")"; break; } case PREFIX_BINARY: { - QTextOStream(&pstr) << p->name(false, true, &can_display_unicode_string_function, (void*) menu_units).c_str() << "\t(2e" << ((BinaryPrefix*) p)->exponent() << ")"; + TQTextOStream(&pstr) << p->name(false, true, &can_display_unicode_string_function, (void*) menu_units).c_str() << "\t(2e" << ((BinaryPrefix*) p)->exponent() << ")"; break; } case PREFIX_NUMBER: { - QTextOStream(&pstr) << p->name(false, true, &can_display_unicode_string_function, (void*) menu_units).c_str(); + TQTextOStream(&pstr) << p->name(false, true, &can_display_unicode_string_function, (void*) menu_units).c_str(); break; } } @@ -3591,7 +3591,7 @@ void KQalculate::update_umenus() { void KQalculate::create_toumenu() { - QPopupMenu *sub, *sub3; + TQPopupMenu *sub, *sub3; menu_to_unit->clear(); sub = menu_to_unit; @@ -3608,14 +3608,14 @@ void KQalculate::create_toumenu() { menu_to_unit_ids.clear(); - stack<QPopupMenu*> menus; + stack<TQPopupMenu*> menus; menus.push(sub); sub3 = sub; while(titem) { - sub = new QPopupMenu(); - QObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onConvertToUnitMenuItemActivated(int))); + sub = new TQPopupMenu(); + TQObject::connect(sub, SIGNAL(activated(int)), this, SLOT(onConvertToUnitMenuItemActivated(int))); if(titem->item.find('&') != string::npos) { - QString str2 = titem->item.c_str(); + TQString str2 = titem->item.c_str(); str2.replace("&", "&&"); sub3->insertItem(str2, sub, -1, 0); } else { @@ -3627,7 +3627,7 @@ void KQalculate::create_toumenu() { u = (Unit*) titem->objects[i]; if(u->isActive() && !u->isHidden()) { if(u->title(true).find('&') != string::npos) { - QString str2 = u->title(true).c_str(); + TQString str2 = u->title(true).c_str(); str2.replace("&", "&&"); menu_to_unit_ids[sub->insertItem(str2)] = u; } else { @@ -3660,23 +3660,23 @@ void KQalculate::create_toumenu() { void KQalculate::create_setpmenu() { menu_set_prefix->clear(); - QObject::connect(menu_set_prefix, SIGNAL(activated(int)), this, SLOT(onSetPrefixMenuItemActivated(int))); + TQObject::connect(menu_set_prefix, SIGNAL(activated(int)), this, SLOT(onSetPrefixMenuItemActivated(int))); int index = 0; menu_set_prefix_ids[menu_set_prefix->insertItem(i18n("No Prefix"))] = CALCULATOR->decimal_null_prefix; Prefix *p = CALCULATOR->getPrefix(index); while(p) { - QString pstr; + TQString pstr; switch(p->type()) { case PREFIX_DECIMAL: { - QTextOStream(&pstr) << p->name(false, true, &can_display_unicode_string_function, (void*) menu_units).c_str() << "\t(10e" << ((DecimalPrefix*) p)->exponent() << ")"; + TQTextOStream(&pstr) << p->name(false, true, &can_display_unicode_string_function, (void*) menu_units).c_str() << "\t(10e" << ((DecimalPrefix*) p)->exponent() << ")"; break; } case PREFIX_BINARY: { - QTextOStream(&pstr) << p->name(false, true, &can_display_unicode_string_function, (void*) menu_units).c_str() << "\t(2e" << ((BinaryPrefix*) p)->exponent() << ")"; + TQTextOStream(&pstr) << p->name(false, true, &can_display_unicode_string_function, (void*) menu_units).c_str() << "\t(2e" << ((BinaryPrefix*) p)->exponent() << ")"; break; } case PREFIX_NUMBER: { - QTextOStream(&pstr) << p->name(false, true, &can_display_unicode_string_function, (void*) menu_units).c_str(); + TQTextOStream(&pstr) << p->name(false, true, &can_display_unicode_string_function, (void*) menu_units).c_str(); break; } } @@ -3687,14 +3687,14 @@ void KQalculate::create_setpmenu() { } -void KQalculate::insert_text(QString name) { +void KQalculate::insert_text(TQString name) { expressionEdit->insert(name); expressionEdit->setFocus(); } /* insert one-argument function when button clicked */ -void KQalculate::insertButtonFunction(QString text, bool append_space) { +void KQalculate::insertButtonFunction(TQString text, bool append_space) { if(expressionEdit->hasSelectedText()) { //set selection as argument text += "("; @@ -3712,7 +3712,7 @@ void KQalculate::insertButtonFunction(QString text, bool append_space) { void KQalculate::insertButtonFunction(MathFunction *f) { const ExpressionName *ename = &f->preferredInputName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) expressionEdit); if(f->minargs() > 1) { - QString text = ename->name.c_str(); + TQString text = ename->name.c_str(); bool b = expressionEdit->hasSelectedText(); text += "("; if(b) text += expressionEdit->selectedText(); @@ -3894,7 +3894,7 @@ void KQalculate::execute() { bool KQalculate::fetch_exchange_rates(int) { KURL url(CALCULATOR->getExchangeRatesUrl().c_str()); - QString filename(CALCULATOR->getExchangeRatesFileName().c_str()); + TQString filename(CALCULATOR->getExchangeRatesFileName().c_str()); #if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2 if(KIO::NetAccess::download(url, filename)) { #else @@ -3902,7 +3902,7 @@ bool KQalculate::fetch_exchange_rates(int) { #endif return true; } else { - QString errorstr = i18n("Failed to download exchange rates from ECB."); + TQString errorstr = i18n("Failed to download exchange rates from ECB."); errorstr += "\n"; errorstr += KIO::NetAccess::lastErrorString(); KMessageBox::error(this, errorstr); @@ -3928,8 +3928,8 @@ void KQalculate::toggleHistory(bool on) { mainStack->raiseWidget(1); keypadButton->setOn(false); stackButton->setOn(false); - mainStack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, false); - resultLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum, false); + mainStack->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, false); + resultLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum, false); if(!b) { new_height += history_height; resize(width(), new_height); @@ -3942,10 +3942,10 @@ void KQalculate::toggleHistory(bool on) { int new_height = height() - mainStack->height(); mainStack->hide(); bottomLine->show(); - qApp->processEvents(); + tqApp->processEvents(); if(new_height < height()) resize(width(), new_height + bottomLine->height()); - mainStack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum, false); - resultLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, false); + mainStack->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum, false); + resultLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, false); } } } @@ -3961,8 +3961,8 @@ void KQalculate::toggleStack(bool on) { mainStack->raiseWidget(2); keypadButton->setOn(false); historyButton->setOn(false); - mainStack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, false); - resultLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum, false); + mainStack->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, false); + resultLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum, false); if(!b) { new_height += history_height; resize(width(), new_height); @@ -3975,10 +3975,10 @@ void KQalculate::toggleStack(bool on) { int new_height = height() - mainStack->height(); mainStack->hide(); bottomLine->show(); - qApp->processEvents(); + tqApp->processEvents(); if(new_height < height()) resize(width(), new_height + bottomLine->height()); - mainStack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum, false); - resultLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, false); + mainStack->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum, false); + resultLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, false); } } } @@ -3988,15 +3988,15 @@ void KQalculate::toggleKeypad(bool on) { bool b = mainStack->isVisible(); if(b) history_height = mainStack->height(); int new_height = height() - bottomLine->height(); - mainStack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum, false); - resultLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, false); + mainStack->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum, false); + resultLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, false); mainStack->show(); bottomLine->hide(); mainStack->raiseWidget(0); historyButton->setOn(false); stackButton->setOn(false); if(!b) { - qApp->processEvents(); + tqApp->processEvents(); new_height += mainStack->height(); resize(width(), new_height); } else { @@ -4007,10 +4007,10 @@ void KQalculate::toggleKeypad(bool on) { int new_height = height() - mainStack->height(); mainStack->hide(); bottomLine->show(); - qApp->processEvents(); + tqApp->processEvents(); if(new_height < height()) resize(width(), new_height + bottomLine->height()); - mainStack->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum, false); - resultLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, false); + mainStack->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum, false); + resultLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, false); } } } @@ -4396,10 +4396,10 @@ void KQalculate::setBaseInResultFromDialogGroup(int id) { void KQalculate::setBase() { if(!set_base_dialog) { set_base_dialog = new QalculateSetBaseDialog(this); - QObject::connect(set_base_dialog->radiogroup_input, SIGNAL(clicked(int)), this, SLOT(setBaseInExpressionFromDialogGroup(int))); - QObject::connect(set_base_dialog->inputBaseBox, SIGNAL(valueChanged(int)), this, SLOT(setBaseInExpressionFromDialogBox(int))); - QObject::connect(set_base_dialog->radiogroup_output, SIGNAL(clicked(int)), this, SLOT(setBaseInResultFromDialogGroup(int))); - QObject::connect(set_base_dialog->outputBaseBox, SIGNAL(valueChanged(int)), this, SLOT(setBaseInResultFromDialogBox(int))); + TQObject::connect(set_base_dialog->radiogroup_input, SIGNAL(clicked(int)), this, SLOT(setBaseInExpressionFromDialogGroup(int))); + TQObject::connect(set_base_dialog->inputBaseBox, SIGNAL(valueChanged(int)), this, SLOT(setBaseInExpressionFromDialogBox(int))); + TQObject::connect(set_base_dialog->radiogroup_output, SIGNAL(clicked(int)), this, SLOT(setBaseInResultFromDialogGroup(int))); + TQObject::connect(set_base_dialog->outputBaseBox, SIGNAL(valueChanged(int)), this, SLOT(setBaseInResultFromDialogBox(int))); } set_base_dialog->inputBaseBox->blockSignals(true); set_base_dialog->radiogroup_input->blockSignals(true); @@ -4486,12 +4486,12 @@ void KQalculate::rpnMode(bool b) { } if(rpn_mode) { kpEquals->setText(i18n("Ent")); - QToolTip::add(kpEquals, i18n("Calculate expression and add to stack")); - QToolTip::add(executeButton, i18n("Calculate expression and add to stack")); + TQToolTip::add(kpEquals, i18n("Calculate expression and add to stack")); + TQToolTip::add(executeButton, i18n("Calculate expression and add to stack")); } else { kpEquals->setText(i18n("=")); - QToolTip::add(kpEquals, i18n("Calculate expression")); - QToolTip::add(executeButton, i18n("Calculate expression")); + TQToolTip::add(kpEquals, i18n("Calculate expression")); + TQToolTip::add(executeButton, i18n("Calculate expression")); } } @@ -4516,8 +4516,8 @@ void KQalculate::setMaxDecimals(int i) { void KQalculate::decimals() { if(!decimalsDialog) { decimalsDialog = new QalculateDecimalsDialog(this); - QObject::connect(decimalsDialog->minDecimalsBox, SIGNAL(valueChanged(int)), this, SLOT(setMinDecimals(int))); - QObject::connect(decimalsDialog->maxDecimalsBox, SIGNAL(valueChanged(int)), this, SLOT(setMaxDecimals(int))); + TQObject::connect(decimalsDialog->minDecimalsBox, SIGNAL(valueChanged(int)), this, SLOT(setMinDecimals(int))); + TQObject::connect(decimalsDialog->maxDecimalsBox, SIGNAL(valueChanged(int)), this, SLOT(setMaxDecimals(int))); } decimalsDialog->minDecimalsBox->blockSignals(true); decimalsDialog->maxDecimalsBox->blockSignals(true); @@ -4536,8 +4536,8 @@ void KQalculate::setPrecision(int i) { void KQalculate::precision() { if(!precisionDialog) { precisionDialog = new QalculatePrecisionDialog(this); - QObject::connect(precisionDialog, SIGNAL(applyClicked()), this, SLOT(precisionRecalculate())); - QObject::connect(precisionDialog->precisionBox, SIGNAL(valueChanged(int)), this, SLOT(setPrecision(int))); + TQObject::connect(precisionDialog, SIGNAL(applyClicked()), this, SLOT(precisionRecalculate())); + TQObject::connect(precisionDialog->precisionBox, SIGNAL(valueChanged(int)), this, SLOT(setPrecision(int))); } precisionDialog->precisionBox->setValue(CALCULATOR->getPrecision()); precisionDialog->show(); @@ -4738,7 +4738,7 @@ void KQalculate::loadMode(int index) { update_status_text(); printops.allow_factorization = (evalops.structuring == STRUCTURING_FACTORIZE); - QString str = expressionEdit->text().stripWhiteSpace(); + TQString str = expressionEdit->text().stripWhiteSpace(); if(expression_has_changed || str.isEmpty()) { setResult(NULL, true, false, false); } else { @@ -4749,10 +4749,10 @@ void KQalculate::loadMode(int index) { displayParseStatus(); expressionEdit->setFocus(); } -QalculateModeDialog::QalculateModeDialog(QWidget *parent) : KDialogBase(parent, 0, true, i18n("Save Mode"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true) { - setMainWidget(new QWidget(this)); - QGridLayout *grid = new QGridLayout(mainWidget(), 2, 2, 0, spacingHint()); - grid->addWidget(new QLabel(i18n("Mode name:"), mainWidget()), 0, 0); +QalculateModeDialog::QalculateModeDialog(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Save Mode"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true) { + setMainWidget(new TQWidget(this)); + TQGridLayout *grid = new TQGridLayout(mainWidget(), 2, 2, 0, spacingHint()); + grid->addWidget(new TQLabel(i18n("Mode name:"), mainWidget()), 0, 0); modeCombo = new KComboBox(mainWidget()); modeCombo->setEditable(true); for(size_t i = 2; i < modes.size(); i++) { @@ -4760,9 +4760,9 @@ QalculateModeDialog::QalculateModeDialog(QWidget *parent) : KDialogBase(parent, } modeCombo->lineEdit()->clear(); modeCombo->setFocus(); - modeCombo->setSizePolicy(QSizePolicy::Expanding, modeCombo->sizePolicy().verData()); + modeCombo->setSizePolicy(TQSizePolicy::Expanding, modeCombo->sizePolicy().verData()); grid->addWidget(modeCombo, 0, 1); - grid->addWidget(new QLabel(i18n("Shortcut:"), mainWidget()), 1, 0); + grid->addWidget(new TQLabel(i18n("Shortcut:"), mainWidget()), 1, 0); keyButton = new KKeyButton(mainWidget()); grid->addWidget(keyButton, 1, 1); @@ -4780,14 +4780,14 @@ void QalculateModeDialog::modeSelected(int index) { void QalculateModeDialog::updateShortcut(const KShortcut &shortcut) { keyButton->setShortcut(shortcut, false); } -QString QalculateModeDialog::modeName() { +TQString QalculateModeDialog::modeName() { return modeCombo->currentText(); } const KShortcut &QalculateModeDialog::modeShortcut() { return keyButton->shortcut(); } void QalculateModeDialog::slotOk() { - QString name = modeName(); + TQString name = modeName(); if(name.isEmpty()) { KMessageBox::error(this, i18n("Empty mode name.")); return; @@ -4799,9 +4799,9 @@ void QalculateModeDialog::slotOk() { } void KQalculate::saveModeAs() { QalculateModeDialog *dialog = new QalculateModeDialog(this); - if(dialog->exec() == QDialog::Accepted) { + if(dialog->exec() == TQDialog::Accepted) { bool new_mode = true; - QString name = dialog->modeName().stripWhiteSpace(); + TQString name = dialog->modeName().stripWhiteSpace(); size_t index = save_mode_as(name, &new_mode); modes[index].shortcut = dialog->modeShortcut(); if(new_mode) { @@ -4810,9 +4810,9 @@ void KQalculate::saveModeAs() { ModeObject *mo = new ModeObject(index); mo->i_mode = index; mode_objects.push_back(mo); - accel()->insert(QString("Load mode: ") + modes[index].name, i18n("Load meta mode: %1").arg(modes[index].name), QString::null, modes[index].shortcut, mo, SLOT(loadMode())); + accel()->insert(TQString("Load mode: ") + modes[index].name, i18n("Load meta mode: %1").arg(modes[index].name), TQString::null, modes[index].shortcut, mo, SLOT(loadMode())); } else { - accel()->setShortcut(QString("Load mode: ") + modes[index].name, modes[index].shortcut); + accel()->setShortcut(TQString("Load mode: ") + modes[index].name, modes[index].shortcut); } } delete dialog; @@ -4820,19 +4820,19 @@ void KQalculate::saveModeAs() { void KQalculate::deleteMode() { #if KDE_VERSION_MAJOR > 3 || KDE_VERSION_MINOR >= 2 bool b_ok = false; - QStringList mode_names; + TQStringList mode_names; for(size_t i = 2; i < modes.size(); i++) { mode_names += modes[i].name; } - QString name = KInputDialog::getItem(i18n("Delete Mode"), i18n("Mode:"), mode_names, 0, false, &b_ok, this).stripWhiteSpace(); + TQString name = KInputDialog::getItem(i18n("Delete Mode"), i18n("Mode:"), mode_names, 0, false, &b_ok, this).stripWhiteSpace(); if(b_ok) { for(size_t i = 2; i < modes.size(); i++) { if(modes[i].name == name) { - accel()->remove(QString("Load mode: ") + name); + accel()->remove(TQString("Load mode: ") + name); modes.erase(modes.begin() + i); delete mode_objects[i - 2]; mode_objects.erase(mode_objects.begin() + (i - 2)); - for(QValueVector<ModeObject*>::size_type i2 = 0; i2 < mode_objects.size(); i2++) { + for(TQValueVector<ModeObject*>::size_type i2 = 0; i2 < mode_objects.size(); i2++) { mode_objects[i2]->i_mode = i2 + 2; } menu_modes->removeItemAt(i); @@ -5131,11 +5131,11 @@ void KQalculate::RPNStackEnter(Variable *v) { mstruct->ref(); RPNRegisterAdded(v->preferredDisplayName(printops.abbreviate_names, printops.use_unicode_signs, false, printops.use_reference_names, printops.can_display_unicode_string_function, (void*) stackList).name.c_str()); } -void KQalculate::RPNRegisterAdded(const QString &text, size_t index) { +void KQalculate::RPNRegisterAdded(const TQString &text, size_t index) { if(index == 0) { - new KListViewItem(stackList, QString::number(index + 1), text); + new KListViewItem(stackList, TQString::number(index + 1), text); } else { - new KListViewItem(stackList, getRPNRegister(index - 1), QString::number(index + 1), text); + new KListViewItem(stackList, getRPNRegister(index - 1), TQString::number(index + 1), text); } updateRPNIndexes(); clearStackButton->setEnabled(true); @@ -5147,11 +5147,11 @@ void KQalculate::RPNRegisterRemoved(size_t index) { clearStackButton->setEnabled(false); } } -void KQalculate::RPNRegisterChanged(const QString &text, size_t index) { +void KQalculate::RPNRegisterChanged(const TQString &text, size_t index) { getRPNRegister(index)->setText(1, text); } -QListViewItem *KQalculate::getRPNRegister(size_t index) { - QListViewItem *li = stackList->firstChild(); +TQListViewItem *KQalculate::getRPNRegister(size_t index) { + TQListViewItem *li = stackList->firstChild(); while(li) { if(index == 0) return li; index--; @@ -5167,13 +5167,13 @@ void KQalculate::clearStack() { clearStackButton->setEnabled(false); } void KQalculate::registerUp() { - QListViewItem *li = stackList->selectedItem(); + TQListViewItem *li = stackList->selectedItem(); if(li) { size_t index = (size_t) li->text(0).toUInt() - 1; if(index == 0) return; CALCULATOR->moveRPNRegisterUp(index + 1); - QListViewItem *li2 = li->itemAbove(); - QString str = li2->text(1); + TQListViewItem *li2 = li->itemAbove(); + TQString str = li2->text(1); li2->setText(1, li->text(1)); li->setText(1, str); stackList->setSelected(li2, true); @@ -5186,13 +5186,13 @@ void KQalculate::registerUp() { } } void KQalculate::registerDown() { - QListViewItem *li = stackList->selectedItem(); + TQListViewItem *li = stackList->selectedItem(); if(li) { size_t index = (size_t) li->text(0).toUInt() - 1; if(index + 1 == CALCULATOR->RPNStackSize()) return; CALCULATOR->moveRPNRegisterDown(index + 1); - QListViewItem *li2 = li->nextSibling(); - QString str = li2->text(1); + TQListViewItem *li2 = li->nextSibling(); + TQString str = li2->text(1); li2->setText(1, li->text(1)); li->setText(1, str); stackList->setSelected(li2, true); @@ -5205,7 +5205,7 @@ void KQalculate::registerDown() { } } void KQalculate::deleteRegister() { - QListViewItem *li = stackList->selectedItem(); + TQListViewItem *li = stackList->selectedItem(); if(li) { size_t index = (size_t) li->text(0).toUInt() - 1; CALCULATOR->deleteRPNRegister(index + 1); @@ -5224,21 +5224,21 @@ void KQalculate::deleteRegister() { } } void KQalculate::editRegister() { - QListViewItem *li = stackList->selectedItem(); + TQListViewItem *li = stackList->selectedItem(); if(!li) return; stackList->rename(li, 1); } void KQalculate::updateRPNIndexes() { - QListViewItem *li = stackList->firstChild(); + TQListViewItem *li = stackList->firstChild(); size_t i = 1; while(li) { - li->setText(0, QString::number(i)); + li->setText(0, TQString::number(i)); i++; li = li->nextSibling(); } } void KQalculate::stackRegisterMoved() { - QListViewItem *li = stackList->firstChild(); + TQListViewItem *li = stackList->firstChild(); size_t i = 0; size_t old_index; while(li) { @@ -5259,21 +5259,21 @@ void KQalculate::stackRegisterMoved() { li = li->nextSibling(); } } -void KQalculate::stackRegisterSet(QListViewItem *li) { +void KQalculate::stackRegisterSet(TQListViewItem *li) { execute_expression_stack_index = (size_t) li->text(0).toUInt() - 1; execute_expression_force = true; execute_expression_do_stack = true; execute_expression_do_mathoperation = false; execute_expression2(); } -void KQalculate::popupStackMenu(KListView*, QListViewItem *li, const QPoint &p) { +void KQalculate::popupStackMenu(KListView*, TQListViewItem *li, const TQPoint &p) { stackMenu->setItemEnabled(stackMenu->idAt(0), li != NULL); stackMenu->setItemEnabled(stackMenu->idAt(1), li != NULL); stackMenu->setItemEnabled(stackMenu->idAt(3), CALCULATOR->RPNStackSize() > 0); stackMenu->popup(p); } void KQalculate::registerSelected() { - QListViewItem *li = stackList->selectedItem(); + TQListViewItem *li = stackList->selectedItem(); if(li) { size_t index = (size_t) li->text(0).toUInt() - 1; registerUpButton->setEnabled(index != 0); @@ -5553,8 +5553,8 @@ void KQalculate::manageVariables() { if(!variables_dialog) { variables_dialog = new QalculateVariablesDialog(); variables_dialog->updateVariableTree(); - QObject::connect(variables_dialog, SIGNAL(variablesChanged()), this, SLOT(update_vmenu())); - QObject::connect(variables_dialog, SIGNAL(insertRequest(Variable*)), this, SLOT(insertVariable(Variable*))); + TQObject::connect(variables_dialog, SIGNAL(variablesChanged()), this, SLOT(update_vmenu())); + TQObject::connect(variables_dialog, SIGNAL(insertRequest(Variable*)), this, SLOT(insertVariable(Variable*))); } variables_dialog->show(); } @@ -5562,22 +5562,22 @@ void KQalculate::insertVariable(Variable *v) { insert_text(v->preferredInputName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) expressionEdit).name.c_str()); variable_inserted(v); } -void KQalculate::insertFunction(MathFunction *f, QWidget *parent) { +void KQalculate::insertFunction(MathFunction *f, TQWidget *parent) { if(!CALCULATOR->stillHasFunction(f)) { KMessageBox::error(parent, i18n("Function does not exist anymore.")); update_fmenu(); return; } if(f->args() == 0) { - QString str = f->preferredInputName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) expressionEdit).name.c_str(); + TQString str = f->preferredInputName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) expressionEdit).name.c_str(); str += "()"; insert_text(str); function_inserted(f); } else { QalculateInsertFunctionDialog *dialog = new QalculateInsertFunctionDialog(f, parent, expressionEdit->selectedText()); int rcode = dialog->exec(); - if(rcode != QDialog::Rejected) { - if(rcode == QDialog::Accepted) { + if(rcode != TQDialog::Rejected) { + if(rcode == TQDialog::Accepted) { insert_text(dialog->functionExpression()); } else { expressionEdit->setText(dialog->functionExpression()); @@ -5589,7 +5589,7 @@ void KQalculate::insertFunction(MathFunction *f, QWidget *parent) { delete dialog; } } -void KQalculate::applyFunction(MathFunction *f, QWidget *parent) { +void KQalculate::applyFunction(MathFunction *f, TQWidget *parent) { if(!CALCULATOR->stillHasFunction(f)) { KMessageBox::error(parent, i18n("Function does not exist anymore.")); update_fmenu(); @@ -5599,7 +5599,7 @@ void KQalculate::applyFunction(MathFunction *f, QWidget *parent) { calculateRPN(f); return; } - QString str = f->preferredInputName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) expressionEdit).name.c_str(); + TQString str = f->preferredInputName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) expressionEdit).name.c_str(); if(f->args() == 0) { str += "()"; } else { @@ -5623,9 +5623,9 @@ void KQalculate::convertToUnitExpression() { if(!convert_to_unit_expression_dialog) { convert_to_unit_expression_dialog = new QalculateConvertUnitsDialog(this); convert_to_unit_expression_dialog->updateUnitTree(); - QObject::connect(convert_to_unit_expression_dialog, SIGNAL(applyClicked()), this, SLOT(convertToUnitConvertToDialogExpression())); - QObject::connect(convert_to_unit_expression_dialog, SIGNAL(okClicked()), this, SLOT(convertToUnitConvertToDialogExpression())); - QObject::connect(convert_to_unit_expression_dialog, SIGNAL(unitsChanged()), this, SLOT(update_umenus())); + TQObject::connect(convert_to_unit_expression_dialog, SIGNAL(applyClicked()), this, SLOT(convertToUnitConvertToDialogExpression())); + TQObject::connect(convert_to_unit_expression_dialog, SIGNAL(okClicked()), this, SLOT(convertToUnitConvertToDialogExpression())); + TQObject::connect(convert_to_unit_expression_dialog, SIGNAL(unitsChanged()), this, SLOT(update_umenus())); } convert_to_unit_expression_dialog->show(); } @@ -5647,9 +5647,9 @@ void KQalculate::manageFunctions() { if(!functions_dialog) { functions_dialog = new QalculateFunctionsDialog(); functions_dialog->updateFunctionTree(); - QObject::connect(functions_dialog, SIGNAL(functionsChanged()), this, SLOT(update_fmenu())); - QObject::connect(functions_dialog, SIGNAL(insertRequest(MathFunction*)), this, SLOT(insertManagedFunction(MathFunction*))); - QObject::connect(functions_dialog, SIGNAL(applyRequest(MathFunction*)), this, SLOT(applyManagedFunction(MathFunction*))); + TQObject::connect(functions_dialog, SIGNAL(functionsChanged()), this, SLOT(update_fmenu())); + TQObject::connect(functions_dialog, SIGNAL(insertRequest(MathFunction*)), this, SLOT(insertManagedFunction(MathFunction*))); + TQObject::connect(functions_dialog, SIGNAL(applyRequest(MathFunction*)), this, SLOT(applyManagedFunction(MathFunction*))); } functions_dialog->show(); } @@ -5757,13 +5757,13 @@ void KQalculate::importCSVFile() { void KQalculate::saveAsImage() { - QString filename; + TQString filename; while(true) { filename = KFileDialog::getSaveFileName("qalculate.png", "image/png", this, i18n("Save Image")); if(filename.isEmpty()) { return; } else { - if(QFile::exists(filename)) { + if(TQFile::exists(filename)) { if(KMessageBox::warningContinueCancel(this, i18n("A file named \"%1\" already exists. Are you sure you want to overwrite it?" ).arg(filename), i18n("Overwrite File?"), i18n( "&Overwrite" )) != KMessageBox::Cancel) { break; } @@ -5772,29 +5772,29 @@ void KQalculate::saveAsImage() { } } } - QString str = result_text; + TQString str = result_text; str.replace("width=1 ", ""); - QSimpleRichText text(str, resultLabel->font()); - QPicture picture; - QPainter p(&picture); + TQSimpleRichText text(str, resultLabel->font()); + TQPicture picture; + TQPainter p(&picture); text.setWidth(1000); - text.draw(&p, 0, 0, QRect(), QColorGroup(Qt::black, Qt::white, Qt::white, Qt::white, Qt::white, Qt::black, Qt::white)); + text.draw(&p, 0, 0, TQRect(), TQColorGroup(TQt::black, TQt::white, TQt::white, TQt::white, TQt::white, TQt::black, TQt::white)); p.flush(); p.end(); - QPixmap pixmap(picture.boundingRect().width(), picture.boundingRect().height()); - pixmap.fill(Qt::white); - QPainter p2(&pixmap); + TQPixmap pixmap(picture.boundingRect().width(), picture.boundingRect().height()); + pixmap.fill(TQt::white); + TQPainter p2(&pixmap); p2.drawPicture(-picture.boundingRect().x(), -picture.boundingRect().y(), picture); p2.flush(); p2.end(); - QImage image(pixmap.convertToImage()); + TQImage image(pixmap.convertToImage()); image.setAlphaBuffer(true); int h = image.height(), w = image.width(); - QRgb pixel; + TQRgb pixel; for(int r =0; r < h; r++) { for(int c =0; c < w; c++) { pixel = image.pixel(c, r); - image.setPixel(c, r, qRgba(0, 0, 0, 0xff - ((qRed(pixel) + qBlue(pixel) + qGreen(pixel))/ 3))); + image.setPixel(c, r, tqRgba(0, 0, 0, 0xff - ((tqRed(pixel) + tqBlue(pixel) + tqGreen(pixel))/ 3))); } } if(!image.save(filename, "PNG")) { @@ -5852,14 +5852,14 @@ void KQalculate::preferences() { void KQalculate::applyPreferences() { if(use_custom_result_font) { - QFont font(resultLabel->font()); + TQFont font(resultLabel->font()); font.fromString(custom_result_font); resultLabel->setFont(font); } else { resultLabel->unsetFont(); } if(use_custom_expression_font) { - QFont font(expressionEdit->font()); + TQFont font(expressionEdit->font()); font.fromString(custom_expression_font); expressionEdit->setFont(font); } else { @@ -5914,23 +5914,23 @@ void KQalculate::applyPreferences() { leftButtonsLayout->setSpacing(6); if(rpn_mode) executeButton->setText(i18n("Enter")); else executeButton->setText(i18n("=")); - executeButton->setIconSet(QIconSet()); + executeButton->setIconSet(TQIconSet()); storeButton->setText(i18n("Store")); - storeButton->setIconSet(QIconSet()); + storeButton->setIconSet(TQIconSet()); convertButton->setText(i18n("Convert")); - convertButton->setIconSet(QIconSet()); + convertButton->setIconSet(TQIconSet()); leftButtonsSeparator->show(); stackPageButtonsLayout->setSpacing(6); registerUpButton->setText(i18n("Up")); - registerUpButton->setIconSet(QIconSet()); + registerUpButton->setIconSet(TQIconSet()); registerDownButton->setText(i18n("Down")); - registerDownButton->setIconSet(QIconSet()); + registerDownButton->setIconSet(TQIconSet()); editRegisterButton->setText(i18n("Edit")); - editRegisterButton->setIconSet(QIconSet()); + editRegisterButton->setIconSet(TQIconSet()); deleteRegisterButton->setText(i18n("Delete")); - deleteRegisterButton->setIconSet(QIconSet()); + deleteRegisterButton->setIconSet(TQIconSet()); clearStackButton->setText(i18n("Clear")); - clearStackButton->setIconSet(QIconSet()); + clearStackButton->setIconSet(TQIconSet()); } updateButtonWidths(); } @@ -5938,7 +5938,7 @@ void KQalculate::applyPreferences() { void KQalculate::copyResult() { - QApplication::clipboard()->setText(result_history_text, QClipboard::Clipboard); + TQApplication::clipboard()->setText(result_history_text, TQClipboard::Clipboard); } void KQalculate::clearHistory() { @@ -5967,8 +5967,8 @@ void KQalculate::convertToBaseUnits() { } void KQalculate::applySetUnknowns(bool okclicked) { - QString str; - QString result_mod = ""; + TQString str; + TQString result_mod = ""; bool b = false; mstruct->set(*mstruct_before_unknowns); for(size_t i = 1; i <= unknowns_mstruct->size(); i++) { @@ -6028,11 +6028,11 @@ void KQalculate::setUnknowns() { return; } KDialogBase *dialog = new KDialogBase(this, 0, true, i18n("Set Unknowns")); - QObject::connect(dialog, SIGNAL(applyClicked()), this, SLOT(setUnknownsApplyClicked())); - QGrid *grid = dialog->makeGridMainWidget(2, Qt::Horizontal); + TQObject::connect(dialog, SIGNAL(applyClicked()), this, SLOT(setUnknownsApplyClicked())); + TQGrid *grid = dialog->makeGridMainWidget(2, TQt::Horizontal); unknowns_entries.clear(); for(size_t i = 1; i <= unknowns_mstruct->size(); i++) { - new QLabel(unknowns_mstruct->getChild(i)->print().c_str(), grid); + new TQLabel(unknowns_mstruct->getChild(i)->print().c_str(), grid); unknowns_entries.push_back(new KLineEdit(grid)); if(i == 1) unknowns_entries[0]->setFocus(); } @@ -6041,11 +6041,11 @@ void KQalculate::setUnknowns() { unknown_changed.clear(); unknown_changed.resize(unknowns_mstruct->size(), false); int response = dialog->exec(); - if(response == QDialog::Accepted) { + if(response == TQDialog::Accepted) { applySetUnknowns(true); } else { if(b_unknowns_changed) { - QString result_mod = ""; + TQString result_mod = ""; for(size_t i = 1; i <= unknowns_mstruct->size(); i++) { if(unknown_changed[i - 1]) { if(!result_mod.isEmpty()) { @@ -6073,7 +6073,7 @@ void KQalculate::manageDataSets() { if(!datasets_dialog) { datasets_dialog = new QalculateDataSetsDialog(); datasets_dialog->updateDataSetTree(); - QObject::connect(datasets_dialog, SIGNAL(dataSetsChanged()), this, SLOT(update_fmenu())); + TQObject::connect(datasets_dialog, SIGNAL(dataSetsChanged()), this, SLOT(update_fmenu())); } datasets_dialog->show(); } @@ -6089,9 +6089,9 @@ void KQalculate::manageUnits() { if(!units_dialog) { units_dialog = new QalculateUnitsDialog(); units_dialog->updateUnitTree(); - QObject::connect(units_dialog, SIGNAL(unitsChanged()), this, SLOT(update_umenus())); - QObject::connect(units_dialog, SIGNAL(insertRequest(Unit*)), this, SLOT(insertUnit(Unit*))); - QObject::connect(units_dialog, SIGNAL(convertRequest(Unit*)), this, SLOT(convertResult(Unit*))); + TQObject::connect(units_dialog, SIGNAL(unitsChanged()), this, SLOT(update_umenus())); + TQObject::connect(units_dialog, SIGNAL(insertRequest(Unit*)), this, SLOT(insertUnit(Unit*))); + TQObject::connect(units_dialog, SIGNAL(convertRequest(Unit*)), this, SLOT(convertResult(Unit*))); } units_dialog->show(); } @@ -6113,13 +6113,13 @@ void KQalculate::insertMatrixVector(const MathStructure *m, bool do_vector, bool if(!insert_matrix_dialog) { insert_matrix_dialog = new QalculateInsertMatrixVectorDialog(this); } - QString str = insert_matrix_dialog->editMatrixVector(m, do_vector, is_text_struct, is_result); + TQString str = insert_matrix_dialog->editMatrixVector(m, do_vector, is_text_struct, is_result); if(!str.isEmpty()) { insert_text(str); } } void KQalculate::insertMatrix() { - QString str = expressionEdit->selectedText().stripWhiteSpace(); + TQString str = expressionEdit->selectedText().stripWhiteSpace(); if(!str.isEmpty()) { MathStructure mstruct_sel; CALCULATOR->beginTemporaryStopMessages(); @@ -6133,7 +6133,7 @@ void KQalculate::insertMatrix() { insertMatrixVector(NULL, false); } void KQalculate::insertVector() { - QString str = expressionEdit->selectedText().stripWhiteSpace(); + TQString str = expressionEdit->selectedText().stripWhiteSpace(); if(!str.isEmpty()) { MathStructure mstruct_sel; CALCULATOR->beginTemporaryStopMessages(); @@ -6147,7 +6147,7 @@ void KQalculate::insertVector() { insertMatrixVector(NULL, true); } -void KQalculate::keyPressEvent(QKeyEvent *e) { +void KQalculate::keyPressEvent(TQKeyEvent *e) { KMainWindow::keyPressEvent(e); if(e->isAccepted()) return; if(close_to_systray && e->key() == Key_Escape && e->state() == 0) { @@ -6155,7 +6155,7 @@ void KQalculate::keyPressEvent(QKeyEvent *e) { hide(); return; } - if(!expressionEdit->hasFocus() && e->key() != Qt::Key_Control && e->key() != Qt::Key_Meta && e->key() != Qt::Key_Shift && e->key() != Qt::Key_Alt) { + if(!expressionEdit->hasFocus() && e->key() != TQt::Key_Control && e->key() != TQt::Key_Meta && e->key() != TQt::Key_Shift && e->key() != TQt::Key_Alt) { expressionEdit->setFocus(); expressionEdit->keyPressEvent(e); } @@ -6187,7 +6187,7 @@ void KQalculate::display_function_hint(MathFunction *f, int arg_index) { int iargs = f->maxargs(); Argument *arg; Argument default_arg; - QString str, str2, str3; + TQString str, str2, str3; const ExpressionName *ename = &f->preferredName(false, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) statusLabel_l); bool last_is_vctr = f->getArgumentDefinition(iargs) && f->getArgumentDefinition(iargs)->type() == ARGUMENT_TYPE_VECTOR; if(arg_index > iargs && iargs >= 0 && !last_is_vctr) { @@ -6219,7 +6219,7 @@ void KQalculate::display_function_hint(MathFunction *f, int arg_index) { } else { str2 = i18n("argument"); str2 += " "; - str2 += QString::number(i2); + str2 += TQString::number(i2); } if(i2 == arg_index) { if(arg) { @@ -6240,7 +6240,7 @@ void KQalculate::display_function_hint(MathFunction *f, int arg_index) { str += str2; str += "</b>"; if(i_reduced < 2) { - QSimpleRichText qsrt(str, statusLabel_l->font()); + TQSimpleRichText qsrt(str, statusLabel_l->font()); qsrt.setWidth(statusLabel_l->contentsRect().width() + 100); if(qsrt.widthUsed() > statusLabel_l->contentsRect().width() - 4) { str = ename->name.c_str(); @@ -6295,7 +6295,7 @@ void KQalculate::displayParseStatus() { evalops.parse_options.unended_function = &mfunc; CALCULATOR->beginTemporaryStopMessages(); if(pos < (int) expressionEdit->text().length()) { - QString str = expressionEdit->text(); + TQString str = expressionEdit->text(); str.truncate(pos); str_e = CALCULATOR->unlocalizeExpression(str.ascii(), evalops.parse_options); if(!CALCULATOR->separateToExpression(str_e, str_u, evalops)) { @@ -6375,7 +6375,7 @@ void KQalculate::displayParseStatus() { void KQalculate::editHistoryExpression() { if(current_history_index < inhistory.size()) { - QString text = inhistory[current_history_index]; + TQString text = inhistory[current_history_index]; text.replace("&", "&"); text.replace(">", ">"); text.replace("<", "<"); @@ -6386,7 +6386,7 @@ void KQalculate::editHistoryExpression() { } void KQalculate::editHistoryParse() { if(current_history_index < inhistory.size()) { - QString text = inhistory[current_history_index]; + TQString text = inhistory[current_history_index]; text.replace("&", "&"); text.replace(">", ">"); text.replace("<", "<"); @@ -6397,7 +6397,7 @@ void KQalculate::editHistoryParse() { } void KQalculate::editHistoryResult() { if(current_history_index < inhistory.size()) { - QString text = inhistory[current_history_index]; + TQString text = inhistory[current_history_index]; text.replace("&", "&"); text.replace(">", ">"); text.replace("<", "<"); @@ -6417,18 +6417,18 @@ void KQalculate::insertHistoryResultVariable() { } } -QalculateHistoryBrowser::QalculateHistoryBrowser(QWidget *parent, const char *name) : KTextBrowser(parent, name) {} +QalculateHistoryBrowser::QalculateHistoryBrowser(TQWidget *parent, const char *name) : KTextBrowser(parent, name) {} QalculateHistoryBrowser::~QalculateHistoryBrowser() {} -QPopupMenu *QalculateHistoryBrowser::createPopupMenu(const QPoint &pos) { +TQPopupMenu *QalculateHistoryBrowser::createPopupMenu(const TQPoint &pos) { - QPopupMenu *menu = KTextBrowser::createPopupMenu(pos); + TQPopupMenu *menu = KTextBrowser::createPopupMenu(pos); menu->insertSeparator(); mainWin->ActionClearHistory->plug(menu); - QString name = anchorAt(pos, Qt::AnchorName); + TQString name = anchorAt(pos, TQt::AnchorName); if(!name.isEmpty()) { int id = name.toInt(); - QValueVector<int>::size_type i = 0; + TQValueVector<int>::size_type i = 0; for(; i < inhistory_id.size(); i++) { if(inhistory_id[i] == id) { break; @@ -6466,14 +6466,14 @@ QPopupMenu *QalculateHistoryBrowser::createPopupMenu(const QPoint &pos) { } -QalculateParseLabel::QalculateParseLabel(QWidget *parent, const char *name) : QLabel(parent, name) { - QLabel::setText("<b>A</b>"); +QalculateParseLabel::QalculateParseLabel(TQWidget *parent, const char *name) : TQLabel(parent, name) { + TQLabel::setText("<b>A</b>"); bb = false; ec = false; wc = false; } QalculateParseLabel::~QalculateParseLabel() {} -void QalculateParseLabel::setText(QString text, bool break_begin, bool error_color, bool warning_color) { +void QalculateParseLabel::setText(TQString text, bool break_begin, bool error_color, bool warning_color) { bb = break_begin; ec = error_color; wc = warning_color; @@ -6482,30 +6482,30 @@ void QalculateParseLabel::setText(QString text, bool break_begin, bool error_col parsetext += "</nobr>"; update(); } -void QalculateParseLabel::drawContents(QPainter *p) { - QColorGroup cg = colorGroup(); +void QalculateParseLabel::drawContents(TQPainter *p) { + TQColorGroup cg = colorGroup(); if(ec) { - cg.setColor(QColorGroup::Text, status_error_color); + cg.setColor(TQColorGroup::Text, status_error_color); } else if(wc) { - cg.setColor(QColorGroup::Text, status_warning_color); + cg.setColor(TQColorGroup::Text, status_warning_color); } else if(backgroundMode() != PaletteBase && isEnabled()) { - cg.setColor(QColorGroup::Text, paletteForegroundColor()); + cg.setColor(TQColorGroup::Text, paletteForegroundColor()); } - QRect cr = contentsRect(); + TQRect cr = contentsRect(); cr.setX(cr.x() + 4); cr.setWidth(cr.width() - 4); - QSimpleRichText qsrt(parsetext, font()); + TQSimpleRichText qsrt(parsetext, font()); qsrt.setWidth(p, cr.width() + 100); if(qsrt.widthUsed() > cr.width()) { if(bb) { - QSimpleRichText qsrt_dots("...", font()); + TQSimpleRichText qsrt_dots("...", font()); qsrt_dots.draw(p, cr.x(), cr.y(), cr, cg, 0); cr.setX(cr.x() + qsrt_dots.widthUsed()); cr.setWidth(cr.width() - qsrt_dots.widthUsed()); qsrt.draw(p, cr.x() + cr.width() - qsrt.widthUsed(), cr.y(), cr, cg, 0); } else { - QSimpleRichText qsrt_dots("...", font()); + TQSimpleRichText qsrt_dots("...", font()); qsrt_dots.draw(p, cr.x() + cr.width() - qsrt_dots.widthUsed(), cr.y(), cr, cg, 0); cr.setWidth(cr.width() - qsrt_dots.widthUsed()); qsrt.draw(p, cr.x(), cr.y(), cr, cg, 0); @@ -6515,23 +6515,23 @@ void QalculateParseLabel::drawContents(QPainter *p) { } } -QalculateButton::QalculateButton(QWidget *parent, const char *name) : QPushButton(parent, name) { - setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)); +QalculateButton::QalculateButton(TQWidget *parent, const char *name) : TQPushButton(parent, name) { + setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum)); umtcw = true; #if KDE_VERSION_MAJOR > 3 || KDE_VERSION_MINOR >= 4 KAcceleratorManager::setNoAccel(this); #endif } -QalculateButton::QalculateButton(const QString &text, QWidget *parent, const char *name) : QPushButton(text, parent, name) { - setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)); +QalculateButton::QalculateButton(const TQString &text, TQWidget *parent, const char *name) : TQPushButton(text, parent, name) { + setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum)); umtcw = true; #if KDE_VERSION_MAJOR > 3 || KDE_VERSION_MINOR >= 4 KAcceleratorManager::setNoAccel(this); #endif } -QalculateButton::QalculateButton(const QIconSet &icon, const QString &text, QWidget *parent, const char *name) : QPushButton(icon, text, parent, name) { - setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)); +QalculateButton::QalculateButton(const TQIconSet &icon, const TQString &text, TQWidget *parent, const char *name) : TQPushButton(icon, text, parent, name) { + setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum)); umtcw = true; #if KDE_VERSION_MAJOR > 3 || KDE_VERSION_MINOR >= 4 KAcceleratorManager::setNoAccel(this); @@ -6542,19 +6542,19 @@ QalculateButton::~QalculateButton() {} void QalculateButton::setUseMinThreeCharWidth(bool b) { umtcw = b; } -void QalculateButton::setMarkup(const QString &str) { - QColorGroup cg(colorGroup()); - cg.setColor(QColorGroup::Text, paletteForegroundColor()); - QSimpleRichText rtext(str, font()); - QPicture picture; - QPainter p(&picture); - rtext.draw(&p, 0, 0, QRect(), cg); +void QalculateButton::setMarkup(const TQString &str) { + TQColorGroup cg(colorGroup()); + cg.setColor(TQColorGroup::Text, paletteForegroundColor()); + TQSimpleRichText rtext(str, font()); + TQPicture picture; + TQPainter p(&picture); + rtext.draw(&p, 0, 0, TQRect(), cg); p.flush(); p.end(); - QRect r = picture.boundingRect(); - QPixmap pixmap(r.width(), rtext.height()); + TQRect r = picture.boundingRect(); + TQPixmap pixmap(r.width(), rtext.height()); pixmap.fill(cg.background()); - QPainter p2(&pixmap); + TQPainter p2(&pixmap); p2.drawPicture(-r.x(), 0, picture); p2.flush(); p2.end(); @@ -6562,7 +6562,7 @@ void QalculateButton::setMarkup(const QString &str) { setPixmap(pixmap); } -QSize QalculateButton::sizeHint() const { +TQSize QalculateButton::sizeHint() const { constPolish(); @@ -6571,21 +6571,21 @@ QSize QalculateButton::sizeHint() const { #ifndef QT_NO_ICONSET if(iconSet() && !iconSet()->isNull()) { - w = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 10; - h = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height() + 10; - return QSize(w, h).expandedTo(QApplication::globalStrut()); + w = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 10; + h = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).height() + 10; + return TQSize(w, h).expandedTo(TQApplication::globalStrut()); } #endif - QSize sz; + TQSize sz; if(pixmap()) { - QPixmap *pm = (QPixmap *)pixmap(); + TQPixmap *pm = (TQPixmap *)pixmap(); w = pm->width(); h = pm->height(); if(umtcw) { - QFontMetrics fm = fontMetrics(); - sz = fm.size(ShowPrefix, QString::fromLatin1("XXX")); + TQFontMetrics fm = fontMetrics(); + sz = fm.size(ShowPrefix, TQString::fromLatin1("XXX")); if(w < sz.width()) w = sz.width(); if(w < sz.height()) w = sz.height(); } @@ -6594,9 +6594,9 @@ QSize QalculateButton::sizeHint() const { w += 12; h += 10; } else { - QFontMetrics fm = fontMetrics(); + TQFontMetrics fm = fontMetrics(); if(umtcw && (text().isEmpty() || text().length() < 3)) { - sz = fm.size(ShowPrefix, QString::fromLatin1("XXX")); + sz = fm.size(ShowPrefix, TQString::fromLatin1("XXX")); } else { sz = fm.size(ShowPrefix, text()); } @@ -6604,14 +6604,14 @@ QSize QalculateButton::sizeHint() const { h = sz.height() + 10; } - return QSize(w, h).boundedTo(style().sizeFromContents(QStyle::CT_PushButton, this, sz)).expandedTo(QApplication::globalStrut()); + return TQSize(w, h).boundedTo(style().sizeFromContents(TQStyle::CT_PushButton, this, sz)).expandedTo(TQApplication::globalStrut()); } -QalculateStyleSheet::QalculateStyleSheet(QObject *parent, const char *name) : QStyleSheet(parent, name) {} +QalculateStyleSheet::QalculateStyleSheet(TQObject *parent, const char *name) : TQStyleSheet(parent, name) {} QalculateStyleSheet::~QalculateStyleSheet() {} -void QalculateStyleSheet::scaleFont(QFont &font, int logicalSize) const { +void QalculateStyleSheet::scaleFont(TQFont &font, int logicalSize) const { if(logicalSize <= 1) { font.setPixelSize(1); @@ -6652,10 +6652,10 @@ void QalculateStyleSheet::scaleFont(QFont &font, int logicalSize) const { } -QalculateRPNStackListView::QalculateRPNStackListView(QWidget *parent, const char *name) : KListView(parent, name) {} +QalculateRPNStackListView::QalculateRPNStackListView(TQWidget *parent, const char *name) : KListView(parent, name) {} QalculateRPNStackListView::~QalculateRPNStackListView() {} -void QalculateRPNStackListView::keyPressEvent(QKeyEvent *e) { +void QalculateRPNStackListView::keyPressEvent(TQKeyEvent *e) { switch(e->key()) { case Key_Prior: {} case Key_Next: {} |