Enable loading playlists from filesystem
This commit is contained in:
parent
6af763a954
commit
5b5600aadd
5 changed files with 53 additions and 3 deletions
|
@ -39,6 +39,7 @@
|
|||
#include <QSettings>
|
||||
#include <QFileDialog>
|
||||
#include <QPainter>
|
||||
#include <QUrl>
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -291,6 +292,7 @@ PlaylistWidget::addButtons (void)
|
|||
Skin::PLS_LST_SAV_1);
|
||||
b = new PlaylistMenuButton (m_lst, Skin::PLS_LST_OPN_0,
|
||||
Skin::PLS_LST_OPN_1);
|
||||
connect (b, SIGNAL (activated ()), this, SLOT (menuAddPls ()));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -360,6 +362,22 @@ PlaylistWidget::menuAddFile ()
|
|||
|
||||
}
|
||||
|
||||
void
|
||||
PlaylistWidget::menuAddPls ()
|
||||
{
|
||||
QStringList files;
|
||||
|
||||
FileDialog fd (this, "add_Playlist");
|
||||
files = fd.getFiles ();
|
||||
|
||||
if (files.count () > 0) {
|
||||
XMMSHandler::getInstance ().xcollection ()->playlistClear ();
|
||||
}
|
||||
|
||||
QString file = files[0];
|
||||
XMMSHandler::getInstance ().xcollection ()->addPlsFile (QUrl (file));
|
||||
}
|
||||
|
||||
void
|
||||
PlaylistWidget::resizeEvent (QResizeEvent *event)
|
||||
{
|
||||
|
|
|
@ -85,6 +85,7 @@ class PlaylistWidget : public QWidget {
|
|||
void menuAddUrl ();
|
||||
void menuAddDir ();
|
||||
void menuAddFile ();
|
||||
void menuAddPls ();
|
||||
|
||||
protected slots:
|
||||
void openPlaylistChooser ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue