mirror of https://github.com/mgba-emu/mgba.git
Qt: Begin settings view revamp
This commit is contained in:
parent
baccd4ef2f
commit
2b5da04d9c
1
CHANGES
1
CHANGES
|
@ -15,6 +15,7 @@ Features:
|
||||||
- Libretro: Settings for using BIOS and skipping intro
|
- Libretro: Settings for using BIOS and skipping intro
|
||||||
- Libretro: Customizable idle loop removal
|
- Libretro: Customizable idle loop removal
|
||||||
- Implemented cycle counting for sprite rendering
|
- Implemented cycle counting for sprite rendering
|
||||||
|
- Cleaner, unified settings window
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
- Util: Fix PowerPC PNG read/write pixel order
|
- Util: Fix PowerPC PNG read/write pixel order
|
||||||
- VFS: Fix VFileReadline and remove _vfdReadline
|
- VFS: Fix VFileReadline and remove _vfdReadline
|
||||||
|
|
|
@ -105,9 +105,6 @@ GBAKeyEditor::GBAKeyEditor(InputController* controller, int type, const QString&
|
||||||
connect(setAll, SIGNAL(pressed()), this, SLOT(setAll()));
|
connect(setAll, SIGNAL(pressed()), this, SLOT(setAll()));
|
||||||
layout->addWidget(setAll);
|
layout->addWidget(setAll);
|
||||||
|
|
||||||
QPushButton* save = new QPushButton(tr("Save"));
|
|
||||||
connect(save, SIGNAL(pressed()), this, SLOT(save()));
|
|
||||||
layout->addWidget(save);
|
|
||||||
layout->setSpacing(6);
|
layout->setSpacing(6);
|
||||||
|
|
||||||
m_keyOrder = QList<KeyEditor*>{
|
m_keyOrder = QList<KeyEditor*>{
|
||||||
|
|
|
@ -9,10 +9,13 @@
|
||||||
#include "ConfigController.h"
|
#include "ConfigController.h"
|
||||||
#include "Display.h"
|
#include "Display.h"
|
||||||
#include "GBAApp.h"
|
#include "GBAApp.h"
|
||||||
|
#include "GBAKeyEditor.h"
|
||||||
|
#include "InputController.h"
|
||||||
|
#include "ShortcutView.h"
|
||||||
|
|
||||||
using namespace QGBA;
|
using namespace QGBA;
|
||||||
|
|
||||||
SettingsView::SettingsView(ConfigController* controller, QWidget* parent)
|
SettingsView::SettingsView(ConfigController* controller, InputController* inputController, ShortcutController* shortcutController, QWidget* parent)
|
||||||
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint)
|
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint)
|
||||||
, m_controller(controller)
|
, m_controller(controller)
|
||||||
{
|
{
|
||||||
|
@ -94,6 +97,23 @@ SettingsView::SettingsView(ConfigController* controller, QWidget* parent)
|
||||||
updateConfig();
|
updateConfig();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
GBAKeyEditor* editor = new GBAKeyEditor(inputController, InputController::KEYBOARD, QString(), this);
|
||||||
|
m_ui.tabWidget->addTab(editor, "Keyboard");
|
||||||
|
connect(m_ui.buttonBox, SIGNAL(accepted()), editor, SLOT(save()));
|
||||||
|
|
||||||
|
#ifdef BUILD_SDL
|
||||||
|
inputController->recalibrateAxes();
|
||||||
|
const char* profile = inputController->profileForType(SDL_BINDING_BUTTON);
|
||||||
|
editor = new GBAKeyEditor(inputController, SDL_BINDING_BUTTON, profile);
|
||||||
|
m_ui.tabWidget->addTab(editor, "Controllers");
|
||||||
|
connect(m_ui.buttonBox, SIGNAL(accepted()), editor, SLOT(save()));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ShortcutView* shortcutView = new ShortcutView();
|
||||||
|
shortcutView->setController(shortcutController);
|
||||||
|
shortcutView->setInputController(inputController);
|
||||||
|
m_ui.tabWidget->addTab(shortcutView, "Shortcuts");
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsView::selectBios() {
|
void SettingsView::selectBios() {
|
||||||
|
|
|
@ -13,12 +13,14 @@
|
||||||
namespace QGBA {
|
namespace QGBA {
|
||||||
|
|
||||||
class ConfigController;
|
class ConfigController;
|
||||||
|
class InputController;
|
||||||
|
class ShortcutController;
|
||||||
|
|
||||||
class SettingsView : public QDialog {
|
class SettingsView : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SettingsView(ConfigController* controller, QWidget* parent = nullptr);
|
SettingsView(ConfigController* controller, InputController* inputController, ShortcutController* shortcutController, QWidget* parent = nullptr);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void biosLoaded(const QString&);
|
void biosLoaded(const QString&);
|
||||||
|
@ -33,6 +35,7 @@ private:
|
||||||
Ui::SettingsView m_ui;
|
Ui::SettingsView m_ui;
|
||||||
|
|
||||||
ConfigController* m_controller;
|
ConfigController* m_controller;
|
||||||
|
InputController* m_input;
|
||||||
|
|
||||||
void saveSetting(const char* key, const QAbstractButton*);
|
void saveSetting(const char* key, const QAbstractButton*);
|
||||||
void saveSetting(const char* key, const QComboBox*);
|
void saveSetting(const char* key, const QComboBox*);
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>707</width>
|
<width>417</width>
|
||||||
<height>420</height>
|
<height>457</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -24,11 +24,17 @@
|
||||||
<enum>QLayout::SetFixedSize</enum>
|
<enum>QLayout::SetFixedSize</enum>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<item>
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tab_3">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Audio/Video</string>
|
||||||
|
</attribute>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::FieldsStayAtSizeHint</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_14">
|
<widget class="QLabel" name="label_14">
|
||||||
|
@ -120,6 +126,50 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="sampleRate">
|
||||||
|
<property name="editable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="currentText" stdset="0">
|
||||||
|
<string>44100</string>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>22050</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>32000</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>44100</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>48000</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_20">
|
||||||
|
<property name="text">
|
||||||
|
<string>Hz</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_17">
|
<widget class="QLabel" name="label_17">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -154,13 +204,6 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="2">
|
|
||||||
<widget class="Line" name="line">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QLabel" name="label_10">
|
<widget class="QLabel" name="label_10">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -237,13 +280,6 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0" colspan="2">
|
|
||||||
<widget class="Line" name="line_4">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="0">
|
<item row="9" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -283,61 +319,30 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="4" column="0" colspan="2">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
<widget class="Line" name="line_4">
|
||||||
<item>
|
<property name="orientation">
|
||||||
<widget class="QComboBox" name="sampleRate">
|
<enum>Qt::Horizontal</enum>
|
||||||
<property name="editable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="currentText" stdset="0">
|
|
||||||
<string>44100</string>
|
|
||||||
</property>
|
|
||||||
<property name="currentIndex">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>22050</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>32000</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>44100</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>48000</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="label_20">
|
|
||||||
<property name="text">
|
|
||||||
<string>Hz</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="8" column="0" colspan="2">
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="Line" name="line_5">
|
<widget class="Line" name="line_5">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
</layout>
|
||||||
<layout class="QFormLayout" name="formLayout_4">
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_4">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Running</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
|
<property name="fieldGrowthPolicy">
|
||||||
|
<enum>QFormLayout::FieldsStayAtSizeHint</enum>
|
||||||
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -366,35 +371,31 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QCheckBox" name="skipBios">
|
<widget class="QCheckBox" name="useBios">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Skip BIOS intro</string>
|
<string>Use BIOS file</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="2">
|
<item row="4" column="0">
|
||||||
<widget class="Line" name="line_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QCheckBox" name="rewind">
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable rewind</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Create rewind state:</string>
|
<string>Create rewind state:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1">
|
<item row="4" column="1">
|
||||||
|
<widget class="QCheckBox" name="rewind">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable rewind</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
|
@ -415,14 +416,14 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rewind history:</string>
|
<string>Rewind history:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="6" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="rewindCapacity"/>
|
<widget class="QSpinBox" name="rewindCapacity"/>
|
||||||
|
@ -436,57 +437,14 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="0" colspan="2">
|
<item row="8" column="0">
|
||||||
<widget class="Line" name="line_2">
|
<widget class="QLabel" name="label_18">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Horizontal</enum>
|
<string>Fast forward speed</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="1">
|
<item row="8" column="1">
|
||||||
<widget class="QCheckBox" name="allowOpposingDirections">
|
|
||||||
<property name="text">
|
|
||||||
<string>Allow opposing input directions</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="13" column="1">
|
|
||||||
<widget class="QCheckBox" name="suspendScreensaver">
|
|
||||||
<property name="text">
|
|
||||||
<string>Suspend screensaver</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="14" column="0">
|
|
||||||
<widget class="QLabel" name="label_15">
|
|
||||||
<property name="text">
|
|
||||||
<string>Idle loops</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="14" column="1">
|
|
||||||
<widget class="QComboBox" name="idleOptimization">
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Run all</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Remove known</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Detect and remove</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="1">
|
|
||||||
<widget class="QDoubleSpinBox" name="fastForwardRatio">
|
<widget class="QDoubleSpinBox" name="fastForwardRatio">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
|
@ -508,14 +466,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="0">
|
<item row="9" column="1">
|
||||||
<widget class="QLabel" name="label_18">
|
|
||||||
<property name="text">
|
|
||||||
<string>Fast forward speed</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="1">
|
|
||||||
<widget class="QCheckBox" name="fastForwardUnbounded">
|
<widget class="QCheckBox" name="fastForwardUnbounded">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Unbounded</string>
|
<string>Unbounded</string>
|
||||||
|
@ -525,26 +476,80 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0" colspan="2">
|
<item row="11" column="1">
|
||||||
<widget class="Line" name="line_6">
|
<widget class="QCheckBox" name="allowOpposingDirections">
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Horizontal</enum>
|
<string>Allow opposing input directions</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="12" column="1">
|
||||||
<widget class="QCheckBox" name="useBios">
|
<widget class="QCheckBox" name="suspendScreensaver">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use BIOS file</string>
|
<string>Suspend screensaver</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="13" column="0">
|
||||||
|
<widget class="QLabel" name="label_15">
|
||||||
|
<property name="text">
|
||||||
|
<string>Idle loops</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="1">
|
||||||
|
<widget class="QComboBox" name="idleOptimization">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Run all</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Remove known</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Detect and remove</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QCheckBox" name="skipBios">
|
||||||
|
<property name="text">
|
||||||
|
<string>Skip BIOS intro</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="2">
|
||||||
|
<widget class="Line" name="line">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0" colspan="2">
|
||||||
|
<widget class="Line" name="line_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="0" colspan="2">
|
||||||
|
<widget class="Line" name="line_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#include "Display.h"
|
#include "Display.h"
|
||||||
#include "GameController.h"
|
#include "GameController.h"
|
||||||
#include "GBAApp.h"
|
#include "GBAApp.h"
|
||||||
#include "GBAKeyEditor.h"
|
|
||||||
#include "GDBController.h"
|
#include "GDBController.h"
|
||||||
#include "GDBWindow.h"
|
#include "GDBWindow.h"
|
||||||
#include "GIFView.h"
|
#include "GIFView.h"
|
||||||
|
@ -36,7 +35,6 @@
|
||||||
#include "SettingsView.h"
|
#include "SettingsView.h"
|
||||||
#include "ShaderSelector.h"
|
#include "ShaderSelector.h"
|
||||||
#include "ShortcutController.h"
|
#include "ShortcutController.h"
|
||||||
#include "ShortcutView.h"
|
|
||||||
#include "VideoView.h"
|
#include "VideoView.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -344,29 +342,14 @@ void Window::exportSharkport() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::openKeymapWindow() {
|
|
||||||
GBAKeyEditor* keyEditor = new GBAKeyEditor(&m_inputController, InputController::KEYBOARD);
|
|
||||||
openView(keyEditor);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Window::openSettingsWindow() {
|
void Window::openSettingsWindow() {
|
||||||
SettingsView* settingsWindow = new SettingsView(m_config);
|
SettingsView* settingsWindow = new SettingsView(m_config, &m_inputController, m_shortcutController);
|
||||||
connect(settingsWindow, SIGNAL(biosLoaded(const QString&)), m_controller, SLOT(loadBIOS(const QString&)));
|
connect(settingsWindow, SIGNAL(biosLoaded(const QString&)), m_controller, SLOT(loadBIOS(const QString&)));
|
||||||
connect(settingsWindow, SIGNAL(audioDriverChanged()), m_controller, SLOT(reloadAudioDriver()));
|
connect(settingsWindow, SIGNAL(audioDriverChanged()), m_controller, SLOT(reloadAudioDriver()));
|
||||||
connect(settingsWindow, SIGNAL(displayDriverChanged()), this, SLOT(mustRestart()));
|
connect(settingsWindow, SIGNAL(displayDriverChanged()), this, SLOT(mustRestart()));
|
||||||
openView(settingsWindow);
|
openView(settingsWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::openShortcutWindow() {
|
|
||||||
#ifdef BUILD_SDL
|
|
||||||
m_inputController.recalibrateAxes();
|
|
||||||
#endif
|
|
||||||
ShortcutView* shortcutView = new ShortcutView();
|
|
||||||
shortcutView->setController(m_shortcutController);
|
|
||||||
shortcutView->setInputController(&m_inputController);
|
|
||||||
openView(shortcutView);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Window::openOverrideWindow() {
|
void Window::openOverrideWindow() {
|
||||||
OverrideView* overrideWindow = new OverrideView(m_controller, m_config);
|
OverrideView* overrideWindow = new OverrideView(m_controller, m_config);
|
||||||
openView(overrideWindow);
|
openView(overrideWindow);
|
||||||
|
@ -407,14 +390,6 @@ void Window::openROMInfo() {
|
||||||
openView(romInfo);
|
openView(romInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BUILD_SDL
|
|
||||||
void Window::openGamepadWindow() {
|
|
||||||
const char* profile = m_inputController.profileForType(SDL_BINDING_BUTTON);
|
|
||||||
GBAKeyEditor* keyEditor = new GBAKeyEditor(&m_inputController, SDL_BINDING_BUTTON, profile);
|
|
||||||
openView(keyEditor);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_FFMPEG
|
#ifdef USE_FFMPEG
|
||||||
void Window::openVideoWindow() {
|
void Window::openVideoWindow() {
|
||||||
if (!m_videoView) {
|
if (!m_videoView) {
|
||||||
|
@ -1190,18 +1165,6 @@ void Window::setupMenu(QMenuBar* menubar) {
|
||||||
toolsMenu->addSeparator();
|
toolsMenu->addSeparator();
|
||||||
addControlledAction(toolsMenu, toolsMenu->addAction(tr("Settings..."), this, SLOT(openSettingsWindow())),
|
addControlledAction(toolsMenu, toolsMenu->addAction(tr("Settings..."), this, SLOT(openSettingsWindow())),
|
||||||
"settings");
|
"settings");
|
||||||
addControlledAction(toolsMenu, toolsMenu->addAction(tr("Edit shortcuts..."), this, SLOT(openShortcutWindow())),
|
|
||||||
"shortcuts");
|
|
||||||
|
|
||||||
QAction* keymap = new QAction(tr("Remap keyboard..."), toolsMenu);
|
|
||||||
connect(keymap, SIGNAL(triggered()), this, SLOT(openKeymapWindow()));
|
|
||||||
addControlledAction(toolsMenu, keymap, "remapKeyboard");
|
|
||||||
|
|
||||||
#ifdef BUILD_SDL
|
|
||||||
QAction* gamepad = new QAction(tr("Remap gamepad..."), toolsMenu);
|
|
||||||
connect(gamepad, SIGNAL(triggered()), this, SLOT(openGamepadWindow()));
|
|
||||||
addControlledAction(toolsMenu, gamepad, "remapGamepad");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
toolsMenu->addSeparator();
|
toolsMenu->addSeparator();
|
||||||
|
|
||||||
|
|
|
@ -75,10 +75,7 @@ public slots:
|
||||||
void importSharkport();
|
void importSharkport();
|
||||||
void exportSharkport();
|
void exportSharkport();
|
||||||
|
|
||||||
void openKeymapWindow();
|
|
||||||
void openSettingsWindow();
|
void openSettingsWindow();
|
||||||
void openShortcutWindow();
|
|
||||||
|
|
||||||
void openOverrideWindow();
|
void openOverrideWindow();
|
||||||
void openSensorWindow();
|
void openSensorWindow();
|
||||||
void openCheatsWindow();
|
void openCheatsWindow();
|
||||||
|
@ -90,10 +87,6 @@ public slots:
|
||||||
void openAboutScreen();
|
void openAboutScreen();
|
||||||
void openROMInfo();
|
void openROMInfo();
|
||||||
|
|
||||||
#ifdef BUILD_SDL
|
|
||||||
void openGamepadWindow();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_FFMPEG
|
#ifdef USE_FFMPEG
|
||||||
void openVideoWindow();
|
void openVideoWindow();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue