ATLAS Offline Software
Loading...
Searching...
No Matches
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
37class IVP12DSystem;
39
41
42 Q_OBJECT
43
44public:
45 IVP12DDetViewsChannelWidget(const QString & name, const QString & information, const QString & contact_info);
46 //Fixme: Pass along default backgroundcolor as an option?
47
48protected:
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
56 };
57public: //public instead of protected due to compilation problems on SLC3
58 Q_DECLARE_FLAGS(SystemOptions, SystemOption)
59protected:
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
72public:
73 Type type() const { return TWODIMENSIONAL; };
74
75 void create();
79 virtual QByteArray saveState();
80 virtual void restoreFromState(QByteArray);
81
82protected Q_SLOTS:
84
85private:
86 class Imp;
88private Q_SLOTS:
89 void toggleSystemActive();
90 void setBackgroundColor(const QColor &);
91};
92
93Q_DECLARE_OPERATORS_FOR_FLAGS(IVP12DDetViewsChannelWidget::SystemOptions)
94
95#endif
void addSystem(IVP12DDetViewsSystem *, double zfactor, const SystemOptions &options=AllowAll)
IVP12DDetViewsChannelWidget(const QString &name, const QString &information, const QString &contact_info)
void addGeneralSystem(IVP12DSystem *, const PROJECTION &projection, double zfactor, const SystemOptions &options=AllowAll)
const QString & information() const
const QString & name() const
IVP1ChannelWidget(const QString &name, const QString &information, const QString &contact_info)
const QString & contact_info() const