21 QFrame::paintEvent(event);
22 QPainter painter(
this);
24 QLinearGradient gradient;
25 gradient.setStart(0, 32);
26 gradient.setFinalStop(0, height());
27 gradient.setColorAt(0.1, QColor(150, 150, 150, 150));
28 gradient.setColorAt(0.9, QColor(180, 180, 180, 50));
29 painter.fillRect(0, 32, width(), height(), gradient);
31 painter.fillRect(QRect(0, 0, width(), height() - 3), QColor(0xED, 0xF8, 0xFE));
44 setToolTip(tr(
"Played List"));
113 }
while(index != -1);
121 remove(playlistRow, song.
path());
139 }
while(index != -1);
211 for(
int i = songs.count() - 1; i >= 0; --i)
245 QPoint pos = mapToGlobal(QPoint(0, 0));
263 bool contains =
false;
265 for(
int i = index.count() - 1; i >= 0; --i)
267 const int row = index[i];
295 for(
int i = 0; i < index.count(); ++i)
318 for(
int i = 0; i < count; ++i)
348 QHBoxLayout *layout =
new QHBoxLayout(
this);
349 layout->setContentsMargins(0, 0, 0, 0);
350 layout->setSpacing(2);
352 layout->addStretch(2);
355 QLabel *label =
new QLabel(
this);
356 label->setFixedWidth(9);
357 label->setPixmap(QPixmap(
":/tiny/lb_number0"));
358 layout->addWidget(label);
361 layout->addStretch(1);
367 containLayout->setContentsMargins(0, 0, 0, 0);
368 containLayout->setSpacing(0);
375 view->setObjectName(
"Viewport");
376 view->setStyleSheet(QString(
"#%1{ %2 }").arg(view->objectName(), background));
383 QWidget *playedListContainer =
new QWidget(
m_scrollArea);
384 QVBoxLayout *playedListLayout =
new QVBoxLayout(playedListContainer);
385 playedListLayout->setContentsMargins(0, 0, 0, 0);
386 playedListLayout->setSpacing(0);
388 playedListContainer->setLayout(playedListLayout);
401 topWidget->setObjectName(
"TopWidget");
404 QHBoxLayout *topWidgetLayout =
new QHBoxLayout(topWidget);
405 topWidgetLayout->setSpacing(15);
406 QLabel *label =
new QLabel(tr(
"Played List"), topWidget);
409 QPushButton *shareButton =
new QPushButton(
this);
410 shareButton->setFixedSize(16, 16);
411 shareButton->setToolTip(tr(
"Share List"));
412 shareButton->setCursor(QCursor(Qt::PointingHandCursor));
415 QPushButton *deleteButton =
new QPushButton(
this);
416 deleteButton->setFixedSize(16, 16);
417 deleteButton->setToolTip(tr(
"Clear List"));
418 deleteButton->setCursor(QCursor(Qt::PointingHandCursor));
420 connect(deleteButton, SIGNAL(clicked()), SLOT(
clearItems()));
423 shareButton->setFocusPolicy(Qt::NoFocus);
424 deleteButton->setFocusPolicy(Qt::NoFocus);
427 QToolButton *closeButton =
new QToolButton(
this);
428 closeButton->setFixedSize(16, 16);
429 closeButton->setToolTip(tr(
"Close List"));
430 closeButton->setCursor(QCursor(Qt::PointingHandCursor));
432 connect(closeButton, SIGNAL(clicked()),
m_menu, SLOT(close()));
434 topWidgetLayout->addWidget(label);
435 topWidgetLayout->addStretch(1);
436 topWidgetLayout->addWidget(shareButton);
437 topWidgetLayout->addWidget(deleteButton);
438 topWidgetLayout->addWidget(closeButton);
439 topWidget->setLayout(topWidgetLayout);
454 for(
int i =
MAX_SIZE - 1; i >= 0; --i)
456 m_labels[i]->setPixmap(QPixmap(QString(
":/tiny/lb_number%1").arg(9)));
461 for(
int i =
MAX_SIZE - 1; i >= 0; --i)
463 m_labels[i]->setPixmap(QPixmap(QString(
":/tiny/lb_number%1").arg(count % 10)));
void appendQueue(int playlistRow, const QString &content)
The class of the music play item.
static MusicApplication * instance()
static const QString FontStyle03
QString path() const noexcept
static constexpr const char * TinyBtnShare
void playIndexBy(int row)
The class of the app main widget.
static constexpr const char * BtnPlayedList
static constexpr const char * TinyBtnDelete
static const QString FontStyle01
Font.
void playedIndexBy(int row)
const MusicPlayItemList & queueList() const
#define TTK_SIGNLE_SHOT(...)
static const QString ColorStyle08
void setCurrentIndex(int index)
static const QString BackgroundStyle10
void update(const TTK::IndexPropertyList &indexs)
void append(int playlistRow, const QString &content)
The class of the music song info.
The class of the music play list.
static constexpr const char * TinyBtnClose
#define LEFT_SIDE_WIDTH_MIN