ATLAS Offline Software
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 
20 QWidget * IVP12DSystemSimple::buildController() { return 0; }
25 
26 //____________________________________________________________________
28 public:
32  bool wascreated;
33 };
34 
35 //____________________________________________________________________
36 IVP12DSystemSimple::IVP12DSystemSimple(const QString & name, const QString & information, const QString & contact_info)
37  : IVP12DSystem(name,information,contact_info), m_d(new Imp)
38 {
41 
44 
45  m_d->wasrefreshed=false;
46  m_d->wascreated=false;
47 }
48 
49 //____________________________________________________________________
51 {
52  delete m_d; m_d=0;
53 }
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)
69  if (hasview)
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)
83  updateGUI();
85  updateGUI();
86  if (hasview)
88  updateGUI();
89 
90  m_d->wasrefreshed=true;
91 }
92 
93 //____________________________________________________________________
95 {
96  assert(m_d->wascreated);
97  assert(m_d->wasrefreshed);
98  systemerase();
100  m_d->wasrefreshed=false;
101 }
102 
103 //____________________________________________________________________
105 {
106  messageDebug("uncreate()...");
107 
108  assert(m_d->wascreated);
109  assert(!m_d->wasrefreshed);
114  systemuncreate();
116  m_d->wascreated=false;
117 }
VP1GraphicsItemCollection::isAttachedToView
bool isAttachedToView()
Definition: VP1GraphicsItemCollection.cxx:293
IVP12DSystemSimple::Imp::wasrefreshed
bool wasrefreshed
Definition: IVP12DSystemSimple.cxx:31
IVP12DSystemSimple::updateGUI
void updateGUI()
Definition: IVP12DSystemSimple.h:70
IVP12DSystemSimple::m_d
Imp * m_d
Definition: IVP12DSystemSimple.h:61
IVP12DSystemSimple::buildPermanentItemCollection
virtual void buildPermanentItemCollection(StoreGateSvc *detstore, VP1GraphicsItemCollection *)
Definition: IVP12DSystemSimple.cxx:21
IVP12DSystem::registerItemCollection
void registerItemCollection(VP1GraphicsItemCollection *)
Definition: IVP12DSystem.cxx:44
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
VP1GraphicsItemCollection.h
IVP12DSystemSimple::systemcreate
virtual void systemcreate(StoreGateSvc *detstore)
Definition: IVP12DSystemSimple.cxx:19
IVP12DSystemSimple.h
IVP12DSystemSimple::Imp::wascreated
bool wascreated
Definition: IVP12DSystemSimple.cxx:32
IVP12DSystem
Definition: IVP12DSystem.h:25
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
IVP12DSystemSimple::systemerase
virtual void systemerase()
Definition: IVP12DSystemSimple.cxx:24
IVP12DSystemSimple::erase
void erase()
Definition: IVP12DSystemSimple.cxx:94
IVP12DSystemSimple::Imp::itemcollectionPermanent
VP1GraphicsItemCollection * itemcollectionPermanent
Definition: IVP12DSystemSimple.cxx:29
VP1GraphicsItemCollection::detachFromView
void detachFromView()
Definition: VP1GraphicsItemCollection.cxx:257
IVP12DSystemSimple::systemuncreate
virtual void systemuncreate()
Definition: IVP12DSystemSimple.cxx:23
IVP12DSystemSimple::IVP12DSystemSimple
IVP12DSystemSimple(const QString &name, const QString &information, const QString &contact_info)
Definition: IVP12DSystemSimple.cxx:36
VP1GraphicsItemCollection::clear
void clear(const bool &deleteitems=true)
Definition: VP1GraphicsItemCollection.cxx:175
VP1GraphicsItemCollection::reattachToView
void reattachToView()
Definition: VP1GraphicsItemCollection.cxx:282
IVP1System::messageDebug
void messageDebug(const QString &) const
Definition: IVP1System.cxx:347
IVP12DSystemSimple::Imp::itemcollectionEvent
VP1GraphicsItemCollection * itemcollectionEvent
Definition: IVP12DSystemSimple.cxx:30
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IVP1System::registerController
void registerController(QWidget *)
Definition: IVP1System.cxx:224
IVP12DSystemSimple::Imp
Definition: IVP12DSystemSimple.cxx:27
IVP12DSystemSimple::buildController
virtual QWidget * buildController()
Definition: IVP12DSystemSimple.cxx:20
IVP12DSystemSimple::create
void create(StoreGateSvc *detstore)
Definition: IVP12DSystemSimple.cxx:56
VP1GraphicsItemCollection
Definition: VP1GraphicsItemCollection.h:53
IVP12DSystemSimple::buildEventItemCollection
virtual void buildEventItemCollection(StoreGateSvc *sg, VP1GraphicsItemCollection *)
Definition: IVP12DSystemSimple.cxx:22
IVP12DSystemSimple::uncreate
void uncreate()
Definition: IVP12DSystemSimple.cxx:104
IVP12DSystemSimple::~IVP12DSystemSimple
virtual ~IVP12DSystemSimple()
Definition: IVP12DSystemSimple.cxx:50
IVP12DSystemSimple::refresh
void refresh(StoreGateSvc *storegate)
Definition: IVP12DSystemSimple.cxx:75