summaryrefslogtreecommitdiffstats
path: root/src/qalculateeditmatrixvectordialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qalculateeditmatrixvectordialog.cpp')
-rw-r--r--src/qalculateeditmatrixvectordialog.cpp108
1 files changed, 54 insertions, 54 deletions
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"