| 26 | TranslatorWrapperProxy::~TranslatorWrapperProxy() = default; |
| 27 | |
| 28 | QVariant TranslatorWrapperProxy::data(const QModelIndex &proxyIndex, int role) const |
| 29 | { |
| 30 | if (hasIndex(proxyIndex.row(), proxyIndex.column(), proxyIndex.parent())) { |
| 31 | if (role == Qt::FontRole) { |
| 32 | const bool overridden = proxyIndex.sibling(proxyIndex.row(), 3) |
| 33 | .data(TranslationsModel::IsOverriddenRole) |
| 34 | .toBool(); |
| 35 | QFont font; |
| 36 | font.setItalic(overridden); |
| 37 | return font; |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | return QIdentityProxyModel::data(proxyIndex, role); |
| 42 | } |
| 43 | |
| 44 | QVariant TranslatorWrapperProxy::headerData(int section, Qt::Orientation orientation, int role) const |
| 45 | { |