Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ class WidgetDataView {
[[nodiscard]] std::optional<std::vector<std::string>> selectedItems(std::string_view name) const {
return getStringArray(name, "selected_items");
}
[[nodiscard]] std::optional<std::vector<std::string>> listItemColors(std::string_view name) const {
return getStringArray(name, "list_item_colors");
}

// --- QTableWidget ---
[[nodiscard]] std::optional<std::vector<std::string>> tableHeaders(std::string_view name) const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ class WidgetData {
return *this;
}

// Set foreground colors for QListWidget items, parallel to the items vector
// set by setListItems. Each entry is a CSS color string (e.g. "#ff0000") or
// empty to use the default palette color. Size must match the items vector.
WidgetData& setListItemColors(std::string_view name, const std::vector<std::string>& colors) {
entry(name)["list_item_colors"] = colors;
return *this;
}

// --- QTableWidget ---
WidgetData& setTableHeaders(std::string_view name, const std::vector<std::string>& headers) {
entry(name)["headers"] = headers;
Expand Down
Loading