summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/buttonwithindexsignal.cpp2
-rw-r--r--src/buttonwithindexsignal.h6
-rw-r--r--src/kqalculate.cpp1030
-rw-r--r--src/kqalculate.h148
-rw-r--r--src/main.cpp62
-rw-r--r--src/preferences.cpp58
-rw-r--r--src/qalculate_tde_utils.cpp30
-rw-r--r--src/qalculate_tde_utils.h16
-rw-r--r--src/qalculatebuttonwithdata.cpp8
-rw-r--r--src/qalculatebuttonwithdata.h8
-rw-r--r--src/qalculateconvertnumberbasesdialog.cpp42
-rw-r--r--src/qalculateconvertnumberbasesdialog.h10
-rw-r--r--src/qalculateconvertunitsdialog.cpp38
-rw-r--r--src/qalculateconvertunitsdialog.h12
-rw-r--r--src/qalculatedatasetsdialog.cpp134
-rw-r--r--src/qalculatedatasetsdialog.h24
-rw-r--r--src/qalculatedecimalsdialog.cpp24
-rw-r--r--src/qalculatedecimalsdialog.h6
-rw-r--r--src/qalculateeditdataobjectdialog.cpp32
-rw-r--r--src/qalculateeditdataobjectdialog.h2
-rw-r--r--src/qalculateeditdatasetdialog.cpp186
-rw-r--r--src/qalculateeditdatasetdialog.h58
-rw-r--r--src/qalculateeditfunctiondialog.cpp196
-rw-r--r--src/qalculateeditfunctiondialog.h48
-rw-r--r--src/qalculateeditmatrixvectordialog.cpp108
-rw-r--r--src/qalculateeditmatrixvectordialog.h30
-rw-r--r--src/qalculateeditnamesdialog.cpp64
-rw-r--r--src/qalculateeditnamesdialog.h26
-rw-r--r--src/qalculateeditunitdialog.cpp94
-rw-r--r--src/qalculateeditunitdialog.h26
-rw-r--r--src/qalculateeditunknownvariabledialog.cpp54
-rw-r--r--src/qalculateeditunknownvariabledialog.h18
-rw-r--r--src/qalculateeditvariabledialog.cpp56
-rw-r--r--src/qalculateeditvariabledialog.h20
-rw-r--r--src/qalculateexportcsvdialog.cpp30
-rw-r--r--src/qalculateexportcsvdialog.h6
-rw-r--r--src/qalculateexpressionedit.cpp140
-rw-r--r--src/qalculateexpressionedit.h42
-rw-r--r--src/qalculatefunctionsdialog.cpp66
-rw-r--r--src/qalculatefunctionsdialog.h32
-rw-r--r--src/qalculateimportcsvdialog.cpp64
-rw-r--r--src/qalculateimportcsvdialog.h16
-rw-r--r--src/qalculateinsertfunctiondialog.cpp90
-rw-r--r--src/qalculateinsertfunctiondialog.h12
-rw-r--r--src/qalculateinsertmatrixvectordialog.cpp90
-rw-r--r--src/qalculateinsertmatrixvectordialog.h30
-rw-r--r--src/qalculateperiodictabledialog.cpp162
-rw-r--r--src/qalculateperiodictabledialog.h10
-rw-r--r--src/qalculateplotdialog.cpp184
-rw-r--r--src/qalculateplotdialog.h54
-rw-r--r--src/qalculateprecisiondialog.cpp22
-rw-r--r--src/qalculateprecisiondialog.h6
-rw-r--r--src/qalculatepreferencesdialog.cpp176
-rw-r--r--src/qalculatepreferencesdialog.h14
-rw-r--r--src/qalculateresultdisplay.cpp124
-rw-r--r--src/qalculateresultdisplay.h32
-rw-r--r--src/qalculatesetbasedialog.cpp48
-rw-r--r--src/qalculatesetbasedialog.h10
-rw-r--r--src/qalculateunitsdialog.cpp92
-rw-r--r--src/qalculateunitsdialog.h48
-rw-r--r--src/qalculatevariablesdialog.cpp68
-rw-r--r--src/qalculatevariablesdialog.h32
62 files changed, 2188 insertions, 2188 deletions
diff --git a/src/buttonwithindexsignal.cpp b/src/buttonwithindexsignal.cpp
index 34fe66e..c2bbeef 100644
--- a/src/buttonwithindexsignal.cpp
+++ b/src/buttonwithindexsignal.cpp
@@ -19,7 +19,7 @@
***************************************************************************/
#include "buttonwithindexsignal.h"
-ButtonWithIndexSignal::ButtonWithIndexSignal(const QString & text, int index, QWidget *parent, const char *name) : QPushButton(text, parent, name) {
+ButtonWithIndexSignal::ButtonWithIndexSignal(const TQString & text, int index, TQWidget *parent, const char *name) : TQPushButton(text, parent, name) {
i = index;
connect(this, SIGNAL(clicked()), this, SLOT(emitClickedWithIndex()));
}
diff --git a/src/buttonwithindexsignal.h b/src/buttonwithindexsignal.h
index 0c0fcfe..53955db 100644
--- a/src/buttonwithindexsignal.h
+++ b/src/buttonwithindexsignal.h
@@ -20,13 +20,13 @@
#ifndef BUTTONWITHINDEXSIGNAL_H
#define BUTTONWITHINDEXSIGNAL_H
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
-class ButtonWithIndexSignal : public QPushButton {
+class ButtonWithIndexSignal : public TQPushButton {
Q_OBJECT
public:
- ButtonWithIndexSignal(const QString & text, int index, QWidget *parent = 0, const char *name = 0);
+ ButtonWithIndexSignal(const TQString & text, int index, TQWidget *parent = 0, const char *name = 0);
virtual ~ButtonWithIndexSignal();
int i;
public slots:
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 += "&nbsp;&nbsp;= ";
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("&", "&amp;");
text2.replace(">", "&gt;");
text2.replace("<", "&lt;");
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 = "&nbsp;&nbsp;";
+ TQString str = "&nbsp;&nbsp;";
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("&", "&amp;");
str2.replace(">", "&gt;");
str2.replace("<", "&lt;");
@@ -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("&", "&amp;");
str2.replace(">", "&gt;");
str2.replace("<", "&lt;");
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("&", "&amp;");
text.replace(">", "&gt;");
text.replace("<", "&lt;");
@@ -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("&amp;", "&");
text.replace("&gt;", ">");
text.replace("&lt;", "<");
@@ -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("&amp;", "&");
text.replace("&gt;", ">");
text.replace("&lt;", "<");
@@ -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("&amp;", "&");
text.replace("&gt;", ">");
text.replace("&lt;", "<");
@@ -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: {}
diff --git a/src/kqalculate.h b/src/kqalculate.h
index fb016e0..2e74f14 100644
--- a/src/kqalculate.h
+++ b/src/kqalculate.h
@@ -21,12 +21,12 @@
#ifndef KQALCULATE_H
#define KQALCULATE_H
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kmainwindow.h>
-#include <qvaluevector.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qstylesheet.h>
+#include <tqvaluevector.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqstylesheet.h>
#include <ktextbrowser.h>
#include <klistview.h>
#include <kdialogbase.h>
@@ -52,15 +52,15 @@ class QalculateConvertUnitsDialog;
class KAction;
class KRadioAction;
class KToggleAction;
-class QToolBar;
-class QPopupMenu;
+class TQToolBar;
+class TQPopupMenu;
class KPushButton;
class QalculateExpressionEdit;
class QalculateResultDisplay;
-class QFrame;
-class QWidgetStack;
-class QWidget;
-class QComboBox;
+class TQFrame;
+class TQWidgetStack;
+class TQWidget;
+class TQComboBox;
class QalculateHistoryBrowser;
class QalculateConvertNumberBasesDialog;
class QalculatePeriodicTableDialog;
@@ -74,14 +74,14 @@ class QalculatePreferencesDialog;
class QalculateInsertMatrixVectorDialog;
class KSystemTray;
class QalculateParseLabel;
-class QButtonGroup;
-class QRadioButton;
+class TQButtonGroup;
+class TQRadioButton;
class QalculateButton;
-class QVBoxLayout;
+class TQVBoxLayout;
class KSeparator;
class KUniqueApplication;
class KConfig;
-class QListViewItem;
+class TQListViewItem;
class QalculateRPNStackListView;
class KGlobalAccel;
class KKeyButton;
@@ -95,7 +95,7 @@ enum {
};
-class ModeObject : public QObject {
+class ModeObject : public TQObject {
Q_OBJECT
@@ -123,7 +123,7 @@ public:
void setAssumptionsMenu();
void setModeActions();
void execute_expression(bool force = true);
- void setResult(Prefix *prefix = NULL, bool update_history = true, bool update_parse = false, bool force = false, QString transformation = "", size_t stack_index = 0, bool register_moved = false);
+ void setResult(Prefix *prefix = NULL, bool update_history = true, bool update_parse = false, bool force = false, TQString transformation = "", size_t stack_index = 0, bool register_moved = false);
void executeCommand(int command_type);
void result_display_updated();
void result_format_updated();
@@ -131,7 +131,7 @@ public:
void result_prefix_changed(Prefix *prefix = NULL);
void expression_calculation_updated();
void expression_format_updated(bool recalculate = false);
- void display_errors(QString *new_text = NULL, int *inhistory_index = NULL);
+ void display_errors(TQString *new_text = NULL, int *inhistory_index = NULL);
void update_status_text();
void display_function_hint(MathFunction *f, int arg_index = 1);
void clearresult();
@@ -148,7 +148,7 @@ public:
void unit_inserted(Unit *object);
void updateStatusLabelFonts();
void set_unicode_buttons();
- void insertButtonFunction(QString text, bool append_space = true);
+ void insertButtonFunction(TQString text, bool append_space = true);
void insertButtonFunction(MathFunction *f);
const MathStructure *getResultPart(int);
void insertMatrixVector(const MathStructure *m = NULL, bool do_vector = false, bool is_text_struct = false, bool is_result = false);
@@ -156,9 +156,9 @@ public:
void calculateRPN(int op);
void calculateRPN(MathFunction *f);
void RPNStackEnter(Variable *v);
- void RPNRegisterAdded(const QString &text, size_t index = 0);
+ void RPNRegisterAdded(const TQString &text, size_t index = 0);
void RPNRegisterRemoved(size_t index);
- void RPNRegisterChanged(const QString &text, size_t index = 0);
+ void RPNRegisterChanged(const TQString &text, size_t index = 0);
QalculateInsertMatrixVectorDialog *insert_matrix_dialog;
QalculatePrecisionDialog *precisionDialog;
@@ -181,42 +181,42 @@ public:
QalculatePlotDialog *plot_dialog;
QalculateSetBaseDialog *set_base_dialog;
QalculatePreferencesDialog *preferences_dialog;
- QMap <int, Variable*> menu_variables_ids;
- QMap <int, MathFunction*> menu_functions_ids;
- QMap <int, Unit*> menu_units_ids, menu_to_unit_ids;
- QMap <int, Prefix*> menu_units_prefixes_ids, menu_set_prefix_ids;
- QValueVector<int> recent_function_ids;
- QValueVector<int> recent_variable_ids;
- QValueVector<int> recent_unit_ids;
+ TQMap <int, Variable*> menu_variables_ids;
+ TQMap <int, MathFunction*> menu_functions_ids;
+ TQMap <int, Unit*> menu_units_ids, menu_to_unit_ids;
+ TQMap <int, Prefix*> menu_units_prefixes_ids, menu_set_prefix_ids;
+ TQValueVector<int> recent_function_ids;
+ TQValueVector<int> recent_variable_ids;
+ TQValueVector<int> recent_unit_ids;
QalculateRPNStackListView *stackList;
- QVBoxLayout *stackPageButtonsLayout;
+ TQVBoxLayout *stackPageButtonsLayout;
QalculateButton *registerUpButton, *registerDownButton, *deleteRegisterButton, *editRegisterButton, *clearStackButton;
- QPopupMenu *stackMenu;
+ TQPopupMenu *stackMenu;
KUniqueApplication *m_parent;
KSystemTray *trayicon;
QalculateButton *executeButton, *storeButton, *convertButton;
QalculateButton *functionsButton;
- QVBoxLayout *leftButtonsLayout;
+ TQVBoxLayout *leftButtonsLayout;
KSeparator *leftButtonsSeparator;
QalculateExpressionEdit* expressionEdit;
- QLabel *statusLabel_r;
+ TQLabel *statusLabel_r;
QalculateParseLabel *statusLabel_l;
QalculateResultDisplay* resultLabel;
- QWidgetStack* mainStack;
- QFrame *bottomLine;
- QWidget *keypadPage, *historyPage, *stackPage;
- QComboBox* kpNumericCombo, *kpBaseCombo;
- QRadioButton *kpDegreesButton, *kpRadiansButton, *kpGradiansButton, *kpNoAngleUnitButton;
- QButtonGroup *kpAngleGroup;
- QPushButton *kpExact, *kpFraction;
+ TQWidgetStack* mainStack;
+ TQFrame *bottomLine;
+ TQWidget *keypadPage, *historyPage, *stackPage;
+ TQComboBox* kpNumericCombo, *kpBaseCombo;
+ TQRadioButton *kpDegreesButton, *kpRadiansButton, *kpGradiansButton, *kpNoAngleUnitButton;
+ TQButtonGroup *kpAngleGroup;
+ TQPushButton *kpExact, *kpFraction;
QalculateButton *kpSquare, *kpLog, *kpHyp, *kpSqrt, *kpCos, *kpRaise, *kpInv, *kpSin;
QalculateButton *kpTan, *kpLn, *kpFactorial, *kpMod, *kpAns, *kp8, *kp0, *kp7, *kpDel, *kpDot, *kp5, *kpEquals, *kpClear;
QalculateButton *kp3, *kp1, *kp4, *kp9, *kpDivision, *kpExp, *kp6, *kp2, *kpMinus, *kpTimes, *kpPlus;
QalculateHistoryBrowser *historyBrowser;
- QPushButton *historyButton, *keypadButton, *stackButton;
+ TQPushButton *historyButton, *keypadButton, *stackButton;
KMenuBar *menubar;
- QPopupMenu *menu_functions, *menu_variables, *menu_units, *menu_to_unit, *menu_set_prefix, *menu_modes;
+ TQPopupMenu *menu_functions, *menu_variables, *menu_units, *menu_to_unit, *menu_set_prefix, *menu_modes;
KToggleAction *ActionAbbreviateNames, *ActionReadPrecision, *ActionNonZeroDenominators, *ActionWarnAboutDenominatorsAssumedNonZero;
KToggleAction *ActionLimitImplicitMultiplication, *ActionRPNMode, *ActionRPNSyntax, *ActionIndicateInfiniteSeries, *ActionNegativeExponents, *ActionSortMinusLast;
KToggleAction *ActionShowEndingZeroes, *ActionRoundHalfwayNumbersToEven, *ActionEnablePrefixes;
@@ -250,8 +250,8 @@ public:
KGlobalAccel *globalAccel;
- QValueVector<int>::size_type current_history_index;
- QValueVector<ModeObject*> mode_objects;
+ TQValueVector<int>::size_type current_history_index;
+ TQValueVector<ModeObject*> mode_objects;
public slots:
@@ -266,13 +266,13 @@ public slots:
void update_vmenu();
void update_umenus();
void insertVariable(Variable*);
- void insertFunction(MathFunction*, QWidget *parent);
- void applyFunction(MathFunction*, QWidget *parent);
+ void insertFunction(MathFunction*, TQWidget *parent);
+ void applyFunction(MathFunction*, TQWidget *parent);
void onExpressionChanged();
void onErrorTimeout();
bool fetch_exchange_rates(int);
void update_completion();
- void insert_text(QString);
+ void insert_text(TQString);
void aboutToQuit();
void onVariableMenuItemActivated(int);
void onFunctionMenuItemActivated(int);
@@ -449,10 +449,10 @@ public slots:
void deleteRegister();
void editRegister();
void updateRPNIndexes();
- QListViewItem *getRPNRegister(size_t index);
+ TQListViewItem *getRPNRegister(size_t index);
void stackRegisterMoved();
- void stackRegisterSet(QListViewItem*);
- void popupStackMenu(KListView*, QListViewItem*, const QPoint&);
+ void stackRegisterSet(TQListViewItem*);
+ void popupStackMenu(KListView*, TQListViewItem*, const TQPoint&);
void registerSelected();
void editHistoryExpression();
void editHistoryParse();
@@ -464,13 +464,13 @@ protected:
void updateButtonWidths();
void applySetUnknowns(bool okclicked);
bool b_unknowns_changed;
- QValueVector<bool> unknown_changed;
+ TQValueVector<bool> unknown_changed;
MathStructure *mstruct_before_unknowns, *unknowns_mstruct;
- QValueVector<KLineEdit*> unknowns_entries;
+ TQValueVector<KLineEdit*> unknowns_entries;
bool queryClose();
- QString parsed_expression;
- void keyPressEvent(QKeyEvent *e);
- void fontChange(const QFont &old_font);
+ TQString parsed_expression;
+ void keyPressEvent(TQKeyEvent *e);
+ void fontChange(const TQFont &old_font);
void saveProperties(KConfig *cfg);
void readProperties(KConfig *cfg);
@@ -488,48 +488,48 @@ class QalculateHistoryBrowser : public KTextBrowser {
public:
- QalculateHistoryBrowser(QWidget *parent, const char *name);
+ QalculateHistoryBrowser(TQWidget *parent, const char *name);
~QalculateHistoryBrowser();
protected:
- QPopupMenu *createPopupMenu(const QPoint &pos);
+ TQPopupMenu *createPopupMenu(const TQPoint &pos);
};
-class QalculateParseLabel : public QLabel {
+class QalculateParseLabel : public TQLabel {
Q_OBJECT
public:
- QalculateParseLabel(QWidget *parent = 0, const char *name = 0);
+ QalculateParseLabel(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateParseLabel();
- void setText(QString text, bool break_begin, bool error_color, bool warning_color);
+ void setText(TQString text, bool break_begin, bool error_color, bool warning_color);
protected:
- QString parsetext;
+ TQString parsetext;
bool bb, ec, wc;
- void drawContents(QPainter *p);
+ void drawContents(TQPainter *p);
};
-class QalculateButton : public QPushButton {
+class QalculateButton : public TQPushButton {
Q_OBJECT
public:
- QalculateButton(QWidget *parent = 0, const char *name = 0);
- QalculateButton(const QString &text, QWidget *parent = 0, const char *name = 0);
- QalculateButton(const QIconSet &icon, const QString &text, QWidget *parent = 0, const char *name = 0);
+ QalculateButton(TQWidget *parent = 0, const char *name = 0);
+ QalculateButton(const TQString &text, TQWidget *parent = 0, const char *name = 0);
+ QalculateButton(const TQIconSet &icon, const TQString &text, TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateButton();
void setUseMinThreeCharWidth(bool b);
- void setMarkup(const QString &str);
- QSize sizeHint() const;
+ void setMarkup(const TQString &str);
+ TQSize sizeHint() const;
private:
@@ -537,16 +537,16 @@ private:
};
-class QalculateStyleSheet : public QStyleSheet {
+class QalculateStyleSheet : public TQStyleSheet {
Q_OBJECT
public:
- QalculateStyleSheet(QObject *parent = 0, const char *name = 0);
+ QalculateStyleSheet(TQObject *parent = 0, const char *name = 0);
virtual ~QalculateStyleSheet();
- void scaleFont(QFont &font, int logicalSize) const;
+ void scaleFont(TQFont &font, int logicalSize) const;
};
@@ -556,12 +556,12 @@ class QalculateRPNStackListView : public KListView {
public:
- QalculateRPNStackListView(QWidget *parent = 0, const char *name = 0);
+ QalculateRPNStackListView(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateRPNStackListView();
protected:
- void keyPressEvent(QKeyEvent *e);
+ void keyPressEvent(TQKeyEvent *e);
};
@@ -576,10 +576,10 @@ class QalculateModeDialog : public KDialogBase {
public:
- QalculateModeDialog(QWidget *parent);
+ QalculateModeDialog(TQWidget *parent);
virtual ~QalculateModeDialog();
- QString modeName();
+ TQString modeName();
const KShortcut &modeShortcut();
public slots:
diff --git a/src/main.cpp b/src/main.cpp
index 4524ce3..b7f36e7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -30,13 +30,13 @@
#include <kcmdlineargs.h>
#include <klocale.h>
#include <unistd.h>
-#include <qtextcodec.h>
-#include <qobject.h>
+#include <tqtextcodec.h>
+#include <tqobject.h>
#include <kmessagebox.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <klineedit.h>
-#include <qtooltip.h>
-#include <qclipboard.h>
+#include <tqtooltip.h>
+#include <tqclipboard.h>
#include "qalculateexpressionedit.h"
#include "qalculateresultdisplay.h"
@@ -55,9 +55,9 @@ static KCmdLineOptions options[] = {
extern KnownVariable *vans[5];
extern MathStructure *mstruct, *matrix_mstruct, *parsed_mstruct, *parsed_tostruct;
-extern QString result_text, result_history_text, parsed_text;
-extern QWidget *expressionWidget, *resultWidget, *statusWidget_l;
-extern QWidget *topWidget;
+extern TQString result_text, result_history_text, parsed_text;
+extern TQWidget *expressionWidget, *resultWidget, *statusWidget_l;
+extern TQWidget *topWidget;
extern KQalculate *mainWin;
extern bool load_global_defs, fetch_exchange_rates_at_startup, first_time, first_qalculate_run;
@@ -70,15 +70,15 @@ extern pthread_t view_thread, command_thread;
extern pthread_attr_t view_thread_attr, command_thread_attr;
extern bool command_thread_started;
-extern QValueVector<QString> recent_functions_pre;
-extern QValueVector<QString> recent_variables_pre;
-extern QValueVector<QString> recent_units_pre;
+extern TQValueVector<TQString> recent_functions_pre;
+extern TQValueVector<TQString> recent_variables_pre;
+extern TQValueVector<TQString> recent_units_pre;
-QTimer *error_timer;
+TQTimer *error_timer;
void create_qalculate_window(KUniqueApplication *parent) {
- QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf8"));
+ TQTextCodec::setCodecForCStrings(TQTextCodec::codecForName("utf8"));
b_busy = false;
@@ -99,18 +99,18 @@ void create_qalculate_window(KUniqueApplication *parent) {
mainWin = new KQalculate(parent);
topWidget = mainWin;
- expressionWidget = (QWidget*) mainWin->expressionEdit;
- resultWidget = (QWidget*) mainWin->resultLabel;
- statusWidget_l = (QWidget*) mainWin->statusLabel_l;
+ expressionWidget = (TQWidget*) mainWin->expressionEdit;
+ resultWidget = (TQWidget*) mainWin->resultLabel;
+ statusWidget_l = (TQWidget*) mainWin->statusLabel_l;
}
-QString parse_expression_arguments(KCmdLineArgs *args) {
- QString calc_arg;
+TQString parse_expression_arguments(KCmdLineArgs *args) {
+ TQString calc_arg;
if(args->isSet("clipboard")) {
- calc_arg = qApp->clipboard()->text(QClipboard::Selection);
+ calc_arg = tqApp->clipboard()->text(TQClipboard::Selection);
if(calc_arg.isEmpty()) {
- calc_arg = qApp->clipboard()->text(QClipboard::Clipboard);
+ calc_arg = tqApp->clipboard()->text(TQClipboard::Clipboard);
}
} else {
for(int i = 0; i < args->count(); i++) {
@@ -126,7 +126,7 @@ QString parse_expression_arguments(KCmdLineArgs *args) {
void start_qalculate() {
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
- QString calc_arg = parse_expression_arguments(args);
+ TQString calc_arg = parse_expression_arguments(args);
args->clear();
if(!calc_arg.isEmpty()) {
mainWin->expressionEdit->setText(calc_arg);
@@ -136,18 +136,18 @@ void start_qalculate() {
mainWin->resultLabel->setText("<div align=\"right\"><font size=2>&nbsp;<br></font><font size=6>= 0</font></div>");
}
- qApp->processEvents();
+ tqApp->processEvents();
//exchange rates
if(first_qalculate_run) {
if(KMessageBox::questionYesNo(mainWin, i18n("You need to download exchange rates to be able to convert between different currencies. You can later get current exchange rates by selecting \"Update Exchange Rates\" under the File menu.\n\nDo you want to fetch exchange rates now from the Internet?"), i18n("Update exchange rates?")) == KMessageBox::Yes) {
- qApp->processEvents();
+ tqApp->processEvents();
mainWin->fetch_exchange_rates(5);
}
- qApp->processEvents();
+ tqApp->processEvents();
} else if(fetch_exchange_rates_at_startup) {
mainWin->fetch_exchange_rates(5);
- qApp->processEvents();
+ tqApp->processEvents();
}
CALCULATOR->loadExchangeRates();
@@ -164,15 +164,15 @@ void start_qalculate() {
//load global definitions
if(load_global_defs && !CALCULATOR->loadGlobalDefinitions()) {
KMessageBox::error(mainWin, i18n("Failed to load global definitions!"), i18n("Error"));
- qApp->processEvents();
+ tqApp->processEvents();
}
//load local definitions
CALCULATOR->loadLocalDefinitions();
//check for calculation errros regularly
- error_timer = new QTimer(mainWin);
- QObject::connect(error_timer, SIGNAL(timeout()), mainWin, SLOT(onErrorTimeout()));
+ error_timer = new TQTimer(mainWin);
+ TQObject::connect(error_timer, SIGNAL(timeout()), mainWin, SLOT(onErrorTimeout()));
generate_units_tree_struct();
generate_functions_tree_struct();
@@ -211,8 +211,8 @@ void start_qalculate() {
pthread_attr_init(&command_thread_attr);
command_thread_started = false;
- QObject::connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit()));
- QObject::connect(qApp, SIGNAL(aboutToQuit()), mainWin, SLOT(aboutToQuit()));
+ TQObject::connect(tqApp, SIGNAL(lastWindowClosed()), tqApp, SLOT(quit()));
+ TQObject::connect(tqApp, SIGNAL(aboutToQuit()), mainWin, SLOT(aboutToQuit()));
error_timer->start(100);
@@ -235,7 +235,7 @@ public:
if(mainWin && started) {
KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
- QString calc_arg = parse_expression_arguments(args);
+ TQString calc_arg = parse_expression_arguments(args);
args->clear();
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
diff --git a/src/preferences.cpp b/src/preferences.cpp
index 0803552..7d768ec 100644
--- a/src/preferences.cpp
+++ b/src/preferences.cpp
@@ -31,11 +31,11 @@
#include <dirent.h>
#include <stdio.h>
#include <klocale.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <ktextbrowser.h>
-#include <qwidgetstack.h>
-#include <qpushbutton.h>
-#include <qvaluevector.h>
+#include <tqwidgetstack.h>
+#include <tqpushbutton.h>
+#include <tqvaluevector.h>
PrintOptions printops;
EvaluationOptions evalops;
@@ -44,8 +44,8 @@ bool rpn_keypad_only;
bool load_global_defs, fetch_exchange_rates_at_startup, first_time, first_qalculate_run, save_mode_on_exit, save_defs_on_exit;
bool use_custom_result_font, use_custom_expression_font, use_custom_status_font;
int use_icon_buttons;
-QString custom_result_font, custom_expression_font, custom_status_font;
-QColor status_warning_color, status_error_color;
+TQString custom_result_font, custom_expression_font, custom_status_font;
+TQColor status_warning_color, status_error_color;
bool display_expression_status;
bool close_to_systray;
@@ -54,41 +54,41 @@ bool enable_expression_completion;
PlotLegendPlacement default_plot_legend_placement;
bool default_plot_display_grid;
bool default_plot_full_border;
-QString default_plot_min;
-QString default_plot_max;
-QString default_plot_step;
+TQString default_plot_min;
+TQString default_plot_max;
+TQString default_plot_step;
int default_plot_sampling_rate;
bool default_plot_use_sampling_rate;
bool default_plot_rows;
int default_plot_type;
PlotStyle default_plot_style;
PlotSmoothing default_plot_smoothing;
-QString default_plot_variable;
+TQString default_plot_variable;
bool default_plot_color;
bool enable_plot_expression_completion;
bool canplot;
-QString initial_history;
+TQString initial_history;
extern vector<MathFunction*> recent_functions;
extern vector<Variable*> recent_variables;
extern vector<Unit*> recent_units;
-QValueVector<QString> recent_functions_pre;
-QValueVector<QString> recent_variables_pre;
-QValueVector<QString> recent_units_pre;
+TQValueVector<TQString> recent_functions_pre;
+TQValueVector<TQString> recent_variables_pre;
+TQValueVector<TQString> recent_units_pre;
-extern QWidget *expressionWidget;
+extern TQWidget *expressionWidget;
extern KQalculate *mainWin;
-QStringList expression_history;
+TQStringList expression_history;
bool show_keypad, show_history, show_stack;
vector<mode_struct> modes;
-QValueVector<QString> inhistory;
-QValueVector<int> inhistory_type;
-QValueVector<int> inhistory_id;
+TQValueVector<TQString> inhistory;
+TQValueVector<int> inhistory_type;
+TQValueVector<int> inhistory_id;
int inhistory_current_id;
/*
@@ -111,7 +111,7 @@ void set_saved_mode() {
modes[1].rpn_mode = rpn_mode;
}
-size_t save_mode_as(QString name, bool *new_mode) {
+size_t save_mode_as(TQString name, bool *new_mode) {
name = name.stripWhiteSpace();
size_t index = 0;
for(; index < modes.size(); index++) {
@@ -250,7 +250,7 @@ void load_preferences() {
file = fopen(filename.c_str(), "r");
if(file) {
char line[10000];
- QString stmp, svalue, svar;
+ TQString stmp, svalue, svar;
int i;
int v;
while(true) {
@@ -633,7 +633,7 @@ void load_preferences() {
if(stmp == "Mode") {
mode_index = 1;
} else if(stmp.length() > 5) {
- QString svar = stmp;
+ TQString svar = stmp;
svar.truncate(4);
if(svar == "Mode") {
stmp.remove(0, 5);
@@ -645,7 +645,7 @@ void load_preferences() {
inhistory_current_id = (int) inhistory.size();
int id = inhistory_current_id;
id--;
- for(QValueVector<QString>::size_type i = 0; i < inhistory.size(); i++) {
+ for(TQValueVector<TQString>::size_type i = 0; i < inhistory.size(); i++) {
inhistory_id.push_back(id);
id--;
}
@@ -695,17 +695,17 @@ void save_preferences(bool mode) {
fprintf(file, "custom_result_font=%s\n", custom_result_font.ascii());
fprintf(file, "custom_expression_font=%s\n", custom_expression_font.ascii());
fprintf(file, "custom_status_font=%s\n", custom_status_font.ascii());
- if(status_error_color != QColor("red")) fprintf(file, "status_error_color=%s\n", status_error_color.name().ascii());
- if(status_warning_color != QColor("blue")) fprintf(file, "status_warning_color=%s\n", status_warning_color.name().ascii());
+ if(status_error_color != TQColor("red")) fprintf(file, "status_error_color=%s\n", status_error_color.name().ascii());
+ if(status_warning_color != TQColor("blue")) fprintf(file, "status_warning_color=%s\n", status_warning_color.name().ascii());
fprintf(file, "multiplication_sign=%i\n", printops.multiplication_sign);
fprintf(file, "division_sign=%i\n", printops.division_sign);
- for (QStringList::Iterator it = ((QalculateExpressionEdit*) expressionWidget)->expression_history.begin(); it != ((QalculateExpressionEdit*) expressionWidget)->expression_history.end(); ++it) {
+ for (TQStringList::Iterator it = ((QalculateExpressionEdit*) expressionWidget)->expression_history.begin(); it != ((QalculateExpressionEdit*) expressionWidget)->expression_history.end(); ++it) {
fprintf(file, "expression_history=%s\n", (*it).ascii());
}
int lines = 50;
bool end_after_result = false;
bool doend = false;
- for(QValueVector<QString>::size_type i = 0; i < inhistory.size() && !doend; i++) {
+ for(TQValueVector<TQString>::size_type i = 0; i < inhistory.size() && !doend; i++) {
switch(inhistory_type[i]) {
case QALCULATE_HISTORY_EXPRESSION: {
fprintf(file, "history_expression=");
@@ -763,8 +763,8 @@ void save_preferences(bool mode) {
if(inhistory[i].find("<br>") < 0) {
fprintf(file, "%s\n", inhistory[i].ascii());
} else {
- QStringList slist = QStringList::split("<br>", inhistory[i], true);
- for(QStringList::size_type i2 = 0; i2 < slist.size(); i2++) {
+ TQStringList slist = TQStringList::split("<br>", inhistory[i], true);
+ for(TQStringList::size_type i2 = 0; i2 < slist.size(); i2++) {
if(i2 == 0) fprintf(file, "%s\n", slist[i2].ascii());
else fprintf(file, "history_continued=%s\n", slist[i2].ascii());
}
diff --git a/src/qalculate_tde_utils.cpp b/src/qalculate_tde_utils.cpp
index 7a52429..fb34e9a 100644
--- a/src/qalculate_tde_utils.cpp
+++ b/src/qalculate_tde_utils.cpp
@@ -19,12 +19,12 @@
***************************************************************************/
#include "qalculate_tde_utils.h"
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qstring.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqstring.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
#include "kqalculate.h"
tree_struct function_cats, unit_cats, variable_cats;
@@ -34,10 +34,10 @@ vector<Variable*> recent_variables;
vector<Unit*> recent_units;
extern PrintOptions printops;
extern KnownVariable *vans[5];
-extern QWidget *topWidget;
+extern TQWidget *topWidget;
extern KQalculate *mainWin;
-void insert_text_in_expression(const QString &str) {
+void insert_text_in_expression(const TQString &str) {
mainWin->insert_text(str);
}
@@ -45,20 +45,20 @@ bool is_answer_variable(Variable *v) {
return v == vans[0] || v == vans[1] || v == vans[2] || v == vans[3] || v == vans[4];
}
-QString get_value_string(const MathStructure &mstruct_, bool rlabel, Prefix *prefix) {
+TQString get_value_string(const MathStructure &mstruct_, bool rlabel, Prefix *prefix) {
printops.allow_non_usable = rlabel;
printops.prefix = prefix;
- QString str = CALCULATOR->printMathStructureTimeOut(mstruct_, 100, printops).c_str();
+ TQString str = CALCULATOR->printMathStructureTimeOut(mstruct_, 100, printops).c_str();
printops.allow_non_usable = false;
printops.prefix = NULL;
return str;
}
-void set_name_label_and_entry(ExpressionItem *item, QLineEdit *entry, QLabel *label) {
+void set_name_label_and_entry(ExpressionItem *item, TQLineEdit *entry, TQLabel *label) {
const ExpressionName *ename = &item->getName(1);
entry->setText(ename->name.c_str());
if(item->countNames() > 1) {
- QString str = "+ ";
+ TQString str = "+ ";
for(size_t i = 2; i <= item->countNames(); i++) {
if(i > 2) str += ", ";
str += item->getName(i).name.c_str();
@@ -69,9 +69,9 @@ void set_name_label_and_entry(ExpressionItem *item, QLineEdit *entry, QLabel *la
bool can_display_unicode_string_function(const char *str, void *arg) {
if(!arg) arg = (void*) topWidget;
- QFontMetrics fm(((QWidget*) arg)->fontMetrics());
- QString qstr(str);
- const QChar *qchars = qstr.unicode();
+ TQFontMetrics fm(((TQWidget*) arg)->fontMetrics());
+ TQString qstr(str);
+ const TQChar *qchars = qstr.unicode();
for(uint i = 0; i < qstr.length(); i++) {
if(!fm.inFont(qchars[i])) return false;
}
diff --git a/src/qalculate_tde_utils.h b/src/qalculate_tde_utils.h
index 0e36469..973c036 100644
--- a/src/qalculate_tde_utils.h
+++ b/src/qalculate_tde_utils.h
@@ -27,11 +27,11 @@
#undef setItem
#undef getItem
-#include <qstring.h>
+#include <tqstring.h>
#include <kshortcut.h>
-class QLabel;
-class QLineEdit;
+class TQLabel;
+class TQLineEdit;
struct tree_struct {
string item;
@@ -56,19 +56,19 @@ struct mode_struct {
AssumptionType at;
AssumptionSign as;
int precision;
- QString name;
+ TQString name;
bool rpn_mode;
KShortcut shortcut;
};
-void insert_text_in_expression(const QString &str);
+void insert_text_in_expression(const TQString &str);
bool is_answer_variable(Variable *v);
-QString get_value_string(const MathStructure &mstruct_, bool rlabel = false, Prefix *prefix = NULL);
-void set_name_label_and_entry(ExpressionItem *item, QLineEdit *entry, QLabel *label);
+TQString get_value_string(const MathStructure &mstruct_, bool rlabel = false, Prefix *prefix = NULL);
+void set_name_label_and_entry(ExpressionItem *item, TQLineEdit *entry, TQLabel *label);
bool can_display_unicode_string_function(const char *str, void *arg);
void generate_units_tree_struct();
void generate_functions_tree_struct();
void generate_variables_tree_struct();
-size_t save_mode_as(QString name, bool *new_mode = NULL);
+size_t save_mode_as(TQString name, bool *new_mode = NULL);
#endif
diff --git a/src/qalculatebuttonwithdata.cpp b/src/qalculatebuttonwithdata.cpp
index 0b4ced7..679aeee 100644
--- a/src/qalculatebuttonwithdata.cpp
+++ b/src/qalculatebuttonwithdata.cpp
@@ -19,13 +19,13 @@
***************************************************************************/
#include "qalculatebuttonwithdata.h"
-QalculateButtonWithData::QalculateButtonWithData(void *data, const QString & text, QWidget *parent, const char *name) : QPushButton(text, parent, name) {
+QalculateButtonWithData::QalculateButtonWithData(void *data, const TQString & text, TQWidget *parent, const char *name) : TQPushButton(text, parent, name) {
user_data = data;
- QObject::connect(this, SIGNAL(clicked()), this, SLOT(emitClickedWithData()));
+ TQObject::connect(this, SIGNAL(clicked()), this, SLOT(emitClickedWithData()));
}
-QalculateButtonWithData::QalculateButtonWithData(void *data, const QIconSet & icon, const QString & text, QWidget * parent, const char * name) : QPushButton(icon, text, parent, name) {
+QalculateButtonWithData::QalculateButtonWithData(void *data, const TQIconSet & icon, const TQString & text, TQWidget * parent, const char * name) : TQPushButton(icon, text, parent, name) {
user_data = data;
- QObject::connect(this, SIGNAL(clicked()), this, SLOT(emitClickedWithData()));
+ TQObject::connect(this, SIGNAL(clicked()), this, SLOT(emitClickedWithData()));
}
QalculateButtonWithData::~QalculateButtonWithData() {}
void QalculateButtonWithData::emitClickedWithData() {
diff --git a/src/qalculatebuttonwithdata.h b/src/qalculatebuttonwithdata.h
index b3281a3..f777124 100644
--- a/src/qalculatebuttonwithdata.h
+++ b/src/qalculatebuttonwithdata.h
@@ -20,18 +20,18 @@
#ifndef QALCULATEBUTTONWITHDATA_H
#define QALCULATEBUTTONWITHDATA_H
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
/**
@author Niklas Knutsson
*/
-class QalculateButtonWithData : public QPushButton {
+class QalculateButtonWithData : public TQPushButton {
Q_OBJECT
public:
- QalculateButtonWithData(void *data, const QString & text, QWidget *parent, const char *name = 0);
- QalculateButtonWithData(void *data, const QIconSet & icon, const QString & text, QWidget * parent, const char * name = 0);
+ QalculateButtonWithData(void *data, const TQString & text, TQWidget *parent, const char *name = 0);
+ QalculateButtonWithData(void *data, const TQIconSet & icon, const TQString & text, TQWidget * parent, const char * name = 0);
virtual ~QalculateButtonWithData();
void *user_data;
diff --git a/src/qalculateconvertnumberbasesdialog.cpp b/src/qalculateconvertnumberbasesdialog.cpp
index e6b8923..950bd00 100644
--- a/src/qalculateconvertnumberbasesdialog.cpp
+++ b/src/qalculateconvertnumberbasesdialog.cpp
@@ -20,36 +20,36 @@
#include "qalculateconvertnumberbasesdialog.h"
#include "qalculate_tde_utils.h"
#include <klocale.h>
-#include <qgrid.h>
-#include <qlabel.h>
+#include <tqgrid.h>
+#include <tqlabel.h>
#include <klineedit.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
extern EvaluationOptions evalops;
-QalculateConvertNumberBasesDialog::QalculateConvertNumberBasesDialog(QWidget *parent, const char *name)
+QalculateConvertNumberBasesDialog::QalculateConvertNumberBasesDialog(TQWidget *parent, const char *name)
: KDialogBase(parent, name, false, i18n("Number Bases"), Close, Close) {
actionButton(Close)->setAutoDefault(false);
actionButton(Close)->setDefault(false);
- QGrid *grid = makeGridMainWidget(2, Qt::Horizontal);
- new QLabel(i18n("Decimal:"), grid);
+ TQGrid *grid = makeGridMainWidget(2, TQt::Horizontal);
+ new TQLabel(i18n("Decimal:"), grid);
decimalEdit = new KLineEdit(grid);
- decimalEdit->setAlignment(Qt::AlignRight);
- QObject::connect(decimalEdit, SIGNAL(textChanged(const QString&)), this, SLOT(setDecimalValue(const QString&)));
- new QLabel(i18n("Binary:"), grid);
+ decimalEdit->setAlignment(TQt::AlignRight);
+ TQObject::connect(decimalEdit, SIGNAL(textChanged(const TQString&)), this, SLOT(setDecimalValue(const TQString&)));
+ new TQLabel(i18n("Binary:"), grid);
binaryEdit = new KLineEdit(grid);
- binaryEdit->setAlignment(Qt::AlignRight);
- QObject::connect(binaryEdit, SIGNAL(textChanged(const QString&)), this, SLOT(setBinaryValue(const QString&)));
- new QLabel(i18n("Octal:"), grid);
+ binaryEdit->setAlignment(TQt::AlignRight);
+ TQObject::connect(binaryEdit, SIGNAL(textChanged(const TQString&)), this, SLOT(setBinaryValue(const TQString&)));
+ new TQLabel(i18n("Octal:"), grid);
octalEdit = new KLineEdit(grid);
- octalEdit->setAlignment(Qt::AlignRight);
- QObject::connect(octalEdit, SIGNAL(textChanged(const QString&)), this, SLOT(setOctalValue(const QString&)));
- new QLabel(i18n("Hexadecimal:"), grid);
+ octalEdit->setAlignment(TQt::AlignRight);
+ TQObject::connect(octalEdit, SIGNAL(textChanged(const TQString&)), this, SLOT(setOctalValue(const TQString&)));
+ new TQLabel(i18n("Hexadecimal:"), grid);
hexadecimalEdit = new KLineEdit(grid);
- hexadecimalEdit->setAlignment(Qt::AlignRight);
- QObject::connect(hexadecimalEdit, SIGNAL(textChanged(const QString&)), this, SLOT(setHexadecimalValue(const QString&)));
+ hexadecimalEdit->setAlignment(TQt::AlignRight);
+ TQObject::connect(hexadecimalEdit, SIGNAL(textChanged(const TQString&)), this, SLOT(setHexadecimalValue(const TQString&)));
decimalEdit->setFocus();
@@ -58,7 +58,7 @@ QalculateConvertNumberBasesDialog::QalculateConvertNumberBasesDialog(QWidget *pa
QalculateConvertNumberBasesDialog::~QalculateConvertNumberBasesDialog() {}
-void QalculateConvertNumberBasesDialog::setDecimalValue(const QString &qstr) {
+void QalculateConvertNumberBasesDialog::setDecimalValue(const TQString &qstr) {
string str = qstr.ascii();
remove_blank_ends(str);
if(str.empty()) return;
@@ -68,7 +68,7 @@ void QalculateConvertNumberBasesDialog::setDecimalValue(const QString &qstr) {
MathStructure value = CALCULATOR->calculate(CALCULATOR->unlocalizeExpression(str, evalops.parse_options), eo);
updateEntries(&value, 10);
}
-void QalculateConvertNumberBasesDialog::setBinaryValue(const QString &qstr) {
+void QalculateConvertNumberBasesDialog::setBinaryValue(const TQString &qstr) {
string str = qstr.ascii();
remove_blank_ends(str);
if(str.empty()) return;
@@ -79,7 +79,7 @@ void QalculateConvertNumberBasesDialog::setBinaryValue(const QString &qstr) {
MathStructure value = CALCULATOR->calculate(CALCULATOR->unlocalizeExpression(str, evalops.parse_options), eo);
updateEntries(&value, 2);
}
-void QalculateConvertNumberBasesDialog::setOctalValue(const QString &qstr) {
+void QalculateConvertNumberBasesDialog::setOctalValue(const TQString &qstr) {
string str = qstr.ascii();
remove_blank_ends(str);
if(str.empty()) return;
@@ -90,7 +90,7 @@ void QalculateConvertNumberBasesDialog::setOctalValue(const QString &qstr) {
MathStructure value = CALCULATOR->calculate(CALCULATOR->unlocalizeExpression(str, evalops.parse_options), eo);
updateEntries(&value, 8);
}
-void QalculateConvertNumberBasesDialog::setHexadecimalValue(const QString &qstr) {
+void QalculateConvertNumberBasesDialog::setHexadecimalValue(const TQString &qstr) {
string str = qstr.ascii();
remove_blank_ends(str);
if(str.empty()) return;
diff --git a/src/qalculateconvertnumberbasesdialog.h b/src/qalculateconvertnumberbasesdialog.h
index 943fede..83b3f0f 100644
--- a/src/qalculateconvertnumberbasesdialog.h
+++ b/src/qalculateconvertnumberbasesdialog.h
@@ -31,7 +31,7 @@ class MathStructure;
class QalculateConvertNumberBasesDialog : public KDialogBase {
Q_OBJECT
public:
- QalculateConvertNumberBasesDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateConvertNumberBasesDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateConvertNumberBasesDialog();
@@ -39,10 +39,10 @@ public:
public slots:
- void setDecimalValue(const QString&);
- void setBinaryValue(const QString&);
- void setOctalValue(const QString&);
- void setHexadecimalValue(const QString&);
+ void setDecimalValue(const TQString&);
+ void setBinaryValue(const TQString&);
+ void setOctalValue(const TQString&);
+ void setHexadecimalValue(const TQString&);
protected:
diff --git a/src/qalculateconvertunitsdialog.cpp b/src/qalculateconvertunitsdialog.cpp
index ce52e87..0808780 100644
--- a/src/qalculateconvertunitsdialog.cpp
+++ b/src/qalculateconvertunitsdialog.cpp
@@ -20,18 +20,18 @@
#include "qalculateconvertunitsdialog.h"
#include "qalculate_tde_utils.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klineedit.h>
#include <klocale.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include <klistview.h>
#include <klocale.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <klistview.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qsplitter.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqsplitter.h>
extern tree_struct unit_cats;
extern vector<void*> ia_units;
@@ -39,23 +39,23 @@ extern PrintOptions printops;
extern EvaluationOptions evalops;
-QalculateConvertUnitsDialog::QalculateConvertUnitsDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Convert"), Ok | Apply | Cancel | Details, Ok, true) {
+QalculateConvertUnitsDialog::QalculateConvertUnitsDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Convert"), Ok | Apply | Cancel | Details, Ok, true) {
setButtonText(Details, i18n("Selector"));
selected_category = "";
block_unit_convert = true;
- QVBox *box = makeVBoxMainWidget();
- new QLabel(i18n("Unit expression:"), box);
+ TQVBox *box = makeVBoxMainWidget();
+ new TQLabel(i18n("Unit expression:"), box);
unitExpressionEdit = new KLineEdit(box);
- QVBox *box_d = new QVBox(this);
+ TQVBox *box_d = new TQVBox(this);
box_d->setSpacing(spacingHint());
- new QWidget(box_d);
+ new TQWidget(box_d);
- QSplitter *splitter = new QSplitter(Qt::Vertical, box_d);
- splitter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQSplitter *splitter = new TQSplitter(TQt::Vertical, box_d);
+ splitter->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
setDetailsWidget(box_d);
@@ -82,10 +82,10 @@ void QalculateConvertUnitsDialog::updateUnitTree() {
unitItems.clear();
categoryItems.clear();
categoryView->clear();
- QListViewItem *i = new KListViewItem(categoryView, i18n("All")), *i2;
+ TQListViewItem *i = new KListViewItem(categoryView, i18n("All")), *i2;
categoryItems[i] = i18n("All");
i->setOpen(true);
- QString str;
+ TQString str;
tree_struct *item, *item2;
unit_cats.it = unit_cats.items.begin();
if(unit_cats.it != unit_cats.items.end()) {
@@ -139,14 +139,14 @@ void QalculateConvertUnitsDialog::updateUnitTree() {
if(!categoryView->selectedItem()) {
//if no category has been selected (previously selected has been renamed/deleted), select "All"
selected_category = i18n("All");
- QListViewItemIterator it(categoryView);
+ TQListViewItemIterator it(categoryView);
if(it.current())
categoryView->setSelected(it.current(), true);
}
}
void QalculateConvertUnitsDialog::unitSelected() {
- QListViewItem *selected = unitView->selectedItem();
+ TQListViewItem *selected = unitView->selectedItem();
if(selected) {
Unit *u = unitItems[selected];
if(!CALCULATOR->stillHasUnit(u)) {
@@ -161,14 +161,14 @@ void QalculateConvertUnitsDialog::unitSelected() {
}
void QalculateConvertUnitsDialog::addUnitTreeItem(Unit *u) {
- QListViewItem *i = new KListViewItem(unitView, u->title(true).c_str());
+ TQListViewItem *i = new KListViewItem(unitView, u->title(true).c_str());
unitItems[i] = u;
}
void QalculateConvertUnitsDialog::categorySelected() {
block_unit_convert = true;
- QListViewItem *selected = categoryView->selectedItem();
+ TQListViewItem *selected = categoryView->selectedItem();
bool no_cat = false, b_all = false;
unitView->clear();
unitItems.clear();
diff --git a/src/qalculateconvertunitsdialog.h b/src/qalculateconvertunitsdialog.h
index 7c6991c..a924b72 100644
--- a/src/qalculateconvertunitsdialog.h
+++ b/src/qalculateconvertunitsdialog.h
@@ -21,12 +21,12 @@
#define QALCULATECONVERTUNITSDIALOG_H
#include <kdialogbase.h>
-#include <qmap.h>
+#include <tqmap.h>
class KLineEdit;
class Unit;
class KListView;
-class QListViewItem;
+class TQListViewItem;
/**
@author Niklas Knutsson
@@ -37,19 +37,19 @@ class QalculateConvertUnitsDialog : public KDialogBase {
public:
- QalculateConvertUnitsDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateConvertUnitsDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateConvertUnitsDialog();
KLineEdit *unitExpressionEdit;
void addUnitTreeItem(Unit *f);
- QMap<QListViewItem*, Unit*> unitItems;
- QMap<QListViewItem*, QString> categoryItems;
+ TQMap<TQListViewItem*, Unit*> unitItems;
+ TQMap<TQListViewItem*, TQString> categoryItems;
KListView *categoryView;
KListView *unitView;
- QString selected_category;
+ TQString selected_category;
bool block_unit_convert;
public slots:
diff --git a/src/qalculatedatasetsdialog.cpp b/src/qalculatedatasetsdialog.cpp
index 3059ebd..5505805 100644
--- a/src/qalculatedatasetsdialog.cpp
+++ b/src/qalculatedatasetsdialog.cpp
@@ -24,100 +24,100 @@
#include "qalculate_tde_utils.h"
#include "qalculatebuttonwithdata.h"
#include <kpushbutton.h>
-#include <qsplitter.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qgrid.h>
+#include <tqsplitter.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqgrid.h>
#include <klistview.h>
#include <kmessagebox.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qscrollview.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqscrollview.h>
#include <ktextbrowser.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kactivelabel.h>
#include <kiconloader.h>
#include <klineedit.h>
extern PrintOptions printops;
-extern QWidget *expressionWidget;
+extern TQWidget *expressionWidget;
-QalculateDataSetsDialog::QalculateDataSetsDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Data Sets"), Close, Close, false) {
+QalculateDataSetsDialog::QalculateDataSetsDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Data Sets"), Close, Close, false) {
dataset_edit_dialog = NULL;
object_edit_dialog = NULL;
- QVBox *box = makeVBoxMainWidget();
- QSplitter *splitter = new QSplitter(Qt::Vertical, box);
+ TQVBox *box = makeVBoxMainWidget();
+ TQSplitter *splitter = new TQSplitter(TQt::Vertical, box);
- QVBox *group1 = new QVBox(splitter);
- QVBox *group2 = new QVBox(splitter);
+ TQVBox *group1 = new TQVBox(splitter);
+ TQVBox *group2 = new TQVBox(splitter);
- splitter = new QSplitter(Qt::Horizontal, group1);
- QWidget *widget = new QWidget(splitter);
- widget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
- QVBoxLayout *vbox = new QVBoxLayout(widget, spacingHint(), spacingHint());
- vbox->addWidget(new QLabel(i18n("Data Sets:"), widget));
+ splitter = new TQSplitter(TQt::Horizontal, group1);
+ TQWidget *widget = new TQWidget(splitter);
+ widget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding);
+ TQVBoxLayout *vbox = new TQVBoxLayout(widget, spacingHint(), spacingHint());
+ vbox->addWidget(new TQLabel(i18n("Data Sets:"), widget));
dataSetsView = new KListView(widget);
vbox->addWidget(dataSetsView);
dataSetsView->addColumn(i18n("Data Set"));
dataSetsView->setRootIsDecorated(false);
- QHBoxLayout *hbox = new QHBoxLayout(vbox);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- newDataSetButton = new QPushButton(i18n("New"), widget);
+ TQHBoxLayout *hbox = new TQHBoxLayout(vbox);
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ newDataSetButton = new TQPushButton(i18n("New"), widget);
hbox->addWidget(newDataSetButton);
- editDataSetButton = new QPushButton(i18n("Edit"), widget);
+ editDataSetButton = new TQPushButton(i18n("Edit"), widget);
hbox->addWidget(editDataSetButton);
- deleteDataSetButton = new QPushButton(i18n("Delete"), widget);
+ deleteDataSetButton = new TQPushButton(i18n("Delete"), widget);
hbox->addWidget(deleteDataSetButton);
- QVBox *vbox2 = new QVBox(splitter);
+ TQVBox *vbox2 = new TQVBox(splitter);
vbox2->setMargin(spacingHint());
vbox2->setSpacing(spacingHint());
- new QLabel(i18n("Description:"), vbox2);
+ new TQLabel(i18n("Description:"), vbox2);
descriptionBrowser = new KTextBrowser(vbox2);
- splitter = new QSplitter(Qt::Horizontal, group2);
- widget = new QWidget(splitter);
- widget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
- vbox = new QVBoxLayout(widget, spacingHint(), spacingHint());
- vbox->addWidget(new QLabel(i18n("Objects:"), widget));
+ splitter = new TQSplitter(TQt::Horizontal, group2);
+ widget = new TQWidget(splitter);
+ widget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding);
+ vbox = new TQVBoxLayout(widget, spacingHint(), spacingHint());
+ vbox->addWidget(new TQLabel(i18n("Objects:"), widget));
objectsView = new KListView(widget);
vbox->addWidget(objectsView);
objectsView->addColumn(i18n("Object"));
objectsView->setRootIsDecorated(false);
- hbox = new QHBoxLayout(vbox);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- newObjectButton = new QPushButton(i18n("New"), widget);
+ hbox = new TQHBoxLayout(vbox);
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ newObjectButton = new TQPushButton(i18n("New"), widget);
hbox->addWidget(newObjectButton);
- editObjectButton = new QPushButton(i18n("Edit"), widget);
+ editObjectButton = new TQPushButton(i18n("Edit"), widget);
hbox->addWidget(editObjectButton);
- deleteObjectButton = new QPushButton(i18n("Delete"), widget);
+ deleteObjectButton = new TQPushButton(i18n("Delete"), widget);
hbox->addWidget(deleteObjectButton);
- vbox2 = new QVBox(splitter);
+ vbox2 = new TQVBox(splitter);
vbox2->setMargin(spacingHint());
vbox2->setSpacing(spacingHint());
- new QLabel(i18n("Attributes:"), vbox2);
- attributesView = new QScrollView(vbox2);
- attributesView->setResizePolicy(QScrollView::AutoOneFit);
- attributesView->setFrameStyle(QFrame::NoFrame);
- attributesGrid = new QGrid(3, Qt::Horizontal, attributesView->viewport());
+ new TQLabel(i18n("Attributes:"), vbox2);
+ attributesView = new TQScrollView(vbox2);
+ attributesView->setResizePolicy(TQScrollView::AutoOneFit);
+ attributesView->setFrameStyle(TQFrame::NoFrame);
+ attributesGrid = new TQGrid(3, TQt::Horizontal, attributesView->viewport());
attributesGrid->setSpacing(spacingHint());
attributesView->addChild(attributesGrid);
- resize(QSize(675, 525).expandedTo(size()));
+ resize(TQSize(675, 525).expandedTo(size()));
connect(newDataSetButton, SIGNAL(clicked()), this, SLOT(newDataSet()));
connect(editDataSetButton, SIGNAL(clicked()), this, SLOT(editDataSet()));
connect(deleteDataSetButton, SIGNAL(clicked()), this, SLOT(deleteDataSet()));
connect(dataSetsView, SIGNAL(selectionChanged()), this, SLOT(dataSetSelected()));
- connect(dataSetsView, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(dataSetDoubleClicked(QListViewItem*)));
+ connect(dataSetsView, SIGNAL(doubleClicked(TQListViewItem*)), this, SLOT(dataSetDoubleClicked(TQListViewItem*)));
connect(newObjectButton, SIGNAL(clicked()), this, SLOT(newObject()));
connect(editObjectButton, SIGNAL(clicked()), this, SLOT(editObject()));
connect(deleteObjectButton, SIGNAL(clicked()), this, SLOT(deleteObject()));
connect(objectsView, SIGNAL(selectionChanged()), this, SLOT(objectSelected()));
- connect(objectsView, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(objectDoubleClicked(QListViewItem*)));
+ connect(objectsView, SIGNAL(doubleClicked(TQListViewItem*)), this, SLOT(objectDoubleClicked(TQListViewItem*)));
}
@@ -129,7 +129,7 @@ void QalculateDataSetsDialog::updateDataSetTree() {
objectItems.clear();
dataSetsView->clear();
DataSet *ds;
- QListViewItem *i;
+ TQListViewItem *i;
bool b = false;
dataSetsView->blockSignals(true);
for(size_t index = 1; ; index++) {
@@ -152,8 +152,8 @@ void QalculateDataSetsDialog::updateDataSetTree() {
}
-#define UPDATE_SELECTED_DATASET QListViewItem *i3 = dataSetsView->selectedItem(); if(!i3) return; selected_dataset = dataSetItems[i3]; if(!selected_dataset) return;
-#define UPDATE_SELECTED_OBJECT QListViewItem *i2 = objectsView->selectedItem(); if(!i2) return; selected_object = objectItems[i2]; if(!selected_object) return;
+#define UPDATE_SELECTED_DATASET TQListViewItem *i3 = dataSetsView->selectedItem(); if(!i3) return; selected_dataset = dataSetItems[i3]; if(!selected_dataset) return;
+#define UPDATE_SELECTED_OBJECT TQListViewItem *i2 = objectsView->selectedItem(); if(!i2) return; selected_object = objectItems[i2]; if(!selected_object) return;
#define CHECK_IF_DATASET_STILL_THERE if(!CALCULATOR->stillHasFunction(selected_dataset)) {KMessageBox::error(this, i18n("Data set does not exist anymore.")); emit dataSetsChanged(); return;}
void QalculateDataSetsDialog::deleteDataSet() {
@@ -193,7 +193,7 @@ void QalculateDataSetsDialog::newDataSet() {
}
}
-void QalculateDataSetsDialog::dataSetDoubleClicked(QListViewItem*i) {
+void QalculateDataSetsDialog::dataSetDoubleClicked(TQListViewItem*i) {
selected_dataset = dataSetItems[i];
if(!selected_dataset)
return;
@@ -210,7 +210,7 @@ void QalculateDataSetsDialog::dataSetDoubleClicked(QListViewItem*i) {
void QalculateDataSetsDialog::dataSetSelected() {
- QListViewItem *selected = dataSetsView->selectedItem();
+ TQListViewItem *selected = dataSetsView->selectedItem();
objectsView->clear();
if(selected) {
DataSet *ds = dataSetItems[selected];
@@ -232,7 +232,7 @@ void QalculateDataSetsDialog::dataSetSelected() {
DataProperty *dp;
DataObject *o = ds->getFirstObject(&it);
bool b = false, b2 = false;
- QListViewItem *i;
+ TQListViewItem *i;
while(o) {
i = new KListViewItem(objectsView);
objectItems[i] = o;
@@ -257,7 +257,7 @@ void QalculateDataSetsDialog::dataSetSelected() {
o = ds->getNextObject(&it);
}
if(!b) {
- QListViewItemIterator qit(objectsView);
+ TQListViewItemIterator qit(objectsView);
if(qit.current()) {
objectsView->setSelected(qit.current(), true);
}
@@ -268,7 +268,7 @@ void QalculateDataSetsDialog::dataSetSelected() {
deleteDataSetButton->setEnabled(ds->isLocal());
newObjectButton->setEnabled(true);
- QString str, str2;
+ TQString str, str2;
if(!ds->description().empty()) {
str2 = ds->description().c_str();
@@ -341,7 +341,7 @@ void QalculateDataSetsDialog::dataSetSelected() {
} else {
str += i18n("argument");
str += " ";
- str += QString::number(i2);
+ str += TQString::number(i2);
}
if(i2 > ds->minargs()) {
str += "]";
@@ -387,7 +387,7 @@ void QalculateDataSetsDialog::insertObjectData(void *data) {
DataProperty *dp = (DataProperty*) data;
DataSet *ds = dp->parentSet();
if(ds && selected_object) {
- QString str = ds->preferredInputName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) expressionWidget).name.c_str();
+ TQString str = ds->preferredInputName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) expressionWidget).name.c_str();
str += "(";
str += selected_object->getProperty(ds->getPrimaryKeyProperty()).c_str();
str += CALCULATOR->getComma().c_str();
@@ -400,7 +400,7 @@ void QalculateDataSetsDialog::insertObjectData(void *data) {
void QalculateDataSetsDialog::objectSelected() {
- QListViewItem *selected = objectsView->selectedItem();
+ TQListViewItem *selected = objectsView->selectedItem();
DataObject *o = NULL;
if(selected) o = objectItems[selected];
@@ -412,10 +412,10 @@ void QalculateDataSetsDialog::objectSelected() {
if(!ds) return;
DataPropertyIter it;
DataProperty *dp = ds->getFirstProperty(&it);
- QString sval;
- QString str;
+ TQString sval;
+ TQString str;
delete attributesGrid;
- attributesGrid = new QGrid(3, Qt::Horizontal, attributesView->viewport());
+ attributesGrid = new TQGrid(3, TQt::Horizontal, attributesView->viewport());
attributesGrid->setSpacing(spacingHint());
attributesView->addChild(attributesGrid);
while(dp) {
@@ -423,22 +423,22 @@ void QalculateDataSetsDialog::objectSelected() {
sval = o->getPropertyDisplayString(dp).c_str();
if(!sval.isEmpty()) {
str = "<b>"; str += dp->title().c_str(); str += ":"; str += "</b>";
- new QLabel(str, attributesGrid);
+ new TQLabel(str, attributesGrid);
KLineEdit *le = new KLineEdit(sval, attributesGrid);
le->setReadOnly(true);
- le->setFrameStyle(QFrame::NoFrame | QFrame::Plain);
- QalculateButtonWithData *button = new QalculateButtonWithData((void*) dp, QIconSet(SmallIcon("editpaste")), "", attributesGrid);
- QObject::connect(button, SIGNAL(clickedWithData(void*)), SLOT(insertObjectData(void*)));
+ le->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain);
+ QalculateButtonWithData *button = new QalculateButtonWithData((void*) dp, TQIconSet(SmallIcon("editpaste")), "", attributesGrid);
+ TQObject::connect(button, SIGNAL(clickedWithData(void*)), SLOT(insertObjectData(void*)));
}
}
dp = ds->getNextProperty(&it);
}
- QWidget *widget = new QWidget(attributesGrid);
- widget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQWidget *widget = new TQWidget(attributesGrid);
+ widget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding);
attributesGrid->show();
} else {
delete attributesGrid;
- attributesGrid = new QGrid(3, Qt::Horizontal, attributesView->viewport());
+ attributesGrid = new TQGrid(3, TQt::Horizontal, attributesView->viewport());
attributesGrid->setSpacing(spacingHint());
attributesView->addChild(attributesGrid);
attributesGrid->show();
@@ -486,7 +486,7 @@ void QalculateDataSetsDialog::newObject() {
}
}
-void QalculateDataSetsDialog::objectDoubleClicked(QListViewItem*i) {
+void QalculateDataSetsDialog::objectDoubleClicked(TQListViewItem*i) {
UPDATE_SELECTED_DATASET
selected_object = objectItems[i];
if(!selected_object)
diff --git a/src/qalculatedatasetsdialog.h b/src/qalculatedatasetsdialog.h
index 1fa85b7..3ab19d4 100644
--- a/src/qalculatedatasetsdialog.h
+++ b/src/qalculatedatasetsdialog.h
@@ -21,13 +21,13 @@
#define QALCULATEDATASETSDIALOG_H
#include <kdialogbase.h>
-#include <qmap.h>
+#include <tqmap.h>
-class QPushButton;
+class TQPushButton;
class KListView;
class KTextBrowser;
-class QScrollView;
-class QGrid;
+class TQScrollView;
+class TQGrid;
class DataSet;
class DataObject;
class QalculateEditDataSetDialog;
@@ -42,17 +42,17 @@ class QalculateDataSetsDialog : public KDialogBase {
public:
- QalculateDataSetsDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateDataSetsDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateDataSetsDialog();
- QPushButton *newObjectButton, *editObjectButton, *deleteObjectButton, *newDataSetButton, *editDataSetButton, *deleteDataSetButton;
+ TQPushButton *newObjectButton, *editObjectButton, *deleteObjectButton, *newDataSetButton, *editDataSetButton, *deleteDataSetButton;
KListView *objectsView, *dataSetsView;
KTextBrowser *descriptionBrowser;
- QScrollView *attributesView;
- QGrid *attributesGrid;
+ TQScrollView *attributesView;
+ TQGrid *attributesGrid;
- QMap<QListViewItem*, DataSet*> dataSetItems;
- QMap<QListViewItem*, DataObject*> objectItems;
+ TQMap<TQListViewItem*, DataSet*> dataSetItems;
+ TQMap<TQListViewItem*, DataObject*> objectItems;
DataSet *selected_dataset;
DataObject *selected_object;
@@ -63,8 +63,8 @@ public:
public slots:
void updateDataSetTree();
- void dataSetDoubleClicked(QListViewItem*);
- void objectDoubleClicked(QListViewItem*);
+ void dataSetDoubleClicked(TQListViewItem*);
+ void objectDoubleClicked(TQListViewItem*);
void dataSetSelected();
void objectSelected();
void deleteDataSet();
diff --git a/src/qalculatedecimalsdialog.cpp b/src/qalculatedecimalsdialog.cpp
index 2039b93..8e5ba98 100644
--- a/src/qalculatedecimalsdialog.cpp
+++ b/src/qalculatedecimalsdialog.cpp
@@ -19,32 +19,32 @@
***************************************************************************/
#include "qalculatedecimalsdialog.h"
-#include <qlabel.h>
-#include <qspinbox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
#include <klocale.h>
-#include <qgrid.h>
+#include <tqgrid.h>
-QalculateDecimalsDialog::QalculateDecimalsDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Decimals"), Close, Close, true) {
+QalculateDecimalsDialog::QalculateDecimalsDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Decimals"), Close, Close, true) {
- QGrid *grid = makeGridMainWidget(2, Qt::Horizontal);
+ TQGrid *grid = makeGridMainWidget(2, TQt::Horizontal);
- new QLabel(i18n("Max decimals:"), grid);
+ new TQLabel(i18n("Max decimals:"), grid);
- maxDecimalsBox = new QSpinBox(grid);
- maxDecimalsBox->setButtonSymbols(QSpinBox::PlusMinus);
+ maxDecimalsBox = new TQSpinBox(grid);
+ maxDecimalsBox->setButtonSymbols(TQSpinBox::PlusMinus);
maxDecimalsBox->setMinValue(-1);
maxDecimalsBox->setValue(-1);
maxDecimalsBox->setSpecialValueText(i18n( "Off" ));
- new QLabel(i18n("Min decimals:"), grid);
+ new TQLabel(i18n("Min decimals:"), grid);
- minDecimalsBox = new QSpinBox(grid);
- minDecimalsBox->setButtonSymbols(QSpinBox::PlusMinus);
+ minDecimalsBox = new TQSpinBox(grid);
+ minDecimalsBox->setButtonSymbols(TQSpinBox::PlusMinus);
minDecimalsBox->setMinValue(0);
minDecimalsBox->setValue(0);
minDecimalsBox->setSpecialValueText(i18n( "Off" ));
- resize(QSize(300, minimumSizeHint().height()).expandedTo(minimumSizeHint()));
+ resize(TQSize(300, minimumSizeHint().height()).expandedTo(minimumSizeHint()));
}
diff --git a/src/qalculatedecimalsdialog.h b/src/qalculatedecimalsdialog.h
index ae16d7c..1912260 100644
--- a/src/qalculatedecimalsdialog.h
+++ b/src/qalculatedecimalsdialog.h
@@ -22,7 +22,7 @@
#include <kdialogbase.h>
-class QSpinBox;
+class TQSpinBox;
/**
@author Niklas Knutsson
@@ -33,10 +33,10 @@ class QalculateDecimalsDialog : public KDialogBase {
public:
- QalculateDecimalsDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateDecimalsDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateDecimalsDialog();
- QSpinBox *maxDecimalsBox, *minDecimalsBox;
+ TQSpinBox *maxDecimalsBox, *minDecimalsBox;
};
diff --git a/src/qalculateeditdataobjectdialog.cpp b/src/qalculateeditdataobjectdialog.cpp
index 1179e17..e944e9d 100644
--- a/src/qalculateeditdataobjectdialog.cpp
+++ b/src/qalculateeditdataobjectdialog.cpp
@@ -19,15 +19,15 @@
***************************************************************************/
#include "qalculateeditdataobjectdialog.h"
#include "qalculate_tde_utils.h"
-#include <qlabel.h>
-#include <qgrid.h>
+#include <tqlabel.h>
+#include <tqgrid.h>
#include <klineedit.h>
#include <kcombobox.h>
-#include <qvaluevector.h>
-#include <qstring.h>
+#include <tqvaluevector.h>
+#include <tqstring.h>
#include <klocale.h>
-QalculateEditDataObjectDialog::QalculateEditDataObjectDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Object"), Ok | Cancel, Ok, true) {
+QalculateEditDataObjectDialog::QalculateEditDataObjectDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Object"), Ok | Cancel, Ok, true) {
}
@@ -42,28 +42,28 @@ DataObject *QalculateEditDataObjectDialog::editDataObject(DataSet *ds, DataObjec
setCaption(i18n("New Object"));
}
- QGrid *grid = new QGrid(4, Qt::Horizontal, this);
+ TQGrid *grid = new TQGrid(4, TQt::Horizontal, this);
grid->setSpacing(spacingHint());
setMainWidget(grid);
- new QLabel(i18n("Property"), grid);
- new QLabel(i18n("Value"), grid);
- new QLabel(grid);
- new QLabel(i18n("Approximation"), grid);
+ new TQLabel(i18n("Property"), grid);
+ new TQLabel(i18n("Value"), grid);
+ new TQLabel(grid);
+ new TQLabel(i18n("Approximation"), grid);
DataPropertyIter it;
DataProperty *dp = ds->getFirstProperty(&it);
string sval;
- QValueVector<KLineEdit*> value_entries;
- QValueVector<KComboBox*> approx_menus;
+ TQValueVector<KLineEdit*> value_entries;
+ TQValueVector<KComboBox*> approx_menus;
string str;
while(dp) {
- new QLabel(dp->title().c_str(), grid);
+ new TQLabel(dp->title().c_str(), grid);
KLineEdit *entry = new KLineEdit(grid);
value_entries.push_back(entry);
int iapprox = -1;
if(o) {
entry->setText(o->getProperty(dp, &iapprox).c_str());
}
- new QLabel(dp->getUnitString().c_str(), grid);
+ new TQLabel(dp->getUnitString().c_str(), grid);
KComboBox *om = new KComboBox(grid);
om->setEditable(false);
om->insertItem(i18n("Default"));
@@ -73,7 +73,7 @@ DataObject *QalculateEditDataObjectDialog::editDataObject(DataSet *ds, DataObjec
om->setCurrentItem(iapprox + 1);
dp = ds->getNextProperty(&it);
}
- if(exec() == QDialog::Accepted) {
+ if(exec() == TQDialog::Accepted) {
bool new_object = (o == NULL);
if(new_object) {
o = new DataObject(ds);
@@ -81,7 +81,7 @@ DataObject *QalculateEditDataObjectDialog::editDataObject(DataSet *ds, DataObjec
}
dp = ds->getFirstProperty(&it);
size_t i = 0;
- QString val;
+ TQString val;
while(dp) {
val = value_entries[i]->text().stripWhiteSpace();
if(!val.isEmpty()) {
diff --git a/src/qalculateeditdataobjectdialog.h b/src/qalculateeditdataobjectdialog.h
index 9db334b..dbf06d7 100644
--- a/src/qalculateeditdataobjectdialog.h
+++ b/src/qalculateeditdataobjectdialog.h
@@ -34,7 +34,7 @@ class QalculateEditDataObjectDialog : public KDialogBase {
public:
- QalculateEditDataObjectDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateEditDataObjectDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateEditDataObjectDialog();
DataObject *editDataObject(DataSet *ds, DataObject *o = NULL);
diff --git a/src/qalculateeditdatasetdialog.cpp b/src/qalculateeditdatasetdialog.cpp
index 051515f..248039e 100644
--- a/src/qalculateeditdatasetdialog.cpp
+++ b/src/qalculateeditdatasetdialog.cpp
@@ -21,80 +21,80 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditnamesdialog.h"
-#include <qgrid.h>
+#include <tqgrid.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kcombobox.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qcheckbox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqcheckbox.h>
#include <kmessagebox.h>
#include <kdeversion.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 1
-#include <qtextedit.h>
+#include <tqtextedit.h>
#else
#include <ktextedit.h>
#endif
#include <klistview.h>
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#else
#include <ktabwidget.h>
#endif
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kstdguiitem.h>
extern PrintOptions printops;
extern tree_struct function_cats;
-QalculateEditDataSetDialog::QalculateEditDataSetDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Data Set"), Ok | Cancel, Ok, false) {
+QalculateEditDataSetDialog::QalculateEditDataSetDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Data Set"), Ok | Cancel, Ok, false) {
names_edit_dialog = NULL;
edited_dataset = NULL;
property_edit_dialog = NULL;
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
- tabs = new QTabWidget(this);
+ tabs = new TQTabWidget(this);
#else
tabs = new KTabWidget(this);
#endif
setMainWidget(tabs);
- QWidget *page1 = new QWidget(this);
- QWidget *page2 = new QWidget(this);
- QWidget *page3 = new QWidget(this);
+ TQWidget *page1 = new TQWidget(this);
+ TQWidget *page2 = new TQWidget(this);
+ TQWidget *page3 = new TQWidget(this);
tabs->addTab(page1, i18n("General"));
tabs->addTab(page2, i18n("Properties"));
tabs->addTab(page3, i18n("Function"));
- QGridLayout *grid = new QGridLayout(page1, 1, 1, spacingHint());
- grid->addWidget(new QLabel(i18n("Title:"), page1), 0, 0);
+ TQGridLayout *grid = new TQGridLayout(page1, 1, 1, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Title:"), page1), 0, 0);
titleEdit = new KLineEdit(page1);
grid->addWidget(titleEdit, 0, 1);
- grid->addWidget(new QLabel(i18n("Data file:"), page1), 1, 0);
+ grid->addWidget(new TQLabel(i18n("Data file:"), page1), 1, 0);
fileEdit = new KLineEdit(page1);
grid->addWidget(fileEdit, 1, 1);
- grid->addWidget(new QLabel(i18n("Description:"), page1), 2, 0);
+ grid->addWidget(new TQLabel(i18n("Description:"), page1), 2, 0);
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 1
- descriptionEdit = new QTextEdit(page1);
+ descriptionEdit = new TQTextEdit(page1);
#else
descriptionEdit = new KTextEdit(page1);
#endif
- descriptionEdit->setTextFormat(QTextEdit::PlainText);
+ descriptionEdit->setTextFormat(TQTextEdit::PlainText);
grid->addMultiCellWidget(descriptionEdit, 3, 3, 0, 1);
- grid->addWidget(new QLabel(i18n("Copyright:"), page1), 4, 0);
+ grid->addWidget(new TQLabel(i18n("Copyright:"), page1), 4, 0);
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 1
- copyrightEdit = new QTextEdit(page1);
+ copyrightEdit = new TQTextEdit(page1);
#else
copyrightEdit = new KTextEdit(page1);
#endif
- copyrightEdit->setTextFormat(QTextEdit::PlainText);
+ copyrightEdit->setTextFormat(TQTextEdit::PlainText);
grid->addMultiCellWidget(copyrightEdit, 5, 5, 0, 1);
- QVBoxLayout *vbox = new QVBoxLayout(page2, spacingHint());
- vbox->addWidget(new QLabel(i18n("Properties:"), page2));
+ TQVBoxLayout *vbox = new TQVBoxLayout(page2, spacingHint());
+ vbox->addWidget(new TQLabel(i18n("Properties:"), page2));
propertiesView = new KListView(page2);
propertiesView->addColumn(i18n("Title"));
propertiesView->addColumn(i18n("Name"));
@@ -102,41 +102,41 @@ QalculateEditDataSetDialog::QalculateEditDataSetDialog(QWidget *parent, const ch
propertiesView->setSorting(-1);
propertiesView->setRootIsDecorated(false);
vbox->addWidget(propertiesView);
- QHBoxLayout *hbox = new QHBoxLayout(vbox, spacingHint());
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- newPropertyButton = new QPushButton(i18n("New"), page2);
+ TQHBoxLayout *hbox = new TQHBoxLayout(vbox, spacingHint());
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ newPropertyButton = new TQPushButton(i18n("New"), page2);
hbox->addWidget(newPropertyButton);
- editPropertyButton = new QPushButton(i18n("Edit"), page2);
+ editPropertyButton = new TQPushButton(i18n("Edit"), page2);
hbox->addWidget(editPropertyButton);
- deletePropertyButton = new QPushButton(i18n("Delete"), page2);
+ deletePropertyButton = new TQPushButton(i18n("Delete"), page2);
hbox->addWidget(deletePropertyButton);
- grid = new QGridLayout(page3, 1, 1, spacingHint());
- grid->addWidget(new QLabel(i18n("Name:"), page3), 0, 0);
+ grid = new TQGridLayout(page3, 1, 1, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Name:"), page3), 0, 0);
nameEdit = new KLineEdit(page3);
grid->addWidget(nameEdit, 0, 1);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 1, 1, 0, 1);
- namesLabel = new QLabel(page3);
- namesLabel->setAlignment(Qt::AlignRight);
- namesLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ namesLabel = new TQLabel(page3);
+ namesLabel->setAlignment(TQt::AlignRight);
+ namesLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
hbox->addWidget(namesLabel);
- namesButton = new QPushButton(i18n("Names Details"), page3);
+ namesButton = new TQPushButton(i18n("Names Details"), page3);
hbox->addWidget(namesButton);
- grid->addWidget(new QLabel(i18n("Object argument name:"), page3), 2, 0);
+ grid->addWidget(new TQLabel(i18n("Object argument name:"), page3), 2, 0);
objectArgumentEdit = new KLineEdit(page3);
grid->addWidget(objectArgumentEdit, 2, 1);
- grid->addWidget(new QLabel(i18n("Property argument name:"), page3), 3, 0);
+ grid->addWidget(new TQLabel(i18n("Property argument name:"), page3), 3, 0);
propertyArgumentEdit = new KLineEdit(page3);
grid->addWidget(propertyArgumentEdit, 3, 1);
- grid->addWidget(new QLabel(i18n("Default property:"), page3), 4, 0);
+ grid->addWidget(new TQLabel(i18n("Default property:"), page3), 4, 0);
defaultPropertyEdit = new KLineEdit(page3);
grid->addWidget(defaultPropertyEdit, 4, 1);
- grid->addItem(new QSpacerItem(5, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
+ grid->addItem(new TQSpacerItem(5, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
connect(namesButton, SIGNAL(clicked()), this, SLOT(editNames()));
- connect(nameEdit, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)));
+ connect(nameEdit, SIGNAL(textChanged(const TQString&)), this, SLOT(nameChanged(const TQString&)));
connect(newPropertyButton, SIGNAL(clicked()), this, SLOT(newProperty()));
connect(editPropertyButton, SIGNAL(clicked()), this, SLOT(editProperty()));
connect(deletePropertyButton, SIGNAL(clicked()), this, SLOT(deleteProperty()));
@@ -148,7 +148,7 @@ QalculateEditDataSetDialog::~QalculateEditDataSetDialog() {}
void QalculateEditDataSetDialog::propertySelectionChanged() {
- QListViewItem *i = propertiesView->selectedItem();
+ TQListViewItem *i = propertiesView->selectedItem();
if(i) {
editPropertyButton->setEnabled(propertiesItems[i]->isUserModified());
deletePropertyButton->setEnabled(propertiesItems[i]->isUserModified());
@@ -163,8 +163,8 @@ void QalculateEditDataSetDialog::updateDatasetPropertyList() {
propertiesItems.clear();
editPropertyButton->setEnabled(false);
deletePropertyButton->setEnabled(false);
- QString str;
- QListViewItem *i_prev = NULL;
+ TQString str;
+ TQListViewItem *i_prev = NULL;
for(size_t i = 0; i < tmp_props.size(); i++) {
if(tmp_props[i]) {
str = "";
@@ -195,7 +195,7 @@ void QalculateEditDataSetDialog::updateDatasetPropertyList() {
str += i18n("key");
str += ")";
}
- QListViewItem *item = new KListViewItem(propertiesView, i_prev, tmp_props[i]->title(false).c_str(), tmp_props[i]->getName().c_str(), str);
+ TQListViewItem *item = new KListViewItem(propertiesView, i_prev, tmp_props[i]->title(false).c_str(), tmp_props[i]->getName().c_str(), str);
i_prev = item;
propertiesItems[item] = tmp_props[i];
}
@@ -232,7 +232,7 @@ void QalculateEditDataSetDialog::slotOk() {
ds = new DataSet(i18n("Data Sets").ascii(), "", fileEdit->text().ascii(), titleEdit->text().ascii(), descriptionEdit->text().ascii(), true);
add_func = true;
}
- QString str2 = objectArgumentEdit->text().stripWhiteSpace();
+ TQString str2 = objectArgumentEdit->text().stripWhiteSpace();
if(str2.isEmpty()) str2 = i18n("Object");
Argument *arg = ds->getArgumentDefinition(1);
if(arg) {
@@ -354,7 +354,7 @@ DataSet *QalculateEditDataSetDialog::editDataSet(DataSet *ds) {
}
updateDatasetPropertyList();
- if(exec() == QDialog::Accepted) {
+ if(exec() == TQDialog::Accepted) {
ds = edited_dataset;
edited_dataset = NULL;
return ds;
@@ -394,7 +394,7 @@ void QalculateEditDataSetDialog::newProperty() {
}
void QalculateEditDataSetDialog::editProperty() {
- QListViewItem *i = propertiesView->selectedItem();
+ TQListViewItem *i = propertiesView->selectedItem();
if(i == NULL) return;
if(!property_edit_dialog) {
property_edit_dialog = new QalculateEditDataPropertyDialog(this);
@@ -404,7 +404,7 @@ void QalculateEditDataSetDialog::editProperty() {
}
}
void QalculateEditDataSetDialog::deleteProperty() {
- QListViewItem *i = propertiesView->selectedItem();
+ TQListViewItem *i = propertiesView->selectedItem();
if(i == NULL) return;
if(propertiesItems[i]->isUserModified()) {
for(size_t index = 0; index < tmp_props.size(); index++) {
@@ -422,7 +422,7 @@ void QalculateEditDataSetDialog::deleteProperty() {
}
}
-void QalculateEditDataSetDialog::nameChanged(const QString &name) {
+void QalculateEditDataSetDialog::nameChanged(const TQString &name) {
if(name.isNull()) return;
if(!CALCULATOR->functionNameIsValid(name.ascii())) {
nameEdit->blockSignals(true);
@@ -432,54 +432,54 @@ void QalculateEditDataSetDialog::nameChanged(const QString &name) {
}
-QalculateEditDataPropertyDialog::QalculateEditDataPropertyDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Property"), Ok | Cancel, Ok, true) {
+QalculateEditDataPropertyDialog::QalculateEditDataPropertyDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Property"), Ok | Cancel, Ok, true) {
names_edit_dialog = NULL;
edited_property = NULL;
- setMainWidget(new QWidget(this));
- QGridLayout *grid = new QGridLayout(mainWidget(), 1, 1, 0, spacingHint());
- grid->addWidget(new QLabel(i18n("Name:"), mainWidget()), 0, 0);
+ setMainWidget(new TQWidget(this));
+ TQGridLayout *grid = new TQGridLayout(mainWidget(), 1, 1, 0, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Name:"), mainWidget()), 0, 0);
nameEdit = new KLineEdit(mainWidget());
grid->addWidget(nameEdit, 0, 1);
- QHBoxLayout *hbox = new QHBoxLayout(0, 0, spacingHint());
+ TQHBoxLayout *hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 1, 1, 0, 1);
- namesLabel = new QLabel(mainWidget());
- namesLabel->setAlignment(Qt::AlignRight);
- namesLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ namesLabel = new TQLabel(mainWidget());
+ namesLabel->setAlignment(TQt::AlignRight);
+ namesLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
hbox->addWidget(namesLabel);
- namesButton = new QPushButton(i18n("Names Details"), mainWidget());
+ namesButton = new TQPushButton(i18n("Names Details"), mainWidget());
hbox->addWidget(namesButton);
- grid->addWidget(new QLabel(i18n("Descriptive name:"), mainWidget()), 2, 0);
+ grid->addWidget(new TQLabel(i18n("Descriptive name:"), mainWidget()), 2, 0);
titleEdit = new KLineEdit(mainWidget());
grid->addWidget(titleEdit, 2, 1);
- grid->addWidget(new QLabel(i18n("Description:"), mainWidget()), 3, 0);
+ grid->addWidget(new TQLabel(i18n("Description:"), mainWidget()), 3, 0);
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 1
- descriptionEdit = new QTextEdit(mainWidget());
+ descriptionEdit = new TQTextEdit(mainWidget());
#else
descriptionEdit = new KTextEdit(mainWidget());
#endif
- descriptionEdit->setTextFormat(QTextEdit::PlainText);
+ descriptionEdit->setTextFormat(TQTextEdit::PlainText);
grid->addMultiCellWidget(descriptionEdit, 4, 4, 0, 1);
- grid->addWidget(new QLabel(i18n("Value type:"), mainWidget()), 5, 0);
+ grid->addWidget(new TQLabel(i18n("Value type:"), mainWidget()), 5, 0);
typeCombo = new KComboBox(mainWidget());
typeCombo->setEditable(false);
typeCombo->insertItem(i18n("Text"));
typeCombo->insertItem(i18n("Number"));
typeCombo->insertItem(i18n("Expression"));
grid->addWidget(typeCombo, 5, 1);
- hideButton = new QCheckBox(i18n("Hide"), mainWidget());
+ hideButton = new TQCheckBox(i18n("Hide"), mainWidget());
grid->addWidget(hideButton, 6, 0);
//Use as a unique data set key
- keyButton = new QCheckBox(i18n("Use as key"), mainWidget());
+ keyButton = new TQCheckBox(i18n("Use as key"), mainWidget());
grid->addWidget(keyButton, 6, 1);
- approximateButton = new QCheckBox(i18n("Approximate value"), mainWidget());
+ approximateButton = new TQCheckBox(i18n("Approximate value"), mainWidget());
grid->addWidget(approximateButton, 7, 0);
- caseButton = new QCheckBox(i18n("Case sensitive value"), mainWidget());
+ caseButton = new TQCheckBox(i18n("Case sensitive value"), mainWidget());
grid->addWidget(caseButton, 7, 1);
- bracketsButton = new QCheckBox(i18n("Value uses brackets"), mainWidget());
+ bracketsButton = new TQCheckBox(i18n("Value uses brackets"), mainWidget());
grid->addWidget(bracketsButton, 8, 0);
- grid->addWidget(new QLabel(i18n("Unit expression:"), mainWidget()), 9, 0);
+ grid->addWidget(new TQLabel(i18n("Unit expression:"), mainWidget()), 9, 0);
unitEdit = new KLineEdit(mainWidget());
grid->addWidget(unitEdit, 9, 1);
@@ -554,7 +554,7 @@ bool QalculateEditDataPropertyDialog::editDataProperty(DataProperty *dp, bool ne
nameEdit->setText(dp->getName().c_str());
if(dp->countNames() > 1) {
- QString str = "+ ";
+ TQString str = "+ ";
for(size_t i = 2; i <= dp->countNames(); i++) {
if(i > 2) str += ", ";
str += dp->getName(i).c_str();
@@ -590,7 +590,7 @@ bool QalculateEditDataPropertyDialog::editDataProperty(DataProperty *dp, bool ne
}
}
- if(exec() == QDialog::Accepted) {
+ if(exec() == TQDialog::Accepted) {
edited_property = NULL;
return true;
}
@@ -610,28 +610,28 @@ void QalculateEditDataPropertyDialog::editNames() {
}
-QalculateEditDataPropertyNamesDialog::QalculateEditDataPropertyNamesDialog(QWidget *parent, const char *name) : KDialog(parent, name, true) {
+QalculateEditDataPropertyNamesDialog::QalculateEditDataPropertyNamesDialog(TQWidget *parent, const char *name) : KDialog(parent, name, true) {
setCaption(i18n("Edit Names"));
- QVBoxLayout *layout = new QVBoxLayout(this, marginHint(), spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(this, marginHint(), spacingHint());
namesView = new KListView(this);
namesView->addColumn(i18n("Name"));
namesView->addColumn(i18n("Reference"));
- namesView->setColumnAlignment(1, Qt::AlignCenter);
+ namesView->setColumnAlignment(1, TQt::AlignCenter);
namesView->setSorting(-1);
namesView->setItemsRenameable(true);
namesView->setItemsMovable(true);
layout->addWidget(namesView);
- QHBoxLayout *buttonLayout = new QHBoxLayout(layout, spacingHint());
- newButton = new QPushButton(i18n("New"), this);
+ TQHBoxLayout *buttonLayout = new TQHBoxLayout(layout, spacingHint());
+ newButton = new TQPushButton(i18n("New"), this);
buttonLayout->addWidget(newButton);
- deleteButton = new QPushButton(i18n("Delete"), this);
+ deleteButton = new TQPushButton(i18n("Delete"), this);
deleteButton->setEnabled(false);
buttonLayout->addWidget(deleteButton);
- buttonLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ buttonLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
buttonClose = new KPushButton(KStdGuiItem::close(), this);
buttonClose->setAutoDefault(true);
buttonClose->setDefault(true);
@@ -641,7 +641,7 @@ QalculateEditDataPropertyNamesDialog::QalculateEditDataPropertyNamesDialog(QWidg
connect(buttonClose, SIGNAL(clicked()), this, SLOT(accept()));
connect(newButton, SIGNAL(clicked()), this, SLOT(newName()));
connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteName()));
- connect(namesView, SIGNAL(clicked(QListViewItem*, const QPoint&, int)), this, SLOT(itemClicked(QListViewItem*, const QPoint&, int)));
+ connect(namesView, SIGNAL(clicked(TQListViewItem*, const TQPoint&, int)), this, SLOT(itemClicked(TQListViewItem*, const TQPoint&, int)));
}
@@ -649,22 +649,22 @@ QalculateEditDataPropertyNamesDialog::~QalculateEditDataPropertyNamesDialog() {}
void QalculateEditDataPropertyNamesDialog::newName() {
ExpressionName name;
- QListViewItem *i = new KListViewItem(namesView, namesView->lastChild(), "", i18n("No"), i18n("No"), i18n("No"), i18n("No"), i18n("No"), i18n("No"), i18n("No"));
+ TQListViewItem *i = new KListViewItem(namesView, namesView->lastChild(), "", i18n("No"), i18n("No"), i18n("No"), i18n("No"), i18n("No"), i18n("No"), i18n("No"));
namesView->setSelected(i, true);
- qApp->processEvents();
+ tqApp->processEvents();
namesView->rename(i, 0);
}
-void QalculateEditDataPropertyNamesDialog::setNames(DataProperty *item, const QString &namestr, bool names_edited) {
+void QalculateEditDataPropertyNamesDialog::setNames(DataProperty *item, const TQString &namestr, bool names_edited) {
if(!names_edited) {
deleteButton->setEnabled(false);
namesView->clear();
}
if(!names_edited && item && item->countNames() > 0) {
- QListViewItem *i_prev = NULL;
+ TQListViewItem *i_prev = NULL;
for(size_t index = 1; index <= item->countNames(); index++) {
- QListViewItem *i = new KListViewItem(namesView, i_prev);
+ TQListViewItem *i = new KListViewItem(namesView, i_prev);
i_prev = i;
if(item->nameIsReference(index))
i->setText(1, i18n("Yes"));
@@ -678,7 +678,7 @@ void QalculateEditDataPropertyNamesDialog::setNames(DataProperty *item, const QS
}
} else if(!namestr.isEmpty()) {
if(names_edited) {
- QListViewItemIterator it(namesView);
+ TQListViewItemIterator it(namesView);
if(it.current())
it.current()->setText(0, namestr);
} else {
@@ -686,9 +686,9 @@ void QalculateEditDataPropertyNamesDialog::setNames(DataProperty *item, const QS
}
}
}
-void QalculateEditDataPropertyNamesDialog::saveNames(DataProperty *item, const QString &str) {
+void QalculateEditDataPropertyNamesDialog::saveNames(DataProperty *item, const TQString &str) {
item->clearNames();
- QListViewItemIterator it(namesView);
+ TQListViewItemIterator it(namesView);
if(it.current()) {
bool b = false;
while(it.current()) {
@@ -704,10 +704,10 @@ void QalculateEditDataPropertyNamesDialog::saveNames(DataProperty *item, const Q
item->addName(str.ascii());
}
}
-void QalculateEditDataPropertyNamesDialog::setNamesLE(QLineEdit *entry, QLabel *label) {
+void QalculateEditDataPropertyNamesDialog::setNamesLE(TQLineEdit *entry, TQLabel *label) {
int index = 0;
- QString str;
- QListViewItemIterator it(namesView);
+ TQString str;
+ TQListViewItemIterator it(namesView);
while(it.current()) {
if(index == 0) {
entry->setText(it.current()->text(0));
@@ -732,7 +732,7 @@ void QalculateEditDataPropertyNamesDialog::deleteName() {
namesView->removeItem(namesView->selectedItem());
}
-void QalculateEditDataPropertyNamesDialog::itemClicked(QListViewItem *i, const QPoint &, int c) {
+void QalculateEditDataPropertyNamesDialog::itemClicked(TQListViewItem *i, const TQPoint &, int c) {
if(i && c > 0) {
if(i->text(c) == i18n("Yes"))
i->setText(c, i18n("No"));
diff --git a/src/qalculateeditdatasetdialog.h b/src/qalculateeditdatasetdialog.h
index 2c27b65..3dde6fa 100644
--- a/src/qalculateeditdatasetdialog.h
+++ b/src/qalculateeditdatasetdialog.h
@@ -21,24 +21,24 @@
#define QALCULATEEDITDATASETDIALOG_H
#include <kdialogbase.h>
-#include <qmap.h>
-#include <qvaluevector.h>
+#include <tqmap.h>
+#include <tqvaluevector.h>
class KLineEdit;
-class QCheckBox;
+class TQCheckBox;
class KComboBox;
-class QPushButton;
+class TQPushButton;
class MathStructure;
class QalculateEditNamesDialog;
class DataSet;
class KListView;
-class QTextEdit;
+class TQTextEdit;
class DataProperty;
-class QTabWidget;
+class TQTabWidget;
class UserFunction;
class QalculateEditDataPropertyDialog;
class QalculateEditDataPropertyNamesDialog;
-class QLineEdit;
+class TQLineEdit;
/**
@author Niklas Knutsson
@@ -49,7 +49,7 @@ class QalculateEditDataSetDialog : public KDialogBase {
public:
- QalculateEditDataSetDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateEditDataSetDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateEditDataSetDialog();
DataSet *editDataSet(DataSet *ds = NULL);
@@ -59,14 +59,14 @@ public:
QalculateEditDataPropertyDialog *property_edit_dialog;
DataSet *edited_dataset;
KLineEdit *objectArgumentEdit, *propertyArgumentEdit, *defaultPropertyEdit, *nameEdit, *titleEdit, *fileEdit;
- QLabel *namesLabel;
+ TQLabel *namesLabel;
KListView *propertiesView;
- QTextEdit *descriptionEdit, *copyrightEdit;
- QPushButton *namesButton, *newPropertyButton, *editPropertyButton, *deletePropertyButton;
- QTabWidget *tabs;
- QMap<QListViewItem*, DataProperty*> propertiesItems;
- QValueVector<DataProperty*> tmp_props;
- QValueVector<DataProperty*> tmp_props_orig;
+ TQTextEdit *descriptionEdit, *copyrightEdit;
+ TQPushButton *namesButton, *newPropertyButton, *editPropertyButton, *deletePropertyButton;
+ TQTabWidget *tabs;
+ TQMap<TQListViewItem*, DataProperty*> propertiesItems;
+ TQValueVector<DataProperty*> tmp_props;
+ TQValueVector<DataProperty*> tmp_props_orig;
public slots:
@@ -75,7 +75,7 @@ public slots:
void newProperty();
void editProperty();
void deleteProperty();
- void nameChanged(const QString&);
+ void nameChanged(const TQString&);
protected slots:
@@ -89,7 +89,7 @@ class QalculateEditDataPropertyDialog : public KDialogBase {
public:
- QalculateEditDataPropertyDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateEditDataPropertyDialog(TQWidget *parent = 0, const char *name = 0);
~QalculateEditDataPropertyDialog();
bool editDataProperty(DataProperty *dp, bool newdp = false);
@@ -98,10 +98,10 @@ public:
DataProperty *edited_property;
KComboBox *typeCombo;
KLineEdit *nameEdit, *titleEdit, *unitEdit;
- QLabel *namesLabel;
- QCheckBox *hideButton, *keyButton, *approximateButton, *caseButton, *bracketsButton;
- QPushButton *namesButton;
- QTextEdit *descriptionEdit;
+ TQLabel *namesLabel;
+ TQCheckBox *hideButton, *keyButton, *approximateButton, *caseButton, *bracketsButton;
+ TQPushButton *namesButton;
+ TQTextEdit *descriptionEdit;
public slots:
@@ -119,23 +119,23 @@ class QalculateEditDataPropertyNamesDialog : public KDialog {
public:
- QalculateEditDataPropertyNamesDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateEditDataPropertyNamesDialog(TQWidget *parent = 0, const char *name = 0);
~QalculateEditDataPropertyNamesDialog();
- void saveNames(DataProperty *item, const QString &str = QString::null);
- void setNames(DataProperty *item = NULL, const QString &namestr = QString::null, bool names_edited = false);
+ void saveNames(DataProperty *item, const TQString &str = TQString::null);
+ void setNames(DataProperty *item = NULL, const TQString &namestr = TQString::null, bool names_edited = false);
bool isEmpty();
- void setNamesLE(QLineEdit *entry, QLabel *label);
+ void setNamesLE(TQLineEdit *entry, TQLabel *label);
KListView* namesView;
- QPushButton* newButton;
- QPushButton* deleteButton;
- QPushButton* buttonClose;
+ TQPushButton* newButton;
+ TQPushButton* deleteButton;
+ TQPushButton* buttonClose;
int i_type;
public slots:
- void itemClicked(QListViewItem*, const QPoint&, int);
+ void itemClicked(TQListViewItem*, const TQPoint&, int);
void newName();
void deleteName();
void nameSelectionChanged();
diff --git a/src/qalculateeditfunctiondialog.cpp b/src/qalculateeditfunctiondialog.cpp
index 5bb2e85..2264d55 100644
--- a/src/qalculateeditfunctiondialog.cpp
+++ b/src/qalculateeditfunctiondialog.cpp
@@ -21,30 +21,30 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditnamesdialog.h"
-#include <qgrid.h>
+#include <tqgrid.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kcombobox.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qcheckbox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqcheckbox.h>
#include <kmessagebox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdeversion.h>
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 1
-#include <qtextedit.h>
+#include <tqtextedit.h>
#else
#include <ktextedit.h>
#endif
#include <klistview.h>
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#else
#include <ktabwidget.h>
#endif
-#include <qheader.h>
+#include <tqheader.h>
#include <kapplication.h>
#include <kstdguiitem.h>
@@ -52,7 +52,7 @@ extern PrintOptions printops;
extern EvaluationOptions evalops;
extern tree_struct function_cats;
-QalculateEditFunctionDialog::QalculateEditFunctionDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Function"), Ok | Cancel | Help, Ok, false) {
+QalculateEditFunctionDialog::QalculateEditFunctionDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Function"), Ok | Cancel | Help, Ok, false) {
names_edit_dialog = NULL;
subfunctions_edit_dialog = NULL;
@@ -60,66 +60,66 @@ QalculateEditFunctionDialog::QalculateEditFunctionDialog(QWidget *parent, const
argument_edit_dialog = NULL;
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
- tabs = new QTabWidget(this);
+ tabs = new TQTabWidget(this);
#else
tabs = new KTabWidget(this);
#endif
setMainWidget(tabs);
- QWidget *page1 = new QWidget(this);
- QWidget *page2 = new QWidget(this);
+ TQWidget *page1 = new TQWidget(this);
+ TQWidget *page2 = new TQWidget(this);
tabs->addTab(page1, i18n("General"));
tabs->addTab(page2, i18n("Function"));
- QGridLayout *grid = new QGridLayout(page1, 1, 1, spacingHint());
- QVBoxLayout *vbox = new QVBoxLayout(page2, spacingHint());
- grid->addWidget(new QLabel(i18n("Name:"), page1), 0, 0);
+ TQGridLayout *grid = new TQGridLayout(page1, 1, 1, spacingHint());
+ TQVBoxLayout *vbox = new TQVBoxLayout(page2, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Name:"), page1), 0, 0);
nameEdit = new KLineEdit(page1);
grid->addWidget(nameEdit, 0, 1);
- QHBoxLayout *hbox = new QHBoxLayout(0, 0, spacingHint());
+ TQHBoxLayout *hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 1, 1, 0, 1);
- namesLabel = new QLabel(page1);
- namesLabel->setAlignment(Qt::AlignRight);
- namesLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ namesLabel = new TQLabel(page1);
+ namesLabel->setAlignment(TQt::AlignRight);
+ namesLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
hbox->addWidget(namesLabel);
- namesButton = new QPushButton(i18n("Names Details"), page1);
+ namesButton = new TQPushButton(i18n("Names Details"), page1);
hbox->addWidget(namesButton);
- grid->addWidget(new QLabel(i18n("Category:"), page1), 2, 0);
+ grid->addWidget(new TQLabel(i18n("Category:"), page1), 2, 0);
categoryCombo = new KComboBox(page1);
categoryCombo->setMaximumWidth(250);
categoryCombo->setEditable(true);
grid->addWidget(categoryCombo, 2, 1);
- grid->addWidget(new QLabel(i18n("Descriptive name:"), page1), 3, 0);
+ grid->addWidget(new TQLabel(i18n("Descriptive name:"), page1), 3, 0);
titleEdit = new KLineEdit(page1);
grid->addWidget(titleEdit, 3, 1);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 4, 4, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- hideButton = new QCheckBox(i18n("Hide function"), page1);
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ hideButton = new TQCheckBox(i18n("Hide function"), page1);
hbox->addWidget(hideButton);
- grid->addWidget(new QLabel(i18n("Description:"), page1), 5, 0);
+ grid->addWidget(new TQLabel(i18n("Description:"), page1), 5, 0);
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 1
- descriptionEdit = new QTextEdit(page1);
+ descriptionEdit = new TQTextEdit(page1);
#else
descriptionEdit = new KTextEdit(page1);
#endif
- descriptionEdit->setTextFormat(QTextEdit::PlainText);
+ descriptionEdit->setTextFormat(TQTextEdit::PlainText);
grid->addMultiCellWidget(descriptionEdit, 6, 6, 0, 1);
- vbox->addWidget(new QLabel(i18n("Expression:"), page2));
+ vbox->addWidget(new TQLabel(i18n("Expression:"), page2));
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 1
- expressionEdit = new QTextEdit(page2);
+ expressionEdit = new TQTextEdit(page2);
#else
expressionEdit = new KTextEdit(page2);
#endif
- expressionEdit->setTextFormat(QTextEdit::PlainText);
+ expressionEdit->setTextFormat(TQTextEdit::PlainText);
vbox->addWidget(expressionEdit);
- hbox = new QHBoxLayout(vbox, spacingHint());
- hbox->addWidget(new QLabel(i18n("Condition:"), page2));
+ hbox = new TQHBoxLayout(vbox, spacingHint());
+ hbox->addWidget(new TQLabel(i18n("Condition:"), page2));
conditionEdit = new KLineEdit(page2);
hbox->addWidget(conditionEdit);
- hbox = new QHBoxLayout(vbox, spacingHint());
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- subFunctionsButton = new QPushButton(i18n("Sub-Functions"), page2);
+ hbox = new TQHBoxLayout(vbox, spacingHint());
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ subFunctionsButton = new TQPushButton(i18n("Sub-Functions"), page2);
hbox->addWidget(subFunctionsButton);
- vbox->addWidget(new QLabel(i18n("Arguments:"), page2));
+ vbox->addWidget(new TQLabel(i18n("Arguments:"), page2));
argumentsView = new KListView(page2);
argumentsView->addColumn(i18n("Name"));
argumentsView->addColumn(i18n("Type"));
@@ -128,22 +128,22 @@ QalculateEditFunctionDialog::QalculateEditFunctionDialog(QWidget *parent, const
argumentsView->setItemsRenameable(true);
argumentsView->setItemsMovable(false);
vbox->addWidget(argumentsView);
- hbox = new QHBoxLayout(vbox, spacingHint());
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- newArgumentButton = new QPushButton(i18n("New"), page2);
+ hbox = new TQHBoxLayout(vbox, spacingHint());
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ newArgumentButton = new TQPushButton(i18n("New"), page2);
hbox->addWidget(newArgumentButton);
- editArgumentButton = new QPushButton(i18n("Edit"), page2);
+ editArgumentButton = new TQPushButton(i18n("Edit"), page2);
hbox->addWidget(editArgumentButton);
- deleteArgumentButton = new QPushButton(i18n("Delete"), page2);
+ deleteArgumentButton = new TQPushButton(i18n("Delete"), page2);
hbox->addWidget(deleteArgumentButton);
connect(namesButton, SIGNAL(clicked()), this, SLOT(editNames()));
connect(subFunctionsButton, SIGNAL(clicked()), this, SLOT(editSubFunctions()));
- connect(nameEdit, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)));
+ connect(nameEdit, SIGNAL(textChanged(const TQString&)), this, SLOT(nameChanged(const TQString&)));
connect(newArgumentButton, SIGNAL(clicked()), this, SLOT(newArgument()));
connect(editArgumentButton, SIGNAL(clicked()), this, SLOT(editArgument()));
connect(deleteArgumentButton, SIGNAL(clicked()), this, SLOT(deleteArgument()));
- connect(argumentsView, SIGNAL(itemRenamed(QListViewItem*, const QString&, int)), this, SLOT(argumentRenamed(QListViewItem*, const QString&, int)));
+ connect(argumentsView, SIGNAL(itemRenamed(TQListViewItem*, const TQString&, int)), this, SLOT(argumentRenamed(TQListViewItem*, const TQString&, int)));
connect(argumentsView, SIGNAL(selectionChanged()), this, SLOT(argumentSelectionChanged()));
}
@@ -156,7 +156,7 @@ void QalculateEditFunctionDialog::slotHelp() {
}
void QalculateEditFunctionDialog::argumentSelectionChanged() {
- QListViewItem *i = argumentsView->selectedItem();
+ TQListViewItem *i = argumentsView->selectedItem();
if(i == NULL || (edited_function && edited_function->isBuiltin()) || argumentsItems[i]->type() > ARGUMENT_TYPE_ANGLE) {
editArgumentButton->setEnabled(false);
deleteArgumentButton->setEnabled(false);
@@ -165,7 +165,7 @@ void QalculateEditFunctionDialog::argumentSelectionChanged() {
deleteArgumentButton->setEnabled(true);
}
}
-void QalculateEditFunctionDialog::argumentRenamed(QListViewItem *i, const QString &str, int col) {
+void QalculateEditFunctionDialog::argumentRenamed(TQListViewItem *i, const TQString &str, int col) {
if(!i || col != 0) return;
if(col == 0) {
if(!argumentsItemsEdited[i]) {
@@ -220,7 +220,7 @@ void QalculateEditFunctionDialog::slotOk() {
}
f->setCondition(CALCULATOR->unlocalizeExpression(conditionEdit->text().ascii(), evalops.parse_options));
size_t index = 1;
- QListViewItemIterator it(argumentsView);
+ TQListViewItemIterator it(argumentsView);
while(it.current()) {
if(argumentsItemsEdited[it.current()]) {
if(f->isBuiltin() && f->getArgumentDefinition(index)) {
@@ -267,7 +267,7 @@ void QalculateEditFunctionDialog::slotOk() {
}
-MathFunction *QalculateEditFunctionDialog::editFunction(QString category, MathFunction *f) {
+MathFunction *QalculateEditFunctionDialog::editFunction(TQString category, MathFunction *f) {
nameEdit->setFocus();
@@ -290,7 +290,7 @@ MathFunction *QalculateEditFunctionDialog::editFunction(QString category, MathFu
setCaption(i18n("New Function"));
}
- QString catstr;
+ TQString catstr;
categoryCombo->clear();
tree_struct *item, *item2;
function_cats.it = function_cats.items.begin();
@@ -364,8 +364,8 @@ MathFunction *QalculateEditFunctionDialog::editFunction(QString category, MathFu
if(args < 0) {
args = f->minargs() + 1;
}
- QString str, str2;
- QListViewItem *i_prev = NULL;
+ TQString str, str2;
+ TQListViewItem *i_prev = NULL;
for(int i = 1; i <= args; i++) {
arg = f->getArgumentDefinition(i);
if(arg) {
@@ -377,7 +377,7 @@ MathFunction *QalculateEditFunctionDialog::editFunction(QString category, MathFu
str = defarg.printlong().c_str();
str2 = "";
}
- QListViewItem *i_new = new KListViewItem(argumentsView, i_prev, str2, str);
+ TQListViewItem *i_new = new KListViewItem(argumentsView, i_prev, str2, str);
i_prev = i_new;
argumentsItems[i_new] = arg;
argumentsItemsEdited[i_new] = false;
@@ -385,12 +385,12 @@ MathFunction *QalculateEditFunctionDialog::editFunction(QString category, MathFu
}
argumentsView->setResizeMode(KListView::AllColumns);
- if(exec() == QDialog::Accepted) {
+ if(exec() == TQDialog::Accepted) {
f = edited_function;
edited_function = NULL;
return f;
}
- QListViewItemIterator it(argumentsView);
+ TQListViewItemIterator it(argumentsView);
while(it.current()) {
if(argumentsItemsEdited[it.current()]) {
delete argumentsItems[it.current()];
@@ -419,13 +419,13 @@ void QalculateEditFunctionDialog::newArgument() {
}
Argument *arg = argument_edit_dialog->editArgument();
if(arg) {
- QListViewItem *i = new KListViewItem(argumentsView, argumentsView->lastChild(), arg->name().c_str(), arg->printlong().c_str());
+ TQListViewItem *i = new KListViewItem(argumentsView, argumentsView->lastChild(), arg->name().c_str(), arg->printlong().c_str());
argumentsItems[i] = arg;
argumentsItemsEdited[i] = true;
}
}
void QalculateEditFunctionDialog::editArgument() {
- QListViewItem *i = argumentsView->selectedItem();
+ TQListViewItem *i = argumentsView->selectedItem();
if(i == NULL) return;
if(!argument_edit_dialog) {
argument_edit_dialog = new QalculateEditArgumentDialog(this);
@@ -442,7 +442,7 @@ void QalculateEditFunctionDialog::editArgument() {
}
}
void QalculateEditFunctionDialog::deleteArgument() {
- QListViewItem *i = argumentsView->selectedItem();
+ TQListViewItem *i = argumentsView->selectedItem();
if(i == NULL) return;
if(argumentsItemsEdited[i]) {
delete argumentsItems[i];
@@ -462,7 +462,7 @@ void QalculateEditFunctionDialog::editSubFunctions() {
subfunctions_edit_dialog->exec();
}
-void QalculateEditFunctionDialog::nameChanged(const QString &name) {
+void QalculateEditFunctionDialog::nameChanged(const TQString &name) {
if(name.isNull()) return;
if(!CALCULATOR->functionNameIsValid(name.ascii())) {
nameEdit->blockSignals(true);
@@ -471,11 +471,11 @@ void QalculateEditFunctionDialog::nameChanged(const QString &name) {
}
}
-QalculateEditSubFunctionsDialog::QalculateEditSubFunctionsDialog(QWidget *parent, const char *name) : KDialog(parent, name, true) {
+QalculateEditSubFunctionsDialog::QalculateEditSubFunctionsDialog(TQWidget *parent, const char *name) : KDialog(parent, name, true) {
setCaption(i18n("Sub-Functions"));
- QVBoxLayout *layout = new QVBoxLayout(this, marginHint(), spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(this, marginHint(), spacingHint());
subFunctionsView = new KListView(this);
subFunctionsView->addColumn(i18n("Reference"));
@@ -488,13 +488,13 @@ QalculateEditSubFunctionsDialog::QalculateEditSubFunctionsDialog(QWidget *parent
subFunctionsView->setItemsMovable(false);
layout->addWidget(subFunctionsView);
- QHBoxLayout *buttonLayout = new QHBoxLayout(layout, spacingHint());
- newButton = new QPushButton(i18n("New"), this);
+ TQHBoxLayout *buttonLayout = new TQHBoxLayout(layout, spacingHint());
+ newButton = new TQPushButton(i18n("New"), this);
buttonLayout->addWidget(newButton);
- deleteButton = new QPushButton(i18n("Delete"), this);
+ deleteButton = new TQPushButton(i18n("Delete"), this);
deleteButton->setEnabled(false);
buttonLayout->addWidget(deleteButton);
- buttonLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ buttonLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
buttonClose = new KPushButton(KStdGuiItem::close(), this);
buttonClose->setAutoDefault(true);
buttonClose->setDefault(true);
@@ -504,18 +504,18 @@ QalculateEditSubFunctionsDialog::QalculateEditSubFunctionsDialog(QWidget *parent
connect(buttonClose, SIGNAL(clicked()), this, SLOT(accept()));
connect(newButton, SIGNAL(clicked()), this, SLOT(newSubFunction()));
connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteSubFunction()));
- connect(subFunctionsView, SIGNAL(clicked(QListViewItem*, const QPoint&, int)), this, SLOT(itemClicked(QListViewItem*, const QPoint&, int)));
+ connect(subFunctionsView, SIGNAL(clicked(TQListViewItem*, const TQPoint&, int)), this, SLOT(itemClicked(TQListViewItem*, const TQPoint&, int)));
}
QalculateEditSubFunctionsDialog::~QalculateEditSubFunctionsDialog() {}
void QalculateEditSubFunctionsDialog::newSubFunction() {
ExpressionName name;
- QString str = "\\";
- str += QString::number(subFunctionsView->childCount() + 1);
- QListViewItem *i = new KListViewItem(subFunctionsView, subFunctionsView->lastChild(), str, "", i18n("Yes"));
+ TQString str = "\\";
+ str += TQString::number(subFunctionsView->childCount() + 1);
+ TQListViewItem *i = new KListViewItem(subFunctionsView, subFunctionsView->lastChild(), str, "", i18n("Yes"));
subFunctionsView->setSelected(i, true);
- qApp->processEvents();
+ tqApp->processEvents();
subFunctionsView->rename(i, 1);
}
@@ -525,12 +525,12 @@ void QalculateEditSubFunctionsDialog::setSubFunctions(UserFunction *f, bool edit
subFunctionsView->clear();
}
if(!edited && f && f->countSubfunctions() > 0) {
- QListViewItem *i_prev = NULL;
+ TQListViewItem *i_prev = NULL;
for(size_t index = 1; index <= f->countSubfunctions(); index++) {
- QListViewItem *i = new KListViewItem(subFunctionsView, i_prev);
+ TQListViewItem *i = new KListViewItem(subFunctionsView, i_prev);
i_prev = i;
- QString str = "\\";
- str += QString::number(index);
+ TQString str = "\\";
+ str += TQString::number(index);
i->setText(0, str);
i->setText(1, f->getSubfunction(index).c_str());
if(f->subfunctionPrecalculated(index)) i->setText(2, i18n("Yes"));
@@ -540,7 +540,7 @@ void QalculateEditSubFunctionsDialog::setSubFunctions(UserFunction *f, bool edit
}
void QalculateEditSubFunctionsDialog::saveSubFunctions(UserFunction *f) {
f->clearSubfunctions();
- QListViewItemIterator it(subFunctionsView);
+ TQListViewItemIterator it(subFunctionsView);
while(it.current()) {
f->addSubfunction(it.current()->text(1).ascii(), it.current()->text(2) == i18n("Yes"));
++it;
@@ -552,18 +552,18 @@ bool QalculateEditSubFunctionsDialog::isEmpty() {
void QalculateEditSubFunctionsDialog::deleteSubFunction() {
subFunctionsView->removeItem(subFunctionsView->selectedItem());
- QListViewItemIterator it(subFunctionsView);
+ TQListViewItemIterator it(subFunctionsView);
int index = 1;
while(it.current()) {
- QString str = "\\";
- str += QString::number(index);
+ TQString str = "\\";
+ str += TQString::number(index);
it.current()->setText(0, str);
++it;
index++;
}
}
-void QalculateEditSubFunctionsDialog::itemClicked(QListViewItem *i, const QPoint &, int c) {
+void QalculateEditSubFunctionsDialog::itemClicked(TQListViewItem *i, const TQPoint &, int c) {
if(i && c == 2) {
if(i->text(c) == i18n("Yes"))
i->setText(c, i18n("No"));
@@ -576,14 +576,14 @@ void QalculateEditSubFunctionsDialog::selectionChanged() {
deleteButton->setEnabled(subFunctionsView->selectedItem() != NULL);
}
-QalculateEditArgumentDialog::QalculateEditArgumentDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Argument"), Ok | Cancel, Ok, true) {
+QalculateEditArgumentDialog::QalculateEditArgumentDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Argument"), Ok | Cancel, Ok, true) {
- setMainWidget(new QWidget(this));
- QGridLayout *grid = new QGridLayout(mainWidget(), 1, 1, 0, spacingHint());
- grid->addWidget(new QLabel(i18n("Name:"), mainWidget()), 0, 0);
+ setMainWidget(new TQWidget(this));
+ TQGridLayout *grid = new TQGridLayout(mainWidget(), 1, 1, 0, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Name:"), mainWidget()), 0, 0);
nameEdit = new KLineEdit(mainWidget());
grid->addWidget(nameEdit, 0, 1);
- grid->addWidget(new QLabel(i18n("Type:"), mainWidget()), 1, 0);
+ grid->addWidget(new TQLabel(i18n("Type:"), mainWidget()), 1, 0);
typeCombo = new KComboBox(mainWidget());
typeCombo->setEditable(false);
typeCombo->insertItem(i18n("Free"));
@@ -602,35 +602,35 @@ QalculateEditArgumentDialog::QalculateEditArgumentDialog(QWidget *parent, const
typeCombo->insertItem(i18n("File"));
typeCombo->insertItem(i18n("Angle"));
grid->addWidget(typeCombo, 1, 1);
- testButton = new QCheckBox(i18n("Enable rules and type test"), mainWidget());
+ testButton = new TQCheckBox(i18n("Enable rules and type test"), mainWidget());
grid->addMultiCellWidget(testButton, 2, 2, 0, 1);
- conditionButton = new QCheckBox(i18n("Custom condition:"), mainWidget());
+ conditionButton = new TQCheckBox(i18n("Custom condition:"), mainWidget());
grid->addWidget(conditionButton, 3, 0);
conditionEdit = new KLineEdit(mainWidget());
grid->addWidget(conditionEdit, 3, 1);
- matrixButton = new QCheckBox(i18n("Allow matrix"), mainWidget());
+ matrixButton = new TQCheckBox(i18n("Allow matrix"), mainWidget());
grid->addMultiCellWidget(matrixButton, 4, 4, 0, 1);
- zeroButton = new QCheckBox(i18n("Forbid zero"), mainWidget());
+ zeroButton = new TQCheckBox(i18n("Forbid zero"), mainWidget());
grid->addMultiCellWidget(zeroButton, 5, 5, 0, 1);
- complexButton = new QCheckBox(i18n("Allow complex"), mainWidget());
+ complexButton = new TQCheckBox(i18n("Allow complex"), mainWidget());
grid->addMultiCellWidget(complexButton, 6, 6, 0, 1);
- minButton = new QCheckBox(i18n("Min:"), mainWidget());
+ minButton = new TQCheckBox(i18n("Min:"), mainWidget());
grid->addWidget(minButton, 7, 0);
minEdit = new KLineEdit(mainWidget());
grid->addWidget(minEdit, 7, 1);
- QHBoxLayout *hbox = new QHBoxLayout(0, 0, spacingHint());
+ TQHBoxLayout *hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 8, 8, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- minIncludeEqualsButton = new QCheckBox(i18n("Include equals"), mainWidget());
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ minIncludeEqualsButton = new TQCheckBox(i18n("Include equals"), mainWidget());
hbox->addWidget(minIncludeEqualsButton);
- maxButton = new QCheckBox(i18n("Max:"), mainWidget());
+ maxButton = new TQCheckBox(i18n("Max:"), mainWidget());
grid->addWidget(maxButton, 9, 0);
maxEdit = new KLineEdit(mainWidget());
grid->addWidget(maxEdit, 9, 1);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 10, 10, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- maxIncludeEqualsButton = new QCheckBox(i18n("Include equals"), mainWidget());
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ maxIncludeEqualsButton = new TQCheckBox(i18n("Include equals"), mainWidget());
hbox->addWidget(maxIncludeEqualsButton);
connect(conditionButton, SIGNAL(toggled(bool)), conditionEdit, SLOT(setEnabled(bool)));
@@ -738,7 +738,7 @@ Argument *QalculateEditArgumentDialog::editArgument(Argument *arg) {
}
typeChanged(typeCombo->currentItem());
- if(exec() == QDialog::Accepted) {
+ if(exec() == TQDialog::Accepted) {
switch(typeCombo->currentItem()) {
case 1: {
arg = new NumberArgument();
diff --git a/src/qalculateeditfunctiondialog.h b/src/qalculateeditfunctiondialog.h
index ecd322d..2797ee1 100644
--- a/src/qalculateeditfunctiondialog.h
+++ b/src/qalculateeditfunctiondialog.h
@@ -21,22 +21,22 @@
#define QALCULATEEDITFUNCTIONDIALOG_H
#include <kdialogbase.h>
-#include <qmap.h>
+#include <tqmap.h>
-class QLabel;
+class TQLabel;
class KComboBox;
class KLineEdit;
-class QCheckBox;
-class QPushButton;
+class TQCheckBox;
+class TQPushButton;
class MathStructure;
class QalculateEditNamesDialog;
class QalculateEditSubFunctionsDialog;
class QalculateEditArgumentDialog;
class MathFunction;
class KListView;
-class QTextEdit;
+class TQTextEdit;
class Argument;
-class QTabWidget;
+class TQTabWidget;
class UserFunction;
/**
@@ -48,10 +48,10 @@ class QalculateEditFunctionDialog : public KDialogBase {
public:
- QalculateEditFunctionDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateEditFunctionDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateEditFunctionDialog();
- MathFunction *editFunction(QString category = QString::null, MathFunction *f = NULL);
+ MathFunction *editFunction(TQString category = TQString::null, MathFunction *f = NULL);
QalculateEditNamesDialog *names_edit_dialog;
QalculateEditSubFunctionsDialog *subfunctions_edit_dialog;
@@ -59,25 +59,25 @@ public:
MathFunction *edited_function;
KComboBox *categoryCombo;
KLineEdit *conditionEdit, *nameEdit, *titleEdit;
- QLabel *namesLabel;
- QCheckBox *hideButton;
+ TQLabel *namesLabel;
+ TQCheckBox *hideButton;
KListView *argumentsView;
- QTextEdit *descriptionEdit, *expressionEdit;
- QPushButton *namesButton, *subFunctionsButton, *newArgumentButton, *editArgumentButton, *deleteArgumentButton;
- QTabWidget *tabs;
- QMap<QListViewItem*, Argument*> argumentsItems;
- QMap<QListViewItem*, bool> argumentsItemsEdited;
+ TQTextEdit *descriptionEdit, *expressionEdit;
+ TQPushButton *namesButton, *subFunctionsButton, *newArgumentButton, *editArgumentButton, *deleteArgumentButton;
+ TQTabWidget *tabs;
+ TQMap<TQListViewItem*, Argument*> argumentsItems;
+ TQMap<TQListViewItem*, bool> argumentsItemsEdited;
public slots:
void argumentSelectionChanged();
- void argumentRenamed(QListViewItem*, const QString&, int);
+ void argumentRenamed(TQListViewItem*, const TQString&, int);
void editNames();
void newArgument();
void editArgument();
void deleteArgument();
void editSubFunctions();
- void nameChanged(const QString&);
+ void nameChanged(const TQString&);
protected slots:
@@ -92,7 +92,7 @@ class QalculateEditSubFunctionsDialog : public KDialog {
public:
- QalculateEditSubFunctionsDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateEditSubFunctionsDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateEditSubFunctionsDialog();
void saveSubFunctions(UserFunction *f);
@@ -100,13 +100,13 @@ public:
bool isEmpty();
KListView* subFunctionsView;
- QPushButton* newButton;
- QPushButton* deleteButton;
- QPushButton* buttonClose;
+ TQPushButton* newButton;
+ TQPushButton* deleteButton;
+ TQPushButton* buttonClose;
public slots:
- void itemClicked(QListViewItem*, const QPoint&, int);
+ void itemClicked(TQListViewItem*, const TQPoint&, int);
void newSubFunction();
void deleteSubFunction();
void selectionChanged();
@@ -119,14 +119,14 @@ class QalculateEditArgumentDialog : public KDialogBase {
public:
- QalculateEditArgumentDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateEditArgumentDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateEditArgumentDialog();
Argument *editArgument(Argument *arg = NULL);
KComboBox *typeCombo;
KLineEdit *nameEdit, *conditionEdit, *maxEdit, *minEdit;
- QCheckBox *conditionButton, *matrixButton, *zeroButton, *complexButton, *maxButton, *minButton, *maxIncludeEqualsButton, *minIncludeEqualsButton, *testButton;
+ TQCheckBox *conditionButton, *matrixButton, *zeroButton, *complexButton, *maxButton, *minButton, *maxIncludeEqualsButton, *minIncludeEqualsButton, *testButton;
public slots:
diff --git a/src/qalculateeditmatrixvectordialog.cpp b/src/qalculateeditmatrixvectordialog.cpp
index 7baa1b7..f25c917 100644
--- a/src/qalculateeditmatrixvectordialog.cpp
+++ b/src/qalculateeditmatrixvectordialog.cpp
@@ -21,101 +21,101 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditnamesdialog.h"
-#include <qgrid.h>
+#include <tqgrid.h>
#include <klineedit.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kcombobox.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qcheckbox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqcheckbox.h>
#include <kmessagebox.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qtable.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqtable.h>
#include <kapplication.h>
extern PrintOptions printops;
extern EvaluationOptions evalops;
extern tree_struct variable_cats;
-class QalculateEditMatrixVectorTableItem : public QTableItem {
+class QalculateEditMatrixVectorTableItem : public TQTableItem {
public:
- QalculateEditMatrixVectorTableItem(QTable *table);
- QalculateEditMatrixVectorTableItem(QTable *table, const QString & text);
+ QalculateEditMatrixVectorTableItem(TQTable *table);
+ QalculateEditMatrixVectorTableItem(TQTable *table, const TQString & text);
int alignment() const;
};
-class QalculateEditMatrixTable : public QTable {
+class QalculateEditMatrixTable : public TQTable {
public:
- QalculateEditMatrixTable(QWidget *parent = 0, const char *name = 0) : QTable(parent, name) {}
- QalculateEditMatrixTable(int numRows, int numCols, QWidget *parent = 0, const char *name = 0) : QTable(numRows, numCols, parent, name) {}
+ QalculateEditMatrixTable(TQWidget *parent = 0, const char *name = 0) : TQTable(parent, name) {}
+ QalculateEditMatrixTable(int numRows, int numCols, TQWidget *parent = 0, const char *name = 0) : TQTable(numRows, numCols, parent, name) {}
- QWidget *beginEdit(int row, int col, bool replace) {
- QWidget *w = QTable::beginEdit(row, col, replace);
- ((QLineEdit*) w)->selectAll();
+ TQWidget *beginEdit(int row, int col, bool replace) {
+ TQWidget *w = TQTable::beginEdit(row, col, replace);
+ ((TQLineEdit*) w)->selectAll();
return w;
}
};
-QalculateEditMatrixVectorDialog::QalculateEditMatrixVectorDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Variable"), Ok | Cancel | Help, Ok, true) {
+QalculateEditMatrixVectorDialog::QalculateEditMatrixVectorDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Variable"), Ok | Cancel | Help, Ok, true) {
names_edit_dialog = NULL;
edited_variable = NULL;
- setMainWidget(new QWidget(this));
- QGridLayout *grid = new QGridLayout(mainWidget(), 1, 1, 0, spacingHint());
- grid->addWidget(new QLabel(i18n("Name:"), mainWidget()), 0, 0);
+ setMainWidget(new TQWidget(this));
+ TQGridLayout *grid = new TQGridLayout(mainWidget(), 1, 1, 0, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Name:"), mainWidget()), 0, 0);
nameEdit = new KLineEdit(mainWidget());
grid->addWidget(nameEdit, 0, 1);
- QHBoxLayout *hbox = new QHBoxLayout(0, 0, spacingHint());
+ TQHBoxLayout *hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 1, 1, 0, 1);
- namesLabel = new QLabel(mainWidget());
- namesLabel->setAlignment(Qt::AlignRight);
- namesLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ namesLabel = new TQLabel(mainWidget());
+ namesLabel->setAlignment(TQt::AlignRight);
+ namesLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
hbox->addWidget(namesLabel);
- namesButton = new QPushButton(i18n("Names Details"), mainWidget());
+ namesButton = new TQPushButton(i18n("Names Details"), mainWidget());
hbox->addWidget(namesButton);
- grid->addWidget(new QLabel(i18n("Category:"), mainWidget()), 2, 0);
+ grid->addWidget(new TQLabel(i18n("Category:"), mainWidget()), 2, 0);
categoryCombo = new KComboBox(mainWidget());
categoryCombo->setEditable(true);
grid->addWidget(categoryCombo, 2, 1);
- grid->addWidget(new QLabel(i18n("Descriptive name:"), mainWidget()), 3, 0);
+ grid->addWidget(new TQLabel(i18n("Descriptive name:"), mainWidget()), 3, 0);
titleEdit = new KLineEdit(mainWidget());
grid->addWidget(titleEdit, 3, 1);
- grid->addWidget(new QLabel(i18n("Rows:"), mainWidget()), 4, 0);
- rowsBox = new QSpinBox(1, 1000, 1, mainWidget());
+ grid->addWidget(new TQLabel(i18n("Rows:"), mainWidget()), 4, 0);
+ rowsBox = new TQSpinBox(1, 1000, 1, mainWidget());
grid->addWidget(rowsBox, 4, 1);
- grid->addWidget(new QLabel(i18n("Columns:"), mainWidget()), 5, 0);
- columnsBox = new QSpinBox(1, 1000, 1, mainWidget());
+ grid->addWidget(new TQLabel(i18n("Columns:"), mainWidget()), 5, 0);
+ columnsBox = new TQSpinBox(1, 1000, 1, mainWidget());
grid->addWidget(columnsBox, 5, 1);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 6, 6, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- QButtonGroup *group = new QButtonGroup();
- matrixButton = new QRadioButton(i18n("Matrix"), mainWidget());
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ TQButtonGroup *group = new TQButtonGroup();
+ matrixButton = new TQRadioButton(i18n("Matrix"), mainWidget());
group->insert(matrixButton, 0);
hbox->addWidget(matrixButton);
- vectorButton = new QRadioButton(i18n("Vector"), mainWidget());
+ vectorButton = new TQRadioButton(i18n("Vector"), mainWidget());
group->insert(vectorButton, 1);
hbox->addWidget(vectorButton);
- elementsLabel = new QLabel(i18n("Elements:"), mainWidget());
+ elementsLabel = new TQLabel(i18n("Elements:"), mainWidget());
grid->addMultiCellWidget(elementsLabel, 7, 7, 0, 1);
elementsTable = new QalculateEditMatrixTable(0, 0, mainWidget());
grid->addMultiCellWidget(elementsTable, 8, 8, 0, 1);
connect(namesButton, SIGNAL(clicked()), this, SLOT(editNames()));
- connect(nameEdit, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)));
+ connect(nameEdit, SIGNAL(textChanged(const TQString&)), this, SLOT(nameChanged(const TQString&)));
connect(rowsBox, SIGNAL(valueChanged(int)), this, SLOT(rowsChanged(int)));
connect(columnsBox, SIGNAL(valueChanged(int)), this, SLOT(columnsChanged(int)));
connect(group, SIGNAL(clicked(int)), this, SLOT(typeChanged(int)));
@@ -169,10 +169,10 @@ void QalculateEditMatrixVectorDialog::columnsChanged(int i) {
}
}
-KnownVariable *QalculateEditMatrixVectorDialog::newVector(QString category) {
+KnownVariable *QalculateEditMatrixVectorDialog::newVector(TQString category) {
return editVariable(category, NULL, NULL, false, true);
}
-KnownVariable *QalculateEditMatrixVectorDialog::newMatrix(QString category) {
+KnownVariable *QalculateEditMatrixVectorDialog::newMatrix(TQString category) {
return editVariable(category, NULL, NULL, false, false);
}
@@ -268,7 +268,7 @@ void QalculateEditMatrixVectorDialog::slotOk() {
accept();
}
-KnownVariable *QalculateEditMatrixVectorDialog::editVariable(QString category, KnownVariable *v, MathStructure *initial_value, bool force_value, bool create_vector) {
+KnownVariable *QalculateEditMatrixVectorDialog::editVariable(TQString category, KnownVariable *v, MathStructure *initial_value, bool force_value, bool create_vector) {
nameEdit->setFocus();
@@ -319,8 +319,8 @@ KnownVariable *QalculateEditMatrixVectorDialog::editVariable(QString category, K
namesLabel->setText("");
- //QStringList cats;
- QString catstr;
+ //TQStringList cats;
+ TQString catstr;
categoryCombo->clear();
tree_struct *item, *item2;
variable_cats.it = variable_cats.items.begin();
@@ -448,7 +448,7 @@ KnownVariable *QalculateEditMatrixVectorDialog::editVariable(QString category, K
init_value = initial_value;
force_init_value = force_value;
- if(exec() == QDialog::Accepted) {
+ if(exec() == TQDialog::Accepted) {
v = edited_variable;
edited_variable = NULL;
return v;
@@ -469,7 +469,7 @@ void QalculateEditMatrixVectorDialog::editNames() {
names_edit_dialog->setNamesLE(nameEdit, namesLabel);
}
-void QalculateEditMatrixVectorDialog::nameChanged(const QString &name) {
+void QalculateEditMatrixVectorDialog::nameChanged(const TQString &name) {
if(name.isNull()) return;
if(!CALCULATOR->variableNameIsValid(name.ascii())) {
nameEdit->blockSignals(true);
@@ -478,14 +478,14 @@ void QalculateEditMatrixVectorDialog::nameChanged(const QString &name) {
}
}
-#if QT_VERSION >= 0x030200
-QalculateEditMatrixVectorTableItem::QalculateEditMatrixVectorTableItem(QTable *table) : QTableItem(table, QTableItem::OnTyping) {}
+#if TQT_VERSION >= 0x030200
+QalculateEditMatrixVectorTableItem::QalculateEditMatrixVectorTableItem(TQTable *table) : TQTableItem(table, TQTableItem::OnTyping) {}
#else
-QalculateEditMatrixVectorTableItem::QalculateEditMatrixVectorTableItem(QTable *table) : QTableItem(table, QTableItem::OnTyping, QString::null) {}
+QalculateEditMatrixVectorTableItem::QalculateEditMatrixVectorTableItem(TQTable *table) : TQTableItem(table, TQTableItem::OnTyping, TQString::null) {}
#endif
-QalculateEditMatrixVectorTableItem::QalculateEditMatrixVectorTableItem(QTable *table, const QString & text) : QTableItem(table, QTableItem::OnTyping, text) {}
+QalculateEditMatrixVectorTableItem::QalculateEditMatrixVectorTableItem(TQTable *table, const TQString & text) : TQTableItem(table, TQTableItem::OnTyping, text) {}
-int QalculateEditMatrixVectorTableItem::alignment() const {return Qt::AlignRight;}
+int QalculateEditMatrixVectorTableItem::alignment() const {return TQt::AlignRight;}
#include "qalculateeditmatrixvectordialog.moc"
diff --git a/src/qalculateeditmatrixvectordialog.h b/src/qalculateeditmatrixvectordialog.h
index 6ecd146..2e74abe 100644
--- a/src/qalculateeditmatrixvectordialog.h
+++ b/src/qalculateeditmatrixvectordialog.h
@@ -22,13 +22,13 @@
#include <kdialogbase.h>
-class QLabel;
-class QSpinBox;
-class QTable;
-class QRadioButton;
+class TQLabel;
+class TQSpinBox;
+class TQTable;
+class TQRadioButton;
class KComboBox;
class KLineEdit;
-class QPushButton;
+class TQPushButton;
class MathStructure;
class QalculateEditNamesDialog;
class KnownVariable;
@@ -42,22 +42,22 @@ class QalculateEditMatrixVectorDialog : public KDialogBase {
public:
- QalculateEditMatrixVectorDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateEditMatrixVectorDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateEditMatrixVectorDialog();
- KnownVariable *newMatrix(QString category = QString::null);
- KnownVariable *newVector(QString category = QString::null);
- KnownVariable *editVariable(QString category = QString::null, KnownVariable *v = NULL, MathStructure *initial_value = NULL, bool force_value = false, bool create_vector = false);
+ KnownVariable *newMatrix(TQString category = TQString::null);
+ KnownVariable *newVector(TQString category = TQString::null);
+ KnownVariable *editVariable(TQString category = TQString::null, KnownVariable *v = NULL, MathStructure *initial_value = NULL, bool force_value = false, bool create_vector = false);
QalculateEditNamesDialog *names_edit_dialog;
KnownVariable *edited_variable;
KComboBox *categoryCombo;
KLineEdit *nameEdit, *titleEdit;
- QLabel *namesLabel, *elementsLabel;
- QRadioButton *matrixButton, *vectorButton;
- QTable *elementsTable;
- QSpinBox *rowsBox, *columnsBox;
- QPushButton *namesButton;
+ TQLabel *namesLabel, *elementsLabel;
+ TQRadioButton *matrixButton, *vectorButton;
+ TQTable *elementsTable;
+ TQSpinBox *rowsBox, *columnsBox;
+ TQPushButton *namesButton;
private:
@@ -70,7 +70,7 @@ public slots:
void rowsChanged(int);
void columnsChanged(int);
void editNames();
- void nameChanged(const QString&);
+ void nameChanged(const TQString&);
protected slots:
diff --git a/src/qalculateeditnamesdialog.cpp b/src/qalculateeditnamesdialog.cpp
index 4af06f5..685ca10 100644
--- a/src/qalculateeditnamesdialog.cpp
+++ b/src/qalculateeditnamesdialog.cpp
@@ -23,36 +23,36 @@
#include <klocale.h>
#include <klistview.h>
#include <kpushbutton.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klineedit.h>
-#include <qlabel.h>
-#include <qapplication.h>
+#include <tqlabel.h>
+#include <tqapplication.h>
#include <kstdguiitem.h>
-QalculateEditNamesDialog::QalculateEditNamesDialog(int item_type, QWidget *parent, const char *name) : KDialog(parent, name, true) {
+QalculateEditNamesDialog::QalculateEditNamesDialog(int item_type, TQWidget *parent, const char *name) : KDialog(parent, name, true) {
setCaption(i18n("Edit Names"));
i_type = item_type;
- QVBoxLayout *layout = new QVBoxLayout(this, marginHint(), spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(this, marginHint(), spacingHint());
namesView = new KListView(this);
namesView->addColumn(i18n("Name"));
namesView->addColumn(i18n("Abbreviation"));
- namesView->setColumnAlignment(1, Qt::AlignCenter);
+ namesView->setColumnAlignment(1, TQt::AlignCenter);
namesView->addColumn(i18n("Plural"));
- namesView->setColumnAlignment(2, Qt::AlignCenter);
+ namesView->setColumnAlignment(2, TQt::AlignCenter);
namesView->addColumn(i18n("Reference"));
- namesView->setColumnAlignment(3, Qt::AlignCenter);
+ namesView->setColumnAlignment(3, TQt::AlignCenter);
namesView->addColumn(i18n("Avoid Input"));
- namesView->setColumnAlignment(4, Qt::AlignCenter);
+ namesView->setColumnAlignment(4, TQt::AlignCenter);
namesView->addColumn(i18n("Unicode"));
- namesView->setColumnAlignment(5, Qt::AlignCenter);
+ namesView->setColumnAlignment(5, TQt::AlignCenter);
namesView->addColumn(i18n("Suffix"));
- namesView->setColumnAlignment(6, Qt::AlignCenter);
+ namesView->setColumnAlignment(6, TQt::AlignCenter);
namesView->addColumn(i18n("Case Sensitive"));
- namesView->setColumnAlignment(7, Qt::AlignCenter);
+ namesView->setColumnAlignment(7, TQt::AlignCenter);
namesView->setSorting(-1);
namesView->setItemsRenameable(true);
namesView->setItemsMovable(true);
@@ -60,13 +60,13 @@ QalculateEditNamesDialog::QalculateEditNamesDialog(int item_type, QWidget *paren
namesView->setAcceptDrops(true);
layout->addWidget(namesView);
- QHBoxLayout *buttonLayout = new QHBoxLayout(layout, spacingHint());
- newButton = new QPushButton(i18n("New"), this);
+ TQHBoxLayout *buttonLayout = new TQHBoxLayout(layout, spacingHint());
+ newButton = new TQPushButton(i18n("New"), this);
buttonLayout->addWidget(newButton);
- deleteButton = new QPushButton(i18n("Delete"), this);
+ deleteButton = new TQPushButton(i18n("Delete"), this);
deleteButton->setEnabled(false);
buttonLayout->addWidget(deleteButton);
- buttonLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ buttonLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
buttonClose = new KPushButton(KStdGuiItem::close(), this);
buttonClose->setAutoDefault(true);
buttonClose->setDefault(true);
@@ -76,8 +76,8 @@ QalculateEditNamesDialog::QalculateEditNamesDialog(int item_type, QWidget *paren
connect(buttonClose, SIGNAL(clicked()), this, SLOT(accept()));
connect(newButton, SIGNAL(clicked()), this, SLOT(newName()));
connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteName()));
- connect(namesView, SIGNAL(clicked(QListViewItem*, const QPoint&, int)), this, SLOT(itemClicked(QListViewItem*, const QPoint&, int)));
- connect(namesView->renameLineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)));
+ connect(namesView, SIGNAL(clicked(TQListViewItem*, const TQPoint&, int)), this, SLOT(itemClicked(TQListViewItem*, const TQPoint&, int)));
+ connect(namesView->renameLineEdit(), SIGNAL(textChanged(const TQString&)), this, SLOT(nameChanged(const TQString&)));
}
@@ -85,23 +85,23 @@ QalculateEditNamesDialog::~QalculateEditNamesDialog() {}
void QalculateEditNamesDialog::newName() {
ExpressionName name;
- QListViewItem *i = new KListViewItem(namesView, namesView->lastChild(), "", i18n("No"), i18n("No"), i18n("No"), i18n("No"), i18n("No"), i18n("No"), i18n("No"));
+ TQListViewItem *i = new KListViewItem(namesView, namesView->lastChild(), "", i18n("No"), i18n("No"), i18n("No"), i18n("No"), i18n("No"), i18n("No"), i18n("No"));
namesView->setSelected(i, true);
- qApp->processEvents();
+ tqApp->processEvents();
namesView->rename(i, 0);
}
-void QalculateEditNamesDialog::setNames(ExpressionItem *item, const QString &namestr, bool names_edited) {
+void QalculateEditNamesDialog::setNames(ExpressionItem *item, const TQString &namestr, bool names_edited) {
if(!names_edited) {
deleteButton->setEnabled(false);
namesView->clear();
}
if(!names_edited && item && item->countNames() > 0) {
- QListViewItem *i_prev = NULL;
+ TQListViewItem *i_prev = NULL;
for(size_t index = 1; index <= item->countNames(); index++) {
const ExpressionName *ename = &item->getName(index);
- QListViewItem *i = new KListViewItem(namesView, i_prev);
+ TQListViewItem *i = new KListViewItem(namesView, i_prev);
i_prev = i;
if(ename->abbreviation)
i->setText(1, i18n("Yes"));
@@ -139,12 +139,12 @@ void QalculateEditNamesDialog::setNames(ExpressionItem *item, const QString &nam
}
} else if(!namestr.isEmpty()) {
if(names_edited) {
- QListViewItemIterator it(namesView);
+ TQListViewItemIterator it(namesView);
if(it.current())
it.current()->setText(0, namestr);
} else {
ExpressionName ename(namestr.ascii());
- QListViewItem *i = new KListViewItem(namesView, ename.name.c_str());
+ TQListViewItem *i = new KListViewItem(namesView, ename.name.c_str());
if(ename.abbreviation)
i->setText(1, i18n("Yes"));
else
@@ -176,9 +176,9 @@ void QalculateEditNamesDialog::setNames(ExpressionItem *item, const QString &nam
}
}
}
-void QalculateEditNamesDialog::saveNames(ExpressionItem *item, const QString &str) {
+void QalculateEditNamesDialog::saveNames(ExpressionItem *item, const TQString &str) {
item->clearNames();
- QListViewItemIterator it(namesView);
+ TQListViewItemIterator it(namesView);
if(it.current()) {
bool b = false;
while(it.current()) {
@@ -202,10 +202,10 @@ void QalculateEditNamesDialog::saveNames(ExpressionItem *item, const QString &st
item->addName(str.ascii());
}
}
-void QalculateEditNamesDialog::setNamesLE(QLineEdit *entry, QLabel *label) {
+void QalculateEditNamesDialog::setNamesLE(TQLineEdit *entry, TQLabel *label) {
int index = 0;
- QString str;
- QListViewItemIterator it(namesView);
+ TQString str;
+ TQListViewItemIterator it(namesView);
while(it.current()) {
if(index == 0) {
entry->setText(it.current()->text(0));
@@ -230,7 +230,7 @@ void QalculateEditNamesDialog::deleteName() {
namesView->removeItem(namesView->selectedItem());
}
-void QalculateEditNamesDialog::itemClicked(QListViewItem *i, const QPoint &, int c) {
+void QalculateEditNamesDialog::itemClicked(TQListViewItem *i, const TQPoint &, int c) {
if(i && c > 0) {
if(i->text(c) == i18n("Yes"))
i->setText(c, i18n("No"));
@@ -245,7 +245,7 @@ void QalculateEditNamesDialog::nameSelectionChanged() {
deleteButton->setEnabled(namesView->selectedItem() != NULL);
}
-void QalculateEditNamesDialog::nameChanged(const QString &name) {
+void QalculateEditNamesDialog::nameChanged(const TQString &name) {
if(name.isNull()) return;
namesView->renameLineEdit()->blockSignals(true);
switch(i_type) {
diff --git a/src/qalculateeditnamesdialog.h b/src/qalculateeditnamesdialog.h
index 42f49af..3feb5c0 100644
--- a/src/qalculateeditnamesdialog.h
+++ b/src/qalculateeditnamesdialog.h
@@ -24,10 +24,10 @@
class ExpressionItem;
class KListView;
-class QPushButton;
-class QLineEdit;
-class QLabel;
-class QListViewItem;
+class TQPushButton;
+class TQLineEdit;
+class TQLabel;
+class TQListViewItem;
/**
@author Niklas Knutsson
@@ -38,26 +38,26 @@ class QalculateEditNamesDialog : public KDialog {
public:
- QalculateEditNamesDialog(int item_type, QWidget *parent = 0, const char *name = 0);
+ QalculateEditNamesDialog(int item_type, TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateEditNamesDialog();
- void saveNames(ExpressionItem *item, const QString &str = QString::null);
- void setNames(ExpressionItem *item = NULL, const QString &namestr = QString::null, bool names_edited = false);
+ void saveNames(ExpressionItem *item, const TQString &str = TQString::null);
+ void setNames(ExpressionItem *item = NULL, const TQString &namestr = TQString::null, bool names_edited = false);
bool isEmpty();
- void setNamesLE(QLineEdit *entry, QLabel *label);
+ void setNamesLE(TQLineEdit *entry, TQLabel *label);
KListView* namesView;
- QPushButton* newButton;
- QPushButton* deleteButton;
- QPushButton* buttonClose;
+ TQPushButton* newButton;
+ TQPushButton* deleteButton;
+ TQPushButton* buttonClose;
int i_type;
public slots:
- virtual void itemClicked(QListViewItem*, const QPoint&, int);
+ virtual void itemClicked(TQListViewItem*, const TQPoint&, int);
virtual void newName();
virtual void deleteName();
- virtual void nameChanged(const QString&);
+ virtual void nameChanged(const TQString&);
virtual void nameSelectionChanged();
};
diff --git a/src/qalculateeditunitdialog.cpp b/src/qalculateeditunitdialog.cpp
index f40a377..b5a8000 100644
--- a/src/qalculateeditunitdialog.cpp
+++ b/src/qalculateeditunitdialog.cpp
@@ -21,75 +21,75 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditnamesdialog.h"
-#include <qgrid.h>
+#include <tqgrid.h>
#include <klineedit.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kcombobox.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qcheckbox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqcheckbox.h>
#include <kmessagebox.h>
-#include <qgroupbox.h>
-#include <qspinbox.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
#include <kapplication.h>
extern PrintOptions printops;
extern EvaluationOptions evalops;
extern tree_struct unit_cats;
-QalculateEditUnitDialog::QalculateEditUnitDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Unit"), Ok | Cancel | Help, Ok, true) {
+QalculateEditUnitDialog::QalculateEditUnitDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Unit"), Ok | Cancel | Help, Ok, true) {
names_edit_dialog = NULL;
edited_unit = NULL;
- QVBox *box = makeVBoxMainWidget();
+ TQVBox *box = makeVBoxMainWidget();
- grid1 = new QGroupBox(1, Qt::Horizontal, i18n("Name"), box);
+ grid1 = new TQGroupBox(1, TQt::Horizontal, i18n("Name"), box);
grid1->setInsideMargin(spacingHint());
grid1->setInsideSpacing(spacingHint());
- QWidget *widget = new QWidget(grid1);
- QGridLayout *grid = new QGridLayout(widget, 1, 1, 0, spacingHint());
- grid->addWidget(new QLabel(i18n("Name:"), widget), 0, 0);
+ TQWidget *widget = new TQWidget(grid1);
+ TQGridLayout *grid = new TQGridLayout(widget, 1, 1, 0, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Name:"), widget), 0, 0);
nameEdit = new KLineEdit(widget);
grid->addWidget(nameEdit, 0, 1);
- QHBoxLayout *hbox = new QHBoxLayout(0, 0, spacingHint());
+ TQHBoxLayout *hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 1, 1, 0, 1);
- namesLabel = new QLabel(widget);
- namesLabel->setAlignment(Qt::AlignRight);
- namesLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ namesLabel = new TQLabel(widget);
+ namesLabel->setAlignment(TQt::AlignRight);
+ namesLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
hbox->addWidget(namesLabel);
- namesButton = new QPushButton(i18n("Names Details"), widget);
+ namesButton = new TQPushButton(i18n("Names Details"), widget);
hbox->addWidget(namesButton);
- grid->addWidget(new QLabel(i18n("Descriptive name:"), widget), 2, 0);
+ grid->addWidget(new TQLabel(i18n("Descriptive name:"), widget), 2, 0);
titleEdit = new KLineEdit(widget);
grid->addWidget(titleEdit, 2, 1);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 3, 3, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- hideButton = new QCheckBox(i18n("Hide unit"), widget);
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ hideButton = new TQCheckBox(i18n("Hide unit"), widget);
hbox->addWidget(hideButton);
- grid2 = new QGroupBox(1, Qt::Horizontal, i18n("Type"), box);
+ grid2 = new TQGroupBox(1, TQt::Horizontal, i18n("Type"), box);
grid2->setInsideMargin(spacingHint());
grid2->setInsideSpacing(spacingHint());
- widget = new QWidget(grid2);
- grid = new QGridLayout(widget, 1, 1, 0, spacingHint());
- grid->addWidget(new QLabel(i18n("Class:"), widget), 0, 0);
+ widget = new TQWidget(grid2);
+ grid = new TQGridLayout(widget, 1, 1, 0, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Class:"), widget), 0, 0);
classCombo = new KComboBox(widget);
grid->addWidget(classCombo, 0, 1);
classCombo->insertItem(i18n("Base Unit"));
classCombo->insertItem(i18n("Alias"));
classCombo->insertItem(i18n("Composite Unit"));
classCombo->setMaximumWidth(250);
- grid->addWidget(new QLabel(i18n("Category:"), widget), 1, 0);
+ grid->addWidget(new TQLabel(i18n("Category:"), widget), 1, 0);
categoryCombo = new KComboBox(widget);
grid->addWidget(categoryCombo, 1, 1);
categoryCombo->setMaximumWidth(250);
categoryCombo->setEditable(true);
- grid->addWidget(new QLabel(i18n("System:"), widget), 2, 0);
+ grid->addWidget(new TQLabel(i18n("System:"), widget), 2, 0);
systemCombo = new KComboBox(widget);
grid->addWidget(systemCombo, 2, 1);
systemCombo->insertItem(i18n("SI"));
@@ -99,35 +99,35 @@ QalculateEditUnitDialog::QalculateEditUnitDialog(QWidget *parent, const char *na
systemCombo->setMaximumWidth(250);
systemCombo->setEditable(true);
- grid3 = new QGroupBox(1, Qt::Horizontal, i18n("Relation"), box);
+ grid3 = new TQGroupBox(1, TQt::Horizontal, i18n("Relation"), box);
grid3->setInsideMargin(spacingHint());
grid3->setInsideSpacing(spacingHint());
- widget = new QWidget(grid3);
- grid = new QGridLayout(widget, 1, 1, 0, spacingHint());
- grid->addWidget(new QLabel(i18n("Base unit:"), widget), 0, 0);
+ widget = new TQWidget(grid3);
+ grid = new TQGridLayout(widget, 1, 1, 0, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Base unit:"), widget), 0, 0);
baseEdit = new KLineEdit(widget);
grid->addWidget(baseEdit, 0, 1);
- exponentLabel = new QLabel(i18n("Exponent:"), widget);
+ exponentLabel = new TQLabel(i18n("Exponent:"), widget);
grid->addWidget(exponentLabel, 1, 0);
- exponentBox = new QSpinBox(-9, 9, 1, widget);
+ exponentBox = new TQSpinBox(-9, 9, 1, widget);
grid->addWidget(exponentBox, 1, 1);
- relationLabel = new QLabel(i18n("Relation:"), widget);
+ relationLabel = new TQLabel(i18n("Relation:"), widget);
grid->addWidget(relationLabel, 2, 0);
relationEdit = new KLineEdit(widget);
grid->addWidget(relationEdit, 2, 1);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 3, 3, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- relationExactButton = new QCheckBox(i18n("Relation is exact"), widget);
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ relationExactButton = new TQCheckBox(i18n("Relation is exact"), widget);
hbox->addWidget(relationExactButton);
- inverseRelationLabel = new QLabel(i18n("Inverse relation:"), widget);
+ inverseRelationLabel = new TQLabel(i18n("Inverse relation:"), widget);
grid->addWidget(inverseRelationLabel, 4, 0);
inverseRelationEdit = new KLineEdit(widget);
grid->addWidget(inverseRelationEdit, 4, 1);
connect(namesButton, SIGNAL(clicked()), this, SLOT(editNames()));
connect(classCombo, SIGNAL(activated(int)), this, SLOT(classChanged(int)));
- connect(nameEdit, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)));
+ connect(nameEdit, SIGNAL(textChanged(const TQString&)), this, SLOT(nameChanged(const TQString&)));
}
@@ -273,7 +273,7 @@ void QalculateEditUnitDialog::classChanged(int i) {
grid3->setEnabled(i != 0);
}
-Unit *QalculateEditUnitDialog::editUnit(QString category, Unit *u) {
+Unit *QalculateEditUnitDialog::editUnit(TQString category, Unit *u) {
nameEdit->setFocus();
@@ -291,8 +291,8 @@ Unit *QalculateEditUnitDialog::editUnit(QString category, Unit *u) {
setCaption(i18n("New Unit"));
}
- //QStringList cats;
- QString catstr;
+ //TQStringList cats;
+ TQString catstr;
categoryCombo->clear();
tree_struct *item, *item2;
unit_cats.it = unit_cats.items.begin();
@@ -391,7 +391,7 @@ Unit *QalculateEditUnitDialog::editUnit(QString category, Unit *u) {
classChanged(1);
}
- if(exec() == QDialog::Accepted) {
+ if(exec() == TQDialog::Accepted) {
u = edited_unit;
edited_unit = NULL;
return u;
@@ -411,7 +411,7 @@ void QalculateEditUnitDialog::editNames() {
names_edit_dialog->setNamesLE(nameEdit, namesLabel);
}
-void QalculateEditUnitDialog::nameChanged(const QString &name) {
+void QalculateEditUnitDialog::nameChanged(const TQString &name) {
if(name.isNull()) return;
if(!CALCULATOR->unitNameIsValid(name.ascii())) {
nameEdit->blockSignals(true);
diff --git a/src/qalculateeditunitdialog.h b/src/qalculateeditunitdialog.h
index 02655d8..4fcaeb5 100644
--- a/src/qalculateeditunitdialog.h
+++ b/src/qalculateeditunitdialog.h
@@ -22,16 +22,16 @@
#include <kdialogbase.h>
-class QLabel;
+class TQLabel;
class KComboBox;
class KLineEdit;
-class QCheckBox;
-class QPushButton;
-class QSpinBox;
+class TQCheckBox;
+class TQPushButton;
+class TQSpinBox;
class MathStructure;
class QalculateEditNamesDialog;
class Unit;
-class QGroupBox;
+class TQGroupBox;
/**
@author Niklas Knutsson
@@ -42,26 +42,26 @@ class QalculateEditUnitDialog : public KDialogBase {
public:
- QalculateEditUnitDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateEditUnitDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateEditUnitDialog();
- Unit *editUnit(QString category = QString::null, Unit *u = NULL);
+ Unit *editUnit(TQString category = TQString::null, Unit *u = NULL);
QalculateEditNamesDialog *names_edit_dialog;
Unit *edited_unit;
KComboBox *categoryCombo, *classCombo, *systemCombo;
KLineEdit *nameEdit, *titleEdit, *baseEdit, *relationEdit, *inverseRelationEdit;
- QLabel *namesLabel, *exponentLabel, *relationLabel, *inverseRelationLabel;
- QCheckBox *relationExactButton, *hideButton;
- QPushButton *namesButton;
- QSpinBox *exponentBox;
- QGroupBox *grid1, *grid2, *grid3;
+ TQLabel *namesLabel, *exponentLabel, *relationLabel, *inverseRelationLabel;
+ TQCheckBox *relationExactButton, *hideButton;
+ TQPushButton *namesButton;
+ TQSpinBox *exponentBox;
+ TQGroupBox *grid1, *grid2, *grid3;
public slots:
void editNames();
void classChanged(int);
- void nameChanged(const QString&);
+ void nameChanged(const TQString&);
protected slots:
diff --git a/src/qalculateeditunknownvariabledialog.cpp b/src/qalculateeditunknownvariabledialog.cpp
index 6db4891..9b089a0 100644
--- a/src/qalculateeditunknownvariabledialog.cpp
+++ b/src/qalculateeditunknownvariabledialog.cpp
@@ -21,43 +21,43 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditnamesdialog.h"
-#include <qgrid.h>
+#include <tqgrid.h>
#include <klineedit.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kcombobox.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qcheckbox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqcheckbox.h>
#include <kmessagebox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kapplication.h>
extern PrintOptions printops;
extern tree_struct variable_cats;
-QalculateEditUnknownVariableDialog::QalculateEditUnknownVariableDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Variable"), Ok | Cancel | Help, Ok, true) {
+QalculateEditUnknownVariableDialog::QalculateEditUnknownVariableDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Variable"), Ok | Cancel | Help, Ok, true) {
names_edit_dialog = NULL;
edited_unknown = NULL;
- setMainWidget(new QWidget(this));
- QGridLayout *grid = new QGridLayout(mainWidget(), 1, 1, 0, spacingHint());
- grid->addWidget(new QLabel(i18n("Name:"), mainWidget()), 0, 0);
+ setMainWidget(new TQWidget(this));
+ TQGridLayout *grid = new TQGridLayout(mainWidget(), 1, 1, 0, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Name:"), mainWidget()), 0, 0);
nameEdit = new KLineEdit(mainWidget());
grid->addWidget(nameEdit, 0, 1);
- QHBoxLayout *hbox = new QHBoxLayout(0, 0, spacingHint());
+ TQHBoxLayout *hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 1, 1, 0, 1);
- namesLabel = new QLabel(mainWidget());
- namesLabel->setAlignment(Qt::AlignRight);
- namesLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ namesLabel = new TQLabel(mainWidget());
+ namesLabel->setAlignment(TQt::AlignRight);
+ namesLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
hbox->addWidget(namesLabel);
- namesButton = new QPushButton(i18n("Names Details"), mainWidget());
+ namesButton = new TQPushButton(i18n("Names Details"), mainWidget());
hbox->addWidget(namesButton);
- assumptionsBox = new QCheckBox(i18n("Custom assumptions:"), mainWidget());
+ assumptionsBox = new TQCheckBox(i18n("Custom assumptions:"), mainWidget());
grid->addMultiCellWidget(assumptionsBox, 2, 2, 0, 1);
- typeLabel = new QLabel(i18n("Type"), mainWidget());
+ typeLabel = new TQLabel(i18n("Type"), mainWidget());
grid->addWidget(typeLabel, 3, 0);
typeCombo = new KComboBox(mainWidget());
typeCombo->setMaximumWidth(250);
@@ -70,7 +70,7 @@ QalculateEditUnknownVariableDialog::QalculateEditUnknownVariableDialog(QWidget *
typeCombo->insertItem(i18n("Rational Number"));
typeCombo->insertItem(i18n("Integer"));
grid->addWidget(typeCombo, 3, 1);
- signLabel = new QLabel(i18n("Sign"), mainWidget());
+ signLabel = new TQLabel(i18n("Sign"), mainWidget());
grid->addWidget(signLabel, 4, 0);
signCombo = new KComboBox(mainWidget());
signCombo->setMaximumWidth(250);
@@ -82,12 +82,12 @@ QalculateEditUnknownVariableDialog::QalculateEditUnknownVariableDialog(QWidget *
signCombo->insertItem(i18n("Non-Positive"));
signCombo->insertItem(i18n("Non-Zero"));
grid->addWidget(signCombo, 4, 1);
- grid->addWidget(new QLabel(i18n("Category:"), mainWidget()), 5, 0);
+ grid->addWidget(new TQLabel(i18n("Category:"), mainWidget()), 5, 0);
categoryCombo = new KComboBox(mainWidget());
categoryCombo->setMaximumWidth(250);
categoryCombo->setEditable(true);
grid->addWidget(categoryCombo, 5, 1);
- grid->addWidget(new QLabel(i18n("Descriptive name:"), mainWidget()), 6, 0);
+ grid->addWidget(new TQLabel(i18n("Descriptive name:"), mainWidget()), 6, 0);
titleEdit = new KLineEdit(mainWidget());
grid->addWidget(titleEdit, 6, 1);
@@ -98,7 +98,7 @@ QalculateEditUnknownVariableDialog::QalculateEditUnknownVariableDialog(QWidget *
connect(typeCombo, SIGNAL(activated(int)), this, SLOT(typeComboActivated(int)));
connect(signCombo, SIGNAL(activated(int)), this, SLOT(signComboActivated(int)));
connect(namesButton, SIGNAL(clicked()), this, SLOT(editNames()));
- connect(nameEdit, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)));
+ connect(nameEdit, SIGNAL(textChanged(const TQString&)), this, SLOT(nameChanged(const TQString&)));
}
@@ -185,7 +185,7 @@ void QalculateEditUnknownVariableDialog::slotOk() {
}
-UnknownVariable *QalculateEditUnknownVariableDialog::editVariable(QString category, UnknownVariable *v) {
+UnknownVariable *QalculateEditUnknownVariableDialog::editVariable(TQString category, UnknownVariable *v) {
nameEdit->setFocus();
@@ -207,8 +207,8 @@ UnknownVariable *QalculateEditUnknownVariableDialog::editVariable(QString catego
namesLabel->setText("");
- //QStringList cats;
- QString catstr;
+ //TQStringList cats;
+ TQString catstr;
categoryCombo->clear();
tree_struct *item, *item2;
variable_cats.it = variable_cats.items.begin();
@@ -275,7 +275,7 @@ UnknownVariable *QalculateEditUnknownVariableDialog::editVariable(QString catego
signCombo->setEnabled(!v || (!v->isBuiltin() && v->assumptions()));
typeCombo->setEnabled(!v || (!v->isBuiltin() && v->assumptions()));
- if(exec() == QDialog::Accepted) {
+ if(exec() == TQDialog::Accepted) {
v = edited_unknown;
edited_unknown = NULL;
return v;
@@ -295,7 +295,7 @@ void QalculateEditUnknownVariableDialog::editNames() {
names_edit_dialog->setNamesLE(nameEdit, namesLabel);
}
-void QalculateEditUnknownVariableDialog::nameChanged(const QString &name) {
+void QalculateEditUnknownVariableDialog::nameChanged(const TQString &name) {
if(name.isNull()) return;
if(!CALCULATOR->variableNameIsValid(name.ascii())) {
nameEdit->blockSignals(true);
diff --git a/src/qalculateeditunknownvariabledialog.h b/src/qalculateeditunknownvariabledialog.h
index cfa499e..45a6619 100644
--- a/src/qalculateeditunknownvariabledialog.h
+++ b/src/qalculateeditunknownvariabledialog.h
@@ -22,14 +22,14 @@
#include <kdialogbase.h>
-class QLabel;
+class TQLabel;
class KComboBox;
class KLineEdit;
-class QPushButton;
+class TQPushButton;
class MathStructure;
class QalculateEditNamesDialog;
class UnknownVariable;
-class QCheckBox;
+class TQCheckBox;
/**
@author Niklas Knutsson
@@ -40,23 +40,23 @@ class QalculateEditUnknownVariableDialog : public KDialogBase {
public:
- QalculateEditUnknownVariableDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateEditUnknownVariableDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateEditUnknownVariableDialog();
- UnknownVariable *editVariable(QString category = QString::null, UnknownVariable *v = NULL);
+ UnknownVariable *editVariable(TQString category = TQString::null, UnknownVariable *v = NULL);
QalculateEditNamesDialog *names_edit_dialog;
UnknownVariable *edited_unknown;
KComboBox *categoryCombo, *signCombo, *typeCombo;
KLineEdit *nameEdit, *titleEdit;
- QLabel *namesLabel, *signLabel, *typeLabel;
- QPushButton *namesButton;
- QCheckBox *assumptionsBox;
+ TQLabel *namesLabel, *signLabel, *typeLabel;
+ TQPushButton *namesButton;
+ TQCheckBox *assumptionsBox;
public slots:
void editNames();
- void nameChanged(const QString&);
+ void nameChanged(const TQString&);
void signComboActivated(int);
void typeComboActivated(int);
diff --git a/src/qalculateeditvariabledialog.cpp b/src/qalculateeditvariabledialog.cpp
index 607d908..ed6d208 100644
--- a/src/qalculateeditvariabledialog.cpp
+++ b/src/qalculateeditvariabledialog.cpp
@@ -21,69 +21,69 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditnamesdialog.h"
-#include <qgrid.h>
+#include <tqgrid.h>
#include <klineedit.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kcombobox.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qcheckbox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqcheckbox.h>
#include <kmessagebox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kapplication.h>
extern PrintOptions printops;
extern EvaluationOptions evalops;
extern tree_struct variable_cats;
-QalculateEditVariableDialog::QalculateEditVariableDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Variable"), Ok | Cancel | Help, Ok, true) {
+QalculateEditVariableDialog::QalculateEditVariableDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Variable"), Ok | Cancel | Help, Ok, true) {
names_edit_dialog = NULL;
edited_variable = NULL;
- setMainWidget(new QWidget(this));
- QGridLayout *grid = new QGridLayout(mainWidget(), 6, 2, 0, spacingHint());
+ setMainWidget(new TQWidget(this));
+ TQGridLayout *grid = new TQGridLayout(mainWidget(), 6, 2, 0, spacingHint());
- nameLabel = new QLabel(i18n("Name:"), mainWidget());
+ nameLabel = new TQLabel(i18n("Name:"), mainWidget());
grid->addWidget(nameLabel, 0, 0);
nameEdit = new KLineEdit(mainWidget());
grid->addWidget(nameEdit, 0, 1);
- QHBoxLayout *hbox = new QHBoxLayout(0, 0, spacingHint());
+ TQHBoxLayout *hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 1, 1, 0, 1);
- namesLabel = new QLabel(mainWidget());
- namesLabel->setAlignment(Qt::AlignRight);
- namesLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ namesLabel = new TQLabel(mainWidget());
+ namesLabel->setAlignment(TQt::AlignRight);
+ namesLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
hbox->addWidget(namesLabel);
- namesButton = new QPushButton(i18n("Names Details"), mainWidget());
+ namesButton = new TQPushButton(i18n("Names Details"), mainWidget());
hbox->addWidget(namesButton);
- valueLabel = new QLabel(i18n("Value:"), mainWidget());
+ valueLabel = new TQLabel(i18n("Value:"), mainWidget());
grid->addWidget(valueLabel, 2, 0);
valueEdit = new KLineEdit(mainWidget());
grid->addWidget(valueEdit, 2, 1);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 3, 3, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- valueExactButton = new QCheckBox(i18n("Value is exact"), mainWidget());
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ valueExactButton = new TQCheckBox(i18n("Value is exact"), mainWidget());
hbox->addWidget(valueExactButton);
- grid->addWidget(new QLabel(i18n("Category:"), mainWidget()), 4, 0);
+ grid->addWidget(new TQLabel(i18n("Category:"), mainWidget()), 4, 0);
categoryCombo = new KComboBox(mainWidget());
grid->addWidget(categoryCombo, 4, 1);
categoryCombo->setMaximumWidth(250);
categoryCombo->setEditable(true);
- titleLabel = new QLabel(i18n("Descriptive name:"), mainWidget());
+ titleLabel = new TQLabel(i18n("Descriptive name:"), mainWidget());
grid->addWidget(titleLabel, 5, 0);
titleEdit = new KLineEdit(mainWidget());
grid->addWidget(titleEdit, 5, 1);
connect(namesButton, SIGNAL(clicked()), this, SLOT(editNames()));
- connect(nameEdit, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)));
+ connect(nameEdit, SIGNAL(textChanged(const TQString&)), this, SLOT(nameChanged(const TQString&)));
}
@@ -166,7 +166,7 @@ void QalculateEditVariableDialog::slotOk() {
accept();
}
-KnownVariable *QalculateEditVariableDialog::editVariable(QString category, KnownVariable *v, MathStructure *initial_value, bool force_value) {
+KnownVariable *QalculateEditVariableDialog::editVariable(TQString category, KnownVariable *v, MathStructure *initial_value, bool force_value) {
nameEdit->setFocus();
@@ -189,8 +189,8 @@ KnownVariable *QalculateEditVariableDialog::editVariable(QString category, Known
namesLabel->setText("");
- //QStringList cats;
- QString catstr;
+ //TQStringList cats;
+ TQString catstr;
categoryCombo->clear();
tree_struct *item, *item2;
variable_cats.it = variable_cats.items.begin();
@@ -271,7 +271,7 @@ KnownVariable *QalculateEditVariableDialog::editVariable(QString category, Known
init_value = initial_value;
force_init_value = force_value;
- if(exec() == QDialog::Accepted) {
+ if(exec() == TQDialog::Accepted) {
v = edited_variable;
edited_variable = NULL;
return v;
@@ -291,7 +291,7 @@ void QalculateEditVariableDialog::editNames() {
names_edit_dialog->setNamesLE(nameEdit, namesLabel);
}
-void QalculateEditVariableDialog::nameChanged(const QString &name) {
+void QalculateEditVariableDialog::nameChanged(const TQString &name) {
if(name.isNull()) return;
if(!CALCULATOR->variableNameIsValid(name.ascii())) {
nameEdit->blockSignals(true);
diff --git a/src/qalculateeditvariabledialog.h b/src/qalculateeditvariabledialog.h
index 14ccd4d..a188136 100644
--- a/src/qalculateeditvariabledialog.h
+++ b/src/qalculateeditvariabledialog.h
@@ -22,15 +22,15 @@
#include <kdialogbase.h>
-class QLabel;
+class TQLabel;
class KComboBox;
class KLineEdit;
-class QCheckBox;
-class QPushButton;
+class TQCheckBox;
+class TQPushButton;
class MathStructure;
class QalculateEditNamesDialog;
class KnownVariable;
-class QGridLayout;
+class TQGridLayout;
/**
@author Niklas Knutsson
@@ -41,18 +41,18 @@ class QalculateEditVariableDialog : public KDialogBase {
public:
- QalculateEditVariableDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateEditVariableDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateEditVariableDialog();
- KnownVariable *editVariable(QString category = QString::null, KnownVariable *v = NULL, MathStructure *initial_value = NULL, bool force_value = false);
+ KnownVariable *editVariable(TQString category = TQString::null, KnownVariable *v = NULL, MathStructure *initial_value = NULL, bool force_value = false);
QalculateEditNamesDialog *names_edit_dialog;
KnownVariable *edited_variable;
KComboBox *categoryCombo;
KLineEdit *valueEdit, *nameEdit, *titleEdit;
- QLabel *namesLabel, *titleLabel, *nameLabel, *valueLabel;
- QCheckBox *valueExactButton;
- QPushButton *namesButton;
+ TQLabel *namesLabel, *titleLabel, *nameLabel, *valueLabel;
+ TQCheckBox *valueExactButton;
+ TQPushButton *namesButton;
private:
@@ -62,7 +62,7 @@ private:
public slots:
void editNames();
- void nameChanged(const QString&);
+ void nameChanged(const TQString&);
protected slots:
diff --git a/src/qalculateexportcsvdialog.cpp b/src/qalculateexportcsvdialog.cpp
index 6134202..4ba91e2 100644
--- a/src/qalculateexportcsvdialog.cpp
+++ b/src/qalculateexportcsvdialog.cpp
@@ -20,40 +20,40 @@
#include "qalculateexportcsvdialog.h"
#include "qalculate_tde_utils.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kurlrequester.h>
#include <klineedit.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
#include <kcombobox.h>
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include <kmessagebox.h>
#include <klocale.h>
#include <kapplication.h>
extern MathStructure *mstruct;
-QalculateExportCSVDialog::QalculateExportCSVDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Export CSV File"), Ok | Cancel | Help, Ok, true) {
+QalculateExportCSVDialog::QalculateExportCSVDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Export CSV File"), Ok | Cancel | Help, Ok, true) {
- setMainWidget(new QWidget(this));
- QGridLayout *grid = new QGridLayout(mainWidget(), 1, 1, 0, spacingHint());
- QButtonGroup *group = new QButtonGroup();
- currentResultButton = new QRadioButton(i18n("Current result"), mainWidget());
+ setMainWidget(new TQWidget(this));
+ TQGridLayout *grid = new TQGridLayout(mainWidget(), 1, 1, 0, spacingHint());
+ TQButtonGroup *group = new TQButtonGroup();
+ currentResultButton = new TQRadioButton(i18n("Current result"), mainWidget());
group->insert(currentResultButton, 0);
grid->addWidget(currentResultButton, 0, 0);
currentResultButton->setChecked(true);
- matrixVectorButton = new QRadioButton(i18n("Matrix/vector variable"), mainWidget());
+ matrixVectorButton = new TQRadioButton(i18n("Matrix/vector variable"), mainWidget());
group->insert(matrixVectorButton, 1);
grid->addWidget(matrixVectorButton, 1, 0);
matrixVectorEdit = new KLineEdit(mainWidget());
grid->addWidget(matrixVectorEdit, 1, 1);
- grid->addWidget(new QLabel(i18n("File:"), mainWidget()), 2, 0);
+ grid->addWidget(new TQLabel(i18n("File:"), mainWidget()), 2, 0);
fileEdit = new KURLRequester(mainWidget());
fileEdit->setMode(KFile::File | KFile::ExistingOnly | KFile::LocalOnly);
fileEdit->setCaption(i18n("Export CSV File"));
grid->addWidget(fileEdit, 2, 1);
- grid->addWidget(new QLabel(i18n("Delimiter:"), mainWidget()), 3, 0);
+ grid->addWidget(new TQLabel(i18n("Delimiter:"), mainWidget()), 3, 0);
delimiterCombo = new KComboBox(mainWidget());
delimiterCombo->setMaximumWidth(250);
delimiterCombo->insertItem(i18n("Comma"));
@@ -86,7 +86,7 @@ void QalculateExportCSVDialog::delimiterChanged(int i) {
}
void QalculateExportCSVDialog::slotOk() {
- QString str = fileEdit->url().stripWhiteSpace();
+ TQString str = fileEdit->url().stripWhiteSpace();
if(str.isEmpty()) {
//no name -- open dialog again
fileEdit->setFocus();
@@ -150,7 +150,7 @@ void QalculateExportCSVDialog::slotOk() {
matrix_struct = (MathStructure*) &((KnownVariable*) var)->get();
}
if(!CALCULATOR->exportCSV(*matrix_struct, str.ascii(), delimiter)) {
- QString error_str;
+ TQString error_str;
error_str.sprintf(i18n("Could not export to file \n%s"), str.ascii());
KMessageBox::error(this, error_str);
reject();
diff --git a/src/qalculateexportcsvdialog.h b/src/qalculateexportcsvdialog.h
index 57e45f4..2c04175 100644
--- a/src/qalculateexportcsvdialog.h
+++ b/src/qalculateexportcsvdialog.h
@@ -24,7 +24,7 @@
class KLineEdit;
class KComboBox;
-class QRadioButton;
+class TQRadioButton;
class KURLRequester;
class KnownVariable;
@@ -37,12 +37,12 @@ class QalculateExportCSVDialog : public KDialogBase {
public:
- QalculateExportCSVDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateExportCSVDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateExportCSVDialog();
KLineEdit *otherDelimiterEdit, *matrixVectorEdit;
KComboBox *delimiterCombo;
- QRadioButton *currentResultButton, *matrixVectorButton;
+ TQRadioButton *currentResultButton, *matrixVectorButton;
KURLRequester *fileEdit;
void exportCSVFile(KnownVariable *v = NULL);
diff --git a/src/qalculateexpressionedit.cpp b/src/qalculateexpressionedit.cpp
index f6d8156..ab6a2cf 100644
--- a/src/qalculateexpressionedit.cpp
+++ b/src/qalculateexpressionedit.cpp
@@ -23,17 +23,17 @@
#include "kqalculate.h"
#include <kdeversion.h>
#include <kcursor.h>
-#include <qstyle.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qfontmetrics.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqfontmetrics.h>
#include <kstringhandler.h>
#include <kpopupmenu.h>
#include <kxmlguifactory.h>
#include <kxmlguiclient.h>
#include <kaction.h>
#include <klocale.h>
-#include <qsimplerichtext.h>
+#include <tqsimplerichtext.h>
extern vector<mode_struct> modes;
@@ -44,15 +44,15 @@ extern bool rpn_mode, rpn_keypad_only;
extern tree_struct function_cats, unit_cats, variable_cats;
extern vector<void*> ia_units, ia_variables, ia_functions;
-class QalculateExpressionEditListBoxItem : public QListBoxItem {
+class QalculateExpressionEditListBoxItem : public TQListBoxItem {
public:
QalculateExpressionEditListBoxItem(ExpressionItem *eitem);
virtual ~QalculateExpressionEditListBoxItem();
- int height(const QListBox*) const;
- int width(const QListBox*) const;
+ int height(const TQListBox*) const;
+ int width(const TQListBox*) const;
bool reuse(ExpressionItem *newItem);
@@ -60,17 +60,17 @@ public:
protected:
- void paint(QPainter*);
+ void paint(TQPainter*);
private:
- QString title;
+ TQString title;
int italic_index;
bool rich_text;
};
-QalculateExpressionEdit::QalculateExpressionEdit(bool connected_to_main_win, QWidget *parent, const char *name) : KLineEdit(parent, name) {
+QalculateExpressionEdit::QalculateExpressionEdit(bool connected_to_main_win, TQWidget *parent, const char *name) : KLineEdit(parent, name) {
qalculateCompletionBox = new QalculateExpressionEditCompletionBox(this);
qalculateCompletion = new KCompletion();
@@ -91,15 +91,15 @@ QalculateExpressionEdit::QalculateExpressionEdit(bool connected_to_main_win, QWi
prev_position = 0;
pos_timer = startTimer(50);
- connect(qalculateCompletionBox, SIGNAL(highlighted(QListBoxItem*)), this, SLOT(insertCompletion(QListBoxItem*)));
- connect(qalculateCompletionBox, SIGNAL(userCancelled(const QString&)), this, SLOT(cancelCompletion(const QString&)));
- connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(onTextChanged(const QString&)));
+ connect(qalculateCompletionBox, SIGNAL(highlighted(TQListBoxItem*)), this, SLOT(insertCompletion(TQListBoxItem*)));
+ connect(qalculateCompletionBox, SIGNAL(userCancelled(const TQString&)), this, SLOT(cancelCompletion(const TQString&)));
+ connect(this, SIGNAL(textChanged(const TQString&)), this, SLOT(onTextChanged(const TQString&)));
}
QalculateExpressionEdit::~QalculateExpressionEdit() {}
-void QalculateExpressionEdit::timerEvent(QTimerEvent *event) {
+void QalculateExpressionEdit::timerEvent(TQTimerEvent *event) {
if(event->timerId() == pos_timer) {
if(cursorPosition() != prev_position) {
prev_position = cursorPosition();
@@ -110,7 +110,7 @@ void QalculateExpressionEdit::timerEvent(QTimerEvent *event) {
}
}
-void QalculateExpressionEdit::onTextChanged(const QString &str) {
+void QalculateExpressionEdit::onTextChanged(const TQString &str) {
if(str.isEmpty()) {
if(qalculateCompletionBox) {
qalculateCompletionBox->hide();
@@ -121,7 +121,7 @@ void QalculateExpressionEdit::onTextChanged(const QString &str) {
prev_position = cursorPosition();
}
-void QalculateExpressionEdit::cancelCompletion(const QString &str) {
+void QalculateExpressionEdit::cancelCompletion(const TQString &str) {
int new_pos = pos_before_completion;
setText(str);
setCursorPosition(new_pos);
@@ -137,10 +137,10 @@ bool QalculateExpressionEdit::completionEnabled() const {
return completionMode() == KGlobalSettings::CompletionPopup;
}
-QPopupMenu *QalculateExpressionEdit::createPopupMenu() {
+TQPopupMenu *QalculateExpressionEdit::createPopupMenu() {
setCompletionObject(NULL);
- QPopupMenu *menu = KLineEdit::createPopupMenu();
+ TQPopupMenu *menu = KLineEdit::createPopupMenu();
setCompletionObject(qalculateCompletion);
menu->insertSeparator();
if(completionMode() == KGlobalSettings::CompletionPopup) menu->insertItem(i18n("Disable Completion"), this, SLOT(disableCompletion()));
@@ -150,8 +150,8 @@ QPopupMenu *QalculateExpressionEdit::createPopupMenu() {
mainWin->ActionReadPrecision->plug(menu);
mainWin->ActionLimitImplicitMultiplication->plug(menu);
mainWin->ActionRPNMode->plug(menu);
- QPopupMenu *modes_menu = new QPopupMenu(menu);
- QObject::connect(modes_menu, SIGNAL(activated(int)), mainWin, SLOT(loadMode(int)));
+ TQPopupMenu *modes_menu = new TQPopupMenu(menu);
+ TQObject::connect(modes_menu, SIGNAL(activated(int)), mainWin, SLOT(loadMode(int)));
for(size_t i = 0; i < modes.size(); i++) {
modes_menu->insertItem(modes[i].name, i, i);
}
@@ -167,15 +167,15 @@ QPopupMenu *QalculateExpressionEdit::createPopupMenu() {
}
-#if QT_VERSION >= 0x030200
+#if TQT_VERSION >= 0x030200
#define GET_SELECTION int start = selectionStart(), end = -1; if(start >= 0) end = start + selectedText().length();
#else
#define GET_SELECTION int start = -1, end = -1; getSelection(&start, &end);
#endif
#define RESTORE_SELECTION if(start > 0) setSelection(start, end - start);
-void QalculateExpressionEdit::addToHistory(const QString &str) {
- for(QStringList::Iterator it = expression_history.begin(); it != expression_history.end(); ++it) {
+void QalculateExpressionEdit::addToHistory(const TQString &str) {
+ for(TQStringList::Iterator it = expression_history.begin(); it != expression_history.end(); ++it) {
if(*it == str) {
expression_history.erase(it);
break;
@@ -193,13 +193,13 @@ void QalculateExpressionEdit::setAfterCompletionPosition() {
setCursorPosition(cpos_ac);
}
-void QalculateExpressionEdit::insertCompletion(QListBoxItem *li) {
+void QalculateExpressionEdit::insertCompletion(TQListBoxItem *li) {
ExpressionItem *item = ((QalculateExpressionEditListBoxItem*) li)->item;
setSelection(cstart, cend - cstart + 1);
- QString str = completed_text;
+ TQString str = completed_text;
const ExpressionName *ename = NULL, *ename_r = NULL;
ename_r = &item->preferredInputName(false, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) this);
for(size_t name_i = 0; name_i <= item->countNames() && !ename; name_i++) {
@@ -265,7 +265,7 @@ void QalculateExpressionEdit::insertCompletion(QListBoxItem *li) {
}
-bool matchesExpressionItem(const QString &str, ExpressionItem *item) {
+bool matchesExpressionItem(const TQString &str, ExpressionItem *item) {
bool b_match = false;
for(size_t name_i = 1; !b_match && name_i <= item->countNames(); name_i++) {
const ExpressionName *ename = &item->getName(name_i);
@@ -282,7 +282,7 @@ bool matchesExpressionItem(const QString &str, ExpressionItem *item) {
return b_match;
}
-void QalculateExpressionEdit::makeCompletion(const QString &str) {
+void QalculateExpressionEdit::makeCompletion(const TQString &str) {
if(cursorPosition() <= 0 || str.isEmpty()) {
if(qalculateCompletionBox) {
qalculateCompletionBox->hide();
@@ -292,7 +292,7 @@ void QalculateExpressionEdit::makeCompletion(const QString &str) {
}
uint start = (uint) cursorPosition();
cend = (int) start - 1;
- QString str2 = str;
+ TQString str2 = str;
str2.truncate(start);
const char *cstr = str2.ascii();
bool non_number_before = false;
@@ -385,7 +385,7 @@ void QalculateExpressionEdit::wrapSelection() {
}
}
-void QalculateExpressionEdit::keyPressEvent(QKeyEvent *e) {
+void QalculateExpressionEdit::keyPressEvent(TQKeyEvent *e) {
if(e->key() == Key_Enter || e->key() == Key_Return) {
if(b_main) {
mainWin->execute();
@@ -626,10 +626,10 @@ void QalculateExpressionEdit::keyPressEvent(QKeyEvent *e) {
KLineEdit::keyPressEvent(e);
}
-bool QalculateExpressionEdit::eventFilter(QObject *o, QEvent *ev) {
- if(o == this && ev->type() == QEvent::KeyPress) {
- QKeyEvent *e = static_cast<QKeyEvent *>(ev);
- if((e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && qalculateCompletionBox && qalculateCompletionBox->isVisible()) {
+bool QalculateExpressionEdit::eventFilter(TQObject *o, TQEvent *ev) {
+ if(o == this && ev->type() == TQEvent::KeyPress) {
+ TQKeyEvent *e = static_cast<TQKeyEvent *>(ev);
+ if((e->key() == TQt::Key_Return || e->key() == TQt::Key_Enter) && qalculateCompletionBox && qalculateCompletionBox->isVisible()) {
if(qalculateCompletionBox->selectedItem()) {
KCursor::autoHideEventFilter(this, ev);
e->accept();
@@ -646,7 +646,7 @@ bool QalculateExpressionEdit::eventFilter(QObject *o, QEvent *ev) {
}
-void set_title(ExpressionItem *item, QString &title) {
+void set_title(ExpressionItem *item, TQString &title) {
if(item->type() != TYPE_VARIABLE || !item->title(false).empty()) {
title = item->title().c_str();
} else {
@@ -748,7 +748,7 @@ string sub_suffix(const ExpressionName *ename) {
return str;
}
-QString makeListName(ExpressionItem *item, QWidget *w, int *italic_index, bool *rich_text) {
+TQString makeListName(ExpressionItem *item, TQWidget *w, int *italic_index, bool *rich_text) {
string str;
const ExpressionName *ename, *ename_r;
*rich_text = false;
@@ -783,7 +783,7 @@ QString makeListName(ExpressionItem *item, QWidget *w, int *italic_index, bool *
return str.c_str();
}
-QalculateExpressionEditListBoxItem::QalculateExpressionEditListBoxItem(ExpressionItem *eitem) : QListBoxItem() {
+QalculateExpressionEditListBoxItem::QalculateExpressionEditListBoxItem(ExpressionItem *eitem) : TQListBoxItem() {
item = eitem;
italic_index = -1;
setText(makeListName(item, listBox(), &italic_index, &rich_text));
@@ -793,13 +793,13 @@ QalculateExpressionEditListBoxItem::~QalculateExpressionEditListBoxItem() {
}
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
-QString rPixelSqueeze(const QString& name, const QFontMetrics& fontMetrics, uint maxPixels)
+TQString rPixelSqueeze(const TQString& name, const TQFontMetrics& fontMetrics, uint maxPixels)
{
uint nameWidth = fontMetrics.width(name);
if (maxPixels < nameWidth)
{
- QString tmp = name;
+ TQString tmp = name;
const uint em = fontMetrics.maxWidth();
maxPixels -= fontMetrics.width("...");
@@ -822,18 +822,18 @@ QString rPixelSqueeze(const QString& name, const QFontMetrics& fontMetrics, uint
}
#endif
-void QalculateExpressionEditListBoxItem::paint(QPainter *painter) {
+void QalculateExpressionEditListBoxItem::paint(TQPainter *painter) {
int itemHeight = height(listBox());
- int entryWidth = listBox()->width() - listBox()->style().pixelMetric(QStyle::PM_ScrollBarExtent) - 2 * listBox()->style().pixelMetric(QStyle::PM_DefaultFrameWidth);
+ int entryWidth = listBox()->width() - listBox()->style().pixelMetric(TQStyle::PM_ScrollBarExtent) - 2 * listBox()->style().pixelMetric(TQStyle::PM_DefaultFrameWidth);
int titleWidth = (entryWidth / 2) - 1;
int nameWidth = entryWidth - titleWidth - 2;
if(!text().isEmpty()) {
- QString squeezedText;
+ TQString squeezedText;
if(rich_text) {
- QSimpleRichText rt(text(), painter->font());
+ TQSimpleRichText rt(text(), painter->font());
rt.setWidth(entryWidth);
if(rt.widthUsed() > nameWidth - 1) {
squeezedText = text();
@@ -843,11 +843,11 @@ void QalculateExpressionEditListBoxItem::paint(QPainter *painter) {
#else
squeezedText = KStringHandler::rPixelSqueeze(squeezedText, listBox()->fontMetrics(), nameWidth);
#endif
- painter->drawText(0, 0, nameWidth, itemHeight, Qt::AlignLeft | Qt::AlignVCenter, squeezedText);
+ painter->drawText(0, 0, nameWidth, itemHeight, TQt::AlignLeft | TQt::AlignVCenter, squeezedText);
} else {
- QColorGroup cg = listBox()->colorGroup();
- cg.setColor(QColorGroup::Text, painter->pen().color());
- rt.draw(painter, 1, 0, QRect(0, 0, nameWidth - 1, itemHeight), cg, &painter->brush());
+ TQColorGroup cg = listBox()->colorGroup();
+ cg.setColor(TQColorGroup::Text, painter->pen().color());
+ rt.draw(painter, 1, 0, TQRect(0, 0, nameWidth - 1, itemHeight), cg, &painter->brush());
}
} else {
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
@@ -855,29 +855,29 @@ void QalculateExpressionEditListBoxItem::paint(QPainter *painter) {
#else
squeezedText = KStringHandler::rPixelSqueeze(text(), listBox()->fontMetrics(), nameWidth);
#endif
- painter->drawText(0, 0, nameWidth, itemHeight, Qt::AlignLeft | Qt::AlignVCenter, squeezedText);
+ painter->drawText(0, 0, nameWidth, itemHeight, TQt::AlignLeft | TQt::AlignVCenter, squeezedText);
}
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
squeezedText = rPixelSqueeze(title, listBox()->fontMetrics(), titleWidth);
#else
squeezedText = KStringHandler::rPixelSqueeze(title, listBox()->fontMetrics(), titleWidth);
#endif
- QFont font = painter->font();
+ TQFont font = painter->font();
font.setItalic(true);
painter->setFont(font);
- painter->drawText(entryWidth - titleWidth, 0, titleWidth, itemHeight, Qt::AlignLeft | Qt::AlignVCenter, squeezedText);
+ painter->drawText(entryWidth - titleWidth, 0, titleWidth, itemHeight, TQt::AlignLeft | TQt::AlignVCenter, squeezedText);
}
}
-int QalculateExpressionEditListBoxItem::height(const QListBox *lb) const {
+int QalculateExpressionEditListBoxItem::height(const TQListBox *lb) const {
int h;
h = lb->fontMetrics().lineSpacing() + 4;
- return QMAX(h, QApplication::globalStrut().height());
+ return TQMAX(h, TQApplication::globalStrut().height());
}
-int QalculateExpressionEditListBoxItem::width(const QListBox *lb) const {
- return QMAX(lb->fontMetrics().width(text()) + 6, QApplication::globalStrut().width());
+int QalculateExpressionEditListBoxItem::width(const TQListBox *lb) const {
+ return TQMAX(lb->fontMetrics().width(text()) + 6, TQApplication::globalStrut().width());
}
bool QalculateExpressionEditListBoxItem::reuse(ExpressionItem *newItem) {
if(item == newItem) return false;
@@ -888,17 +888,17 @@ bool QalculateExpressionEditListBoxItem::reuse(ExpressionItem *newItem) {
return true;
}
-QalculateExpressionEditCompletionBox::QalculateExpressionEditCompletionBox(QWidget *parent, const char *name) : KCompletionBox(parent, name) {
+QalculateExpressionEditCompletionBox::QalculateExpressionEditCompletionBox(TQWidget *parent, const char *name) : KCompletionBox(parent, name) {
}
QalculateExpressionEditCompletionBox::~QalculateExpressionEditCompletionBox() {
}
-void QalculateExpressionEditCompletionBox::setItems(const QValueVector<ExpressionItem*>& items) {
+void QalculateExpressionEditCompletionBox::setItems(const TQValueVector<ExpressionItem*>& items) {
bool block = signalsBlocked();
blockSignals(true);
- QListBoxItem* item = firstItem();
+ TQListBoxItem* item = firstItem();
if(!item) {
insertItemList(items);
} else {
@@ -907,12 +907,12 @@ void QalculateExpressionEditCompletionBox::setItems(const QValueVector<Expressio
//to reduce flicker
bool dirty = false;
-#if QT_VERSION >= 0x030200
- QValueVector<ExpressionItem*>::ConstIterator it = items.constBegin();
- const QValueVector<ExpressionItem*>::ConstIterator itEnd = items.constEnd();
+#if TQT_VERSION >= 0x030200
+ TQValueVector<ExpressionItem*>::ConstIterator it = items.constBegin();
+ const TQValueVector<ExpressionItem*>::ConstIterator itEnd = items.constEnd();
#else
- QValueVector<ExpressionItem*>::ConstIterator it = items.begin();
- const QValueVector<ExpressionItem*>::ConstIterator itEnd = items.end();
+ TQValueVector<ExpressionItem*>::ConstIterator it = items.begin();
+ const TQValueVector<ExpressionItem*>::ConstIterator itEnd = items.end();
#endif
for (; it != itEnd; ++it) {
@@ -930,7 +930,7 @@ void QalculateExpressionEditCompletionBox::setItems(const QValueVector<Expressio
//If there is an unused item, mark as dirty -> less items now
if(item) dirty = true;
- QListBoxItem* tmp = item;
+ TQListBoxItem* tmp = item;
while((item = tmp)) {
tmp = item->next();
delete item;
@@ -952,21 +952,21 @@ void QalculateExpressionEditCompletionBox::setItems(const QValueVector<Expressio
blockSignals(block);
// Trigger d->down_workaround = true within KCompletionBox
- QStringList dummy;
+ TQStringList dummy;
KCompletionBox::insertItems(dummy, 1);
}
-void QalculateExpressionEditCompletionBox::insertItemList(const QValueVector<ExpressionItem*> & list, int index) {
+void QalculateExpressionEditCompletionBox::insertItemList(const TQValueVector<ExpressionItem*> & list, int index) {
if(index < 0) index = count();
- for(QValueVector<ExpressionItem*>::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ for(TQValueVector<ExpressionItem*>::ConstIterator it = list.begin(); it != list.end(); ++it) {
insertItem(new QalculateExpressionEditListBoxItem(*it), index++);
}
}
void QalculateExpressionEdit::setCompletedItems() {
- QString txt;
+ TQString txt;
if(qalculateCompletionBox && qalculateCompletionBox->isVisible()) {
// The popup is visible already - do the matching on the initial string,
// not on the currently selected one.
@@ -979,9 +979,9 @@ void QalculateExpressionEdit::setCompletedItems() {
if(qalculateCompletionBox->isVisible()) {
bool wasSelected = qalculateCompletionBox->isSelected(qalculateCompletionBox->currentItem());
- const QString currentSelection = qalculateCompletionBox->currentText();
+ const TQString currentSelection = qalculateCompletionBox->currentText();
qalculateCompletionBox->setItems(matched_items);
- QListBoxItem* item = qalculateCompletionBox->findItem(currentSelection, Qt::ExactMatch);
+ TQListBoxItem* item = qalculateCompletionBox->findItem(currentSelection, TQt::ExactMatch);
// If no item is selected, that means the listbox hasn't been manipulated by the user yet,
// because it's not possible otherwise to have no selected item. In such case make
// always the first item current and unselected, so that the current item doesn't jump.
@@ -1011,7 +1011,7 @@ void QalculateExpressionEdit::setCompletedItems() {
}
-void QalculateExpressionEditCompletionBox::hideEvent(QHideEvent*) {
+void QalculateExpressionEditCompletionBox::hideEvent(TQHideEvent*) {
emit hidden();
}
diff --git a/src/qalculateexpressionedit.h b/src/qalculateexpressionedit.h
index 7434489..6dff6da 100644
--- a/src/qalculateexpressionedit.h
+++ b/src/qalculateexpressionedit.h
@@ -23,13 +23,13 @@
#include <klineedit.h>
#include <kcompletionbox.h>
#include <kcompletion.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
-class QStringList;
-class QPopupMenu;
+class TQStringList;
+class TQPopupMenu;
class QalculateExpressionEditCompletionBox;
class ExpressionItem;
-class QListBoxItem;
+class TQListBoxItem;
class QalculateExpressionEdit : public KLineEdit {
@@ -37,31 +37,31 @@ class QalculateExpressionEdit : public KLineEdit {
public:
- QalculateExpressionEdit(bool connected_to_main_win, QWidget *parent = 0, const char *name = 0);
+ QalculateExpressionEdit(bool connected_to_main_win, TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateExpressionEdit();
- QValueVector<ExpressionItem*> matched_items;
+ TQValueVector<ExpressionItem*> matched_items;
bool b_main;
- QStringList expression_history;
+ TQStringList expression_history;
int expression_history_index;
bool dont_change_index;
QalculateExpressionEditCompletionBox *qalculateCompletionBox;
KCompletion *qalculateCompletion;
- virtual bool eventFilter(QObject *o, QEvent *ev);
- void keyPressEvent(QKeyEvent *e);
+ virtual bool eventFilter(TQObject *o, TQEvent *ev);
+ void keyPressEvent(TQKeyEvent *e);
public slots:
- void onTextChanged(const QString&);
- void addToHistory(const QString&);
+ void onTextChanged(const TQString&);
+ void addToHistory(const TQString&);
void wrapSelection();
- void makeCompletion(const QString&);
- void insertCompletion(QListBoxItem *li);
+ void makeCompletion(const TQString&);
+ void insertCompletion(TQListBoxItem *li);
void updateCompletion();
void setAfterCompletionPosition();
- void cancelCompletion(const QString &str);
+ void cancelCompletion(const TQString &str);
void setCompletedItems();
void enableCompletion();
void disableCompletion();
@@ -73,10 +73,10 @@ signals:
protected:
- virtual QPopupMenu *createPopupMenu();
- virtual void timerEvent(QTimerEvent*);
+ virtual TQPopupMenu *createPopupMenu();
+ virtual void timerEvent(TQTimerEvent*);
int cstart, cend, cpos_ac, prev_position, pos_timer;
- QString completed_text;
+ TQString completed_text;
int pos_before_completion;
};
@@ -87,17 +87,17 @@ class QalculateExpressionEditCompletionBox : public KCompletionBox {
public:
- QalculateExpressionEditCompletionBox(QWidget *parent, const char *name = 0);
+ QalculateExpressionEditCompletionBox(TQWidget *parent, const char *name = 0);
virtual ~QalculateExpressionEditCompletionBox();
- void insertItemList(const QValueVector<ExpressionItem*>& list, int index = -1);
+ void insertItemList(const TQValueVector<ExpressionItem*>& list, int index = -1);
public slots:
- void setItems(const QValueVector<ExpressionItem*>& items);
+ void setItems(const TQValueVector<ExpressionItem*>& items);
protected:
- void hideEvent(QHideEvent*);
+ void hideEvent(TQHideEvent*);
signals:
diff --git a/src/qalculatefunctionsdialog.cpp b/src/qalculatefunctionsdialog.cpp
index 7c3c089..b511394 100644
--- a/src/qalculatefunctionsdialog.cpp
+++ b/src/qalculatefunctionsdialog.cpp
@@ -21,13 +21,13 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditfunctiondialog.h"
#include <kpushbutton.h>
-#include <qsplitter.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <tqsplitter.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
#include <klistview.h>
#include <kmessagebox.h>
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <ktextbrowser.h>
#include <kapplication.h>
#include <kstdguiitem.h>
@@ -36,19 +36,19 @@ extern tree_struct function_cats;
extern vector<void*> ia_functions;
extern PrintOptions printops;
-QalculateFunctionsDialog::QalculateFunctionsDialog(QWidget *parent, const char *name) : KDialog(parent, name, false) {
+QalculateFunctionsDialog::QalculateFunctionsDialog(TQWidget *parent, const char *name) : KDialog(parent, name, false) {
function_edit_dialog = NULL;
selected_category = "";
selected_function = NULL;
- QHBoxLayout *layout = new QHBoxLayout(this, marginHint(), spacingHint());
+ TQHBoxLayout *layout = new TQHBoxLayout(this, marginHint(), spacingHint());
setCaption(i18n("Functions"));
- QVBoxLayout *leftLayout = new QVBoxLayout(layout, spacingHint());
+ TQVBoxLayout *leftLayout = new TQVBoxLayout(layout, spacingHint());
- QSplitter *splitter = new QSplitter(Qt::Horizontal, this);
+ TQSplitter *splitter = new TQSplitter(TQt::Horizontal, this);
leftLayout->addWidget(splitter);
categoryView = new KListView(splitter);
@@ -62,33 +62,33 @@ QalculateFunctionsDialog::QalculateFunctionsDialog(QWidget *parent, const char *
descriptionBrowser = new KTextBrowser(this);
leftLayout->addWidget(descriptionBrowser);
- QVBoxLayout *buttonLayout = new QVBoxLayout(layout, spacingHint());
+ TQVBoxLayout *buttonLayout = new TQVBoxLayout(layout, spacingHint());
- newButton = new QPushButton(i18n("New"), this);
+ newButton = new TQPushButton(i18n("New"), this);
buttonLayout->addWidget(newButton);
- editButton = new QPushButton(i18n("Edit"), this);
+ editButton = new TQPushButton(i18n("Edit"), this);
editButton->setEnabled(false);
buttonLayout->addWidget(editButton);
- deleteButton = new QPushButton(i18n("Delete"), this);
+ deleteButton = new TQPushButton(i18n("Delete"), this);
deleteButton->setEnabled(false);
buttonLayout->addWidget(deleteButton);
- deactivateButton = new QPushButton(i18n("Deactivate"), this);
+ deactivateButton = new TQPushButton(i18n("Deactivate"), this);
deactivateButton->setEnabled(false);
buttonLayout->addWidget(deactivateButton);
- insertButton = new QPushButton(i18n("Insert"), this);
+ insertButton = new TQPushButton(i18n("Insert"), this);
insertButton->setEnabled(false);
buttonLayout->addWidget(insertButton);
- applyButton = new QPushButton(i18n("Apply"), this);
+ applyButton = new TQPushButton(i18n("Apply"), this);
applyButton->setEnabled(false);
buttonLayout->addWidget(applyButton);
- buttonLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
+ buttonLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
helpButton = new KPushButton(KStdGuiItem::help(), this);
buttonLayout->addWidget(helpButton);
buttonClose = new KPushButton(KStdGuiItem::close(), this);
buttonClose->setFocus();
buttonLayout->addWidget(buttonClose);
- resize(QSize(675, 475).expandedTo(size()));
+ resize(TQSize(675, 475).expandedTo(size()));
connect(buttonClose, SIGNAL(clicked()), this, SLOT(close()));
connect(newButton, SIGNAL(clicked()), this, SLOT(newFunction()));
@@ -98,7 +98,7 @@ QalculateFunctionsDialog::QalculateFunctionsDialog(QWidget *parent, const char *
connect(insertButton, SIGNAL(clicked()), this, SLOT(insertFunction()));
connect(applyButton, SIGNAL(clicked()), this, SLOT(applyFunction()));
connect(functionView, SIGNAL(selectionChanged()), this, SLOT(functionSelected()));
- connect(functionView, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(functionDoubleClicked(QListViewItem*)));
+ connect(functionView, SIGNAL(doubleClicked(TQListViewItem*)), this, SLOT(functionDoubleClicked(TQListViewItem*)));
connect(categoryView, SIGNAL(selectionChanged()), this, SLOT(categorySelected()));
connect(helpButton, SIGNAL(clicked()), this, SLOT(slotHelp()));
@@ -115,10 +115,10 @@ void QalculateFunctionsDialog::updateFunctionTree() {
functionItems.clear();
categoryItems.clear();
categoryView->clear();
- QListViewItem *i = new KListViewItem(categoryView, i18n("All")), *i2;
+ TQListViewItem *i = new KListViewItem(categoryView, i18n("All")), *i2;
categoryItems[i] = i18n("All");
i->setOpen(true);
- QString str;
+ TQString str;
tree_struct *item, *item2;
function_cats.it = function_cats.items.begin();
if(function_cats.it != function_cats.items.end()) {
@@ -181,13 +181,13 @@ void QalculateFunctionsDialog::updateFunctionTree() {
if(!categoryView->selectedItem()) {
//if no category has been selected (previously selected has been renamed/deleted), select "All"
selected_category = i18n("All");
- QListViewItemIterator it(categoryView);
+ TQListViewItemIterator it(categoryView);
if(it.current())
categoryView->setSelected(it.current(), true);
}
}
-#define UPDATE_SELECTED_FUNCTION QListViewItem *i = functionView->selectedItem(); if(!i) return; selected_function = functionItems[i]; if(!selected_function) return;
+#define UPDATE_SELECTED_FUNCTION TQListViewItem *i = functionView->selectedItem(); if(!i) return; selected_function = functionItems[i]; if(!selected_function) return;
#define CHECK_IF_FUNCTION_STILL_THERE if(!CALCULATOR->stillHasFunction(selected_function)) {KMessageBox::error(this, i18n("Function does not exist anymore.")); emit functionsChanged(); return;}
void QalculateFunctionsDialog::insertFunction() {
@@ -227,7 +227,7 @@ void QalculateFunctionsDialog::editFunction() {
if(!function_edit_dialog) {
function_edit_dialog = new QalculateEditFunctionDialog(this);
}
- MathFunction *f = function_edit_dialog->editFunction(QString::null, selected_function);
+ MathFunction *f = function_edit_dialog->editFunction(TQString::null, selected_function);
if(f) {
selected_function = f;
if(!f->isActive()) {
@@ -250,7 +250,7 @@ void QalculateFunctionsDialog::newFunction() {
if(selected_category.isEmpty() || selected_category[0] != '/') {
f = function_edit_dialog->editFunction();
} else {
- QString str = selected_category;
+ TQString str = selected_category;
str.remove(0, 1);
f = function_edit_dialog->editFunction(str);
}
@@ -268,7 +268,7 @@ void QalculateFunctionsDialog::newFunction() {
}
}
-void QalculateFunctionsDialog::functionDoubleClicked(QListViewItem*i) {
+void QalculateFunctionsDialog::functionDoubleClicked(TQListViewItem*i) {
selected_function = functionItems[i];
if(!selected_function)
return;
@@ -276,7 +276,7 @@ void QalculateFunctionsDialog::functionDoubleClicked(QListViewItem*i) {
if(!function_edit_dialog) {
function_edit_dialog = new QalculateEditFunctionDialog(this);
}
- MathFunction *f = function_edit_dialog->editFunction(QString::null, selected_function);
+ MathFunction *f = function_edit_dialog->editFunction(TQString::null, selected_function);
if(f) {
selected_function = f;
if(!f->isActive()) {
@@ -293,7 +293,7 @@ void QalculateFunctionsDialog::functionDoubleClicked(QListViewItem*i) {
void QalculateFunctionsDialog::functionSelected() {
- QListViewItem *selected = functionView->selectedItem();
+ TQListViewItem *selected = functionView->selectedItem();
if(selected) {
MathFunction *f = functionItems[selected];
if(!CALCULATOR->stillHasFunction(f)) {
@@ -317,7 +317,7 @@ void QalculateFunctionsDialog::functionSelected() {
Argument *arg;
Argument default_arg;
- QString str, str2;
+ TQString str, str2;
const ExpressionName *ename = &f->preferredName(false, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) descriptionBrowser);
str += "<i><b>";
str += ename->name.c_str();
@@ -342,7 +342,7 @@ void QalculateFunctionsDialog::functionSelected() {
} else {
str += i18n("argument");
str += " ";
- str += QString::number(i2);
+ str += TQString::number(i2);
}
if(i2 > f->minargs()) {
str += "]";
@@ -395,7 +395,7 @@ void QalculateFunctionsDialog::functionSelected() {
if(arg && !arg->name().empty()) {
str += arg->name().c_str();
} else {
- str += QString::number(i2);
+ str += TQString::number(i2);
}
str += ": <i>";
if(arg) {
@@ -483,7 +483,7 @@ void QalculateFunctionsDialog::functionSelected() {
}
void QalculateFunctionsDialog::addFunctionTreeItem(MathFunction *f) {
- QListViewItem *i = new KListViewItem(functionView, f->title(true).c_str());
+ TQListViewItem *i = new KListViewItem(functionView, f->title(true).c_str());
functionItems[i] = f;
if(f == selected_function) {
functionView->setSelected(i, true);
@@ -492,7 +492,7 @@ void QalculateFunctionsDialog::addFunctionTreeItem(MathFunction *f) {
void QalculateFunctionsDialog::categorySelected() {
- QListViewItem *selected = categoryView->selectedItem();
+ TQListViewItem *selected = categoryView->selectedItem();
bool no_cat = false, b_all = false, b_inactive = false;
functionView->clear();
functionItems.clear();
@@ -526,7 +526,7 @@ void QalculateFunctionsDialog::categorySelected() {
}
}
if(!selected_function || !functionView->selectedItem()) {
- QListViewItemIterator it(functionView);
+ TQListViewItemIterator it(functionView);
if(it.current())
functionView->setSelected(it.current(), true);
}
diff --git a/src/qalculatefunctionsdialog.h b/src/qalculatefunctionsdialog.h
index 7a0104f..99f3998 100644
--- a/src/qalculatefunctionsdialog.h
+++ b/src/qalculatefunctionsdialog.h
@@ -21,13 +21,13 @@
#define QALCULATEFUNCTIONSDIALOG_H
#include <kdialog.h>
-#include <qmap.h>
+#include <tqmap.h>
class MathFunction;
class QalculateEditFunctionDialog;
class KListView;
-class QListViewItem;
-class QPushButton;
+class TQListViewItem;
+class TQPushButton;
class KTextBrowser;
/**
@@ -39,32 +39,32 @@ class QalculateFunctionsDialog : public KDialog {
public:
- QalculateFunctionsDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateFunctionsDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateFunctionsDialog();
QalculateEditFunctionDialog *function_edit_dialog;
- QString selected_category;
+ TQString selected_category;
MathFunction *selected_function;
void addFunctionTreeItem(MathFunction *f);
- QMap<QListViewItem*, MathFunction*> functionItems;
- QMap<QListViewItem*, QString> categoryItems;
+ TQMap<TQListViewItem*, MathFunction*> functionItems;
+ TQMap<TQListViewItem*, TQString> categoryItems;
KListView *categoryView;
KListView *functionView;
- QPushButton *newButton;
- QPushButton *editButton;
- QPushButton *deleteButton;
- QPushButton *deactivateButton;
- QPushButton *insertButton;
- QPushButton *applyButton;
- QPushButton *helpButton;
- QPushButton *buttonClose;
+ TQPushButton *newButton;
+ TQPushButton *editButton;
+ TQPushButton *deleteButton;
+ TQPushButton *deactivateButton;
+ TQPushButton *insertButton;
+ TQPushButton *applyButton;
+ TQPushButton *helpButton;
+ TQPushButton *buttonClose;
KTextBrowser *descriptionBrowser;
public slots:
void updateFunctionTree();
- void functionDoubleClicked(QListViewItem*);
+ void functionDoubleClicked(TQListViewItem*);
void functionSelected();
void categorySelected();
void insertFunction();
diff --git a/src/qalculateimportcsvdialog.cpp b/src/qalculateimportcsvdialog.cpp
index b7188ed..71ea628 100644
--- a/src/qalculateimportcsvdialog.cpp
+++ b/src/qalculateimportcsvdialog.cpp
@@ -20,64 +20,64 @@
#include "qalculateimportcsvdialog.h"
#include "qalculate_tde_utils.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kurlrequester.h>
#include <klineedit.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <kcombobox.h>
-#include <qspinbox.h>
-#include <qbuttongroup.h>
+#include <tqspinbox.h>
+#include <tqbuttongroup.h>
#include <kmessagebox.h>
#include <klocale.h>
#include <kapplication.h>
extern tree_struct variable_cats;
-QalculateImportCSVDialog::QalculateImportCSVDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Import CSV File"), Ok | Cancel | Help, Ok, true) {
+QalculateImportCSVDialog::QalculateImportCSVDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Import CSV File"), Ok | Cancel | Help, Ok, true) {
- setMainWidget(new QWidget(this));
- QGridLayout *grid = new QGridLayout(mainWidget(), 1, 1, 0, spacingHint());
- grid->addWidget(new QLabel(i18n("File:"), mainWidget()), 0, 0);
+ setMainWidget(new TQWidget(this));
+ TQGridLayout *grid = new TQGridLayout(mainWidget(), 1, 1, 0, spacingHint());
+ grid->addWidget(new TQLabel(i18n("File:"), mainWidget()), 0, 0);
fileEdit = new KURLRequester(mainWidget());
fileEdit->setMode(KFile::File | KFile::ExistingOnly | KFile::LocalOnly);
fileEdit->setCaption(i18n("Import CSV File"));
grid->addWidget(fileEdit, 0, 1);
- grid->addWidget(new QLabel(i18n("Import as:"), mainWidget()), 1, 0);
- QHBoxLayout *hbox = new QHBoxLayout(0, 0, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Import as:"), mainWidget()), 1, 0);
+ TQHBoxLayout *hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addLayout(hbox, 1, 1);
- QButtonGroup *group = new QButtonGroup();
- matrixButton = new QRadioButton(i18n("Matrix"), mainWidget());
+ TQButtonGroup *group = new TQButtonGroup();
+ matrixButton = new TQRadioButton(i18n("Matrix"), mainWidget());
group->insert(matrixButton, 0);
hbox->addWidget(matrixButton);
matrixButton->setChecked(true);
- vectorsButton = new QRadioButton(i18n("Vectors"), mainWidget());
+ vectorsButton = new TQRadioButton(i18n("Vectors"), mainWidget());
group->insert(vectorsButton, 1);
hbox->addWidget(vectorsButton);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- grid->addWidget(new QLabel(i18n("Name:"), mainWidget()), 2, 0);
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ grid->addWidget(new TQLabel(i18n("Name:"), mainWidget()), 2, 0);
nameEdit = new KLineEdit(mainWidget());
grid->addWidget(nameEdit, 2, 1);
- grid->addWidget(new QLabel(i18n("Descriptive name:"), mainWidget()), 3, 0);
+ grid->addWidget(new TQLabel(i18n("Descriptive name:"), mainWidget()), 3, 0);
titleEdit = new KLineEdit(mainWidget());
grid->addWidget(titleEdit, 3, 1);
- grid->addWidget(new QLabel(i18n("Category:"), mainWidget()), 4, 0);
+ grid->addWidget(new TQLabel(i18n("Category:"), mainWidget()), 4, 0);
categoryCombo = new KComboBox(mainWidget());
categoryCombo->setMaximumWidth(250);
categoryCombo->setEditable(true);
grid->addWidget(categoryCombo, 4, 1);
- grid->addWidget(new QLabel(i18n("First row:"), mainWidget()), 5, 0);
- firstRowBox = new QSpinBox(1, 1000, 1, mainWidget());
+ grid->addWidget(new TQLabel(i18n("First row:"), mainWidget()), 5, 0);
+ firstRowBox = new TQSpinBox(1, 1000, 1, mainWidget());
grid->addWidget(firstRowBox, 5, 1);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 6, 6, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- includesHeadingsButton = new QCheckBox(i18n("Includes headings"), mainWidget());
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ includesHeadingsButton = new TQCheckBox(i18n("Includes headings"), mainWidget());
includesHeadingsButton->setChecked(true);
hbox->addWidget(includesHeadingsButton);
- grid->addWidget(new QLabel(i18n("Delimiter:"), mainWidget()), 7, 0);
+ grid->addWidget(new TQLabel(i18n("Delimiter:"), mainWidget()), 7, 0);
delimiterCombo = new KComboBox(mainWidget());
delimiterCombo->setMaximumWidth(250);
delimiterCombo->insertItem(i18n("Comma"));
@@ -92,7 +92,7 @@ QalculateImportCSVDialog::QalculateImportCSVDialog(QWidget *parent, const char *
otherDelimiterEdit->setEnabled(false);
connect(delimiterCombo, SIGNAL(activated(int)), this, SLOT(delimiterChanged(int)));
- connect(nameEdit, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)));
+ connect(nameEdit, SIGNAL(textChanged(const TQString&)), this, SLOT(nameChanged(const TQString&)));
}
@@ -109,7 +109,7 @@ void QalculateImportCSVDialog::delimiterChanged(int i) {
void QalculateImportCSVDialog::slotOk() {
- QString str = fileEdit->url().stripWhiteSpace();
+ TQString str = fileEdit->url().stripWhiteSpace();
if(str.isEmpty()) {
//no name -- open dialog again
fileEdit->setFocus();
@@ -161,8 +161,8 @@ bool QalculateImportCSVDialog::importCSVFile() {
fileEdit->clear();
titleEdit->clear();
- //QStringList cats;
- QString catstr;
+ //TQStringList cats;
+ TQString catstr;
categoryCombo->clear();
tree_struct *item, *item2;
variable_cats.it = variable_cats.items.begin();
@@ -198,13 +198,13 @@ bool QalculateImportCSVDialog::importCSVFile() {
categoryCombo->lineEdit()->clear();
- if(exec() == QDialog::Accepted) {
+ if(exec() == TQDialog::Accepted) {
return true;
}
return false;
}
-void QalculateImportCSVDialog::nameChanged(const QString &name) {
+void QalculateImportCSVDialog::nameChanged(const TQString &name) {
if(name.isNull()) return;
if(!CALCULATOR->variableNameIsValid(name.ascii())) {
nameEdit->blockSignals(true);
diff --git a/src/qalculateimportcsvdialog.h b/src/qalculateimportcsvdialog.h
index 8b6e96e..0d73bc4 100644
--- a/src/qalculateimportcsvdialog.h
+++ b/src/qalculateimportcsvdialog.h
@@ -24,9 +24,9 @@
class KLineEdit;
class KComboBox;
-class QSpinBox;
-class QCheckBox;
-class QRadioButton;
+class TQSpinBox;
+class TQCheckBox;
+class TQRadioButton;
class KURLRequester;
/**
@@ -38,14 +38,14 @@ class QalculateImportCSVDialog : public KDialogBase {
public:
- QalculateImportCSVDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateImportCSVDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateImportCSVDialog();
KLineEdit *nameEdit, *titleEdit, *otherDelimiterEdit;
KComboBox *categoryCombo, *delimiterCombo;
- QSpinBox *firstRowBox;
- QCheckBox *includesHeadingsButton;
- QRadioButton *matrixButton, *vectorsButton;
+ TQSpinBox *firstRowBox;
+ TQCheckBox *includesHeadingsButton;
+ TQRadioButton *matrixButton, *vectorsButton;
KURLRequester *fileEdit;
bool importCSVFile();
@@ -53,7 +53,7 @@ public:
public slots:
void delimiterChanged(int);
- void nameChanged(const QString&);
+ void nameChanged(const TQString&);
protected slots:
diff --git a/src/qalculateinsertfunctiondialog.cpp b/src/qalculateinsertfunctiondialog.cpp
index c7fecda..0260b2a 100644
--- a/src/qalculateinsertfunctiondialog.cpp
+++ b/src/qalculateinsertfunctiondialog.cpp
@@ -19,19 +19,19 @@
***************************************************************************/
#include "qalculateinsertfunctiondialog.h"
#include "qalculate_tde_utils.h"
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kactivelabel.h>
#include <klineedit.h>
-#include <qlabel.h>
-#include <qgrid.h>
-#include <qhbox.h>
+#include <tqlabel.h>
+#include <tqgrid.h>
+#include <tqhbox.h>
#include <klocale.h>
-#include <qspinbox.h>
+#include <tqspinbox.h>
#include <kcombobox.h>
-#include <qhbuttongroup.h>
-#include <qradiobutton.h>
-#include <qstring.h>
-#include <qpushbutton.h>
+#include <tqhbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqstring.h>
+#include <tqpushbutton.h>
#include <kdatepicker.h>
#include <kfiledialog.h>
#include <kdeversion.h>
@@ -39,11 +39,11 @@
#include "buttonwithindexsignal.h"
#include "qalculateinsertmatrixvectordialog.h"
-extern QWidget *expressionWidget;
+extern TQWidget *expressionWidget;
extern PrintOptions printops;
extern EvaluationOptions evalops;
-QalculateInsertFunctionDialog::QalculateInsertFunctionDialog(MathFunction *f, QWidget *parent, const QString &selected_text, const char *name) : KDialogBase(parent, name, true, f->title(true).c_str(), Ok|Apply|Cancel, Ok) {
+QalculateInsertFunctionDialog::QalculateInsertFunctionDialog(MathFunction *f, TQWidget *parent, const TQString &selected_text, const char *name) : KDialogBase(parent, name, true, f->title(true).c_str(), Ok|Apply|Cancel, Ok) {
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
setButtonOKText(i18n("Insert"));
@@ -57,12 +57,12 @@ QalculateInsertFunctionDialog::QalculateInsertFunctionDialog(MathFunction *f, QW
setButtonApply(KGuiItem(i18n("Execute")));
#endif
mathFunction = f;
- QVBox *box = makeVBoxMainWidget();
+ TQVBox *box = makeVBoxMainWidget();
box->setSpacing(12);
- QString titlestr = "<font size=\"5\">";
+ TQString titlestr = "<font size=\"5\">";
titlestr += mathFunction->title(true).c_str();
titlestr += "</font>";
- new QLabel(titlestr, box);
+ new TQLabel(titlestr, box);
int args = 0;
bool has_vector = false;
if(mathFunction->args() > 0) {
@@ -74,14 +74,14 @@ QalculateInsertFunctionDialog::QalculateInsertFunctionDialog(MathFunction *f, QW
args = 1;
has_vector = true;
}
- QGrid *table = new QGrid(3, box);
+ TQGrid *table = new TQGrid(3, box);
table->setSpacing(6);
table->setMargin(12);
- table->setFrameStyle(QFrame::Sunken | QFrame::GroupBoxPanel);
+ table->setFrameStyle(TQFrame::Sunken | TQFrame::GroupBoxPanel);
label.resize(args);
entry.resize(args);
type_label.resize(args);
- QString argstr, typestr, defstr, argtype;
+ TQString argstr, typestr, defstr, argtype;
//create argument entries
Argument *arg;
for(int i = 0; i < args; i++) {
@@ -92,7 +92,7 @@ QalculateInsertFunctionDialog::QalculateInsertFunctionDialog(MathFunction *f, QW
} else {
argstr = i18n("Argument");
argstr += " ";
- argstr += QString::number(i + 1);
+ argstr += TQString::number(i + 1);
argstr += ":";
}
} else {
@@ -106,7 +106,7 @@ QalculateInsertFunctionDialog::QalculateInsertFunctionDialog(MathFunction *f, QW
defstr.remove(0, 1);
defstr.truncate(defstr.length() - 1);
}
- label[i] = new QLabel(argstr, table);
+ label[i] = new TQLabel(argstr, table);
if(arg) {
switch(arg->type()) {
case ARGUMENT_TYPE_INTEGER: {
@@ -118,9 +118,9 @@ QalculateInsertFunctionDialog::QalculateInsertFunctionDialog(MathFunction *f, QW
if(iarg->max()) {
max = iarg->max()->intValue();
}
- QSpinBox *qsp = new QSpinBox(min, max, 1, table);
+ TQSpinBox *qsp = new TQSpinBox(min, max, 1, table);
entry[i] = qsp;
- qsp->setButtonSymbols(QSpinBox::PlusMinus);
+ qsp->setButtonSymbols(TQSpinBox::PlusMinus);
int selected_value = 0;
bool convok = false;
if(i == 0 && !selected_text.isEmpty()) {
@@ -129,7 +129,7 @@ QalculateInsertFunctionDialog::QalculateInsertFunctionDialog(MathFunction *f, QW
if(convok && selected_value >= min && selected_value <= max) {
qsp->setValue(selected_value);
} else if(!mathFunction->getDefaultValue(i + 1).empty()) {
- qsp->setValue(QString(mathFunction->getDefaultValue(i + 1).c_str()).toInt());
+ qsp->setValue(TQString(mathFunction->getDefaultValue(i + 1).c_str()).toInt());
} else if(!arg->zeroForbidden() && min <= 0 && max >= 0) {
qsp->setValue(0);
} else {
@@ -144,14 +144,14 @@ QalculateInsertFunctionDialog::QalculateInsertFunctionDialog(MathFunction *f, QW
break;
}
case ARGUMENT_TYPE_BOOLEAN: {
- QHButtonGroup *bg = new QHButtonGroup(table);
+ TQHButtonGroup *bg = new TQHButtonGroup(table);
entry[i] = bg;
- bg->setFrameStyle(QFrame::Plain | QFrame::NoFrame);
+ bg->setFrameStyle(TQFrame::Plain | TQFrame::NoFrame);
bg->setMargin(0);
bg->setRadioButtonExclusive(TRUE);
- bg->insert(new QRadioButton(i18n("True"), bg), 1);
- bg->insert(new QRadioButton(i18n("False"), bg), 0);
- QString str = selected_text.stripWhiteSpace();
+ bg->insert(new TQRadioButton(i18n("True"), bg), 1);
+ bg->insert(new TQRadioButton(i18n("False"), bg), 0);
+ TQString str = selected_text.stripWhiteSpace();
if(i == 0 && str == "1") {
bg->setButton(1);
} else if(i == 0 && str == "0") {
@@ -233,47 +233,47 @@ QalculateInsertFunctionDialog::QalculateInsertFunctionDialog(MathFunction *f, QW
typestr.remove(0, 1);
typestr.remove(typestr.length() - 1, 1);
type_label[i] = new ButtonWithIndexSignal(typestr, i, table);
- QObject::connect(type_label[i], SIGNAL(clickedWithIndex(int)), this, SLOT(selectDate(int)));
+ TQObject::connect(type_label[i], SIGNAL(clickedWithIndex(int)), this, SLOT(selectDate(int)));
break;
}
case ARGUMENT_TYPE_MATRIX: {
typestr.remove(0, 1);
typestr.remove(typestr.length() - 1, 1);
type_label[i] = new ButtonWithIndexSignal(typestr, i, table);
- QObject::connect(type_label[i], SIGNAL(clickedWithIndex(int)), this, SLOT(insertMatrix(int)));
+ TQObject::connect(type_label[i], SIGNAL(clickedWithIndex(int)), this, SLOT(insertMatrix(int)));
break;
}
case ARGUMENT_TYPE_VECTOR: {
typestr.remove(0, 1);
typestr.remove(typestr.length() - 1, 1);
type_label[i] = new ButtonWithIndexSignal(typestr, i, table);
- QObject::connect(type_label[i], SIGNAL(clickedWithIndex(int)), this, SLOT(insertVector(int)));
+ TQObject::connect(type_label[i], SIGNAL(clickedWithIndex(int)), this, SLOT(insertVector(int)));
break;
}
case ARGUMENT_TYPE_FILE: {
typestr.remove(0, 1);
typestr.remove(typestr.length() - 1, 1);
type_label[i] = new ButtonWithIndexSignal(typestr, i, table);
- QObject::connect(type_label[i], SIGNAL(clickedWithIndex(int)), this, SLOT(selectFile(int)));
+ TQObject::connect(type_label[i], SIGNAL(clickedWithIndex(int)), this, SLOT(selectFile(int)));
break;
}
default: {
- type_label[i] = new QLabel(typestr, table);
+ type_label[i] = new TQLabel(typestr, table);
}
}
} else {
- type_label[i] = new QLabel(typestr, table);
+ type_label[i] = new TQLabel(typestr, table);
}
if(i == 0) entry[0]->setFocus();
}
//display function description
if(!mathFunction->description().empty()) {
- QString str = mathFunction->description().c_str();
+ TQString str = mathFunction->description().c_str();
str.replace("<", "&lt;");
str.replace(">", "&gt;");
str.replace("\n", "<br>");
KActiveLabel *descrLabel = new KActiveLabel(str, box);
- descrLabel->setAlignment(Qt::AlignJustify);
+ descrLabel->setAlignment(TQt::AlignJustify);
enableButtonSeparator(true);
}
}
@@ -281,8 +281,8 @@ QalculateInsertFunctionDialog::QalculateInsertFunctionDialog(MathFunction *f, QW
QalculateInsertFunctionDialog::~QalculateInsertFunctionDialog() {
}
-QString QalculateInsertFunctionDialog::functionExpression() {
- QString str = mathFunction->preferredInputName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) expressionWidget).name.c_str(), str2;
+TQString QalculateInsertFunctionDialog::functionExpression() {
+ TQString str = mathFunction->preferredInputName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) expressionWidget).name.c_str(), str2;
str += "(";
int args = 0;
if(mathFunction->args() > 0) {
@@ -294,13 +294,13 @@ QString QalculateInsertFunctionDialog::functionExpression() {
}
for(int i = 0; i < args; i++) {
if(mathFunction->getArgumentDefinition(i + 1) && mathFunction->getArgumentDefinition(i + 1)->type() == ARGUMENT_TYPE_BOOLEAN) {
- if(((QButtonGroup*) entry[i])->id(((QButtonGroup*) entry[i])->selected()) == 1) {
+ if(((TQButtonGroup*) entry[i])->id(((TQButtonGroup*) entry[i])->selected()) == 1) {
str2 = "1";
} else {
str2 = "0";
}
} else if(mathFunction->getArgumentDefinition(i + 1) && mathFunction->getArgumentDefinition(i + 1)->type() == ARGUMENT_TYPE_INTEGER) {
- str2 = ((QSpinBox*) entry[i])->text();
+ str2 = ((TQSpinBox*) entry[i])->text();
} else if(mathFunction->subtype() == SUBTYPE_DATA_SET && mathFunction->getArgumentDefinition(i + 1) && mathFunction->getArgumentDefinition(i + 1)->type() == ARGUMENT_TYPE_DATA_PROPERTY) {
int index = ((KComboBox*) entry[i])->currentItem();
DataPropertyIter it;
@@ -352,23 +352,23 @@ void QalculateInsertFunctionDialog::slotApply() {
void QalculateInsertFunctionDialog::selectDate(int index) {
KDialogBase *dialog = new KDialogBase(this, 0, true, i18n("Date"), Ok|Cancel);
KDatePicker *datePicker;
- QDate date(QDate::fromString(((KLineEdit*) entry[index])->text(), Qt::ISODate));
+ TQDate date(TQDate::fromString(((KLineEdit*) entry[index])->text(), TQt::ISODate));
if(date.isValid()) datePicker = new KDatePicker(dialog->makeVBoxMainWidget(), date);
else datePicker = new KDatePicker(dialog->makeVBoxMainWidget());
- if(dialog->exec() == QDialog::Accepted) {
- ((KLineEdit*) entry[index])->setText(datePicker->date().toString(Qt::ISODate));
+ if(dialog->exec() == TQDialog::Accepted) {
+ ((KLineEdit*) entry[index])->setText(datePicker->date().toString(TQt::ISODate));
}
dialog->deleteLater();
}
void QalculateInsertFunctionDialog::selectFile(int index) {
- QString filename = KFileDialog::getSaveFileName(((KLineEdit*) entry[index])->text(), QString::null, this, i18n("File"));
+ TQString filename = KFileDialog::getSaveFileName(((KLineEdit*) entry[index])->text(), TQString::null, this, i18n("File"));
if(!filename.isEmpty()) {
((KLineEdit*) entry[index])->setText(filename);
}
}
void QalculateInsertFunctionDialog::insertMatrix(int index) {
QalculateInsertMatrixVectorDialog *d = new QalculateInsertMatrixVectorDialog(this);
- QString str = ((KLineEdit*) entry[index])->text();
+ TQString str = ((KLineEdit*) entry[index])->text();
MathStructure mstruct;
if(!str.isEmpty()) {
CALCULATOR->parse(&mstruct, CALCULATOR->unlocalizeExpression(str.ascii(), evalops.parse_options));
@@ -385,7 +385,7 @@ void QalculateInsertFunctionDialog::insertMatrix(int index) {
}
void QalculateInsertFunctionDialog::insertVector(int index) {
QalculateInsertMatrixVectorDialog *d = new QalculateInsertMatrixVectorDialog(this);
- QString str = ((KLineEdit*) entry[index])->text();
+ TQString str = ((KLineEdit*) entry[index])->text();
MathStructure mstruct;
if(!str.isEmpty()) {
CALCULATOR->parse(&mstruct, CALCULATOR->unlocalizeExpression(str.ascii(), evalops.parse_options));
diff --git a/src/qalculateinsertfunctiondialog.h b/src/qalculateinsertfunctiondialog.h
index 5954196..c834819 100644
--- a/src/qalculateinsertfunctiondialog.h
+++ b/src/qalculateinsertfunctiondialog.h
@@ -21,7 +21,7 @@
#define QALCULATEINSERTFUNCTIONDIALOG_H
#include <kdialogbase.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
class MathFunction;
@@ -30,16 +30,16 @@ class QalculateInsertFunctionDialog : public KDialogBase {
public:
- QalculateInsertFunctionDialog(MathFunction *f, QWidget *parent = 0, const QString &selected_text = QString::null, const char *name = 0);
+ QalculateInsertFunctionDialog(MathFunction *f, TQWidget *parent = 0, const TQString &selected_text = TQString::null, const char *name = 0);
virtual ~QalculateInsertFunctionDialog();
- QString functionExpression();
+ TQString functionExpression();
MathFunction *mathFunction;
- QValueVector<QWidget*> label;
- QValueVector<QWidget*> entry;
- QValueVector<QWidget*> type_label;
+ TQValueVector<TQWidget*> label;
+ TQValueVector<TQWidget*> entry;
+ TQValueVector<TQWidget*> type_label;
protected slots:
diff --git a/src/qalculateinsertmatrixvectordialog.cpp b/src/qalculateinsertmatrixvectordialog.cpp
index 39c4465..2dbb933 100644
--- a/src/qalculateinsertmatrixvectordialog.cpp
+++ b/src/qalculateinsertmatrixvectordialog.cpp
@@ -20,79 +20,79 @@
#include "qalculateinsertmatrixvectordialog.h"
#include "qalculate_tde_utils.h"
-#include <qtable.h>
-#include <qgrid.h>
+#include <tqtable.h>
+#include <tqgrid.h>
#include <klineedit.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kcombobox.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qcheckbox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqcheckbox.h>
#include <kmessagebox.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <kapplication.h>
#include <kdeversion.h>
#include <kstdguiitem.h>
extern PrintOptions printops;
-class QalculateInsertMatrixTableItem : public QTableItem {
+class QalculateInsertMatrixTableItem : public TQTableItem {
public:
- QalculateInsertMatrixTableItem(QTable *table);
- QalculateInsertMatrixTableItem(QTable *table, const QString & text);
+ QalculateInsertMatrixTableItem(TQTable *table);
+ QalculateInsertMatrixTableItem(TQTable *table, const TQString & text);
int alignment() const;
};
-class QalculateInsertMatrixTable : public QTable {
+class QalculateInsertMatrixTable : public TQTable {
public:
- QalculateInsertMatrixTable(QWidget *parent = 0, const char *name = 0) : QTable(parent, name) {}
- QalculateInsertMatrixTable(int numRows, int numCols, QWidget *parent = 0, const char *name = 0) : QTable(numRows, numCols, parent, name) {}
+ QalculateInsertMatrixTable(TQWidget *parent = 0, const char *name = 0) : TQTable(parent, name) {}
+ QalculateInsertMatrixTable(int numRows, int numCols, TQWidget *parent = 0, const char *name = 0) : TQTable(numRows, numCols, parent, name) {}
- QWidget *beginEdit(int row, int col, bool replace) {
- QWidget *w = QTable::beginEdit(row, col, replace);
- ((QLineEdit*) w)->selectAll();
+ TQWidget *beginEdit(int row, int col, bool replace) {
+ TQWidget *w = TQTable::beginEdit(row, col, replace);
+ ((TQLineEdit*) w)->selectAll();
return w;
}
};
-QalculateInsertMatrixVectorDialog::QalculateInsertMatrixVectorDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Variable"), Ok | Cancel | User1, Ok, true, KGuiItem(i18n("Insert Selection"))) {
+QalculateInsertMatrixVectorDialog::QalculateInsertMatrixVectorDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Variable"), Ok | Cancel | User1, Ok, true, KGuiItem(i18n("Insert Selection"))) {
- setMainWidget(new QWidget(this));
- QGridLayout *grid = new QGridLayout(mainWidget(), 1, 1, 0, spacingHint());
- grid->addWidget(new QLabel(i18n("Rows:"), mainWidget()), 0, 0);
- rowsBox = new QSpinBox(1, 1000, 1, mainWidget());
+ setMainWidget(new TQWidget(this));
+ TQGridLayout *grid = new TQGridLayout(mainWidget(), 1, 1, 0, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Rows:"), mainWidget()), 0, 0);
+ rowsBox = new TQSpinBox(1, 1000, 1, mainWidget());
grid->addWidget(rowsBox, 0, 1);
- grid->addWidget(new QLabel(i18n("Columns:"), mainWidget()), 1, 0);
- columnsBox = new QSpinBox(1, 1000, 1, mainWidget());
+ grid->addWidget(new TQLabel(i18n("Columns:"), mainWidget()), 1, 0);
+ columnsBox = new TQSpinBox(1, 1000, 1, mainWidget());
grid->addWidget(columnsBox, 1, 1);
- QHBoxLayout *hbox = new QHBoxLayout(0, 0, spacingHint());
+ TQHBoxLayout *hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 2, 2, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- QButtonGroup *group = new QButtonGroup();
- matrixButton = new QRadioButton(i18n("Matrix"), mainWidget());
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ TQButtonGroup *group = new TQButtonGroup();
+ matrixButton = new TQRadioButton(i18n("Matrix"), mainWidget());
group->insert(matrixButton, 0);
hbox->addWidget(matrixButton);
- vectorButton = new QRadioButton(i18n("Vector"), mainWidget());
+ vectorButton = new TQRadioButton(i18n("Vector"), mainWidget());
group->insert(vectorButton, 1);
hbox->addWidget(vectorButton);
- elementsLabel = new QLabel(i18n("Elements:"), mainWidget());
+ elementsLabel = new TQLabel(i18n("Elements:"), mainWidget());
grid->addMultiCellWidget(elementsLabel, 3, 3, 0, 1);
elementsTable = new QalculateInsertMatrixTable(0, 0, mainWidget());
grid->addMultiCellWidget(elementsTable, 4, 4, 0, 1);
- elementsTable->setSelectionMode(QTable::Single);
+ elementsTable->setSelectionMode(TQTable::Single);
insertSelectionButton = actionButton(User1);
onSelectionChanged();
@@ -151,10 +151,10 @@ void QalculateInsertMatrixVectorDialog::columnsChanged(int i) {
}
}
-QString QalculateInsertMatrixVectorDialog::newVector() {
+TQString QalculateInsertMatrixVectorDialog::newVector() {
return editMatrixVector(NULL, true);
}
-QString QalculateInsertMatrixVectorDialog::newMatrix() {
+TQString QalculateInsertMatrixVectorDialog::newMatrix() {
return editMatrixVector(NULL, false);
}
@@ -167,7 +167,7 @@ void QalculateInsertMatrixVectorDialog::slotOk() {
for(int index_r = 0; index_r < r; index_r++) {
for(int index_c = 0; index_c < c; index_c++) {
if(!elementsTable->text(index_r, index_c).isEmpty()) {
- QString str2 = elementsTable->text(index_r, index_c).stripWhiteSpace();
+ TQString str2 = elementsTable->text(index_r, index_c).stripWhiteSpace();
if(!str2.isEmpty()) {
if(b) {
matrixstr += CALCULATOR->getComma();
@@ -209,14 +209,14 @@ void QalculateInsertMatrixVectorDialog::slotOk() {
accept();
}
void QalculateInsertMatrixVectorDialog::insertSelection() {
- QTableSelection sel = elementsTable->selection(elementsTable->currentSelection());
+ TQTableSelection sel = elementsTable->selection(elementsTable->currentSelection());
if(vectorButton->isChecked()) {
bool b = false;
matrixstr = "[";
for(int index_r = sel.topRow(); index_r <= sel.bottomRow(); index_r++) {
for(int index_c = sel.leftCol(); index_c <= sel.rightCol(); index_c++) {
if(!elementsTable->text(index_r, index_c).isEmpty()) {
- QString str2 = elementsTable->text(index_r, index_c).stripWhiteSpace();
+ TQString str2 = elementsTable->text(index_r, index_c).stripWhiteSpace();
if(!str2.isEmpty()) {
if(b) {
matrixstr += CALCULATOR->getComma();
@@ -258,7 +258,7 @@ void QalculateInsertMatrixVectorDialog::insertSelection() {
accept();
}
-QString QalculateInsertMatrixVectorDialog::editMatrixVector(const MathStructure *initial_value, bool create_vector, bool is_text_struct, bool is_result) {
+TQString QalculateInsertMatrixVectorDialog::editMatrixVector(const MathStructure *initial_value, bool create_vector, bool is_text_struct, bool is_result) {
if(initial_value && !initial_value->isVector()) {
return NULL;
@@ -368,14 +368,14 @@ QString QalculateInsertMatrixVectorDialog::editMatrixVector(const MathStructure
return matrixstr;
}
-#if QT_VERSION >= 0x030200
-QalculateInsertMatrixTableItem::QalculateInsertMatrixTableItem(QTable *table) : QTableItem(table, QTableItem::OnTyping) {}
+#if TQT_VERSION >= 0x030200
+QalculateInsertMatrixTableItem::QalculateInsertMatrixTableItem(TQTable *table) : TQTableItem(table, TQTableItem::OnTyping) {}
#else
-QalculateInsertMatrixTableItem::QalculateInsertMatrixTableItem(QTable *table) : QTableItem(table, QTableItem::OnTyping, QString::null) {}
+QalculateInsertMatrixTableItem::QalculateInsertMatrixTableItem(TQTable *table) : TQTableItem(table, TQTableItem::OnTyping, TQString::null) {}
#endif
-QalculateInsertMatrixTableItem::QalculateInsertMatrixTableItem(QTable *table, const QString & text) : QTableItem(table, QTableItem::OnTyping, text) {}
+QalculateInsertMatrixTableItem::QalculateInsertMatrixTableItem(TQTable *table, const TQString & text) : TQTableItem(table, TQTableItem::OnTyping, text) {}
-int QalculateInsertMatrixTableItem::alignment() const {return Qt::AlignRight;}
+int QalculateInsertMatrixTableItem::alignment() const {return TQt::AlignRight;}
#include "qalculateinsertmatrixvectordialog.moc"
diff --git a/src/qalculateinsertmatrixvectordialog.h b/src/qalculateinsertmatrixvectordialog.h
index 32ba4ea..1437d38 100644
--- a/src/qalculateinsertmatrixvectordialog.h
+++ b/src/qalculateinsertmatrixvectordialog.h
@@ -22,13 +22,13 @@
#include <kdialogbase.h>
-class QTable;
-class QLabel;
-class QSpinBox;
-class QRadioButton;
+class TQTable;
+class TQLabel;
+class TQSpinBox;
+class TQRadioButton;
class KComboBox;
class KLineEdit;
-class QPushButton;
+class TQPushButton;
class MathStructure;
class QalculateEditNamesDialog;
class KnownVariable;
@@ -42,19 +42,19 @@ class QalculateInsertMatrixVectorDialog : public KDialogBase {
public:
- QalculateInsertMatrixVectorDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateInsertMatrixVectorDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateInsertMatrixVectorDialog();
- QString newMatrix();
- QString newVector();
- QString editMatrixVector(const MathStructure *initial_value = NULL, bool create_vector = false, bool is_text_struct = false, bool is_result = false);
+ TQString newMatrix();
+ TQString newVector();
+ TQString editMatrixVector(const MathStructure *initial_value = NULL, bool create_vector = false, bool is_text_struct = false, bool is_result = false);
- QLabel *elementsLabel;
- QRadioButton *matrixButton, *vectorButton;
- QTable *elementsTable;
- QSpinBox *rowsBox, *columnsBox;
- QString matrixstr;
- QPushButton *insertSelectionButton;
+ TQLabel *elementsLabel;
+ TQRadioButton *matrixButton, *vectorButton;
+ TQTable *elementsTable;
+ TQSpinBox *rowsBox, *columnsBox;
+ TQString matrixstr;
+ TQPushButton *insertSelectionButton;
public slots:
diff --git a/src/qalculateperiodictabledialog.cpp b/src/qalculateperiodictabledialog.cpp
index a49101f..28611d6 100644
--- a/src/qalculateperiodictabledialog.cpp
+++ b/src/qalculateperiodictabledialog.cpp
@@ -20,62 +20,62 @@
#include "qalculateperiodictabledialog.h"
#include "qalculate_tde_utils.h"
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qcolor.h>
-#include <qpushbutton.h>
-#include <qvbox.h>
-#include <qgrid.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqcolor.h>
+#include <tqpushbutton.h>
+#include <tqvbox.h>
+#include <tqgrid.h>
#include "qalculatebuttonwithdata.h"
#include <kiconloader.h>
-#include <qfontmetrics.h>
+#include <tqfontmetrics.h>
#include <kactivelabel.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
extern PrintOptions printops;
-extern QWidget *expressionWidget;
+extern TQWidget *expressionWidget;
-QalculatePeriodicTableDialog::QalculatePeriodicTableDialog(QWidget *parent, const char *name)
+QalculatePeriodicTableDialog::QalculatePeriodicTableDialog(TQWidget *parent, const char *name)
: KDialogBase(parent, name, false, i18n("Periodic Table"), Close, Close, true) {
actionButton(Close)->setAutoDefault(false);
actionButton(Close)->setDefault(false);
- grid = new QGridLayout(makeMainWidget(), 11, 20, 0, 1);
+ grid = new TQGridLayout(makeMainWidget(), 11, 20, 0, 1);
- grid->addWidget(new QLabel("1", mainWidget()), 0, 1, Qt::AlignHCenter);
- grid->addWidget(new QLabel("2", mainWidget()), 0, 2, Qt::AlignHCenter);
- grid->addWidget(new QLabel("3", mainWidget()), 0, 4, Qt::AlignHCenter);
- grid->addWidget(new QLabel("4", mainWidget()), 0, 5, Qt::AlignHCenter);
- grid->addWidget(new QLabel("5", mainWidget()), 0, 6, Qt::AlignHCenter);
- grid->addWidget(new QLabel("6", mainWidget()), 0, 7, Qt::AlignHCenter);
- grid->addWidget(new QLabel("7", mainWidget()), 0, 8, Qt::AlignHCenter);
- grid->addWidget(new QLabel("8", mainWidget()), 0, 9, Qt::AlignHCenter);
- grid->addWidget(new QLabel("9", mainWidget()), 0, 10, Qt::AlignHCenter);
- grid->addWidget(new QLabel("10", mainWidget()), 0, 11, Qt::AlignHCenter);
- grid->addWidget(new QLabel("11", mainWidget()), 0, 12, Qt::AlignHCenter);
- grid->addWidget(new QLabel("12", mainWidget()), 0, 13, Qt::AlignHCenter);
- grid->addWidget(new QLabel("13", mainWidget()), 0, 14, Qt::AlignHCenter);
- grid->addWidget(new QLabel("14", mainWidget()), 0, 15, Qt::AlignHCenter);
- grid->addWidget(new QLabel("15", mainWidget()), 0, 16, Qt::AlignHCenter);
- grid->addWidget(new QLabel("16", mainWidget()), 0, 17, Qt::AlignHCenter);
- grid->addWidget(new QLabel("17", mainWidget()), 0, 18, Qt::AlignHCenter);
- grid->addWidget(new QLabel("18", mainWidget()), 0, 19, Qt::AlignHCenter);
+ grid->addWidget(new TQLabel("1", mainWidget()), 0, 1, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("2", mainWidget()), 0, 2, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("3", mainWidget()), 0, 4, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("4", mainWidget()), 0, 5, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("5", mainWidget()), 0, 6, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("6", mainWidget()), 0, 7, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("7", mainWidget()), 0, 8, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("8", mainWidget()), 0, 9, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("9", mainWidget()), 0, 10, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("10", mainWidget()), 0, 11, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("11", mainWidget()), 0, 12, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("12", mainWidget()), 0, 13, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("13", mainWidget()), 0, 14, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("14", mainWidget()), 0, 15, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("15", mainWidget()), 0, 16, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("16", mainWidget()), 0, 17, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("17", mainWidget()), 0, 18, TQt::AlignHCenter);
+ grid->addWidget(new TQLabel("18", mainWidget()), 0, 19, TQt::AlignHCenter);
- grid->addWidget(new QLabel("1 ", mainWidget()), 1, 0, Qt::AlignRight);
- grid->addWidget(new QLabel("2 ", mainWidget()), 2, 0, Qt::AlignRight);
- grid->addWidget(new QLabel("3 ", mainWidget()), 3, 0, Qt::AlignRight);
- grid->addWidget(new QLabel("4 ", mainWidget()), 4, 0, Qt::AlignRight);
- grid->addWidget(new QLabel("5 ", mainWidget()), 5, 0, Qt::AlignRight);
- grid->addWidget(new QLabel("6 ", mainWidget()), 6, 0, Qt::AlignRight);
- grid->addWidget(new QLabel("7 ", mainWidget()), 7, 0, Qt::AlignRight);
+ grid->addWidget(new TQLabel("1 ", mainWidget()), 1, 0, TQt::AlignRight);
+ grid->addWidget(new TQLabel("2 ", mainWidget()), 2, 0, TQt::AlignRight);
+ grid->addWidget(new TQLabel("3 ", mainWidget()), 3, 0, TQt::AlignRight);
+ grid->addWidget(new TQLabel("4 ", mainWidget()), 4, 0, TQt::AlignRight);
+ grid->addWidget(new TQLabel("5 ", mainWidget()), 5, 0, TQt::AlignRight);
+ grid->addWidget(new TQLabel("6 ", mainWidget()), 6, 0, TQt::AlignRight);
+ grid->addWidget(new TQLabel("7 ", mainWidget()), 7, 0, TQt::AlignRight);
- grid->addWidget(new QLabel("*", mainWidget()), 6, 3, Qt::AlignRight);
- grid->addWidget(new QLabel("**", mainWidget()), 7, 3, Qt::AlignRight);
- grid->addWidget(new QLabel("*", mainWidget()), 9, 3, Qt::AlignRight);
- grid->addWidget(new QLabel("**", mainWidget()), 10, 3, Qt::AlignRight);
- grid->addWidget(new QLabel(" ", mainWidget()), 8, 0);
+ grid->addWidget(new TQLabel("*", mainWidget()), 6, 3, TQt::AlignRight);
+ grid->addWidget(new TQLabel("**", mainWidget()), 7, 3, TQt::AlignRight);
+ grid->addWidget(new TQLabel("*", mainWidget()), 9, 3, TQt::AlignRight);
+ grid->addWidget(new TQLabel("**", mainWidget()), 10, 3, TQt::AlignRight);
+ grid->addWidget(new TQLabel(" ", mainWidget()), 8, 0);
DataSet *dc = CALCULATOR->getDataSet("atom");
if(!dc) {
@@ -83,7 +83,7 @@ QalculatePeriodicTableDialog::QalculatePeriodicTableDialog(QWidget *parent, cons
}
DataObject *e;
QalculateButtonWithData *e_button;
- QString tip;
+ TQString tip;
DataProperty *p_xpos = dc->getProperty("x_pos");
DataProperty *p_ypos = dc->getProperty("y_pos");
DataProperty *p_weight = dc->getProperty("weight");
@@ -92,7 +92,7 @@ QalculatePeriodicTableDialog::QalculatePeriodicTableDialog(QWidget *parent, cons
DataProperty *p_class = dc->getProperty("class");
DataProperty *p_name = dc->getProperty("name");
int x_pos = 0, y_pos = 0, group = 0;
- QString weight;
+ TQString weight;
int w = -1;
for(size_t i = 1; i < 120; i++) {
e = dc->getObject(i2s(i));
@@ -106,58 +106,58 @@ QalculatePeriodicTableDialog::QalculatePeriodicTableDialog(QWidget *parent, cons
group = s2i(e->getProperty(p_class));
switch(group) {
case 1: {
- e_button->setPaletteBackgroundColor(QColor(0xee, 0xcc, 0xee));
- e_button->setPaletteForegroundColor(QColor(0, 0, 0));
+ e_button->setPaletteBackgroundColor(TQColor(0xee, 0xcc, 0xee));
+ e_button->setPaletteForegroundColor(TQColor(0, 0, 0));
break;
}
case 2: {
- e_button->setPaletteBackgroundColor(QColor(0xdd, 0xcc, 0xee));
- e_button->setPaletteForegroundColor(QColor(0, 0, 0));
+ e_button->setPaletteBackgroundColor(TQColor(0xdd, 0xcc, 0xee));
+ e_button->setPaletteForegroundColor(TQColor(0, 0, 0));
break;
}
case 3: {
- e_button->setPaletteBackgroundColor(QColor(0xdd, 0xdd, 0xff));
- e_button->setPaletteForegroundColor(QColor(0, 0, 0));
+ e_button->setPaletteBackgroundColor(TQColor(0xdd, 0xdd, 0xff));
+ e_button->setPaletteForegroundColor(TQColor(0, 0, 0));
break;
}
case 4: {
- e_button->setPaletteBackgroundColor(QColor(0xdd, 0xee, 0xff));
- e_button->setPaletteForegroundColor(QColor(0, 0, 0));
+ e_button->setPaletteBackgroundColor(TQColor(0xdd, 0xee, 0xff));
+ e_button->setPaletteForegroundColor(TQColor(0, 0, 0));
break;
}
case 5: {
- e_button->setPaletteBackgroundColor(QColor(0xcc, 0xee, 0xee));
- e_button->setPaletteForegroundColor(QColor(0, 0, 0));
+ e_button->setPaletteBackgroundColor(TQColor(0xcc, 0xee, 0xee));
+ e_button->setPaletteForegroundColor(TQColor(0, 0, 0));
break;
}
case 6: {
- e_button->setPaletteBackgroundColor(QColor(0xbb, 0xff, 0xbb));
- e_button->setPaletteForegroundColor(QColor(0, 0, 0));
+ e_button->setPaletteBackgroundColor(TQColor(0xbb, 0xff, 0xbb));
+ e_button->setPaletteForegroundColor(TQColor(0, 0, 0));
break;
}
case 7: {
- e_button->setPaletteBackgroundColor(QColor(0xee, 0xff, 0xdd));
- e_button->setPaletteForegroundColor(QColor(0, 0, 0));
+ e_button->setPaletteBackgroundColor(TQColor(0xee, 0xff, 0xdd));
+ e_button->setPaletteForegroundColor(TQColor(0, 0, 0));
break;
}
case 8: {
- e_button->setPaletteBackgroundColor(QColor(0xff, 0xff, 0xaa));
- e_button->setPaletteForegroundColor(QColor(0, 0, 0));
+ e_button->setPaletteBackgroundColor(TQColor(0xff, 0xff, 0xaa));
+ e_button->setPaletteForegroundColor(TQColor(0, 0, 0));
break;
}
case 9: {
- e_button->setPaletteBackgroundColor(QColor(0xff, 0xdd, 0xaa));
- e_button->setPaletteForegroundColor(QColor(0, 0, 0));
+ e_button->setPaletteBackgroundColor(TQColor(0xff, 0xdd, 0xaa));
+ e_button->setPaletteForegroundColor(TQColor(0, 0, 0));
break;
}
case 10: {
- e_button->setPaletteBackgroundColor(QColor(0xff, 0xcc, 0xdd));
- e_button->setPaletteForegroundColor(QColor(0, 0, 0));
+ e_button->setPaletteBackgroundColor(TQColor(0xff, 0xcc, 0xdd));
+ e_button->setPaletteForegroundColor(TQColor(0, 0, 0));
break;
}
case 11: {
- e_button->setPaletteBackgroundColor(QColor(0xaa, 0xee, 0xdd));
- e_button->setPaletteForegroundColor(QColor(0, 0, 0));
+ e_button->setPaletteBackgroundColor(TQColor(0xaa, 0xee, 0xdd));
+ e_button->setPaletteForegroundColor(TQColor(0, 0, 0));
break;
}
}
@@ -179,8 +179,8 @@ QalculatePeriodicTableDialog::QalculatePeriodicTableDialog(QWidget *parent, cons
tip += "\n";
tip += weight;
}
- QToolTip::add(e_button, tip);
- QObject::connect(e_button, SIGNAL(clickedWithData(void*)), this, SLOT(showElementInfo(void*)));
+ TQToolTip::add(e_button, tip);
+ TQObject::connect(e_button, SIGNAL(clickedWithData(void*)), this, SLOT(showElementInfo(void*)));
}
}
@@ -192,22 +192,22 @@ void QalculatePeriodicTableDialog::showElementInfo(void *e) {
dialog->show();
}
-QalculateElementInfoDialog::QalculateElementInfoDialog(DataObject *element, QWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Element Data"), Close, Close, true) {
+QalculateElementInfoDialog::QalculateElementInfoDialog(DataObject *element, TQWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Element Data"), Close, Close, true) {
- setWFlags(getWFlags() | Qt::WDestructiveClose);
+ setWFlags(getWFlags() | TQt::WDestructiveClose);
e = element;
DataSet *ds = e->parentSet();
if(!ds) {
close();
return;
}
- QVBox *vbox = makeVBoxMainWidget();
- QVBox *vbox2 = new QVBox(vbox);
+ TQVBox *vbox = makeVBoxMainWidget();
+ TQVBox *vbox2 = new TQVBox(vbox);
DataProperty *p_number = ds->getProperty("number");
DataProperty *p_symbol = ds->getProperty("symbol");
DataProperty *p_class = ds->getProperty("class");
DataProperty *p_name = ds->getProperty("name");
- QString str = "<div align=\"right\"><font size=4>"; str += e->getProperty(p_number).c_str(); str += "</font></div>";
+ TQString str = "<div align=\"right\"><font size=4>"; str += e->getProperty(p_number).c_str(); str += "</font></div>";
new KActiveLabel(str, vbox2);
str = "<font size=6>"; str += e->getProperty(p_symbol).c_str(); str += "</font>";
new KActiveLabel(str, vbox2);
@@ -215,11 +215,11 @@ QalculateElementInfoDialog::QalculateElementInfoDialog(DataObject *element, QWid
new KActiveLabel(str, vbox2);
QalculateButtonWithData *button;
- QGrid *grid = new QGrid(3, Qt::Horizontal, vbox);
+ TQGrid *grid = new TQGrid(3, TQt::Horizontal, vbox);
int group = s2i(e->getProperty(p_class));
if(group > 0) {
str = "<b>"; str += i18n("Classification"); str += ":"; str += "</b>";
- new QLabel(str, grid);
+ new TQLabel(str, grid);
switch(group) {
case ALKALI_METALS: {str = i18n("Alkali Metal"); break;}
case ALKALI_EARTH_METALS: {str = i18n("Alkaline-Earth Metal"); break;}
@@ -235,21 +235,21 @@ QalculateElementInfoDialog::QalculateElementInfoDialog(DataObject *element, QWid
default: {str = i18n("Unknown"); break;}
}
new KActiveLabel(str, grid);
- new QFrame(grid);
+ new TQFrame(grid);
}
DataPropertyIter it;
DataProperty *dp = ds->getFirstProperty(&it);
- QString sval;
+ TQString sval;
while(dp) {
if(!dp->isHidden() && dp != p_number && dp != p_class && dp != p_symbol && dp != p_name) {
sval = e->getPropertyDisplayString(dp).c_str();
if(!sval.isEmpty()) {
str = "<b>"; str += dp->title().c_str(); str += ":"; str += "</b>";
- new QLabel(str, grid);
+ new TQLabel(str, grid);
new KActiveLabel(sval, grid);
- button = new QalculateButtonWithData((void*) dp, QIconSet(SmallIcon("editpaste")), "", grid);
- QObject::connect(button, SIGNAL(clickedWithData(void*)), SLOT(insertElementData(void*)));
+ button = new QalculateButtonWithData((void*) dp, TQIconSet(SmallIcon("editpaste")), "", grid);
+ TQObject::connect(button, SIGNAL(clickedWithData(void*)), SLOT(insertElementData(void*)));
}
}
dp = ds->getNextProperty(&it);
@@ -261,7 +261,7 @@ void QalculateElementInfoDialog::insertElementData(void *data) {
DataProperty *dp = (DataProperty*) data;
DataSet *ds = dp->parentSet();
if(ds) {
- QString str = ds->preferredInputName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) expressionWidget).name.c_str();
+ TQString str = ds->preferredInputName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) expressionWidget).name.c_str();
str += "(";
str += e->getProperty(ds->getPrimaryKeyProperty()).c_str();
str += CALCULATOR->getComma().c_str();
diff --git a/src/qalculateperiodictabledialog.h b/src/qalculateperiodictabledialog.h
index 5d52767..523a50a 100644
--- a/src/qalculateperiodictabledialog.h
+++ b/src/qalculateperiodictabledialog.h
@@ -21,9 +21,9 @@
#define QALCULATEPERIODICTABLEDIALOG_H
#include <kdialogbase.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
-class QGridLayout;
+class TQGridLayout;
class DataObject;
/**
@@ -35,10 +35,10 @@ class QalculatePeriodicTableDialog : public KDialogBase {
public:
- QalculatePeriodicTableDialog(QWidget *parent = 0, const char *name = 0);
+ QalculatePeriodicTableDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculatePeriodicTableDialog();
- QGridLayout *grid;
+ TQGridLayout *grid;
public slots:
@@ -52,7 +52,7 @@ class QalculateElementInfoDialog : public KDialogBase {
public:
- QalculateElementInfoDialog(DataObject *element, QWidget *parent = 0, const char *name = 0);
+ QalculateElementInfoDialog(DataObject *element, TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateElementInfoDialog();
DataObject *e;
diff --git a/src/qalculateplotdialog.cpp b/src/qalculateplotdialog.cpp
index e1adbae..ff4c155 100644
--- a/src/qalculateplotdialog.cpp
+++ b/src/qalculateplotdialog.cpp
@@ -23,19 +23,19 @@
#include <klineedit.h>
#include <kpushbutton.h>
#include <kcombobox.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qspinbox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqspinbox.h>
#include <kmessagebox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <ktextedit.h>
#include <klistview.h>
#include <kdeversion.h>
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#else
#include <ktabwidget.h>
#endif
@@ -46,22 +46,22 @@
extern PlotLegendPlacement default_plot_legend_placement;
extern bool default_plot_display_grid;
extern bool default_plot_full_border;
-extern QString default_plot_min;
-extern QString default_plot_max;
-extern QString default_plot_step;
+extern TQString default_plot_min;
+extern TQString default_plot_max;
+extern TQString default_plot_step;
extern int default_plot_sampling_rate;
extern bool default_plot_use_sampling_rate;
extern bool default_plot_rows;
extern int default_plot_type;
extern PlotStyle default_plot_style;
extern PlotSmoothing default_plot_smoothing;
-extern QString default_plot_variable;
+extern TQString default_plot_variable;
extern bool default_plot_color;
extern bool enable_plot_expression_completion;
extern EvaluationOptions evalops;
-QalculatePlotDialog::QalculatePlotDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Plot"), User1 | Close | Help, Close, false, KStdGuiItem::save()) {
+QalculatePlotDialog::QalculatePlotDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Plot"), User1 | Close | Help, Close, false, KStdGuiItem::save()) {
actionButton(Close)->setAutoDefault(false);
actionButton(Close)->setDefault(false);
@@ -71,46 +71,46 @@ QalculatePlotDialog::QalculatePlotDialog(QWidget *parent, const char *name) : KD
actionButton(User1)->setEnabled(false);
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
- tabs = new QTabWidget(this);
+ tabs = new TQTabWidget(this);
#else
tabs = new KTabWidget(this);
#endif
setMainWidget(tabs);
- QWidget *page1 = new QWidget(this);
- QWidget *page2 = new QWidget(this);
- QWidget *page3 = new QWidget(this);
+ TQWidget *page1 = new TQWidget(this);
+ TQWidget *page2 = new TQWidget(this);
+ TQWidget *page3 = new TQWidget(this);
tabs->addTab(page1, i18n("Data"));
tabs->addTab(page2, i18n("Function Range"));
tabs->addTab(page3, i18n("Appearance"));
- QGridLayout *grid = new QGridLayout(page1, 1, 1, spacingHint());
- grid->addWidget(new QLabel(i18n("Title:"), page1), 0, 0);
+ TQGridLayout *grid = new TQGridLayout(page1, 1, 1, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Title:"), page1), 0, 0);
seriesTitleEdit = new KLineEdit(page1);
grid->addWidget(seriesTitleEdit, 0, 1);
- grid->addWidget(new QLabel(i18n("Expression:"), page1), 1, 0);
+ grid->addWidget(new TQLabel(i18n("Expression:"), page1), 1, 0);
expressionEdit = new QalculateExpressionEdit(false, page1);
if(!enable_plot_expression_completion) expressionEdit->disableCompletion();
expressionEdit->updateCompletion();
grid->addWidget(expressionEdit, 1, 1);
- QHBoxLayout *hbox = new QHBoxLayout(0, 0, spacingHint());
+ TQHBoxLayout *hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 2, 2, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- typeGroup = new QButtonGroup();
- functionButton = new QRadioButton(i18n("Function"), page1);
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ typeGroup = new TQButtonGroup();
+ functionButton = new TQRadioButton(i18n("Function"), page1);
typeGroup->insert(functionButton, 0);
hbox->addWidget(functionButton);
- vectorMatrixButton = new QRadioButton(i18n("Vector/matrix"), page1);
+ vectorMatrixButton = new TQRadioButton(i18n("Vector/matrix"), page1);
typeGroup->insert(vectorMatrixButton, 1);
hbox->addWidget(vectorMatrixButton);
- pairedMatrixButton = new QRadioButton(i18n("Paired matrix"), page1);
+ pairedMatrixButton = new TQRadioButton(i18n("Paired matrix"), page1);
typeGroup->insert(pairedMatrixButton, 2);
hbox->addWidget(pairedMatrixButton);
- rowsButton = new QCheckBox(i18n("Rows"), page1);
+ rowsButton = new TQCheckBox(i18n("Rows"), page1);
hbox->addWidget(rowsButton);
- xVariableLabel = new QLabel(i18n("X variable:"), page1);
+ xVariableLabel = new TQLabel(i18n("X variable:"), page1);
grid->addWidget(xVariableLabel, 3, 0);
xVariableEdit = new KLineEdit(page1);
grid->addWidget(xVariableEdit, 3, 1);
- grid->addWidget(new QLabel(i18n("Style:"), page1), 4, 0);
+ grid->addWidget(new TQLabel(i18n("Style:"), page1), 4, 0);
styleCombo = new KComboBox(page1);
styleCombo->insertItem(i18n("Line"));
styleCombo->insertItem(i18n("Points"));
@@ -121,7 +121,7 @@ QalculatePlotDialog::QalculatePlotDialog(QWidget *parent, const char *name) : KD
styleCombo->insertItem(i18n("Candlesticks"));
styleCombo->insertItem(i18n("Dots"));
grid->addWidget(styleCombo, 4, 1);
- grid->addWidget(new QLabel(i18n("Smoothing:"), page1), 5, 0);
+ grid->addWidget(new TQLabel(i18n("Smoothing:"), page1), 5, 0);
smoothingCombo = new KComboBox(page1);
smoothingCombo->insertItem(i18n("None"));
smoothingCombo->insertItem(i18n("Monotonic"));
@@ -129,25 +129,25 @@ QalculatePlotDialog::QalculatePlotDialog(QWidget *parent, const char *name) : KD
smoothingCombo->insertItem(i18n("Bezier"));
smoothingCombo->insertItem(i18n("Bezier (monotonic)"));
grid->addWidget(smoothingCombo, 5, 1);
- grid->addWidget(new QLabel(i18n("Y-axis:"), page1), 6, 0);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Y-axis:"), page1), 6, 0);
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addLayout(hbox, 6, 1);
- QButtonGroup *group = new QButtonGroup();
- primaryButton = new QRadioButton(i18n("Primary"), page1);
+ TQButtonGroup *group = new TQButtonGroup();
+ primaryButton = new TQRadioButton(i18n("Primary"), page1);
group->insert(primaryButton, 0);
hbox->addWidget(primaryButton);
- secondaryButton = new QRadioButton(i18n("Secondary"), page1);
+ secondaryButton = new TQRadioButton(i18n("Secondary"), page1);
group->insert(secondaryButton, 1);
hbox->addWidget(secondaryButton);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 7, 7, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- addButton = new QPushButton(i18n("Add"), page1);
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ addButton = new TQPushButton(i18n("Add"), page1);
hbox->addWidget(addButton);
- modifyButton = new QPushButton(i18n("Modify"), page1);
+ modifyButton = new TQPushButton(i18n("Modify"), page1);
hbox->addWidget(modifyButton);
- removeButton = new QPushButton(i18n("Remove"), page1);
+ removeButton = new TQPushButton(i18n("Remove"), page1);
hbox->addWidget(removeButton);
seriesView = new KListView(page1);
seriesView->addColumn(i18n("Title"));
@@ -160,68 +160,68 @@ QalculatePlotDialog::QalculatePlotDialog(QWidget *parent, const char *name) : KD
seriesView->setSorting(-1);
grid->addMultiCellWidget(seriesView, 8, 8, 0, 1);
- grid = new QGridLayout(page2, 1, 1, spacingHint());
- grid->addWidget(new QLabel(i18n("Min:"), page2), 0, 0);
+ grid = new TQGridLayout(page2, 1, 1, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Min:"), page2), 0, 0);
minEdit = new KLineEdit(page2);
grid->addWidget(minEdit, 0, 1);
- grid->addWidget(new QLabel(i18n("Max:"), page2), 1, 0);
+ grid->addWidget(new TQLabel(i18n("Max:"), page2), 1, 0);
maxEdit = new KLineEdit(page2);
grid->addWidget(maxEdit, 1, 1);
- rangeGroup = new QButtonGroup();
- samplingRateButton = new QRadioButton(i18n("Sampling rate:"), page2);
+ rangeGroup = new TQButtonGroup();
+ samplingRateButton = new TQRadioButton(i18n("Sampling rate:"), page2);
rangeGroup->insert(samplingRateButton, 0);
grid->addWidget(samplingRateButton, 2, 0);
- samplingRateBox = new QSpinBox(1, 10000, 10, page2);
+ samplingRateBox = new TQSpinBox(1, 10000, 10, page2);
grid->addWidget(samplingRateBox, 2, 1);
- stepSizeButton = new QRadioButton(i18n("Step size:"), page2);
+ stepSizeButton = new TQRadioButton(i18n("Step size:"), page2);
rangeGroup->insert(stepSizeButton, 1);
grid->addWidget(stepSizeButton, 3, 0);
stepSizeEdit = new KLineEdit(page2);
grid->addWidget(stepSizeEdit, 3, 1);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 4, 4, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
applyRangeButton = new KPushButton(KStdGuiItem::apply(), page2);
hbox->addWidget(applyRangeButton);
- grid->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), 5, 0);
+ grid->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding), 5, 0);
- grid = new QGridLayout(page3, 1, 1, spacingHint());
- grid->addWidget(new QLabel(i18n("Title:"), page3), 0, 0);
+ grid = new TQGridLayout(page3, 1, 1, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Title:"), page3), 0, 0);
titleEdit = new KLineEdit(page3);
grid->addWidget(titleEdit, 0, 1);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 1, 1, 0, 1);
- gridButton = new QCheckBox(i18n("Display grid"), page3);
+ gridButton = new TQCheckBox(i18n("Display grid"), page3);
hbox->addWidget(gridButton);
- fullBorderButton = new QCheckBox(i18n("Display full border"), page3);
+ fullBorderButton = new TQCheckBox(i18n("Display full border"), page3);
hbox->addWidget(fullBorderButton);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- logXButton = new QCheckBox(i18n("Logarithmic x scale:"), page3);
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ logXButton = new TQCheckBox(i18n("Logarithmic x scale:"), page3);
grid->addWidget(logXButton, 2, 0);
- logXBox = new QSpinBox(2, 100, 1, page3);
+ logXBox = new TQSpinBox(2, 100, 1, page3);
grid->addWidget(logXBox, 2, 1);
- logYButton = new QCheckBox(i18n("Logarithmic y scale:"), page3);
+ logYButton = new TQCheckBox(i18n("Logarithmic y scale:"), page3);
grid->addWidget(logYButton, 3, 0);
- logYBox = new QSpinBox(2, 100, 1, page3);
+ logYBox = new TQSpinBox(2, 100, 1, page3);
grid->addWidget(logYBox, 3, 1);
- grid->addWidget(new QLabel(i18n("X-axis label:"), page3), 4, 0);
+ grid->addWidget(new TQLabel(i18n("X-axis label:"), page3), 4, 0);
xLabelEdit = new KLineEdit(page3);
grid->addWidget(xLabelEdit, 4, 1);
- grid->addWidget(new QLabel(i18n("Y-axis label:"), page3), 5, 0);
+ grid->addWidget(new TQLabel(i18n("Y-axis label:"), page3), 5, 0);
yLabelEdit = new KLineEdit(page3);
grid->addWidget(yLabelEdit, 5, 1);
- grid->addWidget(new QLabel(i18n("Color display:"), page3), 6, 0);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ grid->addWidget(new TQLabel(i18n("Color display:"), page3), 6, 0);
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addLayout(hbox, 6, 1);
- group = new QButtonGroup();
- colorButton = new QRadioButton(i18n("Color"), page3);
+ group = new TQButtonGroup();
+ colorButton = new TQRadioButton(i18n("Color"), page3);
group->insert(colorButton, 0);
hbox->addWidget(colorButton);
- monochromeButton = new QRadioButton(i18n("Monochrome"), page3);
+ monochromeButton = new TQRadioButton(i18n("Monochrome"), page3);
group->insert(monochromeButton, 1);
hbox->addWidget(monochromeButton);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
- grid->addWidget(new QLabel(i18n("Legend placement:"), page3), 7, 0);
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
+ grid->addWidget(new TQLabel(i18n("Legend placement:"), page3), 7, 0);
legendPlacementCombo = new KComboBox(page3);
legendPlacementCombo->insertItem(i18n("Hide"));
legendPlacementCombo->insertItem(i18n("Top-left"));
@@ -231,12 +231,12 @@ QalculatePlotDialog::QalculatePlotDialog(QWidget *parent, const char *name) : KD
legendPlacementCombo->insertItem(i18n("Below"));
legendPlacementCombo->insertItem(i18n("Outside"));
grid->addWidget(legendPlacementCombo, 7, 1);
- hbox = new QHBoxLayout(0, 0, spacingHint());
+ hbox = new TQHBoxLayout(0, 0, spacingHint());
grid->addMultiCellLayout(hbox, 8, 8, 0, 1);
- hbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ hbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
applyAppearanceButton = new KPushButton(KStdGuiItem::apply(), page3);
hbox->addWidget(applyAppearanceButton);
- grid->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), 9, 0);
+ grid->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding), 9, 0);
primaryButton->setChecked(true);
modifyButton->setEnabled(false);
@@ -303,7 +303,7 @@ QalculatePlotDialog::QalculatePlotDialog(QWidget *parent, const char *name) : KD
connect(applyRangeButton, SIGNAL(clicked()), this, SLOT(applyRange()));
connect(applyAppearanceButton, SIGNAL(clicked()), this, SLOT(applyAppearance()));
connect(seriesView, SIGNAL(selectionChanged()), this, SLOT(seriesSelected()));
- connect(seriesView, SIGNAL(itemRenamed(QListViewItem*, const QString&, int)), this, SLOT(seriesItemRenamed(QListViewItem*, const QString&, int)));
+ connect(seriesView, SIGNAL(itemRenamed(TQListViewItem*, const TQString&, int)), this, SLOT(seriesItemRenamed(TQListViewItem*, const TQString&, int)));
connect(addButton, SIGNAL(clicked()), this, SLOT(addSeries()));
connect(modifyButton, SIGNAL(clicked()), this, SLOT(modifySeries()));
connect(removeButton, SIGNAL(clicked()), this, SLOT(removeSeries()));
@@ -372,7 +372,7 @@ void QalculatePlotDialog::onClosing() {
removeButton->setEnabled(false);
actionButton(User1)->setEnabled(false);
- QListViewItemIterator it(seriesView);
+ TQListViewItemIterator it(seriesView);
while(it.current()) {
MathStructure *y_vector = itemYVector[it.current()], *x_vector = itemXVector[it.current()];
if(y_vector) delete y_vector;
@@ -394,7 +394,7 @@ void QalculatePlotDialog::onClosing() {
CALCULATOR->closeGnuplot();
}
-void QalculatePlotDialog::seriesItemRenamed(QListViewItem *i, const QString &str, int col) {
+void QalculatePlotDialog::seriesItemRenamed(TQListViewItem *i, const TQString &str, int col) {
if(!i) return;
if(col == 0) {
updatePlot();
@@ -415,7 +415,7 @@ void QalculatePlotDialog::seriesItemRenamed(QListViewItem *i, const QString &str
seriesSelected();
}
void QalculatePlotDialog::seriesSelected() {
- QListViewItem *i = seriesView->selectedItem();
+ TQListViewItem *i = seriesView->selectedItem();
if(i) {
modifyButton->setEnabled(true);
removeButton->setEnabled(true);
@@ -444,7 +444,7 @@ void QalculatePlotDialog::typeChanged(int i) {
xVariableLabel->setEnabled(i != 1 && i != 2);
}
void QalculatePlotDialog::expressionActivated() {
- QListViewItem *i = seriesView->selectedItem();
+ TQListViewItem *i = seriesView->selectedItem();
if(i) {
modifySeries();
} else {
@@ -452,7 +452,7 @@ void QalculatePlotDialog::expressionActivated() {
}
}
void QalculatePlotDialog::addSeries() {
- QString expression = expressionEdit->text();
+ TQString expression = expressionEdit->text();
if(expression.stripWhiteSpace().isEmpty()) {
expressionEdit->setFocus();
KMessageBox::error(this, i18n("Empty expression."));
@@ -460,13 +460,13 @@ void QalculatePlotDialog::addSeries() {
}
int type = 0, axis = 1;
bool rows = false;
- QString title = seriesTitleEdit->text();
+ TQString title = seriesTitleEdit->text();
if(vectorMatrixButton->isChecked()) {
type = 1;
} else if(pairedMatrixButton->isChecked()) {
type = 2;
}
- QString str_x = xVariableEdit->text().stripWhiteSpace();
+ TQString str_x = xVariableEdit->text().stripWhiteSpace();
if(str_x.isEmpty() && type == 0) {
xVariableEdit->setFocus();
KMessageBox::error(this, i18n("Empty x variable."));
@@ -485,7 +485,7 @@ void QalculatePlotDialog::addSeries() {
MathStructure *x_vector, *y_vector;
generatePlotSeries(&x_vector, &y_vector, type, expression.ascii(), str_x.ascii());
rows = rowsButton->isChecked();
- QListViewItem *i = new KListViewItem(seriesView, seriesView->lastChild(), title, expression);
+ TQListViewItem *i = new KListViewItem(seriesView, seriesView->lastChild(), title, expression);
itemStyle[i] = styleCombo->currentItem();
itemSmoothing[i] = smoothingCombo->currentItem();
itemType[i] = type;
@@ -498,22 +498,22 @@ void QalculatePlotDialog::addSeries() {
updatePlot();
}
void QalculatePlotDialog::modifySeries() {
- QListViewItem *i = seriesView->selectedItem();
+ TQListViewItem *i = seriesView->selectedItem();
if(i) {
- QString expression = expressionEdit->text();
+ TQString expression = expressionEdit->text();
if(expression.stripWhiteSpace().isEmpty()) {
expressionEdit->setFocus();
KMessageBox::error(this, i18n("Empty expression."));
return;
}
int type = 0, axis = 1;
- QString title = seriesTitleEdit->text();
+ TQString title = seriesTitleEdit->text();
if(vectorMatrixButton->isChecked()) {
type = 1;
} else if(pairedMatrixButton->isChecked()) {
type = 2;
}
- QString str_x = xVariableEdit->text().stripWhiteSpace();
+ TQString str_x = xVariableEdit->text().stripWhiteSpace();
if(str_x.isEmpty() && type == 0) {
xVariableEdit->setFocus();
KMessageBox::error(this, i18n("Empty x variable."));
@@ -549,7 +549,7 @@ void QalculatePlotDialog::modifySeries() {
}
}
void QalculatePlotDialog::removeSeries() {
- QListViewItem *i = seriesView->selectedItem();
+ TQListViewItem *i = seriesView->selectedItem();
if(i) {
MathStructure *x_vector = itemXVector[i], *y_vector = itemYVector[i];
if(x_vector) delete x_vector;
@@ -569,7 +569,7 @@ void QalculatePlotDialog::removeSeries() {
}
}
void QalculatePlotDialog::applyRange() {
- QListViewItemIterator it(seriesView);
+ TQListViewItemIterator it(seriesView);
while(it.current()) {
MathStructure *x_vector = itemXVector[it.current()], *y_vector = itemYVector[it.current()];
if(y_vector) delete y_vector;
@@ -588,13 +588,13 @@ void QalculatePlotDialog::applyAppearance() {
}
bool QalculatePlotDialog::generatePlot(PlotParameters &pp, vector<MathStructure> &y_vectors, vector<MathStructure> &x_vectors, vector<PlotDataParameters*> &pdps) {
- QListViewItemIterator it(seriesView);
+ TQListViewItemIterator it(seriesView);
if(!it.current()) {
return false;
}
while(it.current()) {
int count = 1;
- QString title = it.current()->text(0), expression = it.current()->text(1);
+ TQString title = it.current()->text(0), expression = it.current()->text(1);
int style = itemStyle[it.current()];
int smoothing = itemSmoothing[it.current()];
int type = itemType[it.current()];
@@ -715,19 +715,19 @@ bool QalculatePlotDialog::generatePlot(PlotParameters &pp, vector<MathStructure>
return true;
}
void QalculatePlotDialog::savePlot() {
- QString title = titleEdit->text().ascii();
+ TQString title = titleEdit->text().ascii();
if(title.isEmpty()) {
title = "plot.png";
} else {
title += ".png";
}
- QString filename;
+ TQString filename;
while(true) {
filename = KFileDialog::getSaveFileName(title, "image/png image/svg application/postscript image/x-eps /text/x-tex image/x-xfig", 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;
}
diff --git a/src/qalculateplotdialog.h b/src/qalculateplotdialog.h
index ed8f065..7dbf8d8 100644
--- a/src/qalculateplotdialog.h
+++ b/src/qalculateplotdialog.h
@@ -21,20 +21,20 @@
#define QALCULATEPLOTDIALOG_H
#include <kdialogbase.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
class KLineEdit;
-class QCheckBox;
-class QRadioButton;
-class QSpinBox;
-class QButtonGroup;
+class TQCheckBox;
+class TQRadioButton;
+class TQSpinBox;
+class TQButtonGroup;
class KComboBox;
-class QPushButton;
-class QTabWidget;
+class TQPushButton;
+class TQTabWidget;
class KListView;
-class QLabel;
-class QListViewItem;
+class TQLabel;
+class TQListViewItem;
class QalculateExpressionEdit;
#include "qalculate_tde_utils.h"
@@ -48,32 +48,32 @@ class QalculatePlotDialog : public KDialogBase {
public:
- QalculatePlotDialog(QWidget *parent = 0, const char *name = 0);
+ QalculatePlotDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculatePlotDialog();
- QLabel *xVariableLabel;
+ TQLabel *xVariableLabel;
KLineEdit *seriesTitleEdit, *xVariableEdit, *minEdit, *maxEdit, *stepSizeEdit, *titleEdit, *xLabelEdit, *yLabelEdit;
QalculateExpressionEdit *expressionEdit;
- QCheckBox *rowsButton, *gridButton, *fullBorderButton, *logXButton, *logYButton;
- QRadioButton *functionButton, *vectorMatrixButton, *pairedMatrixButton, *primaryButton, *secondaryButton, *samplingRateButton, *stepSizeButton, *colorButton, *monochromeButton;
- QSpinBox *samplingRateBox, *logXBox, *logYBox;
- QButtonGroup *typeGroup, *rangeGroup;
+ TQCheckBox *rowsButton, *gridButton, *fullBorderButton, *logXButton, *logYButton;
+ TQRadioButton *functionButton, *vectorMatrixButton, *pairedMatrixButton, *primaryButton, *secondaryButton, *samplingRateButton, *stepSizeButton, *colorButton, *monochromeButton;
+ TQSpinBox *samplingRateBox, *logXBox, *logYBox;
+ TQButtonGroup *typeGroup, *rangeGroup;
KComboBox *styleCombo, *smoothingCombo, *legendPlacementCombo;
- QPushButton *addButton, *modifyButton, *removeButton, *applyRangeButton, *applyAppearanceButton;
- QTabWidget *tabs;
+ TQPushButton *addButton, *modifyButton, *removeButton, *applyRangeButton, *applyAppearanceButton;
+ TQTabWidget *tabs;
KListView *seriesView;
bool generatePlot(PlotParameters &pp, vector<MathStructure> &y_vectors, vector<MathStructure> &x_vectors, vector<PlotDataParameters*> &pdps);
void generatePlotSeries(MathStructure **x_vector, MathStructure **y_vector, int type, string str, string str_x);
- QMap<QListViewItem*, int> itemStyle;
- QMap<QListViewItem*, int> itemSmoothing;
- QMap<QListViewItem*, int> itemType;
- QMap<QListViewItem*, int> itemAxis;
- QMap<QListViewItem*, bool> itemRows;
- QMap<QListViewItem*, MathStructure*> itemXVector;
- QMap<QListViewItem*, MathStructure*> itemYVector;
- QMap<QListViewItem*, QString> itemXVariable;
+ TQMap<TQListViewItem*, int> itemStyle;
+ TQMap<TQListViewItem*, int> itemSmoothing;
+ TQMap<TQListViewItem*, int> itemType;
+ TQMap<TQListViewItem*, int> itemAxis;
+ TQMap<TQListViewItem*, bool> itemRows;
+ TQMap<TQListViewItem*, MathStructure*> itemXVector;
+ TQMap<TQListViewItem*, MathStructure*> itemYVector;
+ TQMap<TQListViewItem*, TQString> itemXVariable;
protected slots:
@@ -82,7 +82,7 @@ protected slots:
public slots:
void onClosing();
- void seriesItemRenamed(QListViewItem*, const QString&, int);
+ void seriesItemRenamed(TQListViewItem*, const TQString&, int);
void seriesSelected();
void rangeTypeChanged(int);
void typeChanged(int);
diff --git a/src/qalculateprecisiondialog.cpp b/src/qalculateprecisiondialog.cpp
index d1f6741..7aae1d3 100644
--- a/src/qalculateprecisiondialog.cpp
+++ b/src/qalculateprecisiondialog.cpp
@@ -19,31 +19,31 @@
***************************************************************************/
#include "qalculateprecisiondialog.h"
-#include <qlabel.h>
-#include <qspinbox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
#include <klocale.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include <kguiitem.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kpushbutton.h>
#include <kdeversion.h>
-QalculatePrecisionDialog::QalculatePrecisionDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Precision"), Apply | Close, Close, true) {
+QalculatePrecisionDialog::QalculatePrecisionDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Precision"), Apply | Close, Close, true) {
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
setButtonApplyText(i18n("Recalculate"));
#else
setButtonApply(KGuiItem(i18n("Recalculate")));
#endif
- setMainWidget(new QWidget(this));
- QHBoxLayout *box = new QHBoxLayout(mainWidget());
+ setMainWidget(new TQWidget(this));
+ TQHBoxLayout *box = new TQHBoxLayout(mainWidget());
box->setSpacing(spacingHint());
- box->addWidget(new QLabel(i18n("Precision:"), mainWidget()));
- precisionBox = new QSpinBox(1, 100000, 1, mainWidget());
- precisionBox->setButtonSymbols(QSpinBox::PlusMinus);
+ box->addWidget(new TQLabel(i18n("Precision:"), mainWidget()));
+ precisionBox = new TQSpinBox(1, 100000, 1, mainWidget());
+ precisionBox->setButtonSymbols(TQSpinBox::PlusMinus);
box->addWidget(precisionBox);
- resize(QSize(300, minimumSizeHint().height()).expandedTo(minimumSizeHint()));
+ resize(TQSize(300, minimumSizeHint().height()).expandedTo(minimumSizeHint()));
}
diff --git a/src/qalculateprecisiondialog.h b/src/qalculateprecisiondialog.h
index 9abc99c..ea8968a 100644
--- a/src/qalculateprecisiondialog.h
+++ b/src/qalculateprecisiondialog.h
@@ -22,7 +22,7 @@
#include <kdialogbase.h>
-class QSpinBox;
+class TQSpinBox;
/**
@author Niklas Knutsson
@@ -33,10 +33,10 @@ class QalculatePrecisionDialog : public KDialogBase {
public:
- QalculatePrecisionDialog(QWidget *parent = 0, const char *name = 0);
+ QalculatePrecisionDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculatePrecisionDialog();
- QSpinBox *precisionBox;
+ TQSpinBox *precisionBox;
};
diff --git a/src/qalculatepreferencesdialog.cpp b/src/qalculatepreferencesdialog.cpp
index 46c5882..02d9eee 100644
--- a/src/qalculatepreferencesdialog.cpp
+++ b/src/qalculatepreferencesdialog.cpp
@@ -21,24 +21,24 @@
#include "qalculate_tde_utils.h"
#include <klocale.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qtooltip.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqtooltip.h>
#include <kdeversion.h>
#if KDE_VERSION_MAJOR > 3 || KDE_VERSION_MINOR > 1
#include <kfontrequester.h>
#endif
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#else
#include <ktabwidget.h>
#endif
-#include <qpushbutton.h>
-#include <qfont.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqpushbutton.h>
+#include <tqfont.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include <kcolorbutton.h>
#include "kqalculate.h"
@@ -47,29 +47,29 @@ extern PrintOptions printops;
extern EvaluationOptions evalops;
extern bool fetch_exchange_rates_at_startup, save_mode_on_exit, save_defs_on_exit;
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 QWidget *expressionWidget, *resultWidget, *statusWidget_l;
+extern TQString custom_result_font, custom_expression_font, custom_status_font;
+extern TQWidget *expressionWidget, *resultWidget, *statusWidget_l;
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 rpn_keypad_only;
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
#include <kfontdialog.h>
-class KFontRequester : public QWidget
+class KFontRequester : public TQWidget
{
Q_OBJECT
public:
- KFontRequester( QWidget *parent=0L, const char *name=0L,
+ KFontRequester( TQWidget *parent=0L, const char *name=0L,
bool onlyFixed=false );
- QFont font() const { return m_selFont; }
- virtual void setFont( const QFont &font, bool onlyFixed=false );
+ TQFont font() const { return m_selFont; }
+ virtual void setFont( const TQFont &font, bool onlyFixed=false );
protected:
@@ -82,24 +82,24 @@ class KFontRequester : public QWidget
protected:
bool m_onlyFixed;
- QString m_sampleText, m_title;
- QLabel *m_sampleLabel;
- QPushButton *m_button;
- QFont m_selFont;
+ TQString m_sampleText, m_title;
+ TQLabel *m_sampleLabel;
+ TQPushButton *m_button;
+ TQFont m_selFont;
};
-KFontRequester::KFontRequester( QWidget *parent, const char *name,
- bool onlyFixed ) : QWidget( parent, name ),
+KFontRequester::KFontRequester( TQWidget *parent, const char *name,
+ bool onlyFixed ) : TQWidget( parent, name ),
m_onlyFixed( onlyFixed )
{
- QHBoxLayout *layout = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQHBoxLayout *layout = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
- m_sampleLabel = new QLabel( this, "m_sampleLabel" );
- m_button = new QPushButton( i18n( "Choose..." ), this, "m_button" );
+ m_sampleLabel = new TQLabel( this, "m_sampleLabel" );
+ m_button = new TQPushButton( i18n( "Choose..." ), this, "m_button" );
- m_sampleLabel->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ m_sampleLabel->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
setFocusProxy( m_button );
layout->addWidget( m_sampleLabel, 1 );
@@ -111,7 +111,7 @@ KFontRequester::KFontRequester( QWidget *parent, const char *name,
}
-void KFontRequester::setFont( const QFont &font, bool onlyFixed )
+void KFontRequester::setFont( const TQFont &font, bool onlyFixed )
{
m_selFont = font;
m_onlyFixed = onlyFixed;
@@ -137,124 +137,124 @@ void KFontRequester::displaySampleText()
size = m_selFont.pixelSize();
if ( m_sampleText.isEmpty() )
- m_sampleLabel->setText( QString( "%1 %2" ).arg( m_selFont.family() )
+ m_sampleLabel->setText( TQString( "%1 %2" ).arg( m_selFont.family() )
.arg( size ) );
else
m_sampleLabel->setText( m_sampleText );
}
#endif
-QalculatePreferencesDialog::QalculatePreferencesDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Preferences"), Ok | Apply | Cancel, Ok, false) {
+QalculatePreferencesDialog::QalculatePreferencesDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Preferences"), Ok | Apply | Cancel, Ok, false) {
#if KDE_VERSION_MAJOR < 4 && KDE_VERSION_MINOR < 2
- QTabWidget *tabs = new QTabWidget(this);
+ TQTabWidget *tabs = new TQTabWidget(this);
#else
- QTabWidget *tabs = new KTabWidget(this);
+ TQTabWidget *tabs = new KTabWidget(this);
#endif
setMainWidget(tabs);
- QWidget *page1 = new QWidget(this);
- QWidget *page2 = new QWidget(this);
+ TQWidget *page1 = new TQWidget(this);
+ TQWidget *page2 = new TQWidget(this);
tabs->addTab(page1, i18n("General"));
tabs->addTab(page2, i18n("Fonts"));
- QVBoxLayout *vbox = new QVBoxLayout(page1, spacingHint());
- systrayButton = new QCheckBox(i18n("Close to system tray"), page1);
- QToolTip::add(systrayButton, i18n("If the application will reside in the system tray when the window is closed"));
+ TQVBoxLayout *vbox = new TQVBoxLayout(page1, spacingHint());
+ systrayButton = new TQCheckBox(i18n("Close to system tray"), page1);
+ TQToolTip::add(systrayButton, i18n("If the application will reside in the system tray when the window is closed"));
vbox->addWidget(systrayButton);
- statusButton = new QCheckBox(i18n("Display expression status"), page1);
- QToolTip::add(statusButton, i18n("If as-you-type expression status shall be displayed below the expression entry"));
+ statusButton = new TQCheckBox(i18n("Display expression status"), page1);
+ TQToolTip::add(statusButton, i18n("If as-you-type expression status shall be displayed below the expression entry"));
vbox->addWidget(statusButton);
- iconsButton = new QCheckBox(i18n("Use icon buttons"), page1);
- QToolTip::add(iconsButton, i18n("Use icons instead of text on the top-right buttons. The third state uses the style setting for icons on buttons."));
+ iconsButton = new TQCheckBox(i18n("Use icon buttons"), page1);
+ TQToolTip::add(iconsButton, i18n("Use icons instead of text on the top-right buttons. The third state uses the style setting for icons on buttons."));
iconsButton->setTristate(true);
vbox->addWidget(iconsButton);
- fetchExchangeRatesButton = new QCheckBox(i18n("Update exchange rates on start"), page1);
- QToolTip::add(fetchExchangeRatesButton, i18n("If current exchange rates shall be downloaded from the internet at program start"));
+ fetchExchangeRatesButton = new TQCheckBox(i18n("Update exchange rates on start"), page1);
+ TQToolTip::add(fetchExchangeRatesButton, i18n("If current exchange rates shall be downloaded from the internet at program start"));
vbox->addWidget(fetchExchangeRatesButton);
- saveModeButton = new QCheckBox(i18n("Save mode on exit"), page1);
- QToolTip::add(saveModeButton, i18n("If the mode of the calculator shall be restored"));
+ saveModeButton = new TQCheckBox(i18n("Save mode on exit"), page1);
+ TQToolTip::add(saveModeButton, i18n("If the mode of the calculator shall be restored"));
vbox->addWidget(saveModeButton);
- saveDefsButton = new QCheckBox(i18n("Save definitions on exit"), page1);
- QToolTip::add(saveDefsButton, i18n("If changes to functions, units and variables shall be saved automatically"));
+ saveDefsButton = new TQCheckBox(i18n("Save definitions on exit"), page1);
+ TQToolTip::add(saveDefsButton, i18n("If changes to functions, units and variables shall be saved automatically"));
vbox->addWidget(saveDefsButton);
- rpnKeypadOnlyButton = new QCheckBox(i18n("Use only keypad keys for RPN"), page1);
- QToolTip::add(rpnKeypadOnlyButton, i18n("Use only keypad keys for RPN operations (+-*/^) and use the rest of the keyboard for expression entry"));
+ rpnKeypadOnlyButton = new TQCheckBox(i18n("Use only keypad keys for RPN"), page1);
+ TQToolTip::add(rpnKeypadOnlyButton, i18n("Use only keypad keys for RPN operations (+-*/^) and use the rest of the keyboard for expression entry"));
vbox->addWidget(rpnKeypadOnlyButton);
- dotAsSeparatorButton = new QCheckBox(i18n("Ignores dots in numbers"), page1);
- QToolTip::add(dotAsSeparatorButton, i18n("Allow dots, '.', to be used as thousands separator instead of as an alternative to decimal sign"));
+ dotAsSeparatorButton = new TQCheckBox(i18n("Ignores dots in numbers"), page1);
+ TQToolTip::add(dotAsSeparatorButton, i18n("Allow dots, '.', to be used as thousands separator instead of as an alternative to decimal sign"));
if(CALCULATOR->getDecimalPoint() == ".") dotAsSeparatorButton->hide();
vbox->addWidget(dotAsSeparatorButton);
- unicodeButton = new QCheckBox(i18n("Enable unicode signs"), page1);
- QToolTip::add(unicodeButton, i18n("Disable this if you have problems with some fancy characters"));
+ unicodeButton = new TQCheckBox(i18n("Enable unicode signs"), page1);
+ TQToolTip::add(unicodeButton, i18n("Disable this if you have problems with some fancy characters"));
vbox->addWidget(unicodeButton);
- lowerCaseButton = new QCheckBox(i18n("Use lower case in numbers"), page1);
- QToolTip::add(lowerCaseButton, i18n("If lower case letters should be used in numbers with non-decimal base"));
+ lowerCaseButton = new TQCheckBox(i18n("Use lower case in numbers"), page1);
+ TQToolTip::add(lowerCaseButton, i18n("If lower case letters should be used in numbers with non-decimal base"));
vbox->addWidget(lowerCaseButton);
- lowerCaseEButton = new QCheckBox(i18n("Use lower case \"e\""), page1);
- QToolTip::add(lowerCaseEButton, i18n("If \"e\"; shall be used instead of \"E\" in numbers"));
+ lowerCaseEButton = new TQCheckBox(i18n("Use lower case \"e\""), page1);
+ TQToolTip::add(lowerCaseEButton, i18n("If \"e\"; shall be used instead of \"E\" in numbers"));
vbox->addWidget(lowerCaseEButton);
- alternativeBasePrefixButton = new QCheckBox(i18n("Alternative base prefixes"), page1);
- QToolTip::add(alternativeBasePrefixButton, i18n("If hexadecimal numbers shall be displayed with \"0x0\" and binary numbers with \"0b00\" as prefixes"));
+ alternativeBasePrefixButton = new TQCheckBox(i18n("Alternative base prefixes"), page1);
+ TQToolTip::add(alternativeBasePrefixButton, i18n("If hexadecimal numbers shall be displayed with \"0x0\" and binary numbers with \"0b00\" as prefixes"));
vbox->addWidget(alternativeBasePrefixButton);
- spellOutLogicalOperatorsButton = new QCheckBox(i18n("Spell out logical operators"), page1);
- QToolTip::add(spellOutLogicalOperatorsButton, i18n("If logical and/or shall be displayed as \"&&\"/\"||\" or \"and\"/\"or\""));
+ spellOutLogicalOperatorsButton = new TQCheckBox(i18n("Spell out logical operators"), page1);
+ TQToolTip::add(spellOutLogicalOperatorsButton, i18n("If logical and/or shall be displayed as \"&&\"/\"||\" or \"and\"/\"or\""));
vbox->addWidget(spellOutLogicalOperatorsButton);
- QGridLayout *grid = new QGridLayout(vbox);
- multiplicationLabel = new QLabel(i18n("Multiplication sign:"), page1);
+ TQGridLayout *grid = new TQGridLayout(vbox);
+ multiplicationLabel = new TQLabel(i18n("Multiplication sign:"), page1);
grid->addWidget(multiplicationLabel, 0, 0);
- QButtonGroup *group = new QButtonGroup();
- dotButton = new QRadioButton(SIGN_MULTIDOT, page1);
+ TQButtonGroup *group = new TQButtonGroup();
+ dotButton = new TQRadioButton(SIGN_MULTIDOT, page1);
group->insert(dotButton, 0);
grid->addWidget(dotButton, 0, 1);
- exButton = new QRadioButton(SIGN_MULTIPLICATION, page1);
+ exButton = new TQRadioButton(SIGN_MULTIPLICATION, page1);
group->insert(exButton, 1);
grid->addWidget(exButton, 0, 2);
- asteriskButton = new QRadioButton("*", page1);
+ asteriskButton = new TQRadioButton("*", page1);
group->insert(asteriskButton, 2);
grid->addWidget(asteriskButton, 0, 3);
- divisionLabel = new QLabel(i18n("Division sign:"), page1);
+ divisionLabel = new TQLabel(i18n("Division sign:"), page1);
grid->addWidget(divisionLabel, 1, 0);
- group = new QButtonGroup();
- divisionSlashButton = new QRadioButton(" " SIGN_DIVISION_SLASH " ", page1);
+ group = new TQButtonGroup();
+ divisionSlashButton = new TQRadioButton(" " SIGN_DIVISION_SLASH " ", page1);
group->insert(divisionSlashButton, 0);
grid->addWidget(divisionSlashButton, 1, 1);
- divisionButton = new QRadioButton(SIGN_DIVISION, page1);
+ divisionButton = new TQRadioButton(SIGN_DIVISION, page1);
group->insert(divisionButton, 1);
grid->addWidget(divisionButton, 1, 2);
- slashButton = new QRadioButton("/", page1);
+ slashButton = new TQRadioButton("/", page1);
group->insert(slashButton, 2);
grid->addWidget(slashButton, 1, 3);
- vbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
+ vbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
- vbox = new QVBoxLayout(page2, spacingHint());
- useCustomResultFontButton = new QCheckBox(i18n("Custom result font"), page2);
+ vbox = new TQVBoxLayout(page2, spacingHint());
+ useCustomResultFontButton = new TQCheckBox(i18n("Custom result font"), page2);
vbox->addWidget(useCustomResultFontButton);
resultFontEdit = new KFontRequester(page2);
vbox->addWidget(resultFontEdit);
- useCustomExpressionFontButton = new QCheckBox(i18n("Custom expression font"), page2);
+ useCustomExpressionFontButton = new TQCheckBox(i18n("Custom expression font"), page2);
vbox->addWidget(useCustomExpressionFontButton);
expressionFontEdit = new KFontRequester(page2);
vbox->addWidget(expressionFontEdit);
- useCustomStatusFontButton = new QCheckBox(i18n("Custom status font"), page2);
+ useCustomStatusFontButton = new TQCheckBox(i18n("Custom status font"), page2);
vbox->addWidget(useCustomStatusFontButton);
statusFontEdit = new KFontRequester(page2);
vbox->addWidget(statusFontEdit);
- grid = new QGridLayout(vbox);
- grid->addWidget(new QLabel(i18n("Status error color:"), page2), 0, 0);
+ grid = new TQGridLayout(vbox);
+ grid->addWidget(new TQLabel(i18n("Status error color:"), page2), 0, 0);
#if KDE_VERSION_MAJOR == 3 && KDE_VERSION_MINOR < 1
statusErrorColorButton = new KColorButton(page2);
#else
statusErrorColorButton = new KColorButton("red", "red", page2);
#endif
grid->addWidget(statusErrorColorButton, 0, 1);
- grid->addWidget(new QLabel(i18n("Status warning color:"), page2), 1, 0);
+ grid->addWidget(new TQLabel(i18n("Status warning color:"), page2), 1, 0);
#if KDE_VERSION_MAJOR == 3 && KDE_VERSION_MINOR < 1
statusWarningColorButton = new KColorButton(page2);
#else
statusWarningColorButton = new KColorButton("blue", "blue", page2);
#endif
grid->addWidget(statusWarningColorButton, 1, 1);
- vbox->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
+ vbox->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
connect(useCustomResultFontButton, SIGNAL(toggled(bool)), resultFontEdit, SLOT(setEnabled(bool)));
@@ -279,15 +279,15 @@ void QalculatePreferencesDialog::slotApply() {
close_to_systray = systrayButton->isChecked();
display_expression_status = statusButton->isChecked();
switch(iconsButton->state()) {
- case QButton::Off: {
+ case TQButton::Off: {
use_icon_buttons = 0;
break;
}
- case QButton::On: {
+ case TQButton::On: {
use_icon_buttons = 1;
break;
}
- case QButton::NoChange: {
+ case TQButton::NoChange: {
use_icon_buttons = -1;
break;
}
@@ -349,15 +349,15 @@ bool QalculatePreferencesDialog::editPreferences() {
useCustomResultFontButton->setChecked(use_custom_result_font);
useCustomExpressionFontButton->setChecked(use_custom_expression_font);
useCustomStatusFontButton->setChecked(use_custom_status_font);
- QFont font1(resultWidget->font());
+ TQFont font1(resultWidget->font());
font1.fromString(custom_result_font);
resultFontEdit->setFont(font1);
resultFontEdit->setEnabled(use_custom_result_font);
- QFont font2(expressionWidget->font());
+ TQFont font2(expressionWidget->font());
font2.fromString(custom_expression_font);
expressionFontEdit->setFont(font2);
expressionFontEdit->setEnabled(use_custom_expression_font);
- QFont font3(statusWidget_l->font());
+ TQFont font3(statusWidget_l->font());
font3.fromString(custom_status_font);
statusFontEdit->setFont(font3);
statusFontEdit->setEnabled(use_custom_status_font);
diff --git a/src/qalculatepreferencesdialog.h b/src/qalculatepreferencesdialog.h
index feb42d3..aca83d5 100644
--- a/src/qalculatepreferencesdialog.h
+++ b/src/qalculatepreferencesdialog.h
@@ -22,9 +22,9 @@
#include <kdialogbase.h>
-class QCheckBox;
-class QRadioButton;
-class QLabel;
+class TQCheckBox;
+class TQRadioButton;
+class TQLabel;
class KFontRequester;
class KColorButton;
@@ -37,14 +37,14 @@ class QalculatePreferencesDialog : public KDialogBase {
public:
- QalculatePreferencesDialog(QWidget *parent = 0, const char *name = 0);
+ QalculatePreferencesDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculatePreferencesDialog();
bool editPreferences();
- QCheckBox *rpnKeypadOnlyButton, *systrayButton, *statusButton, *iconsButton, *fetchExchangeRatesButton, *saveModeButton, *saveDefsButton, *dotAsSeparatorButton, *unicodeButton, *lowerCaseButton, *lowerCaseEButton, *alternativeBasePrefixButton, *spellOutLogicalOperatorsButton, *useCustomResultFontButton, *useCustomExpressionFontButton, *useCustomStatusFontButton;
- QRadioButton *dotButton, *exButton, *asteriskButton, *divisionSlashButton, *divisionButton, *slashButton;
- QLabel *multiplicationLabel, *divisionLabel;
+ TQCheckBox *rpnKeypadOnlyButton, *systrayButton, *statusButton, *iconsButton, *fetchExchangeRatesButton, *saveModeButton, *saveDefsButton, *dotAsSeparatorButton, *unicodeButton, *lowerCaseButton, *lowerCaseEButton, *alternativeBasePrefixButton, *spellOutLogicalOperatorsButton, *useCustomResultFontButton, *useCustomExpressionFontButton, *useCustomStatusFontButton;
+ TQRadioButton *dotButton, *exButton, *asteriskButton, *divisionSlashButton, *divisionButton, *slashButton;
+ TQLabel *multiplicationLabel, *divisionLabel;
KFontRequester *resultFontEdit, *expressionFontEdit, *statusFontEdit;
KColorButton *statusErrorColorButton, *statusWarningColorButton;
diff --git a/src/qalculateresultdisplay.cpp b/src/qalculateresultdisplay.cpp
index 2472430..39cafef 100644
--- a/src/qalculateresultdisplay.cpp
+++ b/src/qalculateresultdisplay.cpp
@@ -26,22 +26,22 @@
#include <kxmlguiclient.h>
#include <kaction.h>
#include <kmessagebox.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <kapplication.h>
-#include <qsimplerichtext.h>
+#include <tqsimplerichtext.h>
extern vector<mode_struct> modes;
-extern QString parsed_text;
+extern TQString parsed_text;
extern KQalculate *mainWin;
extern MathStructure *mstruct;
extern PrintOptions printops;
extern EvaluationOptions evalops;
-QString linkInfo(const MathStructure *m, QWidget *w, bool full_length = false) {
- QString str;
+TQString linkInfo(const MathStructure *m, TQWidget *w, bool full_length = false) {
+ TQString str;
if(m) {
if(m->isSymbolic()) {
str = "\"";
@@ -71,18 +71,18 @@ QString linkInfo(const MathStructure *m, QWidget *w, bool full_length = false) {
str += "\n";
str += i18n("Prefix");
str += ": ";
- QString pstr;
+ TQString pstr;
switch(m->prefix()->type()) {
case PREFIX_DECIMAL: {
- QTextOStream(&pstr) << m->prefix()->name(false, printops.use_unicode_signs, &can_display_unicode_string_function, (void*) w).c_str() << " (10e" << ((DecimalPrefix*) m->prefix())->exponent() << ")";
+ TQTextOStream(&pstr) << m->prefix()->name(false, printops.use_unicode_signs, &can_display_unicode_string_function, (void*) w).c_str() << " (10e" << ((DecimalPrefix*) m->prefix())->exponent() << ")";
break;
}
case PREFIX_BINARY: {
- QTextOStream(&pstr) << m->prefix()->name(false, printops.use_unicode_signs, &can_display_unicode_string_function, (void*) w).c_str() << " (2e" << ((BinaryPrefix*) m->prefix())->exponent() << ")";
+ TQTextOStream(&pstr) << m->prefix()->name(false, printops.use_unicode_signs, &can_display_unicode_string_function, (void*) w).c_str() << " (2e" << ((BinaryPrefix*) m->prefix())->exponent() << ")";
break;
}
case PREFIX_NUMBER: {
- QTextOStream(&pstr) << m->prefix()->name(false, printops.use_unicode_signs, &can_display_unicode_string_function, (void*) w).c_str();
+ TQTextOStream(&pstr) << m->prefix()->name(false, printops.use_unicode_signs, &can_display_unicode_string_function, (void*) w).c_str();
break;
}
}
@@ -119,7 +119,7 @@ QString linkInfo(const MathStructure *m, QWidget *w, bool full_length = false) {
} else {
str += i18n("argument");
str += " ";
- str += QString::number(i2);
+ str += TQString::number(i2);
}
if(i2 > f->minargs()) {
str += "]";
@@ -144,7 +144,7 @@ QString linkInfo(const MathStructure *m, QWidget *w, bool full_length = false) {
if(f->subtype() == SUBTYPE_DATA_SET) {
str += "<br>";
str += "<br>";
- QString str2;
+ TQString str2;
str2.sprintf(i18n("Retrieves data from the %s data set for a given object and property. If \"info\" is typed as property, a dialog window will pop up with all properties of the object."), f->title().c_str());
str2.replace("<", "&lt;");
str2.replace(">", "&gt;");
@@ -153,7 +153,7 @@ QString linkInfo(const MathStructure *m, QWidget *w, bool full_length = false) {
if(!f->description().empty()) {
str += "<br>";
str += "<br>";
- QString str2 = f->description().c_str();
+ TQString str2 = f->description().c_str();
str2.replace("<", "&lt;");
str2.replace(">", "&gt;");
str += str2;
@@ -165,9 +165,9 @@ QString linkInfo(const MathStructure *m, QWidget *w, bool full_length = false) {
}
-QString linkInfo(const QString &link, QWidget *w, bool full_length = false) {
+TQString linkInfo(const TQString &link, TQWidget *w, bool full_length = false) {
if(!link.isEmpty() && link[0] == '+') {
- QString str = link;
+ TQString str = link;
str.remove(0, 1);
return str;
} else {
@@ -175,68 +175,68 @@ QString linkInfo(const QString &link, QWidget *w, bool full_length = false) {
}
}
-class QalculateExpressionToolTip : public QToolTip {
+class QalculateExpressionToolTip : public TQToolTip {
public:
QalculateResultDisplay *qrd;
- QalculateExpressionToolTip(QalculateResultDisplay *parent, QToolTipGroup *group = 0) : QToolTip(parent->viewport(), group) {
+ QalculateExpressionToolTip(QalculateResultDisplay *parent, TQToolTipGroup *group = 0) : TQToolTip(parent->viewport(), group) {
qrd = parent;
}
virtual ~QalculateExpressionToolTip() {}
protected:
- void maybeTip(const QPoint &p) {
+ void maybeTip(const TQPoint &p) {
int cx = qrd->contentsX();
int cy = qrd->contentsY();
- QString str = qrd->anchorAt(qrd->viewportToContents(p), Qt::AnchorName);
+ TQString str = qrd->anchorAt(qrd->viewportToContents(p), TQt::AnchorName);
if(str.isEmpty()) return;
int w = 5;
- while(p.x() + w < qrd->visibleWidth() && qrd->anchorAt(QPoint(p.x() + cx + w, p.y() + cy), Qt::AnchorName) == str) {
+ while(p.x() + w < qrd->visibleWidth() && qrd->anchorAt(TQPoint(p.x() + cx + w, p.y() + cy), TQt::AnchorName) == str) {
w += 5;
}
int x = p.x() - 5;
w += 5;
- while(x > 0 && qrd->anchorAt(QPoint(x + cx, p.y() + cy), Qt::AnchorName) == str) {
+ while(x > 0 && qrd->anchorAt(TQPoint(x + cx, p.y() + cy), TQt::AnchorName) == str) {
x -= 5;
w += 5;
}
if(x < 0) x = 0;
if(w + x > qrd->visibleWidth()) w = qrd->visibleWidth() - x;
int h = 5;
- while(p.y() + h < qrd->visibleHeight() && qrd->anchorAt(QPoint(p.x() + cx, p.y() + cy + h), Qt::AnchorName) == str) {
+ while(p.y() + h < qrd->visibleHeight() && qrd->anchorAt(TQPoint(p.x() + cx, p.y() + cy + h), TQt::AnchorName) == str) {
h += 5;
}
int y = p.y() - 5;
h += 5;
- while(y > 0 && qrd->anchorAt(QPoint(p.x() + cx, y + cy), Qt::AnchorName) == str) {
+ while(y > 0 && qrd->anchorAt(TQPoint(p.x() + cx, y + cy), TQt::AnchorName) == str) {
y -= 5;
h += 5;
}
if(y < 0) y = 0;
if(h + y > qrd->visibleHeight()) h = qrd->visibleHeight() - y;
- tip(QRect(x, y, w, h), linkInfo(str, qrd, true));
+ tip(TQRect(x, y, w, h), linkInfo(str, qrd, true));
}
};
-QalculateResultDisplay::QalculateResultDisplay(QWidget *parent, const char *name): QTextBrowser(parent, name) {
+QalculateResultDisplay::QalculateResultDisplay(TQWidget *parent, const char *name): TQTextBrowser(parent, name) {
setResizePolicy(AutoOneFit);
setVScrollBarMode(Auto);
setHScrollBarMode(Auto);
- setTextFormat(Qt::RichText);
- setFrameStyle(QFrame::NoFrame);
- //setFocusPolicy(QWidget::TabFocus);
+ setTextFormat(TQt::RichText);
+ setFrameStyle(TQFrame::NoFrame);
+ //setFocusPolicy(TQWidget::TabFocus);
paletteChanged();
m_under_pointer = NULL;
- QToolTipGroup *tgroup = new QToolTipGroup(viewport());
+ TQToolTipGroup *tgroup = new TQToolTipGroup(viewport());
tooltip = new QalculateExpressionToolTip(this, tgroup);
- //connect(this, SIGNAL(anchorClicked(const QString&, const QString&)), this, SLOT(onAnchorClicked(const QString&, const QString&)));
+ //connect(this, SIGNAL(anchorClicked(const TQString&, const TQString&)), this, SLOT(onAnchorClicked(const TQString&, const TQString&)));
connect(this, SIGNAL(doubleClicked(int, int)), this, SLOT(onDoubleClicked(int, int)));
if(kapp) {
connect(kapp, SIGNAL(kdisplayPaletteChanged()), this, SLOT(paletteChanged()));
@@ -250,16 +250,16 @@ void QalculateResultDisplay::setRightMargin(int i_margin) {
setMargins(0, 0, i_margin, 0);
}
-void QalculateResultDisplay::onAnchorClicked(const QString&, const QString&) {
+void QalculateResultDisplay::onAnchorClicked(const TQString&, const TQString&) {
/*if(name.isEmpty()) return;
- QWhatsThis::display(linkInfo(name, this, true));*/
+ TQWhatsThis::display(linkInfo(name, this, true));*/
}
-QPopupMenu *QalculateResultDisplay::createPopupMenu(const QPoint &pos) {
+TQPopupMenu *QalculateResultDisplay::createPopupMenu(const TQPoint &pos) {
m_under_pointer = NULL;
- QPopupMenu *menu = QTextBrowser::createPopupMenu(pos);
+ TQPopupMenu *menu = TQTextBrowser::createPopupMenu(pos);
menu->insertSeparator();
mainWin->ActionStoreResult->plug(menu);
mainWin->ActionSaveAsImage->plug(menu);
@@ -322,8 +322,8 @@ QPopupMenu *QalculateResultDisplay::createPopupMenu(const QPoint &pos) {
mainWin->ActionEnableDenominatorPrefixes->plug(menu);
}
menu->insertSeparator();
- QPopupMenu *modes_menu = new QPopupMenu(menu);
- QObject::connect(modes_menu, SIGNAL(activated(int)), mainWin, SLOT(loadMode(int)));
+ TQPopupMenu *modes_menu = new TQPopupMenu(menu);
+ TQObject::connect(modes_menu, SIGNAL(activated(int)), mainWin, SLOT(loadMode(int)));
for(size_t i = 0; i < modes.size(); i++) {
modes_menu->insertItem(modes[i].name, i, i);
}
@@ -334,7 +334,7 @@ QPopupMenu *QalculateResultDisplay::createPopupMenu(const QPoint &pos) {
if(parsed_text.isEmpty()) return menu;
menu->insertSeparator();
menu->insertItem(i18n("Show Parsed Expression"), this, SLOT(showParsedExpression()));
- QString str = anchorAt(pos, Qt::AnchorName);
+ TQString str = anchorAt(pos, TQt::AnchorName);
if(!str.isEmpty()) {
if(str[0] == '+') {
name_under_pointer = str;
@@ -379,16 +379,16 @@ void QalculateResultDisplay::displayScientific() {
}
void QalculateResultDisplay::showParsedExpression() {
- QString str = i18n("Parsed expression:");
+ TQString str = i18n("Parsed expression:");
str += "\n";
str += parsed_text;
- QWhatsThis::display(str, curpos);
+ TQWhatsThis::display(str, curpos);
}
void QalculateResultDisplay::showInfo() {
if(m_under_pointer) {
- QWhatsThis::display(linkInfo(m_under_pointer, this, true), curpos);
+ TQWhatsThis::display(linkInfo(m_under_pointer, this, true), curpos);
} else {
- QWhatsThis::display(linkInfo(name_under_pointer, this, true), curpos);
+ TQWhatsThis::display(linkInfo(name_under_pointer, this, true), curpos);
}
}
void QalculateResultDisplay::editVector() {
@@ -399,30 +399,30 @@ void QalculateResultDisplay::editMatrix() {
}
void QalculateResultDisplay::paletteChanged() {
- QPalette p = kapp ? kapp->palette() : palette();
- p.setBrush(QColorGroup::Base, p.brush(QPalette::Normal, QColorGroup::Background));
- p.setColor(QColorGroup::Text, p.color(QPalette::Normal, QColorGroup::Foreground));
+ TQPalette p = kapp ? kapp->palette() : palette();
+ p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background));
+ p.setColor(TQColorGroup::Text, p.color(TQPalette::Normal, TQColorGroup::Foreground));
setPalette(p);
}
void QalculateResultDisplay::virtual_hook(int, void*) {
}
-void QalculateResultDisplay::focusInEvent(QFocusEvent* fe) {
- QTextBrowser::focusInEvent(fe);
- if(fe->reason() == QFocusEvent::Tab || fe->reason() == QFocusEvent::Backtab)
+void QalculateResultDisplay::focusInEvent(TQFocusEvent* fe) {
+ TQTextBrowser::focusInEvent(fe);
+ if(fe->reason() == TQFocusEvent::Tab || fe->reason() == TQFocusEvent::Backtab)
selectAll(true);
}
-void QalculateResultDisplay::focusOutEvent(QFocusEvent* fe) {
- QTextBrowser::focusOutEvent(fe);
- if(fe->reason() == QFocusEvent::Tab || fe->reason() == QFocusEvent::Backtab)
+void QalculateResultDisplay::focusOutEvent(TQFocusEvent* fe) {
+ TQTextBrowser::focusOutEvent(fe);
+ if(fe->reason() == TQFocusEvent::Tab || fe->reason() == TQFocusEvent::Backtab)
selectAll(false);
}
void QalculateResultDisplay::onDoubleClicked(int, int) {
- curpos = QCursor::pos();
- QString str = anchorAt(viewportToContents(viewport()->mapFromGlobal(curpos)), Qt::AnchorName);
+ curpos = TQCursor::pos();
+ TQString str = anchorAt(viewportToContents(viewport()->mapFromGlobal(curpos)), TQt::AnchorName);
if(!str.isEmpty()) {
if(str[0] == '+') {
selectAll(false);
@@ -447,26 +447,26 @@ void QalculateResultDisplay::onDoubleClicked(int, int) {
}
}
-void QalculateResultDisplay::keyPressEvent(QKeyEvent *e) {
+void QalculateResultDisplay::keyPressEvent(TQKeyEvent *e) {
switch (e->key()) {
case Key_Down:
case Key_Up:
case Key_Left:
case Key_Right:
- // jump over QTextEdit's key navigation breakage.
+ // jump over TQTextEdit's key navigation breakage.
// we're not interested in keyboard navigation within the text
- QWidget::keyPressEvent(e);
+ TQWidget::keyPressEvent(e);
break;
default:
- QTextBrowser::keyPressEvent(e);
+ TQTextBrowser::keyPressEvent(e);
}
}
-QSize QalculateResultDisplay::minimumSizeHint() const {
+TQSize QalculateResultDisplay::minimumSizeHint() const {
- QSize ms = minimumSize();
+ TQSize ms = minimumSize();
if((ms.width() > 0) && (ms.height() > 0))
return ms;
@@ -474,9 +474,9 @@ QSize QalculateResultDisplay::minimumSizeHint() const {
if(ms.width() > 0)
w = ms.width();
- QSimpleRichText rt("<font size=6>X</font>", font());
+ TQSimpleRichText rt("<font size=6>X</font>", font());
rt.setWidth(100);
- QSimpleRichText rt2("<font size=2>X</font>", font());
+ TQSimpleRichText rt2("<font size=2>X</font>", font());
rt2.setWidth(100);
int h2 = (int) (rt2.height() / 1.5);
h2 += h2 % 2;
@@ -484,10 +484,10 @@ QSize QalculateResultDisplay::minimumSizeHint() const {
if(h < ms.height())
h = ms.height();
- return QSize(w, h);
+ return TQSize(w, h);
}
-QSize QalculateResultDisplay::sizeHint() const {
+TQSize QalculateResultDisplay::sizeHint() const {
return minimumSizeHint();
}
diff --git a/src/qalculateresultdisplay.h b/src/qalculateresultdisplay.h
index c5c2af1..4117275 100644
--- a/src/qalculateresultdisplay.h
+++ b/src/qalculateresultdisplay.h
@@ -20,45 +20,45 @@
#ifndef QALCULATERESULTDISPLAY_H
#define QALCULATERESULTDISPLAY_H
-#include <qtextbrowser.h>
+#include <tqtextbrowser.h>
-class QPopupMenu;
-class QToolTip;
+class TQPopupMenu;
+class TQToolTip;
class MathStructure;
/**
@author Niklas Knutsson
*/
-class QalculateResultDisplay : public QTextBrowser {
+class QalculateResultDisplay : public TQTextBrowser {
Q_OBJECT
public:
- QalculateResultDisplay(QWidget *parent = 0, const char *name = 0);
+ QalculateResultDisplay(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateResultDisplay();
- QPopupMenu *createPopupMenu(const QPoint & pos);
+ TQPopupMenu *createPopupMenu(const TQPoint & pos);
- QToolTip *tooltip;
+ TQToolTip *tooltip;
const MathStructure *m_under_pointer;
- QString name_under_pointer;
- QPoint curpos;
+ TQString name_under_pointer;
+ TQPoint curpos;
- QSize minimumSizeHint() const;
- QSize sizeHint() const;
+ TQSize minimumSizeHint() const;
+ TQSize sizeHint() const;
void setRightMargin(int);
public slots:
- void onAnchorClicked(const QString&, const QString&);
+ void onAnchorClicked(const TQString&, const TQString&);
void showParsedExpression();
private slots:
void paletteChanged();
- void setSource(const QString &) {}
+ void setSource(const TQString &) {}
void showInfo();
void editVector();
void editMatrix();
@@ -70,9 +70,9 @@ private slots:
protected:
void virtual_hook(int id, void* data);
- void focusInEvent(QFocusEvent *fe);
- void focusOutEvent(QFocusEvent *fe);
- void keyPressEvent(QKeyEvent *e);
+ void focusInEvent(TQFocusEvent *fe);
+ void focusOutEvent(TQFocusEvent *fe);
+ void keyPressEvent(TQKeyEvent *e);
};
diff --git a/src/qalculatesetbasedialog.cpp b/src/qalculatesetbasedialog.cpp
index b95b205..4f29d7d 100644
--- a/src/qalculatesetbasedialog.cpp
+++ b/src/qalculatesetbasedialog.cpp
@@ -19,40 +19,40 @@
***************************************************************************/
#include "qalculatesetbasedialog.h"
-#include <qradiobutton.h>
-#include <qvbuttongroup.h>
-#include <qspinbox.h>
+#include <tqradiobutton.h>
+#include <tqvbuttongroup.h>
+#include <tqspinbox.h>
#include <klocale.h>
-#include <qvbox.h>
+#include <tqvbox.h>
-QalculateSetBaseDialog::QalculateSetBaseDialog(QWidget *parent, const char *name)
+QalculateSetBaseDialog::QalculateSetBaseDialog(TQWidget *parent, const char *name)
: KDialogBase(parent, name, false, i18n("Number Bases"), Close, Close) {
- QHBox *box = makeHBoxMainWidget();
+ TQHBox *box = makeHBoxMainWidget();
- radiogroup_output = new QVButtonGroup(i18n("Result Base"), box);
+ radiogroup_output = new TQVButtonGroup(i18n("Result Base"), box);
radiogroup_output->setRadioButtonExclusive(true);
- new QRadioButton(i18n("Binary"), radiogroup_output);
- new QRadioButton(i18n("Octal"), radiogroup_output);
- new QRadioButton(i18n("Decimal"), radiogroup_output);
- new QRadioButton(i18n("Hexadecimal"), radiogroup_output);
- new QRadioButton(i18n("Other:"), radiogroup_output);
- outputBaseBox = new QSpinBox(2, 36, 1, radiogroup_output);
+ new TQRadioButton(i18n("Binary"), radiogroup_output);
+ new TQRadioButton(i18n("Octal"), radiogroup_output);
+ new TQRadioButton(i18n("Decimal"), radiogroup_output);
+ new TQRadioButton(i18n("Hexadecimal"), radiogroup_output);
+ new TQRadioButton(i18n("Other:"), radiogroup_output);
+ outputBaseBox = new TQSpinBox(2, 36, 1, radiogroup_output);
outputBaseBox->setValue(10);
- new QRadioButton(i18n("Sexagesimal"), radiogroup_output);
- new QRadioButton(i18n("Time format"), radiogroup_output);
- new QRadioButton(i18n("Roman numerals"), radiogroup_output);
+ new TQRadioButton(i18n("Sexagesimal"), radiogroup_output);
+ new TQRadioButton(i18n("Time format"), radiogroup_output);
+ new TQRadioButton(i18n("Roman numerals"), radiogroup_output);
- radiogroup_input = new QVButtonGroup(i18n("Expression Base"), box);
+ radiogroup_input = new TQVButtonGroup(i18n("Expression Base"), box);
radiogroup_input->setRadioButtonExclusive(true);
- new QRadioButton(i18n("Binary"), radiogroup_input);
- new QRadioButton(i18n("Octal"), radiogroup_input);
- new QRadioButton(i18n("Decimal"), radiogroup_input);
- new QRadioButton(i18n("Hexadecimal"), radiogroup_input);
- new QRadioButton(i18n("Other:"), radiogroup_input);
- inputBaseBox = new QSpinBox(2, 36, 1, radiogroup_input);
+ new TQRadioButton(i18n("Binary"), radiogroup_input);
+ new TQRadioButton(i18n("Octal"), radiogroup_input);
+ new TQRadioButton(i18n("Decimal"), radiogroup_input);
+ new TQRadioButton(i18n("Hexadecimal"), radiogroup_input);
+ new TQRadioButton(i18n("Other:"), radiogroup_input);
+ inputBaseBox = new TQSpinBox(2, 36, 1, radiogroup_input);
inputBaseBox->setValue(10);
- new QRadioButton(i18n("Roman numerals"), radiogroup_input);
+ new TQRadioButton(i18n("Roman numerals"), radiogroup_input);
}
diff --git a/src/qalculatesetbasedialog.h b/src/qalculatesetbasedialog.h
index 21955ba..42f7e1f 100644
--- a/src/qalculatesetbasedialog.h
+++ b/src/qalculatesetbasedialog.h
@@ -22,8 +22,8 @@
#include <kdialogbase.h>
-class QVButtonGroup;
-class QSpinBox;
+class TQVButtonGroup;
+class TQSpinBox;
/**
@author Niklas Knutsson
@@ -34,11 +34,11 @@ class QalculateSetBaseDialog : public KDialogBase {
public:
- QalculateSetBaseDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateSetBaseDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateSetBaseDialog();
- QVButtonGroup *radiogroup_input, *radiogroup_output;
- QSpinBox *inputBaseBox, *outputBaseBox;
+ TQVButtonGroup *radiogroup_input, *radiogroup_output;
+ TQSpinBox *inputBaseBox, *outputBaseBox;
};
diff --git a/src/qalculateunitsdialog.cpp b/src/qalculateunitsdialog.cpp
index e94982a..399e5d4 100644
--- a/src/qalculateunitsdialog.cpp
+++ b/src/qalculateunitsdialog.cpp
@@ -21,16 +21,16 @@
#include "qalculate_tde_utils.h"
#include "qalculateeditunitdialog.h"
#include <kpushbutton.h>
-#include <qsplitter.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <tqsplitter.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
#include <klistview.h>
#include <kmessagebox.h>
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kcombobox.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
#include <klineedit.h>
#include <kiconloader.h>
#include <kapplication.h>
@@ -41,7 +41,7 @@ extern vector<void*> ia_units;
extern PrintOptions printops;
extern EvaluationOptions evalops;
-QalculateUnitsDialog::QalculateUnitsDialog(QWidget *parent, const char *name) : KDialog(parent, name, false) {
+QalculateUnitsDialog::QalculateUnitsDialog(TQWidget *parent, const char *name) : KDialog(parent, name, false) {
unit_edit_dialog = NULL;
selected_category = "";
@@ -49,14 +49,14 @@ QalculateUnitsDialog::QalculateUnitsDialog(QWidget *parent, const char *name) :
selected_to_unit = NULL;
block_unit_convert = true;
- QHBoxLayout *layout = new QHBoxLayout(this, marginHint(), spacingHint());
+ TQHBoxLayout *layout = new TQHBoxLayout(this, marginHint(), spacingHint());
setCaption(i18n("Units"));
- QVBoxLayout *leftLayout = new QVBoxLayout(layout, spacingHint());
+ TQVBoxLayout *leftLayout = new TQVBoxLayout(layout, spacingHint());
- QSplitter *splitter = new QSplitter(Qt::Horizontal, this);
- splitter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQSplitter *splitter = new TQSplitter(TQt::Horizontal, this);
+ splitter->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
leftLayout->addWidget(splitter);
categoryView = new KListView(splitter);
@@ -69,43 +69,43 @@ QalculateUnitsDialog::QalculateUnitsDialog(QWidget *parent, const char *name) :
unitView->addColumn(i18n("Base"));
unitView->setRootIsDecorated(false);
- convertGroup = new QGroupBox(3, Qt::Horizontal, i18n("Conversion"), this);
- convertGroup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
+ convertGroup = new TQGroupBox(3, TQt::Horizontal, i18n("Conversion"), this);
+ convertGroup->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum);
convertGroup->setInsideSpacing(spacingHint());
convertGroup->setInsideMargin(spacingHint());
- convertButton = new KPushButton(QIconSet(SmallIcon("reload")), "", convertGroup);
+ convertButton = new KPushButton(TQIconSet(SmallIcon("reload")), "", convertGroup);
fromEdit = new KLineEdit("1", convertGroup);
- fromEdit->setAlignment(Qt::AlignRight);
+ fromEdit->setAlignment(TQt::AlignRight);
fromEdit->setMinimumWidth(100);
- fromLabel = new QLabel(convertGroup);
- equalsLabel = new QLabel("=", convertGroup);
- equalsLabel->setAlignment(Qt::AlignRight);
+ fromLabel = new TQLabel(convertGroup);
+ equalsLabel = new TQLabel("=", convertGroup);
+ equalsLabel->setAlignment(TQt::AlignRight);
toEdit = new KLineEdit("1", convertGroup);
- toEdit->setAlignment(Qt::AlignRight);
+ toEdit->setAlignment(TQt::AlignRight);
toEdit->setMinimumWidth(100);
toCombo = new KComboBox(convertGroup);
leftLayout->addWidget(convertGroup);
- QVBoxLayout *buttonLayout = new QVBoxLayout(layout, spacingHint());
+ TQVBoxLayout *buttonLayout = new TQVBoxLayout(layout, spacingHint());
- newButton = new QPushButton(i18n("New"), this);
+ newButton = new TQPushButton(i18n("New"), this);
buttonLayout->addWidget(newButton);
- editButton = new QPushButton(i18n("Edit"), this);
+ editButton = new TQPushButton(i18n("Edit"), this);
editButton->setEnabled(false);
buttonLayout->addWidget(editButton);
- deleteButton = new QPushButton(i18n("Delete"), this);
+ deleteButton = new TQPushButton(i18n("Delete"), this);
deleteButton->setEnabled(false);
buttonLayout->addWidget(deleteButton);
- deactivateButton = new QPushButton(i18n("Deactivate"), this);
+ deactivateButton = new TQPushButton(i18n("Deactivate"), this);
deactivateButton->setEnabled(false);
buttonLayout->addWidget(deactivateButton);
- insertButton = new QPushButton(i18n("Insert"), this);
+ insertButton = new TQPushButton(i18n("Insert"), this);
insertButton->setEnabled(false);
buttonLayout->addWidget(insertButton);
- convertResultButton = new QPushButton(i18n("Convert Result"), this);
+ convertResultButton = new TQPushButton(i18n("Convert Result"), this);
convertResultButton->setEnabled(false);
buttonLayout->addWidget(convertResultButton);
- buttonLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
+ buttonLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
helpButton = new KPushButton(KStdGuiItem::help(), this);
buttonLayout->addWidget(helpButton);
buttonClose = new KPushButton(KStdGuiItem::close(), this);
@@ -113,7 +113,7 @@ QalculateUnitsDialog::QalculateUnitsDialog(QWidget *parent, const char *name) :
fromEdit->setFocus();
- resize(QSize(675, 425).expandedTo(size()));
+ resize(TQSize(675, 425).expandedTo(size()));
connect(buttonClose, SIGNAL(clicked()), this, SLOT(close()));
connect(newButton, SIGNAL(clicked()), this, SLOT(newUnit()));
@@ -123,7 +123,7 @@ QalculateUnitsDialog::QalculateUnitsDialog(QWidget *parent, const char *name) :
connect(insertButton, SIGNAL(clicked()), this, SLOT(insertUnit()));
connect(convertResultButton, SIGNAL(clicked()), this, SLOT(convertResult()));
connect(unitView, SIGNAL(selectionChanged()), this, SLOT(unitSelected()));
- connect(unitView, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(unitDoubleClicked(QListViewItem*)));
+ connect(unitView, SIGNAL(doubleClicked(TQListViewItem*)), this, SLOT(unitDoubleClicked(TQListViewItem*)));
connect(categoryView, SIGNAL(selectionChanged()), this, SLOT(categorySelected()));
connect(toCombo, SIGNAL(activated(int)), this, SLOT(toUnitSelected(int)));
connect(convertButton, SIGNAL(clicked()), this, SLOT(convertClicked()));
@@ -147,10 +147,10 @@ void QalculateUnitsDialog::updateUnitTree() {
comboItems.clear();
categoryItems.clear();
categoryView->clear();
- QListViewItem *i = new KListViewItem(categoryView, i18n("All")), *i2;
+ TQListViewItem *i = new KListViewItem(categoryView, i18n("All")), *i2;
categoryItems[i] = i18n("All");
i->setOpen(true);
- QString str;
+ TQString str;
tree_struct *item, *item2;
unit_cats.it = unit_cats.items.begin();
if(unit_cats.it != unit_cats.items.end()) {
@@ -213,13 +213,13 @@ void QalculateUnitsDialog::updateUnitTree() {
if(!categoryView->selectedItem()) {
//if no category has been selected (previously selected has been renamed/deleted), select "All"
selected_category = i18n("All");
- QListViewItemIterator it(categoryView);
+ TQListViewItemIterator it(categoryView);
if(it.current())
categoryView->setSelected(it.current(), true);
}
}
-#define UPDATE_SELECTED_UNIT QListViewItem *i = unitView->selectedItem(); if(!i) return; selected_unit = unitItems[i]; if(!selected_unit) return;
+#define UPDATE_SELECTED_UNIT TQListViewItem *i = unitView->selectedItem(); if(!i) return; selected_unit = unitItems[i]; if(!selected_unit) return;
#define CHECK_IF_UNIT_STILL_THERE if(!CALCULATOR->stillHasUnit(selected_unit)) {KMessageBox::error(this, i18n("Unit does not exist anymore.")); emit unitsChanged(); return;}
void QalculateUnitsDialog::insertUnit() {
@@ -264,7 +264,7 @@ void QalculateUnitsDialog::editUnit() {
if(!unit_edit_dialog) {
unit_edit_dialog = new QalculateEditUnitDialog(this);
}
- Unit *u = unit_edit_dialog->editUnit(QString::null, selected_unit);
+ Unit *u = unit_edit_dialog->editUnit(TQString::null, selected_unit);
if(u) {
selected_unit = u;
if(!u->isActive()) {
@@ -287,7 +287,7 @@ void QalculateUnitsDialog::newUnit() {
if(selected_category.isEmpty() || selected_category[0] != '/') {
u = unit_edit_dialog->editUnit();
} else {
- QString str = selected_category;
+ TQString str = selected_category;
str.remove(0, 1);
u = unit_edit_dialog->editUnit(str);
}
@@ -305,7 +305,7 @@ void QalculateUnitsDialog::newUnit() {
}
}
-void QalculateUnitsDialog::unitDoubleClicked(QListViewItem*i) {
+void QalculateUnitsDialog::unitDoubleClicked(TQListViewItem*i) {
selected_unit = unitItems[i];
if(!selected_unit)
return;
@@ -313,7 +313,7 @@ void QalculateUnitsDialog::unitDoubleClicked(QListViewItem*i) {
if(!unit_edit_dialog) {
unit_edit_dialog = new QalculateEditUnitDialog(this);
}
- Unit *u = unit_edit_dialog->editUnit(QString::null, selected_unit);
+ Unit *u = unit_edit_dialog->editUnit(TQString::null, selected_unit);
if(u) {
selected_unit = u;
if(!u->isActive()) {
@@ -330,7 +330,7 @@ void QalculateUnitsDialog::unitDoubleClicked(QListViewItem*i) {
void QalculateUnitsDialog::unitSelected() {
- QListViewItem *selected = unitView->selectedItem();
+ TQListViewItem *selected = unitView->selectedItem();
if(selected) {
Unit *u = unitItems[selected];
if(!CALCULATOR->stillHasUnit(u)) {
@@ -365,7 +365,7 @@ void QalculateUnitsDialog::unitSelected() {
}
void QalculateUnitsDialog::addUnitTreeItem(Unit *u) {
- QString snames, sbase;
+ TQString snames, sbase;
//display name, plural name and short name in the second column
AliasUnit *au;
for(size_t i = 1; i <= u->countNames(); i++) {
@@ -384,7 +384,7 @@ void QalculateUnitsDialog::addUnitTreeItem(Unit *u) {
sbase = au->firstBaseUnit()->preferredDisplayName(printops.abbreviate_names, printops.use_unicode_signs, false, false, &can_display_unicode_string_function, (void*) unitView).name.c_str();
if(au->firstBaseExponent() != 1) {
sbase += POWER;
- sbase += QString::number(au->firstBaseExponent());
+ sbase += TQString::number(au->firstBaseExponent());
}
break;
}
@@ -393,7 +393,7 @@ void QalculateUnitsDialog::addUnitTreeItem(Unit *u) {
break;
}
}
- QListViewItem *i = new KListViewItem(unitView, u->title(true).c_str(), snames, sbase);
+ TQListViewItem *i = new KListViewItem(unitView, u->title(true).c_str(), snames, sbase);
unitItems[i] = u;
if(u == selected_unit) {
unitView->setSelected(i, true);
@@ -403,7 +403,7 @@ void QalculateUnitsDialog::addUnitTreeItem(Unit *u) {
void QalculateUnitsDialog::categorySelected() {
block_unit_convert = true;
- QListViewItem *selected = categoryView->selectedItem();
+ TQListViewItem *selected = categoryView->selectedItem();
bool no_cat = false, b_all = false, b_inactive = false;
unitView->clear();
unitItems.clear();
@@ -437,7 +437,7 @@ void QalculateUnitsDialog::categorySelected() {
}
}
if(!selected_unit || !unitView->selectedItem()) {
- QListViewItemIterator it(unitView);
+ TQListViewItemIterator it(unitView);
if(it.current())
unitView->setSelected(it.current(), true);
}
@@ -447,7 +447,7 @@ void QalculateUnitsDialog::categorySelected() {
comboItems.clear();
int i = 0, h = -1;
//add all units in units tree to menu
- QListViewItemIterator it(unitView);
+ TQListViewItemIterator it(unitView);
Unit *u;
while(it.current()) {
u = unitItems[it.current()];
@@ -471,7 +471,7 @@ void QalculateUnitsDialog::categorySelected() {
//if no menu item was selected, select the first
if(h < 0) {
h = 0;
- QListViewItemIterator it2(unitView);
+ TQListViewItemIterator it2(unitView);
if(it2.current()) {
selected_to_unit = unitItems[it2.current()];
} else {
@@ -547,7 +547,7 @@ void QalculateUnitsDialog::convertReversed() {
}
}
-void QalculateUnitsDialog::keyPressEvent(QKeyEvent *e) {
+void QalculateUnitsDialog::keyPressEvent(TQKeyEvent *e) {
if(e->key() == Key_Return) {
convertClicked();
e->accept();
diff --git a/src/qalculateunitsdialog.h b/src/qalculateunitsdialog.h
index dfe9132..a82713e 100644
--- a/src/qalculateunitsdialog.h
+++ b/src/qalculateunitsdialog.h
@@ -21,18 +21,18 @@
#define QALCULATEUNITSDIALOG_H
#include <kdialog.h>
-#include <qmap.h>
-#include <qvaluevector.h>
+#include <tqmap.h>
+#include <tqvaluevector.h>
class Unit;
class QalculateEditUnitDialog;
class KListView;
-class QListViewItem;
-class QPushButton;
+class TQListViewItem;
+class TQPushButton;
class KLineEdit;
-class QLabel;
+class TQLabel;
class KComboBox;
-class QGroupBox;
+class TQGroupBox;
/**
@author Niklas Knutsson
@@ -43,30 +43,30 @@ class QalculateUnitsDialog : public KDialog {
public:
- QalculateUnitsDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateUnitsDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateUnitsDialog();
QalculateEditUnitDialog *unit_edit_dialog;
- QString selected_category;
+ TQString selected_category;
Unit *selected_unit, *selected_to_unit;
void addUnitTreeItem(Unit *f);
- QMap<QListViewItem*, Unit*> unitItems;
- QMap<QListViewItem*, QString> categoryItems;
- QValueVector<Unit*> comboItems;
+ TQMap<TQListViewItem*, Unit*> unitItems;
+ TQMap<TQListViewItem*, TQString> categoryItems;
+ TQValueVector<Unit*> comboItems;
- QGroupBox *convertGroup;
+ TQGroupBox *convertGroup;
KListView *categoryView;
KListView *unitView;
- QPushButton *newButton;
- QPushButton *editButton;
- QPushButton *deleteButton;
- QPushButton *deactivateButton;
- QPushButton *insertButton;
- QPushButton *helpButton;
- QPushButton *buttonClose;
- QPushButton *convertResultButton;
- QPushButton *convertButton;
- QLabel *fromLabel, *equalsLabel;
+ TQPushButton *newButton;
+ TQPushButton *editButton;
+ TQPushButton *deleteButton;
+ TQPushButton *deactivateButton;
+ TQPushButton *insertButton;
+ TQPushButton *helpButton;
+ TQPushButton *buttonClose;
+ TQPushButton *convertResultButton;
+ TQPushButton *convertButton;
+ TQLabel *fromLabel, *equalsLabel;
KLineEdit *toEdit, *fromEdit;
KComboBox *toCombo;
@@ -75,7 +75,7 @@ public:
public slots:
void updateUnitTree();
- void unitDoubleClicked(QListViewItem*);
+ void unitDoubleClicked(TQListViewItem*);
void unitSelected();
void categorySelected();
void insertUnit();
@@ -101,7 +101,7 @@ signals:
protected:
- void keyPressEvent(QKeyEvent *e);
+ void keyPressEvent(TQKeyEvent *e);
};
diff --git a/src/qalculatevariablesdialog.cpp b/src/qalculatevariablesdialog.cpp
index a765462..202cc9d 100644
--- a/src/qalculatevariablesdialog.cpp
+++ b/src/qalculatevariablesdialog.cpp
@@ -24,20 +24,20 @@
#include "qalculateeditunknownvariabledialog.h"
#include "qalculateexportcsvdialog.h"
#include <kpushbutton.h>
-#include <qsplitter.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <tqsplitter.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
#include <klistview.h>
#include <kmessagebox.h>
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kstdguiitem.h>
extern tree_struct variable_cats;
extern vector<void*> ia_variables;
-QalculateVariablesDialog::QalculateVariablesDialog(QWidget *parent, const char *name) : KDialog(parent, name, false) {
+QalculateVariablesDialog::QalculateVariablesDialog(TQWidget *parent, const char *name) : KDialog(parent, name, false) {
export_csv_dialog = NULL;
variable_edit_dialog = NULL;
@@ -46,11 +46,11 @@ QalculateVariablesDialog::QalculateVariablesDialog(QWidget *parent, const char *
selected_category = "";
selected_variable = NULL;
- QHBoxLayout *layout = new QHBoxLayout(this, marginHint(), spacingHint());
+ TQHBoxLayout *layout = new TQHBoxLayout(this, marginHint(), spacingHint());
setCaption(i18n("Variables"));
- QSplitter *splitter = new QSplitter(Qt::Horizontal, this);
+ TQSplitter *splitter = new TQSplitter(TQt::Horizontal, this);
layout->addWidget(splitter);
categoryView = new KListView(splitter);
@@ -61,33 +61,33 @@ QalculateVariablesDialog::QalculateVariablesDialog(QWidget *parent, const char *
variableView->addColumn(i18n("Value"));
variableView->setRootIsDecorated(false);
- QVBoxLayout *buttonLayout = new QVBoxLayout(layout, spacingHint());
+ TQVBoxLayout *buttonLayout = new TQVBoxLayout(layout, spacingHint());
- newButton = new QPushButton(i18n("New"), this);
+ newButton = new TQPushButton(i18n("New"), this);
buttonLayout->addWidget(newButton);
- editButton = new QPushButton(i18n("Edit"), this);
+ editButton = new TQPushButton(i18n("Edit"), this);
editButton->setEnabled(false);
buttonLayout->addWidget(editButton);
- deleteButton = new QPushButton(i18n("Delete"), this);
+ deleteButton = new TQPushButton(i18n("Delete"), this);
deleteButton->setEnabled(false);
buttonLayout->addWidget(deleteButton);
- deactivateButton = new QPushButton(i18n("Deactivate"), this);
+ deactivateButton = new TQPushButton(i18n("Deactivate"), this);
deactivateButton->setEnabled(false);
buttonLayout->addWidget(deactivateButton);
- insertButton = new QPushButton(i18n("Insert"), this);
+ insertButton = new TQPushButton(i18n("Insert"), this);
insertButton->setEnabled(false);
buttonLayout->addWidget(insertButton);
- exportButton = new QPushButton(i18n("Export"), this);
+ exportButton = new TQPushButton(i18n("Export"), this);
exportButton->setEnabled(false);
buttonLayout->addWidget(exportButton);
- buttonLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding));
+ buttonLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
helpButton = new KPushButton(KStdGuiItem::help(), this);
buttonLayout->addWidget(helpButton);
buttonClose = new KPushButton(KStdGuiItem::close(), this);
buttonClose->setFocus();
buttonLayout->addWidget(buttonClose);
- resize(QSize(675, 375).expandedTo(size()));
+ resize(TQSize(675, 375).expandedTo(size()));
connect(buttonClose, SIGNAL(clicked()), this, SLOT(close()));
connect(newButton, SIGNAL(clicked()), this, SLOT(newVariable()));
@@ -97,7 +97,7 @@ QalculateVariablesDialog::QalculateVariablesDialog(QWidget *parent, const char *
connect(insertButton, SIGNAL(clicked()), this, SLOT(insertVariable()));
connect(exportButton, SIGNAL(clicked()), this, SLOT(exportVariable()));
connect(variableView, SIGNAL(selectionChanged()), this, SLOT(variableSelected()));
- connect(variableView, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(variableDoubleClicked(QListViewItem*)));
+ connect(variableView, SIGNAL(doubleClicked(TQListViewItem*)), this, SLOT(variableDoubleClicked(TQListViewItem*)));
connect(categoryView, SIGNAL(selectionChanged()), this, SLOT(categorySelected()));
connect(helpButton, SIGNAL(clicked()), this, SLOT(slotHelp()));
@@ -113,10 +113,10 @@ void QalculateVariablesDialog::updateVariableTree() {
variableItems.clear();
categoryItems.clear();
categoryView->clear();
- QListViewItem *i = new KListViewItem(categoryView, i18n("All")), *i2;
+ TQListViewItem *i = new KListViewItem(categoryView, i18n("All")), *i2;
categoryItems[i] = i18n("All");
i->setOpen(true);
- QString str;
+ TQString str;
tree_struct *item, *item2;
variable_cats.it = variable_cats.items.begin();
if(variable_cats.it != variable_cats.items.end()) {
@@ -181,13 +181,13 @@ void QalculateVariablesDialog::updateVariableTree() {
if(!categoryView->selectedItem()) {
//if no category has been selected (previously selected has been renamed/deleted), select "All"
selected_category = i18n("All");
- QListViewItemIterator it(categoryView);
+ TQListViewItemIterator it(categoryView);
if(it.current())
categoryView->setSelected(it.current(), true);
}
}
-#define UPDATE_SELECTED_VARIABLE QListViewItem *i = variableView->selectedItem(); if(!i) return; selected_variable = variableItems[i]; if(!selected_variable) return;
+#define UPDATE_SELECTED_VARIABLE TQListViewItem *i = variableView->selectedItem(); if(!i) return; selected_variable = variableItems[i]; if(!selected_variable) return;
#define CHECK_IF_VARIABLE_STILL_THERE if(!CALCULATOR->stillHasVariable(selected_variable)) {KMessageBox::error(this, i18n("Variable does not exist anymore.")); emit variablesChanged(); return;}
void QalculateVariablesDialog::exportVariable() {
@@ -237,18 +237,18 @@ void QalculateVariablesDialog::editVariable() {
if(!matrix_edit_dialog) {
matrix_edit_dialog = new QalculateEditMatrixVectorDialog(this);
}
- v = matrix_edit_dialog->editVariable(QString::null, (KnownVariable*) selected_variable);
+ v = matrix_edit_dialog->editVariable(TQString::null, (KnownVariable*) selected_variable);
} else {
if(!variable_edit_dialog) {
variable_edit_dialog = new QalculateEditVariableDialog(this);
}
- v = variable_edit_dialog->editVariable(QString::null, (KnownVariable*) selected_variable);
+ v = variable_edit_dialog->editVariable(TQString::null, (KnownVariable*) selected_variable);
}
} else {
if(!unknown_edit_dialog) {
unknown_edit_dialog = new QalculateEditUnknownVariableDialog(this);
}
- v = unknown_edit_dialog->editVariable(QString::null, (UnknownVariable*) selected_variable);
+ v = unknown_edit_dialog->editVariable(TQString::null, (UnknownVariable*) selected_variable);
}
if(v) {
selected_variable = v;
@@ -272,7 +272,7 @@ void QalculateVariablesDialog::newVariable() {
if(selected_category.isEmpty() || selected_category[0] != '/') {
v = variable_edit_dialog->editVariable("");
} else {
- QString str = selected_category;
+ TQString str = selected_category;
str.remove(0, 1);
v = variable_edit_dialog->editVariable(str);
}
@@ -290,7 +290,7 @@ void QalculateVariablesDialog::newVariable() {
}
}
-void QalculateVariablesDialog::variableDoubleClicked(QListViewItem*i) {
+void QalculateVariablesDialog::variableDoubleClicked(TQListViewItem*i) {
selected_variable = variableItems[i];
if(!selected_variable)
return;
@@ -301,18 +301,18 @@ void QalculateVariablesDialog::variableDoubleClicked(QListViewItem*i) {
if(!matrix_edit_dialog) {
matrix_edit_dialog = new QalculateEditMatrixVectorDialog(this);
}
- v = matrix_edit_dialog->editVariable(QString::null, (KnownVariable*) selected_variable);
+ v = matrix_edit_dialog->editVariable(TQString::null, (KnownVariable*) selected_variable);
} else {
if(!variable_edit_dialog) {
variable_edit_dialog = new QalculateEditVariableDialog(this);
}
- v = variable_edit_dialog->editVariable(QString::null, (KnownVariable*) selected_variable);
+ v = variable_edit_dialog->editVariable(TQString::null, (KnownVariable*) selected_variable);
}
} else {
if(!unknown_edit_dialog) {
unknown_edit_dialog = new QalculateEditUnknownVariableDialog(this);
}
- v = unknown_edit_dialog->editVariable(QString::null, (UnknownVariable*) selected_variable);
+ v = unknown_edit_dialog->editVariable(TQString::null, (UnknownVariable*) selected_variable);
}
if(v) {
selected_variable = v;
@@ -330,7 +330,7 @@ void QalculateVariablesDialog::variableDoubleClicked(QListViewItem*i) {
void QalculateVariablesDialog::variableSelected() {
- QListViewItem *selected = variableView->selectedItem();
+ TQListViewItem *selected = variableView->selectedItem();
if(selected) {
Variable *v = variableItems[selected];
if(!CALCULATOR->stillHasVariable(v)) {
@@ -361,7 +361,7 @@ void QalculateVariablesDialog::variableSelected() {
}
void QalculateVariablesDialog::addVariableTreeItem(Variable *v) {
- QString value;
+ TQString value;
if(is_answer_variable(v)) {
value = i18n("a previous result");
} else if(v->isKnown()) {
@@ -440,7 +440,7 @@ void QalculateVariablesDialog::addVariableTreeItem(Variable *v) {
value = i18n("default assumptions");
}
}
- QListViewItem *i = new KListViewItem(variableView, v->title(true).c_str(), value);
+ TQListViewItem *i = new KListViewItem(variableView, v->title(true).c_str(), value);
variableItems[i] = v;
if(v == selected_variable) {
variableView->setSelected(i, true);
@@ -449,7 +449,7 @@ void QalculateVariablesDialog::addVariableTreeItem(Variable *v) {
void QalculateVariablesDialog::categorySelected() {
- QListViewItem *selected = categoryView->selectedItem();
+ TQListViewItem *selected = categoryView->selectedItem();
bool no_cat = false, b_all = false, b_inactive = false;
variableView->clear();
variableItems.clear();
@@ -483,7 +483,7 @@ void QalculateVariablesDialog::categorySelected() {
}
}
if(!selected_variable || !variableView->selectedItem()) {
- QListViewItemIterator it(variableView);
+ TQListViewItemIterator it(variableView);
if(it.current())
variableView->setSelected(it.current(), true);
}
diff --git a/src/qalculatevariablesdialog.h b/src/qalculatevariablesdialog.h
index 2fa9bc5..5fe3655 100644
--- a/src/qalculatevariablesdialog.h
+++ b/src/qalculatevariablesdialog.h
@@ -21,7 +21,7 @@
#define QALCULATEVARIABLESDIALOG_H
#include <kdialog.h>
-#include <qmap.h>
+#include <tqmap.h>
class Variable;
class QalculateEditVariableDialog;
@@ -29,8 +29,8 @@ class QalculateEditMatrixVectorDialog;
class QalculateEditUnknownVariableDialog;
class QalculateExportCSVDialog;
class KListView;
-class QListViewItem;
-class QPushButton;
+class TQListViewItem;
+class TQPushButton;
/**
@author Niklas Knutsson
@@ -41,34 +41,34 @@ class QalculateVariablesDialog : public KDialog {
public:
- QalculateVariablesDialog(QWidget *parent = 0, const char *name = 0);
+ QalculateVariablesDialog(TQWidget *parent = 0, const char *name = 0);
virtual ~QalculateVariablesDialog();
QalculateEditVariableDialog *variable_edit_dialog;
QalculateEditMatrixVectorDialog *matrix_edit_dialog;
QalculateEditUnknownVariableDialog *unknown_edit_dialog;
QalculateExportCSVDialog *export_csv_dialog;
- QString selected_category;
+ TQString selected_category;
Variable *selected_variable;
void addVariableTreeItem(Variable *v);
- QMap<QListViewItem*, Variable*> variableItems;
- QMap<QListViewItem*, QString> categoryItems;
+ TQMap<TQListViewItem*, Variable*> variableItems;
+ TQMap<TQListViewItem*, TQString> categoryItems;
KListView *categoryView;
KListView *variableView;
- QPushButton *newButton;
- QPushButton *editButton;
- QPushButton *deleteButton;
- QPushButton *deactivateButton;
- QPushButton *insertButton;
- QPushButton *exportButton;
- QPushButton *helpButton;
- QPushButton *buttonClose;
+ TQPushButton *newButton;
+ TQPushButton *editButton;
+ TQPushButton *deleteButton;
+ TQPushButton *deactivateButton;
+ TQPushButton *insertButton;
+ TQPushButton *exportButton;
+ TQPushButton *helpButton;
+ TQPushButton *buttonClose;
public slots:
void updateVariableTree();
- void variableDoubleClicked(QListViewItem*);
+ void variableDoubleClicked(TQListViewItem*);
void variableSelected();
void categorySelected();
void exportVariable();