Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h new file mode 100644 index 0000000..e44096b --- a/dev/null +++ b/noncore/multimedia/opieplayer2/playlistwidget.h | |||
@@ -0,0 +1,107 @@ | |||
1 | |||
2 | #ifndef PLAY_LIST_WIDGET_H | ||
3 | #define PLAY_LIST_WIDGET_H | ||
4 | |||
5 | #include <qmainwindow.h> | ||
6 | #include <qpe/applnk.h> | ||
7 | #include <qtabwidget.h> | ||
8 | #include <qpe/fileselector.h> | ||
9 | #include <qpushbutton.h> | ||
10 | |||
11 | /* #include <qtimer.h> */ | ||
12 | |||
13 | |||
14 | class PlayListWidgetPrivate; | ||
15 | class Config; | ||
16 | class QListViewItem; | ||
17 | class QListView; | ||
18 | class QPoint; | ||
19 | class QAction; | ||
20 | class QLabel; | ||
21 | |||
22 | class PlayListWidget : public QMainWindow { | ||
23 | Q_OBJECT | ||
24 | public: | ||
25 | PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 ); | ||
26 | ~PlayListWidget(); | ||
27 | QTabWidget * tabWidget; | ||
28 | QAction *fullScreenButton, *scaleButton; | ||
29 | DocLnkSet files; | ||
30 | DocLnkSet vFiles; | ||
31 | QListView *audioView, *videoView, *playlistView; | ||
32 | QLabel *libString; | ||
33 | bool fromSetDocument; | ||
34 | bool insanityBool; | ||
35 | QString setDocFileRef; | ||
36 | // retrieve the current playlist entry (media file link) | ||
37 | const DocLnk *current(); | ||
38 | void useSelectedDocument(); | ||
39 | /* QTimer * menuTimer; */ | ||
40 | FileSelector* playLists; | ||
41 | QPushButton *tbDeletePlaylist; | ||
42 | int fd, selected; | ||
43 | public slots: | ||
44 | bool first(); | ||
45 | bool last(); | ||
46 | bool next(); | ||
47 | bool prev(); | ||
48 | /* void setFullScreen(); */ | ||
49 | /* void setScaled(); */ | ||
50 | protected: | ||
51 | /* void contentsMousePressEvent( QMouseEvent * e ); */ | ||
52 | /* void contentsMouseReleaseEvent( QMouseEvent * e ); */ | ||
53 | void keyReleaseEvent( QKeyEvent *e); | ||
54 | void keyPressEvent( QKeyEvent *e); | ||
55 | private: | ||
56 | bool audioScan, videoScan; | ||
57 | void doBlank(); | ||
58 | void doUnblank(); | ||
59 | void readm3u(const QString &); | ||
60 | void readPls(const QString &); | ||
61 | |||
62 | |||
63 | void initializeStates(); | ||
64 | void readConfig( Config& cfg ); | ||
65 | void writeConfig( Config& cfg ) const; | ||
66 | PlayListWidgetPrivate *d; // Private implementation data | ||
67 | void populateAudioView(); | ||
68 | void populateVideoView(); | ||
69 | private slots: | ||
70 | void writem3u(); | ||
71 | void scanForAudio(); | ||
72 | void scanForVideo(); | ||
73 | void openFile(); | ||
74 | void setDocument( const QString& fileref ); | ||
75 | void addToSelection( const DocLnk& ); // Add a media file to the playlist | ||
76 | void addToSelection( QListViewItem* ); // Add a media file to the playlist | ||
77 | void setActiveWindow(); // need to handle this to show the right view | ||
78 | void setPlaylist( bool ); // Show/Hide the playlist | ||
79 | void setView( char ); | ||
80 | void clearList(); | ||
81 | void addAllToList(); | ||
82 | void addAllMusicToList(); | ||
83 | void addAllVideoToList(); | ||
84 | void saveList(); // Save the playlist | ||
85 | void loadList( const DocLnk &); // Load a playlist | ||
86 | void playIt( QListViewItem *); | ||
87 | |||
88 | void btnPlay(bool); | ||
89 | void deletePlaylist(); | ||
90 | void addSelected(); | ||
91 | void removeSelected(); | ||
92 | void tabChanged(QWidget*); | ||
93 | void viewPressed( int, QListViewItem *, const QPoint&, int); | ||
94 | void playlistViewPressed( int, QListViewItem *, const QPoint&, int); | ||
95 | void playSelected(); | ||
96 | void listDelete(); | ||
97 | |||
98 | protected slots: | ||
99 | /* void cancelMenuTimer(); */ | ||
100 | /* void showFileMenu(); */ | ||
101 | |||
102 | |||
103 | }; | ||
104 | |||
105 | |||
106 | #endif // PLAY_LIST_WIDGET_H | ||
107 | |||