priorty -> priority
This commit is contained in:
committed by
Craig Drummond
parent
0b37f7475a
commit
7046f6397d
@@ -215,12 +215,12 @@ QList<Song> DevicesPage::selectedSongs(bool allowPlaylists) const
|
||||
return DevicesModel::self()->songs(proxy.mapToSource(selected));
|
||||
}
|
||||
|
||||
void DevicesPage::addSelectionToPlaylist(const QString &name, int action, quint8 priorty, bool decreasePriority)
|
||||
void DevicesPage::addSelectionToPlaylist(const QString &name, int action, quint8 priority, bool decreasePriority)
|
||||
{
|
||||
QStringList files=playableUrls();
|
||||
if (!files.isEmpty()) {
|
||||
if (name.isEmpty()) {
|
||||
emit add(files, action, priorty, decreasePriority);
|
||||
emit add(files, action, priority, decreasePriority);
|
||||
} else {
|
||||
emit addSongsToPlaylist(name, files);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
QString activeFsDeviceUdi() const;
|
||||
QStringList playableUrls() const;
|
||||
QList<Song> selectedSongs(bool allowPlaylists=false) const;
|
||||
void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priorty=0, bool decreasePriority=false);
|
||||
void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priority=0, bool decreasePriority=false);
|
||||
void focusSearch() { view->focusSearch(); }
|
||||
void refresh();
|
||||
void resort() { proxy.sort(); }
|
||||
|
||||
@@ -179,7 +179,7 @@ QStringList FolderPage::selectedFiles(bool allowPlaylists) const
|
||||
return files;
|
||||
}
|
||||
|
||||
void FolderPage::addSelectionToPlaylist(const QString &name, int action, quint8 priorty, bool decreasePriority)
|
||||
void FolderPage::addSelectionToPlaylist(const QString &name, int action, quint8 priority, bool decreasePriority)
|
||||
{
|
||||
QModelIndexList selected=view->selectedIndexes();
|
||||
QStringList dirs;
|
||||
@@ -195,7 +195,7 @@ void FolderPage::addSelectionToPlaylist(const QString &name, int action, quint8
|
||||
|
||||
if (!files.isEmpty()) {
|
||||
if (name.isEmpty()) {
|
||||
emit add(files, action, priorty, decreasePriority);
|
||||
emit add(files, action, priority, decreasePriority);
|
||||
} else {
|
||||
emit addSongsToPlaylist(name, files);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
void addSelectionToDevice(const QString &udi);
|
||||
void deleteSongs();
|
||||
#endif
|
||||
void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priorty=0, bool decreasePriority=false);
|
||||
void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priority=0, bool decreasePriority=false);
|
||||
void showEvent(QShowEvent *e);
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
@@ -34,8 +34,8 @@ public:
|
||||
virtual ~Page() { }
|
||||
virtual Song coverRequest() const { return Song(); }
|
||||
virtual QList<Song> selectedSongs(bool allowPlaylists=false) const { Q_UNUSED(allowPlaylists) return QList<Song>(); }
|
||||
virtual void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priorty=0, bool decreasePriority=false) {
|
||||
Q_UNUSED(name) Q_UNUSED(action) Q_UNUSED(priorty) Q_UNUSED(decreasePriority)
|
||||
virtual void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priority=0, bool decreasePriority=false) {
|
||||
Q_UNUSED(name) Q_UNUSED(action) Q_UNUSED(priority) Q_UNUSED(decreasePriority)
|
||||
}
|
||||
#ifdef ENABLE_DEVICES_SUPPORT
|
||||
virtual void addSelectionToDevice(const QString &udi) { Q_UNUSED(udi) }
|
||||
|
||||
@@ -110,7 +110,7 @@ Q_SIGNALS:
|
||||
void matches(const QString &udi, const QList<CdAlbum> &albums);
|
||||
void invalid(const QList<Song> &songs);
|
||||
void updatedDetails(const QList<Song> &songs);
|
||||
void add(const QStringList &files, int action, quint8 priorty, bool decreasePriority); // add songs to MPD playqueue
|
||||
void add(const QStringList &files, int action, quint8 priority, bool decreasePriority); // add songs to MPD playqueue
|
||||
|
||||
private Q_SLOTS:
|
||||
void play(const QList<Song> &songs);
|
||||
|
||||
@@ -337,13 +337,13 @@ void SmartPlaylistsPage::addSongsToPlayQueue()
|
||||
files.append(songs.takeFirst().file);
|
||||
}
|
||||
if (!files.isEmpty()) {
|
||||
emit add(files, command.action, command.priorty, command.decreasePriority);
|
||||
emit add(files, command.action, command.priority, command.decreasePriority);
|
||||
view->clearSelection();
|
||||
}
|
||||
command.clear();
|
||||
}
|
||||
|
||||
void SmartPlaylistsPage::addSelectionToPlaylist(const QString &name, int action, quint8 priorty, bool decreasePriority)
|
||||
void SmartPlaylistsPage::addSelectionToPlaylist(const QString &name, int action, quint8 priority, bool decreasePriority)
|
||||
{
|
||||
if (!name.isEmpty()) {
|
||||
return;
|
||||
@@ -363,7 +363,7 @@ void SmartPlaylistsPage::addSelectionToPlaylist(const QString &name, int action,
|
||||
return;
|
||||
}
|
||||
|
||||
command = Command(pl, action, priorty, decreasePriority, command.id+1);
|
||||
command = Command(pl, action, priority, decreasePriority, command.id+1);
|
||||
|
||||
QList<RulesPlaylists::Rule>::ConstIterator it = pl.rules.constBegin();
|
||||
QList<RulesPlaylists::Rule>::ConstIterator end = pl.rules.constEnd();
|
||||
|
||||
@@ -37,7 +37,7 @@ class SmartPlaylistsPage : public SinglePageWidget
|
||||
|
||||
struct Command {
|
||||
Command(const RulesPlaylists::Entry &e=RulesPlaylists::Entry(), int a=0, quint8 prio=0, bool dec=false, quint32 i=0)
|
||||
: playlist(e.name), action(a), priorty(prio), decreasePriority(dec), ratingFrom(e.ratingFrom), ratingTo(e.ratingTo),
|
||||
: playlist(e.name), action(a), priority(prio), decreasePriority(dec), ratingFrom(e.ratingFrom), ratingTo(e.ratingTo),
|
||||
minDuration(e.minDuration), maxDuration(e.maxDuration), numTracks(e.numTracks), order(e.order), orderAscending(e.orderAscending),
|
||||
id(i) { }
|
||||
bool isEmpty() const { return playlist.isEmpty(); }
|
||||
@@ -47,7 +47,7 @@ class SmartPlaylistsPage : public SinglePageWidget
|
||||
QString playlist;
|
||||
|
||||
int action;
|
||||
quint8 priorty;
|
||||
quint8 priority;
|
||||
bool decreasePriority;
|
||||
|
||||
QList<QByteArray> includeRules;
|
||||
@@ -94,7 +94,7 @@ private:
|
||||
void enableWidgets(bool enable);
|
||||
void filterCommand();
|
||||
void addSongsToPlayQueue();
|
||||
void addSelectionToPlaylist(const QString &name, int action, quint8 priorty, bool decreasePriority);
|
||||
void addSelectionToPlaylist(const QString &name, int action, quint8 priority, bool decreasePriority);
|
||||
|
||||
private:
|
||||
PlaylistProxyModel proxy;
|
||||
|
||||
@@ -137,9 +137,9 @@ void StoredPlaylistsPage::clear()
|
||||
// return PlaylistsModel::self()->filenames(mapped, true);
|
||||
//}
|
||||
|
||||
void StoredPlaylistsPage::addSelectionToPlaylist(const QString &name, int action, quint8 priorty, bool decreasePriority)
|
||||
void StoredPlaylistsPage::addSelectionToPlaylist(const QString &name, int action, quint8 priority, bool decreasePriority)
|
||||
{
|
||||
addItemsToPlayList(view->selectedIndexes(), name, action, priorty, decreasePriority);
|
||||
addItemsToPlayList(view->selectedIndexes(), name, action, priority, decreasePriority);
|
||||
}
|
||||
|
||||
void StoredPlaylistsPage::setView(int mode)
|
||||
@@ -287,7 +287,7 @@ void StoredPlaylistsPage::itemDoubleClicked(const QModelIndex &index)
|
||||
}
|
||||
}
|
||||
|
||||
void StoredPlaylistsPage::addItemsToPlayList(const QModelIndexList &indexes, const QString &name, int action, quint8 priorty, bool decreasePriority)
|
||||
void StoredPlaylistsPage::addItemsToPlayList(const QModelIndexList &indexes, const QString &name, int action, quint8 priority, bool decreasePriority)
|
||||
{
|
||||
if (indexes.isEmpty()) {
|
||||
return;
|
||||
@@ -295,7 +295,7 @@ void StoredPlaylistsPage::addItemsToPlayList(const QModelIndexList &indexes, con
|
||||
|
||||
// If we only have 1 item selected, see if it is a playlist. If so, we might be able to
|
||||
// just ask MPD to load it...
|
||||
if (name.isEmpty() && 1==indexes.count() && 0==priorty && !proxy.enabled() && MPDConnection::Append==action) {
|
||||
if (name.isEmpty() && 1==indexes.count() && 0==priority && !proxy.enabled() && MPDConnection::Append==action) {
|
||||
QModelIndex idx=proxy.mapToSource(*(indexes.begin()));
|
||||
PlaylistsModel::Item *item=static_cast<PlaylistsModel::Item *>(idx.internalPointer());
|
||||
|
||||
@@ -322,7 +322,7 @@ void StoredPlaylistsPage::addItemsToPlayList(const QModelIndexList &indexes, con
|
||||
QStringList files=PlaylistsModel::self()->filenames(proxy.mapToSource(indexes));
|
||||
if (!files.isEmpty()) {
|
||||
if (name.isEmpty()) {
|
||||
emit add(files, action, priorty, decreasePriority);
|
||||
emit add(files, action, priority, decreasePriority);
|
||||
} else {
|
||||
emit addSongsToPlaylist(name, files);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
void updateRows();
|
||||
void clear();
|
||||
//QStringList selectedFiles() const;
|
||||
void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priorty=0, bool decreasePriority=false);
|
||||
void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priority=0, bool decreasePriority=false);
|
||||
void setView(int mode);
|
||||
#ifdef ENABLE_DEVICES_SUPPORT
|
||||
QList<Song> selectedSongs(bool allowPlaylists=false) const;
|
||||
@@ -58,7 +58,7 @@ Q_SIGNALS:
|
||||
void addToDevice(const QString &from, const QString &to, const QList<Song> &songs);
|
||||
|
||||
private:
|
||||
void addItemsToPlayList(const QModelIndexList &indexes, const QString &name, int action, quint8 priorty=0, bool decreasePriority=false);
|
||||
void addItemsToPlayList(const QModelIndexList &indexes, const QString &name, int action, quint8 priority=0, bool decreasePriority=false);
|
||||
|
||||
public Q_SLOTS:
|
||||
void removeItems();
|
||||
|
||||
@@ -185,13 +185,13 @@ void StreamsBrowsePage::showEvent(QShowEvent *e)
|
||||
QWidget::showEvent(e);
|
||||
}
|
||||
|
||||
void StreamsBrowsePage::addSelectionToPlaylist(const QString &name, int action, quint8 priorty, bool decreasePriority)
|
||||
void StreamsBrowsePage::addSelectionToPlaylist(const QString &name, int action, quint8 priority, bool decreasePriority)
|
||||
{
|
||||
Q_UNUSED(name)
|
||||
addItemsToPlayQueue(view->selectedIndexes(), action, priorty, decreasePriority);
|
||||
addItemsToPlayQueue(view->selectedIndexes(), action, priority, decreasePriority);
|
||||
}
|
||||
|
||||
void StreamsBrowsePage::addItemsToPlayQueue(const QModelIndexList &indexes, int action, quint8 priorty, bool decreasePriority)
|
||||
void StreamsBrowsePage::addItemsToPlayQueue(const QModelIndexList &indexes, int action, quint8 priority, bool decreasePriority)
|
||||
{
|
||||
if (indexes.isEmpty()) {
|
||||
return;
|
||||
@@ -204,7 +204,7 @@ void StreamsBrowsePage::addItemsToPlayQueue(const QModelIndexList &indexes, int
|
||||
QStringList files=StreamsModel::self()->filenames(mapped, true);
|
||||
|
||||
if (!files.isEmpty()) {
|
||||
emit add(files, action, priorty, decreasePriority);
|
||||
emit add(files, action, priority, decreasePriority);
|
||||
view->clearSelection();
|
||||
}
|
||||
}
|
||||
@@ -617,7 +617,7 @@ void StreamSearchPage::doSearch()
|
||||
model.search(view->searchText().trimmed(), false);
|
||||
}
|
||||
|
||||
void StreamSearchPage::addSelectionToPlaylist(const QString &name, int action, quint8 priorty, bool decreasePriority)
|
||||
void StreamSearchPage::addSelectionToPlaylist(const QString &name, int action, quint8 priority, bool decreasePriority)
|
||||
{
|
||||
Q_UNUSED(name)
|
||||
QModelIndexList indexes=view->selectedIndexes();
|
||||
@@ -632,7 +632,7 @@ void StreamSearchPage::addSelectionToPlaylist(const QString &name, int action, q
|
||||
QStringList files=StreamsModel::self()->filenames(mapped, true);
|
||||
|
||||
if (!files.isEmpty()) {
|
||||
emit add(files, action, priorty, decreasePriority);
|
||||
emit add(files, action, priority, decreasePriority);
|
||||
view->clearSelection();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
StreamsBrowsePage(QWidget *p);
|
||||
virtual ~StreamsBrowsePage();
|
||||
|
||||
void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priorty=0, bool decreasePriority=false);
|
||||
void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priority=0, bool decreasePriority=false);
|
||||
void showEvent(QShowEvent *e);
|
||||
|
||||
Q_SIGNALS:
|
||||
@@ -85,7 +85,7 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
void doSearch();
|
||||
void addItemsToPlayQueue(const QModelIndexList &indexes, int action, quint8 priorty=0, bool decreasePriority=false);
|
||||
void addItemsToPlayQueue(const QModelIndexList &indexes, int action, quint8 priority=0, bool decreasePriority=false);
|
||||
void addToFavourites();
|
||||
|
||||
private:
|
||||
@@ -118,7 +118,7 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
void doSearch();
|
||||
void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priorty=0, bool decreasePriority=false);
|
||||
void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priority=0, bool decreasePriority=false);
|
||||
void addToFavourites();
|
||||
|
||||
private:
|
||||
|
||||
@@ -125,13 +125,13 @@ void SinglePageWidget::init(int flags, const QList<QWidget *> &leftXtra, const Q
|
||||
}
|
||||
}
|
||||
|
||||
void SinglePageWidget::addSelectionToPlaylist(const QString &name, int action, quint8 priorty, bool decreasePriority)
|
||||
void SinglePageWidget::addSelectionToPlaylist(const QString &name, int action, quint8 priority, bool decreasePriority)
|
||||
{
|
||||
// Always get tracks and playlists - this way error message can be shown. #902
|
||||
QStringList files=selectedFiles(true);
|
||||
if (!files.isEmpty()) {
|
||||
if (name.isEmpty()) {
|
||||
emit add(files, action, priorty, decreasePriority);
|
||||
emit add(files, action, priority, decreasePriority);
|
||||
} else {
|
||||
emit addSongsToPlaylist(name, files);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
void init(int flags=All, const QList<QWidget *> &leftXtra=QList<QWidget *>(), const QList<QWidget *> &rightXtra=QList<QWidget *>());
|
||||
virtual QStringList selectedFiles(bool allowPlaylists=false) const { Q_UNUSED(allowPlaylists); return QStringList(); }
|
||||
virtual QList<Song> selectedSongs(bool allowPlaylists=false) const { Q_UNUSED(allowPlaylists); return QList<Song>(); }
|
||||
virtual void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priorty=0, bool decreasePriority=false);
|
||||
virtual void addSelectionToPlaylist(const QString &name=QString(), int action=MPDConnection::Append, quint8 priority=0, bool decreasePriority=false);
|
||||
virtual Song coverRequest() const { return Song(); }
|
||||
#ifdef ENABLE_DEVICES_SUPPORT
|
||||
virtual void addSelectionToDevice(const QString &udi) { Q_UNUSED(udi); }
|
||||
@@ -80,7 +80,7 @@ Q_SIGNALS:
|
||||
void searchItems();
|
||||
|
||||
// These are for communicating with MPD object (which is in its own thread, so need to talk via signal/slots)
|
||||
void add(const QStringList &files, int action, quint8 priorty, bool decreasePriority);
|
||||
void add(const QStringList &files, int action, quint8 priority, bool decreasePriority);
|
||||
void addSongsToPlaylist(const QString &name, const QStringList &files);
|
||||
|
||||
private Q_SLOTS:
|
||||
|
||||
@@ -89,14 +89,14 @@ QList<Song> StackedPageWidget::selectedSongs(bool allowPlaylists) const
|
||||
return QList<Song>();
|
||||
}
|
||||
|
||||
void StackedPageWidget::addSelectionToPlaylist(const QString &name, int action, quint8 priorty, bool decreasePriority)
|
||||
void StackedPageWidget::addSelectionToPlaylist(const QString &name, int action, quint8 priority, bool decreasePriority)
|
||||
{
|
||||
QWidget *w=currentWidget();
|
||||
if (dynamic_cast<SinglePageWidget *>(w)) {
|
||||
return static_cast<SinglePageWidget *>(w)->addSelectionToPlaylist(name, action, priorty, decreasePriority);
|
||||
return static_cast<SinglePageWidget *>(w)->addSelectionToPlaylist(name, action, priority, decreasePriority);
|
||||
}
|
||||
if (dynamic_cast<StackedPageWidget *>(w)) {
|
||||
return static_cast<StackedPageWidget *>(w)->addSelectionToPlaylist(name, action, priorty, decreasePriority);
|
||||
return static_cast<StackedPageWidget *>(w)->addSelectionToPlaylist(name, action, priority, decreasePriority);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
void focusSearch();
|
||||
QStringList selectedFiles(bool allowPlaylists) const;
|
||||
QList<Song> selectedSongs(bool allowPlaylists) const;
|
||||
void addSelectionToPlaylist(const QString &name, int action, quint8 priorty, bool decreasePriority);
|
||||
void addSelectionToPlaylist(const QString &name, int action, quint8 priority, bool decreasePriority);
|
||||
void removeItems();
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
Reference in New Issue
Block a user