ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
graphics
VP1
VP1Systems
VP1GeometrySystems
VP1GeometrySystems
VolumeTreeModel.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef VOLUMETREEMODEL_H
6
#define VOLUMETREEMODEL_H
7
8
#include <QAbstractItemModel>
9
10
#include "
VP1GeometrySystems/VolumeHandle.h
"
11
#include "
VP1GeometrySystems/VP1GeoFlags.h
"
12
#include "
VP1Base/VP1Msg.h
"
13
14
class
VolumeTreeModel
:
public
QAbstractItemModel {
15
16
Q_OBJECT
17
18
public
:
19
20
VolumeTreeModel
( QObject *
parent
= 0 );
21
virtual
~VolumeTreeModel
();
22
23
//These are the methods used by the geometry system:
24
void
addSubSystem
(
VP1GeoFlags::SubSystemFlag
flag,
25
const
VolumeHandle::VolumeHandleList
& roothandles );
26
void
enableSubSystem
(
VP1GeoFlags::SubSystemFlag
flag);
27
void
disableSubSystem
(
VP1GeoFlags::SubSystemFlag
flag);
28
29
void
getRootHandles
(std::vector<std::pair<VolumeHandle::VolumeHandleListItr,VolumeHandle::VolumeHandleListItr> >&)
const
;
30
31
//The following are for use by the view:
32
QModelIndex
index
(
int
,
int
,
const
QModelIndex&)
const
;
33
QModelIndex
parent
(
const
QModelIndex&)
const
;
34
int
rowCount
(
const
QModelIndex&)
const
;
35
int
columnCount
(
const
QModelIndex& idx)
const
{
return
rowCount
(idx) > 0 ? 1 : 0; }
36
QVariant
data
(
const
QModelIndex&,
int
)
const
;
37
Qt::ItemFlags
flags
(
const
QModelIndex &
index
)
const
;
38
QVariant
headerData
(
int
section
, Qt::Orientation orientation,
int
role)
const
;
39
bool
hasChildren
(
const
QModelIndex &
parent
= QModelIndex() )
const
;
40
bool
canFetchMore
(
const
QModelIndex &
parent
)
const
;
41
void
fetchMore
(
const
QModelIndex &
parent
);
42
43
//To be called from system uncreate:
44
void
cleanup
();
45
private
:
46
class
Imp;
47
Imp
*
m_d
;
48
49
};
50
51
#endif
section
void section(const std::string &sec)
Definition
TestTriggerMenuAccess.cxx:22
VP1GeoFlags.h
VP1Msg.h
VolumeHandle.h
VP1GeoFlags::SubSystemFlag
SubSystemFlag
Definition
VP1GeoFlags.h:30
VolumeHandle::VolumeHandleList
std::vector< VolumeHandle * > VolumeHandleList
Definition
VolumeHandle.h:64
VolumeTreeModel::Imp
Definition
VolumeTreeModel.cxx:32
VolumeTreeModel::data
QVariant data(const QModelIndex &, int) const
Definition
VolumeTreeModel.cxx:448
VolumeTreeModel::rowCount
int rowCount(const QModelIndex &) const
Definition
VolumeTreeModel.cxx:424
VolumeTreeModel::m_d
Imp * m_d
Definition
VolumeTreeModel.h:47
VolumeTreeModel::enableSubSystem
void enableSubSystem(VP1GeoFlags::SubSystemFlag flag)
Definition
VolumeTreeModel.cxx:247
VolumeTreeModel::columnCount
int columnCount(const QModelIndex &idx) const
Definition
VolumeTreeModel.h:35
VolumeTreeModel::VolumeTreeModel
VolumeTreeModel(QObject *parent=0)
Definition
VolumeTreeModel.cxx:103
VolumeTreeModel::flags
Qt::ItemFlags flags(const QModelIndex &index) const
Definition
VolumeTreeModel.cxx:480
VolumeTreeModel::~VolumeTreeModel
virtual ~VolumeTreeModel()
Definition
VolumeTreeModel.cxx:168
VolumeTreeModel::disableSubSystem
void disableSubSystem(VP1GeoFlags::SubSystemFlag flag)
Definition
VolumeTreeModel.cxx:294
VolumeTreeModel::fetchMore
void fetchMore(const QModelIndex &parent)
Definition
VolumeTreeModel.cxx:512
VolumeTreeModel::addSubSystem
void addSubSystem(VP1GeoFlags::SubSystemFlag flag, const VolumeHandle::VolumeHandleList &roothandles)
Definition
VolumeTreeModel.cxx:174
VolumeTreeModel::cleanup
void cleanup()
Definition
VolumeTreeModel.cxx:155
VolumeTreeModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role) const
Definition
VolumeTreeModel.cxx:492
VolumeTreeModel::canFetchMore
bool canFetchMore(const QModelIndex &parent) const
Definition
VolumeTreeModel.cxx:498
VolumeTreeModel::parent
QModelIndex parent(const QModelIndex &) const
Definition
VolumeTreeModel.cxx:390
VolumeTreeModel::getRootHandles
void getRootHandles(std::vector< std::pair< VolumeHandle::VolumeHandleListItr, VolumeHandle::VolumeHandleListItr > > &) const
Definition
VolumeTreeModel.cxx:343
VolumeTreeModel::hasChildren
bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Definition
VolumeTreeModel.cxx:529
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0