mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-24 16:21:05 +00:00
Settings: Change slots name
This commit is contained in:
parent
6778d350f1
commit
6d4b63aeaf
@ -21,7 +21,7 @@ set(SRCS
|
|||||||
debugger/registers.cpp
|
debugger/registers.cpp
|
||||||
util/spinbox.cpp
|
util/spinbox.cpp
|
||||||
bootmanager.cpp
|
bootmanager.cpp
|
||||||
hotkeys.cpp
|
hotkeys.cpp
|
||||||
main.cpp
|
main.cpp
|
||||||
citra-qt.rc
|
citra-qt.rc
|
||||||
)
|
)
|
||||||
@ -47,7 +47,7 @@ set(HEADERS
|
|||||||
debugger/registers.h
|
debugger/registers.h
|
||||||
util/spinbox.h
|
util/spinbox.h
|
||||||
bootmanager.h
|
bootmanager.h
|
||||||
hotkeys.h
|
hotkeys.h
|
||||||
main.h
|
main.h
|
||||||
version.h
|
version.h
|
||||||
)
|
)
|
||||||
@ -59,7 +59,7 @@ set(UIS
|
|||||||
debugger/disassembler.ui
|
debugger/disassembler.ui
|
||||||
debugger/profiler.ui
|
debugger/profiler.ui
|
||||||
debugger/registers.ui
|
debugger/registers.ui
|
||||||
hotkeys.ui
|
hotkeys.ui
|
||||||
main.ui
|
main.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "common/log.h"
|
#include "common/logging/log.h"
|
||||||
|
|
||||||
#include <QKeySequence>
|
#include <QKeySequence>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
@ -36,10 +36,10 @@ GInputsDialog::GInputsDialog(QWidget* parent) : QDialog(parent) {
|
|||||||
|
|
||||||
// set up event handlers for the buttons
|
// set up event handlers for the buttons
|
||||||
QPushButton* defaultButton = this->ui.buttonBox->button(QDialogButtonBox::RestoreDefaults);
|
QPushButton* defaultButton = this->ui.buttonBox->button(QDialogButtonBox::RestoreDefaults);
|
||||||
connect(defaultButton, SIGNAL(clicked()), this, SLOT(OnDefaultClicked()));
|
connect(defaultButton, SIGNAL(clicked()), this, SLOT(RestoreDefaultSettings()));
|
||||||
|
|
||||||
QPushButton* okButton = this->ui.buttonBox->button(QDialogButtonBox::Ok);
|
QPushButton* okButton = this->ui.buttonBox->button(QDialogButtonBox::Ok);
|
||||||
connect(okButton, SIGNAL(clicked()), this, SLOT(OnOkClicked()));
|
connect(okButton, SIGNAL(clicked()), this, SLOT(SaveSettings()));
|
||||||
|
|
||||||
// create a copy of the current settings
|
// create a copy of the current settings
|
||||||
this->temp_settings = Settings::Values(Settings::values);
|
this->temp_settings = Settings::Values(Settings::values);
|
||||||
@ -84,7 +84,7 @@ QString GInputsDialog::getKeyName(int key_code) {
|
|||||||
return QKeySequence(key_code).toString();
|
return QKeySequence(key_code).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GInputsDialog::OnDefaultClicked() {
|
void GInputsDialog::RestoreDefaultSettings() {
|
||||||
// load the default button settings into temp_settings
|
// load the default button settings into temp_settings
|
||||||
this->temp_settings.pad_a_key = Qt::Key_A;
|
this->temp_settings.pad_a_key = Qt::Key_A;
|
||||||
this->temp_settings.pad_b_key = Qt::Key_S;
|
this->temp_settings.pad_b_key = Qt::Key_S;
|
||||||
@ -108,7 +108,7 @@ void GInputsDialog::OnDefaultClicked() {
|
|||||||
this->displayButtonSettings(GInputsDialog::temp_settings);
|
this->displayButtonSettings(GInputsDialog::temp_settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GInputsDialog::OnOkClicked() {
|
void GInputsDialog::SaveSettings() {
|
||||||
Config config;
|
Config config;
|
||||||
|
|
||||||
// load the temporary settings into our real settings
|
// load the temporary settings into our real settings
|
||||||
|
@ -29,6 +29,6 @@ private:
|
|||||||
void displayButtonSettings(const Settings::Values& values);
|
void displayButtonSettings(const Settings::Values& values);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void OnDefaultClicked();
|
void SaveSettings();
|
||||||
void OnOkClicked();
|
void RestoreDefaultSettings();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user