comparison ui/certificatetablemodel.cpp @ 397:8752aae8aad8

Set DejaVu Sans Mono as font for fingerprint column.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 15 Apr 2014 16:46:13 +0200
parents 26651cc0cc47
children 17e1c8f37d72
comparison
equal deleted inserted replaced
396:26651cc0cc47 397:8752aae8aad8
1 #include "certificatetablemodel.h" 1 #include "certificatetablemodel.h"
2
3 #include <QFont>
2 4
3 CertificateTabelModel::CertificateTabelModel(QObject *parent) 5 CertificateTabelModel::CertificateTabelModel(QObject *parent)
4 : QAbstractTableModel(parent) 6 : QAbstractTableModel(parent)
5 { 7 {
6 header.append(""); 8 header.append("");
67 } 69 }
68 if (role == Qt::UserRole) { 70 if (role == Qt::UserRole) {
69 Certificate cert = certificates.at(index.row()); 71 Certificate cert = certificates.at(index.row());
70 return cert.isEditable(); 72 return cert.isEditable();
71 } 73 }
74 if (role == Qt::FontRole && index.column() == 7) {
75 QFont block("DejaVu Sans Mono");
76 return block;
77 }
72 78
73 return QVariant(); 79 return QVariant();
74 } 80 }
75 81
76 bool CertificateTabelModel::setData(const QModelIndex &index, 82 bool CertificateTabelModel::setData(const QModelIndex &index,

http://wald.intevation.org/projects/trustbridge/