ATLAS Offline Software
IVP12DDetViewsChannelWidget.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 IVP12DDetViewsChannelWidget //
8 // //
9 // Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10 // //
11 // Initial version: July 2007 //
12 // //
14 
15 #ifndef IVP12DDETVIEWSCHANNELWIDGET_H
16 #define IVP12DDETVIEWSCHANNELWIDGET_H
17 
19 
20 
21 //This type of channel widget displays itemcollections in two
22 //different graphicsviews - one for each of XY and RZ
23 //projections.
24 //
25 //The normal way to add data from systems into these views is to add a
26 //number of IVP12DDetViewsSystem's to the channel (using the addSystem
27 //method) methods. Since IVP12DDetViewsSystem's specifically provide
28 //item collections for each of the different projections, everything
29 //should be taken care of automatically. It is, however, possible to
30 //add collections from any IVP12DSystem to the views. To do this, one
31 //must use the addGeneralSystem method and specify as a parameter in
32 //which of the two projections all of the item collections provided
33 //by this system should be presented.
34 
35 //fixme/TODO: Actually use the z-factor!!
36 
37 class IVP12DSystem;
39 
41 
42  Q_OBJECT
43 
44 public:
45  IVP12DDetViewsChannelWidget(const QString & name, const QString & information, const QString & contact_info);
46  //Fixme: Pass along default backgroundcolor as an option?
47 
48 protected:
49  enum SystemOption {
50  AllowAll = 0x0000,
51  DisallowSelections = 0x0100,//User can not interact with items from this system (movable though, is handled separately)
52  DisallowSwitchable = 0x0400,//User can not turn items from this system on/off.
53  DisallowController = 0x0800,//Custom controllers provided by this wont be present in the GUI
54  DisallowMovable = 0x1000,//Items from this systems are never movable
55  StartDisabled = 0x0010
56  };
57 public: //public instead of protected due to compilation problems on SLC3
58  Q_DECLARE_FLAGS(SystemOptions, SystemOption)
59 protected:
60  //Call the following in constructor of a derived class to add 2D systems. Never delete the systems in the derived class.
61 
62  //Zfactor determines which systems are on top of each other (higher values are in the foreground) //FIXME - NOT USED!!!
63 
64  void addSystem(IVP12DDetViewsSystem*, double zfactor, const SystemOptions& options = AllowAll );
65 
66  //Other types of systems can only be used by adding all of their collections into a single given projection view:
67  enum PROJECTION { XY, RZ };
68  void addGeneralSystem(IVP12DSystem*, const PROJECTION& projection, double zfactor, const SystemOptions& options = AllowAll );//FIXME: NOT IMPLEMENTED YET!!!!!!
69 
71 
72 public:
73  Type type() const { return TWODIMENSIONAL; };
74 
75  void create();
77  void systemErased(IVP1System*);
79  virtual QByteArray saveState();
80  virtual void restoreFromState(QByteArray);
81 
82 protected Q_SLOTS:
83  void showControlsForSystem();
84 
85 private:
86  class Imp;
87  Imp * m_d;
88 private Q_SLOTS:
89  void toggleSystemActive();
90  void setBackgroundColor(const QColor &);
91 };
92 
93 Q_DECLARE_OPERATORS_FOR_FLAGS(IVP12DDetViewsChannelWidget::SystemOptions)
94 
95 #endif
IVP12DDetViewsChannelWidget::DisallowMovable
@ DisallowMovable
Definition: IVP12DDetViewsChannelWidget.h:54
IVP12DDetViewsChannelWidget::addGeneralSystem
void addGeneralSystem(IVP12DSystem *, const PROJECTION &projection, double zfactor, const SystemOptions &options=AllowAll)
Definition: IVP12DDetViewsChannelWidget.cxx:252
IVP12DDetViewsChannelWidget::DisallowSelections
@ DisallowSelections
Definition: IVP12DDetViewsChannelWidget.h:51
IVP12DDetViewsChannelWidget::restoreFromState
virtual void restoreFromState(QByteArray)
Definition: IVP12DDetViewsChannelWidget.cxx:333
IVP12DDetViewsChannelWidget::StartDisabled
@ StartDisabled
Definition: IVP12DDetViewsChannelWidget.h:55
IVP12DDetViewsChannelWidget::AllowAll
@ AllowAll
Definition: IVP12DDetViewsChannelWidget.h:50
IVP12DDetViewsChannelWidget::create
void create()
Definition: IVP12DDetViewsChannelWidget.cxx:143
IVP1ChannelWidget::contact_info
const QString & contact_info() const
Definition: IVP1ChannelWidget.cxx:191
IVP1ChannelWidget::TWODIMENSIONAL
@ TWODIMENSIONAL
Definition: IVP1ChannelWidget.h:46
IVP12DDetViewsChannelWidget::RZ
@ RZ
Definition: IVP12DDetViewsChannelWidget.h:67
IVP12DDetViewsChannelWidget::m_d
Imp * m_d
Definition: IVP12DDetViewsChannelWidget.h:86
IVP12DDetViewsChannelWidget::PROJECTION
PROJECTION
Definition: IVP12DDetViewsChannelWidget.h:67
IVP12DDetViewsChannelWidget::Imp
Definition: IVP12DDetViewsChannelWidget.cxx:39
IVP12DSystem
Definition: IVP12DSystem.h:25
IVP12DDetViewsChannelWidget::DisallowSwitchable
@ DisallowSwitchable
Definition: IVP12DDetViewsChannelWidget.h:52
IVP1System
Definition: IVP1System.h:36
IVP12DDetViewsChannelWidget::IVP12DDetViewsChannelWidget
IVP12DDetViewsChannelWidget(const QString &name, const QString &information, const QString &contact_info)
Definition: IVP12DDetViewsChannelWidget.cxx:62
IVP12DDetViewsChannelWidget::SystemOption
SystemOption
Definition: IVP12DDetViewsChannelWidget.h:49
IVP12DDetViewsChannelWidget::toggleSystemActive
void toggleSystemActive()
Definition: IVP12DDetViewsChannelWidget.cxx:190
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
xAODType
Definition: ObjectType.h:13
IVP1ChannelWidget
Definition: IVP1ChannelWidget.h:34
IVP12DDetViewsChannelWidget::saveState
virtual QByteArray saveState()
Definition: IVP12DDetViewsChannelWidget.cxx:290
IVP12DDetViewsSystem
Definition: IVP12DDetViewsSystem.h:24
IVP12DDetViewsChannelWidget::systemErased
void systemErased(IVP1System *)
Definition: IVP12DDetViewsChannelWidget.cxx:184
IVP12DDetViewsChannelWidget::setBackgroundColor
void setBackgroundColor(const QColor &)
Definition: IVP12DDetViewsChannelWidget.cxx:258
IVP12DDetViewsChannelWidget::DisallowController
@ DisallowController
Definition: IVP12DDetViewsChannelWidget.h:53
IVP12DDetViewsChannelWidget::type
Type type() const
Definition: IVP12DDetViewsChannelWidget.h:73
IVP12DDetViewsChannelWidget::showControlsForSystem
void showControlsForSystem()
Definition: IVP12DDetViewsChannelWidget.cxx:267
IVP12DDetViewsChannelWidget::~IVP12DDetViewsChannelWidget
virtual ~IVP12DDetViewsChannelWidget()
Definition: IVP12DDetViewsChannelWidget.cxx:92
IVP12DDetViewsChannelWidget::systemRefreshed
void systemRefreshed(IVP1System *)
Definition: IVP12DDetViewsChannelWidget.cxx:171
IVP1ChannelWidget::name
const QString & name() const
Definition: IVP1ChannelWidget.cxx:180
IVP12DDetViewsChannelWidget::addSystem
void addSystem(IVP12DDetViewsSystem *, double zfactor, const SystemOptions &options=AllowAll)
Definition: IVP12DDetViewsChannelWidget.cxx:98
IVP12DDetViewsChannelWidget
Definition: IVP12DDetViewsChannelWidget.h:40
IVP12DDetViewsChannelWidget::XY
@ XY
Definition: IVP12DDetViewsChannelWidget.h:67
IVP1ChannelWidget::information
const QString & information() const
Definition: IVP1ChannelWidget.cxx:185
IVP1ChannelWidget.h