MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / data

Method data

launcher/ui/pages/instance/LogPage.cpp:60–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 {
59 }
60 QVariant data(const QModelIndex &index, int role) const override
61 {
62 switch(role)
63 {
64 case Qt::FontRole:
65 return m_font;
66 case Qt::ForegroundRole:
67 {
68 MessageLevel::Enum level = (MessageLevel::Enum) QIdentityProxyModel::data(index, LogModel::LevelRole).toInt();
69 return m_colors->getFront(level);
70 }
71 case Qt::BackgroundRole:
72 {
73 MessageLevel::Enum level = (MessageLevel::Enum) QIdentityProxyModel::data(index, LogModel::LevelRole).toInt();
74 return m_colors->getBack(level);
75 }
76 default:
77 return QIdentityProxyModel::data(index, role);
78 }
79 }
80
81 void setFont(QFont font)
82 {

Callers

nothing calls this directly

Calls 3

dataFunction · 0.85
getFrontMethod · 0.45
getBackMethod · 0.45

Tested by

no test coverage detected