From 83d2b014f563b9de387c4d8e9e45adbb36b56825 Mon Sep 17 00:00:00 2001 From: Arno Date: Wed, 28 Dec 2011 19:36:05 +0100 Subject: Mark items in DbAnalyzerDialog It's now possible to mark items in DbAnalyzerDialog with a different color, when there are no covers or actor information available on the net. I enhanced SmTreeItem to contain a QVariant::foregroundColor, and made SmTreeModel return it when QModelIndex::data with role Qt::ForegroundRole is called. Maybe that could be useful for other things like favorites and such... --- smtreeitem.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'smtreeitem.h') diff --git a/smtreeitem.h b/smtreeitem.h index 591f2a4..28ab77a 100644 --- a/smtreeitem.h +++ b/smtreeitem.h @@ -26,6 +26,8 @@ class SmTreeItem { void setParent(SmTreeItem *parent); QVariant data(int column) const; void setData(int column, const QVariant &data); + QVariant foregroundColor() const; + void setForegroundColor(const QVariant &data); bool insertChild(int where, SmTreeItem *child); bool removeChild(int where, bool deleteChild = true); @@ -33,6 +35,7 @@ class SmTreeItem { private: QList mChildren; QList mData; + QVariant mForegroundColor; SmTreeItem *mParent; }; -- cgit v1.2.3-70-g09d2