Qt-GUI: Adding User Name selection (#440)
* Qt-GUI: Adding User Name selection * fix * fix 2 * fix 3 (thanks Poly) * Change the username emplacement
This commit is contained in:
parent
8c77d4dde6
commit
a0fb47b0ab
|
@ -197,6 +197,10 @@ void setLogFilter(std::string type) {
|
|||
logFilter = type;
|
||||
}
|
||||
|
||||
void setUserName(std::string type) {
|
||||
userName = type;
|
||||
}
|
||||
|
||||
void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h) {
|
||||
main_window_geometry_x = x;
|
||||
main_window_geometry_y = y;
|
||||
|
@ -453,6 +457,7 @@ void setDefaultValues() {
|
|||
screenHeight = 720;
|
||||
logFilter = "";
|
||||
logType = "async";
|
||||
userName = "shadPS4";
|
||||
isDebugDump = false;
|
||||
isShowSplash = false;
|
||||
isNullGpu = false;
|
||||
|
|
|
@ -43,6 +43,7 @@ void setScreenHeight(u32 height);
|
|||
void setFullscreenMode(bool enable);
|
||||
void setLanguage(u32 language);
|
||||
void setNeoMode(bool enable);
|
||||
void setUserName(std::string type);
|
||||
|
||||
void setLogType(std::string type);
|
||||
void setLogFilter(std::string type);
|
||||
|
|
|
@ -43,6 +43,9 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
|
|||
{
|
||||
connect(ui->consoleLanguageComboBox, &QComboBox::currentIndexChanged, this,
|
||||
[](int index) { Config::setLanguage(index); });
|
||||
|
||||
connect(ui->userNameLineEdit, &QLineEdit::textChanged, this,
|
||||
[](const QString& text) { Config::setUserName(text.toStdString()); });
|
||||
}
|
||||
|
||||
// GPU TAB
|
||||
|
@ -121,6 +124,7 @@ void SettingsDialog::LoadValuesFromConfig() {
|
|||
ui->ps4proCheckBox->setChecked(Config::isNeoMode());
|
||||
ui->logTypeComboBox->setCurrentText(QString::fromStdString(Config::getLogType()));
|
||||
ui->logFilterLineEdit->setText(QString::fromStdString(Config::getLogFilter()));
|
||||
ui->userNameLineEdit->setText(QString::fromStdString(Config::getUserName()));
|
||||
|
||||
ui->debugDump->setChecked(Config::debugDump());
|
||||
ui->vkValidationCheckBox->setChecked(Config::vkValidationEnabled());
|
||||
|
|
|
@ -231,6 +231,32 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="vLayoutUserName">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="hLayoutUserName">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="userName">
|
||||
<property name="title">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="userNameLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="userNameLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetSettingsTop" native="true">
|
||||
<layout class="QHBoxLayout" name="widgetGpuTopLayout">
|
||||
|
|
Loading…
Reference in New Issue