-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.h b/core/multimedia/opieplayer/playlistwidget.h index c07d4f8..778e3ee 100644 --- a/core/multimedia/opieplayer/playlistwidget.h +++ b/core/multimedia/opieplayer/playlistwidget.h | |||
@@ -1,121 +1,122 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef PLAY_LIST_WIDGET_H | 20 | #ifndef PLAY_LIST_WIDGET_H |
21 | #define PLAY_LIST_WIDGET_H | 21 | #define PLAY_LIST_WIDGET_H |
22 | 22 | ||
23 | #include <qmainwindow.h> | 23 | #include <qmainwindow.h> |
24 | #include <qpe/applnk.h> | 24 | #include <qpe/applnk.h> |
25 | #include <qtabwidget.h> | 25 | #include <qtabwidget.h> |
26 | #include <qpe/fileselector.h> | 26 | #include <qpe/fileselector.h> |
27 | #include <qpushbutton.h> | 27 | #include <qpushbutton.h> |
28 | 28 | ||
29 | /* #include <qtimer.h> */ | 29 | /* #include <qtimer.h> */ |
30 | 30 | ||
31 | 31 | ||
32 | class PlayListWidgetPrivate; | 32 | class PlayListWidgetPrivate; |
33 | class Config; | 33 | class Config; |
34 | class QListViewItem; | 34 | class QListViewItem; |
35 | class QListView; | 35 | class QListView; |
36 | class QPoint; | 36 | class QPoint; |
37 | class QAction; | 37 | class QAction; |
38 | class QLabel; | 38 | class QLabel; |
39 | 39 | ||
40 | class PlayListWidget : public QMainWindow { | 40 | class PlayListWidget : public QMainWindow { |
41 | Q_OBJECT | 41 | Q_OBJECT |
42 | public: | 42 | public: |
43 | PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 ); | 43 | PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 ); |
44 | ~PlayListWidget(); | 44 | ~PlayListWidget(); |
45 | QTabWidget * tabWidget; | 45 | QTabWidget * tabWidget; |
46 | QAction *fullScreenButton, *scaleButton; | 46 | QAction *fullScreenButton, *scaleButton; |
47 | DocLnkSet files; | 47 | DocLnkSet files; |
48 | DocLnkSet vFiles; | 48 | DocLnkSet vFiles; |
49 | QListView *audioView, *videoView, *playlistView; | 49 | QListView *audioView, *videoView, *playlistView; |
50 | QLabel *libString; | 50 | QLabel *libString; |
51 | bool fromSetDocument; | 51 | bool fromSetDocument; |
52 | bool insanityBool; | 52 | bool insanityBool; |
53 | QString setDocFileRef; | 53 | QString setDocFileRef; |
54 | // retrieve the current playlist entry (media file link) | 54 | // retrieve the current playlist entry (media file link) |
55 | const DocLnk *current(); | 55 | const DocLnk *current(); |
56 | void useSelectedDocument(); | 56 | void useSelectedDocument(); |
57 | /* QTimer * menuTimer; */ | 57 | /* QTimer * menuTimer; */ |
58 | FileSelector* playLists; | 58 | FileSelector* playLists; |
59 | QPushButton *tbDeletePlaylist; | 59 | QPushButton *tbDeletePlaylist; |
60 | int fd; | 60 | int fd; |
61 | public slots: | 61 | public slots: |
62 | bool first(); | 62 | bool first(); |
63 | bool last(); | 63 | bool last(); |
64 | bool next(); | 64 | bool next(); |
65 | bool prev(); | 65 | bool prev(); |
66 | /* void setFullScreen(); */ | 66 | /* void setFullScreen(); */ |
67 | /* void setScaled(); */ | 67 | /* void setScaled(); */ |
68 | protected: | 68 | protected: |
69 | /* void contentsMousePressEvent( QMouseEvent * e ); */ | 69 | /* void contentsMousePressEvent( QMouseEvent * e ); */ |
70 | /* void contentsMouseReleaseEvent( QMouseEvent * e ); */ | 70 | /* void contentsMouseReleaseEvent( QMouseEvent * e ); */ |
71 | void keyReleaseEvent( QKeyEvent *e); | 71 | void keyReleaseEvent( QKeyEvent *e); |
72 | void keyPressEvent( QKeyEvent *e); | ||
72 | private: | 73 | private: |
73 | void doBlank(); | 74 | void doBlank(); |
74 | void doUnblank(); | 75 | void doUnblank(); |
75 | void readm3u(const QString &); | 76 | void readm3u(const QString &); |
76 | void writem3u(const QString &); | 77 | void writem3u(const QString &); |
77 | void readPls(const QString &); | 78 | void readPls(const QString &); |
78 | 79 | ||
79 | 80 | ||
80 | void initializeStates(); | 81 | void initializeStates(); |
81 | void readConfig( Config& cfg ); | 82 | void readConfig( Config& cfg ); |
82 | void writeConfig( Config& cfg ) const; | 83 | void writeConfig( Config& cfg ) const; |
83 | PlayListWidgetPrivate *d; // Private implementation data | 84 | PlayListWidgetPrivate *d; // Private implementation data |
84 | void populateAudioView(); | 85 | void populateAudioView(); |
85 | void populateVideoView(); | 86 | void populateVideoView(); |
86 | private slots: | 87 | private slots: |
87 | void openFile(); | 88 | void openFile(); |
88 | void setDocument( const QString& fileref ); | 89 | void setDocument( const QString& fileref ); |
89 | void addToSelection( const DocLnk& ); // Add a media file to the playlist | 90 | void addToSelection( const DocLnk& ); // Add a media file to the playlist |
90 | void addToSelection( QListViewItem* ); // Add a media file to the playlist | 91 | void addToSelection( QListViewItem* ); // Add a media file to the playlist |
91 | void setActiveWindow(); // need to handle this to show the right view | 92 | void setActiveWindow(); // need to handle this to show the right view |
92 | void setPlaylist( bool ); // Show/Hide the playlist | 93 | void setPlaylist( bool ); // Show/Hide the playlist |
93 | void setView( char ); | 94 | void setView( char ); |
94 | void clearList(); | 95 | void clearList(); |
95 | void addAllToList(); | 96 | void addAllToList(); |
96 | void addAllMusicToList(); | 97 | void addAllMusicToList(); |
97 | void addAllVideoToList(); | 98 | void addAllVideoToList(); |
98 | void saveList(); // Save the playlist | 99 | void saveList(); // Save the playlist |
99 | void loadList( const DocLnk &); // Load a playlist | 100 | void loadList( const DocLnk &); // Load a playlist |
100 | void playIt( QListViewItem *); | 101 | void playIt( QListViewItem *); |
101 | 102 | ||
102 | void btnPlay(bool); | 103 | void btnPlay(bool); |
103 | void deletePlaylist(); | 104 | void deletePlaylist(); |
104 | void addSelected(); | 105 | void addSelected(); |
105 | void removeSelected(); | 106 | void removeSelected(); |
106 | void tabChanged(QWidget*); | 107 | void tabChanged(QWidget*); |
107 | void viewPressed( int, QListViewItem *, const QPoint&, int); | 108 | void viewPressed( int, QListViewItem *, const QPoint&, int); |
108 | void playlistViewPressed( int, QListViewItem *, const QPoint&, int); | 109 | void playlistViewPressed( int, QListViewItem *, const QPoint&, int); |
109 | void playSelected(); | 110 | void playSelected(); |
110 | void listDelete(); | 111 | void listDelete(); |
111 | 112 | ||
112 | protected slots: | 113 | protected slots: |
113 | /* void cancelMenuTimer(); */ | 114 | /* void cancelMenuTimer(); */ |
114 | /* void showFileMenu(); */ | 115 | /* void showFileMenu(); */ |
115 | 116 | ||
116 | 117 | ||
117 | }; | 118 | }; |
118 | 119 | ||
119 | 120 | ||
120 | #endif // PLAY_LIST_WIDGET_H | 121 | #endif // PLAY_LIST_WIDGET_H |
121 | 122 | ||