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

« back to all changes in this revision

Viewing changes to src/backend/bookshelfmodel/indexingitem.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:
 
1
/*********
 
2
*
 
3
* In the name of the Father, and of the Son, and of the Holy Spirit.
 
4
*
 
5
* This file is part of BibleTime's source code, http://www.bibletime.info/.
 
6
*
 
7
* Copyright 1999-2009 by the BibleTime developers.
 
8
* The BibleTime source code is licensed under the GNU General Public License
 
9
* version 2.0.
 
10
*
 
11
**********/
 
12
 
 
13
#include "indexingitem.h"
 
14
 
 
15
 
 
16
namespace BookshelfModel {
 
17
 
 
18
IndexingItem::IndexingItem(CSwordModuleInfo *module)
 
19
        : Item(Item::ITEM_INDEXING), m_indexed(module->hasIndex()) {
 
20
    // Intentionally empty
 
21
}
 
22
 
 
23
QVariant IndexingItem::data(int role) const {
 
24
    switch (role) {
 
25
        case Qt::DisplayRole:
 
26
            if (m_indexed) {
 
27
                return QObject::tr("Indexed works");
 
28
            }
 
29
            else {
 
30
                return QObject::tr("Unindexed works");
 
31
            }
 
32
        default:
 
33
            return Item::data(role);
 
34
    }
 
35
}
 
36
 
 
37
} // namespace BookshelfModel