Diffstat (limited to 'core/apps/embeddedkonsole/playlistselection.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/playlistselection.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/core/apps/embeddedkonsole/playlistselection.h b/core/apps/embeddedkonsole/playlistselection.h new file mode 100644 index 0000000..c307f14 --- a/dev/null +++ b/core/apps/embeddedkonsole/playlistselection.h | |||
@@ -0,0 +1,74 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | #ifndef PLAY_LIST_SELECTION_H | ||
21 | #define PLAY_LIST_SELECTION_H | ||
22 | |||
23 | |||
24 | #include <qlist.h> | ||
25 | #include <qlistview.h> | ||
26 | #include <qpe/applnk.h> | ||
27 | |||
28 | class PlayListSelectionItem : public QListViewItem { | ||
29 | public: | ||
30 | PlayListSelectionItem( QListView *parent, QString *f ) : QListViewItem( parent ), fl( f ) { | ||
31 | setText(0, *f ); | ||
32 | } | ||
33 | |||
34 | ~PlayListSelectionItem() { | ||
35 | }; | ||
36 | |||
37 | const QString *file() const { return fl; } | ||
38 | |||
39 | private: | ||
40 | const QString *fl; | ||
41 | }; | ||
42 | |||
43 | class PlayListSelection : public QListView { | ||
44 | Q_OBJECT | ||
45 | public: | ||
46 | PlayListSelection( QWidget *parent, const char *name=0 ); | ||
47 | ~PlayListSelection(); | ||
48 | |||
49 | const QString *current(); // retrieve the current playlist entry (media file link) | ||
50 | |||
51 | public slots: | ||
52 | void addToSelection( QListViewItem * ); // Add a media file to the playlist | ||
53 | void addStringToSelection ( const QString &); | ||
54 | void removeSelected(); // Remove a media file from the playlist | ||
55 | void moveSelectedUp(); // Move the media file up the playlist so it is played earlier | ||
56 | void moveSelectedDown(); // Move the media file down the playlist so it is played later | ||
57 | bool prev(); | ||
58 | bool next(); | ||
59 | bool first(); | ||
60 | bool last(); | ||
61 | |||
62 | protected: | ||
63 | virtual void contentsMouseMoveEvent(QMouseEvent *); | ||
64 | |||
65 | |||
66 | private: | ||
67 | QStringList selectedList; | ||
68 | QString *cmd; | ||
69 | }; | ||
70 | |||
71 | |||
72 | #endif // PLAY_LIST_SELECTION_H | ||
73 | |||
74 | |||