21 QFrame::paintEvent(event);
22 QPainter painter(
this);
23 painter.setRenderHint(QPainter::Antialiasing);
25 QLinearGradient gradient;
26 gradient.setStart(0, 32);
27 gradient.setFinalStop(0, height());
28 gradient.setColorAt(0.1, QColor(150, 150, 150, 150));
29 gradient.setColorAt(0.9, QColor(180, 180, 180, 50));
30 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);
218 for(
int i = songs.count() - 1; i >= 0; --i)
264 QPoint pos = mapToGlobal(QPoint(0, 0));
282 bool contains =
false;
284 for(
int i = rows.count() - 1; i >= 0; --i)
286 const int row = rows[i];
314 for(
int i = 0; i < rows.count(); ++i)
337 for(
int i = 0; i < count; ++i)
367 QHBoxLayout *layout =
new QHBoxLayout(
this);
368 layout->setContentsMargins(0, 0, 0, 0);
369 layout->setSpacing(2);
371 layout->addStretch(2);
374 QLabel *label =
new QLabel(
this);
375 label->setFixedWidth(9);
376 label->setPixmap(QPixmap(
":/tiny/lb_number0"));
377 layout->addWidget(label);
380 layout->addStretch(1);
386 containLayout->setContentsMargins(0, 0, 0, 0);
387 containLayout->setSpacing(0);
394 view->setObjectName(
"Viewport");
395 view->setStyleSheet(QString(
"#%1{ %2 }").arg(view->objectName(), background));
402 QWidget *playedListContainer =
new QWidget(
m_scrollArea);
403 QVBoxLayout *playedListLayout =
new QVBoxLayout(playedListContainer);
404 playedListLayout->setContentsMargins(0, 0, 0, 0);
405 playedListLayout->setSpacing(0);
407 playedListContainer->setLayout(playedListLayout);
420 topWidget->setObjectName(
"TopWidget");
423 QHBoxLayout *topWidgetLayout =
new QHBoxLayout(topWidget);
424 topWidgetLayout->setSpacing(15);
425 QLabel *label =
new QLabel(tr(
"Played List"), topWidget);
428 QPushButton *shareButton =
new QPushButton(
this);
429 shareButton->setFixedSize(16, 16);
430 shareButton->setToolTip(tr(
"Share List"));
431 shareButton->setCursor(QCursor(Qt::PointingHandCursor));
434 QPushButton *deleteButton =
new QPushButton(
this);
435 deleteButton->setFixedSize(16, 16);
436 deleteButton->setToolTip(tr(
"Clear List"));
437 deleteButton->setCursor(QCursor(Qt::PointingHandCursor));
439 connect(deleteButton, SIGNAL(clicked()), SLOT(
clearItems()));
442 shareButton->setFocusPolicy(Qt::NoFocus);
443 deleteButton->setFocusPolicy(Qt::NoFocus);
446 QToolButton *closeButton =
new QToolButton(
this);
447 closeButton->setFixedSize(16, 16);
448 closeButton->setToolTip(tr(
"Close List"));
449 closeButton->setCursor(QCursor(Qt::PointingHandCursor));
451 connect(closeButton, SIGNAL(clicked()),
m_menu, SLOT(close()));
453 topWidgetLayout->addWidget(label);
454 topWidgetLayout->addStretch(1);
455 topWidgetLayout->addWidget(shareButton);
456 topWidgetLayout->addWidget(deleteButton);
457 topWidgetLayout->addWidget(closeButton);
458 topWidget->setLayout(topWidgetLayout);
473 for(
int i =
MAX_SIZE - 1; i >= 0; --i)
475 m_labels[i]->setPixmap(QPixmap(QString(
":/tiny/lb_number%1").arg(9)));
480 for(
int i =
MAX_SIZE - 1; i >= 0; --i)
482 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.
const MusicPlayItemList & queueList() const noexcept
static MusicApplication * instance()
static const QString FontStyle03
QString path() const noexcept
static constexpr const char * TinyBtnShare
bool isEmpty() const noexcept
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)
void removeQueue() noexcept
#define TTK_SIGNLE_SHOT(...)
static const QString ColorStyle08
void setCurrentIndex(int index)
static const QString BackgroundStyle10
int currentIndex() const noexcept
void append(int playlistRow, const QString &content)
The class of the music song info.
The class of the music play list.
void update(const TTK::IndexPropertyList &rows)
static constexpr const char * TinyBtnClose
#define LEFT_SIDE_WIDTH_MIN