ATLAS Offline Software
Loading...
Searching...
No Matches
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
14class VolumeTreeModel : public QAbstractItemModel {
15
16 Q_OBJECT
17
18public:
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();
45private:
46 class Imp;
48
49};
50
51#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
void section(const std::string &sec)
std::vector< VolumeHandle * > VolumeHandleList
int rowCount(const QModelIndex &) const
void enableSubSystem(VP1GeoFlags::SubSystemFlag flag)
int columnCount(const QModelIndex &idx) const
VolumeTreeModel(QObject *parent=0)
Qt::ItemFlags flags(const QModelIndex &index) const
void disableSubSystem(VP1GeoFlags::SubSystemFlag flag)
void fetchMore(const QModelIndex &parent)
void addSubSystem(VP1GeoFlags::SubSystemFlag flag, const VolumeHandle::VolumeHandleList &roothandles)
QVariant headerData(int section, Qt::Orientation orientation, int role) const
bool canFetchMore(const QModelIndex &parent) const
QModelIndex parent(const QModelIndex &) const
void getRootHandles(std::vector< std::pair< VolumeHandle::VolumeHandleListItr, VolumeHandle::VolumeHandleListItr > > &) const
bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Definition index.py:1