summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/playlistwidget.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/playlistwidget.h') (more/less context) (show whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistwidget.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.h b/core/multimedia/opieplayer/playlistwidget.h
index 7718a8c..1be5a15 100644
--- a/core/multimedia/opieplayer/playlistwidget.h
+++ b/core/multimedia/opieplayer/playlistwidget.h
@@ -5,108 +5,111 @@
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 "om3u.h"
29/* #include <qtimer.h> */ 30/* #include <qtimer.h> */
30 31
31 32
32class PlayListWidgetPrivate; 33class PlayListWidgetPrivate;
33class Config; 34class Config;
34class QListViewItem; 35class QListViewItem;
35class QListView; 36class QListView;
36class QPoint; 37class QPoint;
37class QAction; 38class QAction;
38class QLabel; 39class QLabel;
39 40
40class PlayListWidget : public QMainWindow { 41class PlayListWidget : public QMainWindow {
41 Q_OBJECT 42 Q_OBJECT
42public: 43public:
43 PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 ); 44 PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 );
44 ~PlayListWidget(); 45 ~PlayListWidget();
45 QTabWidget * tabWidget; 46 QTabWidget * tabWidget;
46 QAction *fullScreenButton, *scaleButton; 47 QAction *fullScreenButton, *scaleButton;
47 DocLnkSet files; 48 DocLnkSet files;
48 DocLnkSet vFiles; 49 DocLnkSet vFiles;
49 QListView *audioView, *videoView, *playlistView; 50 QListView *audioView, *videoView, *playlistView;
50 QLabel *libString; 51 QLabel *libString;
51 bool fromSetDocument; 52 bool fromSetDocument;
52 bool insanityBool; 53 bool insanityBool;
53 QString setDocFileRef; 54 QString setDocFileRef, currentPlayList;
54 // retrieve the current playlist entry (media file link) 55 // retrieve the current playlist entry (media file link)
55 const DocLnk *current(); 56 const DocLnk *current();
56 void useSelectedDocument(); 57 void useSelectedDocument();
57/* QTimer * menuTimer; */ 58/* QTimer * menuTimer; */
58 FileSelector* playLists; 59 FileSelector* playLists;
59 QPushButton *tbDeletePlaylist; 60 QPushButton *tbDeletePlaylist;
60 int fd, selected; 61 int fd, selected;
61public slots: 62public slots:
62 bool first(); 63 bool first();
63 bool last(); 64 bool last();
64 bool next(); 65 bool next();
65 bool prev(); 66 bool prev();
66/* void setFullScreen(); */ 67/* void setFullScreen(); */
67/* void setScaled(); */ 68/* void setScaled(); */
68protected: 69protected:
69/* void contentsMousePressEvent( QMouseEvent * e ); */ 70/* void contentsMousePressEvent( QMouseEvent * e ); */
70/* void contentsMouseReleaseEvent( QMouseEvent * e ); */ 71/* void contentsMouseReleaseEvent( QMouseEvent * e ); */
71void keyReleaseEvent( QKeyEvent *e); 72void keyReleaseEvent( QKeyEvent *e);
72void keyPressEvent( QKeyEvent *e); 73void keyPressEvent( QKeyEvent *e);
73private: 74private:
74 bool audioScan, videoScan; 75 bool audioScan, videoScan;
75 void doBlank(); 76 void doBlank();
76 void doUnblank(); 77 void doUnblank();
77 void readm3u(const QString &); 78 void readm3u(const QString &);
78 void readPls(const QString &); 79 void readPls(const QString &);
79 80
80 81
81 void initializeStates(); 82 void initializeStates();
82 void readConfig( Config& cfg ); 83 void readConfig( Config& cfg );
83 void writeConfig( Config& cfg ) const; 84 void writeConfig( Config& cfg ) const;
84 PlayListWidgetPrivate *d; // Private implementation data 85 PlayListWidgetPrivate *d; // Private implementation data
85 void populateAudioView(); 86 void populateAudioView();
86 void populateVideoView(); 87 void populateVideoView();
87private slots: 88private slots:
89
88 void writem3u(); 90 void writem3u();
91 void writeCurrentM3u();
89 void scanForAudio(); 92 void scanForAudio();
90 void scanForVideo(); 93 void scanForVideo();
91 void openFile(); 94 void openFile();
92 void setDocument( const QString& fileref ); 95 void setDocument( const QString& fileref );
93 void addToSelection( const DocLnk& ); // Add a media file to the playlist 96 void addToSelection( const DocLnk& ); // Add a media file to the playlist
94 void addToSelection( QListViewItem* ); // Add a media file to the playlist 97 void addToSelection( QListViewItem* ); // Add a media file to the playlist
95 void setActiveWindow(); // need to handle this to show the right view 98 void setActiveWindow(); // need to handle this to show the right view
96 void setPlaylist( bool ); // Show/Hide the playlist 99 void setPlaylist( bool ); // Show/Hide the playlist
97 void setView( char ); 100 void setView( char );
98 void clearList(); 101 void clearList();
99 void addAllToList(); 102 void addAllToList();
100 void addAllMusicToList(); 103 void addAllMusicToList();
101 void addAllVideoToList(); 104 void addAllVideoToList();
102 void saveList(); // Save the playlist 105 void saveList(); // Save the playlist
103 void loadList( const DocLnk &); // Load a playlist 106 void loadList( const DocLnk &); // Load a playlist
104 void playIt( QListViewItem *); 107 void playIt( QListViewItem *);
105 108
106 void btnPlay(bool); 109 void btnPlay(bool);
107 void deletePlaylist(); 110 void deletePlaylist();
108 void addSelected(); 111 void addSelected();
109 void removeSelected(); 112 void removeSelected();
110 void tabChanged(QWidget*); 113 void tabChanged(QWidget*);
111 void viewPressed( int, QListViewItem *, const QPoint&, int); 114 void viewPressed( int, QListViewItem *, const QPoint&, int);
112 void playlistViewPressed( int, QListViewItem *, const QPoint&, int); 115 void playlistViewPressed( int, QListViewItem *, const QPoint&, int);