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

playlistselection.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_SELECTION_H
00021 #define PLAY_LIST_SELECTION_H
00022 
00023 
00024 #include <qlist.h>
00025 #include <qlistview.h>
00026 #include <qpe/applnk.h>
00027 
00028 class PlayListSelectionItem : public QListViewItem {
00029 public:
00030     PlayListSelectionItem( QListView *parent, QString *f ) : QListViewItem( parent ), fl( f ) {
00031   setText(0, *f );
00032     }
00033 
00034     ~PlayListSelectionItem() {
00035     };
00036 
00037     const QString *file() const { return fl; }
00038 
00039 private:
00040     const QString *fl;
00041 };
00042 
00043 class PlayListSelection : public QListView {
00044     Q_OBJECT
00045 public:
00046     PlayListSelection( QWidget *parent, const char *name=0 );
00047     ~PlayListSelection();
00048 
00049     const QString *current(); // retrieve the current playlist entry (media file link)
00050 
00051 public slots:
00052     void addToSelection( QListViewItem * ); // Add a media file to the playlist
00053     void addStringToSelection ( const QString &);
00054     void removeSelected();   // Remove a media file from the playlist
00055     void moveSelectedUp();   // Move the media file up the playlist so it is played earlier
00056     void moveSelectedDown(); // Move the media file down the playlist so it is played later
00057     bool prev();
00058     bool next();
00059     bool first();
00060     bool last();
00061 
00062 protected:
00063     virtual void contentsMouseMoveEvent(QMouseEvent *);
00064 
00065 
00066 private:
00067     QStringList   selectedList;
00068     QString    *cmd;
00069 };
00070 
00071 
00072 #endif // PLAY_LIST_SELECTION_H
00073 
00074 

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