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"
30#include "ores.qt/export.hpp"
34struct badge_color_pair {
55 QObject* parent =
nullptr);
57 void paint(QPainter* painter,
const QStyleOptionViewItem& option,
58 const QModelIndex& index)
const override;
63 std::vector<column_style> styles_;
65 std::unordered_map<std::size_t, badge_color_resolver> column_resolvers_;
Qt-based graphical user interface for ORE Studio.
Definition AccountController.hpp:32
std::function< badge_color_pair(const QString &value)> badge_color_resolver
Callback that resolves a display-text value to badge colours.
Definition EntityItemDelegate.hpp:42
Data-driven item delegate configured by a per-column style vector.
Definition EntityItemDelegate.hpp:50