mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
e149ad4f0a
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
// Copyright 2017 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "DolphinQt/Config/ControllersWindow.h"
|
|
|
|
#include <QDialogButtonBox>
|
|
#include <QVBoxLayout>
|
|
|
|
#include "DolphinQt/Config/CommonControllersWidget.h"
|
|
#include "DolphinQt/Config/GamecubeControllersWidget.h"
|
|
#include "DolphinQt/Config/WiimoteControllersWidget.h"
|
|
#include "DolphinQt/QtUtils/WrapInScrollArea.h"
|
|
|
|
ControllersWindow::ControllersWindow(QWidget* parent) : QDialog(parent)
|
|
{
|
|
setWindowTitle(tr("Controller Settings"));
|
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
|
|
|
m_gamecube_controllers = new GamecubeControllersWidget(this);
|
|
m_wiimote_controllers = new WiimoteControllersWidget(this);
|
|
m_common = new CommonControllersWidget(this);
|
|
CreateMainLayout();
|
|
ConnectWidgets();
|
|
}
|
|
|
|
void ControllersWindow::CreateMainLayout()
|
|
{
|
|
auto* layout = new QVBoxLayout();
|
|
m_button_box = new QDialogButtonBox(QDialogButtonBox::Close);
|
|
|
|
layout->addWidget(m_gamecube_controllers);
|
|
layout->addWidget(m_wiimote_controllers);
|
|
layout->addWidget(m_common);
|
|
layout->addStretch();
|
|
layout->addWidget(m_button_box);
|
|
|
|
WrapInScrollArea(this, layout);
|
|
}
|
|
|
|
void ControllersWindow::ConnectWidgets()
|
|
{
|
|
connect(m_button_box, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
|
}
|