summaryrefslogtreecommitdiffstats
path: root/src/qalculateinsertmatrixvectordialog.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-04-09 20:52:09 +0200
committerSlávek Banko <slavek.banko@axis.cz>2016-04-09 20:52:09 +0200
commit91d2d7482c36e67cb36df9d1dcdbd989911e4ceb (patch)
treec842adfbb1a172d9b61241d7dde70354e821bb75 /src/qalculateinsertmatrixvectordialog.cpp
parent4870c0c8c53d3df6ba954b2b4d8ebd87a8c43060 (diff)
downloadqalculate-tde-91d2d7482c36e67cb36df9d1dcdbd989911e4ceb.tar.gz
qalculate-tde-91d2d7482c36e67cb36df9d1dcdbd989911e4ceb.zip
Initial TQt conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'src/qalculateinsertmatrixvectordialog.cpp')
-rw-r--r--src/qalculateinsertmatrixvectordialog.cpp90
1 files changed, 45 insertions, 45 deletions
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"