added dialog to add urls
This commit is contained in:
parent
4c7317f71d
commit
e1e809d8fb
9 changed files with 219 additions and 4 deletions
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include <QHash>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
XCollection::XCollection (XClient * client) : QObject ( client)
|
||||
{
|
||||
|
|
@ -162,3 +163,21 @@ XCollection::addIdlist (QString name) {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
XCollection::playlistAddUrl (QUrl url, QString plsname)
|
||||
{
|
||||
//TODO: more tests if file is valid
|
||||
if (!url.isValid ()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (plsname == "") {
|
||||
plsname = m_activePlaylist;
|
||||
}
|
||||
|
||||
m_client->playlist ()->addUrl (url.toString ().toStdString (),
|
||||
plsname.toStdString ());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <QObject>
|
||||
class QString;
|
||||
class QStringList;
|
||||
class QUrl;
|
||||
|
||||
class XCollection : public QObject
|
||||
{
|
||||
|
|
@ -35,6 +36,7 @@ class XCollection : public QObject
|
|||
bool setActivePlaylist (QString name);
|
||||
QString activePlaylist () {return m_activePlaylist;}
|
||||
bool addIdlist (QString name);
|
||||
bool playlistAddUrl (QUrl url, QString plsname = "");
|
||||
|
||||
signals:
|
||||
void collectionModified (QString collection, QString ns, int type,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue