Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

playlistwidget.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2000 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
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 /* #include <qtimer.h> */
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     // retrieve the current playlist entry (media file link)
00060     const DocLnk *current();
00061     void useSelectedDocument();
00062 /*     QTimer    * menuTimer; */
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 /*     void setFullScreen(); */
00072 /*     void setScaled(); */
00073 protected:
00074    QCopChannel * channel;
00075         QPopupMenu *skinsMenu;
00076 /*     void contentsMousePressEvent( QMouseEvent * e ); */
00077 /*     void contentsMouseReleaseEvent( QMouseEvent * e ); */
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; // Private implementation data
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& ); // Add a media file to the playlist
00109     void addToSelection( QListViewItem* ); // Add a media file to the playlist
00110     void setActiveWindow(); // need to handle this to show the right view
00111     void setPlaylist( bool ); // Show/Hide the playlist
00112     void setView( char );
00113     void clearList(); 
00114     void addAllToList(); 
00115     void addAllMusicToList(); 
00116     void addAllVideoToList(); 
00117     void saveList();  // Save the playlist
00118     void loadList( const DocLnk &);  // Load a playlist
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 /*     void cancelMenuTimer(); */
00135 /*     void showFileMenu(); */
00136 
00137 
00138 };
00139 
00140 
00141 #endif // PLAY_LIST_WIDGET_H
00142 

Generated on Sat Nov 5 16:15:43 2005 for OPIE by  doxygen 1.4.2