Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index fc305cd..29f3e8d 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h | |||
@@ -26,67 +26,70 @@ | |||
26 | -_. . . )=. = General Public License along with | 26 | -_. . . )=. = General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 27 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
31 | 31 | ||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #ifndef PLAY_LIST_WIDGET_H | 34 | #ifndef PLAY_LIST_WIDGET_H |
35 | #define PLAY_LIST_WIDGET_H | 35 | #define PLAY_LIST_WIDGET_H |
36 | 36 | ||
37 | 37 | ||
38 | #include <qpushbutton.h> | 38 | #include <qpushbutton.h> |
39 | #include <qpopupmenu.h> | 39 | #include <qpopupmenu.h> |
40 | #include <qpe/qcopenvelope_qws.h> | 40 | #include <qpe/qcopenvelope_qws.h> |
41 | 41 | ||
42 | #include "playlistwidgetgui.h" | 42 | #include "playlistwidgetgui.h" |
43 | 43 | ||
44 | class Config; | 44 | class Config; |
45 | class QListViewItem; | 45 | class QListViewItem; |
46 | class QListView; | 46 | class QListView; |
47 | class QPoint; | 47 | class QPoint; |
48 | class QAction; | 48 | class QAction; |
49 | class QLabel; | 49 | class QLabel; |
50 | class MediaPlayerState; | ||
51 | class MediaPlayer; | ||
50 | 52 | ||
51 | class PlayListWidget : public PlayListWidgetGui { | 53 | class PlayListWidget : public PlayListWidgetGui { |
52 | Q_OBJECT | 54 | Q_OBJECT |
53 | public: | 55 | public: |
54 | enum TabType { CurrentPlayList, AudioFiles, VideoFiles, PlayLists }; | 56 | enum TabType { CurrentPlayList, AudioFiles, VideoFiles, PlayLists }; |
55 | enum { TabTypeCount = 4 }; | 57 | enum { TabTypeCount = 4 }; |
56 | 58 | ||
57 | struct Entry | 59 | struct Entry |
58 | { | 60 | { |
59 | Entry( const QString &_name, const QString &_fileName ) | 61 | Entry( const QString &_name, const QString &_fileName ) |
60 | : name( _name ), file( _fileName ) {} | 62 | : name( _name ), file( _fileName ) {} |
61 | Entry( const QString &_fileName ) | 63 | Entry( const QString &_fileName ) |
62 | : name( _fileName ), file( _fileName ) {} | 64 | : name( _fileName ), file( _fileName ) {} |
63 | 65 | ||
64 | QString name; | 66 | QString name; |
65 | QString file; | 67 | QString file; |
66 | }; | 68 | }; |
67 | 69 | ||
68 | PlayListWidget( MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 ); | 70 | static QString appName() { return QString::fromLatin1("opieplayer2"); } |
71 | PlayListWidget( QWidget* parent=0, const char* name=0, WFlags = 0 ); | ||
69 | ~PlayListWidget(); | 72 | ~PlayListWidget(); |
70 | 73 | ||
71 | // retrieve the current playlist entry (media file link) | 74 | // retrieve the current playlist entry (media file link) |
72 | const DocLnk *current() const; | 75 | const DocLnk *current() const; |
73 | void useSelectedDocument(); | 76 | void useSelectedDocument(); |
74 | TabType currentTab() const; | 77 | TabType currentTab() const; |
75 | 78 | ||
76 | Entry currentEntry() const; | 79 | Entry currentEntry() const; |
77 | 80 | ||
78 | public slots: | 81 | public slots: |
79 | bool first(); | 82 | bool first(); |
80 | bool last(); | 83 | bool last(); |
81 | bool next(); | 84 | bool next(); |
82 | bool prev(); | 85 | bool prev(); |
83 | void writeDefaultPlaylist( ); | 86 | void writeDefaultPlaylist( ); |
84 | QString currentFileListPathName() const; | 87 | QString currentFileListPathName() const; |
85 | protected: | 88 | protected: |
86 | QCopChannel * channel; | 89 | QCopChannel * channel; |
87 | void keyReleaseEvent( QKeyEvent *e); | 90 | void keyReleaseEvent( QKeyEvent *e); |
88 | 91 | ||
89 | signals: | 92 | signals: |
90 | void skinSelected(); | 93 | void skinSelected(); |
91 | 94 | ||
92 | private: | 95 | private: |
@@ -111,28 +114,30 @@ private slots: | |||
111 | void addToSelection( const DocLnk& ); // Add a media file to the playlist | 114 | void addToSelection( const DocLnk& ); // Add a media file to the playlist |
112 | void addToSelection( QListViewItem* ); // Add a media file to the playlist | 115 | void addToSelection( QListViewItem* ); // Add a media file to the playlist |
113 | void clearList(); | 116 | void clearList(); |
114 | void addAllToList(); | 117 | void addAllToList(); |
115 | void addAllMusicToList(); | 118 | void addAllMusicToList(); |
116 | void addAllVideoToList(); | 119 | void addAllVideoToList(); |
117 | void saveList(); // Save the playlist | 120 | void saveList(); // Save the playlist |
118 | void loadList( const DocLnk &); // Load a playlist | 121 | void loadList( const DocLnk &); // Load a playlist |
119 | void playIt( QListViewItem *); | 122 | void playIt( QListViewItem *); |
120 | void btnPlay(bool); | 123 | void btnPlay(bool); |
121 | void deletePlaylist(); | 124 | void deletePlaylist(); |
122 | void addSelected(); | 125 | void addSelected(); |
123 | void removeSelected(); | 126 | void removeSelected(); |
124 | void tabChanged(QWidget*); | 127 | void tabChanged(QWidget*); |
125 | void viewPressed( int, QListViewItem *, const QPoint&, int); | 128 | void viewPressed( int, QListViewItem *, const QPoint&, int); |
126 | void playlistViewPressed( int, QListViewItem *, const QPoint&, int); | 129 | void playlistViewPressed( int, QListViewItem *, const QPoint&, int); |
127 | void playSelected(); | 130 | void playSelected(); |
128 | 131 | ||
129 | private: | 132 | private: |
130 | bool fromSetDocument; | 133 | bool fromSetDocument; |
131 | bool insanityBool; | 134 | bool insanityBool; |
132 | QString setDocFileRef, currentPlayList; | 135 | QString setDocFileRef, currentPlayList; |
133 | int selected; | 136 | int selected; |
134 | QListView *currentFileListView; | 137 | QListView *currentFileListView; |
138 | |||
139 | MediaPlayer *m_mp; | ||
135 | }; | 140 | }; |
136 | 141 | ||
137 | #endif // PLAY_LIST_WIDGET_H | 142 | #endif // PLAY_LIST_WIDGET_H |
138 | 143 | ||