|
Added |
emumaster_0.3.1.tar.gz/src/base/.touchinputdevice.cpp.swp
|
|
Added |
emumaster_0.3.1.tar.gz/src/base/.touchinputdevice.h.swp
^
|
[-]
[+]
|
Changed |
emumaster_0.3.1.tar.gz/src/base/touchinputdevice.cpp
^
|
@@ -19,6 +19,7 @@
#include <QTouchEvent>
#include <QPainter>
#include <QDebug>
+#include <QSettings>
enum ButtonsInImage {
Button_Settings,
@@ -51,8 +52,6 @@
TouchInputDevice::TouchInputDevice(QObject *parent) :
HostInputDevice("touch", QObject::tr("Touch Screen"), parent),
m_numPoints(0),
- m_areaSize(512),
- m_diagonalAreaSize(512/4),
m_gridVisible(true),
m_lrVisible(false),
m_gridColor(Qt::white),
@@ -67,8 +66,18 @@
m_buttonsImage.load(pathManager.installationDirPath()+"/data/buttons.png");
- m_width = 640;
- m_height = 480;
+ QSettings = settings;
+
+ settings.setValue("inputDevice/test", "testSetting");
+ m_areaSize = settings.value("inputDevice/areaSize", 512).toInt();
+ m_diagonalAreaSize = m_areaSize / 4;
+
+ m_width = settings.value("inputDevice/width", 640).toInt();
+ m_height = settings.value("inputDevice/height", 480).toInt();
+
+ ButtonWidth = settings.value("inputDevice/ButtonWidth", 256).toInt();
+ ButtonHeight = settings.value("inputDevice/ButtonHeight", 192).toInt();
+ PaintedButtonSize = settings.value("inputDevice/PaintedButtonSize", 192).toInt();
}
//void TouchInputDevice::setHostVideo(HostVideo *hostVideo)
|
[-]
[+]
|
Changed |
emumaster_0.3.1.tar.gz/src/base/touchinputdevice.h
^
|
@@ -83,9 +83,9 @@
void onEmuFunctionChanged();
private:
static const int MaxPoints = 4;
- static const int ButtonWidth = 256;
- static const int ButtonHeight = 192;
- static const int PaintedButtonSize = 192;
+ int ButtonWidth = 256;
+ int ButtonHeight = 192;
+ int PaintedButtonSize = 192;
void setupEmuFunctionList();
void convertPad();
|