mirror of
https://github.com/YACReader/yacreader
synced 2025-07-22 15:04:40 -04:00
colorized empty label widget and fixed label info on insert
This commit is contained in:
@ -73,6 +73,12 @@ QVariant ReadingListModel::data(const QModelIndex &index, int role) const
|
||||
return QVariant(ReadingListModel::Separator);
|
||||
}
|
||||
|
||||
if (role == ReadingListModel::LabelColorRole && typeid(*item) == typeid(LabelItem) )
|
||||
{
|
||||
LabelItem * labelItem = static_cast<LabelItem*>(item);
|
||||
return QVariant(labelItem->colorid());
|
||||
}
|
||||
|
||||
if (role == ReadingListModel::IDRole)
|
||||
return item->getId();
|
||||
|
||||
|
@ -52,7 +52,8 @@ public:
|
||||
|
||||
enum Roles {
|
||||
TypeListsRole = Qt::UserRole + 1,
|
||||
IDRole
|
||||
IDRole,
|
||||
LabelColorRole
|
||||
};
|
||||
|
||||
enum TypeList {
|
||||
|
Reference in New Issue
Block a user