diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
commit | 11f31c37e5fa4889d9989f10272f44845449cb7b (patch) | |
tree | 4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/editors/segment/PlayList.cpp | |
parent | 832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff) | |
download | rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip |
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/editors/segment/PlayList.cpp')
-rw-r--r-- | src/gui/editors/segment/PlayList.cpp | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/src/gui/editors/segment/PlayList.cpp b/src/gui/editors/segment/PlayList.cpp index bfc795c..da56edc 100644 --- a/src/gui/editors/segment/PlayList.cpp +++ b/src/gui/editors/segment/PlayList.cpp @@ -27,43 +27,43 @@ #include "PlayListView.h" #include "PlayListViewItem.h" #include "document/ConfigGroups.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <kconfig.h> #include <kfiledialog.h> #include <kglobal.h> #include <kurl.h> -#include <qframe.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qstrlist.h> -#include <qvbox.h> -#include <qwidget.h> -#include <qdragobject.h> +#include <tqframe.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqstrlist.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqdragobject.h> namespace Rosegarden { -PlayList::PlayList(QWidget *parent, const char *name) - : QVBox(parent, name), +PlayList::PlayList(TQWidget *parent, const char *name) + : TQVBox(parent, name), m_listView(new PlayListView(this)), - m_buttonBar(new QFrame(this)), - m_barLayout(new QHBoxLayout(m_buttonBar)), + m_buttonBar(new TQFrame(this)), + m_barLayout(new TQHBoxLayout(m_buttonBar)), m_playButton(0), m_moveUpButton(0), m_moveDownButton(0), m_deleteButton(0), m_clearButton(0) { - m_openButton = new QPushButton(m_buttonBar); - m_playButton = new QPushButton(m_buttonBar); - m_moveUpButton = new QPushButton(m_buttonBar); - m_moveDownButton = new QPushButton(m_buttonBar); - m_deleteButton = new QPushButton(m_buttonBar); - m_clearButton = new QPushButton(m_buttonBar); + m_openButton = new TQPushButton(m_buttonBar); + m_playButton = new TQPushButton(m_buttonBar); + m_moveUpButton = new TQPushButton(m_buttonBar); + m_moveDownButton = new TQPushButton(m_buttonBar); + m_deleteButton = new TQPushButton(m_buttonBar); + m_clearButton = new TQPushButton(m_buttonBar); m_barLayout->addWidget(m_openButton); m_barLayout->addWidget(m_playButton); m_barLayout->addWidget(m_moveUpButton); @@ -80,29 +80,29 @@ PlayList::PlayList(QWidget *parent, const char *name) m_deleteButton ->setText(i18n("Delete")); m_clearButton ->setText(i18n("Clear")); - connect(m_openButton, SIGNAL(clicked()), - SLOT(slotOpenFiles())); + connect(m_openButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotOpenFiles())); - connect(m_playButton, SIGNAL(clicked()), - SLOT(slotPlay())); + connect(m_playButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotPlay())); - connect(m_deleteButton, SIGNAL(clicked()), - SLOT(slotDeleteCurrent())); + connect(m_deleteButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotDeleteCurrent())); - connect(m_clearButton, SIGNAL(clicked()), - SLOT(slotClear())); + connect(m_clearButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotClear())); - connect(m_moveUpButton, SIGNAL(clicked()), - SLOT(slotMoveUp())); + connect(m_moveUpButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotMoveUp())); - connect(m_moveDownButton, SIGNAL(clicked()), - SLOT(slotMoveDown())); + connect(m_moveDownButton, TQT_SIGNAL(clicked()), + TQT_SLOT(slotMoveDown())); - connect(m_listView, SIGNAL(currentChanged(QListViewItem*)), - SLOT(slotCurrentItemChanged(QListViewItem*))); + connect(m_listView, TQT_SIGNAL(currentChanged(TQListViewItem*)), + TQT_SLOT(slotCurrentItemChanged(TQListViewItem*))); - connect(m_listView, SIGNAL(dropped(QDropEvent*, QListViewItem*)), - SLOT(slotDropped(QDropEvent*, QListViewItem*))); + connect(m_listView, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), + TQT_SLOT(slotDropped(TQDropEvent*, TQListViewItem*))); restore(); @@ -133,17 +133,17 @@ void PlayList::slotOpenFiles() } void -PlayList::slotDropped(QDropEvent *event, QListViewItem* after) +PlayList::slotDropped(TQDropEvent *event, TQListViewItem* after) { - QStrList uri; + TQStrList uri; // see if we can decode a URI.. if not, just ignore it - if (QUriDrag::decode(event, uri)) { + if (TQUriDrag::decode(event, uri)) { // okay, we have a URI.. process it // weed out non-rg files // - for (QString url = uri.first(); url; url = uri.next()) { + for (TQString url = uri.first(); url; url = uri.next()) { if (url.right(3).lower() == ".rg") new PlayListViewItem(m_listView, after, KURL(url)); @@ -163,8 +163,8 @@ void PlayList::slotPlay() void PlayList::slotMoveUp() { - QListViewItem *currentItem = m_listView->currentItem(); - QListViewItem *previousItem = m_listView->previousSibling(currentItem); + TQListViewItem *currentItem = m_listView->currentItem(); + TQListViewItem *previousItem = m_listView->previousSibling(currentItem); if (previousItem) previousItem->moveItem(currentItem); @@ -174,8 +174,8 @@ void PlayList::slotMoveUp() void PlayList::slotMoveDown() { - QListViewItem *currentItem = m_listView->currentItem(); - QListViewItem *nextItem = currentItem->nextSibling(); + TQListViewItem *currentItem = m_listView->currentItem(); + TQListViewItem *nextItem = currentItem->nextSibling(); if (nextItem) currentItem->moveItem(nextItem); @@ -191,17 +191,17 @@ void PlayList::slotClear() void PlayList::slotDeleteCurrent() { - QListViewItem* currentItem = m_listView->currentItem(); + TQListViewItem* currentItem = m_listView->currentItem(); if (currentItem) delete currentItem; } -void PlayList::slotCurrentItemChanged(QListViewItem* currentItem) +void PlayList::slotCurrentItemChanged(TQListViewItem* currentItem) { enableButtons(currentItem); } -void PlayList::enableButtons(QListViewItem* currentItem) +void PlayList::enableButtons(TQListViewItem* currentItem) { bool enable = (currentItem != 0); @@ -221,7 +221,7 @@ void PlayList::enableButtons(QListViewItem* currentItem) void PlayList::save() { - QStringList urlList; + TQStringList urlList; PlayListViewItem* item = dynamic_cast<PlayListViewItem*>(getListView()->firstChild()); while (item) { @@ -242,9 +242,9 @@ void PlayList::restore() getListView()->restoreLayout(kc, PlayListConfigGroup); KConfigGroupSaver cs(kc, PlayListConfigGroup); - QStringList urlList = kc->readListEntry("Playlist Files"); + TQStringList urlList = kc->readListEntry("Playlist Files"); - for (QStringList::Iterator it = urlList.begin(); + for (TQStringList::Iterator it = urlList.begin(); it != urlList.end(); ++it) { new PlayListViewItem(getListView(), KURL(*it)); } |