diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:49 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:49 +0200 |
| commit | 76956486fa7ef52a51d4e56df1e13a9f19a6c93c (patch) | |
| tree | fe0c394439fdc167d1970372e8998874090854dd /models/DecodeHighlightingModel.hpp | |
| parent | 0685fcada9f95fe90f70b387cd7d757da8209624 (diff) | |
| parent | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (diff) | |
Update upstream source from tag 'upstream/3.3.0_beta1+dfsg'
Update to upstream version '3.3.0~beta1+dfsg'
with Debian dir 85037bbb9376721108594b59b54ead82ac6924a3
Diffstat (limited to 'models/DecodeHighlightingModel.hpp')
| -rw-r--r-- | models/DecodeHighlightingModel.hpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/models/DecodeHighlightingModel.hpp b/models/DecodeHighlightingModel.hpp index 839b3ba4..eedcaa1b 100644 --- a/models/DecodeHighlightingModel.hpp +++ b/models/DecodeHighlightingModel.hpp @@ -3,8 +3,11 @@ #include <QAbstractListModel> #include <QBrush> +#include <QColor> #include <QList> +#include <vector> + #include "qt_helpers.hpp" #include "pimpl_h.hpp" @@ -34,14 +37,41 @@ public: }; using HighlightItems = QList<HighlightInfo>; + struct ResolvedHighlight final + { + Highlight type_; + QColor background_; + QColor foreground_; + }; + using HighlightTypes = std::vector<Highlight>; + + struct HighlightColors final + { + Highlight type_; + QBrush foreground_; + QBrush background_; + }; + using ColorPreset = QList<HighlightColors>; + explicit DecodeHighlightingModel (QObject * parent = 0); ~DecodeHighlightingModel(); - // access to raw items nd default items + // access to raw items and default items static HighlightItems const& default_items (); static HighlightItems const& default_items2 (); + static ColorPreset const& default_color_preset (); + static ColorPreset const& default2_color_preset (); + static ColorPreset const& red_green_color_vision_preset (); + static ColorPreset const& blue_yellow_color_vision_preset (); + static ColorPreset const& high_contrast_color_preset (); + static ColorPreset const& dark_shack_color_preset (); + static ColorPreset const& solarized_color_preset (); + static ColorPreset const& monochrome_color_preset (); + static ResolvedHighlight resolve_colors (HighlightItems const&, HighlightTypes const&, + QColor background, QColor foreground); HighlightItems const& items () const; void items (HighlightItems const&); + bool apply_color_preset (ColorPreset const&); void set_font (QFont const&); |
