12 connect(
this, SIGNAL(cellDoubleClicked(
int,
int)), SLOT(
itemDoubleClicked(
int,
int)));
42 for(
int i = 0; i <
m_songs->count(); ++i)
53 message.
setText(tr(
"Are you sure to delete?"));
54 if(!message.
exec() || rowCount() == 0)
60 if(deletedList.isEmpty())
65 for(
int i = deletedList.count() - 1; i >= 0; --i)
67 const int index = deletedList[i];
86 const QString &path =
m_songs->at(currentRow()).path();
92 for(
int i = 0; i < rowCount(); ++i)
94 QTableWidgetItem *it = item(i, 3);
98 item(i, 3)->setText(total);
100 (*m_songs)[i].setSizeStr(total);
109 setRowCount(rowCount() + 1);
112 record.
setName(fin.completeBaseName());
113 record.
setPath(fin.absoluteFilePath());
128 menu.addAction(QIcon(
":/contextMenu/btn_play"), tr(
"Play"),
this, SLOT(
playClicked()));
136 menu.addAction(QIcon(
":/contextMenu/btn_local_file"), tr(
"Open File Dir"),
this, SLOT(
openFileDir()))->setEnabled(status);
137 menu.addAction(QIcon(
":/contextMenu/btn_ablum"), tr(
"Ablum"),
this, SLOT(
showAlbumQueryWidget()));
140 menu.addAction(QIcon(
":/contextMenu/btn_delete"), tr(
"Delete"),
this, SLOT(
removeItemAt()))->setEnabled(status);
141 menu.addAction(tr(
"Delete All"),
this, SLOT(
clearItems()))->setEnabled(status);
143 menu.exec(QCursor::pos());
#define G_DOWNLOAD_MANAGER_PTR
void setText(const QString &text) const
virtual bool writeBuffer(const MusicSongList &items) overridefinal
bool fromFile(const QString &name)
The class of the progress bar item delegate.
#define TTK_PROGRESS_ROLE
void setStyleSheet(const QString &style) const
The class of the download record manager.
The class of the messagebox widget.
static const QString ProgressBar01
ProgressBar.
virtual bool readBuffer(MusicSongList &items) overridefinal
void setName(const QString &n) noexcept
void setAddTimeStr(const QString &t) noexcept
The namespace of the process utils.
void setSizeStr(const QString &s) noexcept
The class of the download manager pair.
static const QString MenuStyle02
QString addTimeStr() const noexcept
TTK_MODULE_EXPORT QString toString(Record type)
bool load(const QString &name)
The class of the music song info.
void setPath(const QString &p) noexcept
TTK_MODULE_EXPORT bool isNetworkUrl(const QString &path)