summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.h3
2 files changed, 15 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index d1506db..9918eeb 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -49,12 +49,13 @@
49#include "mediaplayerstate.h" 49#include "mediaplayerstate.h"
50#include "inputDialog.h" 50#include "inputDialog.h"
51#include "om3u.h" 51#include "om3u.h"
52 52
53//only needed for the random play 53//only needed for the random play
54#include <stdlib.h> 54#include <stdlib.h>
55#include <assert.h>
55 56
56#include "audiowidget.h" 57#include "audiowidget.h"
57#include "videowidget.h" 58#include "videowidget.h"
58 59
59extern MediaPlayerState *mediaPlayerState; 60extern MediaPlayerState *mediaPlayerState;
60// extern AudioWidget *audioUI; 61// extern AudioWidget *audioUI;
@@ -1142,12 +1143,23 @@ void PlayListWidget::skinsMenuActivated( int item ) {
1142} 1143}
1143 1144
1144int PlayListWidget::whichList() { 1145int PlayListWidget::whichList() {
1145 return tabWidget->currentPageIndex(); 1146 return tabWidget->currentPageIndex();
1146} 1147}
1147 1148
1149PlayListWidget::TabType PlayListWidget::currentTab() const
1150{
1151 static const TabType indexToTabType[ NumTabTypes ] =
1152 { CurrentPlaylist, AudioFiles, VideoFiles, PlayLists };
1153
1154 int index = tabWidget->currentPageIndex();
1155 assert( index < NumTabTypes && index >= 0 );
1156
1157 return indexToTabType[ index ];
1158}
1159
1148QString PlayListWidget::currentFileListPathName() { 1160QString PlayListWidget::currentFileListPathName() {
1149 switch (whichList()) { 1161 switch (whichList()) {
1150 case 1: 1162 case 1:
1151 return audioView->currentItem()->text(3); 1163 return audioView->currentItem()->text(3);
1152 break; 1164 break;
1153 case 2: 1165 case 2:
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h
index b2c389e..05d53a4 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.h
+++ b/noncore/multimedia/opieplayer2/playlistwidget.h
@@ -52,24 +52,27 @@ class QPoint;
52class QAction; 52class QAction;
53class QLabel; 53class QLabel;
54 54
55class PlayListWidget : public PlayListWidgetGui { 55class PlayListWidget : public PlayListWidgetGui {
56 Q_OBJECT 56 Q_OBJECT
57public: 57public:
58 enum TabType { CurrentPlayList, AudioFiles, VideoFiles, PlayLists, NumTabTypes = 4 };
59
58 PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 ); 60 PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 );
59 ~PlayListWidget(); 61 ~PlayListWidget();
60 DocLnkSet files; 62 DocLnkSet files;
61 DocLnkSet vFiles; 63 DocLnkSet vFiles;
62 bool fromSetDocument; 64 bool fromSetDocument;
63 bool insanityBool; 65 bool insanityBool;
64 QString setDocFileRef, currentPlayList; 66 QString setDocFileRef, currentPlayList;
65 // retrieve the current playlist entry (media file link) 67 // retrieve the current playlist entry (media file link)
66 const DocLnk *current(); 68 const DocLnk *current();
67 void useSelectedDocument(); 69 void useSelectedDocument();
68 int selected; 70 int selected;
69 int whichList(); 71 int whichList();
72 TabType currentTab() const;
70 73
71public slots: 74public slots:
72 bool first(); 75 bool first();
73 bool last(); 76 bool last();
74 bool next(); 77 bool next();
75 bool prev(); 78 bool prev();