00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PLAY_LIST_WIDGET_H
00021 #define PLAY_LIST_WIDGET_H
00022
00023 #include <qmainwindow.h>
00024 #include <qpe/applnk.h>
00025 #include <qtabwidget.h>
00026 #include <qpe/fileselector.h>
00027 #include <qpushbutton.h>
00028
00029 #include <qpe/qcopenvelope_qws.h>
00030
00031 #include "om3u.h"
00032 #include "rssparser.h"
00033
00034
00035
00036 class PlayListWidgetPrivate;
00037 class Config;
00038 class QListViewItem;
00039 class QListView;
00040 class QPoint;
00041 class QAction;
00042 class QLabel;
00043 class QPopupMenu;
00044
00045 class PlayListWidget : public QMainWindow {
00046 Q_OBJECT
00047 public:
00048 PlayListWidget( QWidget* parent=0, const char* name=0, WFlags fl=0 );
00049 ~PlayListWidget();
00050 QTabWidget * tabWidget;
00051 QAction *fullScreenButton, *scaleButton;
00052 DocLnkSet files;
00053 DocLnkSet vFiles;
00054 QListView *audioView, *videoView, *playlistView;
00055 QLabel *libString;
00056 bool fromSetDocument;
00057 bool insanityBool;
00058 QString setDocFileRef, currentPlayList;
00059
00060 const DocLnk *current();
00061 void useSelectedDocument();
00062
00063 FileSelector* playLists;
00064 QPushButton *tbDeletePlaylist;
00065 int fd, selected;
00066 public slots:
00067 bool first();
00068 bool last();
00069 bool next();
00070 bool prev();
00071
00072
00073 protected:
00074 QCopChannel * channel;
00075 QPopupMenu *skinsMenu;
00076
00077
00078 void keyReleaseEvent( QKeyEvent *e);
00079 void keyPressEvent( QKeyEvent *e);
00080 private:
00081 RssParser rssHandler;
00082 int defaultSkinIndex;
00083 bool audioScan, videoScan;
00084 void doBlank();
00085 void doUnblank();
00086 void readm3u(const QString &);
00087 void readPls(const QString &);
00088 bool readpodcast(const QString&);
00089
00090 void initializeStates();
00091 void readConfig( Config& cfg );
00092 void writeConfig( Config& cfg ) const;
00093 PlayListWidgetPrivate *d;
00094 void populateAudioView();
00095 void populateVideoView();
00096 private slots:
00097
00098 void qcopReceive(const QCString&, const QByteArray&);
00099 void populateSkinsMenu();
00100 void skinsMenuActivated(int);
00101 void writem3u();
00102 void writeCurrentM3u();
00103 void scanForAudio();
00104 void scanForVideo();
00105 void openFile();
00106 void setDocument( const QString& fileref );
00107 void setDocumentEx( const QString& fileref );
00108 void addToSelection( const DocLnk& );
00109 void addToSelection( QListViewItem* );
00110 void setActiveWindow();
00111 void setPlaylist( bool );
00112 void setView( char );
00113 void clearList();
00114 void addAllToList();
00115 void addAllMusicToList();
00116 void addAllVideoToList();
00117 void saveList();
00118 void loadList( const DocLnk &);
00119 void playIt( QListViewItem *);
00120
00121 void btnPlay(bool);
00122 void deletePlaylist();
00123 void addSelected();
00124 void removeSelected();
00125 void tabChanged(QWidget*);
00126 void viewPressed( int, QListViewItem *, const QPoint&, int);
00127 void playlistViewPressed( int, QListViewItem *, const QPoint&, int);
00128 void playSelected();
00129 void listDelete();
00130
00131 bool downloadPodcast(const QString &);
00132
00133 protected slots:
00134
00135
00136
00137
00138 };
00139
00140
00141 #endif // PLAY_LIST_WIDGET_H
00142