ATLAS Offline Software
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 
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:
25  const VolumeHandle::VolumeHandleList& roothandles );
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
index
Definition: index.py:1
VolumeTreeModel::fetchMore
void fetchMore(const QModelIndex &parent)
Definition: VolumeTreeModel.cxx:510
VP1Msg.h
VolumeTreeModel::parent
QModelIndex parent(const QModelIndex &) const
Definition: VolumeTreeModel.cxx:388
VolumeTreeModel::index
QModelIndex index(int, int, const QModelIndex &) const
Definition: VolumeTreeModel.cxx:353
VolumeTreeModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role) const
Definition: VolumeTreeModel.cxx:490
VolumeTreeModel::disableSubSystem
void disableSubSystem(VP1GeoFlags::SubSystemFlag flag)
Definition: VolumeTreeModel.cxx:292
VolumeTreeModel::Imp
Definition: VolumeTreeModel.cxx:32
VolumeTreeModel::getRootHandles
void getRootHandles(std::vector< std::pair< VolumeHandle::VolumeHandleListItr, VolumeHandle::VolumeHandleListItr > > &) const
Definition: VolumeTreeModel.cxx:341
VolumeTreeModel::canFetchMore
bool canFetchMore(const QModelIndex &parent) const
Definition: VolumeTreeModel.cxx:496
VolumeTreeModel::columnCount
int columnCount(const QModelIndex &idx) const
Definition: VolumeTreeModel.h:35
VolumeTreeModel::enableSubSystem
void enableSubSystem(VP1GeoFlags::SubSystemFlag flag)
Definition: VolumeTreeModel.cxx:245
master.flag
bool flag
Definition: master.py:29
VolumeTreeModel::addSubSystem
void addSubSystem(VP1GeoFlags::SubSystemFlag flag, const VolumeHandle::VolumeHandleList &roothandles)
Definition: VolumeTreeModel.cxx:172
VP1GeoFlags.h
VolumeTreeModel
Definition: VolumeTreeModel.h:14
VolumeHandle::VolumeHandleList
std::vector< VolumeHandle * > VolumeHandleList
Definition: VolumeHandle.h:64
VolumeTreeModel::flags
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: VolumeTreeModel.cxx:478
VolumeTreeModel::cleanup
void cleanup()
Definition: VolumeTreeModel.cxx:153
VolumeTreeModel::data
QVariant data(const QModelIndex &, int) const
Definition: VolumeTreeModel.cxx:446
VolumeTreeModel::rowCount
int rowCount(const QModelIndex &) const
Definition: VolumeTreeModel.cxx:422
VolumeTreeModel::VolumeTreeModel
VolumeTreeModel(QObject *parent=0)
Definition: VolumeTreeModel.cxx:103
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
VolumeTreeModel::hasChildren
bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Definition: VolumeTreeModel.cxx:527
VP1GeoFlags::SubSystemFlag
SubSystemFlag
Definition: VP1GeoFlags.h:30
section
void section(const std::string &sec)
Definition: TestTriggerMenuAccess.cxx:22
VolumeHandle.h
VolumeTreeModel::~VolumeTreeModel
virtual ~VolumeTreeModel()
Definition: VolumeTreeModel.cxx:166
VolumeTreeModel::m_d
Imp * m_d
Definition: VolumeTreeModel.h:46