12 m_commentsWidget(nullptr)
63 QScrollArea *scrollArea =
new QScrollArea(
this);
65 layout()->addWidget(scrollArea);
69 QVBoxLayout *grid =
new QVBoxLayout(
function);
71 QWidget *firstTopFuncWidget =
new QWidget(
function);
72 QHBoxLayout *firstTopFuncLayout =
new QHBoxLayout(firstTopFuncWidget);
73 grid->addWidget(firstTopFuncWidget);
75 QLabel *firstLabel =
new QLabel(
function);
76 firstLabel->setText(tr(
"<font color=#158FE1> Playlist > %1 </font>").arg(item.
m_name));
77 firstTopFuncLayout->addWidget(firstLabel);
81 QPushButton *backButton =
new QPushButton(tr(
"Back"));
83 backButton->setFocusPolicy(Qt::NoFocus);
85 backButton->setFixedSize(90, 30);
87 backButton->setCursor(QCursor(Qt::PointingHandCursor));
88 connect(backButton, SIGNAL(clicked()), obj, SLOT(backToPlaylistMenu()));
89 firstTopFuncLayout->addWidget(backButton);
92 QWidget *topFuncWidget =
new QWidget(
function);
93 QHBoxLayout *topFuncLayout =
new QHBoxLayout(topFuncWidget);
96 m_iconLabel->setPixmap(QPixmap(
":/image/lb_warning").scaled(180, 180));
102 connect(req, SIGNAL(downloadRawDataChanged(QByteArray)), SLOT(
downloadFinished(QByteArray)));
106 QWidget *topLineWidget =
new QWidget(topFuncWidget);
107 QVBoxLayout *topLineLayout =
new QVBoxLayout(topLineWidget);
108 topLineLayout->setContentsMargins(10, 5, 5, 0);
110 QLabel *nameLabel =
new QLabel(topLineWidget);
111 QFont nameFont = nameLabel->font();
112 nameFont.setPixelSize(20);
113 nameLabel->setFont(nameFont);
115 nameLabel->setToolTip(item.
m_name);
117 QLabel *creatorLabel =
new QLabel(topLineWidget);
119 creatorLabel->setToolTip(tr(
"Creator: %1").arg(item.
m_nickName));
121 QLabel *tagsLabel =
new QLabel(topLineWidget);
123 tagsLabel->setToolTip(tr(
"Tags: %1").arg(item.
m_category));
125 QLabel *updateLabel =
new QLabel(topLineWidget);
127 updateLabel->setToolTip(tr(
"UpdateTime: %1").arg(item.
m_time));
129 topLineLayout->addWidget(nameLabel);
130 topLineLayout->addWidget(creatorLabel);
131 topLineLayout->addWidget(tagsLabel);
132 topLineLayout->addWidget(updateLabel);
133 topLineWidget->setLayout(topLineLayout);
135 QWidget *topButtonWidget =
new QWidget(topFuncWidget);
137 QHBoxLayout *topButtonLayout =
new QHBoxLayout(topButtonWidget);
138 topButtonLayout->setContentsMargins(0, 0, 0, 0);
140 QPushButton *playAllButton =
new QPushButton(tr(
"Play All"), topButtonWidget);
141 QPushButton *shareButton =
new QPushButton(tr(
"Share"), topButtonWidget);
143 playAllButton->setIcon(QIcon(
":/contextMenu/btn_play_white"));
144 playAllButton->setIconSize(QSize(14, 14));
145 playAllButton->setCursor(QCursor(Qt::PointingHandCursor));
146 shareButton->setCursor(QCursor(Qt::PointingHandCursor));
147 playAllButton->setFixedSize(90, 30);
148 shareButton->setFixedSize(55, 30);
150 topButtonLayout->addWidget(playAllButton);
151 topButtonLayout->addWidget(shareButton);
152 topButtonLayout->addStretch(1);
153 topButtonWidget->setLayout(topButtonLayout);
154 topLineLayout->addWidget(topButtonWidget);
159 QWidget *topRightWidget =
new QWidget(topFuncWidget);
160 QGridLayout *topRightLayout =
new QGridLayout(topRightWidget);
161 topRightLayout->setContentsMargins(0, 0, 0, 0);
162 topRightLayout->setSpacing(0);
164 QLabel *numberLabel =
new QLabel(topRightWidget);
165 numberLabel->setAlignment(Qt::AlignCenter);
169 numberLabel->setText(QString(
"%1.%2").arg(number).arg(
TTK::random(10)));
170 topRightLayout->addWidget(numberLabel, 0, 0);
171 topRightLayout->addWidget(
new MusicRatingLabel(std::ceil(number / 2.0), topRightWidget), 0, 1, 1, 6);
173 QLabel *numberTextLabel =
new QLabel(tr(
"Score:"), topRightWidget);
174 topRightLayout->addWidget(numberTextLabel, 1, 0);
175 topRightLayout->addWidget(
new MusicRatingLabel(topRightWidget), 1, 1, 1, 6);
177 QLabel *marginBottmLabel =
new QLabel(topRightWidget);
178 marginBottmLabel->setFixedHeight(40);
179 topRightLayout->addWidget(marginBottmLabel, 2, 0);
180 topRightWidget->setLayout(topRightLayout);
184 code->
setIcon(
":/image/lb_app_logo", 0.23);
185 topRightLayout->addWidget(code, 3, 2, 1, 6);
188 topFuncLayout->addWidget(topLineWidget);
189 topFuncLayout->addWidget(topRightWidget);
190 topFuncWidget->setLayout(topFuncLayout);
191 grid->addWidget(topFuncWidget);
193 QWidget *functionWidget =
new QWidget(
this);
195 QHBoxLayout *hLayout =
new QHBoxLayout(functionWidget);
200 m_songButton->setCursor(QCursor(Qt::PointingHandCursor));
203 QPushButton *infoButton =
new QPushButton(functionWidget);
204 infoButton->setText(tr(
"Info"));
205 infoButton->setFixedSize(100, 25);
206 infoButton->setCursor(QCursor(Qt::PointingHandCursor));
207 hLayout->addWidget(infoButton);
208 functionWidget->setLayout(hLayout);
210 QPushButton *commentsButton =
new QPushButton(functionWidget);
211 commentsButton->setText(tr(
"Comments"));
212 commentsButton->setFixedSize(100, 25);
213 commentsButton->setCursor(QCursor(Qt::PointingHandCursor));
214 hLayout->addWidget(commentsButton);
215 hLayout->addStretch(1);
216 functionWidget->setLayout(hLayout);
218 QButtonGroup *buttonGroup =
new QButtonGroup(
this);
220 buttonGroup->addButton(infoButton, 1);
221 buttonGroup->addButton(commentsButton, 2);
225 playAllButton->setFocusPolicy(Qt::NoFocus);
226 shareButton->setFocusPolicy(Qt::NoFocus);
228 infoButton->setFocusPolicy(Qt::NoFocus);
229 commentsButton->setFocusPolicy(Qt::NoFocus);
231 grid->addWidget(functionWidget);
235 function->setLayout(grid);
249 connect(query, SIGNAL(downloadDataChanged(QString)), SLOT(
queryAllFinished()));
The class of the search result data item.
static const QString FontStyle03
static bool isCoverValid(const QString &url) noexcept
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 FontStyle06
static const QString PushButtonStyle03
#define QtButtonGroupConnect(p, q, f, s)
Button group connect.
The class of the rating label.
static const QString ColorStyle11
#define G_DOWNLOAD_QUERY_PTR
The class of the cover data download request.
The class of the abstract query data from net.