ATLAS Offline Software
VP1TabManager.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 VP1TabManager //
8 // //
9 // Author: Thomas Kittelmann <Thomas.Kittelmann@cern.ch> //
10 // //
11 // Initial version: April 2007 //
12 // //
14 
15 #ifndef VP1TABMANAGER_H
16 #define VP1TABMANAGER_H
17 
18 #include <QObject>
19 #include <QStringList>
20 #include <QMultiMap>
21 #include <QPair>
22 class VP1TabWidget;
23 class VP1ChannelManager;
24 class VP1DockWidget;
25 class IVP1ChannelWidget;
26 class QPoint;
27 
28 //NB: The tab manager is allowed to pop up boxes with warnings, information, etc.
29 
30 class VP1TabManager : public QObject {
31 
32  Q_OBJECT
33 
34 public:
35 
38 
39  bool hasTab(QString) const;
40  bool showTab(QString);
42  QString suggestNewTabName(QString oldtabname) const;
43  QString currentTab() const;
44  QString currentChannelUniqueName() const;
46  int nTabs() const;
47  void dropOutOfFullScreen();//Does nothing if not in FS mode.
48 
49  QList<IVP1ChannelWidget*> allChannels() const;//No particular order.
50  const QSet<IVP1ChannelWidget*>& visibleChannels() const;
51  const QSet<IVP1ChannelWidget*>& soonVisibleChannels() const;
52  bool isVisible(IVP1ChannelWidget*) const;
53  //bool isInNextTab();
54 
55  void setTabCruiseMode(const bool&);
56 
57  QStringList tabList();
59 
61 // void setAntiAliasingCurrentTab(bool);
62 
63  IVP1ChannelWidget * addChannelToTab( QString channelbasename, QString tabname );
64 public Q_SLOTS:
65  void addNewTab( QString, const int& index = -1 );
66  void renameTab( QString tabname, QString newtabname );
67  void removeTab( QString tabname );// -> Also removes channels obviously.
68  void removeChannel(QString channeluniquename);
69  void moveChannelToTab(QString channeluniquename,QString tabname);
70  void cloneChannelToTab(QString channeluniquename,QString tabname);
71  void cloneTab(QString oldtabname,QString newtabname);
72  void removeAllTabs();
73 
74 
75  void saveConfigurationToFile(QString filename,const bool& askonoverride=true);
76  void loadConfigurationFromFile(QString filename,const QMap<QString,QString>& availableplugins);
77 
80  void showTabFullScreen(QString tabname);
82 
83  void showNextTab();
84  void showPreviousTab();
85 
86  void raiseTabBarContextMenu(int,const QPoint &);
88  void setSelectedChannelWidget(IVP1ChannelWidget*cw=0);//selects the associated dock widget
89 
90  //The next two methods/slots are needed to allow channels to remove themselves:
91 public:
92  void removeChannelAfterQueueEmpties(const QString&);
93 signals:
94  void tabListChanged(QStringList);
95  void selectedChannelChanged(IVP1ChannelWidget*);//0 if all were unselected
96  void visibleChannelsChanged(const QSet<IVP1ChannelWidget*>&vis,const QSet<IVP1ChannelWidget*>&soonvis,const double& soonvisbonus);
97 
98 protected:
99  class Imp;
100  Imp * m_d;
101 
102  bool eventFilter ( QObject *, QEvent * );
103  typedef QPair<QByteArray,QMultiMap<QString,QByteArray> > ChanState;
106 
107 protected Q_SLOTS:
108  void currentVisibleChanged();
110 };
111 
112 #endif
VP1TabManager::removeAllTabs
void removeAllTabs()
Definition: VP1TabManager.cxx:590
VP1TabManager::showNextTab
void showNextTab()
Definition: VP1TabManager.cxx:1108
VP1TabManager::currentChannelUniqueName
QString currentChannelUniqueName() const
Definition: VP1TabManager.cxx:386
VP1TabManager::setSelectedChannelWidget
void setSelectedChannelWidget(IVP1ChannelWidget *cw=0)
Definition: VP1TabManager.cxx:347
VP1TabManager::isVisible
bool isVisible(IVP1ChannelWidget *) const
Definition: VP1TabManager.cxx:1479
VP1TabManager::selectedChannelChanged
void selectedChannelChanged(IVP1ChannelWidget *)
index
Definition: index.py:1
VP1TabManager::nTabs
int nTabs() const
Definition: VP1TabManager.cxx:1043
VP1TabManager::serializeChannelState
void serializeChannelState(IVP1ChannelWidget *, ChanState &state)
Definition: VP1TabManager.cxx:1525
VP1TabManager::launchStereoEditorCurrentTab
void launchStereoEditorCurrentTab()
Definition: VP1TabManager.cxx:135
VP1TabManager::eventFilter
bool eventFilter(QObject *, QEvent *)
Definition: VP1TabManager.cxx:303
VP1TabManager::currentVisibleChanged
void currentVisibleChanged()
Definition: VP1TabManager.cxx:1248
VP1TabManager::showCurrentChannelFullScreen
void showCurrentChannelFullScreen()
Definition: VP1TabManager.cxx:378
VP1TabManager::VP1TabManager
VP1TabManager(QObject *parent, VP1TabWidget *, VP1ChannelManager *)
Definition: VP1TabManager.cxx:112
VP1TabManager::showFirstChannelWithGivenBasename
bool showFirstChannelWithGivenBasename(QString basename)
Definition: VP1TabManager.cxx:1427
VP1TabManager::addChannelToTab
IVP1ChannelWidget * addChannelToTab(QString channelbasename, QString tabname)
Definition: VP1TabManager.cxx:470
VP1TabManager::tabListChanged
void tabListChanged(QStringList)
VP1TabManager::ChanState
QPair< QByteArray, QMultiMap< QString, QByteArray > > ChanState
Definition: VP1TabManager.h:103
VP1ChannelManager
Definition: VP1ChannelManager.h:27
VP1TabWidget
Definition: VP1TabWidget.h:45
VP1TabManager::suggestNewTabName
QString suggestNewTabName(QString oldtabname) const
Definition: VP1TabManager.cxx:1027
VP1TabManager::soonVisibleChannels
const QSet< IVP1ChannelWidget * > & soonVisibleChannels() const
Definition: VP1TabManager.cxx:1472
VP1DockWidget
Definition: VP1DockWidget.h:24
VP1TabManager::tabList
QStringList tabList()
Definition: VP1TabManager.cxx:539
VP1TabManager::visibleChannels
const QSet< IVP1ChannelWidget * > & visibleChannels() const
Definition: VP1TabManager.cxx:1467
VP1TabManager::hasTab
bool hasTab(QString) const
Definition: VP1TabManager.cxx:1421
test_pyathena.parent
parent
Definition: test_pyathena.py:15
VP1TabManager::loadConfigurationFromFile
void loadConfigurationFromFile(QString filename, const QMap< QString, QString > &availableplugins)
Definition: VP1TabManager.cxx:824
VP1TabManager::removeChannel
void removeChannel(QString channeluniquename)
Definition: VP1TabManager.cxx:600
VP1TabManager::removeChannelAfterQueueEmpties
void removeChannelAfterQueueEmpties(const QString &)
Definition: VP1TabManager.cxx:1509
python.L1.Config.LegacyTopoMergerMap.signals
signals
Definition: LegacyTopoMergerMap.py:13
VP1TabManager::selectedChannelWidget
IVP1ChannelWidget * selectedChannelWidget() const
Definition: VP1TabManager.cxx:465
VP1TabManager::showCurrentTabFullScreen
void showCurrentTabFullScreen()
Definition: VP1TabManager.cxx:455
VP1TabManager::allChannels
QList< IVP1ChannelWidget * > allChannels() const
Definition: VP1TabManager.cxx:1455
IVP1ChannelWidget
Definition: IVP1ChannelWidget.h:34
VP1TabManager::unserializeChannelState
void unserializeChannelState(IVP1ChannelWidget *cw, ChanState tate)
Definition: VP1TabManager.cxx:1542
VP1TabManager::addNewTab
void addNewTab(QString, const int &index=-1)
Definition: VP1TabManager.cxx:236
VP1TabManager::showChannelFullScreen
void showChannelFullScreen(IVP1ChannelWidget *)
Definition: VP1TabManager.cxx:358
VP1TabManager::currentTab
QString currentTab() const
Definition: VP1TabManager.cxx:1036
VP1TabManager::showTab
bool showTab(QString)
Definition: VP1TabManager.cxx:1078
VP1TabManager::dropOutOfFullScreen
void dropOutOfFullScreen()
Definition: VP1TabManager.cxx:257
VP1TabManager::showTabFullScreen
void showTabFullScreen(QString tabname)
Definition: VP1TabManager.cxx:395
VP1TabManager::cloneTab
void cloneTab(QString oldtabname, QString newtabname)
Definition: VP1TabManager.cxx:733
VP1TabManager::saveConfigurationToFile
void saveConfigurationToFile(QString filename, const bool &askonoverride=true)
Definition: VP1TabManager.cxx:767
VP1TabManager::cloneChannelToTab
void cloneChannelToTab(QString channeluniquename, QString tabname)
Definition: VP1TabManager.cxx:719
VP1TabManager::m_d
Imp * m_d
Definition: VP1TabManager.h:99
VP1TabManager::showPreviousTab
void showPreviousTab()
Definition: VP1TabManager.cxx:1124
VP1TabManager::~VP1TabManager
~VP1TabManager()
Definition: VP1TabManager.cxx:126
VP1TabManager::setTabCruiseMode
void setTabCruiseMode(const bool &)
Definition: VP1TabManager.cxx:1485
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
VP1TabManager::setSelectedDockWidget
void setSelectedDockWidget(VP1DockWidget *dw=0)
Definition: VP1TabManager.cxx:329
VP1TabManager::raiseTabBarContextMenu
void raiseTabBarContextMenu(int, const QPoint &)
Definition: VP1TabManager.cxx:1136
VP1TabManager::removeTab
void removeTab(QString tabname)
Definition: VP1TabManager.cxx:549
VP1TabManager
Definition: VP1TabManager.h:30
VP1TabManager::renameTab
void renameTab(QString tabname, QString newtabname)
Definition: VP1TabManager.cxx:524
VP1TabManager::visibleChannelsChanged
void visibleChannelsChanged(const QSet< IVP1ChannelWidget * > &vis, const QSet< IVP1ChannelWidget * > &soonvis, const double &soonvisbonus)
VP1TabManager::executePendingChannelRemoval
void executePendingChannelRemoval()
Definition: VP1TabManager.cxx:1516
VP1TabManager::moveChannelToTab
void moveChannelToTab(QString channeluniquename, QString tabname)
Definition: VP1TabManager.cxx:683
VP1TabManager::Imp
Definition: VP1TabManager.cxx:52
VP1TabManager::channelToTab
QString channelToTab(IVP1ChannelWidget *)
Definition: VP1TabManager.cxx:1406
beamspotman.basename
basename
Definition: beamspotman.py:640