author | simon <simon> | 2002-12-02 14:51:53 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-02 14:51:53 (UTC) |
commit | f90e42128a496a0fb5a67c3148c30ef46092624b (patch) (unidiff) | |
tree | 8c0f0bee0fd71536c70c751d29ef9114e4313437 | |
parent | 3644bde7c86013c699978446c29ec6502220e29c (diff) | |
download | opie-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
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 18 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 2 |
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 | |||
@@ -790,4 +790,13 @@ void PlayListWidget::populateVideoView() { | |||
790 | } | 790 | } |
791 | 791 | ||
792 | QListView *PlayListWidget::currentFileListView() const | ||
793 | { | ||
794 | switch ( currentTab() ) { | ||
795 | case AudioFiles: return audioView; | ||
796 | case VideoFiles: return videoView; | ||
797 | default: assert( false ); | ||
798 | } | ||
799 | return 0; | ||
800 | } | ||
792 | 801 | ||
793 | void PlayListWidget::openFile() { | 802 | void PlayListWidget::openFile() { |
@@ -1154,11 +1163,4 @@ PlayListWidget::TabType PlayListWidget::currentTab() const | |||
1154 | 1163 | ||
1155 | QString PlayListWidget::currentFileListPathName() const { | 1164 | QString PlayListWidget::currentFileListPathName() const { |
1156 | switch (currentTab()) { | 1165 | return currentFileListView()->currentItem()->text( 3 ); |
1157 | case AudioFiles: | ||
1158 | return audioView->currentItem()->text(3); | ||
1159 | case VideoFiles: | ||
1160 | return videoView->currentItem()->text(3); | ||
1161 | default: assert( false ); | ||
1162 | }; | ||
1163 | return QString::null; | ||
1164 | } | 1166 | } |
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 | |||
@@ -91,4 +91,6 @@ private: | |||
91 | void populateVideoView(); | 91 | void populateVideoView(); |
92 | 92 | ||
93 | QListView *currentFileListView() const; | ||
94 | |||
93 | private slots: | 95 | private slots: |
94 | void populateSkinsMenu(); | 96 | void populateSkinsMenu(); |