12 m_commentsWidget(nullptr)
61 QScrollArea *scrollArea =
new QScrollArea(
this);
63 layout()->addWidget(scrollArea);
67 QVBoxLayout *grid =
new QVBoxLayout(
function);
69 QWidget *firstTopFuncWidget =
new QWidget(
function);
70 QHBoxLayout *firstTopFuncLayout =
new QHBoxLayout(firstTopFuncWidget);
72 QLabel *firstLabel =
new QLabel(
function);
73 firstLabel->setText(tr(
"<font color=#158FE1> Playlist > %1 </font>").arg(item.
m_name));
75 QPushButton *backButton =
new QPushButton(tr(
"Back"));
76 backButton->setFixedSize(90, 30);
78 backButton->setCursor(QCursor(Qt::PointingHandCursor));
79 connect(backButton, SIGNAL(clicked()), obj, SLOT(backToPlaylistMenu()));
81 firstTopFuncLayout->addWidget(firstLabel);
82 firstTopFuncLayout->addWidget(backButton);
83 grid->addWidget(firstTopFuncWidget);
85 QWidget *topFuncWidget =
new QWidget(
function);
86 QHBoxLayout *topFuncLayout =
new QHBoxLayout(topFuncWidget);
89 m_iconLabel->setPixmap(QPixmap(
":/image/lb_warning").scaled(180, 180));
95 connect(d, SIGNAL(downLoadRawDataChanged(QByteArray)), SLOT(
downLoadFinished(QByteArray)));
99 QWidget *topLineWidget =
new QWidget(topFuncWidget);
100 QVBoxLayout *topLineLayout =
new QVBoxLayout(topLineWidget);
101 topLineLayout->setContentsMargins(10, 5, 5, 0);
103 QLabel *playlistLabel =
new QLabel(topLineWidget);
104 QFont playlistFont = playlistLabel->font();
105 playlistFont.setPixelSize(20);
106 playlistLabel->setFont(playlistFont);
108 playlistLabel->setToolTip(item.
m_name);
110 QLabel *creatorLabel =
new QLabel(topLineWidget);
112 creatorLabel->setToolTip(tr(
"Creator: %1").arg(item.
m_nickName));
114 QLabel *tagsLabel =
new QLabel(topLineWidget);
116 tagsLabel->setToolTip(tr(
"Tags: %1").arg(item.
m_category));
118 QLabel *updateLabel =
new QLabel(topLineWidget);
120 updateLabel->setToolTip(tr(
"Update: %1").arg(item.
m_updateTime));
122 topLineLayout->addWidget(playlistLabel);
123 topLineLayout->addWidget(creatorLabel);
124 topLineLayout->addWidget(tagsLabel);
125 topLineLayout->addWidget(updateLabel);
126 topLineWidget->setLayout(topLineLayout);
128 QWidget *topButtonWidget =
new QWidget(topFuncWidget);
130 QHBoxLayout *topButtonLayout =
new QHBoxLayout(topButtonWidget);
131 topButtonLayout->setContentsMargins(0, 0, 0, 0);
133 QPushButton *playAllButton =
new QPushButton(tr(
"Play All"), topButtonWidget);
134 QPushButton *shareButton =
new QPushButton(tr(
"Share"), topButtonWidget);
136 playAllButton->setIcon(QIcon(
":/contextMenu/btn_play_white"));
137 playAllButton->setIconSize(QSize(14, 14));
138 playAllButton->setCursor(QCursor(Qt::PointingHandCursor));
139 shareButton->setCursor(QCursor(Qt::PointingHandCursor));
140 playAllButton->setFixedSize(90, 30);
141 shareButton->setFixedSize(55, 30);
143 topButtonLayout->addWidget(playAllButton);
144 topButtonLayout->addWidget(shareButton);
145 topButtonLayout->addStretch(1);
146 topButtonWidget->setLayout(topButtonLayout);
147 topLineLayout->addWidget(topButtonWidget);
152 QWidget *topRightWidget =
new QWidget(topFuncWidget);
153 QGridLayout *topRightLayout =
new QGridLayout(topRightWidget);
154 topRightLayout->setContentsMargins(0, 0, 0, 0);
155 topRightLayout->setSpacing(0);
157 QLabel *numberLabel =
new QLabel(topRightWidget);
158 numberLabel->setAlignment(Qt::AlignCenter);
162 numberLabel->setText(QString(
"%1.%2").arg(number).arg(
TTK::random(10)));
163 topRightLayout->addWidget(numberLabel, 0, 0);
164 topRightLayout->addWidget(
new MusicRatingLabel(ceil(number / 2.0), topRightWidget), 0, 1, 1, 6);
166 QLabel *numberTextLabel =
new QLabel(tr(
"Score:"), topRightWidget);
167 topRightLayout->addWidget(numberTextLabel, 1, 0);
168 topRightLayout->addWidget(
new MusicRatingLabel(topRightWidget), 1, 1, 1, 6);
170 QLabel *marginBottmLabel =
new QLabel(topRightWidget);
171 marginBottmLabel->setFixedHeight(40);
172 topRightLayout->addWidget(marginBottmLabel, 2, 0);
173 topRightWidget->setLayout(topRightLayout);
177 code->
setIcon(
":/image/lb_app_logo", 0.23);
178 topRightLayout->addWidget(code, 3, 2, 1, 6);
181 topFuncLayout->addWidget(topLineWidget);
182 topFuncLayout->addWidget(topRightWidget);
183 topFuncWidget->setLayout(topFuncLayout);
184 grid->addWidget(topFuncWidget);
186 QWidget *functionWidget =
new QWidget(
this);
188 QHBoxLayout *hLayout =
new QHBoxLayout(functionWidget);
193 m_songButton->setCursor(QCursor(Qt::PointingHandCursor));
196 QPushButton *infoButton =
new QPushButton(functionWidget);
197 infoButton->setText(tr(
"Info"));
198 infoButton->setFixedSize(100, 25);
199 infoButton->setCursor(QCursor(Qt::PointingHandCursor));
200 hLayout->addWidget(infoButton);
201 functionWidget->setLayout(hLayout);
203 QPushButton *commentsButton =
new QPushButton(functionWidget);
204 commentsButton->setText(tr(
"Comments"));
205 commentsButton->setFixedSize(100, 25);
206 commentsButton->setCursor(QCursor(Qt::PointingHandCursor));
207 hLayout->addWidget(commentsButton);
208 hLayout->addStretch(1);
209 functionWidget->setLayout(hLayout);
211 QButtonGroup *buttonGroup =
new QButtonGroup(
this);
213 buttonGroup->addButton(infoButton, 1);
214 buttonGroup->addButton(commentsButton, 2);
218 backButton->setFocusPolicy(Qt::NoFocus);
219 playAllButton->setFocusPolicy(Qt::NoFocus);
220 shareButton->setFocusPolicy(Qt::NoFocus);
222 infoButton->setFocusPolicy(Qt::NoFocus);
223 commentsButton->setFocusPolicy(Qt::NoFocus);
225 grid->addWidget(functionWidget);
229 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
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.
static const QString ColorStyle11
#define G_DOWNLOAD_QUERY_PTR
The class of the cover data download request.
The class of the abstract query download data from net.
#define TTKObjectCast(x, y)