From ffc62c792c9a5196cb4ce7a353287dfe20db6524 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Fri, 9 Oct 2026 14:12:35 +0200 Subject: New upstream version 3.3.0~beta1+dfsg --- models/DecodeHighlightingModel.hpp | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'models/DecodeHighlightingModel.hpp') 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 #include +#include #include +#include + #include "qt_helpers.hpp" #include "pimpl_h.hpp" @@ -34,14 +37,41 @@ public: }; using HighlightItems = QList; + struct ResolvedHighlight final + { + Highlight type_; + QColor background_; + QColor foreground_; + }; + using HighlightTypes = std::vector; + + struct HighlightColors final + { + Highlight type_; + QBrush foreground_; + QBrush background_; + }; + using ColorPreset = QList; + 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&); -- cgit v1.2.3