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.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'smtreeitem.cpp') diff --git a/smtreeitem.cpp b/smtreeitem.cpp index 5584319..56d9b6e 100644 --- a/smtreeitem.cpp +++ b/smtreeitem.cpp @@ -73,6 +73,14 @@ void SmTreeItem::setData(int column, const QVariant &data){ mData[column] = data; } +QVariant SmTreeItem::foregroundColor() const{ + return mForegroundColor; +} + +void SmTreeItem::setForegroundColor(const QVariant &data){ + mForegroundColor = data; +} + bool SmTreeItem::insertChild(int where, SmTreeItem *child){ if((where < 0) || (where > mChildren.count())){ return false; -- cgit v1.2.3-70-g09d2