summaryrefslogtreecommitdiffstats
path: root/kimagemapeditor/mapslistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kimagemapeditor/mapslistview.cpp')
-rw-r--r--kimagemapeditor/mapslistview.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kimagemapeditor/mapslistview.cpp b/kimagemapeditor/mapslistview.cpp
index ec89ae4a..d3a9ebe9 100644
--- a/kimagemapeditor/mapslistview.cpp
+++ b/kimagemapeditor/mapslistview.cpp
@@ -23,40 +23,40 @@
#include "mapslistview.h"
-MapsListView::MapsListView(QWidget *parent, const char *name)
-: QVBox(parent, name) {
+MapsListView::MapsListView(TQWidget *parent, const char *name)
+: TQVBox(parent, name) {
_listView = new KListView(this);
_listView->addColumn(i18n("Maps"));
_listView->setFullWidth(true);
- _listView->setSelectionMode(QListView::Single);
+ _listView->setSelectionMode(TQListView::Single);
_listView->setItemsRenameable(true);
- connect( _listView, SIGNAL( selectionChanged(QListViewItem*)),
- this, SLOT( slotSelectionChanged(QListViewItem*)));
+ connect( _listView, TQT_SIGNAL( selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT( slotSelectionChanged(TQListViewItem*)));
- connect( _listView, SIGNAL( itemRenamed(QListViewItem*)),
- this, SLOT( slotItemRenamed(QListViewItem*)));
+ connect( _listView, TQT_SIGNAL( itemRenamed(TQListViewItem*)),
+ this, TQT_SLOT( slotItemRenamed(TQListViewItem*)));
}
MapsListView::~MapsListView() {
}
-void MapsListView::addMap(const QString & name = QString::null) {
- new QListViewItem(_listView,name);
+void MapsListView::addMap(const TQString & name = TQString::null) {
+ new TQListViewItem(_listView,name);
//kdDebug() << "MapsListView::addMap : Added map '" << name << "'" << endl;
}
-void MapsListView::addMaps(QPtrList<MapTag> * maps) {
+void MapsListView::addMaps(TQPtrList<MapTag> * maps) {
for (MapTag *tag = maps->first(); tag!=0L; tag=maps->next()) {
addMap(tag->name);
}
}
-void MapsListView::selectMap(const QString & name) {
- QListViewItem* item = _listView->findItem(name,0);
+void MapsListView::selectMap(const TQString & name) {
+ TQListViewItem* item = _listView->findItem(name,0);
if (item) {
selectMap(item);
} else
@@ -64,16 +64,16 @@ void MapsListView::selectMap(const QString & name) {
}
-void MapsListView::selectMap(QListViewItem* item) {
+void MapsListView::selectMap(TQListViewItem* item) {
if (item)
_listView->setSelected(item,true);
}
-QString MapsListView::selectedMap() {
- QString result;
+TQString MapsListView::selectedMap() {
+ TQString result;
- QListViewItem* item = _listView->selectedItem();
+ TQListViewItem* item = _listView->selectedItem();
if (item)
result = item->text(0);
else
@@ -82,8 +82,8 @@ QString MapsListView::selectedMap() {
return result;
}
-void MapsListView::removeMap(const QString & name) {
- QListViewItem* item = _listView->findItem(name,0);
+void MapsListView::removeMap(const TQString & name) {
+ TQListViewItem* item = _listView->findItem(name,0);
if (item) {
_listView->takeItem(item);
_listView->setSelected(_listView->currentItem(),true);
@@ -96,19 +96,19 @@ void MapsListView::clear() {
_listView->clear();
}
-void MapsListView::slotSelectionChanged(QListViewItem* item) {
- QString name = item->text(0);
+void MapsListView::slotSelectionChanged(TQListViewItem* item) {
+ TQString name = item->text(0);
emit mapSelected(name);
}
-void MapsListView::slotItemRenamed(QListViewItem* item) {
- QString name = item->text(0);
+void MapsListView::slotItemRenamed(TQListViewItem* item) {
+ TQString name = item->text(0);
emit mapRenamed(name);
}
-void MapsListView::changeMapName(const QString & oldName, const QString & newName) {
+void MapsListView::changeMapName(const TQString & oldName, const TQString & newName) {
// kdDebug() << "MapsListView::changeMapName : " << oldName << " to " << newName << endl;
- QListViewItem* item = _listView->findItem(oldName,0);
+ TQListViewItem* item = _listView->findItem(oldName,0);
if (item) {
item->setText(0,newName);
// kdDebug() << "MapsListView::changeMapName : successful" << endl;
@@ -120,12 +120,12 @@ void MapsListView::changeMapName(const QString & oldName, const QString & newNam
}
-bool MapsListView::nameAlreadyExists(const QString & name) {
+bool MapsListView::nameAlreadyExists(const TQString & name) {
// kdDebug() << "MapsListView::nameAlreadyExists : " << name << " ? " << endl;
bool result = false;
- QListViewItem* item = 0L;
+ TQListViewItem* item = 0L;
for(item = _listView->firstChild(); item; item = item->nextSibling()) {
- QString otherMap = item->text(0);
+ TQString otherMap = item->text(0);
if(name == otherMap) {
result = true;
break;
@@ -137,26 +137,26 @@ bool MapsListView::nameAlreadyExists(const QString & name) {
return result;
}
-QStringList MapsListView::getMaps() {
- QStringList result;
+TQStringList MapsListView::getMaps() {
+ TQStringList result;
- QListViewItem* item = 0L;
+ TQListViewItem* item = 0L;
for(item = _listView->firstChild(); item; item = item->nextSibling()) {
- QString map = item->text(0);
+ TQString map = item->text(0);
result << map;
}
return result;
}
-QString MapsListView::getUnusedMapName() {
- QString result;
- QString attempt;
+TQString MapsListView::getUnusedMapName() {
+ TQString result;
+ TQString attempt;
int i=0;
while(result.isEmpty()) {
i++;
attempt = i18n("unnamed");
- attempt += QString::number(i);
+ attempt += TQString::number(i);
if (nameAlreadyExists(attempt))
continue;