ATLAS Offline Software
Loading...
Searching...
No Matches
IVP13DSystem.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
23class SoPath;
24class SoNode;
25class SoSeparator;
26class SoCamera;
28class SoQtViewer;
29typedef void SoSelectionPathCB(void * data, SoPath * path);
30
31class IVP13DSystem: public IVP1System {
32
33 Q_OBJECT
34
35public:
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*, const 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;
91 typedef CamList::iterator CamListItr;
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
108signals:
109 void itemFromSystemSelected();//Should be emitted whenever item in this system is selected (mainly to give channel chance to show the system controller)
110
111private Q_SLOTS:
113private:
116 class Imp;
118
119};
120
121#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
void SoSelectionPathCB(void *data, SoPath *path)
std::set< SoCamera * > CamList
virtual SoSeparator * getSceneGraph() const =0
void activateClickedOutside()
void itemFromSystemSelected()
virtual void userClickedOnBgd()
virtual void userChangedSelection(SoCooperativeSelection *, const QSet< SoNode * > &, QSet< SoPath * >)
void unregisterSelectionNode(SoCooperativeSelection *)
void registerCamera(SoCamera *camera)
IVP13DSystem & operator=(const IVP13DSystem &)
virtual void deselectAll(SoCooperativeSelection *exception_sel=0)
IVP13DSystem(const QString &name, const QString &information, const QString &contact_info)
virtual void userDeselectedSingleNode(SoCooperativeSelection *, SoNode *, SoPath *)
virtual QWidget * buildExtraDisplayWidget()
virtual void userSelectedSingleNode(SoCooperativeSelection *, SoNode *, SoPath *)
void setUserSelectionNotificationsEnabled(SoCooperativeSelection *sel, bool enabled)
void registerSelectionNode(SoCooperativeSelection *)
virtual ~IVP13DSystem()
CamList getCameraList()
CamList::iterator CamListItr
IVP13DSystem(const IVP13DSystem &)
void registerViewer(SoQtViewer *viewer)
const QString & name() const
IVP1System(const QString &name, const QString &information, const QString &contact_info)
const QString & information() const
const QString & contact_info() const