summaryrefslogtreecommitdiffstats
path: root/src/qalculateimportcsvdialog.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/qalculateimportcsvdialog.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/qalculateimportcsvdialog.cpp')
-rw-r--r--src/qalculateimportcsvdialog.cpp64
1 files changed, 32 insertions, 32 deletions
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);