20 if(parent()->metaObject()->indexOfSlot(
"queryAllFinished()") != -1)
22 connect(
m_networkRequest, SIGNAL(downLoadDataChanged(QString)), parent(), SLOT(queryAllFinished()));
30 m_categoryButton(nullptr)
89 QScrollArea *scrollArea =
new QScrollArea(
this);
91 layout()->addWidget(scrollArea);
95 QVBoxLayout *grid =
new QVBoxLayout(
function);
97 QLabel *firstLabel =
new QLabel(
function);
98 firstLabel->setText(tr(
"<font color=#158FE1> Rank </font>"));
99 grid->addWidget(firstLabel);
101 QWidget *categoryWidget =
new QWidget(
function);
102 QHBoxLayout *categoryWidgetLayout =
new QHBoxLayout(categoryWidget);
108 categoryWidgetLayout->addStretch(1);
109 categoryWidget->setLayout(categoryWidgetLayout);
110 grid->addWidget(categoryWidget);
112 QWidget *topFuncWidget =
new QWidget(
function);
113 QHBoxLayout *topFuncLayout =
new QHBoxLayout(topFuncWidget);
116 m_iconLabel->setPixmap(QPixmap(
":/image/lb_warning").scaled(180, 180));
119 QWidget *topLineWidget =
new QWidget(topFuncWidget);
120 QVBoxLayout *topLineLayout =
new QVBoxLayout(topLineWidget);
121 topLineLayout->setContentsMargins(10, 5, 5, 0);
123 QLabel *nameLabel =
new QLabel(topLineWidget);
124 QFont toplistFont = nameLabel->font();
125 toplistFont.setPixelSize(20);
126 nameLabel->setFont(toplistFont);
129 QLabel *playCountLabel =
new QLabel(topLineWidget);
131 QLabel *updateTimeLabel =
new QLabel(topLineWidget);
133 QLabel *descriptionLabel =
new QLabel(topLineWidget);
135 descriptionLabel->setWordWrap(
true);
137 topLineLayout->addWidget(nameLabel);
138 topLineLayout->addWidget(playCountLabel);
139 topLineLayout->addWidget(updateTimeLabel);
140 topLineLayout->addWidget(descriptionLabel);
141 topLineWidget->setLayout(topLineLayout);
144 topFuncLayout->addWidget(topLineWidget);
145 topFuncWidget->setLayout(topFuncLayout);
146 grid->addWidget(topFuncWidget);
148 QWidget *functionWidget =
new QWidget(
this);
150 QHBoxLayout *hLayout =
new QHBoxLayout(functionWidget);
155 m_songButton->setCursor(QCursor(Qt::PointingHandCursor));
158 hLayout->addStretch(1);
159 functionWidget->setLayout(hLayout);
161 QButtonGroup *buttonGroup =
new QButtonGroup(
this);
168 grid->addWidget(functionWidget);
172 function->setLayout(grid);
178 m_resizeWidgets.push_back({descriptionLabel, descriptionLabel->font()});
207 connect(d, SIGNAL(downLoadRawDataChanged(QByteArray)), SLOT(
downLoadFinished(QByteArray)));
The class of the search result data item.
static const QString FontStyle03
virtual void startToRequest(const QString &url)=0
static const QString CheckBoxStyle01
CheckBox.
static const QString ColorStyle04
static const QString FontStyle01
Font.
static const QString PushButtonStyle03
#define QtButtonGroupConnect(p, q, f, s)
Button group connect.
The class of the results category item.
#define G_DOWNLOAD_QUERY_PTR
The class of the cover data download request.
virtual void startToSearch(const QString &value)=0
QString queryServer() const
The class of the abstract query download data from net.