summaryrefslogtreecommitdiffstats
path: root/kimagemapeditor/mapslistview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /kimagemapeditor/mapslistview.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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;