16 QPushButton *shareListButton =
new QPushButton(
this);
17 shareListButton->setToolTip(tr(
"Share Playlist"));
19 shareListButton->setCursor(QCursor(Qt::PointingHandCursor));
20 shareListButton->setGeometry(265, 12, 16, 16);
22 QPushButton *menuButton =
new QPushButton(
this);
23 menuButton->setToolTip(tr(
"Menu"));
25 menuButton->setCursor(QCursor(Qt::PointingHandCursor));
26 menuButton->setGeometry(290, 12, 16, 16);
27 connect(menuButton, SIGNAL(clicked()), SLOT(
showMenu()));
30 shareListButton->setFocusPolicy(Qt::NoFocus);
31 menuButton->setFocusPolicy(Qt::NoFocus);
88 menu.addAction(tr(
"Create Item"),
this, SIGNAL(
addNewRowItem()));
93 menu.addMenu(&addNewFiles)->setEnabled(disable);
101 QMenu sortFiles(tr(
"Sort"), &menu);
102 sortFiles.addAction(tr(
"Sort By FileName"))->setData(0);
103 sortFiles.addAction(tr(
"Sort By Singer"))->setData(1);
104 sortFiles.addAction(tr(
"Sort By FileSize"))->setData(2);
105 sortFiles.addAction(tr(
"Sort By AddTime"))->setData(3);
106 sortFiles.addAction(tr(
"Sort By Duration"))->setData(4);
107 sortFiles.addAction(tr(
"Sort By PlayCount"))->setData(5);
109 connect(&sortFiles, SIGNAL(triggered(QAction*)), SLOT(
songListSortBy(QAction*)));
113 const QList<QAction*> actions(sortFiles.actions());
117 actions[
m_songSort->
m_type]->setIcon(QIcon(asc ?
":/tiny/lb_sort_asc" :
":/tiny/lb_sort_desc"));
120 menu.addMenu(&sortFiles);
127 menu.addAction(QIcon(
":/contextMenu/btn_delete"), tr(
"Delete Item"),
this, SLOT(
deleteRowItemChanged()))->setEnabled(disable);
130 menu.exec(QCursor::pos());
138 const int newType = action->data().toInt();
179 QPainter painter(
this);
180 painter.setRenderHints(QPainter::Antialiasing);
185 painter.fillRect(0, 1, width(), height() - 2, QColor(0, 0, 0, 50));
196 m_isBlockMoveExpand =
true;
200 m_updateTimer =
new QTimer(
this);
201 m_updateTimer->setInterval(200 *
TTK_DN_MS);
202 connect(m_updateTimer, SIGNAL(timeout()), SLOT(update()));
203 m_updateTimer->start();
217 QWidget::paintEvent(event);
218 QPainter painter(
this);
220 QLinearGradient gradient;
221 gradient.setStart(0, 32);
222 gradient.setFinalStop(0, height());
223 gradient.setColorAt(0.1, QColor(150, 150, 150, 150));
224 gradient.setColorAt(0.9, QColor(180, 180, 180, 50));
225 painter.fillRect(0, 32, width(), height(), gradient);
228 painter.drawPixmap(0, 0, width(), height() - 3, pix.copy(1, 91, width(), height() - 3));
229 painter.fillRect(QRect(0, 0, width(), height() - 3), QColor(255, 255, 255, alpha));
269 if(it->
item() == item)
static MusicApplication * instance()
TTK_MODULE_EXPORT bool playlistRowValid(int index)
static constexpr const char * TinyBtnShare
The class of the item rename edit.
The class of the music song sort tag.
static const QString MenuStyle02
void exportSongsItem(int index)
static unsigned char alpha[symbols+1]
static constexpr const char * TinyBtnListMenu
#define MUSIC_NORMAL_LIST
#define TTKObjectCast(x, y)
#define LEFT_SIDE_WIDTH_MIN