| 1 |
/* dvbcut |
| 2 |
Copyright (c) 2005 Sven Over <[email protected]> |
| 3 |
|
| 4 |
This program is free software; you can redistribute it and/or modify |
| 5 |
it under the terms of the GNU General Public License as published by |
| 6 |
the Free Software Foundation; either version 2 of the License, or |
| 7 |
(at your option) any later version. |
| 8 |
|
| 9 |
This program is distributed in the hope that it will be useful, |
| 10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
GNU General Public License for more details. |
| 13 |
|
| 14 |
You should have received a copy of the GNU General Public License |
| 15 |
along with this program; if not, write to the Free Software |
| 16 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 |
*/ |
| 18 |
|
| 19 |
/* $Id$ */ |
| 20 |
|
| 21 |
#ifndef _DVBCUT_EVENTLISTIEM_H_ |
| 22 |
#define _DVBCUT_EVENTLISTIEM_H_ |
| 23 |
|
| 24 |
#include <qlistwidget.h> |
| 25 |
#include "pts.h" |
| 26 |
|
| 27 |
class QLabel; |
| 28 |
class QPixmap; |
| 29 |
|
| 30 |
class EventListItem : public QListWidgetItem |
| 31 |
{ |
| 32 |
public: |
| 33 |
enum eventtype { none, start, stop, chapter, bookmark }; |
| 34 |
|
| 35 |
public: |
| 36 |
EventListItem( QListWidget *listbox, const QPixmap &pixmap, eventtype type, int picture, int picturetype, pts_t _pts ); |
| 37 |
~EventListItem(); |
| 38 |
|
| 39 |
int getpicture() const |
| 40 |
{ |
| 41 |
return pic; |
| 42 |
} |
| 43 |
pts_t getpts() const |
| 44 |
{ |
| 45 |
return pts; |
| 46 |
} |
| 47 |
enum eventtype geteventtype() const |
| 48 |
{ |
| 49 |
return evtype; |
| 50 |
} |
| 51 |
void seteventtype(enum eventtype type) |
| 52 |
{ |
| 53 |
evtype=type; |
| 54 |
label_text->setText(getstring()); |
| 55 |
return; |
| 56 |
} |
| 57 |
|
| 58 |
virtual bool operator<(const QListWidgetItem &other) const; |
| 59 |
|
| 60 |
private: |
| 61 |
enum eventtype evtype; |
| 62 |
int pic; |
| 63 |
int pictype; |
| 64 |
pts_t pts; |
| 65 |
|
| 66 |
QString getstring() const; |
| 67 |
QLabel *label_text; |
| 68 |
|
| 69 |
}; |
| 70 |
|
| 71 |
#endif // ifndef _EVENTLISTIEM_H_ |