183 if (subsys->subsysflag==
flag) {
191 std::cout<<
"VolumeTreeModel::addSubSystem Error: System has already been added!"<<std::endl;
198 std::cout<<
"VolumeTreeModel::addSubSystem Error: Unknown system flag! Please update the code!"<<std::endl;
220 section->name =
"Unknown Section Flag";
234 subsys->
name =
"Unknown subsystem flag";
240 section->disabledSubSystems << subsys;
251 std::cout<<
"VolumeTreeModel::enableSubSystem Error: System never added!"<<std::endl;
271 std::cout<<
"VolumeTreeModel::enableSubSystem Error: Did not find section of subsystem!."<<std::endl;
275 section->enabledSubSystems << subsys;
276 section->disabledSubSystems.removeAll(subsys);
278 if (
section->enabledSubSystems.count()==1) {
317 std::cout<<
"VolumeTreeModel::disableSubSystem Error: Did not find section of subsystem!."<<std::endl;
322 section->disabledSubSystems << subsys;
323 section->enabledSubSystems.removeAll(subsys);
325 if (
section->enabledSubSystems.count()==0) {
347 out.push_back(std::pair<VolumeHandle::VolumeHandleListItr,VolumeHandle::VolumeHandleListItr>
348 (
it->second->volhandlelist.begin(),
it->second->volhandlelist.end()));
357 return QModelIndex();
361 Q_ASSERT(row<m_d->activeSections.count());
371 Q_ASSERT(childHandle);
372 return createIndex(
row,
column, childHandle);
390 if (!
index.isValid())
391 return QModelIndex();
399 return createIndex(parentHandle->
childNumber(), 0, parentHandle);
418 return QModelIndex();
448 if ((role!=Qt::DisplayRole&&role!=Qt::ForegroundRole)||!
index.isValid())
453 if (role==Qt::ForegroundRole) {
457 return QColor::fromRgbF( 0.5, 0.5, 0.5 );
463 return volumeHandle->
getName();
466 if (role==Qt::ForegroundRole)
480 if (!
index.isValid())
481 return Qt::ItemFlags();
484 return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
486 return Qt::ItemIsEnabled;