64 if(songInfos.isEmpty())
66 m_statusLabel->setPixmap(QPixmap(
":/image/lb_no_album_found"));
73 if(
m_value.contains(info.m_songName))
83 m_statusLabel->setPixmap(QPixmap(
":/image/lb_no_album_found"));
96 const TTK::MusicSongInformationList &songInfos = d->
items();
97 if(songInfos.isEmpty())
99 m_statusLabel->setPixmap(QPixmap(
":/image/lb_no_album_found"));
118 connect(d, SIGNAL(downLoadRawDataChanged(QByteArray)), SLOT(
downLoadFinished(QByteArray)));
123 for(
int i = 0; i < list.count(); ++i)
125 if(list[i].isEmpty())
134 data->
m_label->setText(tr(
"<font color=#158FE1> Alubm > %1 </font>").arg(list[0]));
137 data->
m_label->setToolTip(list[0]);
141 data->
m_label->setToolTip(tr(
"Singer: %1").arg(item.
m_name));
145 data->
m_label->setToolTip(tr(
"Language: %1").arg(list[1]));
149 data->
m_label->setToolTip(tr(
"Company: %1").arg(list[2]));
153 data->
m_label->setToolTip(tr(
"Year: %1").arg(list[3]));
167 QScrollArea *scrollArea =
new QScrollArea(
this);
169 layout()->addWidget(scrollArea);
173 QVBoxLayout *grid =
new QVBoxLayout(
function);
175 QLabel *firstLabel =
new QLabel(
function);
176 grid->addWidget(firstLabel);
178 QWidget *topFuncWidget =
new QWidget(
function);
179 QHBoxLayout *topFuncLayout =
new QHBoxLayout(topFuncWidget);
182 m_iconLabel->setPixmap(QPixmap(
":/image/lb_warning").scaled(180, 180));
185 QWidget *topLineWidget =
new QWidget(topFuncWidget);
186 QVBoxLayout *topLineLayout =
new QVBoxLayout(topLineWidget);
187 topLineLayout->setContentsMargins(10, 5, 5, 0);
189 QLabel *albumLabel =
new QLabel(topLineWidget);
190 QFont albumFont = albumLabel->font();
191 albumFont.setPixelSize(20);
192 albumLabel->setFont(albumFont);
196 QLabel *singerLabel =
new QLabel(topLineWidget);
200 QLabel *languageLabel =
new QLabel(topLineWidget);
204 QLabel *companyLabel =
new QLabel(topLineWidget);
208 QLabel *yearLabel =
new QLabel(topLineWidget);
212 topLineLayout->addWidget(albumLabel);
213 topLineLayout->addWidget(singerLabel);
214 topLineLayout->addWidget(languageLabel);
215 topLineLayout->addWidget(companyLabel);
216 topLineLayout->addWidget(yearLabel);
217 topLineWidget->setLayout(topLineLayout);
219 QWidget *topButtonWidget =
new QWidget(topFuncWidget);
220 QHBoxLayout *topButtonLayout =
new QHBoxLayout(topButtonWidget);
221 topButtonLayout->setContentsMargins(0, 0, 0, 0);
223 QPushButton *playAllButton =
new QPushButton(tr(
"Play All"), topButtonWidget);
224 QPushButton *shareButton =
new QPushButton(tr(
"Share"), topButtonWidget);
226 playAllButton->setIcon(QIcon(
":/contextMenu/btn_play_white"));
227 playAllButton->setIconSize(QSize(14, 14));
228 playAllButton->setCursor(QCursor(Qt::PointingHandCursor));
229 shareButton->setCursor(QCursor(Qt::PointingHandCursor));
230 playAllButton->setFixedSize(90, 30);
231 shareButton->setFixedSize(55, 30);
233 topButtonLayout->addWidget(playAllButton);
234 topButtonLayout->addWidget(shareButton);
235 topButtonLayout->addStretch(1);
236 topButtonWidget->setLayout(topButtonLayout);
237 topLineLayout->addWidget(topButtonWidget);
242 QWidget *topRightWidget =
new QWidget(topFuncWidget);
243 QGridLayout *topRightLayout =
new QGridLayout(topRightWidget);
244 topRightLayout->setContentsMargins(0, 0, 0, 0);
245 topRightLayout->setSpacing(0);
247 QLabel *numberLabel =
new QLabel(topRightWidget);
248 numberLabel->setAlignment(Qt::AlignCenter);
252 numberLabel->setText(QString(
"%1.%2").arg(number).arg(
TTK::random(10)));
253 topRightLayout->addWidget(numberLabel, 0, 0);
254 topRightLayout->addWidget(
new MusicRatingLabel(ceil(number / 2.0), topRightWidget), 0, 1, 1, 6);
256 QLabel *numberTextLabel =
new QLabel(tr(
"Score:"), topRightWidget);
257 topRightLayout->addWidget(numberTextLabel, 1, 0);
258 topRightLayout->addWidget(
new MusicRatingLabel(topRightWidget), 1, 1, 1, 6);
260 QLabel *marginBottmLabel =
new QLabel(topRightWidget);
261 marginBottmLabel->setFixedHeight(40);
262 topRightLayout->addWidget(marginBottmLabel, 2, 0);
263 topRightWidget->setLayout(topRightLayout);
267 code->
setIcon(
":/image/lb_app_logo", 0.23);
268 topRightLayout->addWidget(code, 3, 2, 1, 6);
271 topFuncLayout->addWidget(topLineWidget);
272 topFuncLayout->addWidget(topRightWidget);
273 topFuncWidget->setLayout(topFuncLayout);
274 grid->addWidget(topFuncWidget);
276 QWidget *functionWidget =
new QWidget(
this);
278 QHBoxLayout *hLayout =
new QHBoxLayout(functionWidget);
283 m_songButton->setCursor(QCursor(Qt::PointingHandCursor));
285 hLayout->addStretch(1);
286 functionWidget->setLayout(hLayout);
288 QButtonGroup *buttonGroup =
new QButtonGroup(
this);
293 playAllButton->setFocusPolicy(Qt::NoFocus);
294 shareButton->setFocusPolicy(Qt::NoFocus);
297 grid->addWidget(functionWidget);
301 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.
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