1 // (c) 2005 Martin Ehmke <ehmke@gmx.de>
2 // License: GNU General Public License V2
7 #include "engineobserver.h"
16 CueFileItem (const QString
& title
, const QString
& artist
, const QString
& album
, const int trackNumber
, const long index
)
20 , m_trackNumber( trackNumber
)
28 void setLength(const long length
) { m_length
= length
; }
30 const QString
getTitle () const { return m_title
; }
31 const QString
getArtist () const { return m_artist
; }
32 const QString
getAlbum () const { return m_album
; }
33 const int getTrackNumber () const { return m_trackNumber
; }
34 const long getIndex () const { return m_index
; }
35 const long getLength () const { return m_length
; }
47 class CueFile
: public QObject
, public QMap
<long, CueFileItem
>, public EngineObserver
52 static CueFile
*instance();
54 void setCueFileName( QString name
) { m_cueFileName
= name
; }
55 bool load(int mediaLength
);
58 virtual void engineTrackPositionChanged( long /*position*/ , bool /*userSeek*/ );
61 /** Transmits new metadata bundle */
62 void metaData( const MetaBundle
& );
63 /** Transmits new length information associated with current cue */
64 void newCuePoint( long currentPos
, long startPos
, long endPos
);
67 CueFile() : EngineObserver(), m_lastSeekPos(-1) { }
68 CueFile(EngineSubject
*s
) : EngineObserver(s
), m_lastSeekPos(-1) { }
72 QString m_cueFileName
;
73 int m_lastSeekPos
; // in seconds