summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-02 14:51:53 (UTC)
committer simon <simon>2002-12-02 14:51:53 (UTC)
commitf90e42128a496a0fb5a67c3148c30ef46092624b (patch) (side-by-side diff)
tree8c0f0bee0fd71536c70c751d29ef9114e4313437
parent3644bde7c86013c699978446c29ec6502220e29c (diff)
downloadopie-f90e42128a496a0fb5a67c3148c30ef46092624b.zip
opie-f90e42128a496a0fb5a67c3148c30ef46092624b.tar.gz
opie-f90e42128a496a0fb5a67c3148c30ef46092624b.tar.bz2
- added currentFileListView() method that returns the current file list
qlistview object and simplified currentFileListPathName with that
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp18
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h2
2 files changed, 12 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index a708cf6..92da73b 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -791,2 +791,11 @@ void PlayListWidget::populateVideoView() {
+QListView *PlayListWidget::currentFileListView() const
+{
+ switch ( currentTab() ) {
+ case AudioFiles: return audioView;
+ case VideoFiles: return videoView;
+ default: assert( false );
+ }
+ return 0;
+}
@@ -1155,10 +1164,3 @@ PlayListWidget::TabType PlayListWidget::currentTab() const
QString PlayListWidget::currentFileListPathName() const {
- switch (currentTab()) {
- case AudioFiles:
- return audioView->currentItem()->text(3);
- case VideoFiles:
- return videoView->currentItem()->text(3);
- default: assert( false );
- };
- return QString::null;
+ return currentFileListView()->currentItem()->text( 3 );
}
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h
index 7044abe..a608eae 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.h
+++ b/noncore/multimedia/opieplayer2/playlistwidget.h
@@ -92,2 +92,4 @@ private:
+ QListView *currentFileListView() const;
+
private slots: