|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
App-wide UI settings: layout metrics, the colour palette, and font colours. More...
#include <settings.h>
Public Member Functions | |
| Settings (SaveFile *file) | |
| void | setColorScheme (QColor primary, QColor secondary) |
| Recolour the palette at runtime. | |
| int | getPreviewTilesetIndex () |
| Index of previewTileset (backs the property). | |
Public Attributes | |
| int | headerHeight = 80 |
| int | headerShadowHeight = 20 |
| bool | infoBtnPressed = false |
| QString | previewTileset = "Overworld" |
| bool | previewOutdoor = true |
| QColor | textColorLight = QColor("#efefef") |
| QColor | textColorMid = QColor("#757575") |
| QColor | textColorDark = QColor("#212121") |
| QColor | primaryColor = QColor("#d81b60") |
| QColor | primaryColorLight = QColor("#ff5c8d") |
| QColor | primaryColorDark = QColor("#a00037") |
| QColor | errorColor = QColor("red") |
| QColor | dividerColor = QColor("#BDBDBD") |
| QColor | accentColor = QColor("#607D8B") |
| QColor | fontColorNormal = QColor("#616161") |
| QColor | fontColorControl = QColor("#7B1FA2") |
| QColor | fontColorPicture = QColor("#303F9F") |
| QColor | fontColorSingle = QColor("#9E9D24") |
| QColor | fontColorMulti = QColor("#FF6F00") |
| QColor | fontColorVar = QColor("#388E3C") |
Protected Member Functions | |
| void | dataChanged () |
| React to the save's data changing. | |
Protected Attributes | |
| SaveFile * | file |
| The live save (held for data-reactive settings). | |
App-wide UI settings: layout metrics, the colour palette, and font colours.
The single source of truth the QML reads for theming and layout – header sizing, the Material-style colour palette (text/primary/divider/accent), the per-font-category colours used by the keyboard, and the name-preview tileset choice. Exposed to QML as brg.settings. setColorScheme() recolours the palette at runtime; it holds the SaveFile so a few settings can react to data changes.
Definition at line 34 of file settings.h.
| Settings::Settings | ( | SaveFile * | file | ) |
| file | the live save (a few settings react to it). |
Definition at line 58 of file settings.cpp.
References dataChanged(), SaveFile::dataExpandedChanged(), and file.
|
protected |
React to the save's data changing.
Definition at line 90 of file settings.cpp.
References file, MapsDB::getIndAt(), MapsDB::inst(), OUTDOOR, previewOutdoor, and previewTileset.
Referenced by Settings().
| int Settings::getPreviewTilesetIndex | ( | ) |
Index of previewTileset (backs the property).
Definition at line 76 of file settings.cpp.
References previewTileset, and tilesetOrder.
| void Settings::setColorScheme | ( | QColor | primary, |
| QColor | secondary ) |
Recolour the palette at runtime.
Definition at line 67 of file settings.cpp.
References accentColor, primaryColor, primaryColorDark, and primaryColorLight.
| QColor Settings::accentColor = QColor("#607D8B") |
Definition at line 121 of file settings.h.
Referenced by setColorScheme().
| QColor Settings::dividerColor = QColor("#BDBDBD") |
Definition at line 120 of file settings.h.
| QColor Settings::errorColor = QColor("red") |
Definition at line 118 of file settings.h.
|
protected |
The live save (held for data-reactive settings).
Definition at line 134 of file settings.h.
Referenced by dataChanged(), and Settings().
| QColor Settings::fontColorControl = QColor("#7B1FA2") |
Definition at line 124 of file settings.h.
| QColor Settings::fontColorMulti = QColor("#FF6F00") |
Definition at line 127 of file settings.h.
| QColor Settings::fontColorNormal = QColor("#616161") |
Definition at line 123 of file settings.h.
| QColor Settings::fontColorPicture = QColor("#303F9F") |
Definition at line 125 of file settings.h.
| QColor Settings::fontColorSingle = QColor("#9E9D24") |
Definition at line 126 of file settings.h.
| QColor Settings::fontColorVar = QColor("#388E3C") |
Definition at line 128 of file settings.h.
| int Settings::headerHeight = 80 |
Definition at line 94 of file settings.h.
| int Settings::headerShadowHeight = 20 |
Definition at line 95 of file settings.h.
| bool Settings::infoBtnPressed = false |
Definition at line 98 of file settings.h.
| bool Settings::previewOutdoor = true |
Definition at line 102 of file settings.h.
Referenced by dataChanged().
| QString Settings::previewTileset = "Overworld" |
Definition at line 101 of file settings.h.
Referenced by dataChanged(), and getPreviewTilesetIndex().
| QColor Settings::primaryColor = QColor("#d81b60") |
Definition at line 110 of file settings.h.
Referenced by setColorScheme().
| QColor Settings::primaryColorDark = QColor("#a00037") |
Definition at line 112 of file settings.h.
Referenced by setColorScheme().
| QColor Settings::primaryColorLight = QColor("#ff5c8d") |
Definition at line 111 of file settings.h.
Referenced by setColorScheme().
| QColor Settings::textColorDark = QColor("#212121") |
Definition at line 108 of file settings.h.
| QColor Settings::textColorLight = QColor("#efefef") |
Definition at line 106 of file settings.h.
| QColor Settings::textColorMid = QColor("#757575") |
Definition at line 107 of file settings.h.