MCPcopy Create free account
hub / github.com/Nitrux/maui-shell / insertZpace

Method insertZpace

src/code/models/zpacesmodel.cpp:80–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80Zpace *ZpacesModel::insertZpace(const int &index)
81{
82 if(!indexIsValid(index))
83 return nullptr;
84
85// if(index > m_zpacesList.count() || index < 0) //we want to be able to insert at count+1
86// {
87// return nullptr;
88// }
89
90 auto newZpace = createZpace();
91 this->beginInsertRows(QModelIndex(), index, index);
92 m_zpacesList.insert(index, newZpace);
93 this->endInsertRows();
94 emit this->countChanged();
95 emit this->zpaceAdded(index);
96
97 return newZpace;
98}
99
100void ZpacesModel::removeZpace(const int &index)
101{

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected