summaryrefslogtreecommitdiffstats
path: root/archivecontroller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'archivecontroller.cpp')
-rw-r--r--archivecontroller.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/archivecontroller.cpp b/archivecontroller.cpp
index 574b9c1..a7d0501 100644
--- a/archivecontroller.cpp
+++ b/archivecontroller.cpp
@@ -71,7 +71,7 @@ void ArchiveController::playSelectedFiles(){
QModelIndexList sel = mFileSelection->selectedRows();
QStringList files;
foreach(QModelIndex i, sel){
- if(i.data(ArchiveFilesModel::FileTypeRole).toInt() == ArchiveFilesModel::Movie){
+ if(i.data(ArchiveFilesModel::FileTypeRole).toInt() == FT_MOVIE){
QString fullPath = i.data(ArchiveFilesModel::FullPathRole).toString();
QFileInfo fi(fullPath);
if(fi.exists()){
@@ -132,13 +132,13 @@ void ArchiveController::editFileType(){
if(ok && !item.isEmpty()){
int newType = 0;
if(item == tr("Movie")){
- newType = ArchiveFilesModel::Movie;
+ newType = FT_MOVIE;
}else if(item == tr("Front Cover")){
- newType = ArchiveFilesModel::FrontCover;
+ newType = FT_FRONTCOVER;
}else if(item == tr("Back Cover")){
- newType = ArchiveFilesModel::BackCover;
+ newType = FT_BACKCOVER;
}else if(item == tr("General Cover")){
- newType = ArchiveFilesModel::GeneralCover;
+ newType = FT_GENERALCOVER;
}
if(newType){
foreach(QModelIndex i, sel){
@@ -189,7 +189,7 @@ void ArchiveController::showPreview(){
QFileInfo fi(first);
if(!fi.exists()){
pv->setFile();
- }else if(sel.first().data(ArchiveFilesModel::FileTypeRole).toInt() == ArchiveFilesModel::Movie){
+ }else if(sel.first().data(ArchiveFilesModel::FileTypeRole).toInt() == FT_MOVIE){
qApp->setOverrideCursor(Qt::BusyCursor);
QPixmap preview = Helper::preview(first);
if(!preview.isNull()){
@@ -279,7 +279,7 @@ void ArchiveController::fileSelectionChanged(const QItemSelection &selected, con
foreach(QModelIndex i, sel){
size += i.data(ArchiveFilesModel::SizeRole).toInt();
int type = i.data(ArchiveFilesModel::FileTypeRole).toInt();
- if(type == ArchiveFilesModel::Movie){
+ if(type == FT_MOVIE){
int dur = i.data(ArchiveFilesModel::SizeDurRole).toInt();
duration += dur;
if(dur == 0){
@@ -296,7 +296,7 @@ void ArchiveController::fileDoubleClicked(const QModelIndex &idx){
return;
}
int type = idx.data(ArchiveFilesModel::FileTypeRole).toInt();
- if(type == ArchiveFilesModel::Movie){
+ if(type == FT_MOVIE){
QString fullPath = idx.data(ArchiveFilesModel::FullPathRole).toString();
QFileInfo fi(fullPath);
if(!fi.exists()){