From 63e46abdb8764bc97e91bae862c8d461e61b1965 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 8 Apr 2014 19:25:03 -0400 Subject: got rid of 'src' folders in each sub-project --- src/citra_qt/config/controller_config.cpp | 91 ++++++++ src/citra_qt/config/controller_config.hxx | 52 +++++ src/citra_qt/config/controller_config.ui | 308 +++++++++++++++++++++++++ src/citra_qt/config/controller_config_util.cpp | 121 ++++++++++ src/citra_qt/config/controller_config_util.hxx | 78 +++++++ src/citra_qt/config/ui_controller_config.h | 222 ++++++++++++++++++ 6 files changed, 872 insertions(+) create mode 100644 src/citra_qt/config/controller_config.cpp create mode 100644 src/citra_qt/config/controller_config.hxx create mode 100644 src/citra_qt/config/controller_config.ui create mode 100644 src/citra_qt/config/controller_config_util.cpp create mode 100644 src/citra_qt/config/controller_config_util.hxx create mode 100644 src/citra_qt/config/ui_controller_config.h (limited to 'src/citra_qt/config') diff --git a/src/citra_qt/config/controller_config.cpp b/src/citra_qt/config/controller_config.cpp new file mode 100644 index 000000000..52dfb627c --- /dev/null +++ b/src/citra_qt/config/controller_config.cpp @@ -0,0 +1,91 @@ +#include + +#include "controller_config.hxx" +#include "controller_config_util.hxx" + +/* TODO(bunnei): ImplementMe + +using common::Config; + +GControllerConfig::GControllerConfig(common::Config::ControllerPort* initial_config, QWidget* parent) : QWidget(parent) +{ + ui.setupUi(this); + ((QGridLayout*)ui.mainStickTab->layout())->addWidget(new GStickConfig(Config::ANALOG_LEFT, Config::ANALOG_RIGHT, Config::ANALOG_UP, Config::ANALOG_DOWN, this, this), 1, 1); + ((QGridLayout*)ui.cStickTab->layout())->addWidget(new GStickConfig(Config::C_LEFT, Config::C_RIGHT, Config::C_UP, Config::C_DOWN, this, this), 1, 1); + ((QGridLayout*)ui.dPadTab->layout())->addWidget(new GStickConfig(Config::DPAD_LEFT, Config::DPAD_RIGHT, Config::DPAD_UP, Config::DPAD_DOWN, this, this), 1, 1); + + // TODO: Arrange these more compactly? + QVBoxLayout* layout = (QVBoxLayout*)ui.buttonsTab->layout(); + layout->addWidget(new GButtonConfigGroup("A Button", Config::BUTTON_A, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("B Button", Config::BUTTON_B, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("X Button", Config::BUTTON_X, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("Y Button", Config::BUTTON_Y, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("Z Button", Config::BUTTON_Z, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("L Trigger", Config::TRIGGER_L, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("R Trigger", Config::TRIGGER_R, this, ui.buttonsTab)); + layout->addWidget(new GButtonConfigGroup("Start Button", Config::BUTTON_START, this, ui.buttonsTab)); + + memcpy(config, initial_config, sizeof(config)); + + emit ActivePortChanged(config[0]); +} + +void GControllerConfig::OnKeyConfigChanged(common::Config::Control id, int key, const QString& name) +{ + if (InputSourceJoypad()) + { + config[GetActiveController()].pads.key_code[id] = key; + } + else + { + config[GetActiveController()].keys.key_code[id] = key; + } + emit ActivePortChanged(config[GetActiveController()]); +} + +int GControllerConfig::GetActiveController() +{ + return ui.activeControllerCB->currentIndex(); +} + +bool GControllerConfig::InputSourceJoypad() +{ + return ui.inputSourceCB->currentIndex() == 1; +} + +GControllerConfigDialog::GControllerConfigDialog(common::Config::ControllerPort* controller_ports, QWidget* parent) : QDialog(parent), config_ptr(controller_ports) +{ + setWindowTitle(tr("Input configuration")); + + QVBoxLayout* layout = new QVBoxLayout(this); + config_widget = new GControllerConfig(controller_ports, this); + layout->addWidget(config_widget); + + QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + layout->addWidget(buttons); + + connect(buttons, SIGNAL(rejected()), this, SLOT(reject())); + connect(buttons, SIGNAL(accepted()), this, SLOT(accept())); + + connect(this, SIGNAL(accepted()), this, SLOT(EnableChanges())); + + layout->setSizeConstraint(QLayout::SetFixedSize); + setLayout(layout); + setModal(true); + show(); +} + +void GControllerConfigDialog::EnableChanges() +{ + for (unsigned int i = 0; i < 4; ++i) + { + memcpy(&config_ptr[i], &config_widget->GetControllerConfig(i), sizeof(common::Config::ControllerPort)); + + if (common::g_config) { + // Apply changes if running a game + memcpy(&common::g_config->controller_ports(i), &config_widget->GetControllerConfig(i), sizeof(common::Config::ControllerPort)); + } + } +} + +*/ \ No newline at end of file diff --git a/src/citra_qt/config/controller_config.hxx b/src/citra_qt/config/controller_config.hxx new file mode 100644 index 000000000..9ff86a110 --- /dev/null +++ b/src/citra_qt/config/controller_config.hxx @@ -0,0 +1,52 @@ +#ifndef _CONTROLLER_CONFIG_HXX_ +#define _CONTROLLER_CONFIG_HXX_ + +#include + +#include "ui_controller_config.h" + +/* TODO(bunnei): ImplementMe + +#include "config.h" + +class GControllerConfig : public QWidget +{ + Q_OBJECT + +public: + GControllerConfig(common::Config::ControllerPort* initial_config, QWidget* parent = NULL); + + const common::Config::ControllerPort& GetControllerConfig(int index) const { return config[index]; } + +signals: + void ActivePortChanged(const common::Config::ControllerPort&); + +public slots: + void OnKeyConfigChanged(common::Config::Control id, int key, const QString& name); + +private: + int GetActiveController(); + bool InputSourceJoypad(); + + Ui::ControllerConfig ui; + common::Config::ControllerPort config[4]; +}; + +class GControllerConfigDialog : public QDialog +{ + Q_OBJECT + +public: + GControllerConfigDialog(common::Config::ControllerPort* controller_ports, QWidget* parent = NULL); + +public slots: + void EnableChanges(); + +private: + GControllerConfig* config_widget; + common::Config::ControllerPort* config_ptr; +}; + +*/ + +#endif // _CONTROLLER_CONFIG_HXX_ diff --git a/src/citra_qt/config/controller_config.ui b/src/citra_qt/config/controller_config.ui new file mode 100644 index 000000000..9f650047b --- /dev/null +++ b/src/citra_qt/config/controller_config.ui @@ -0,0 +1,308 @@ + + + ControllerConfig + + + + 0 + 0 + 503 + 293 + + + + + 0 + 0 + + + + Controller Configuration + + + + QLayout::SetFixedSize + + + + + + + + Controller 1 + + + + + Controller 2 + + + + + Controller 3 + + + + + Controller 4 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Enabled + + + + + + + + Keyboard + + + + + Joypad + + + + + + + + Active Controller: + + + + + + + Input Source: + + + + + + + + + 0 + + + + Main Stick + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + C-Stick + + + + + + Qt::Horizontal + + + + 40 + 0 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + D-Pad + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + Buttons + + + + + + + + + + + ControlsChanged() + MainStickCleared() + CStickCleared() + DPadCleared() + ButtonsCleared() + OnControlsChanged() + OnMainStickCleared() + OnCStickCleared() + OnDPadCleared() + OnButtonsCleared() + + diff --git a/src/citra_qt/config/controller_config_util.cpp b/src/citra_qt/config/controller_config_util.cpp new file mode 100644 index 000000000..c5426570b --- /dev/null +++ b/src/citra_qt/config/controller_config_util.cpp @@ -0,0 +1,121 @@ +#include +#include +#include +#include +#include +#include + +#include "controller_config_util.hxx" + +/* TODO(bunnei): ImplementMe +GStickConfig::GStickConfig(common::Config::Control leftid, common::Config::Control rightid, common::Config::Control upid, common::Config::Control downid, QObject* change_receiver, QWidget* parent) : QWidget(parent) +{ + left = new GKeyConfigButton(leftid, style()->standardIcon(QStyle::SP_ArrowLeft), QString(), change_receiver, this); + right = new GKeyConfigButton(rightid, style()->standardIcon(QStyle::SP_ArrowRight), QString(), change_receiver, this); + up = new GKeyConfigButton(upid, style()->standardIcon(QStyle::SP_ArrowUp), QString(), change_receiver, this); + down = new GKeyConfigButton(downid, style()->standardIcon(QStyle::SP_ArrowDown), QString(), change_receiver, this); + clear = new QPushButton(tr("Clear"), this); + + QGridLayout* layout = new QGridLayout(this); + layout->addWidget(left, 1, 0); + layout->addWidget(right, 1, 2); + layout->addWidget(up, 0, 1); + layout->addWidget(down, 2, 1); + layout->addWidget(clear, 1, 1); + + setLayout(layout); +} + +GKeyConfigButton::GKeyConfigButton(common::Config::Control id, const QIcon& icon, const QString& text, QObject* change_receiver, QWidget* parent) : QPushButton(icon, text, parent), id(id), inputGrabbed(false) +{ + connect(this, SIGNAL(clicked()), this, SLOT(OnClicked())); + connect(this, SIGNAL(KeyAssigned(common::Config::Control, int, const QString&)), change_receiver, SLOT(OnKeyConfigChanged(common::Config::Control, int, const QString&))); + connect(change_receiver, SIGNAL(ActivePortChanged(const common::Config::ControllerPort&)), this, SLOT(OnActivePortChanged(const common::Config::ControllerPort&))); +} + +GKeyConfigButton::GKeyConfigButton(common::Config::Control id, const QString& text, QObject* change_receiver, QWidget* parent) : QPushButton(text, parent), id(id), inputGrabbed(false) +{ + connect(this, SIGNAL(clicked()), this, SLOT(OnClicked())); + connect(this, SIGNAL(KeyAssigned(common::Config::Control, int, const QString&)), change_receiver, SLOT(OnKeyConfigChanged(common::Config::Control, int, const QString&))); + connect(change_receiver, SIGNAL(ActivePortChanged(const common::Config::ControllerPort&)), this, SLOT(OnActivePortChanged(const common::Config::ControllerPort&))); +} + +void GKeyConfigButton::OnActivePortChanged(const common::Config::ControllerPort& config) +{ + // TODO: Doesn't use joypad struct if that's the input source... + QString text = QKeySequence(config.keys.key_code[id]).toString(); // has a nicer format + if (config.keys.key_code[id] == Qt::Key_Shift) text = tr("Shift"); + else if (config.keys.key_code[id] == Qt::Key_Control) text = tr("Control"); + else if (config.keys.key_code[id] == Qt::Key_Alt) text = tr("Alt"); + else if (config.keys.key_code[id] == Qt::Key_Meta) text = tr("Meta"); + setText(text); +} + +void GKeyConfigButton::OnClicked() +{ + grabKeyboard(); + grabMouse(); + inputGrabbed = true; + + old_text = text(); + setText(tr("Input...")); +} + +void GKeyConfigButton::keyPressEvent(QKeyEvent* event) +{ + if (inputGrabbed) + { + releaseKeyboard(); + releaseMouse(); + setText(QString()); + + // TODO: Doesn't capture "return" key + // TODO: This doesn't quite work well, yet... find a better way + QString text = QKeySequence(event->key()).toString(); // has a nicer format than event->text() + int key = event->key(); + if (event->modifiers() == Qt::ShiftModifier) { text = tr("Shift"); key = Qt::Key_Shift; } + else if (event->modifiers() == Qt::ControlModifier) { text = tr("Ctrl"); key = Qt::Key_Control; } + else if (event->modifiers() == Qt::AltModifier) { text = tr("Alt"); key = Qt::Key_Alt; } + else if (event->modifiers() == Qt::MetaModifier) { text = tr("Meta"); key = Qt::Key_Meta; } + + setText(old_text); + emit KeyAssigned(id, key, text); + + inputGrabbed = false; + + // TODO: Keys like "return" cause another keyPressEvent to be generated after this one... + } + + QPushButton::keyPressEvent(event); // TODO: Necessary? +} + +void GKeyConfigButton::mousePressEvent(QMouseEvent* event) +{ + // Abort key assignment + if (inputGrabbed) + { + releaseKeyboard(); + releaseMouse(); + setText(old_text); + inputGrabbed = false; + } + + QAbstractButton::mousePressEvent(event); +} + +GButtonConfigGroup::GButtonConfigGroup(const QString& name, common::Config::Control id, QObject* change_receiver, QWidget* parent) : QWidget(parent), id(id) +{ + QHBoxLayout* layout = new QHBoxLayout(this); + + QPushButton* clear_button = new QPushButton(tr("Clear")); + + layout->addWidget(new QLabel(name, this)); + layout->addWidget(config_button = new GKeyConfigButton(id, QString(), change_receiver, this)); + layout->addWidget(clear_button); + + // TODO: connect config_button, clear_button + + setLayout(layout); +} + +*/ \ No newline at end of file diff --git a/src/citra_qt/config/controller_config_util.hxx b/src/citra_qt/config/controller_config_util.hxx new file mode 100644 index 000000000..af38f126c --- /dev/null +++ b/src/citra_qt/config/controller_config_util.hxx @@ -0,0 +1,78 @@ +#ifndef _CONTROLLER_CONFIG_UTIL_HXX_ +#define _CONTROLLER_CONFIG_UTIL_HXX_ + +#include +#include + +/* TODO(bunnei): ImplementMe + +#include "config.h" + +class GStickConfig : public QWidget +{ + Q_OBJECT + +public: + // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot! + GStickConfig(common::Config::Control leftid, common::Config::Control rightid, common::Config::Control upid, common::Config::Control downid, QObject* change_receiver, QWidget* parent = NULL); + +signals: + void LeftChanged(); + void RightChanged(); + void UpChanged(); + void DownChanged(); + +private: + QPushButton* left; + QPushButton* right; + QPushButton* up; + QPushButton* down; + + QPushButton* clear; +}; + +class GKeyConfigButton : public QPushButton +{ + Q_OBJECT + +public: + // TODO: change_receiver also needs to have an ActivePortChanged(const common::Config::ControllerPort&) signal + // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot! + GKeyConfigButton(common::Config::Control id, const QIcon& icon, const QString& text, QObject* change_receiver, QWidget* parent); + GKeyConfigButton(common::Config::Control id, const QString& text, QObject* change_receiver, QWidget* parent); + +signals: + void KeyAssigned(common::Config::Control id, int key, const QString& text); + +private slots: + void OnActivePortChanged(const common::Config::ControllerPort& config); + + void OnClicked(); + + void keyPressEvent(QKeyEvent* event); // TODO: bGrabbed? + void mousePressEvent(QMouseEvent* event); + +private: + common::Config::Control id; + bool inputGrabbed; + + QString old_text; +}; + +class GButtonConfigGroup : public QWidget +{ + Q_OBJECT + +public: + // change_receiver needs to have a OnKeyConfigChanged(common::Config::Control, int, const QString&) slot! + GButtonConfigGroup(const QString& name, common::Config::Control id, QObject* change_receiver, QWidget* parent = NULL); + +private: + GKeyConfigButton* config_button; + + common::Config::Control id; +}; + +*/ + +#endif // _CONTROLLER_CONFIG_HXX_ diff --git a/src/citra_qt/config/ui_controller_config.h b/src/citra_qt/config/ui_controller_config.h new file mode 100644 index 000000000..f84364a77 --- /dev/null +++ b/src/citra_qt/config/ui_controller_config.h @@ -0,0 +1,222 @@ +/******************************************************************************** +** Form generated from reading UI file 'controller_config.ui' +** +** Created by: Qt User Interface Compiler version 4.8.5 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_CONTROLLER_CONFIG_H +#define UI_CONTROLLER_CONFIG_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_ControllerConfig +{ +public: + QVBoxLayout *verticalLayout; + QGridLayout *gridLayout; + QComboBox *activeControllerCB; + QSpacerItem *horizontalSpacer; + QCheckBox *checkBox; + QComboBox *inputSourceCB; + QLabel *label_2; + QLabel *label; + QTabWidget *tabWidget; + QWidget *mainStickTab; + QGridLayout *gridLayout_3; + QSpacerItem *verticalSpacer_2; + QSpacerItem *verticalSpacer_3; + QSpacerItem *horizontalSpacer_4; + QSpacerItem *horizontalSpacer_3; + QWidget *cStickTab; + QGridLayout *gridLayout_4; + QSpacerItem *horizontalSpacer_6; + QSpacerItem *verticalSpacer_5; + QSpacerItem *verticalSpacer_4; + QSpacerItem *horizontalSpacer_5; + QWidget *dPadTab; + QGridLayout *gridLayout_5; + QSpacerItem *horizontalSpacer_7; + QSpacerItem *verticalSpacer_7; + QSpacerItem *verticalSpacer_6; + QSpacerItem *horizontalSpacer_8; + QWidget *buttonsTab; + QVBoxLayout *verticalLayout_2; + + void setupUi(QWidget *ControllerConfig) + { + if (ControllerConfig->objectName().isEmpty()) + ControllerConfig->setObjectName(QString::fromUtf8("ControllerConfig")); + ControllerConfig->resize(503, 293); + QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(ControllerConfig->sizePolicy().hasHeightForWidth()); + ControllerConfig->setSizePolicy(sizePolicy); + verticalLayout = new QVBoxLayout(ControllerConfig); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + verticalLayout->setSizeConstraint(QLayout::SetFixedSize); + gridLayout = new QGridLayout(); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + activeControllerCB = new QComboBox(ControllerConfig); + activeControllerCB->setObjectName(QString::fromUtf8("activeControllerCB")); + + gridLayout->addWidget(activeControllerCB, 1, 1, 1, 1); + + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout->addItem(horizontalSpacer, 0, 2, 1, 1); + + checkBox = new QCheckBox(ControllerConfig); + checkBox->setObjectName(QString::fromUtf8("checkBox")); + + gridLayout->addWidget(checkBox, 1, 2, 1, 1); + + inputSourceCB = new QComboBox(ControllerConfig); + inputSourceCB->setObjectName(QString::fromUtf8("inputSourceCB")); + + gridLayout->addWidget(inputSourceCB, 0, 1, 1, 1); + + label_2 = new QLabel(ControllerConfig); + label_2->setObjectName(QString::fromUtf8("label_2")); + + gridLayout->addWidget(label_2, 1, 0, 1, 1); + + label = new QLabel(ControllerConfig); + label->setObjectName(QString::fromUtf8("label")); + + gridLayout->addWidget(label, 0, 0, 1, 1); + + + verticalLayout->addLayout(gridLayout); + + tabWidget = new QTabWidget(ControllerConfig); + tabWidget->setObjectName(QString::fromUtf8("tabWidget")); + mainStickTab = new QWidget(); + mainStickTab->setObjectName(QString::fromUtf8("mainStickTab")); + gridLayout_3 = new QGridLayout(mainStickTab); + gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_3->addItem(verticalSpacer_2, 2, 2, 1, 1); + + verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_3->addItem(verticalSpacer_3, 0, 2, 1, 1); + + horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_3->addItem(horizontalSpacer_4, 1, 0, 1, 1); + + horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_3->addItem(horizontalSpacer_3, 1, 4, 1, 1); + + tabWidget->addTab(mainStickTab, QString()); + cStickTab = new QWidget(); + cStickTab->setObjectName(QString::fromUtf8("cStickTab")); + gridLayout_4 = new QGridLayout(cStickTab); + gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + horizontalSpacer_6 = new QSpacerItem(40, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_4->addItem(horizontalSpacer_6, 1, 0, 1, 1); + + verticalSpacer_5 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_4->addItem(verticalSpacer_5, 0, 1, 1, 1); + + verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_4->addItem(verticalSpacer_4, 2, 1, 1, 1); + + horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_4->addItem(horizontalSpacer_5, 1, 2, 1, 1); + + tabWidget->addTab(cStickTab, QString()); + dPadTab = new QWidget(); + dPadTab->setObjectName(QString::fromUtf8("dPadTab")); + gridLayout_5 = new QGridLayout(dPadTab); + gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5")); + horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_5->addItem(horizontalSpacer_7, 1, 2, 1, 1); + + verticalSpacer_7 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_5->addItem(verticalSpacer_7, 0, 1, 1, 1); + + verticalSpacer_6 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_5->addItem(verticalSpacer_6, 2, 1, 1, 1); + + horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_5->addItem(horizontalSpacer_8, 1, 0, 1, 1); + + tabWidget->addTab(dPadTab, QString()); + buttonsTab = new QWidget(); + buttonsTab->setObjectName(QString::fromUtf8("buttonsTab")); + verticalLayout_2 = new QVBoxLayout(buttonsTab); + verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + tabWidget->addTab(buttonsTab, QString()); + + verticalLayout->addWidget(tabWidget); + + + retranslateUi(ControllerConfig); + + tabWidget->setCurrentIndex(0); + + + QMetaObject::connectSlotsByName(ControllerConfig); + } // setupUi + + void retranslateUi(QWidget *ControllerConfig) + { + ControllerConfig->setWindowTitle(QApplication::translate("ControllerConfig", "Controller Configuration", 0, QApplication::UnicodeUTF8)); + activeControllerCB->clear(); + activeControllerCB->insertItems(0, QStringList() + << QApplication::translate("ControllerConfig", "Controller 1", 0, QApplication::UnicodeUTF8) + << QApplication::translate("ControllerConfig", "Controller 2", 0, QApplication::UnicodeUTF8) + << QApplication::translate("ControllerConfig", "Controller 3", 0, QApplication::UnicodeUTF8) + << QApplication::translate("ControllerConfig", "Controller 4", 0, QApplication::UnicodeUTF8) + ); + checkBox->setText(QApplication::translate("ControllerConfig", "Enabled", 0, QApplication::UnicodeUTF8)); + inputSourceCB->clear(); + inputSourceCB->insertItems(0, QStringList() + << QApplication::translate("ControllerConfig", "Keyboard", 0, QApplication::UnicodeUTF8) + << QApplication::translate("ControllerConfig", "Joypad", 0, QApplication::UnicodeUTF8) + ); + label_2->setText(QApplication::translate("ControllerConfig", "Active Controller:", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("ControllerConfig", "Input Source:", 0, QApplication::UnicodeUTF8)); + tabWidget->setTabText(tabWidget->indexOf(mainStickTab), QApplication::translate("ControllerConfig", "Main Stick", 0, QApplication::UnicodeUTF8)); + tabWidget->setTabText(tabWidget->indexOf(cStickTab), QApplication::translate("ControllerConfig", "C-Stick", 0, QApplication::UnicodeUTF8)); + tabWidget->setTabText(tabWidget->indexOf(dPadTab), QApplication::translate("ControllerConfig", "D-Pad", 0, QApplication::UnicodeUTF8)); + tabWidget->setTabText(tabWidget->indexOf(buttonsTab), QApplication::translate("ControllerConfig", "Buttons", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class ControllerConfig: public Ui_ControllerConfig {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_CONTROLLER_CONFIG_H -- cgit v1.2.3