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

Method headerData

launcher/ui/pages/instance/ServersPage.cpp:323–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321 }
322
323 QVariant headerData(int section, Qt::Orientation orientation, int role) const override
324 {
325 if (section < 0 || section >= COLUMN_COUNT)
326 return QVariant();
327
328 if(role == Qt::DisplayRole)
329 {
330 switch(section)
331 {
332 case 0:
333 return tr("Name");
334 case 1:
335 return tr("Address");
336 case 2:
337 return tr("Latency");
338 }
339 }
340
341 return QAbstractListModel::headerData(section, orientation, role);
342 }
343
344 virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
345 {

Callers 3

columnDescriptionMethod · 0.45
rowDescriptionMethod · 0.45
setModelMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected