forked from AntiMicroX/antimicrox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestbuttoneditdialog.cpp
83 lines (61 loc) · 2.59 KB
/
testbuttoneditdialog.cpp
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* antimicrox Gamepad to KB+M event mapper
* Copyright (C) 2015 Travis Nickles <nickles.travis@gmail.com>
* Copyright (C) 2020 Jagoda Górska <juliagoda.pl@protonmail>
* Copyright (C) 2020 Paweł Kotiuk <kotiuk@zohomail.eu>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "buttoneditdialog.h"
#include <QtTest/QtTest>
/*
if slotSummaryLabel->text() == tr("[NO KEY]") and lastJoyButton is nullptr lastJoyButton->getSlotsString().replace("&", "&&") == tr("[NO KEY]") then advancedPushButton should be disabled
if slotSummaryLabel->text() != tr("[NO KEY]") and lastJoyButton is not nullptr and lastJoyButton->getSlotsString().replace("&", "&&") != tr("[NO KEY]") then
advancedPushButton should be enabled
toggleCheckBox should be checked if lastJoyButton->getToggleState()
turboCheckBox should be checked if lastJoyButton->isUsingTurbo()
buttonNameLineEdit cannot be disabled
actionNameLineEdit cannot be disabled
buttonBox->Cancel cannot be disabled
virtualKeyMouseTabWidget->tab(0)->->findChildren<VirtualKeyPushButton*> ()
check if each
QString getXcodestring() const; != ""
QString getDisplayString() const; != tr("[NO KEY]")
int getKeycode() const; != 0
int getQkeyalias() const; != 0
only if it's not a none button and otherKeysPushbutton
QList<VirtualMousePushButton*> newlist = mouseTab->findChildren<VirtualMousePushButton*>();
QListIterator<VirtualMousePushButton*> iter(newlist);
while (iter.hasNext())
{
VirtualMousePushButton *mousebutton = iter.next();
// test if getMouseCode() is not null or less
}
getOtherKeysMenu()-actions()
if AntKeyMapper::getInstance()->returnQtKey(oneFromListAction) != 0
*/
class TestButtonEditDialog: public QObject
{
Q_OBJECT
public:
TestButtonEditDialog(QObject* parent = 0);
private slots:
private:
ButtonEditDialog buttonEditDialog;
};
TestButtonEditDialog::TestButtonEditDialog(QObject* parent) :
QObject(parent),
buttonEditDialog()
{
QTestEventLoop::instance().enterLoop(1);
}
// QTEST_MAIN(TestButtonEditDialog)
#include "testbuttoneditdialog.moc"