ATLAS Offline Software
IVP12DSystem.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 IVP12DSystem //
8 // //
9 // Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10 // //
11 // Initial version: April 2007 //
12 // //
14 
15 #include "VP1Base/IVP12DSystem.h"
17 #include <cassert>
18 
19 //Default implementations that do not do anything:
21 void IVP12DSystem::itemGotEvent(VP1GraphicsItemCollection*,QGraphicsItem*,QEvent*) {}
23 
24 //____________________________________________________________________
26 public:
27  QSet<VP1GraphicsItemCollection*> collections;
28 };
29 
30 
31 //____________________________________________________________________
32 IVP12DSystem::IVP12DSystem(const QString & name, const QString & information, const QString & contact_info)
33  : IVP1System(name,information,contact_info), m_d(new Imp)
34 {
35 }
36 
37 //____________________________________________________________________
39 {
40  delete m_d; m_d=0;
41 }
42 
43 //____________________________________________________________________
45 {
46  assert(!m_d->collections.contains(ic)
47  &&"IVP12DSystem::registerItemCollection Error: Item collection registered twice");
48  m_d->collections<<ic;
49  connect(ic,SIGNAL(itemPicked(QGraphicsItem*)),this,SLOT(itemPickedPrivate(QGraphicsItem*)));
50  connect(ic,SIGNAL(itemGotEvent(QGraphicsItem*,QEvent*)),this,SLOT(itemGotEventPrivate(QGraphicsItem*,QEvent*)));
51  connect(ic,SIGNAL(selectionChanged(QList<QGraphicsItem*>)),this,SLOT(selectionChangedPrivate(QList<QGraphicsItem*>)));
52 }
53 
54 //____________________________________________________________________
55 QSet<VP1GraphicsItemCollection*> IVP12DSystem::getItemCollections()
56 {
57  return m_d->collections;
58 }
59 
60 //____________________________________________________________________
62 {
63  VP1GraphicsItemCollection * ic = static_cast<VP1GraphicsItemCollection*>(sender());
64  assert(ic&&ic->interactionMode()==VP1GraphicsItemCollection::SINGLEPICKS);
67 }
68 
69 //____________________________________________________________________
70 void IVP12DSystem::itemGotEventPrivate(QGraphicsItem*item,QEvent*event)
71 {
72  VP1GraphicsItemCollection * ic = static_cast<VP1GraphicsItemCollection*>(sender());
73  assert(ic&&ic->interactionMode()==VP1GraphicsItemCollection::EVENTS);
76 }
77 
78 //____________________________________________________________________
79 void IVP12DSystem::selectionChangedPrivate(QList<QGraphicsItem*> items)
80 {
81  VP1GraphicsItemCollection * ic = static_cast<VP1GraphicsItemCollection*>(sender());
82  assert(ic&&ic->interactionMode()==VP1GraphicsItemCollection::SELECTIONS);
85 }
IVP12DSystem::itemFromSystemSelected
void itemFromSystemSelected()
IVP12DSystem.h
IVP12DSystem::registerItemCollection
void registerItemCollection(VP1GraphicsItemCollection *)
Definition: IVP12DSystem.cxx:44
IVP12DSystem::~IVP12DSystem
virtual ~IVP12DSystem()
Definition: IVP12DSystem.cxx:38
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
VP1GraphicsItemCollection.h
IVP12DSystem::Imp
Definition: IVP12DSystem.cxx:25
IVP12DSystem::itemPicked
virtual void itemPicked(VP1GraphicsItemCollection *, QGraphicsItem *)
Definition: IVP12DSystem.cxx:20
IVP12DSystem::selectionChanged
virtual void selectionChanged(VP1GraphicsItemCollection *, QList< QGraphicsItem * >)
Definition: IVP12DSystem.cxx:22
VP1GraphicsItemCollection::EVENTS
@ EVENTS
Definition: VP1GraphicsItemCollection.h:62
IVP1System
Definition: IVP1System.h:36
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
IVP12DSystem::IVP12DSystem
IVP12DSystem(const QString &name, const QString &information, const QString &contact_info)
Definition: IVP12DSystem.cxx:32
IVP12DSystem::itemGotEvent
virtual void itemGotEvent(VP1GraphicsItemCollection *, QGraphicsItem *, QEvent *)
Definition: IVP12DSystem.cxx:21
grepfile.ic
int ic
Definition: grepfile.py:33
IVP12DSystem::selectionChangedPrivate
void selectionChangedPrivate(QList< QGraphicsItem * >)
Definition: IVP12DSystem.cxx:79
IVP12DSystem::m_d
Imp * m_d
Definition: IVP12DSystem.h:64
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
item
Definition: ItemListSvc.h:43
IVP12DSystem::Imp::collections
QSet< VP1GraphicsItemCollection * > collections
Definition: IVP12DSystem.cxx:27
IVP12DSystem::itemGotEventPrivate
void itemGotEventPrivate(QGraphicsItem *, QEvent *)
Definition: IVP12DSystem.cxx:70
IVP12DSystem::itemPickedPrivate
void itemPickedPrivate(QGraphicsItem *)
Definition: IVP12DSystem.cxx:61
VP1GraphicsItemCollection
Definition: VP1GraphicsItemCollection.h:53
IVP12DSystem::getItemCollections
QSet< VP1GraphicsItemCollection * > getItemCollections()
Definition: IVP12DSystem.cxx:55
VP1GraphicsItemCollection::SINGLEPICKS
@ SINGLEPICKS
Definition: VP1GraphicsItemCollection.h:62
VP1GraphicsItemCollection::SELECTIONS
@ SELECTIONS
Definition: VP1GraphicsItemCollection.h:62