Go to the documentation of this file.
25 #include <QAbstractTableModel>
26 #include <IceGrid/Admin.h>
31 public QAbstractTableModel
44 int rowCount(
const QModelIndex& parent = QModelIndex())
const override
49 int columnCount(
const QModelIndex& parent = QModelIndex())
const override
54 QVariant
data(
const QModelIndex&
index,
int role = Qt::DisplayRole)
const override
66 if (role == Qt::DisplayRole)
70 switch (
index.column())
73 return QString::fromStdString(
nodeInfo.name);
77 return QString::fromStdString(
nodeInfo.os);
81 return QString::fromStdString(
nodeInfo.hostname);
85 return QString::fromStdString(
nodeInfo.release);
89 return QString::fromStdString(
nodeInfo.version);
93 return QString::fromStdString(
nodeInfo.machine);
97 return QString::number(
nodeInfo.nProcessors);
101 return QString::fromStdString(
nodeInfo.dataDir);
114 if (role != Qt::DisplayRole)
119 if (orientation == Qt::Horizontal)
124 return QString(
"Name");
128 return QString(
"OS");
132 return QString(
"Hostname");
136 return QString(
"Release");
140 return QString(
"Version");
144 return QString(
"Machine");
148 return QString(
"#CPUs");
152 return QString(
"DataDir");
166 return Qt::ItemFlags(0);
ScalarT Orientation(const VectorXD< 2, ScalarT > &p1, const VectorXD< 2, ScalarT > &p2, const VectorXD< 2, ScalarT > &c)
NodeInfoModel(IceGrid::NodeInfo nodeInfo)
bool setData(IceGrid::NodeInfo newInfo)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Qt::ItemFlags flags(const QModelIndex &index) const override
IceGrid::NodeInfo nodeInfo
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
int rowCount(const QModelIndex &parent=QModelIndex()) const override