Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 69 |
1 files changed, 39 insertions, 30 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index 8710a99..2742252 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h | |||
@@ -1,3 +1,35 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> | ||
5 | Copyright (c) 2002 L. Potter <ljp@llornkcor.com> | ||
6 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> | ||
7 | =. | ||
8 | .=l. | ||
9 | .>+-= | ||
10 | _;:, .> :=|. This program is free software; you can | ||
11 | .> <`_, > . <= redistribute it and/or modify it under | ||
12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
13 | .="- .-=="i, .._ License as published by the Free Software | ||
14 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
15 | ._= =} : or (at your option) any later version. | ||
16 | .%`+i> _;_. | ||
17 | .i_,=:_. -<s. This program is distributed in the hope that | ||
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
19 | : .. .:, . . . without even the implied warranty of | ||
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
22 | ..}^=.= = ; Library General Public License for more | ||
23 | ++= -. .` .: details. | ||
24 | : = ...= . :.=- | ||
25 | -. .:....=;==+<; You should have received a copy of the GNU | ||
26 | -_. . . )=. = Library General Public License along with | ||
27 | -- :-=` this library; see the file COPYING.LIB. | ||
28 | If not, write to the Free Software Foundation, | ||
29 | Inc., 59 Temple Place - Suite 330, | ||
30 | Boston, MA 02111-1307, USA. | ||
31 | |||
32 | */ | ||
1 | 33 | ||
2 | #ifndef PLAY_LIST_WIDGET_H | 34 | #ifndef PLAY_LIST_WIDGET_H |
3 | #define PLAY_LIST_WIDGET_H | 35 | #define PLAY_LIST_WIDGET_H |
@@ -9,10 +41,10 @@ | |||
9 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
10 | #include <qpopupmenu.h> | 42 | #include <qpopupmenu.h> |
11 | 43 | ||
12 | /* #include <qtimer.h> */ | 44 | #include "playlistwidgetgui.h" |
13 | 45 | ||
14 | 46 | ||
15 | class PlayListWidgetPrivate; | 47 | //class PlayListWidgetPrivate; |
16 | class Config; | 48 | class Config; |
17 | class QListViewItem; | 49 | class QListViewItem; |
18 | class QListView; | 50 | class QListView; |
@@ -20,54 +52,41 @@ class QPoint; | |||
20 | class QAction; | 52 | class QAction; |
21 | class QLabel; | 53 | class QLabel; |
22 | 54 | ||
23 | class PlayListWidget : public QMainWindow { | 55 | class PlayListWidget : public PlayListWidgetGui { |
24 | Q_OBJECT | 56 | Q_OBJECT |
25 | public: | 57 | public: |
26 | PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 ); | 58 | PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 ); |
27 | ~PlayListWidget(); | 59 | ~PlayListWidget(); |
28 | QTabWidget * tabWidget; | ||
29 | // MenuItem *fullScreenButton, *scaleButton; | ||
30 | // QAction *fullScreenButton, *scaleButton; | ||
31 | DocLnkSet files; | 60 | DocLnkSet files; |
32 | DocLnkSet vFiles; | 61 | DocLnkSet vFiles; |
33 | QListView *audioView, *videoView, *playlistView; | ||
34 | QLabel *libString; | ||
35 | QPopupMenu *pmView ; | ||
36 | bool fromSetDocument; | 62 | bool fromSetDocument; |
37 | bool insanityBool; | 63 | bool insanityBool; |
38 | QString setDocFileRef; | 64 | QString setDocFileRef; |
39 | // retrieve the current playlist entry (media file link) | 65 | // retrieve the current playlist entry (media file link) |
40 | const DocLnk *current(); | 66 | const DocLnk *current(); |
41 | void useSelectedDocument(); | 67 | void useSelectedDocument(); |
42 | /* QTimer * menuTimer; */ | ||
43 | FileSelector* playLists; | ||
44 | QPushButton *tbDeletePlaylist; | ||
45 | int selected; | 68 | int selected; |
69 | |||
46 | public slots: | 70 | public slots: |
47 | bool first(); | 71 | bool first(); |
48 | bool last(); | 72 | bool last(); |
49 | bool next(); | 73 | bool next(); |
50 | bool prev(); | 74 | bool prev(); |
51 | void writeConfig( Config& cfg ) const; | 75 | void writeConfig( Config& cfg ) const; |
52 | /* void setFullScreen(); */ | 76 | |
53 | /* void setScaled(); */ | ||
54 | protected: | 77 | protected: |
55 | /* void contentsMousePressEvent( QMouseEvent * e ); */ | ||
56 | /* void contentsMouseReleaseEvent( QMouseEvent * e ); */ | ||
57 | void keyReleaseEvent( QKeyEvent *e); | 78 | void keyReleaseEvent( QKeyEvent *e); |
58 | void keyPressEvent( QKeyEvent *e); | 79 | |
59 | private: | 80 | private: |
60 | int defaultSkinIndex; | 81 | int defaultSkinIndex; |
61 | QPopupMenu *skinsMenu; | ||
62 | bool audioScan, videoScan; | 82 | bool audioScan, videoScan; |
63 | void readm3u(const QString &); | 83 | void readm3u(const QString &); |
64 | void readPls(const QString &); | 84 | void readPls(const QString &); |
65 | |||
66 | void initializeStates(); | 85 | void initializeStates(); |
67 | void readConfig( Config& cfg ); | 86 | void readConfig( Config& cfg ); |
68 | PlayListWidgetPrivate *d; // Private implementation data | ||
69 | void populateAudioView(); | 87 | void populateAudioView(); |
70 | void populateVideoView(); | 88 | void populateVideoView(); |
89 | |||
71 | private slots: | 90 | private slots: |
72 | void populateSkinsMenu(); | 91 | void populateSkinsMenu(); |
73 | void skinsMenuActivated(int); | 92 | void skinsMenuActivated(int); |
@@ -79,9 +98,7 @@ private slots: | |||
79 | void setDocument( const QString& fileref ); | 98 | void setDocument( const QString& fileref ); |
80 | void addToSelection( const DocLnk& ); // Add a media file to the playlist | 99 | void addToSelection( const DocLnk& ); // Add a media file to the playlist |
81 | void addToSelection( QListViewItem* ); // Add a media file to the playlist | 100 | void addToSelection( QListViewItem* ); // Add a media file to the playlist |
82 | void setActiveWindow(); // need to handle this to show the right view | ||
83 | void setPlaylist( bool ); // Show/Hide the playlist | 101 | void setPlaylist( bool ); // Show/Hide the playlist |
84 | void setView( char ); | ||
85 | void clearList(); | 102 | void clearList(); |
86 | void addAllToList(); | 103 | void addAllToList(); |
87 | void addAllMusicToList(); | 104 | void addAllMusicToList(); |
@@ -89,7 +106,6 @@ private slots: | |||
89 | void saveList(); // Save the playlist | 106 | void saveList(); // Save the playlist |
90 | void loadList( const DocLnk &); // Load a playlist | 107 | void loadList( const DocLnk &); // Load a playlist |
91 | void playIt( QListViewItem *); | 108 | void playIt( QListViewItem *); |
92 | |||
93 | void btnPlay(bool); | 109 | void btnPlay(bool); |
94 | void deletePlaylist(); | 110 | void deletePlaylist(); |
95 | void addSelected(); | 111 | void addSelected(); |
@@ -98,14 +114,7 @@ private slots: | |||
98 | void viewPressed( int, QListViewItem *, const QPoint&, int); | 114 | void viewPressed( int, QListViewItem *, const QPoint&, int); |
99 | void playlistViewPressed( int, QListViewItem *, const QPoint&, int); | 115 | void playlistViewPressed( int, QListViewItem *, const QPoint&, int); |
100 | void playSelected(); | 116 | void playSelected(); |
101 | |||
102 | protected slots: | ||
103 | /* void cancelMenuTimer(); */ | ||
104 | /* void showFileMenu(); */ | ||
105 | |||
106 | |||
107 | }; | 117 | }; |
108 | 118 | ||
109 | |||
110 | #endif // PLAY_LIST_WIDGET_H | 119 | #endif // PLAY_LIST_WIDGET_H |
111 | 120 | ||