diff options
Diffstat (limited to 'src/qalculatevariablesdialog.cpp')
-rw-r--r-- | src/qalculatevariablesdialog.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
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); } |