Qt: Move language/theme setting to window

This commit is contained in:
Stenzek
2024-08-20 23:27:42 +10:00
parent 5c14ac2fd1
commit ccd7ba9acf
14 changed files with 184 additions and 127 deletions

View File

@ -79,7 +79,7 @@ void SettingsWindow::closeEvent(QCloseEvent* event)
void SettingsWindow::addPages()
{
addWidget(
m_general_settings = new InterfaceSettingsWidget(this, m_ui.settingsContainer), tr("Interface"),
m_interface_settings = new InterfaceSettingsWidget(this, m_ui.settingsContainer), tr("Interface"),
QStringLiteral("settings-3-line"),
tr("<strong>Interface Settings</strong><hr>These options control how the emulator looks and "
"behaves.<br><br>Mouse over an option for additional information, and Shift+Wheel to scroll this panel."));
@ -250,6 +250,16 @@ void SettingsWindow::setCategory(const char* category)
}
}
int SettingsWindow::getCategoryRow() const
{
return m_ui.settingsCategory->currentRow();
}
void SettingsWindow::setCategoryRow(int index)
{
m_ui.settingsCategory->setCurrentRow(index);
}
void SettingsWindow::onCategoryCurrentRowChanged(int row)
{
DebugAssert(row < static_cast<int>(MAX_SETTINGS_WIDGETS));