ATLAS Offline Software
Loading...
Searching...
No Matches
IVP12DSystemSimple.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6// //
7// Implementation of class IVP12DSystemSimple //
8// //
9// Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10// //
11// Initial version: April 2007 //
12// //
14
17#include <cassert>
18
20QWidget * IVP12DSystemSimple::buildController() { return 0; }
25
26//____________________________________________________________________
34
35//____________________________________________________________________
36IVP12DSystemSimple::IVP12DSystemSimple(const QString & name, const QString & information, const QString & contact_info)
38{
39 m_d->itemcollectionPermanent = new VP1GraphicsItemCollection(this);
40 m_d->itemcollectionEvent = new VP1GraphicsItemCollection(this);
41
42 registerItemCollection(m_d->itemcollectionPermanent);
43 registerItemCollection(m_d->itemcollectionEvent);
44
45 m_d->wasrefreshed=false;
46 m_d->wascreated=false;
47}
48
49//____________________________________________________________________
54
55//____________________________________________________________________
57{
58 assert(!m_d->wascreated);
59 systemcreate(detstore);
60
61 QWidget * controller = buildController();
62 if (controller)
63 registerController(controller);
64
65 bool hasview = m_d->itemcollectionPermanent->isAttachedToView();
66 if (hasview)
67 m_d->itemcollectionPermanent->detachFromView();
68 buildPermanentItemCollection(detstore,m_d->itemcollectionPermanent);
69 if (hasview)
70 m_d->itemcollectionPermanent->reattachToView();
71 m_d->wascreated=true;
72}
73
74//____________________________________________________________________
76{
77 assert(m_d->wascreated);
78 assert(!m_d->wasrefreshed);
79
80 bool hasview = m_d->itemcollectionEvent->isAttachedToView();
81 if (hasview)
82 m_d->itemcollectionEvent->detachFromView();
83 updateGUI();
84 buildEventItemCollection(sg, m_d->itemcollectionEvent);
85 updateGUI();
86 if (hasview)
87 m_d->itemcollectionEvent->reattachToView();
88 updateGUI();
89
90 m_d->wasrefreshed=true;
91}
92
93//____________________________________________________________________
95{
96 assert(m_d->wascreated);
97 assert(m_d->wasrefreshed);
99 m_d->itemcollectionEvent->clear();
100 m_d->wasrefreshed=false;
101}
102
103//____________________________________________________________________
105{
106 messageDebug("uncreate()...");
107
108 assert(m_d->wascreated);
109 assert(!m_d->wasrefreshed);
110 if (m_d->itemcollectionEvent->isAttachedToView())
111 m_d->itemcollectionEvent->detachFromView();
112 if (m_d->itemcollectionPermanent->isAttachedToView())
113 m_d->itemcollectionPermanent->detachFromView();
115 m_d->itemcollectionPermanent->clear();
116 m_d->wascreated=false;
117}
VP1GraphicsItemCollection * itemcollectionEvent
VP1GraphicsItemCollection * itemcollectionPermanent
virtual void buildPermanentItemCollection(StoreGateSvc *detstore, VP1GraphicsItemCollection *)
virtual void systemcreate(StoreGateSvc *detstore)
virtual QWidget * buildController()
virtual void systemuncreate()
void create(StoreGateSvc *detstore)
IVP12DSystemSimple(const QString &name, const QString &information, const QString &contact_info)
virtual void buildEventItemCollection(StoreGateSvc *sg, VP1GraphicsItemCollection *)
void refresh(StoreGateSvc *storegate)
IVP12DSystem(const QString &name, const QString &information, const QString &contact_info)
void registerItemCollection(VP1GraphicsItemCollection *)
void messageDebug(const QString &) const
const QString & name() const
void registerController(QWidget *)
const QString & information() const
const QString & contact_info() const
The Athena Transient Store API.