Add dividers to Grooveshark tree, to visualise better each type of item
This commit is contained in:
parent
73a823d190
commit
7a188787de
@ -515,6 +515,10 @@ void GroovesharkService::EnsureItemsCreated() {
|
||||
InternetModel::Role_PlayBehaviour);
|
||||
root_->appendRow(search_);
|
||||
|
||||
QStandardItem* popular_divider = new QStandardItem(tr("Popular songs"));
|
||||
popular_divider->setData(true, InternetModel::Role_IsDivider);
|
||||
root_->appendRow(popular_divider);
|
||||
|
||||
popular_month_ = new QStandardItem(QIcon(":/star-on.png"), tr("Popular songs of the Month"));
|
||||
popular_month_->setData(InternetModel::Type_UserPlaylist, InternetModel::Role_Type);
|
||||
popular_month_->setData(true, InternetModel::Role_CanLazyLoad);
|
||||
@ -529,6 +533,10 @@ void GroovesharkService::EnsureItemsCreated() {
|
||||
InternetModel::Role_PlayBehaviour);
|
||||
root_->appendRow(popular_today_);
|
||||
|
||||
QStandardItem* playlists_divider = new QStandardItem(tr("Playlists"));
|
||||
playlists_divider->setData(true, InternetModel::Role_IsDivider);
|
||||
root_->appendRow(playlists_divider);
|
||||
|
||||
favorites_ = new QStandardItem(QIcon(":/last.fm/love.png"), tr("Favorites"));
|
||||
favorites_->setData(InternetModel::Type_UserPlaylist, InternetModel::Role_Type);
|
||||
favorites_->setData(UserFavorites, Role_PlaylistType);
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "core/backgroundthread.h"
|
||||
#include "core/song.h"
|
||||
#include "library/librarymodel.h"
|
||||
#include "playlist/playlistitem.h"
|
||||
#include "ui/settingsdialog.h"
|
||||
#include "widgets/multiloadingindicator.h"
|
||||
@ -79,7 +80,9 @@ public:
|
||||
// (e.g. changing remote playlists)
|
||||
Role_CanBeModified,
|
||||
|
||||
RoleCount
|
||||
RoleCount,
|
||||
|
||||
Role_IsDivider = LibraryModel::Role_IsDivider,
|
||||
};
|
||||
|
||||
enum Type {
|
||||
|
Loading…
x
Reference in New Issue
Block a user