#include <itunesdb.h>
Inheritance diagram for ITunesDBPlaylist:

Public Member Functions | |
| virtual itunesdb::PlaylistItem * | createNewItem (Q_UINT32 itemid) |
| void | updateSmartPlaylist (bool force=false) |
| void | setSortOrder (Sortorder sortOrder) |
| itunesdb::Track * | getTrackAt (uint position) |
Protected Member Functions | |
| virtual void | readNonStringMHOD (QDataStream &stream, Q_UINT32 type, Q_UINT32 blocklen) |
| virtual void | setDirty (bool dirtyFlag=true) |
| virtual itunesdb::SmartPlaylistRuleSet * | createNewSplRuleSet () |
Friends | |
| class | ITunesDB |
Classes | |
| class | Entry |
ITunesDB::createNewPlaylist( const QString& ) factory method and use the ITunesDB::addPlaylist( ITunesDBPlaylist* ) to add it to the database.
// create a new playlist
ITunesDBPlaylist * recentlyPlayed = itunesdb.createNewPlaylist( "recently played" );
recentlyPlayed->setSortOrder( Playlist::SORTORDER_TIME_PLAYED );
// make it a smart playlist and get the ruleset
SmartPlaylistRuleSet& ruleSet = recentlyPlayed->enableSmartPlaylist();
// add the rule "last played in the last 2 weeks"
ruleSet.addInTheLastRule( FIELD_LASTPLAYED, false, -2, IN_THE_LAST_WEEKS );
// limit to the first 30 songs, sorted by last played date
ruleSet.setLimits( LIMIT_SORT_LASTPLAYED, LIMIT_TYPE_SONGS, 30 );
// match ANY rule (doesn't really matter since we only have one rule)
ruleSet.setMatchAnyFlag( true );
// enable live update (updates the playlist on the go)
ruleSet.setLiveUpdateFlag( true );
// finally add the playlist to the database
itunesdb.addPlaylist( recentlyPlayed );
| PlaylistItem * ITunesDBPlaylist::createNewItem | ( | Q_UINT32 | itemid | ) | [virtual] |
Creates a new instance of the Entry class.
Reimplemented from itunesdb::Playlist.
| void ITunesDBPlaylist::updateSmartPlaylist | ( | bool | force = false |
) |
Updates the content of this smart playlist against the database Nothing happens if this playlist is not a smart playlist.
| void ITunesDBPlaylist::setSortOrder | ( | Sortorder | sortOrder | ) |
Sets the sort order field.
| Track * ITunesDBPlaylist::getTrackAt | ( | uint | position | ) |
Returns the track the playlist entry at the given position is referring to
| void ITunesDBPlaylist::readNonStringMHOD | ( | QDataStream & | stream, | |
| Q_UINT32 | type, | |||
| Q_UINT32 | blocklen | |||
| ) | [protected, virtual] |
reads mhods with type above type 15 (mhods not containing strings)
Reimplemented from itunesdb::Playlist.
1.5.1