MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / flags

Method flags

src/plugins/smartut/common/projectitemmodel.cpp:208–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208Qt::ItemFlags ProjectItemModel::flags(const QModelIndex &index) const
209{
210 if (!index.isValid())
211 return {};
212
213 Qt::ItemFlags flags = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
214 if (Node *node = nodeForIndex(index)) {
215 if (node->isProjectNodeType())
216 return flags;
217 if (d->view->viewType() == ProjectTreeView::Project) {
218 flags |= Qt::ItemIsUserCheckable;
219 if (!node->isFileNodeType())
220 flags |= Qt::ItemIsUserTristate;
221 }
222 }
223
224 return flags;
225}
226
227Node *ProjectItemModel::nodeForIndex(const QModelIndex &index) const
228{

Callers 3

editorEventMethod · 0.45
drawFileIconMethod · 0.45
fileIconRectMethod · 0.45

Calls 4

viewTypeMethod · 0.80
isValidMethod · 0.45
isProjectNodeTypeMethod · 0.45
isFileNodeTypeMethod · 0.45

Tested by

no test coverage detected