TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicartistquerywidget.cpp
Go to the documentation of this file.
3 #include "musiccoverrequest.h"
5 #include "musicrightareawidget.h"
6 #include "musicpagequerywidget.h"
7 #include "musictinyuiobject.h"
8 #include "musicratinglabel.h"
9 
10 #include "qrencode/qrcodewidget.h"
11 
12 static constexpr int WIDTH_LABEL_SIZE = 150;
13 static constexpr int HEIGHT_LABEL_SIZE = 200;
14 static constexpr int LINE_SPACING_SIZE = 200;
15 
17  : QLabel(parent)
18 {
19  setFixedSize(WIDTH_LABEL_SIZE, HEIGHT_LABEL_SIZE);
20 
21  m_playButton = new QPushButton(this);
22  m_playButton->setGeometry(110, 110, 30, 30);
23  m_playButton->setCursor(Qt::PointingHandCursor);
25  connect(m_playButton, SIGNAL(clicked()), SLOT(currentItemClicked()));
26 
27 #ifdef Q_OS_UNIX
28  m_playButton->setFocusPolicy(Qt::NoFocus);
29 #endif
30 
31  m_iconLabel = new QLabel(this);
32  m_iconLabel->setGeometry(0, 0, WIDTH_LABEL_SIZE, WIDTH_LABEL_SIZE);
33 
34  m_nameLabel = new QLabel(this);
35  m_nameLabel->setGeometry(0, 150, WIDTH_LABEL_SIZE, 25);
36  m_nameLabel->setText(TTK_DEFAULT_STR);
37 
38  m_updateLabel = new QLabel(this);
39  m_updateLabel->setGeometry(0, 175, WIDTH_LABEL_SIZE, 25);
41 }
42 
44 {
45  delete m_playButton;
46  delete m_iconLabel;
47  delete m_nameLabel;
48  delete m_updateLabel;
49 }
50 
52 {
53  m_itemData = item;
54  m_nameLabel->setToolTip(item.m_name);
55  m_nameLabel->setText(TTK::Widget::elidedText(m_nameLabel->font(), m_nameLabel->toolTip(), Qt::ElideRight, WIDTH_LABEL_SIZE));
56  m_updateLabel->setToolTip(item.m_updateTime);
57  m_updateLabel->setText(TTK::Widget::elidedText(m_updateLabel->font(), m_updateLabel->toolTip(), Qt::ElideRight, WIDTH_LABEL_SIZE));
58 
60  {
61  MusicCoverRequest *d = G_DOWNLOAD_QUERY_PTR->makeCoverRequest(this);
62  connect(d, SIGNAL(downLoadRawDataChanged(QByteArray)), SLOT(downLoadFinished(QByteArray)));
63  d->startToRequest(item.m_coverUrl);
64  }
65 }
66 
67 void MusicArtistAlbumsItemWidget::downLoadFinished(const QByteArray &bytes)
68 {
69  if(bytes.isEmpty())
70  {
71  TTK_ERROR_STREAM("Input byte data is empty");
72  return;
73  }
74 
75  MusicImageRenderer *render = new MusicImageRenderer(sender());
76  connect(render, SIGNAL(renderFinished(QPixmap)), SLOT(renderFinished(QPixmap)));
77  render->setInputData(bytes, m_iconLabel->size());
78  render->start();
79 }
80 
82 {
83  m_iconLabel->setPixmap(data);
84  m_playButton->raise();
85 }
86 
88 {
90 }
91 
92 
93 
96  m_initialized(false),
97  m_pageQueryWidget(nullptr)
98 {
99  delete m_statusLabel;
100  m_statusLabel = nullptr;
101 
102  QWidget *function = new QWidget(m_mainWindow);
103  m_gridLayout = new QGridLayout(function);
104  function->setLayout(m_gridLayout);
105  m_mainWindow->layout()->addWidget(function);
106  m_container->show();
107 
109 
110  m_networkRequest = G_DOWNLOAD_QUERY_PTR->makeArtistMovieRequest(this);
111  connect(m_networkRequest, SIGNAL(createMovieItem(MusicResultDataItem)), SLOT(createArtistMvsItem(MusicResultDataItem)));
112 }
113 
115 {
116  delete m_gridLayout;
117 }
118 
120 {
123 }
124 
126 {
127  setCurrentValue(id);
128 }
129 
131 {
132  if(!m_resizeWidgets.isEmpty())
133  {
134  for(const TTKResizeWidget &widget : qAsConst(m_resizeWidgets))
135  {
136  m_gridLayout->removeWidget(widget.m_label);
137  }
138 
139  const int lineNumber = QUERY_WIDGET_WIDTH / LINE_SPACING_SIZE;
140  for(int i = 0; i < m_resizeWidgets.count(); ++i)
141  {
142  m_gridLayout->addWidget(m_resizeWidgets[i].m_label, i / lineNumber, i % lineNumber, Qt::AlignCenter);
143  }
144  }
145 }
146 
148 {
149  if(!m_initialized)
150  {
151  m_initialized = true;
153  connect(m_pageQueryWidget, SIGNAL(clicked(int)), SLOT(buttonClicked(int)));
154 
156  }
157 
159  connect(label, SIGNAL(currentItemClicked(QString)), SLOT(currentItemClicked(QString)));
160  label->setResultDataItem(item);
161 
162  const int lineNumber = QUERY_WIDGET_WIDTH / LINE_SPACING_SIZE;
163  m_gridLayout->addWidget(label, m_resizeWidgets.count() / lineNumber, m_resizeWidgets.count() % lineNumber, Qt::AlignCenter);
164 
165  m_resizeWidgets.push_back({label, label->font()});
166 }
167 
169 {
171 }
172 
174 {
175  while(!m_resizeWidgets.isEmpty())
176  {
177  QWidget *w = m_resizeWidgets.takeLast().m_label;
178  m_gridLayout->removeWidget(w);
179  delete w;
180  }
181 
184 }
185 
186 
187 
190  m_initialized(false),
191  m_pageQueryWidget(nullptr)
192 {
193  delete m_statusLabel;
194  m_statusLabel = nullptr;
195 
196  QWidget *function = new QWidget(m_mainWindow);
197  m_gridLayout = new QGridLayout(function);
198  function->setLayout(m_gridLayout);
199  m_mainWindow->layout()->addWidget(function);
200  m_container->show();
201 
203 
204  m_networkRequest = G_DOWNLOAD_QUERY_PTR->makeArtistAlbumRequest(this);
205  connect(m_networkRequest, SIGNAL(createAlbumItem(MusicResultDataItem)), SLOT(createArtistAlbumsItem(MusicResultDataItem)));
206 }
207 
209 {
210  delete m_gridLayout;
211 }
212 
214 {
217 }
218 
220 {
221  setCurrentValue(id);
222 }
223 
225 {
226  if(!m_resizeWidgets.isEmpty())
227  {
228  for(const TTKResizeWidget &widget : qAsConst(m_resizeWidgets))
229  {
230  m_gridLayout->removeWidget(widget.m_label);
231  }
232 
233  const int lineNumber = QUERY_WIDGET_WIDTH / LINE_SPACING_SIZE;
234  for(int i = 0; i < m_resizeWidgets.count(); ++i)
235  {
236  m_gridLayout->addWidget(m_resizeWidgets[i].m_label, i / lineNumber, i % lineNumber, Qt::AlignCenter);
237  }
238  }
239 }
240 
242 {
243  if(!m_initialized)
244  {
245  m_initialized = true;
247  connect(m_pageQueryWidget, SIGNAL(clicked(int)), SLOT(buttonClicked(int)));
248 
250  }
251 
253  connect(label, SIGNAL(currentItemClicked(QString)), SLOT(currentItemClicked(QString)));
254  label->setResultDataItem(item);
255 
256  const int lineNumber = QUERY_WIDGET_WIDTH / LINE_SPACING_SIZE;
257  m_gridLayout->addWidget(label, m_resizeWidgets.count() / lineNumber, m_resizeWidgets.count() % lineNumber, Qt::AlignCenter);
258 
259  m_resizeWidgets.push_back({label, label->font()});
260 }
261 
263 {
265 }
266 
268 {
269  while(!m_resizeWidgets.isEmpty())
270  {
271  QWidget *w = m_resizeWidgets.takeLast().m_label;
272  m_gridLayout->removeWidget(w);
273  delete w;
274  }
275 
278 }
279 
280 
281 
283  : MusicItemQueryTableWidget(parent)
284 {
285 
286 }
287 
289 {
290  removeItems();
291 }
292 
294 {
296  if(parent()->metaObject()->indexOfSlot("queryArtistFinished()") != -1)
297  {
298  connect(m_networkRequest, SIGNAL(downLoadDataChanged(QString)), parent(), SLOT(queryArtistFinished()));
299  }
300 }
301 
302 
303 
306  m_artistAlbums(nullptr),
307  m_artistMvs(nullptr)
308 {
310  m_queryTableWidget->hide();
311 
313 
314  m_networkRequest = G_DOWNLOAD_QUERY_PTR->makeQueryRequest(this);
315  connect(m_networkRequest, SIGNAL(downLoadDataChanged(QString)), SLOT(queryAllFinished()));
316 }
317 
319 {
320  delete m_artistAlbums;
321  delete m_artistMvs;
322 }
323 
324 void MusicArtistQueryWidget::setCurrentValue(const QString &value)
325 {
330 }
331 
333 {
335  MusicAbstractQueryRequest *d = G_DOWNLOAD_QUERY_PTR->makeArtistRequest(this);
339 }
340 
342 {
344 
345  if(!m_resizeWidgets.isEmpty())
346  {
347  const int width = G_SETTING_PTR->value(MusicSettingManager::WidgetSize).toSize().width() - WINDOW_WIDTH_MIN + 180;
348 
349  TTKResizeWidget *data = &m_resizeWidgets[1];
350  data->m_label->setText(TTK::Widget::elidedText(data->m_font, data->m_label->toolTip(), Qt::ElideRight, width));
351 
352  data = &m_resizeWidgets[2];
353  data->m_label->setText(TTK::Widget::elidedText(data->m_font, data->m_label->toolTip(), Qt::ElideRight, width - 20));
354 
355  data = &m_resizeWidgets[3];
356  data->m_label->setText(TTK::Widget::elidedText(data->m_font, data->m_label->toolTip(), Qt::ElideRight, width));
357  }
358 
359  if(m_artistAlbums)
360  {
362  }
363 
364  if(m_artistMvs)
365  {
367  }
368 }
369 
371 {
373  {
374  m_queryTableWidget->hide();
375  }
376 
377  if(m_infoLabel)
378  {
379  m_infoLabel->hide();
380  }
381 
382  delete m_artistAlbums;
383  m_artistAlbums = nullptr;
384 
385  delete m_artistMvs;
386  m_artistMvs = nullptr;
387 
388  if(index == 0 && m_queryTableWidget)
389  {
390  m_queryTableWidget->show();
391  }
392  else if(index == 1 && m_infoLabel)
393  {
394  m_infoLabel->show();
395  }
396  else if(index == 2)
397  {
399  m_container->addWidget(m_artistAlbums);
401  }
402  else if(index == 3)
403  {
405  m_container->addWidget(m_artistMvs);
407  }
408 
409  m_container->setCurrentIndex(index > 2 ? 2 : index);
410 }
411 
413 {
414  const TTK::MusicSongInformationList songInfos(m_networkRequest->items());
415  if(songInfos.isEmpty())
416  {
417  m_statusLabel->setPixmap(QPixmap(":/image/lb_no_artist_found"));
418  }
419  else
420  {
421  bool hasItem = false;
422  for(const TTK::MusicSongInformation &info : qAsConst(songInfos))
423  {
424  if(m_value.contains(info.m_artistName))
425  {
426  hasItem = true;
427  setCurrentID(info.m_artistId);
428  break;
429  }
430  }
431 
432  if(!hasItem)
433  {
434  m_statusLabel->setPixmap(QPixmap(":/image/lb_no_artist_found"));
435  }
436  }
437 }
438 
440 {
442  if(!d)
443  {
444  return;
445  }
446 
447  const TTK::MusicSongInformationList songInfos(d->items());
448  if(songInfos.isEmpty())
449  {
450  m_statusLabel->setPixmap(QPixmap(":/image/lb_no_artist_found"));
451  }
452  else
453  {
455  }
456 }
457 
459 {
460  m_currentPlaylistItem = item;
461 
462  createLabels();
463 
464  if(!m_resizeWidgets.isEmpty())
465  {
466  if(TTK::isCoverValid(item.m_coverUrl))
467  {
468  MusicCoverRequest *d = G_DOWNLOAD_QUERY_PTR->makeCoverRequest(this);
469  connect(d, SIGNAL(downLoadRawDataChanged(QByteArray)), SLOT(downLoadFinished(QByteArray)));
470  d->startToRequest(item.m_coverUrl);
471  }
472 
473  const int width = G_SETTING_PTR->value(MusicSettingManager::WidgetSize).toSize().width() - WINDOW_WIDTH_MIN + 180;
474 
475  TTKResizeWidget *data = &m_resizeWidgets[0];
476  data->m_label->setText(tr("<font color=#158FE1> Artist > %1 </font>").arg(item.m_name));
477 
478  data = &m_resizeWidgets[1];
479  data->m_label->setToolTip(item.m_name);
480  data->m_label->setText(TTK::Widget::elidedText(data->m_font, data->m_label->toolTip(), Qt::ElideRight, width));
481 
482  data = &m_resizeWidgets[2];
483  data->m_label->setToolTip(tr("NickName: %1").arg(item.m_nickName));
484  data->m_label->setText(TTK::Widget::elidedText(data->m_font, data->m_label->toolTip(), Qt::ElideRight, width - 20));
485 
486  data = &m_resizeWidgets[3];
487  data->m_label->setToolTip(tr("Birth: %1").arg(item.m_updateTime));
488  data->m_label->setText(TTK::Widget::elidedText(data->m_font, data->m_label->toolTip(), Qt::ElideRight, width));
489 
490  m_infoLabel->setText(item.m_description);
491  }
492 }
493 
495 {
496  delete m_statusLabel;
497  m_statusLabel = nullptr;
498 
499  initFirstWidget();
501  m_container->show();
502 
503  layout()->removeWidget(m_mainWindow);
504  QScrollArea *scrollArea = new QScrollArea(this);
506  layout()->addWidget(scrollArea);
507 
508  QWidget *function = new QWidget(m_mainWindow);
509  function->setStyleSheet(TTK::UI::CheckBoxStyle01 + TTK::UI::PushButtonStyle03);
510  QVBoxLayout *grid = new QVBoxLayout(function);
511 
512  QLabel *firstLabel = new QLabel(function);
513  grid->addWidget(firstLabel);
514  //
515  QWidget *topFuncWidget = new QWidget(function);
516  QHBoxLayout *topFuncLayout = new QHBoxLayout(topFuncWidget);
517 
518  m_iconLabel = new QLabel(topFuncWidget);
519  m_iconLabel->setPixmap(QPixmap(":/image/lb_warning").scaled(180, 180));
520  m_iconLabel->setFixedSize(210, 180);
521  //
522  QWidget *topLineWidget = new QWidget(topFuncWidget);
523  QVBoxLayout *topLineLayout = new QVBoxLayout(topLineWidget);
524  topLineLayout->setContentsMargins(10, 5, 5, 0);
525 
526  QLabel *artistLabel = new QLabel(topLineWidget);
527  QFont artistFont = artistLabel->font();
528  artistFont.setPixelSize(20);
529  artistLabel->setFont(artistFont);
530  artistLabel->setStyleSheet(TTK::UI::FontStyle01);
531  artistLabel->setText(TTK_DEFAULT_STR);
532 
533  QLabel *nickNameLabel = new QLabel(topLineWidget);
534  nickNameLabel->setStyleSheet(TTK::UI::ColorStyle04 + TTK::UI::FontStyle03);
535  nickNameLabel->setText(TTK_DEFAULT_STR);
536 
537  QLabel *birthLabel = new QLabel(topLineWidget);
538  birthLabel->setStyleSheet(TTK::UI::ColorStyle04 + TTK::UI::FontStyle03);
539  birthLabel->setText(TTK_DEFAULT_STR);
540 
541  topLineLayout->addWidget(artistLabel);
542  topLineLayout->addWidget(nickNameLabel);
543  topLineLayout->addWidget(birthLabel);
544  topLineWidget->setLayout(topLineLayout);
545 
546  QWidget *topButtonWidget = new QWidget(topFuncWidget);
547  topButtonWidget->setStyleSheet(TTK::UI::PushButtonStyle03);
548  QHBoxLayout *topButtonLayout = new QHBoxLayout(topButtonWidget);
549  topButtonLayout->setContentsMargins(0, 0, 0, 0);
550 
551  QPushButton *playAllButton = new QPushButton(tr("Play All"), topButtonWidget);
552  QPushButton *shareButton = new QPushButton(tr("Share"), topButtonWidget);
553 
554  playAllButton->setIcon(QIcon(":/contextMenu/btn_play_white"));
555  playAllButton->setIconSize(QSize(14, 14));
556  playAllButton->setCursor(QCursor(Qt::PointingHandCursor));
557  shareButton->setCursor(QCursor(Qt::PointingHandCursor));
558  playAllButton->setFixedSize(90, 30);
559  shareButton->setFixedSize(55, 30);
560 
561  topButtonLayout->addWidget(playAllButton);
562  topButtonLayout->addWidget(shareButton);
563  topButtonLayout->addStretch(1);
564  topButtonWidget->setLayout(topButtonLayout);
565  topLineLayout->addWidget(topButtonWidget);
566 
567  connect(playAllButton, SIGNAL(clicked()), SLOT(playAllButtonClicked()));
568  connect(shareButton, SIGNAL(clicked()), SLOT(shareButtonClicked()));
569  //
570  QWidget *topRightWidget = new QWidget(topFuncWidget);
571  QGridLayout *topRightLayout = new QGridLayout(topRightWidget);
572  topRightLayout->setContentsMargins(0, 0, 0, 0);
573  topRightLayout->setSpacing(0);
574 
575  QLabel *numberLabel = new QLabel(topRightWidget);
576  numberLabel->setAlignment(Qt::AlignCenter);
577  numberLabel->setStyleSheet(TTK::UI::FontStyle05 + TTK::UI::ColorStyle11);
578 
579  const int number = 7 + TTK::random(3);
580  numberLabel->setText(QString("%1.%2").arg(number).arg(TTK::random(10)));
581  topRightLayout->addWidget(numberLabel, 0, 0);
582  topRightLayout->addWidget(new MusicRatingLabel(ceil(number / 2.0), topRightWidget), 0, 1, 1, 6);
583 
584  QLabel *numberTextLabel = new QLabel(tr("Score:"), topRightWidget);
585  topRightLayout->addWidget(numberTextLabel, 1, 0);
586  topRightLayout->addWidget(new MusicRatingLabel(topRightWidget), 1, 1, 1, 6);
587 
588  QLabel *marginBottmLabel = new QLabel(topRightWidget);
589  marginBottmLabel->setFixedHeight(40);
590  topRightLayout->addWidget(marginBottmLabel, 2, 0);
591  topRightWidget->setLayout(topRightLayout);
592 
593  QRCodeQWidget *code = new QRCodeQWidget({}, QSize(90, 90), topRightWidget);
594  code->setMargin(2);
595  code->setIcon(":/image/lb_app_logo", 0.23);
596  topRightLayout->addWidget(code, 3, 2, 1, 6);
597 
598  topFuncLayout->addWidget(m_iconLabel);
599  topFuncLayout->addWidget(topLineWidget);
600  topFuncLayout->addWidget(topRightWidget);
601  topFuncWidget->setLayout(topFuncLayout);
602  grid->addWidget(topFuncWidget);
603  //
604  QWidget *functionWidget = new QWidget(this);
605  functionWidget->setStyleSheet(TTK::UI::PushButtonStyle03);
606  QHBoxLayout *hLayout = new QHBoxLayout(functionWidget);
607 
608  m_songButton = new QPushButton(functionWidget);
609  m_songButton->setText(tr("SongItems"));
610  m_songButton->setFixedSize(100, 25);
611  m_songButton->setCursor(QCursor(Qt::PointingHandCursor));
612  hLayout->addWidget(m_songButton);
613 
614  QPushButton *infoButton = new QPushButton(functionWidget);
615  infoButton->setText(tr("Info"));
616  infoButton->setFixedSize(100, 25);
617  infoButton->setCursor(QCursor(Qt::PointingHandCursor));
618  hLayout->addWidget(infoButton);
619 
620  QPushButton *albumsButton = new QPushButton(functionWidget);
621  albumsButton->setText(tr("Albums"));
622  albumsButton->setFixedSize(100, 25);
623  albumsButton->setCursor(QCursor(Qt::PointingHandCursor));
624  hLayout->addWidget(albumsButton);
625 
626  QPushButton *mvsButton = new QPushButton(functionWidget);
627  mvsButton->setText(tr("Movies"));
628  mvsButton->setFixedSize(100, 25);
629  mvsButton->setCursor(QCursor(Qt::PointingHandCursor));
630 
631  hLayout->addWidget(mvsButton);
632  hLayout->addStretch(1);
633  functionWidget->setLayout(hLayout);
634 
635  QButtonGroup *buttonGroup = new QButtonGroup(this);
636  buttonGroup->addButton(m_songButton, 0);
637  buttonGroup->addButton(infoButton, 1);
638  buttonGroup->addButton(albumsButton, 2);
639  buttonGroup->addButton(mvsButton, 3);
640  QtButtonGroupConnect(buttonGroup, this, setCurrentIndex, TTK_SLOT);
641 
642 #ifdef Q_OS_UNIX
643  playAllButton->setFocusPolicy(Qt::NoFocus);
644  shareButton->setFocusPolicy(Qt::NoFocus);
645  m_songButton->setFocusPolicy(Qt::NoFocus);
646  infoButton->setFocusPolicy(Qt::NoFocus);
647  albumsButton->setFocusPolicy(Qt::NoFocus);
648  mvsButton->setFocusPolicy(Qt::NoFocus);
649 #endif
650  grid->addWidget(functionWidget);
651  grid->addWidget(m_container);
652  grid->addStretch(1);
653 
654  function->setLayout(grid);
655  m_mainWindow->layout()->addWidget(function);
656 
657  m_resizeWidgets.push_back({firstLabel, firstLabel->font()});
658  m_resizeWidgets.push_back({artistLabel, artistLabel->font()});
659  m_resizeWidgets.push_back({nickNameLabel, nickNameLabel->font()});
660  m_resizeWidgets.push_back({birthLabel, birthLabel->font()});
661 }
static MusicRightAreaWidget * instance()
virtual void setQueryInput(MusicAbstractQueryRequest *query)
TTK_MODULE_EXPORT QString generateSongArtist(const QString &name, const QString &key=TTK_DEFAULT_STR)
Definition: musicsong.cpp:128
The class of the search result data item.
virtual void setCurrentValue(const QString &value) overridefinal
The class of the artist albums query widget.
virtual void setQueryInput(MusicAbstractQueryRequest *query) overridefinal
MusicArtistAlbumsQueryWidget * m_artistAlbums
static constexpr const char * TinyBtnPlaylist
#define TTK_DEFAULT_STR
Definition: ttkglobal.h:200
static const QString FontStyle03
MusicPageQueryWidget * m_pageQueryWidget
MusicArtistQueryWidget(QWidget *parent=nullptr)
MusicItemQueryTableWidget * m_queryTableWidget
MusicArtistQueryTableWidget(QWidget *parent=nullptr)
MusicArtistAlbumsItemWidget(QWidget *parent=nullptr)
int pageTotalSize() const noexcept
MusicPageQueryWidget * m_pageQueryWidget
virtual void startToRequest(const QString &url)=0
The class of the artist mvs query widget.
static const QString CheckBoxStyle01
CheckBox.
static const QString PushButtonStyle01
PushButton.
MusicArtistMvsQueryWidget(QWidget *parent=nullptr)
static const QString ColorStyle04
Definition: musicuiobject.h:46
void setIcon(const QString &path, float percent)
static constexpr int LINE_SPACING_SIZE
void createArtistAlbumsItem(const MusicResultDataItem &item)
virtual void setCurrentValue(const QString &value)
The class of the artist music query table widget.
static const QString FontStyle01
Font.
virtual void resizeWidget() overridefinal
void setMargin(const int margin)
virtual void resizeWidget() overridefinal
virtual void setCurrentID(const QString &id) overridefinal
void downLoadFinished(const QByteArray &bytes)
The class of the query item table widget.
TTK_MODULE_EXPORT int random(int value=RAND_MAX)
Definition: ttktime.cpp:14
MusicAbstractQueryRequest * queryInput() const
void createArtistItem(const MusicResultDataItem &item)
void setResultDataItem(const MusicResultDataItem &item)
#define qAsConst
Definition: ttkqtglobal.h:53
static constexpr int HEIGHT_LABEL_SIZE
virtual void setCurrentValue(const QString &value) overridefinal
static const QString FontStyle05
static const QString PushButtonStyle03
The class of the qr code widget.
Definition: qrcodewidget.h:31
static constexpr int WIDTH_LABEL_SIZE
void setInputData(const QByteArray &data, const QSize &size)
The class of the page query widget.
virtual void startToPage(int offset)
MusicArtistMvsQueryWidget * m_artistMvs
virtual void removeItems() overridefinal
TTK_MODULE_EXPORT QString elidedText(const QFont &font, const QString &text, Qt::TextElideMode mode, int width)
void page(int index, int total)
#define TTK_SLOT
Definition: ttkqtglobal.h:165
#define QtButtonGroupConnect(p, q, f, s)
Button group connect.
Definition: ttkqtcompat.h:101
static bool isCoverValid(const QString &url)
void downLoadFinished(const QByteArray &bytes)
The class of the image render thread.
void movieSearchByID(const QString &id)
The class of the rating label.
The class of the item query widget base.
Definition: inftrees.h:24
void renderFinished(const QPixmap &data)
TTK_MODULE_EXPORT void generateVScrollAreaFormat(QWidget *widget, QWidget *parent, bool background=true)
QWidget * createPageWidget(QWidget *parent, int total)
virtual void setCurrentID(const QString &id) overridefinal
MusicArtistAlbumsQueryWidget(QWidget *parent=nullptr)
virtual void startToSearchByText(const QString &text) overridefinal
void createArtistMvsItem(const MusicResultDataItem &item)
void currentItemClicked(const QString &id)
#define WINDOW_WIDTH_MIN
Definition: musicobject.h:153
MusicAbstractQueryRequest * m_networkRequest
The class of the artist albums item widget.
virtual void resizeWidget() overridefinal
static const QString ColorStyle11
Definition: musicuiobject.h:67
virtual void setCurrentValue(const QString &value) overridefinal
#define G_DOWNLOAD_QUERY_PTR
#define QUERY_WIDGET_WIDTH
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
MusicSongSharingWidget::Module m_shareType
#define TTK_ERROR_STREAM(msg)
Definition: ttklogger.h:69
virtual void setCurrentID(const QString &id) overridefinal
MusicAbstractQueryRequest * m_networkRequest
The class of the music song information.
Definition: musicobject.h:281
void currentItemClicked(const QString &id)
void albumSearchByID(const QString &id)
#define G_SETTING_PTR