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
ConfigureInput::ConfigureInput(QWidget* parent)
: QWidget(parent), ui(std::make_unique<Ui::ConfigureInput>()) {
: QDialog(parent), ui(std::make_unique<Ui::ConfigureInput>()) {
ui->setupUi(this);
players_controller = {

View File

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

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConfigureInput</class>
<widget class="QWidget" name="ConfigureInput">
<widget class="QDialog" name="ConfigureInput">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>473</width>
<height>685</height>
<width>384</width>
<height>576</height>
</rect>
</property>
<property name="windowTitle">
@ -478,6 +478,13 @@
</property>
</spacer>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
@ -485,5 +492,38 @@
</layout>
</widget>
<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>