ATLAS Offline Software
IVP13DSystem.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // //
7 // Header file for class IVP13DSystem //
8 // //
9 // Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10 // //
11 // Initial version: April 2007 //
12 // //
14 
15 #ifndef IVP13DSYSTEM_H
16 #define IVP13DSYSTEM_H
17 
18 #include "VP1Base/IVP1System.h"
19 #include <vector>//fixme
20 #include <set>
21 #include <QSet>
22 
23 class SoPath;
24 class SoNode;
25 class SoSeparator;
26 class SoCamera;
28 class SoQtViewer;
29 typedef void SoSelectionPathCB(void * data, SoPath * path);
30 
31 class IVP13DSystem: public IVP1System {
32 
33  Q_OBJECT
34 
35 public:
36 
37  virtual ~IVP13DSystem();
38 
40  // All of the following methods are intended to be used by channels: //
42 
43  IVP13DSystem(const QString & name, const QString & information, const QString & contact_info);
44 
45  // Access to the Scene Graph
46  virtual SoSeparator *getSceneGraph() const=0;
47 
48  //If the system is to have access to cameras the channel should
49  //register them here:
50  void registerCamera(SoCamera *camera);//For registering cameras with a lifetime of the system
51 
52  //--> But if the camera is from a SoQtViewer, register the viewer
53  //instead of the camera (since camera associated with viewer might
54  //change when user toggles view mode):
55  void registerViewer(SoQtViewer *viewer);//Will take current camera from viewer
56 
58  // These two methods are intended to be used in derived classes: //
60 
61 
62  //Register SoCooperativeSelection nodes to get automatic calls to
63  //userSelectedSingleNode, userDeselectedSingleNode and
64  //userChangedSelection, to get timely redraws, and to get the
65  //deselectAll() method to work for this selection also:
68  //NB: These two methods calls ref() and unref() the passed selection node.
69 
70  //(Temporarily) disable/enable the invocation of
71  //userSelectedSingleNode/userDeselectedSingleNode/userChangedSelectionuserSelectedcalls:
72  void setUserSelectionNotificationsEnabled(SoCooperativeSelection*sel,bool enabled);//sel must already be registered
73 
74  //For SoCooperativeSelection with policy SINGLE:
75  virtual void userSelectedSingleNode(SoCooperativeSelection*, SoNode* , SoPath*);
76  virtual void userDeselectedSingleNode(SoCooperativeSelection*, SoNode* , SoPath*);
77  //For SoCooperativeSelection with policy TOGGLE or SHIFT:
78  virtual void userChangedSelection(SoCooperativeSelection*, QSet<SoNode*>, QSet<SoPath*>);
79  //Tip: If you need to know which paths/nodes were just removed/added
80  //then simply cache the last selection set somewhere and use
81  //QSet::subtract() to find the difference.
82 
83  virtual void userClickedOnBgd();
84 
85  virtual void deselectAll(SoCooperativeSelection* exception_sel = 0);//Invoke deselectAll() on all registered selection
86  //nodes for the system (except on exception_sel).
87  //NB: This WILL invoke user selection methods above.
88 
89  //Get the cameras viewing this scene (e.g. for zooming):
90  typedef std::set<SoCamera*> CamList;
93  //NB1: Might return empty set (usually if channel disallows camera
94  // access to this system)
95  //NB2: Do not cache the result of this call - the correct set of
96  // cameras changes over time change later:
97 
98  //Override the following if you would like the channel to embed an
99  //additional QWidget somewhere. This could for instance be a place
100  //where you show data relevant to 3D objects from you system that
101  //the user selected, etc. (Of course, the controller should be used
102  //for *controls*. This widget is for displaying additional
103  //information. buildExtraDisplayWidget() will be called once after
104  //create():
105 
106  virtual QWidget * buildExtraDisplayWidget() { return 0; }
107 
108 signals:
109  void itemFromSystemSelected();//Should be emitted whenever item in this system is selected (mainly to give channel chance to show the system controller)
110 
111 private Q_SLOTS:
112  void activateClickedOutside();
113 private:
116  class Imp;
117  Imp * m_d;
118 
119 };
120 
121 #endif
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
IVP13DSystem::userChangedSelection
virtual void userChangedSelection(SoCooperativeSelection *, QSet< SoNode * >, QSet< SoPath * >)
Definition: IVP13DSystem.cxx:61
IVP13DSystem::setUserSelectionNotificationsEnabled
void setUserSelectionNotificationsEnabled(SoCooperativeSelection *sel, bool enabled)
Definition: IVP13DSystem.cxx:310
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
IVP13DSystem::activateClickedOutside
void activateClickedOutside()
Definition: IVP13DSystem.cxx:85
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:126
IVP1System::information
const QString & information() const
Definition: IVP1System.cxx:56
IVP13DSystem::Imp
Definition: IVP13DSystem.cxx:31
IVP13DSystem::userDeselectedSingleNode
virtual void userDeselectedSingleNode(SoCooperativeSelection *, SoNode *, SoPath *)
Definition: IVP13DSystem.cxx:60
IVP13DSystem::IVP13DSystem
IVP13DSystem(const QString &name, const QString &information, const QString &contact_info)
Definition: IVP13DSystem.cxx:356
IVP13DSystem::getSceneGraph
virtual SoSeparator * getSceneGraph() const =0
IVP13DSystem::itemFromSystemSelected
void itemFromSystemSelected()
IVP13DSystem::registerSelectionNode
void registerSelectionNode(SoCooperativeSelection *)
Definition: IVP13DSystem.cxx:257
IVP1System
Definition: IVP1System.h:36
IVP13DSystem::IVP13DSystem
IVP13DSystem(const IVP13DSystem &)
IVP13DSystem::CamList
std::set< SoCamera * > CamList
Definition: IVP13DSystem.h:90
sel
sel
Definition: SUSYToolsTester.cxx:92
IVP13DSystem::CamListItr
CamList::iterator CamListItr
Definition: IVP13DSystem.h:91
IVP1System::name
const QString & name() const
Definition: IVP1System.cxx:50
SoSelectionPathCB
void SoSelectionPathCB(void *data, SoPath *path)
Definition: IVP13DSystem.h:29
IVP1System::contact_info
const QString & contact_info() const
Definition: IVP1System.cxx:62
python.L1.Config.LegacyTopoMergerMap.signals
signals
Definition: LegacyTopoMergerMap.py:13
IVP13DSystem::buildExtraDisplayWidget
virtual QWidget * buildExtraDisplayWidget()
Definition: IVP13DSystem.h:106
IVP13DSystem::registerViewer
void registerViewer(SoQtViewer *viewer)
Definition: IVP13DSystem.cxx:418
IVP13DSystem::getCameraList
CamList getCameraList()
Definition: IVP13DSystem.cxx:395
IVP13DSystem::unregisterSelectionNode
void unregisterSelectionNode(SoCooperativeSelection *)
Definition: IVP13DSystem.cxx:281
IVP13DSystem
Definition: IVP13DSystem.h:31
IVP13DSystem::userSelectedSingleNode
virtual void userSelectedSingleNode(SoCooperativeSelection *, SoNode *, SoPath *)
Definition: IVP13DSystem.cxx:59
IVP13DSystem::userClickedOnBgd
virtual void userClickedOnBgd()
Definition: IVP13DSystem.cxx:62
IVP13DSystem::~IVP13DSystem
virtual ~IVP13DSystem()
Definition: IVP13DSystem.cxx:364
IVP13DSystem::m_d
Imp * m_d
Definition: IVP13DSystem.h:116
IVP13DSystem::operator=
IVP13DSystem & operator=(const IVP13DSystem &)
IVP1System.h
IVP13DSystem::deselectAll
virtual void deselectAll(SoCooperativeSelection *exception_sel=0)
Definition: IVP13DSystem.cxx:331
SoCooperativeSelection
Definition: SoCooperativeSelection.h:29
IVP13DSystem::registerCamera
void registerCamera(SoCamera *camera)
Definition: IVP13DSystem.cxx:410