Miam-Player  0.8.0
A nice music player
TabPlaylist Class Reference

The TabPlaylist class is used to manage mutiple playlists in the MainWindow class. More...

#include <tabplaylist.h>

Inheritance diagram for TabPlaylist:

Public Slots

PlaylistaddPlaylist ()
 
void addExtFolders (const QList< QDir > &folders)
 
int closePlaylist (int index)
 
void deletePlaylist (uint playlistId)
 
void insertItemsToPlaylist (int rowIndex, const QStringList &tracks)
 
void moveTracksDown ()
 
void moveTracksUp ()
 
void removeCurrentPlaylist ()
 
void renamePlaylist (Playlist *p)
 
void renameTab (const PlaylistDAO &dao)
 
void removeTabFromCloseButton (int index)
 
void savePlaylist (Playlist *p, bool overwrite)
 

Signals

void aboutToChangeMenuLabels (int)
 
void aboutToSavePlaylist (Playlist *p, int index, bool overwrite=false)
 
void aboutToSendToTagEditor (const QList< QUrl > &tracks)
 
void selectionChanged (bool isEmpty)
 
void updatePlaybackModeButton ()
 

Public Member Functions

 TabPlaylist (QWidget *parent=nullptr)
 
PlaylistcurrentPlayList () const
 
QIcon defaultIcon (QIcon::Mode mode)
 
virtual bool eventFilter (QObject *obj, QEvent *event) override
 
void init (MediaPlayer *mediaPlayer)
 
void loadPlaylist (uint playlistId)
 
Playlistplaylist (int index)
 
QList< Playlist * > playlists ()
 
PlaylistManagerplaylistManager () const
 
void setMainWindow (MainWindow *mainWindow)
 

Protected Member Functions

virtual void changeEvent (QEvent *event) override
 
virtual void contextMenuEvent (QContextMenuEvent *event) override
 

Detailed Description

The TabPlaylist class is used to manage mutiple playlists in the MainWindow class.

Author
Matthieu Bachelier

Constructor & Destructor Documentation

TabPlaylist::TabPlaylist ( QWidget *  parent = nullptr)
explicit

Default constructor.

FIXME: when changing font for saved and untouched playlists, overwritting to normal instead of disabled Reducing size is ok, inreasing size is ko

Member Function Documentation

void TabPlaylist::aboutToChangeMenuLabels ( int  )
signal

Forward the signal.

void TabPlaylist::aboutToSavePlaylist ( Playlist p,
int  index,
bool  overwrite = false 
)
signal
void TabPlaylist::aboutToSendToTagEditor ( const QList< QUrl > &  tracks)
signal
void TabPlaylist::addExtFolders ( const QList< QDir > &  folders)
slot

Add external folders (from a drag and drop) to the current playlist.

Playlist * TabPlaylist::addPlaylist ( )
slot

Add a new playlist tab.

void TabPlaylist::changeEvent ( QEvent *  event)
overrideprotectedvirtual

Retranslate context menu.

int TabPlaylist::closePlaylist ( int  index)
slot
void TabPlaylist::contextMenuEvent ( QContextMenuEvent *  event)
overrideprotectedvirtual
Playlist * TabPlaylist::currentPlayList ( ) const

Get the current playlist.

QIcon TabPlaylist::defaultIcon ( QIcon::Mode  mode)
void TabPlaylist::deletePlaylist ( uint  playlistId)
slot
bool TabPlaylist::eventFilter ( QObject *  obj,
QEvent *  event 
)
overridevirtual

Redefined to forward events to children.

void TabPlaylist::init ( MediaPlayer mediaPlayer)
void TabPlaylist::insertItemsToPlaylist ( int  rowIndex,
const QStringList &  tracks 
)
slot

Insert multiple tracks chosen by one from the library or the filesystem into a playlist.

void TabPlaylist::loadPlaylist ( uint  playlistId)

Load a playlist saved in database.

TODO: Do not load the playlist if it's already displayed

Reload tracks from filesystem of remote location, do not use outdated or incomplete data from cache! Use (host, id) or (uri)

void TabPlaylist::moveTracksDown ( )
slot
void TabPlaylist::moveTracksUp ( )
slot
Playlist * TabPlaylist::playlist ( int  index)

Get the playlist at index.

PlaylistManager* TabPlaylist::playlistManager ( ) const
inline
QList<Playlist *> TabPlaylist::playlists ( )
inline
void TabPlaylist::removeCurrentPlaylist ( )
slot

Action sent from the menu.

void TabPlaylist::removeTabFromCloseButton ( int  index)
slot

Remove a playlist when clicking on a close button in the corner.

void TabPlaylist::renamePlaylist ( Playlist p)
slot
void TabPlaylist::renameTab ( const PlaylistDAO dao)
slot
void TabPlaylist::savePlaylist ( Playlist p,
bool  overwrite 
)
slot
void TabPlaylist::selectionChanged ( bool  isEmpty)
signal
void TabPlaylist::setMainWindow ( MainWindow mainWindow)
void TabPlaylist::updatePlaybackModeButton ( )
signal

The documentation for this class was generated from the following files: