diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
| commit | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch) | |
| tree | 1269efa852935b183daae4bb33a58d1b4d2ffb53 /models/DecodeHighlightingModel.hpp | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
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&); |
