Merge pull request #82 from barry-ran/dev

Dev
This commit is contained in:
Barry 2020-02-16 12:25:04 +08:00 committed by GitHub
commit 9a0c0a1ce6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 25 additions and 7 deletions

View file

@ -36,6 +36,20 @@ public:
QPointF pos = QPointF(0, 0); // normal key
QPointF extendPos = QPointF(0, 0); // for drag
double extendOffset = 0.0; // for steerWheel
KeyNode(ActionType type = AT_INVALID,
int key = Qt::Key_unknown,
QPointF pos = QPointF(0, 0),
QPointF extendPos = QPointF(0, 0),
double extendOffset = 0.0)
: type(type)
, key(key)
, pos(pos)
, extendPos(extendPos)
, extendOffset(extendOffset)
{
}
};
struct KeyMapNode {
@ -112,7 +126,7 @@ private:
static QString s_keyMapPath;
QVector<KeyMapNode> m_keyMapNodes;
KeyNode m_switchKey = { AT_KEY, Qt::Key_QuoteLeft };
KeyNode m_switchKey = {AT_KEY, Qt::Key_QuoteLeft};
// just for return
KeyMapNode m_invalidNode;

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>420</width>
<height>471</height>
<height>492</height>
</rect>
</property>
<property name="minimumSize">
@ -472,7 +472,7 @@
</property>
<property name="maximumSize">
<size>
<width>40</width>
<width>60</width>
<height>16777215</height>
</size>
</property>

View file

@ -31,8 +31,10 @@ int main(int argc, char *argv[])
//update version
QStringList versionList = QCoreApplication::applicationVersion().split(".");
QString version = versionList[0] + "." + versionList[1] + "." + versionList[2];
a.setApplicationVersion(version);
if (versionList.size() >= 3) {
QString version = versionList[0] + "." + versionList[1] + "." + versionList[2];
a.setApplicationVersion(version);
}
installTranslator();
#if defined(Q_OS_WIN32) || defined(Q_OS_OSX)

View file

@ -19,13 +19,13 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.4</string>
<string>1.2.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.0.4</string>
<string>1.2.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
<key>NSHumanReadableCopyright</key>

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

View file

@ -11,6 +11,8 @@
- 按键映射中的坐标位置都是用相对位置表示的屏幕的宽高都用1表示例如屏幕的像素为1920x1080那么坐标(0.5,0.5)则表示的是
以屏幕左上角为原点,像素坐标(1920,1080)*(0.5,0.5)=(960,540)的位置。
- 按键映射中的按键码是用Qt的枚举表示的详细说明可以[参考Qt文档]( https://doc.qt.io/qt-5/qt.html )(搜索 The key names used by Qt. 可以快速定位)。
- 开发人员选项中打开如下两个设置,可以方便的观察触摸点的坐标:
![](image/显示指针位置.jpg)
### 映射类型说明

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.