Dialog for changing various application settings.
More...
#include <settingsdialog.h>
|
void | setNexusCryptographyFields (const std::string &cipher, const std::string &nonce, const std::string &tag, bool uses_default_pw) |
| Writes details about the encrypted Nexus API key to the settings file.
|
|
|
void | settingsDialogAccepted () |
| Signals dialog completion.
|
|
|
| SettingsDialog (QWidget *parent=nullptr) |
| Initializes the UI.
|
|
| ~SettingsDialog () |
| Deletes the UI.
|
|
void | init () |
| Initializes the dialog with the settings stored on disc.
|
|
bool | askRemoveMod () const |
| Returns true if the ask when removing a mod option has been selected.
|
|
bool | askRemoveFromDeployer () const |
| Returns true if the ask when removing a mod from deployer option has been selected.
|
|
bool | askRemoveProfile () const |
| Returns true if the ask when removing a profile option has been selected.
|
|
bool | deployAll () const |
| Returns true if the deploy for all option has been selected.
|
|
bool | logOnError () const |
| Returns true if the log on error option has been selected.
|
|
bool | logOnWarning () const |
| Returns true if the log on warning option has been selected.
|
|
bool | askRemoveBackupTarget () const |
| Returns true if the ask when removing a backup target option has been selected.
|
|
bool | askRemoveBackup () const |
| Returns true if the ask when removing a backup option has been selected.
|
|
bool | askRemoveTool () const |
| Returns true if the ask when removing tool option has been selected.
|
|
|
static std::optional< std::tuple< std::string, std::string, std::string, bool > > | getNexusApiKeyDetails () |
| Reads the key cipher, nonce, tag and the is_default flag for the Nexus API key from the settings file.
|
|
|
void | on_buttonBox_accepted () |
| Updates the settings on disc with the selection made in this dialog. Emits settingsDialogAccepted.
|
|
void | on_set_api_key_button_clicked () |
| Opens a AddApiKeyDialog to add a new api key.
|
|
void | on_change_api_pw_button_clicked () |
| Initializes and executes a ChangeApiPwDialog.
|
|
void | on_show_api_key_button_clicked () |
| Toggles visibility of the API key.
|
|
|
Ui::SettingsDialog * | ui |
| Contains auto-generated UI elements.
|
|
bool | ask_remove_mod_ = true |
| True if the ask when removing a mod option has been selected.
|
|
bool | ask_remove_from_deployer_ = true |
| True if the ask when removing a mod from deployer option has been selected.
|
|
bool | ask_remove_profile_ = true |
| True if the ask when removing a profile option has been selected.
|
|
bool | deploy_all_ = true |
| True if the deploy for all option has been selected.
|
|
bool | log_on_error_ = true |
| True if the log on error option has been selected.
|
|
bool | log_on_warning_ = true |
| True if the log on warning option has been selected.
|
|
bool | ask_remove_backup_target_ = true |
| True if the ask when removing a backup target option has been selected.
|
|
bool | ask_remove_backup_ = true |
| True if the ask when removing a backup option has been selected.
|
|
bool | ask_remove_tool_ = true |
| True if the ask when removing a tool option has been selected.
|
|
bool | dialog_completed_ = false |
| Indicates whether the dialog has been completed.
|
|
const QIcon | show_icon = QIcon::fromTheme("view-visible") |
| Icon used to indicate that the password is to be shown.
|
|
const QIcon | hide_icon = QIcon::fromTheme("view-hidden") |
| Icon used to indicate that the password is to be hidden.
|
|
const QString | api_key_hidden_string = "API Key: ***" |
| Text shown instead of an API key when the visibility is set to hidden.
|
|
Dialog for changing various application settings.
◆ SettingsDialog()
SettingsDialog::SettingsDialog |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
Initializes the UI.
- Parameters
-
parent | Parent for this widget, this is passed to the constructor of QDialog. |
is_flatpak | Whether or not this application is running as a flatpak. |
◆ askRemoveBackup()
bool SettingsDialog::askRemoveBackup |
( |
| ) |
const |
Returns true if the ask when removing a backup option has been selected.
- Returns
- The selection.
◆ askRemoveBackupTarget()
bool SettingsDialog::askRemoveBackupTarget |
( |
| ) |
const |
Returns true if the ask when removing a backup target option has been selected.
- Returns
- The selection.
◆ askRemoveFromDeployer()
bool SettingsDialog::askRemoveFromDeployer |
( |
| ) |
const |
Returns true if the ask when removing a mod from deployer option has been selected.
- Returns
- The selection.
◆ askRemoveMod()
bool SettingsDialog::askRemoveMod |
( |
| ) |
const |
Returns true if the ask when removing a mod option has been selected.
- Returns
- The selection.
◆ askRemoveProfile()
bool SettingsDialog::askRemoveProfile |
( |
| ) |
const |
Returns true if the ask when removing a profile option has been selected.
- Returns
- The selection.
◆ askRemoveTool()
bool SettingsDialog::askRemoveTool |
( |
| ) |
const |
Returns true if the ask when removing tool option has been selected.
- Returns
- The selection.
◆ deployAll()
bool SettingsDialog::deployAll |
( |
| ) |
const |
Returns true if the deploy for all option has been selected.
- Returns
- The selection.
◆ getNexusApiKeyDetails()
std::optional< std::tuple< std::string, std::string, std::string, bool > > SettingsDialog::getNexusApiKeyDetails |
( |
| ) |
|
|
static |
Reads the key cipher, nonce, tag and the is_default flag for the Nexus API key from the settings file.
- Returns
- The key cipher, nonce, tag and the is_default flag. An empty optional if no key exists in the settings.
◆ logOnError()
bool SettingsDialog::logOnError |
( |
| ) |
const |
Returns true if the log on error option has been selected.
- Returns
- The selection.
◆ logOnWarning()
bool SettingsDialog::logOnWarning |
( |
| ) |
const |
Returns true if the log on warning option has been selected.
- Returns
- The selection.
◆ setNexusCryptographyFields
void SettingsDialog::setNexusCryptographyFields |
( |
const std::string & | cipher, |
|
|
const std::string & | nonce, |
|
|
const std::string & | tag, |
|
|
bool | uses_default_pw ) |
|
slot |
Writes details about the encrypted Nexus API key to the settings file.
- Parameters
-
cipher | Cypher text of the API key. |
nonce | AES-GCM nonce used during encryption. |
tag | AES-GCM authorization tag generated during encryption. |
uses_default_pw | If true: User set no password. |
The documentation for this class was generated from the following files: