11 m_commentsWidget(nullptr)
60 QScrollArea *scrollArea =
new QScrollArea(
this);
62 layout()->addWidget(scrollArea);
66 QVBoxLayout *grid =
new QVBoxLayout(
function);
68 QWidget *firstTopFuncWidget =
new QWidget(
function);
69 QHBoxLayout *firstTopFuncLayout =
new QHBoxLayout(firstTopFuncWidget);
71 QLabel *firstLabel =
new QLabel(
function);
72 firstLabel->setText(tr(
"<font color=#158FE1> Playlist > %1 </font>").arg(item.
m_name));
74 QPushButton *backButton =
new QPushButton(tr(
"Back"));
75 backButton->setFixedSize(90, 30);
77 backButton->setCursor(QCursor(Qt::PointingHandCursor));
78 connect(backButton, SIGNAL(clicked()), obj, SLOT(backToPlaylistMenu()));
80 firstTopFuncLayout->addWidget(firstLabel);
81 firstTopFuncLayout->addWidget(backButton);
82 grid->addWidget(firstTopFuncWidget);
84 QWidget *topFuncWidget =
new QWidget(
function);
85 QHBoxLayout *topFuncLayout =
new QHBoxLayout(topFuncWidget);
88 m_iconLabel->setPixmap(QPixmap(
":/image/lb_warning").scaled(180, 180));
94 connect(d, SIGNAL(downLoadRawDataChanged(QByteArray)), SLOT(
downLoadFinished(QByteArray)));
98 QWidget *topLineWidget =
new QWidget(topFuncWidget);
99 QVBoxLayout *topLineLayout =
new QVBoxLayout(topLineWidget);
100 topLineLayout->setContentsMargins(10, 5, 5, 0);
102 QLabel *nameLabel =
new QLabel(topLineWidget);
103 QFont nameFont = nameLabel->font();
104 nameFont.setPixelSize(20);
105 nameLabel->setFont(nameFont);
107 nameLabel->setToolTip(item.
m_name);
109 QLabel *creatorLabel =
new QLabel(topLineWidget);
111 creatorLabel->setToolTip(tr(
"Creator: %1").arg(item.
m_nickName));
113 QLabel *tagsLabel =
new QLabel(topLineWidget);
115 tagsLabel->setToolTip(tr(
"Tags: %1").arg(item.
m_category));
117 QLabel *updateLabel =
new QLabel(topLineWidget);
119 updateLabel->setToolTip(tr(
"UpdateTime: %1").arg(item.
m_time));
121 topLineLayout->addWidget(nameLabel);
122 topLineLayout->addWidget(creatorLabel);
123 topLineLayout->addWidget(tagsLabel);
124 topLineLayout->addWidget(updateLabel);
125 topLineWidget->setLayout(topLineLayout);
127 QWidget *topButtonWidget =
new QWidget(topFuncWidget);
129 QHBoxLayout *topButtonLayout =
new QHBoxLayout(topButtonWidget);
130 topButtonLayout->setContentsMargins(0, 0, 0, 0);
132 QPushButton *playAllButton =
new QPushButton(tr(
"Play All"), topButtonWidget);
133 QPushButton *shareButton =
new QPushButton(tr(
"Share"), topButtonWidget);
135 playAllButton->setIcon(QIcon(
":/contextMenu/btn_play_white"));
136 playAllButton->setIconSize(QSize(14, 14));
137 playAllButton->setCursor(QCursor(Qt::PointingHandCursor));
138 shareButton->setCursor(QCursor(Qt::PointingHandCursor));
139 playAllButton->setFixedSize(90, 30);
140 shareButton->setFixedSize(55, 30);
142 topButtonLayout->addWidget(playAllButton);
143 topButtonLayout->addWidget(shareButton);
144 topButtonLayout->addStretch(1);
145 topButtonWidget->setLayout(topButtonLayout);
146 topLineLayout->addWidget(topButtonWidget);
151 QWidget *topRightWidget =
new QWidget(topFuncWidget);
152 QGridLayout *topRightLayout =
new QGridLayout(topRightWidget);
153 topRightLayout->setContentsMargins(0, 0, 0, 0);
154 topRightLayout->setSpacing(0);
156 QLabel *numberLabel =
new QLabel(topRightWidget);
157 numberLabel->setAlignment(Qt::AlignCenter);
161 numberLabel->setText(QString(
"%1.%2").arg(number).arg(
TTK::random(10)));
162 topRightLayout->addWidget(numberLabel, 0, 0);
163 topRightLayout->addWidget(
new MusicRatingLabel(ceil(number / 2.0), topRightWidget), 0, 1, 1, 6);
165 QLabel *numberTextLabel =
new QLabel(tr(
"Score:"), topRightWidget);
166 topRightLayout->addWidget(numberTextLabel, 1, 0);
167 topRightLayout->addWidget(
new MusicRatingLabel(topRightWidget), 1, 1, 1, 6);
169 QLabel *marginBottmLabel =
new QLabel(topRightWidget);
170 marginBottmLabel->setFixedHeight(40);
171 topRightLayout->addWidget(marginBottmLabel, 2, 0);
172 topRightWidget->setLayout(topRightLayout);
176 code->
setIcon(
":/image/lb_app_logo", 0.23);
177 topRightLayout->addWidget(code, 3, 2, 1, 6);
180 topFuncLayout->addWidget(topLineWidget);
181 topFuncLayout->addWidget(topRightWidget);
182 topFuncWidget->setLayout(topFuncLayout);
183 grid->addWidget(topFuncWidget);
185 QWidget *functionWidget =
new QWidget(
this);
187 QHBoxLayout *hLayout =
new QHBoxLayout(functionWidget);
192 m_songButton->setCursor(QCursor(Qt::PointingHandCursor));
195 QPushButton *infoButton =
new QPushButton(functionWidget);
196 infoButton->setText(tr(
"Info"));
197 infoButton->setFixedSize(100, 25);
198 infoButton->setCursor(QCursor(Qt::PointingHandCursor));
199 hLayout->addWidget(infoButton);
200 functionWidget->setLayout(hLayout);
202 QPushButton *commentsButton =
new QPushButton(functionWidget);
203 commentsButton->setText(tr(
"Comments"));
204 commentsButton->setFixedSize(100, 25);
205 commentsButton->setCursor(QCursor(Qt::PointingHandCursor));
206 hLayout->addWidget(commentsButton);
207 hLayout->addStretch(1);
208 functionWidget->setLayout(hLayout);
210 QButtonGroup *buttonGroup =
new QButtonGroup(
this);
212 buttonGroup->addButton(infoButton, 1);
213 buttonGroup->addButton(commentsButton, 2);
217 backButton->setFocusPolicy(Qt::NoFocus);
218 playAllButton->setFocusPolicy(Qt::NoFocus);
219 shareButton->setFocusPolicy(Qt::NoFocus);
221 infoButton->setFocusPolicy(Qt::NoFocus);
222 commentsButton->setFocusPolicy(Qt::NoFocus);
224 grid->addWidget(functionWidget);
228 function->setLayout(grid);
242 connect(query, SIGNAL(downLoadDataChanged(QString)), SLOT(
queryAllFinished()));
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.