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

Method data

file_plugins/excellon/exnode.cpp:68–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68QVariant Node::data(const QModelIndex& index, int role) const
69{
70 if (file)
71 switch (FileTree::Column(index.column())) {
72 case FileTree::Column::NameColorVisible:
73 switch (role) {
74 case Qt::DisplayRole:
75 return file->shortName();
76 case Qt::ToolTipRole:
77 return file->shortName() + "\n"
78 + file->name();
79 case Qt::CheckStateRole:
80 return file->itemGroup()->isVisible() ? Qt::Checked : Qt::Unchecked;
81 case Qt::DecorationRole:
82 return QIcon::fromTheme("drill-path");
83 case FileTree::Id:
84 return *m_id;
85 default:
86 return QVariant();
87 }
88 case FileTree::Column::Side:
89 switch (role) {
90 case Qt::DisplayRole:
91 case Qt::ToolTipRole:
92 return sideStrList[file->side()];
93 case Qt::EditRole:
94 return static_cast<bool>(file->side());
95 case FileTree::Id:
96 return *m_id;
97 default:
98 return QVariant();
99 }
100 default:
101 return QVariant();
102 }
103 return QVariant();
104}
105
106void Node::menu(QMenu& menu, FileTree::View* tv) const
107{

Callers 2

parseCommentMethod · 0.45
highlightBlockMethod · 0.45

Calls 6

shortNameMethod · 0.80
ColumnEnum · 0.50
nameMethod · 0.45
isVisibleMethod · 0.45
itemGroupMethod · 0.45
sideMethod · 0.45

Tested by

no test coverage detected