summaryrefslogtreecommitdiffstats
path: root/src/qalculateconvertunitsdialog.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/qalculateconvertunitsdialog.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/qalculateconvertunitsdialog.cpp')
-rw-r--r--src/qalculateconvertunitsdialog.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/qalculateconvertunitsdialog.cpp b/src/qalculateconvertunitsdialog.cpp
index ce52e87..0808780 100644
--- a/src/qalculateconvertunitsdialog.cpp
+++ b/src/qalculateconvertunitsdialog.cpp
@@ -20,18 +20,18 @@
#include "qalculateconvertunitsdialog.h"
#include "qalculate_tde_utils.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klineedit.h>
#include <klocale.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include <klistview.h>
#include <klocale.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <klistview.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qsplitter.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqsplitter.h>
extern tree_struct unit_cats;
extern vector<void*> ia_units;
@@ -39,23 +39,23 @@ extern PrintOptions printops;
extern EvaluationOptions evalops;
-QalculateConvertUnitsDialog::QalculateConvertUnitsDialog(QWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Convert"), Ok | Apply | Cancel | Details, Ok, true) {
+QalculateConvertUnitsDialog::QalculateConvertUnitsDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, false, i18n("Convert"), Ok | Apply | Cancel | Details, Ok, true) {
setButtonText(Details, i18n("Selector"));
selected_category = "";
block_unit_convert = true;
- QVBox *box = makeVBoxMainWidget();
- new QLabel(i18n("Unit expression:"), box);
+ TQVBox *box = makeVBoxMainWidget();
+ new TQLabel(i18n("Unit expression:"), box);
unitExpressionEdit = new KLineEdit(box);
- QVBox *box_d = new QVBox(this);
+ TQVBox *box_d = new TQVBox(this);
box_d->setSpacing(spacingHint());
- new QWidget(box_d);
+ new TQWidget(box_d);
- QSplitter *splitter = new QSplitter(Qt::Vertical, box_d);
- splitter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQSplitter *splitter = new TQSplitter(TQt::Vertical, box_d);
+ splitter->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
setDetailsWidget(box_d);
@@ -82,10 +82,10 @@ void QalculateConvertUnitsDialog::updateUnitTree() {
unitItems.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;
unit_cats.it = unit_cats.items.begin();
if(unit_cats.it != unit_cats.items.end()) {
@@ -139,14 +139,14 @@ void QalculateConvertUnitsDialog::updateUnitTree() {
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);
}
}
void QalculateConvertUnitsDialog::unitSelected() {
- QListViewItem *selected = unitView->selectedItem();
+ TQListViewItem *selected = unitView->selectedItem();
if(selected) {
Unit *u = unitItems[selected];
if(!CALCULATOR->stillHasUnit(u)) {
@@ -161,14 +161,14 @@ void QalculateConvertUnitsDialog::unitSelected() {
}
void QalculateConvertUnitsDialog::addUnitTreeItem(Unit *u) {
- QListViewItem *i = new KListViewItem(unitView, u->title(true).c_str());
+ TQListViewItem *i = new KListViewItem(unitView, u->title(true).c_str());
unitItems[i] = u;
}
void QalculateConvertUnitsDialog::categorySelected() {
block_unit_convert = true;
- QListViewItem *selected = categoryView->selectedItem();
+ TQListViewItem *selected = categoryView->selectedItem();
bool no_cat = false, b_all = false;
unitView->clear();
unitItems.clear();