diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2020-06-18 20:10:20 +0200 |
|---|---|---|
| committer | Felix (xq) Queißner <git@mq32.de> | 2020-06-18 20:10:20 +0200 |
| commit | 75bbab5fcc0260ac765b216b8b3d989f88dac159 (patch) | |
| tree | 0713aff62c08bb3cff7691c252279c6a8baf6c3d /src/kristall.hpp | |
| parent | 151323b0c75464318881c3f96f2c3f558e63ca99 (diff) | |
| download | kristall-75bbab5fcc0260ac765b216b8b3d989f88dac159.tar.gz | |
Reworks global settings handling, improves redirection configuration.
Diffstat (limited to 'src/kristall.hpp')
| -rw-r--r-- | src/kristall.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/kristall.hpp b/src/kristall.hpp index face253..dd83498 100644 --- a/src/kristall.hpp +++ b/src/kristall.hpp @@ -8,10 +8,44 @@ #include "ssltrust.hpp" #include "favouritecollection.hpp" +enum class Theme : int +{ + light = 0, + dark = 1, +}; + +struct GenericSettings +{ + enum TextDisplay { + FormattedText, + PlainText, + }; + + enum RedirectionWarning { + WarnNever = 0, + WarnOnSchemeChange = 1, + WarnOnHostChange = 2, + WarnAlways = -1, + }; + + QString start_page = "about:favourites"; + Theme theme = Theme::light; + TextDisplay text_display = FormattedText; + bool enable_text_decoration = false; + bool use_os_scheme_handler = false; + TextDisplay gophermap_display = FormattedText; + int max_redirections = 5; + RedirectionWarning redirection_policy = WarnOnHostChange; + + void load(QSettings & settings); + void save(QSettings & settings) const; +}; + extern QSettings global_settings; extern IdentityCollection global_identities; extern QClipboard * global_clipboard; extern SslTrust global_trust; extern FavouriteCollection global_favourites; +extern GenericSettings global_options; #endif // KRISTALL_HPP |
