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)));
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(200, 30);
107 setObjectName(className());
108 setStyleSheet(QString(
"#%1{ %2 }").arg(objectName(), style));
static const QString FontStyle03
bool fromFile(Category type)
MusicToplistQueryCategoryItem(QWidget *parent=nullptr)
The class of the toplist music query category item.
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
The class of the category config manager.
static const QString BackgroundStyle10
static const QString ColorStyle07
static const QString ColorStyle03
MusicResultsCategory m_category
The class of the results category item.
static const QString BorderStyle02
void buttonClicked(int index)
void categoryChanged(const MusicResultsCategoryItem &category)
MusicResultsCategoryItemList m_items
The class of the label widget click group mapper.
void setCategory(const MusicResultsCategory &category)