#include <playlist.h>
Inheritance diagram for itunesdb::Playlist:

Public Types | |
| enum | Sortorder { SORTORDER_MANUAL = 1, SORTORDER_TITLE = 3, SORTORDER_ALBUM = 4, SORTORDER_ARTIST = 5, SORTORDER_BITRATE = 6, SORTORDER_GENRE = 7, SORTORDER_FILETYPE = 8, SORTORDER_TIME_MODIFIED = 9, SORTORDER_TRACK_NR = 10, SORTORDER_SIZE = 11, SORTORDER_TIME = 12, SORTORDER_YEAR = 13, SORTORDER_SAMPLERATE = 14, SORTORDER_COMMENT = 15, SORTORDER_TIME_ADDED = 16, SORTORDER_EQUALIZER = 17, SORTORDER_COMPOSER = 18, SORTORDER_PLAYCOUNT = 20, SORTORDER_TIME_PLAYED = 21, SORTORDER_CD_NR = 22, SORTORDER_RATING = 23, SORTORDER_RELEASE_DATE = 24, SORTORDER_BPM = 25, SORTORDER_GROUPING = 26, SORTORDER_CATEGORY = 27, SORTORDER_DESCRIPTION = 28 } |
Public Member Functions | |
| const QString & | getTitle () const |
| void | setTitle (const QString &newtitle) |
| Sortorder | getSortOrder () const |
| bool | contains (Q_UINT32 trackID) const |
| int | addPlaylistItem (Q_UINT32 trackid, int position=-1) |
| Q_UINT32 | removeTrackAt (Iterator &pos) |
| Q_UINT32 | removeTrackAt (uint pos) |
| bool | removeAll (Q_UINT32 trackid) |
| virtual Q_UINT32 | getTrackIDAt (uint pos) |
| virtual Iterator | getTrackIDs () |
| virtual ConstIterator | getTrackIDs () const |
| virtual uint | getNumTracks () const |
| Q_UINT64 | getID () const |
| void | setID (Q_UINT64 id) |
| void | sort () |
| void | clear () |
| virtual bool | isHidden () const |
| SmartPlaylistRuleSet & | enableSmartPlaylist () |
| bool | isSmartPlaylist () const |
| void | discardSmartPlaylistData () |
| SmartPlaylistRuleSet * | getSmartPlaylistRules () const |
| bool | isPodcastList () const |
| template<class JavaLikeTrackIterator> | |
| void | addAll (JavaLikeTrackIterator trackIter) |
| template<class CPPStyleTrackIterator> | |
| void | addAll (CPPStyleTrackIterator trackIter, CPPStyleTrackIterator end) |
Public Attributes | |
| enum itunesdb::Playlist::Sortorder | ItdbPlaylistSortOrder |
Protected Member Functions | |
| Playlist (const Playlist &) | |
| virtual PlaylistItem * | createNewItem (Q_UINT32 trackid) |
| virtual QDataStream & | readFromStream (QDataStream &instream, bool *ok=NULL) |
| virtual QDataStream & | writeToStream (QDataStream &outstream, bool isMainlist) |
| virtual void | doneAddingData () |
| virtual int | addPlaylistItem (PlaylistItem *item) |
| virtual SmartPlaylistRuleSet * | createNewSplRuleSet () |
| void | fillSplHeaderBuffer (QByteArray &buffer) const |
| void | fillSplRulesBuffer (QByteArray &buffer) const |
| virtual void | readNonStringMHOD (QDataStream &stream, Q_UINT32 type, Q_UINT32 blocklen) |
| virtual uint | writeNonStringMHODs (QDataStream &outstream) const |
| void | writeData (QByteArray &data, bool isMainlist) const |
| void | writeTitle (QDataStream &stream) const |
| void | writeLongPlaylist (QDataStream &stream) const |
| void | writeTracks (QDataStream &stream) const |
Protected Attributes | |
| TrackList_T | m_tracklist |
| Q_UINT32 | hidden |
| Q_UINT32 | timeStamp |
| Q_UINT64 | m_id |
| Q_UINT32 | unk3 |
| Q_UINT16 | mIsPodcast |
| Sortorder | m_order |
| SmartPlaylistRuleSet * | mSplRuleSet |
Friends | |
| class | ItunesDBParser |
| class | ItunesDBWriter |
Classes | |
| class | ConstIterator |
| class | Iterator |
| class | TrackList_T |
ITunesDB related implementation ITunesDBPlaylist addPlaylistItem( Q_UINT32, int ) method can be used to add tracks to the playlist, removeAll( Q_UINT32 ) and removeTrackAt( uint ) will remove them. For editing the rules of smart playlists use the getSmartPlaylistRules() method to retrieve the SmartPlaylistRuleSet and use its methods for manipulating the rules. To create a new smart playlist create a new playlist and use enableSmartPlaylist() method to enable smart playlist behaviour. This method also returns the still empty SmartPlaylistRuleSet ready for adding new rules.
|
||||||||||||||||
|
Adds all tracks delivered by the given Iterator. |
|
||||||||||
|
Adds all tracks delivered by the given Iterator. |
|
|
Adds a new playlist item to the internal list. |
|
||||||||||||
|
Adds a new PlaylistItem at the specified position to the list and sets the dirty flag to true. The position field only works if the playlists sort order is set to "manual" which is the only sort order implemented by this class, but may be ignored if you use the
|
|
|
Empties the playlist. After a call to this method the |
|
|
Returns true if the playlist contains the specified trackid. |
|
|
Creates a new PlaylistItem. Override this method if you need your own PlaylistItem implementation. Reimplemented in ITunesDBPlaylist. |
|
|
Discards smart playlist data thus making it a normal playlist. The items in this playlist will be kept. |
|
|
override from ListItem::doneAddingData() Reimplemented from itunesdb::ListItem. |
|
|
Enables Smart Playlist Behaviour by creating a SmartPlaylistRuleSet. |
|
|
Returns the unique DB id for this playlist
|
|
|
Returns the number of tracks in this playlist
|
|
|
Returns the SmartPlaylistRuleSet making up this smart playlist, or NULL IF this playlist isn't a SmartPlaylist. All smart playlist behaviour can be / is controlled by the returned object. |
|
|
Returns the sort order field of the playlist
|
|
|
Returns the title of the playlist
|
|
|
Returns the trackID at the given position or PLAYLISTITEM_INVALID (as defined in playlistitem.h) if the given position is either negative or above the last element in the list. |
|
|
The const version of the above method. Returns an iterator over all tracks in this playlist. |
|
|
Returns an iterator over all tracks in this playlist. The iterator works like a java iterator - you can check if there are any elements left with the |
|
|
Returns true if this playlist is hidden. |
|
|
Returns true if this playlist is a podcast list |
|
|
Returns true if this playlist is a smart playlist. |
|
|
Removes all occurences of the track with the given ID. Returns true if an element with the given trackid existed and was removed, false otherwise. |
|
|
Removes the track at the given position and returns the former trackid at that position. If the given position is out of range PLAYLISTITEM_INVALID (as defined in playlistitem.h) is returned. |
|
|
Removes the track at the position the given Iterator points to and returns the former trackid at that position. If the Iterator doesn't point to an element in this list PLAYLISTITEM_INVALID (as defined in playlistitem.h) is returned. After the operation the given Iterator will point to the next element. |
|
|
Sets the unique DB id for this playlist
|
|
|
Sets the title of the playlist
|
|
|
Sorts the playlistItems by position. |
|
|
writes the stuff uiTunes would write as the second mhod for playlists. We don't use it - it's just here for completeness |
|
|
Writes the track list |
1.4.6