ATLAS Offline Software
Loading...
Searching...
No Matches
IVP13DStandardChannelWidget.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6// //
7// Header file for class IVP13DStandardChannelWidget //
8// //
9// Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10// //
11// Initial version: April 2007 //
12// //
14
15#ifndef IVP13DSTANDARDCHANNELWIDGET_H
16#define IVP13DSTANDARDCHANNELWIDGET_H
17
19#include <QStringList>
20#include <functional>
21class IVP13DSystem;
23class QResizeEvent;
24class QPaintEvent;
25
27
28 Q_OBJECT
29
30public:
31 IVP13DStandardChannelWidget(const QString & name, const QString & information, const QString & contact_info, bool detectorViewButtons = true);
32 //Fixme: Pass along default backgroundcolor as an option?
33
34protected:
36 AllowAll = 0x0000,
37 DisallowExtraDisplayWidget = 0x0002,//Any extra display widget provided by this wont be present in the GUI
38 DisallowSwitchable=0x0004,//User can not turn 3d objects from this system on/off.
39 DisallowController = 0x0008,//Any custom controller provided by this wont be present in the GUI
40 StartDisabled = 0x0010,
42 };
43public: //public instead of protected due to compilation problems on SLC3
44 Q_DECLARE_FLAGS(SystemOptions, SystemOption)
45protected:
46
47 // Add a system during init() or from a ready channel's controller.
48 void addSystem(IVP13DSystem*, const SystemOptions& options = AllowAll );
49 // Group General-tab checkboxes by their system names.
50 void addSystemGroup(const QString& title, const QStringList& systemNames);
51 // Register an optional General-tab action during init().
52 void addExtraSystemFactory(const QString& prefix, const QString& groupTitle, const QString& buttonText,
53 std::function<IVP13DSystemSimple*(const QString&)> factory);
54
56
57 //Convenience so users dont need to cast themselves (needed due to private inheritance in IVP13DSystemSimple):
58 void addSystem(IVP13DSystemSimple*, const SystemOptions& options = AllowAll );
59
60public:
61 void create();
63 virtual QPixmap getSnapshot(bool transp = false, int width = 0, bool batch = false);
64 //If overriding the following, remember to call this implementation:
65 virtual void lastOfActiveSystemsRefreshed();
66 virtual void systemRefreshed(IVP1System*);
67 virtual void systemErased(IVP1System*);
68 virtual QByteArray saveState();
69 virtual void restoreFromState(QByteArray);
70 void launchStereoEditor();
71 bool isAntiAliasing();
72 bool setAntiAliasing(bool);
73
74private:
77 class Imp;
79
80private Q_SLOTS:
81 void toggleSystemActive();
82 void updateSnapshotDim();
84
85protected Q_SLOTS:
87protected:
88 void dockResized();
89 void stopSpinning();
90
91};
92
93Q_DECLARE_OPERATORS_FOR_FLAGS(IVP13DStandardChannelWidget::SystemOptions)
94
95#endif
const double width
IVP13DChannelWidget(const QString &name, const QString &information, const QString &contact_info)
IVP13DStandardChannelWidget(const QString &name, const QString &information, const QString &contact_info, bool detectorViewButtons=true)
IVP13DStandardChannelWidget(const IVP13DStandardChannelWidget &)
virtual QPixmap getSnapshot(bool transp=false, int width=0, bool batch=false)
void addSystem(IVP13DSystem *, const SystemOptions &options=AllowAll)
void addExtraSystemFactory(const QString &prefix, const QString &groupTitle, const QString &buttonText, std::function< IVP13DSystemSimple *(const QString &)> factory)
void addSystemGroup(const QString &title, const QStringList &systemNames)
virtual void systemRefreshed(IVP1System *)
IVP13DStandardChannelWidget & operator=(const IVP13DStandardChannelWidget &)
const QString & information() const
const QString & name() const
const QString & contact_info() const