20#ifndef ORES_QT_ENTITY_ITEM_DELEGATE_HPP
21#define ORES_QT_ENTITY_ITEM_DELEGATE_HPP
24#include <unordered_map>
28#include <QStyledItemDelegate>
29#include "ores.qt/ColumnMetadata.hpp"
33struct badge_color_pair {
54 QObject* parent =
nullptr);
56 void paint(QPainter* painter,
const QStyleOptionViewItem& option,
57 const QModelIndex& index)
const override;
62 std::vector<column_style> styles_;
64 std::unordered_map<std::size_t, badge_color_resolver> column_resolvers_;
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:29
std::function< badge_color_pair(const QString &value)> badge_color_resolver
Callback that resolves a display-text value to badge colours.
Definition EntityItemDelegate.hpp:41
Data-driven item delegate configured by a per-column style vector.
Definition EntityItemDelegate.hpp:49