20 QHBoxLayout *layout =
new QHBoxLayout(
this);
21 QLabel *label =
new QLabel(category.
m_category,
this);
24 layout->addWidget(label, 0, Qt::AlignTop);
26 QWidget *item =
new QWidget(
this);
27 QGridLayout *itemLayout =
new QGridLayout(item);
28 itemLayout->setContentsMargins(0, 0, 0, 0);
31 connect(clickedGroup, SIGNAL(clicked(
int)), SLOT(
buttonClicked(
int)));
33 for(
int i = 0; i < category.
m_items.count(); ++i)
39 clickedGroup->
mapped(label);
43 item->setLayout(itemLayout);
44 layout->addWidget(item, 0, Qt::AlignTop);
65 MusicResultsCategoryList categorys;
73 QVBoxLayout *containLayout =
new QVBoxLayout(containWidget);
74 containWidget->setLayout(containLayout);
76 QScrollArea *scrollArea =
new QScrollArea(
this);
78 layout->addWidget(scrollArea);
85 containLayout->addWidget(item);
97 m_menu->exec(mapToGlobal(QPoint(0, 0)));
102 setFixedSize(100, 30);
107 setObjectName(className());
108 setStyleSheet(QString(
"#%1{ %2 }").arg(objectName(), style));
void categoryChanged(const MusicResultsCategoryItem &category)
static const QString FontStyle03
bool fromFile(Category type)
void setCategory(const MusicResultsCategory &category)
The class of the label widget that can click.
virtual bool readBuffer(MusicResultsCategoryList &items) overridefinal
void mapped(QWidget *widget)
The class of the results category core.
static const QString MenuStyle05
MusicPlaylistQueryCategoryItem(QWidget *parent=nullptr)
void buttonClicked(int index)
The class of the category config manager.
static const QString BackgroundStyle10
static const QString ColorStyle07
static const QString ColorStyle03
The class of the results category item.
static const QString BorderStyle02
MusicResultsCategoryItemList m_items
The class of the label widget click group mapper.
The class of the playlist music query category item.
MusicResultsCategory m_category