ManaPlus
src
gui
widgets
tabs
setup_input.h
Go to the documentation of this file.
1
/*
2
* The ManaPlus Client
3
* Copyright (C) 2007 Joshua Langley <
[email protected]
>
4
* Copyright (C) 2009 The Mana World Development Team
5
* Copyright (C) 2009-2010 The Mana Developers
6
* Copyright (C) 2011-2019 The ManaPlus Developers
7
* Copyright (C) 2019-2021 Andrei Karas
8
*
9
* This file is part of The ManaPlus Client.
10
*
11
* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 2 of the License, or
14
* any later version.
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
20
*
21
* You should have received a copy of the GNU General Public License
22
* along with this program. If not, see <http://www.gnu.org/licenses/>.
23
*/
24
25
#ifndef GUI_WIDGETS_TABS_SETUP_INPUT_H
26
#define GUI_WIDGETS_TABS_SETUP_INPUT_H
27
28
#include "
enums/input/inputaction.h
"
29
30
#include "
gui/widgets/tabs/setuptab.h
"
31
32
class
Button
;
33
class
ListBox
;
34
class
KeyListModel
;
35
class
ScrollArea
;
36
class
TabStrip
;
37
38
struct
SetupActionData
;
39
40
class
Setup_Input
final
:
public
SetupTab
41
{
42
public
:
46
explicit
Setup_Input
(
const
Widget2
*
const
widget);
47
48
A_DELETE_COPY
(
Setup_Input
)
49
50
53
~Setup_Input
()
override
final
;
54
55
void
apply
()
override
final
;
56
57
void
cancel
()
override
final
;
58
59
void
action
(
const
ActionEvent
&event)
override
final
;
60
64
void
refreshAssignedKey
(
const
int
index);
65
69
void
newKeyCallback
(
const
InputActionT
index);
70
74
void
refreshKeys
();
75
79
void
keyUnresolved
();
80
81
int
keyToSetupData
(
const
InputActionT
index)
const
A_WARN_UNUSED
;
82
83
std::string
keyToString
(
const
InputActionT
index)
const
A_WARN_UNUSED
;
84
85
private
:
86
static
void
fixTranslations
();
87
88
static
void
fixTranslation
(
SetupActionData
*
const
actionDatas,
89
const
InputActionT
actionStart,
90
const
InputActionT
actionEnd,
91
const
std::string &text)
A_NONNULL
(1);
92
93
KeyListModel
*
mKeyListModel
;
94
ListBox
*
mKeyList
;
95
96
Button
*
mAssignKeyButton
;
97
Button
*
mUnassignKeyButton
;
98
Button
*
mDefaultButton
;
99
Button
*
mResetKeysButton
;
100
TabStrip
*
mTabs
;
101
ScrollArea
*
mScrollArea
;
102
bool
mKeySetting
;
103
int
*
mActionDataSize
;
104
};
105
106
#endif
// GUI_WIDGETS_TABS_SETUP_INPUT_H
ActionEvent
Definition:
actionevent.h:98
Button
Definition:
button.h:102
KeyListModel
Definition:
keylistmodel.h:42
ListBox
Definition:
listbox.h:94
ScrollArea
Definition:
scrollarea.h:94
SetupTab
Definition:
setuptab.h:40
Setup_Input
Definition:
setup_input.h:41
Setup_Input::mUnassignKeyButton
Button * mUnassignKeyButton
Definition:
setup_input.h:97
Setup_Input::mResetKeysButton
Button * mResetKeysButton
Definition:
setup_input.h:99
Setup_Input::mTabs
TabStrip * mTabs
Definition:
setup_input.h:100
Setup_Input::action
void action(const ActionEvent &event)
Definition:
setup_input.cpp:190
Setup_Input::keyToString
std::string keyToString(const InputActionT index) const
Definition:
setup_input.cpp:327
Setup_Input::refreshKeys
void refreshKeys()
Definition:
setup_input.cpp:342
Setup_Input::keyToSetupData
int keyToSetupData(const InputActionT index) const
Definition:
setup_input.cpp:315
Setup_Input::mScrollArea
ScrollArea * mScrollArea
Definition:
setup_input.h:101
Setup_Input::fixTranslation
static void fixTranslation(SetupActionData *const actionDatas, const InputActionT actionStart, const InputActionT actionEnd, const std::string &text)
Definition:
setup_input.cpp:358
Setup_Input::apply
void apply()
Definition:
setup_input.cpp:152
Setup_Input::~Setup_Input
~Setup_Input()
Definition:
setup_input.cpp:140
Setup_Input::fixTranslations
static void fixTranslations()
Definition:
setup_input.cpp:379
Setup_Input::cancel
void cancel()
Definition:
setup_input.cpp:182
Setup_Input::mKeyList
ListBox * mKeyList
Definition:
setup_input.h:94
Setup_Input::mKeySetting
bool mKeySetting
Definition:
setup_input.h:102
Setup_Input::newKeyCallback
void newKeyCallback(const InputActionT index)
Definition:
setup_input.cpp:306
Setup_Input::mAssignKeyButton
Button * mAssignKeyButton
Definition:
setup_input.h:96
Setup_Input::mKeyListModel
KeyListModel * mKeyListModel
Definition:
setup_input.h:93
Setup_Input::mActionDataSize
int * mActionDataSize
Definition:
setup_input.h:103
Setup_Input::mDefaultButton
Button * mDefaultButton
Definition:
setup_input.h:98
Setup_Input::keyUnresolved
void keyUnresolved()
Definition:
setup_input.cpp:349
Setup_Input::Setup_Input
Setup_Input(const Widget2 *const widget)
Definition:
setup_input.cpp:61
Setup_Input::refreshAssignedKey
void refreshAssignedKey(const int index)
Definition:
setup_input.cpp:282
TabStrip
Definition:
tabstrip.h:28
Widget2
Definition:
widget2.h:37
inputaction.h
InputActionT
InputAction ::T InputActionT
Definition:
inputaction.h:717
A_WARN_UNUSED
#define A_WARN_UNUSED
Definition:
localconsts.h:161
A_NONNULL
#define A_NONNULL(...)
Definition:
localconsts.h:168
final
#define final
Definition:
localconsts.h:46
A_DELETE_COPY
#define A_DELETE_COPY(func)
Definition:
localconsts.h:53
setuptab.h
SetupActionData
Definition:
setupactiondata.h:35
Generated on Wed Mar 17 2021 19:19:07 for ManaPlus by
1.9.1