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

Method closeProject

static_libs/filetree/ft_model.cpp:96–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void Model::closeProject()
97{
98 Node* item;
99 for (int i = 0; i < rootItem->childCount(); ++i) {
100 item = rootItem->child(i);
101 QModelIndex index = createIndex(i, 0, item);
102 int rowCount = item->childCount();
103 if (rowCount) {
104 beginRemoveRows(index, 0, rowCount - 1);
105 for (int j = 0; j < rowCount; ++j)
106 item->remove(0);
107 endRemoveRows();
108 }
109 }
110}
111
112QModelIndex Model::index(int row, int column, const QModelIndex& parent) const
113{

Callers

nothing calls this directly

Calls 3

childCountMethod · 0.45
childMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected