![]() |
Miam-Player
0.8.0
A nice music player
|
The Playlist class is used to display tracks in the MainWindow class. More...
#include <playlist.h>
Public Types | |
enum | Columns { COL_TRACK_NUMBER = 0, COL_TITLE = 1, COL_ALBUM = 2, COL_LENGTH = 3, COL_ARTIST = 4, COL_RATINGS = 5, COL_YEAR = 6, COL_ICON = 7, COL_TRACK_DAO = 8 } |
Public Slots | |
void | moveTracksDown () |
void | moveTracksUp () |
void | removeSelectedTracks () |
Signals | |
void | aboutToSendToTagEditor (const QList< QUrl > &tracks) |
void | contentHasChanged () |
void | selectionHasChanged (bool isEmpty) |
Public Member Functions | |
Playlist (MediaPlayer *mediaPlayer, QWidget *parent=nullptr) | |
virtual | ~Playlist () |
MediaPlayer * | mediaPlayer () const |
MediaPlaylist * | mediaPlaylist () const |
uint | generateNewHash () const |
uint | id () const |
bool | isModified () const |
void | insertMedias (int rowIndex, const QList< QMediaContent > &medias) |
void | insertMedias (int rowIndex, const QList< TrackDAO > &tracks) |
virtual QSize | minimumSizeHint () const override |
void | forceDrop (QDropEvent *e) |
uint | hash () const |
void | setHash (uint hash) |
void | setId (uint id) |
PlaylistModel * | model () const |
Protected Member Functions | |
virtual void | contextMenuEvent (QContextMenuEvent *event) override |
virtual void | dragEnterEvent (QDragEnterEvent *event) override |
virtual void | dragLeaveEvent (QDragLeaveEvent *event) override |
virtual void | dragMoveEvent (QDragMoveEvent *event) override |
virtual void | startDrag (Qt::DropActions) override |
virtual void | dropEvent (QDropEvent *event) override |
virtual void | keyPressEvent (QKeyEvent *event) override |
virtual void | mouseMoveEvent (QMouseEvent *event) override |
virtual void | mousePressEvent (QMouseEvent *event) override |
virtual void | paintEvent (QPaintEvent *e) override |
virtual int | sizeHintForColumn (int column) const override |
virtual void | showEvent (QShowEvent *event) override |
virtual void | wheelEvent (QWheelEvent *event) override |
The Playlist class is used to display tracks in the MainWindow class.
The QTableView uses a small custom model to manage tracks: the PlaylistModel class. Tracks can be moved from one playlist to another, or in the same playlist. You can also drop external files or folder into this table to create a new playlist.
enum Playlist::Columns |
|
explicit |
XXX not working?
TODO: sub menu tag -> send playlist to editor, edit in-line
TODO
|
virtual |
|
signal |
|
signal |
|
overrideprotectedvirtual |
Redefined to display a small context menu in the view.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
Redefined to be able to move tracks between playlists or internally.
|
inline |
uint Playlist::generateNewHash | ( | ) | const |
|
inline |
|
inline |
void Playlist::insertMedias | ( | int | rowIndex, |
const QList< QMediaContent > & | medias | ||
) |
void Playlist::insertMedias | ( | int | rowIndex, |
const QList< TrackDAO > & | tracks | ||
) |
Insert remote medias to playlist.
bool Playlist::isModified | ( | ) | const |
|
overrideprotectedvirtual |
Redefined to handle escape key when editing ratings.
|
inline |
|
inline |
|
overridevirtual |
|
inline |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
Redefined to be able to create an editor to modify star rating.
Redifined to be able to create an editor to modify star rating.
|
slot |
Move selected tracks downward.
TODO
|
slot |
Move selected tracks upward.
|
overrideprotectedvirtual |
Redefined to display a thin line to help user for dropping tracks.
|
slot |
Remove selected tracks from the playlist.
|
signal |
|
inline |
|
inline |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |