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