22 if(parent()->metaObject()->indexOfSlot(
"queryAlbumFinished()") != -1)
24 connect(
m_networkRequest, SIGNAL(downLoadDataChanged(QString)), parent(), SLOT(queryAlbumFinished()));
85 if(songInfos.isEmpty())
87 m_statusLabel->setPixmap(QPixmap(
":/image/lb_no_album_found"));
94 if(
m_value.contains(info.m_songName))
104 m_statusLabel->setPixmap(QPixmap(
":/image/lb_no_album_found"));
117 const TTK::MusicSongInformationList songInfos(d->
items());
118 if(songInfos.isEmpty())
120 m_statusLabel->setPixmap(QPixmap(
":/image/lb_no_album_found"));
139 connect(d, SIGNAL(downLoadRawDataChanged(QByteArray)), SLOT(
downLoadFinished(QByteArray)));
144 for(
int i = 0; i < list.count(); ++i)
146 if(list[i].isEmpty())
155 data->
m_label->setText(tr(
"<font color=#158FE1> Alubm > %1 </font>").arg(list[0]));
158 data->
m_label->setToolTip(list[0]);
162 data->
m_label->setToolTip(tr(
"Singer: %1").arg(item.
m_name));
166 data->
m_label->setToolTip(tr(
"Language: %1").arg(list[1]));
170 data->
m_label->setToolTip(tr(
"Company: %1").arg(list[2]));
174 data->
m_label->setToolTip(tr(
"Year: %1").arg(list[3]));
188 QScrollArea *scrollArea =
new QScrollArea(
this);
190 layout()->addWidget(scrollArea);
194 QVBoxLayout *grid =
new QVBoxLayout(
function);
196 QLabel *firstLabel =
new QLabel(
function);
197 grid->addWidget(firstLabel);
199 QWidget *topFuncWidget =
new QWidget(
function);
200 QHBoxLayout *topFuncLayout =
new QHBoxLayout(topFuncWidget);
203 m_iconLabel->setPixmap(QPixmap(
":/image/lb_warning").scaled(180, 180));
206 QWidget *topLineWidget =
new QWidget(topFuncWidget);
207 QVBoxLayout *topLineLayout =
new QVBoxLayout(topLineWidget);
208 topLineLayout->setContentsMargins(10, 5, 5, 0);
210 QLabel *albumLabel =
new QLabel(topLineWidget);
211 QFont albumFont = albumLabel->font();
212 albumFont.setPixelSize(20);
213 albumLabel->setFont(albumFont);
217 QLabel *singerLabel =
new QLabel(topLineWidget);
221 QLabel *languageLabel =
new QLabel(topLineWidget);
225 QLabel *companyLabel =
new QLabel(topLineWidget);
229 QLabel *yearLabel =
new QLabel(topLineWidget);
233 topLineLayout->addWidget(albumLabel);
234 topLineLayout->addWidget(singerLabel);
235 topLineLayout->addWidget(languageLabel);
236 topLineLayout->addWidget(companyLabel);
237 topLineLayout->addWidget(yearLabel);
238 topLineWidget->setLayout(topLineLayout);
240 QWidget *topButtonWidget =
new QWidget(topFuncWidget);
241 QHBoxLayout *topButtonLayout =
new QHBoxLayout(topButtonWidget);
242 topButtonLayout->setContentsMargins(0, 0, 0, 0);
244 QPushButton *playAllButton =
new QPushButton(tr(
"Play All"), topButtonWidget);
245 QPushButton *shareButton =
new QPushButton(tr(
"Share"), topButtonWidget);
247 playAllButton->setIcon(QIcon(
":/contextMenu/btn_play_white"));
248 playAllButton->setIconSize(QSize(14, 14));
249 playAllButton->setCursor(QCursor(Qt::PointingHandCursor));
250 shareButton->setCursor(QCursor(Qt::PointingHandCursor));
251 playAllButton->setFixedSize(90, 30);
252 shareButton->setFixedSize(55, 30);
254 topButtonLayout->addWidget(playAllButton);
255 topButtonLayout->addWidget(shareButton);
256 topButtonLayout->addStretch(1);
257 topButtonWidget->setLayout(topButtonLayout);
258 topLineLayout->addWidget(topButtonWidget);
263 QWidget *topRightWidget =
new QWidget(topFuncWidget);
264 QGridLayout *topRightLayout =
new QGridLayout(topRightWidget);
265 topRightLayout->setContentsMargins(0, 0, 0, 0);
266 topRightLayout->setSpacing(0);
268 QLabel *numberLabel =
new QLabel(topRightWidget);
269 numberLabel->setAlignment(Qt::AlignCenter);
273 numberLabel->setText(QString(
"%1.%2").arg(number).arg(
TTK::random(10)));
274 topRightLayout->addWidget(numberLabel, 0, 0);
275 topRightLayout->addWidget(
new MusicRatingLabel(ceil(number / 2.0), topRightWidget), 0, 1, 1, 6);
277 QLabel *numberTextLabel =
new QLabel(tr(
"Score:"), topRightWidget);
278 topRightLayout->addWidget(numberTextLabel, 1, 0);
279 topRightLayout->addWidget(
new MusicRatingLabel(topRightWidget), 1, 1, 1, 6);
281 QLabel *marginBottmLabel =
new QLabel(topRightWidget);
282 marginBottmLabel->setFixedHeight(40);
283 topRightLayout->addWidget(marginBottmLabel, 2, 0);
284 topRightWidget->setLayout(topRightLayout);
288 code->
setIcon(
":/image/lb_app_logo", 0.23);
289 topRightLayout->addWidget(code, 3, 2, 1, 6);
292 topFuncLayout->addWidget(topLineWidget);
293 topFuncLayout->addWidget(topRightWidget);
294 topFuncWidget->setLayout(topFuncLayout);
295 grid->addWidget(topFuncWidget);
297 QWidget *functionWidget =
new QWidget(
this);
299 QHBoxLayout *hLayout =
new QHBoxLayout(functionWidget);
304 m_songButton->setCursor(QCursor(Qt::PointingHandCursor));
306 hLayout->addStretch(1);
307 functionWidget->setLayout(hLayout);
309 QButtonGroup *buttonGroup =
new QButtonGroup(
this);
314 playAllButton->setFocusPolicy(Qt::NoFocus);
315 shareButton->setFocusPolicy(Qt::NoFocus);
318 grid->addWidget(functionWidget);
322 function->setLayout(grid);
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.
TTK_MODULE_EXPORT int random(int value=RAND_MAX)
static const QString FontStyle05
void setQueryType(QueryType type)
static const QString PushButtonStyle03
#define QtButtonGroupConnect(p, q, f, s)
Button group connect.
static bool isCoverValid(const QString &url)
The class of the rating label.
void setQueryMode(QueryMode mode)
static const QString ColorStyle11
#define G_DOWNLOAD_QUERY_PTR
The class of the cover data download request.
virtual void startToSearch(const QString &value)=0
The class of the abstract query download data from net.
const TTK::MusicSongInformationList & items() const