~ubuntu-branches/ubuntu/trusty/bibletime/trusty

« back to all changes in this revision

Viewing changes to src/backend/bookshelfmodel/categoryitem.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Marsden
  • Date: 2010-01-10 22:21:36 UTC
  • mfrom: (1.3.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100110222136-905hza76230hperg
Tags: 2.5-1
New upstream version 2.5 (Closes: #564551).

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    // Intentionally empty
21
21
}
22
22
 
 
23
QVariant CategoryItem::data(int role) const {
 
24
    switch (role) {
 
25
        case Qt::DisplayRole:
 
26
            return BtBookshelfModel::categoryName(m_category);
 
27
        case Qt::DecorationRole:
 
28
            return BtBookshelfModel::categoryIcon(m_category);
 
29
        default:
 
30
            return Item::data(role);
 
31
    }
 
32
}
 
33
 
23
34
bool CategoryItem::operator<(const Item &other) const {
24
35
    if (other.type() != ITEM_CATEGORY) {
25
36
        return ITEM_CATEGORY < other.type();