ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
graphics
VP1
VP1Systems
VP1TrackSystems
VP1TrackSystems
AscObjSelectionManager.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
7
// //
8
// Header file for class AscObjSelectionManager //
9
// //
10
// Description: Manages selection of associated objects //
11
// //
12
// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
13
// Initial version: April 2008 //
14
// //
16
17
#ifndef ASCOBJSELECTIONMANAGER_H
18
#define ASCOBJSELECTIONMANAGER_H
19
20
//Fixme: Make this class usable by prd system also. Maybe make common
21
//handle base class which tells simple/detailed nodes?
22
23
#include "
VP1Base/VP1HelperClassBase.h
"
24
#include <QObject>
25
#include <QList>
26
27
class
AssociatedObjectHandleBase
;
28
class
IVP13DSystem
;
29
class
TrackSystemController
;
30
class
SoCooperativeSelection
;
31
class
SoSeparator;
32
class
SoNode;
33
class
SoPath;
34
35
//Lifetime of this object should be from system refresh to system erase.
36
37
class
AscObjSelectionManager
:
public
QObject,
public
VP1HelperClassBase
{
38
39
Q_OBJECT
40
41
public
:
42
//Will create selection nodes as appropriate under the event root.
43
AscObjSelectionManager
(SoSeparator*
eventRoot
,
IVP13DSystem
*,
TrackSystemController
*);
44
void
aboutTodelete
();
//Call this just before deletion (needed since signals should not be emitted from destructors).
45
virtual
~AscObjSelectionManager
();
46
//Associated objects must all be attached under this separator:
47
SoSeparator *
getAscObjAttachSep
()
const
;
48
50
//Fixme: add method for changing mode of operation (single, toggle, shift+click)
51
52
enum
MODE
{
SINGLE
,
TOGGLE
,
SHIFT
};
53
static
QString
toString
(
MODE
) ;
54
MODE
mode
()
const
;
55
void
setMode
(
MODE
);
56
57
void
pretendUserClicked
(
AssociatedObjectHandleBase
*);
58
59
void
ensureDeselected
(
const
QList<AssociatedObjectHandleBase*>&);
60
void
ensureSelected
(
const
QList<AssociatedObjectHandleBase*>&);
//Call with length==1 if in single mode.
61
void
deselectAll
();
62
63
const
QList<AssociatedObjectHandleBase*>&
currentSelection
()
const
;
64
65
SoSeparator*
eventRoot
();
66
67
signals:
68
void
currentSelectionChanged
(
const
QList<AssociatedObjectHandleBase*>&);
69
70
private
:
71
//For system:
72
friend
class
VP1TrackSystem
;
73
// void setEventData( SoCooperativeSelection * sel_click, SoCooperativeSelection * sel_highlight );
74
// void eraseEventData();
75
//The following returns true if the passed selection node belongs to
76
//this manager (if not, the system must handle the selection in
77
//another way).
78
bool
handleUserSelectedSingleNode
(
SoCooperativeSelection
*, SoNode* , SoPath*,
AssociatedObjectHandleBase
*&);
//SINGLE
79
void
userClickedOnBgd
();
80
81
// bool handleUserDeselectedSingleNode(SoCooperativeSelection*, SoNode* , SoPath*);//SINGLE
82
// bool handleUserChangedSelection(SoCooperativeSelection*, QSet<SoNode*>, QSet<SoPath*>);//TOGGLE/SHIFT
83
private
:
84
//For associated objects:
85
friend
class
AssociatedObjectHandleBase
;
86
void
registerAscObj
(SoSeparator*simple,SoSeparator *detailed,
AssociatedObjectHandleBase
*);
87
void
unregisterAscObj
(SoSeparator*simple,SoSeparator *detailed);
88
//Fixme: When a handle changes pickable state to unpickable it
89
//must be removed from selection list if selected!
90
private
Q_SLOTS:
91
// void ascObjDetailLevelAboutToChange();
92
void
ascObjDetailLevelChanged
();
93
private
:
94
class
Imp
;
95
Imp
*
m_d
;
96
};
97
98
#endif
MODE
#define MODE
Definition
CellClusterLinkTool.h:24
VP1HelperClassBase.h
AscObjSelectionManager::Imp
Definition
AscObjSelectionManager.cxx:28
AscObjSelectionManager::unregisterAscObj
void unregisterAscObj(SoSeparator *simple, SoSeparator *detailed)
Definition
AscObjSelectionManager.cxx:164
AscObjSelectionManager::eventRoot
SoSeparator * eventRoot()
Definition
AscObjSelectionManager.cxx:413
AscObjSelectionManager::VP1TrackSystem
friend class VP1TrackSystem
Definition
AscObjSelectionManager.h:72
AscObjSelectionManager::pretendUserClicked
void pretendUserClicked(AssociatedObjectHandleBase *)
Definition
AscObjSelectionManager.cxx:259
AscObjSelectionManager::ensureSelected
void ensureSelected(const QList< AssociatedObjectHandleBase * > &)
Definition
AscObjSelectionManager.cxx:350
AscObjSelectionManager::handleUserSelectedSingleNode
bool handleUserSelectedSingleNode(SoCooperativeSelection *, SoNode *, SoPath *, AssociatedObjectHandleBase *&)
Definition
AscObjSelectionManager.cxx:233
AscObjSelectionManager::MODE
MODE
Definition
AscObjSelectionManager.h:52
AscObjSelectionManager::TOGGLE
@ TOGGLE
Definition
AscObjSelectionManager.h:52
AscObjSelectionManager::SINGLE
@ SINGLE
Definition
AscObjSelectionManager.h:52
AscObjSelectionManager::SHIFT
@ SHIFT
Definition
AscObjSelectionManager.h:52
AscObjSelectionManager::currentSelectionChanged
void currentSelectionChanged(const QList< AssociatedObjectHandleBase * > &)
AscObjSelectionManager::AssociatedObjectHandleBase
friend class AssociatedObjectHandleBase
Definition
AscObjSelectionManager.h:85
AscObjSelectionManager::registerAscObj
void registerAscObj(SoSeparator *simple, SoSeparator *detailed, AssociatedObjectHandleBase *)
Definition
AscObjSelectionManager.cxx:140
AscObjSelectionManager::toString
static QString toString(MODE)
Definition
AscObjSelectionManager.cxx:110
AscObjSelectionManager::ascObjDetailLevelChanged
void ascObjDetailLevelChanged()
Definition
AscObjSelectionManager.cxx:381
AscObjSelectionManager::mode
MODE mode() const
Definition
AscObjSelectionManager.cxx:119
AscObjSelectionManager::getAscObjAttachSep
SoSeparator * getAscObjAttachSep() const
Definition
AscObjSelectionManager.cxx:135
AscObjSelectionManager::deselectAll
void deselectAll()
Definition
AscObjSelectionManager.cxx:326
AscObjSelectionManager::AscObjSelectionManager
AscObjSelectionManager(SoSeparator *eventRoot, IVP13DSystem *, TrackSystemController *)
Definition
AscObjSelectionManager.cxx:89
AscObjSelectionManager::currentSelection
const QList< AssociatedObjectHandleBase * > & currentSelection() const
Definition
AscObjSelectionManager.cxx:408
AscObjSelectionManager::userClickedOnBgd
void userClickedOnBgd()
Definition
AscObjSelectionManager.cxx:316
AscObjSelectionManager::ensureDeselected
void ensureDeselected(const QList< AssociatedObjectHandleBase * > &)
Definition
AscObjSelectionManager.cxx:336
AscObjSelectionManager::aboutTodelete
void aboutTodelete()
Definition
AscObjSelectionManager.cxx:97
AscObjSelectionManager::setMode
void setMode(MODE)
Definition
AscObjSelectionManager.cxx:125
AscObjSelectionManager::m_d
Imp * m_d
Definition
AscObjSelectionManager.h:95
AscObjSelectionManager::~AscObjSelectionManager
virtual ~AscObjSelectionManager()
Definition
AscObjSelectionManager.cxx:103
AssociatedObjectHandleBase
Definition
AssociatedObjectHandleBase.h:35
IVP13DSystem
Definition
IVP13DSystem.h:31
SoCooperativeSelection
Definition
SoCooperativeSelection.h:29
TrackSystemController
Definition
TrackSystemController.h:50
VP1HelperClassBase::VP1HelperClassBase
VP1HelperClassBase(IVP1System *sys=0, QString helpername="")
Definition
VP1HelperClassBase.cxx:28
Generated on
for ATLAS Offline Software by
1.17.0