diff options
author | Arno <am@disconnect.de> | 2010-07-18 12:51:36 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-07-18 12:51:36 +0200 |
commit | 6d00ae1d57ed37a8d3d6d35181cb6b155dd7801c (patch) | |
tree | 04dee534c2a3e3f62f134c9434ab0a4718e759bf /filestreemodel.h | |
parent | 1bffedb2177e7b42112ccb5d0a98076eab0dc0a9 (diff) | |
download | SheMov-6d00ae1d57ed37a8d3d6d35181cb6b155dd7801c.tar.gz SheMov-6d00ae1d57ed37a8d3d6d35181cb6b155dd7801c.tar.bz2 SheMov-6d00ae1d57ed37a8d3d6d35181cb6b155dd7801c.zip |
Implemented delete files from tree view
Files can now be delete from the files tree view. When doing so, the
files will be deleted permanently and also removed from the database.
Diffstat (limited to 'filestreemodel.h')
-rw-r--r-- | filestreemodel.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/filestreemodel.h b/filestreemodel.h index 8da3d6f..feba751 100644 --- a/filestreemodel.h +++ b/filestreemodel.h @@ -36,6 +36,8 @@ class FilesTreeModel : public SmTreeModel { //file manipulation bool addFile(const QString &fullPath, int type, int quality, int filePart, int seriesPartId, int dvd = -1); + bool deleteFile(const QModelIndex &file); + bool deleteFiles(const QModelIndexList &files); private: void populate(QSqlQuery &filesQuery); @@ -44,6 +46,7 @@ class FilesTreeModel : public SmTreeModel { QSqlQuery *mUpdateQualityQuery; QSqlQuery *mInsertFileQuery; QSqlQuery *mFilesQuery; + QSqlQuery *mDeleteFileQuery; }; #endif // FILESTREEMODEL_H |