62 connect(d, SIGNAL(downLoadRawDataChanged(QByteArray)), SLOT(
downLoadFinished(QByteArray)));
97 m_pageQueryWidget(nullptr)
190 m_initialized(false),
191 m_pageQueryWidget(nullptr)
284 m_artistAlbums(nullptr),
388 m_container->setCurrentIndex(index > 2 ? 2 : index);
394 if(songInfos.isEmpty())
396 m_statusLabel->setPixmap(QPixmap(
":/image/lb_no_artist_found"));
400 bool hasItem =
false;
403 if(
m_value.contains(info.m_artistName))
413 m_statusLabel->setPixmap(QPixmap(
":/image/lb_no_artist_found"));
426 const TTK::MusicSongInformationList &songInfos = d->
items();
427 if(songInfos.isEmpty())
429 m_statusLabel->setPixmap(QPixmap(
":/image/lb_no_artist_found"));
448 connect(d, SIGNAL(downLoadRawDataChanged(QByteArray)), SLOT(
downLoadFinished(QByteArray)));
455 data->
m_label->setText(tr(
"<font color=#158FE1> Artist > %1 </font>").arg(item.
m_name));
483 QScrollArea *scrollArea =
new QScrollArea(
this);
485 layout()->addWidget(scrollArea);
489 QVBoxLayout *grid =
new QVBoxLayout(
function);
491 QLabel *firstLabel =
new QLabel(
function);
492 grid->addWidget(firstLabel);
494 QWidget *topFuncWidget =
new QWidget(
function);
495 QHBoxLayout *topFuncLayout =
new QHBoxLayout(topFuncWidget);
498 m_iconLabel->setPixmap(QPixmap(
":/image/lb_warning").scaled(180, 180));
501 QWidget *topLineWidget =
new QWidget(topFuncWidget);
502 QVBoxLayout *topLineLayout =
new QVBoxLayout(topLineWidget);
503 topLineLayout->setContentsMargins(10, 5, 5, 0);
505 QLabel *artistLabel =
new QLabel(topLineWidget);
506 QFont artistFont = artistLabel->font();
507 artistFont.setPixelSize(20);
508 artistLabel->setFont(artistFont);
512 QLabel *nickNameLabel =
new QLabel(topLineWidget);
516 QLabel *birthLabel =
new QLabel(topLineWidget);
520 topLineLayout->addWidget(artistLabel);
521 topLineLayout->addWidget(nickNameLabel);
522 topLineLayout->addWidget(birthLabel);
523 topLineWidget->setLayout(topLineLayout);
525 QWidget *topButtonWidget =
new QWidget(topFuncWidget);
527 QHBoxLayout *topButtonLayout =
new QHBoxLayout(topButtonWidget);
528 topButtonLayout->setContentsMargins(0, 0, 0, 0);
530 QPushButton *playAllButton =
new QPushButton(tr(
"Play All"), topButtonWidget);
531 QPushButton *shareButton =
new QPushButton(tr(
"Share"), topButtonWidget);
533 playAllButton->setIcon(QIcon(
":/contextMenu/btn_play_white"));
534 playAllButton->setIconSize(QSize(14, 14));
535 playAllButton->setCursor(QCursor(Qt::PointingHandCursor));
536 shareButton->setCursor(QCursor(Qt::PointingHandCursor));
537 playAllButton->setFixedSize(90, 30);
538 shareButton->setFixedSize(55, 30);
540 topButtonLayout->addWidget(playAllButton);
541 topButtonLayout->addWidget(shareButton);
542 topButtonLayout->addStretch(1);
543 topButtonWidget->setLayout(topButtonLayout);
544 topLineLayout->addWidget(topButtonWidget);
549 QWidget *topRightWidget =
new QWidget(topFuncWidget);
550 QGridLayout *topRightLayout =
new QGridLayout(topRightWidget);
551 topRightLayout->setContentsMargins(0, 0, 0, 0);
552 topRightLayout->setSpacing(0);
554 QLabel *numberLabel =
new QLabel(topRightWidget);
555 numberLabel->setAlignment(Qt::AlignCenter);
559 numberLabel->setText(QString(
"%1.%2").arg(number).arg(
TTK::random(10)));
560 topRightLayout->addWidget(numberLabel, 0, 0);
561 topRightLayout->addWidget(
new MusicRatingLabel(ceil(number / 2.0), topRightWidget), 0, 1, 1, 6);
563 QLabel *numberTextLabel =
new QLabel(tr(
"Score:"), topRightWidget);
564 topRightLayout->addWidget(numberTextLabel, 1, 0);
565 topRightLayout->addWidget(
new MusicRatingLabel(topRightWidget), 1, 1, 1, 6);
567 QLabel *marginBottmLabel =
new QLabel(topRightWidget);
568 marginBottmLabel->setFixedHeight(40);
569 topRightLayout->addWidget(marginBottmLabel, 2, 0);
570 topRightWidget->setLayout(topRightLayout);
574 code->
setIcon(
":/image/lb_app_logo", 0.23);
575 topRightLayout->addWidget(code, 3, 2, 1, 6);
578 topFuncLayout->addWidget(topLineWidget);
579 topFuncLayout->addWidget(topRightWidget);
580 topFuncWidget->setLayout(topFuncLayout);
581 grid->addWidget(topFuncWidget);
583 QWidget *functionWidget =
new QWidget(
this);
585 QHBoxLayout *hLayout =
new QHBoxLayout(functionWidget);
590 m_songButton->setCursor(QCursor(Qt::PointingHandCursor));
593 QPushButton *infoButton =
new QPushButton(functionWidget);
594 infoButton->setText(tr(
"Info"));
595 infoButton->setFixedSize(100, 25);
596 infoButton->setCursor(QCursor(Qt::PointingHandCursor));
597 hLayout->addWidget(infoButton);
599 QPushButton *albumsButton =
new QPushButton(functionWidget);
600 albumsButton->setText(tr(
"Albums"));
601 albumsButton->setFixedSize(100, 25);
602 albumsButton->setCursor(QCursor(Qt::PointingHandCursor));
603 hLayout->addWidget(albumsButton);
605 QPushButton *mvsButton =
new QPushButton(functionWidget);
606 mvsButton->setText(tr(
"Movies"));
607 mvsButton->setFixedSize(100, 25);
608 mvsButton->setCursor(QCursor(Qt::PointingHandCursor));
610 hLayout->addWidget(mvsButton);
611 hLayout->addStretch(1);
612 functionWidget->setLayout(hLayout);
614 QButtonGroup *buttonGroup =
new QButtonGroup(
this);
616 buttonGroup->addButton(infoButton, 1);
617 buttonGroup->addButton(albumsButton, 2);
618 buttonGroup->addButton(mvsButton, 3);
622 playAllButton->setFocusPolicy(Qt::NoFocus);
623 shareButton->setFocusPolicy(Qt::NoFocus);
625 infoButton->setFocusPolicy(Qt::NoFocus);
626 albumsButton->setFocusPolicy(Qt::NoFocus);
627 mvsButton->setFocusPolicy(Qt::NoFocus);
629 grid->addWidget(functionWidget);
633 function->setLayout(grid);
TTK_MODULE_EXPORT QString generateSongArtist(const QString &name, const QString &key=TTK_DEFAULT_STR)
The class of the search result data item.
static constexpr const char * TinyBtnPlaylist
static const QString FontStyle03
int pageTotalSize() const noexcept
virtual void startToRequest(const QString &url)=0
static const QString CheckBoxStyle01
CheckBox.
static const QString PushButtonStyle01
PushButton.
static const QString ColorStyle04
static const QString FontStyle01
Font.
TTK_MODULE_EXPORT int random(int value=RAND_MAX)
static const QString FontStyle05
static const QString PushButtonStyle03
void setInputData(const QByteArray &data, const QSize &size)
The class of the page query widget.
virtual void startToPage(int offset)
void page(int index, int total)
#define QtButtonGroupConnect(p, q, f, s)
Button group connect.
static bool isCoverValid(const QString &url)
The class of the image render thread.
The class of the rating label.
void setQueryMode(QueryMode mode)
QWidget * createPageWidget(QWidget *parent, int total)
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
#define TTK_ERROR_STREAM(msg)