#include <VolumeTreeModel.h>
Definition at line 14 of file VolumeTreeModel.h.
◆ VolumeTreeModel()
VolumeTreeModel::VolumeTreeModel |
( |
QObject * |
parent = 0 | ) |
|
◆ ~VolumeTreeModel()
VolumeTreeModel::~VolumeTreeModel |
( |
| ) |
|
|
virtual |
◆ addSubSystem()
Definition at line 172 of file VolumeTreeModel.cxx.
182 for(Imp::SubSystem* subsys : (
section->enabledSubSystems+
section->disabledSubSystems)) {
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;
209 if (sec->sectionflag==sectionflag) {
217 section =
new Imp::SectionInfo(sectionflag);
220 section->name =
"Unknown Section Flag";
230 Imp::SubSystem * subsys =
new Imp::SubSystem(
section,
flag);
234 subsys->name =
"Unknown subsystem flag";
237 subsys->volhandlelist = roothandles;
240 section->disabledSubSystems << subsys;
◆ canFetchMore()
bool VolumeTreeModel::canFetchMore |
( |
const QModelIndex & |
parent | ) |
const |
◆ cleanup()
void VolumeTreeModel::cleanup |
( |
| ) |
|
◆ columnCount()
int VolumeTreeModel::columnCount |
( |
const QModelIndex & |
idx | ) |
const |
|
inline |
◆ data()
QVariant VolumeTreeModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
Definition at line 446 of file VolumeTreeModel.cxx.
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)
◆ disableSubSystem()
Definition at line 292 of file VolumeTreeModel.cxx.
304 if (sec->disabledSubSystems.contains(subsys)) {
306 assert(!sec->enabledSubSystems.contains(subsys));
309 if (sec->enabledSubSystems.contains(subsys)) {
310 assert(!sec->disabledSubSystems.contains(subsys));
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) {
331 for (
VolumeHandle* volhandle : subsys->volhandlelist ) {
◆ enableSubSystem()
Definition at line 245 of file VolumeTreeModel.cxx.
251 std::cout<<
"VolumeTreeModel::enableSubSystem Error: System never added!"<<std::endl;
258 if (sec->enabledSubSystems.contains(subsys)) {
260 assert(!sec->disabledSubSystems.contains(subsys));
263 if (sec->disabledSubSystems.contains(subsys)) {
264 assert(!sec->enabledSubSystems.contains(subsys));
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) {
283 for (
VolumeHandle* volhandle : subsys->volhandlelist ) {
◆ fetchMore()
void VolumeTreeModel::fetchMore |
( |
const QModelIndex & |
parent | ) |
|
◆ flags()
Qt::ItemFlags VolumeTreeModel::flags |
( |
const QModelIndex & |
index | ) |
const |
Definition at line 478 of file VolumeTreeModel.cxx.
480 if (!
index.isValid())
481 return Qt::ItemFlags();
484 return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
486 return Qt::ItemIsEnabled;
◆ getRootHandles()
Definition at line 341 of file VolumeTreeModel.cxx.
347 out.push_back(std::pair<VolumeHandle::VolumeHandleListItr,VolumeHandle::VolumeHandleListItr>
348 (
it->second->volhandlelist.begin(),
it->second->volhandlelist.end()));
◆ hasChildren()
bool VolumeTreeModel::hasChildren |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
◆ headerData()
QVariant VolumeTreeModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role |
|
) |
| const |
◆ index()
QModelIndex VolumeTreeModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent |
|
) |
| const |
Definition at line 353 of file VolumeTreeModel.cxx.
357 return QModelIndex();
361 Q_ASSERT(row<m_d->activeSections.count());
371 Q_ASSERT(childHandle);
372 return createIndex(
row,
column, childHandle);
◆ parent()
QModelIndex VolumeTreeModel::parent |
( |
const QModelIndex & |
index | ) |
const |
Definition at line 388 of file VolumeTreeModel.cxx.
390 if (!
index.isValid())
391 return QModelIndex();
399 return createIndex(parentHandle->
childNumber(), 0, parentHandle);
405 Q_ASSERT(subsys->section->enabledSubSystems.contains(subsys));
406 return createIndex(subsys->section->enabledSubSystems.indexOf(subsys), 0, subsys);
418 return QModelIndex();
◆ rowCount()
int VolumeTreeModel::rowCount |
( |
const QModelIndex & |
parent | ) |
const |
◆ m_d
Imp* VolumeTreeModel::m_d |
|
private |
The documentation for this class was generated from the following files: