Settings: Change slots name
This commit is contained in:
parent
6778d350f1
commit
6d4b63aeaf
3 changed files with 10 additions and 10 deletions
|
@ -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 a new issue