From c315e170639e39f7f4e5be4a76bdd722900245d0 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sat, 2 May 2020 22:01:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=95=E6=93=8E=E5=AF=B9?= =?UTF-8?q?=E6=88=98=E7=9A=84=20Key=20=E6=A0=BC=E5=BC=8F=E4=B8=BA=20KeyN?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 并把程序名的 Key 调到最后。 --- src/test/test.cpp | 35 +++++++++++++++++++---------------- src/test/test.h | 2 +- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/test/test.cpp b/src/test/test.cpp index de44a4d3..fe75a9d8 100644 --- a/src/test/test.cpp +++ b/src/test/test.cpp @@ -48,28 +48,31 @@ Test::Test(QWidget *parent, QString k) readMemoryTimer->stop(); keyCombo->setEditable(true); + + keyCombo->addItem(QString("Key0")); + keyCombo->addItem(QString("Key1")); + keyCombo->addItem(QString("Key2")); + keyCombo->addItem(QString("Key3")); + keyCombo->addItem(QString("Key4")); + keyCombo->addItem(QString("Key5")); + keyCombo->addItem(QString("Key6")); + keyCombo->addItem(QString("Key7")); + keyCombo->addItem(QString("Key8")); + keyCombo->addItem(QString("Key9")); + keyCombo->addItem(QString("KeyA")); + keyCombo->addItem(QString("KeyB")); + keyCombo->addItem(QString("KeyC")); + keyCombo->addItem(QString("KeyD")); + keyCombo->addItem(QString("KeyE")); + keyCombo->addItem(QString("KeyF")); + #ifdef TEST_MODE QString appFileName = getAppFileName(); if (appFileName != APP_FILENAME_DEFAULT) { keyCombo->addItem(QString(appFileName)); } #endif // TEST_MODE - keyCombo->addItem(QString("MillGame-Key-0")); - keyCombo->addItem(QString("MillGame-Key-1")); - keyCombo->addItem(QString("MillGame-Key-2")); - keyCombo->addItem(QString("MillGame-Key-3")); - keyCombo->addItem(QString("MillGame-Key-4")); - keyCombo->addItem(QString("MillGame-Key-5")); - keyCombo->addItem(QString("MillGame-Key-6")); - keyCombo->addItem(QString("MillGame-Key-7")); - keyCombo->addItem(QString("MillGame-Key-8")); - keyCombo->addItem(QString("MillGame-Key-9")); - keyCombo->addItem(QString("MillGame-Key-A")); - keyCombo->addItem(QString("MillGame-Key-B")); - keyCombo->addItem(QString("MillGame-Key-C")); - keyCombo->addItem(QString("MillGame-Key-D")); - keyCombo->addItem(QString("MillGame-Key-E")); - keyCombo->addItem(QString("MillGame-Key-F")); + auto keyLabel = new QLabel(tr("&Key:")); keyLabel->setBuddy(keyCombo); diff --git a/src/test/test.h b/src/test/test.h index c1c34641..ac8ab7a7 100644 --- a/src/test/test.h +++ b/src/test/test.h @@ -35,7 +35,7 @@ class Test : public QDialog Q_OBJECT public: - explicit Test(QWidget *parent = nullptr, QString key = "MillGame-Key-0"); + explicit Test(QWidget *parent = nullptr, QString key = "Key0"); ~Test(); void setKey(QString k)