Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QMediaPlaylist class provides the basics for playlist handling of media content. More...
#include <QMediaPlaylist>
Inherits QAbstractListModel.
The QMediaPlaylist class provides the basics for playlist handling of media content.
The QMediaPlaylist class is useful for efficient handling and displaying media content. QMediaPlaylist class is implicitly shared, so can be passed around as arguments with minimal cost. Unless a QMediaPlaylist is explicitly copied via the copy() function, all modifications to a playlist object will be reflected in all other shared copies.
QMediaPlaylist is also derived from QAbstractListModel, and as such can be used by the model/view framework, or as the data source for a QMediaList object.
mediaPlaylist = new QMediaPlayList(); todo();
Constant | Value | Description |
---|---|---|
QMediaPlaylist::Title | Qt::DisplayRole | Title of media |
QMediaPlaylist::Url | Qt::UserRole | Filename, http address |
QMediaPlaylist::Artist | ? | Artist of media |
QMediaPlaylist::Album | ? | Album of media |
QMediaPlaylist::Genre | ? | Genre of media |
QMediaPlaylist::AlbumCover | ? | Cover image of media |
Constant | Value | Description |
---|---|---|
QMediaPlaylist::Frequent | 0 | Play this track a greater frequency when compared to tracks of other ratings. |
QMediaPlaylist::Infrequent | 1 | Play this track a lower frequency when compared to tracks of other ratings. |
QMediaPlaylist::Never | 2 | Don't play this track again. |
QMediaPlaylist::Unrated | 3 | Play this track a moderate frequency when compared to tracks of other ratings. This is the default probability rating for unrated tracks. |
Constructs an empty QMediaPlaylist object.
Constructs a new QMediaPlaylist object. If filename is a url, or an unknown file format, tries to create a playlist, one entry per line from the file. If the file extension has been previously registered via registerTypeHandler(), then loading will be handed off to the registered file type loader.
See also registerTypeHandler().
Constructs a shared copy of playlist.
Constructs a new QMediaPlaylist object, one entry per line from files.
Constructs a new QMediaPlaylist object, using a QContentSet with passed filter to initialise.
Destroys the playlist.
Removes all items from the playlist.
Returns the QContent object for the media located at index.
Creates a deep copy of playlist other.
Appends the playlist onto the end of the current playlist. If the current playlist is empty, falls through to playNow().
Returns the index of the first media item in the playlist.
Returns true if shuffle has been set on this playlist.
Returns the index of the next media item in the playlist.
Sets the playing index to the first media in the playlist.
Sets the playing index to the next media in the playlist.
Replaces the current playlist with playlist, and calls playFirst().
Sets the playing index to the previous media in the playlist.
Returns the index of the currently playing track.
See also setPlaying().
This signal is emitted whenever the current playing index is changed.
See also setPlaying().
Returns the index of the previous media item in the playlist.
Returns the shuffle mode probability setting of the media located at index.
See also setProbability() and setShuffle().
Registers a playlist load/save handler for the given file extension.
Removes the item at index.
Resets the shuffle mode probabilities of all media items in the playlist to QMediaPlaylist::Unrated.
See also setProbability().
Saves the playlist into filename. If a handler is registered for the file extension of the filename, then the handler will be called to save the file, otherwise it will return false and not save the file.
Sets the currently playing track to index.
See also playingChanged().
Sets the shuffle probability for the media located at index.
See also probability(), setShuffle(), and setShuffleValues().
Turns on or off shuffle functionality on this playlist. Shuffle is a special weighted play queue, that dynamically resizes to keep shuffleTotalCount() items visible, with shuffleHistoryCount() number of songs visible as "history" when shuffle is set to true. Using probabilities set via setProbability(), tracks are added as needed to then end of the queue as the play location is moved, and the history is shrunk to maintain maximum of shuffleHistoryCount() number of recently played entries.
See also isShuffle(), setShuffleValues(), and setProbability().
Sets historyCount number of recently played entries, and totalCount total number of entries in the list when shuffle mode is turned on.
See also setShuffle() and setProbability().
Returns the shuffle mode history value.
See also setShuffleValues() and setShuffle().
Returns the shuffle mode history value.
See also setShuffleValues() and setShuffle().
Returns a suggested filename for saving the playlist to.
See also save().
Unregisters a playlist load/save handler for the given file extension.
If other is a shared copy of this playlist, return false, otherwise, compare internal values and if they match up, return false.
Sets this playlist to be a shallow copy of other. Any modifications to the other playlist object will be reflected by this object, and vice-versa.
If other is a shared copy of this playlist, return true, otherwise, compare internal values and if they match up, return true.
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |