MCPcopy Create free account
hub / github.com/XRay3D/GERBER_X3 / data

Method data

GGEasy/forms/formsutil/errordialog.cpp:77–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 int rowCount(const QModelIndex&) const override { return static_cast<int>(items.size()); }
76 int columnCount(const QModelIndex&) const override { return 2; }
77 QVariant data(const QModelIndex& index, int role) const override
78 {
79 switch (role) {
80 case Qt::DisplayRole:
81 if (index.column() == 0) {
82 auto pos { items[index.row()]->boundingRect().center() };
83 return QString("X = %1\nY = %2").arg(pos.x()).arg(pos.y());
84 }
85 return items[index.row()]->area();
86 case Qt::UserRole:
87 return QVariant::fromValue(items[index.row()]);
88 case Qt::DecorationRole:
89 if (index.column() == 0)
90 return errorIcon(items[index.row()]->shape());
91 return {};
92 case Qt::TextAlignmentRole:
93 if (index.column() == 0)
94 return Qt::AlignVCenter;
95 return Qt::AlignCenter;
96 default:
97 break;
98 }
99 return {};
100 }
101
102 QVariant headerData(int section, Qt::Orientation orientation, int role) const override
103 {

Callers 1

selectionChangedMethod · 0.45

Calls 7

errorIconFunction · 0.85
xMethod · 0.80
yMethod · 0.80
areaMethod · 0.80
boundingRectMethod · 0.45
rowMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected