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

Method data

GGEasy/gcode/gcnode.cpp:64–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64QVariant Node::data(const QModelIndex& index, int role) const
65{
66 switch (index.column()) {
67 case FileTree::Column::NameColorVisible:
68 switch (role) {
69 case Qt::DisplayRole:
70 if (file->shortName().endsWith(Settings::fileExtension()))
71 return file->shortName();
72 else
73 return file->shortName() + QStringList({ "_TS", "_BS" })[file->side()];
74 case Qt::EditRole:
75 return file->shortName();
76 case Qt::ToolTipRole:
77 return file->shortName() + "\n" + file->name();
78 case Qt::CheckStateRole:
79 return file->itemGroup()->isVisible() ? Qt::Checked : Qt::Unchecked;
80 case Qt::DecorationRole:
81 return file->icon();
82 case FileTree::Id:
83 return *m_id;
84 default:
85 return QVariant();
86 }
87 case FileTree::Column::Side:
88 switch (role) {
89 case Qt::DisplayRole:
90 case Qt::ToolTipRole:
91 return sideStrList[file->side()];
92 case Qt::EditRole:
93 return static_cast<bool>(file->side());
94 default:
95 return QVariant();
96 }
97 default:
98 return QVariant();
99 }
100}
101
102Qt::ItemFlags Node::flags(const QModelIndex& index) const
103{

Callers 12

openRecentFileMethod · 0.45
mainFunction · 0.45
ifCancelThenThrowMethod · 0.45
createGiPocketMethod · 0.45
highlightBlockMethod · 0.45
jcVoronoiMethod · 0.45
toPathMethod · 0.45
DllRegisterServerFunction · 0.45
DllUnregisterServerFunction · 0.45
addFlashMethod · 0.45
createLineMethod · 0.45
apBlockMethod · 0.45

Calls 6

shortNameMethod · 0.80
sideMethod · 0.45
nameMethod · 0.45
isVisibleMethod · 0.45
itemGroupMethod · 0.45
iconMethod · 0.45

Tested by

no test coverage detected