ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
graphics
VP1
VP1Base
src
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
15
#include "
VP1Base/IVP12DSystemSimple.h
"
16
#include "
VP1Base/VP1GraphicsItemCollection.h
"
17
#include <cassert>
18
19
void
IVP12DSystemSimple::systemcreate
(
StoreGateSvc
*) {}
20
QWidget *
IVP12DSystemSimple::buildController
() {
return
0; }
21
void
IVP12DSystemSimple::buildPermanentItemCollection
(
StoreGateSvc
*,
VP1GraphicsItemCollection
*){}
22
void
IVP12DSystemSimple::buildEventItemCollection
(
StoreGateSvc
*,
VP1GraphicsItemCollection
*) {}
23
void
IVP12DSystemSimple::systemuncreate
() {}
24
void
IVP12DSystemSimple::systemerase
() {}
25
26
//____________________________________________________________________
27
class
IVP12DSystemSimple::Imp
{
28
public
:
29
VP1GraphicsItemCollection
*
itemcollectionPermanent
;
30
VP1GraphicsItemCollection
*
itemcollectionEvent
;
31
bool
wasrefreshed
;
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
{
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
//____________________________________________________________________
50
IVP12DSystemSimple::~IVP12DSystemSimple
()
51
{
52
delete
m_d
;
m_d
=0;
53
}
54
55
//____________________________________________________________________
56
void
IVP12DSystemSimple::create
(
StoreGateSvc
* detstore)
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
//____________________________________________________________________
75
void
IVP12DSystemSimple::refresh
(
StoreGateSvc
* sg)
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
//____________________________________________________________________
94
void
IVP12DSystemSimple::erase
()
95
{
96
assert(
m_d
->wascreated);
97
assert(
m_d
->wasrefreshed);
98
systemerase
();
99
m_d
->itemcollectionEvent->clear();
100
m_d
->wasrefreshed=
false
;
101
}
102
103
//____________________________________________________________________
104
void
IVP12DSystemSimple::uncreate
()
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();
114
systemuncreate
();
115
m_d
->itemcollectionPermanent->clear();
116
m_d
->wascreated=
false
;
117
}
IVP12DSystemSimple.h
VP1GraphicsItemCollection.h
IVP12DSystemSimple::Imp
Definition
IVP12DSystemSimple.cxx:27
IVP12DSystemSimple::Imp::itemcollectionEvent
VP1GraphicsItemCollection * itemcollectionEvent
Definition
IVP12DSystemSimple.cxx:30
IVP12DSystemSimple::Imp::wasrefreshed
bool wasrefreshed
Definition
IVP12DSystemSimple.cxx:31
IVP12DSystemSimple::Imp::wascreated
bool wascreated
Definition
IVP12DSystemSimple.cxx:32
IVP12DSystemSimple::Imp::itemcollectionPermanent
VP1GraphicsItemCollection * itemcollectionPermanent
Definition
IVP12DSystemSimple.cxx:29
IVP12DSystemSimple::buildPermanentItemCollection
virtual void buildPermanentItemCollection(StoreGateSvc *detstore, VP1GraphicsItemCollection *)
Definition
IVP12DSystemSimple.cxx:21
IVP12DSystemSimple::erase
void erase()
Definition
IVP12DSystemSimple.cxx:94
IVP12DSystemSimple::systemcreate
virtual void systemcreate(StoreGateSvc *detstore)
Definition
IVP12DSystemSimple.cxx:19
IVP12DSystemSimple::uncreate
void uncreate()
Definition
IVP12DSystemSimple.cxx:104
IVP12DSystemSimple::systemerase
virtual void systemerase()
Definition
IVP12DSystemSimple.cxx:24
IVP12DSystemSimple::buildController
virtual QWidget * buildController()
Definition
IVP12DSystemSimple.cxx:20
IVP12DSystemSimple::~IVP12DSystemSimple
virtual ~IVP12DSystemSimple()
Definition
IVP12DSystemSimple.cxx:50
IVP12DSystemSimple::updateGUI
void updateGUI()
Definition
IVP12DSystemSimple.h:70
IVP12DSystemSimple::systemuncreate
virtual void systemuncreate()
Definition
IVP12DSystemSimple.cxx:23
IVP12DSystemSimple::m_d
Imp * m_d
Definition
IVP12DSystemSimple.h:62
IVP12DSystemSimple::create
void create(StoreGateSvc *detstore)
Definition
IVP12DSystemSimple.cxx:56
IVP12DSystemSimple::IVP12DSystemSimple
IVP12DSystemSimple(const QString &name, const QString &information, const QString &contact_info)
Definition
IVP12DSystemSimple.cxx:36
IVP12DSystemSimple::buildEventItemCollection
virtual void buildEventItemCollection(StoreGateSvc *sg, VP1GraphicsItemCollection *)
Definition
IVP12DSystemSimple.cxx:22
IVP12DSystemSimple::refresh
void refresh(StoreGateSvc *storegate)
Definition
IVP12DSystemSimple.cxx:75
IVP12DSystem::IVP12DSystem
IVP12DSystem(const QString &name, const QString &information, const QString &contact_info)
Definition
IVP12DSystem.cxx:32
IVP12DSystem::registerItemCollection
void registerItemCollection(VP1GraphicsItemCollection *)
Definition
IVP12DSystem.cxx:44
IVP1System::messageDebug
void messageDebug(const QString &) const
Definition
IVP1System.cxx:347
IVP1System::name
const QString & name() const
Definition
IVP1System.cxx:50
IVP1System::registerController
void registerController(QWidget *)
Definition
IVP1System.cxx:224
IVP1System::information
const QString & information() const
Definition
IVP1System.cxx:56
IVP1System::contact_info
const QString & contact_info() const
Definition
IVP1System.cxx:62
StoreGateSvc
The Athena Transient Store API.
Definition
StoreGateSvc.h:120
VP1GraphicsItemCollection
Definition
VP1GraphicsItemCollection.h:53
Generated on
for ATLAS Offline Software by
1.17.0