BibleTime
languageitem.cpp
Go to the documentation of this file.
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, https://bibletime.info/
6*
7* Copyright 1999-2025 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 "languageitem.h"
14
15#include <QIcon>
16#include "../../util/cresmgr.h"
17#include "../language.h"
18
19
20namespace BookshelfModel {
21
22QVariant LanguageItem::data(int const role) const {
23 switch (role) {
24
25 case Qt::DisplayRole:
26 return m_language->translatedName();
27
28 case Qt::DecorationRole:
29 return CResMgr::modules::icon_moduleLanguage();
30
31 default:
32 return Item::data(role);
33
34 }
35}
36
37} // namespace BookshelfModel
virtual QVariant data(int role=Qt::DisplayRole) const
Returns data for this item.
Definition item.cpp:44
QVariant data(int role=Qt::DisplayRole) const override
Returns data for this item.
std::shared_ptr< Language const > m_language