Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[nemo-qml-plugin-calendar] Expose whether notebook is the default one
  • Loading branch information
pvuorela committed Nov 13, 2013
1 parent 66c3ec5 commit a07952f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/calendarnotebookmodel.cpp
Expand Up @@ -41,6 +41,7 @@ NemoCalendarNotebookModel::NemoCalendarNotebookModel()
mRoleNames[UidRole] = "uid";
mRoleNames[DescriptionRole] = "description";
mRoleNames[ColorRole] = "color";
mRoleNames[DefaultRole] = "isDefault";
}

int NemoCalendarNotebookModel::rowCount(const QModelIndex &index) const
Expand All @@ -67,6 +68,8 @@ QVariant NemoCalendarNotebookModel::data(const QModelIndex &index, int role) con
return notebook->description();
case ColorRole:
return NemoCalendarEventCache::instance()->notebookColor(notebook->uid());
case DefaultRole:
return notebook->isDefault();
default:
return QVariant();
}
Expand Down
1 change: 1 addition & 0 deletions src/calendarnotebookmodel.h
Expand Up @@ -44,6 +44,7 @@ class NemoCalendarNotebookModel : public QAbstractListModel
UidRole,
DescriptionRole,
ColorRole,
DefaultRole
};

NemoCalendarNotebookModel();
Expand Down

0 comments on commit a07952f

Please sign in to comment.