Diffstat (limited to 'noncore/multimedia/opieplayer3/playlist.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer3/playlist.h | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer3/playlist.h b/noncore/multimedia/opieplayer3/playlist.h new file mode 100644 index 0000000..ad4c472 --- a/dev/null +++ b/noncore/multimedia/opieplayer3/playlist.h | |||
@@ -0,0 +1,100 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> | ||
5 | Copyright (c) 2002 L. Potter <ljp@llornkcor.com> | ||
6 | Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> | ||
7 | =. | ||
8 | .=l. | ||
9 | .>+-= | ||
10 | _;:, .> :=|. This program is free software; you can | ||
11 | .> <`_, > . <= redistribute it and/or modify it under | ||
12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
13 | .="- .-=="i, .._ License as published by the Free Software | ||
14 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
15 | ._= =} : or (at your option) any later version. | ||
16 | .%`+i> _;_. | ||
17 | .i_,=:_. -<s. This program is distributed in the hope that | ||
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
19 | : .. .:, . . . without even the implied warranty of | ||
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
22 | ..}^=.= = ; Library General Public License for more | ||
23 | ++= -. .` .: details. | ||
24 | : = ...= . :.=- | ||
25 | -. .:....=;==+<; You should have received a copy of the GNU | ||
26 | -_. . . )=. = Library General Public License along with | ||
27 | -- :-=` this library; see the file COPYING.LIB. | ||
28 | If not, write to the Free Software Foundation, | ||
29 | Inc., 59 Temple Place - Suite 330, | ||
30 | Boston, MA 02111-1307, USA. | ||
31 | |||
32 | */ | ||
33 | #ifndef __playlist_h | ||
34 | #define __playlist_h | ||
35 | |||
36 | #include <qpe/applnk.h> | ||
37 | |||
38 | #include <qlistview.h> | ||
39 | #include <qstringlist.h> | ||
40 | |||
41 | namespace XINE { | ||
42 | class Lib; | ||
43 | } | ||
44 | |||
45 | class PlaylistView; | ||
46 | |||
47 | class PlaylistItem:public QListViewItem | ||
48 | { | ||
49 | public: | ||
50 | PlaylistItem(const DocLnk&aLink,PlaylistView*parent); | ||
51 | PlaylistItem(const DocLnk&aLink,PlaylistView*parent,PlaylistItem*after); | ||
52 | virtual ~PlaylistItem(); | ||
53 | |||
54 | const DocLnk&Lnk()const{return m_Content;} | ||
55 | void Video(bool y); | ||
56 | bool isVideo()const{return m_video;} | ||
57 | |||
58 | protected: | ||
59 | DocLnk m_Content; | ||
60 | bool m_video:1; | ||
61 | }; | ||
62 | |||
63 | typedef QValueList<PlaylistItem*> t_itemlist; | ||
64 | |||
65 | class PlaylistView:public QListView | ||
66 | { | ||
67 | Q_OBJECT | ||
68 | public: | ||
69 | PlaylistView( QWidget *parent = 0, const char *name = 0); | ||
70 | virtual ~PlaylistView(); | ||
71 | XINE::Lib*getXine(); | ||
72 | PlaylistItem* currentItem()const; | ||
73 | void setCurrentItem(PlaylistItem*); | ||
74 | PlaylistItem* nextItem(PlaylistItem*parent)const; | ||
75 | PlaylistItem* prevItem(PlaylistItem*parent)const; | ||
76 | |||
77 | void removeFromList(PlaylistItem*Item); | ||
78 | |||
79 | enum itemcolumns{ | ||
80 | COL_ICON=0, | ||
81 | COL_FILE=1, | ||
82 | COL_TIME=2, | ||
83 | COL_ARTIST=3, | ||
84 | COL_ALBUM=4, | ||
85 | COL_TITLE=5, | ||
86 | COL_TYPE=6, | ||
87 | COL_SIZE=7 | ||
88 | }; | ||
89 | public slots: | ||
90 | virtual void slotAddFile(const DocLnk&); | ||
91 | |||
92 | protected: | ||
93 | void checkLib(); | ||
94 | QStringList columnLabels; | ||
95 | XINE::Lib*m_Infolib; | ||
96 | PlaylistItem*m_lastItem; | ||
97 | t_itemlist m_items; | ||
98 | }; | ||
99 | |||
100 | #endif | ||