summaryrefslogtreecommitdiff
path: root/src/citra_qt/config/controller_config_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/citra_qt/config/controller_config_util.h')
-rw-r--r--src/citra_qt/config/controller_config_util.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/src/citra_qt/config/controller_config_util.h b/src/citra_qt/config/controller_config_util.h
new file mode 100644
index 000000000..15e025b57
--- /dev/null
+++ b/src/citra_qt/config/controller_config_util.h
@@ -0,0 +1,82 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#ifndef _CONTROLLER_CONFIG_UTIL_HXX_
6#define _CONTROLLER_CONFIG_UTIL_HXX_
7
8#include <QWidget>
9#include <QPushButton>
10
11/* TODO(bunnei): ImplementMe
12
13#include "config.h"
14
15class GStickConfig : public QWidget
16{
17 Q_OBJECT
18
19public:
20 // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot!
21 GStickConfig(common::Config::Control leftid, common::Config::Control rightid, common::Config::Control upid, common::Config::Control downid, QObject* change_receiver, QWidget* parent = NULL);
22
23signals:
24 void LeftChanged();
25 void RightChanged();
26 void UpChanged();
27 void DownChanged();
28
29private:
30 QPushButton* left;
31 QPushButton* right;
32 QPushButton* up;
33 QPushButton* down;
34
35 QPushButton* clear;
36};
37
38class GKeyConfigButton : public QPushButton
39{
40 Q_OBJECT
41
42public:
43 // TODO: change_receiver also needs to have an ActivePortChanged(const common::Config::ControllerPort&) signal
44 // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot!
45 GKeyConfigButton(common::Config::Control id, const QIcon& icon, const QString& text, QObject* change_receiver, QWidget* parent);
46 GKeyConfigButton(common::Config::Control id, const QString& text, QObject* change_receiver, QWidget* parent);
47
48signals:
49 void KeyAssigned(common::Config::Control id, int key, const QString& text);
50
51private slots:
52 void OnActivePortChanged(const common::Config::ControllerPort& config);
53
54 void OnClicked();
55
56 void keyPressEvent(QKeyEvent* event); // TODO: bGrabbed?
57 void mousePressEvent(QMouseEvent* event);
58
59private:
60 common::Config::Control id;
61 bool inputGrabbed;
62
63 QString old_text;
64};
65
66class GButtonConfigGroup : public QWidget
67{
68 Q_OBJECT
69
70public:
71 // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot!
72 GButtonConfigGroup(const QString& name, common::Config::Control id, QObject* change_receiver, QWidget* parent = NULL);
73
74private:
75 GKeyConfigButton* config_button;
76
77 common::Config::Control id;
78};
79
80*/
81
82#endif // _CONTROLLER_CONFIG_HXX_