2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

configure_input: Convert into QDialog

This commit is contained in:
Zach Hilman 2018-11-22 15:27:07 -05:00
parent 20dffc22a2
commit 59ca8d458d
3 changed files with 47 additions and 7 deletions

View file

@ -34,7 +34,7 @@ void CallConfigureDialog(ConfigureInput& parent, Args&&... args) {
} // Anonymous namespace } // Anonymous namespace
ConfigureInput::ConfigureInput(QWidget* parent) ConfigureInput::ConfigureInput(QWidget* parent)
: QWidget(parent), ui(std::make_unique<Ui::ConfigureInput>()) { : QDialog(parent), ui(std::make_unique<Ui::ConfigureInput>()) {
ui->setupUi(this); ui->setupUi(this);
players_controller = { players_controller = {

View file

@ -7,8 +7,8 @@
#include <array> #include <array>
#include <memory> #include <memory>
#include <QDialog>
#include <QKeyEvent> #include <QKeyEvent>
#include <QWidget>
#include "ui_configure_input.h" #include "ui_configure_input.h"
@ -20,7 +20,7 @@ namespace Ui {
class ConfigureInput; class ConfigureInput;
} }
class ConfigureInput : public QWidget { class ConfigureInput : public QDialog {
Q_OBJECT Q_OBJECT
public: public:

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>ConfigureInput</class> <class>ConfigureInput</class>
<widget class="QWidget" name="ConfigureInput"> <widget class="QDialog" name="ConfigureInput">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>473</width> <width>384</width>
<height>685</height> <height>576</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -478,6 +478,13 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>
@ -485,5 +492,38 @@
</layout> </layout>
</widget> </widget>
<resources/> <resources/>
<connections/> <connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>ConfigureInput</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>294</x>
<y>553</y>
</hint>
<hint type="destinationlabel">
<x>191</x>
<y>287</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>ConfigureInput</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>294</x>
<y>553</y>
</hint>
<hint type="destinationlabel">
<x>191</x>
<y>287</y>
</hint>
</hints>
</connection>
</connections>
</ui> </ui>