diff options
Diffstat (limited to 'kradio3/src/stationselector.cpp')
-rw-r--r-- | kradio3/src/stationselector.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/kradio3/src/stationselector.cpp b/kradio3/src/stationselector.cpp index 635d4da..8cf240c 100644 --- a/kradio3/src/stationselector.cpp +++ b/kradio3/src/stationselector.cpp @@ -26,17 +26,17 @@ using namespace std; #include "include/stationselector.h" #include "include/radiostation-listview.h" -StationSelector::StationSelector (QWidget *parent) - : StationSelectorUI(parent), +StationSelector::StationSelector (TQWidget *tqparent) + : StationSelectorUI(tqparent), m_dirty(true) { - QObject::connect(buttonToLeft, SIGNAL(clicked()), this, SLOT(slotButtonToLeft())); - QObject::connect(buttonToRight, SIGNAL(clicked()), this, SLOT(slotButtonToRight())); - QObject::connect(listAvailable, SIGNAL(sigStationsReceived(const QStringList&)), this, SLOT(slotMoveToLeft(const QStringList&))); - QObject::connect(listSelected, SIGNAL(sigStationsReceived(const QStringList&)), this, SLOT(slotMoveToRight(const QStringList&))); + TQObject::connect(buttonToLeft, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotButtonToLeft())); + TQObject::connect(buttonToRight, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotButtonToRight())); + TQObject::connect(listAvailable, TQT_SIGNAL(sigStationsReceived(const TQStringList&)), this, TQT_SLOT(slotMoveToLeft(const TQStringList&))); + TQObject::connect(listSelected, TQT_SIGNAL(sigStationsReceived(const TQStringList&)), this, TQT_SLOT(slotMoveToRight(const TQStringList&))); - listSelected->setSelectionMode(QListView::Extended); - listAvailable->setSelectionMode(QListView::Extended); + listSelected->setSelectionMode(TQListView::Extended); + listAvailable->setSelectionMode(TQListView::Extended); } @@ -61,21 +61,21 @@ bool StationSelector::disconnectI(Interface *i) } -bool StationSelector::noticeStationSelectionChanged(const QStringList &sl) +bool StationSelector::noticeStationSelectionChanged(const TQStringList &sl) { m_stationIDsNotDisplayed.clear(); m_stationIDsSelected.clear(); m_stationIDsAvailable.clear(); for (unsigned int i = 0; i < m_stationIDsAll.count(); ++i) { - if (sl.contains(m_stationIDsAll[i])) { + if (sl.tqcontains(m_stationIDsAll[i])) { m_stationIDsSelected.append(m_stationIDsAll[i]); } else { m_stationIDsAvailable.append(m_stationIDsAll[i]); } } for (unsigned int i = 0; i < sl.count(); ++i) { - if (!m_stationIDsAll.contains(sl[i])) + if (!m_stationIDsAll.tqcontains(sl[i])) m_stationIDsNotDisplayed.append(sl[i]); } updateListViews(); @@ -100,10 +100,10 @@ bool StationSelector::noticeStationsChanged(const StationList &sl) m_stationIDsSelected.clear(); for (RawStationList::Iterator i(sl.all()); i.current(); ++i) { - const QString &id = i.current()->stationID(); + const TQString &id = i.current()->stationID(); m_stationIDsAll.append(id); - if (m_stationIDsNotDisplayed.contains(id)) { + if (m_stationIDsNotDisplayed.tqcontains(id)) { m_stationIDsNotDisplayed.remove(id); m_stationIDsSelected.append(id); } else { @@ -120,10 +120,10 @@ void StationSelector::slotButtonToLeft() { slotSetDirty(); listAvailable->clearSelection(); - QListViewItem *item = listSelected->firstChild(); + TQListViewItem *item = listSelected->firstChild(); int idx_from = 0; while (item) { - QListViewItem *next_item = item->nextSibling(); + TQListViewItem *next_item = item->nextSibling(); if (item->isSelected()) { @@ -143,10 +143,10 @@ void StationSelector::slotButtonToRight() { slotSetDirty(); listSelected->clearSelection(); - QListViewItem *item = listAvailable->firstChild(); + TQListViewItem *item = listAvailable->firstChild(); int idx_from = 0; while (item) { - QListViewItem *next_item = item->nextSibling(); + TQListViewItem *next_item = item->nextSibling(); if (item->isSelected()) { @@ -162,16 +162,16 @@ void StationSelector::slotButtonToRight() } -void StationSelector::slotMoveToRight(const QStringList &list) +void StationSelector::slotMoveToRight(const TQStringList &list) { slotSetDirty(); listSelected->clearSelection(); - QListViewItem *item = listAvailable->firstChild(); + TQListViewItem *item = listAvailable->firstChild(); int idx_from = 0; while (item) { - QListViewItem *next_item = item->nextSibling(); + TQListViewItem *next_item = item->nextSibling(); - if (list.contains(m_stationIDsAvailable[idx_from])) { + if (list.tqcontains(m_stationIDsAvailable[idx_from])) { moveItem (listAvailable, m_stationIDsAvailable, item, idx_from, @@ -185,16 +185,16 @@ void StationSelector::slotMoveToRight(const QStringList &list) } -void StationSelector::slotMoveToLeft(const QStringList &list) +void StationSelector::slotMoveToLeft(const TQStringList &list) { slotSetDirty(); listAvailable->clearSelection(); - QListViewItem *item = listSelected->firstChild(); + TQListViewItem *item = listSelected->firstChild(); int idx_from = 0; while (item) { - QListViewItem *next_item = item->nextSibling(); + TQListViewItem *next_item = item->nextSibling(); - if (list.contains(m_stationIDsSelected[idx_from])) { + if (list.tqcontains(m_stationIDsSelected[idx_from])) { moveItem (listSelected, m_stationIDsSelected, item, idx_from, @@ -210,22 +210,22 @@ void StationSelector::slotMoveToLeft(const QStringList &list) void StationSelector::moveItem( RadioStationListView *fromListView, - QStringList &fromIDList, - QListViewItem *item, + TQStringList &fromIDList, + TQListViewItem *item, int idx_from, RadioStationListView *toListView, - QStringList &toIDList + TQStringList &toIDList ) { fromListView->takeItem(item, idx_from); - QString id = fromIDList[idx_from]; + TQString id = fromIDList[idx_from]; fromIDList.remove(fromIDList.at(idx_from)); unsigned int idx_to = 0, idx_all = 0; bool found = false; - QListViewItem *item_to = toListView->firstChild(), + TQListViewItem *item_to = toListView->firstChild(), *prev_item_to = NULL; while (idx_all < m_stationIDsAll.count() && @@ -266,11 +266,11 @@ void StationSelector::updateListViews() const RawStationList &sl = stations.all(); for (unsigned int i = 0; i < m_stationIDsAvailable.count(); ++i) { - QString id = m_stationIDsAvailable[i]; + TQString id = m_stationIDsAvailable[i]; listAvailable->appendStation(sl.stationWithID(id), sl.idxWithID(id)+1); } for (unsigned int i = 0; i < m_stationIDsSelected.count(); ++i) { - QString id = m_stationIDsSelected[i]; + TQString id = m_stationIDsSelected[i]; listSelected->appendStation(sl.stationWithID(id), sl.idxWithID(id)+1); } } @@ -279,7 +279,7 @@ void StationSelector::updateListViews() void StationSelector::slotOK() { if (m_dirty) { - QStringList l = m_stationIDsSelected; + TQStringList l = m_stationIDsSelected; for (unsigned int i = 0; i < m_stationIDsNotDisplayed.count(); ++i) l.append(m_stationIDsNotDisplayed[i]); sendStationSelection(l); |