|
Maki
Formally verfied low-code orchestration
|
#include <settings_dialog.h>
Classes | |
| struct | SelectorPage |
Public Member Functions | |
| SettingsDialog (const QString &title, std::shared_ptr< SettingsManager > manager, std::shared_ptr< LanguageManager > languageManager, QWidget *parent=nullptr) | |
| Public Member Functions inherited from BaseDialog | |
| BaseDialog (const QString &title, double ratio, double screenFraction, QWidget *parent=nullptr) | |
| Constructs a new BaseDialog instance. | |
Private Slots | |
| void | apply () |
Private Member Functions | |
| void | saveToSettings () |
| Current theme. | |
| SelectorPage | addPage (const QString &pageName, const QString &iconName, std::function< void()> resetCallback, QTreeWidgetItem *parent=nullptr) |
| Saves the current settings to the manager. | |
| VoidResult | createAppearancePage () |
| Creates the general settings page. | |
| VoidResult | createGenerationPage () |
| Creates the appearance settings page. | |
| VoidResult | createPluginPages () |
| Creates the generation settings page. | |
| void | updatePluginSetting (const QString &pluginId, const QString &key, QVariant value) |
| Creates the plugin settings pages. | |
Private Attributes | |
| QTreeWidget * | mPageSelector = nullptr |
| Pointer to the stacked widget for managing pages. | |
| std::shared_ptr< SettingsManager > | mSettingsManager = nullptr |
| Pointer to the tree widget for selecting pages. | |
| std::shared_ptr< LanguageManager > | mLanguageManager = nullptr |
| Shared pointer to the SettingsManager. | |
| maki::BooleanWidget * | mRestoreLastSession = nullptr |
| Shared pointer to the LanguageManager. | |
| maki::BooleanWidget * | mAutosaveEnabled = nullptr |
| Widget for enabling/disabling restoring last session. | |
| maki::SpinWidget * | mAutosaveMinutes = nullptr |
| Widget for enabling/disabling autosave. | |
| maki::BooleanWidget * | mConfirmOnClose = nullptr |
| Widget for setting autosave interval in minutes. | |
| maki::BooleanWidget * | mEnableDebugLogs = nullptr |
| Widget for enabling/disabling confirmation on close. | |
| maki::IntegerWidget * | mRecentHistorySize = nullptr |
| Widget for enabling debug logs. | |
| maki::IntegerWidget * | mLogHistorySize = nullptr |
| Widget for setting recent history size. | |
| maki::BooleanWidget * | mShowWelcomeMessage = nullptr |
| Widget for setting the log history size. | |
| maki::SelectorWidget * | mLanguageCombo = nullptr |
| Widget for enabling/disabling welcome message. | |
| maki::SelectorWidget * | mThemeCombo = nullptr |
| Widget for selecting language. | |
| maki::SpinWidget * | mUiScale = nullptr |
| Widget for selecting theme. | |
| maki::BooleanWidget * | mNativeMenuBar = nullptr |
| Widget for setting UI scale. | |
| maki::BooleanWidget * | mShowGrid = nullptr |
| Widget for enabling/disabling native menu bar. | |
| maki::BooleanWidget * | mStartLogTableFilters = nullptr |
| Widget for enabling/disabling grid display. | |
| maki::SpinWidget * | mNodeCornerRadius = nullptr |
| Widget for enabling/disabling log table filters on start up. | |
| maki::SpinWidget * | mNumberOfColumns = nullptr |
| Widget for setting node corner radius. | |
| maki::GridGroup * | mColorGrid = nullptr |
| Widget for setting the palette number of columns. | |
| maki::StringWidget * | mUserThemeName = nullptr |
| Group widget for color settings. | |
| maki::SelectorWidget * | mTransitionShape = nullptr |
| Widget for entering user theme name. | |
| oclero::qlementine::ThemeEditorWidget * | mThemeEditor = nullptr |
| Widget for selecting the transition shape. | |
| maki::ButtonWidget * | mGenerationBrowseBtn = nullptr |
| Widget for editing generation directory. | |
| PluginSettings | mPluginSettings |
| Button widget for browsing generation directory. | |
| maki::SelectorWidget * | mDefaultPlugin = nullptr |
| Vector of plugin settings. | |
| maki::BooleanWidget * | mMergeLogs = nullptr |
| Widget for editing the default plugin. | |
| oclero::qlementine::Theme | mTheme |
| Widget for editing the default plugin. | |
Additional Inherited Members | |
| Protected Member Functions inherited from BaseDialog | |
| void | setSize (double ratio, double screenFraction) |
| Sets the size of the dialog based on the given ratio and screen fraction. | |
| void | setSize (double ratio, double screenFraction, qreal heightFraction) |
| Sets the size of the dialog based on the given ratio, screen fraction, and height fraction. | |
| QVBoxLayout * | layout () |
| Returns the layout of the dialog. | |
| QDialogButtonBox * | createButtons (const QString &ok, const QString &cancel) |
| Creates a button box with OK and Cancel buttons. | |
| void | limitWidth (int minWidth) |
| Defines the width limits for the dialog. | |
| void | limitHeight (int minHeight) |
| Defines the heigth limits for the dialog. | |
Provides a dialog that allows the user to set and view the application settings.
| SettingsDialog::SettingsDialog | ( | const QString & | title, |
| std::shared_ptr< SettingsManager > | manager, | ||
| std::shared_ptr< LanguageManager > | languageManager, | ||
| QWidget * | parent = nullptr ) |
Constructs a new instance of SettingsDialog.
| title | The title of the dialog. |
| manager | A shared pointer to the SettingsManager. |
| languageManager | A shared pointer to the LanguageManager. |
| parent | The parent widget. |
|
private |
Saves the current settings to the manager.
Constructs a standard settings page and assigns the selector accordingly.
| pageName | This will be the page title and the text in the selector. |
| iconName | The icon of the page. It will be reflected in the selector. |
| resetCallback | The callback for when the user clicks the reset button. |
| parent | The parent widget. |
|
privateslot |
Called when the user confirms the new settings.