-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontroller.cpp
More file actions
49 lines (40 loc) · 1.26 KB
/
Copy pathcontroller.cpp
File metadata and controls
49 lines (40 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "settings.h"
#include "controller.h"
#include "macros.h"
// external global variables
extern Settings *qmc2Config;
extern bool qmc2UseControllerFile;
extern bool qmc2ScaledController;
Controller::Controller(QWidget *parent)
: ImageWidget(parent)
{
artworkHash.insert(imageTypeNumeric(), this);
}
Controller::~Controller()
{
artworkHash.remove(imageTypeNumeric());
}
QString Controller::imageZip()
{
return qmc2Config->value(QMC2_EMULATOR_PREFIX + "FilesAndDirectories/ControllerFile").toString();
}
QString Controller::imageDir()
{
return cleanDir(qmc2Config->value(QMC2_EMULATOR_PREFIX + "FilesAndDirectories/ControllerDirectory").toString());
}
bool Controller::useZip()
{
return qmc2UseControllerFile && qmc2Config->value(QMC2_EMULATOR_PREFIX + "FilesAndDirectories/ControllerFileType").toInt() == QMC2_IMG_FILETYPE_ZIP;
}
bool Controller::useSevenZip()
{
return qmc2UseControllerFile && qmc2Config->value(QMC2_EMULATOR_PREFIX + "FilesAndDirectories/ControllerFileType").toInt() == QMC2_IMG_FILETYPE_7Z;
}
bool Controller::useArchive()
{
return qmc2UseControllerFile && qmc2Config->value(QMC2_EMULATOR_PREFIX + "FilesAndDirectories/ControllerFileType").toInt() == QMC2_IMG_FILETYPE_ARCHIVE;
}
bool Controller::scaledImage()
{
return qmc2ScaledController;
}