-
Notifications
You must be signed in to change notification settings - Fork 724
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Qt: Separate controller settings to global and profiles
- Loading branch information
Showing
9 changed files
with
166 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <[email protected]> | ||
// SPDX-FileCopyrightText: 2019-2025 Connor McLaughlin <[email protected]> | ||
// SPDX-License-Identifier: CC-BY-NC-ND-4.0 | ||
|
||
#pragma once | ||
|
@@ -14,6 +14,7 @@ | |
#include <QtCore/QString> | ||
#include <QtCore/QStringList> | ||
#include <QtWidgets/QDialog> | ||
#include <QtCore/QAbstractListModel> | ||
|
||
#include <array> | ||
#include <string> | ||
|
@@ -41,7 +42,8 @@ class ControllerSettingsWindow final : public QWidget | |
Count | ||
}; | ||
|
||
ControllerSettingsWindow(SettingsInterface* game_sif = nullptr, QWidget* parent = nullptr); | ||
ControllerSettingsWindow(SettingsInterface* game_sif = nullptr, bool edit_profiles = false, | ||
QWidget* parent = nullptr); | ||
~ControllerSettingsWindow(); | ||
|
||
static void editControllerSettingsForGame(QWidget* parent, SettingsInterface* sif); | ||
|
@@ -50,13 +52,13 @@ class ControllerSettingsWindow final : public QWidget | |
|
||
ALWAYS_INLINE bool isEditingGlobalSettings() const | ||
{ | ||
return (m_profile_name.isEmpty() && !m_editing_settings_interface); | ||
return (!m_editing_input_profiles && !m_editing_settings_interface); | ||
} | ||
ALWAYS_INLINE bool isEditingGameSettings() const | ||
{ | ||
return (m_profile_name.isEmpty() && m_editing_settings_interface); | ||
return (!m_editing_input_profiles && m_editing_settings_interface); | ||
} | ||
ALWAYS_INLINE bool isEditingProfile() const { return !m_profile_name.isEmpty(); } | ||
ALWAYS_INLINE bool isEditingProfile() const { return m_editing_input_profiles; } | ||
ALWAYS_INLINE SettingsInterface* getEditingSettingsInterface() { return m_editing_settings_interface; } | ||
|
||
Category getCurrentCategory() const; | ||
|
@@ -90,7 +92,6 @@ private Q_SLOTS: | |
void onDeleteProfileClicked(); | ||
void onRestoreDefaultsClicked(); | ||
void onCopyGlobalSettingsClicked(); | ||
void onRestoreDefaultsForGameClicked(); | ||
|
||
void createWidgets(); | ||
|
||
|
@@ -113,4 +114,5 @@ private Q_SLOTS: | |
|
||
QString m_profile_name; | ||
std::unique_ptr<SettingsInterface> m_profile_settings_interface; | ||
bool m_editing_input_profiles = false; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.