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);
89 menu.addAction(tr(
"Create Item"),
this, SIGNAL(
addNewRowItem()));
94 menu.addMenu(&addNewFiles)->setEnabled(disable);
102 QMenu sortFiles(tr(
"Sort"), &menu);
103 sortFiles.addAction(tr(
"Sort By FileName"))->setData(0);
104 sortFiles.addAction(tr(
"Sort By Singer"))->setData(1);
105 sortFiles.addAction(tr(
"Sort By FileSize"))->setData(2);
106 sortFiles.addAction(tr(
"Sort By AddTime"))->setData(3);
107 sortFiles.addAction(tr(
"Sort By Duration"))->setData(4);
108 sortFiles.addAction(tr(
"Sort By PlayCount"))->setData(5);
110 connect(&sortFiles, SIGNAL(triggered(QAction*)), SLOT(
songListSortBy(QAction*)));
114 const QList<QAction*> actions(sortFiles.actions());
118 actions[
m_songSort->
m_type]->setIcon(QIcon(asc ?
":/tiny/lb_sort_asc" :
":/tiny/lb_sort_desc"));
121 menu.addMenu(&sortFiles);
128 menu.addAction(QIcon(
":/contextMenu/btn_delete"), tr(
"Delete Item"),
this, SLOT(
deleteRowItemChanged()))->setEnabled(disable);
131 menu.exec(QCursor::pos());
139 const int newType = action->data().toInt();
180 QPainter painter(
this);
181 painter.setRenderHints(QPainter::Antialiasing);
186 painter.fillRect(0, 1, width(), height() - 2, QColor(0, 0, 0, 50));
197 m_isBlockMoveExpand =
true;
201 m_updateTimer =
new QTimer(
this);
202 m_updateTimer->setInterval(200 *
TTK_DN_MS);
203 connect(m_updateTimer, SIGNAL(timeout()), SLOT(update()));
204 m_updateTimer->start();
216 alpha = TTK::Image::reRenderValue<int>(0xFF, 0x1F,
TTK_RN_MAX -
alpha);
218 QWidget::paintEvent(event);
219 QPainter painter(
this);
221 QLinearGradient gradient;
222 gradient.setStart(0, 32);
223 gradient.setFinalStop(0, height());
224 gradient.setColorAt(0.1, QColor(150, 150, 150, 150));
225 gradient.setColorAt(0.9, QColor(180, 180, 180, 50));
226 painter.fillRect(0, 32, width(), height(), gradient);
229 painter.drawPixmap(0, 0, width(), height() - 3, pix.copy(1, 91, width(), height() - 3));
230 painter.fillRect(QRect(0, 0, width(), height() - 3), QColor(255, 255, 255, alpha));
270 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.
void exportSongsItemList(int index)
The class of the music song sort tag.
static const QString MenuStyle02
static unsigned char alpha[symbols+1]
static constexpr const char * TinyBtnListMenu
#define MUSIC_NORMAL_LIST
#define TTKObjectCast(x, y)
#define LEFT_SIDE_WIDTH_MIN