ATLAS Offline Software
Loading...
Searching...
No Matches
VP1TabManager.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 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>
22class VP1TabWidget;
24class VP1DockWidget;
26class QPoint;
27
28//NB: The tab manager is allowed to pop up boxes with warnings, information, etc.
29
30class VP1TabManager : public QObject {
31
32 Q_OBJECT
33
34public:
35
38
39 bool hasTab(const QString&) const;
40 bool showTab(const QString&);
42 QString suggestNewTabName(const 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( const QString& channelbasename, const QString& tabname );
64public Q_SLOTS:
65 void addNewTab( const QString&, const int& index = -1 );
66 void renameTab( const QString& tabname, const QString& newtabname );
67 void removeTab( const QString& tabname );// -> Also removes channels obviously.
68 void removeChannel(const QString& channeluniquename);
69 void moveChannelToTab(const QString& channeluniquename,const QString& tabname);
70 void cloneChannelToTab(const QString& channeluniquename,const QString& tabname);
71 void cloneTab(const QString& oldtabname,const QString& newtabname);
72 void removeAllTabs();
73
74
75 void saveConfigurationToFile(const QString& filename,const bool& askonoverride=true);
76 void loadConfigurationFromFile(const QString& filename,const QMap<QString,QString>& availableplugins);
77
80 void showTabFullScreen(const 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:
91public:
92 void removeChannelAfterQueueEmpties(const QString&);
93signals:
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
98protected:
99 class Imp;
101
102 bool eventFilter ( QObject *, QEvent * );
103 typedef QPair<QByteArray,QMultiMap<QString,QByteArray> > ChanState;
106
107protected Q_SLOTS:
110};
111
112#endif
VP1TabManager(QObject *parent, VP1TabWidget *, VP1ChannelManager *)
QStringList tabList()
void renameTab(const QString &tabname, const QString &newtabname)
void showCurrentTabFullScreen()
QList< IVP1ChannelWidget * > allChannels() const
bool showTab(const QString &)
void currentVisibleChanged()
QPair< QByteArray, QMultiMap< QString, QByteArray > > ChanState
int nTabs() const
void setSelectedDockWidget(VP1DockWidget *dw=0)
bool isVisible(IVP1ChannelWidget *) const
void serializeChannelState(IVP1ChannelWidget *, ChanState &state)
IVP1ChannelWidget * addChannelToTab(const QString &channelbasename, const QString &tabname)
void unserializeChannelState(IVP1ChannelWidget *cw, ChanState tate)
void loadConfigurationFromFile(const QString &filename, const QMap< QString, QString > &availableplugins)
void setSelectedChannelWidget(IVP1ChannelWidget *cw=0)
void selectedChannelChanged(IVP1ChannelWidget *)
QString suggestNewTabName(const QString &oldtabname) const
void dropOutOfFullScreen()
void cloneChannelToTab(const QString &channeluniquename, const QString &tabname)
void raiseTabBarContextMenu(int, const QPoint &)
void tabListChanged(QStringList)
void removeTab(const QString &tabname)
void setTabCruiseMode(const bool &)
bool showFirstChannelWithGivenBasename(const QString &basename)
void launchStereoEditorCurrentTab()
void moveChannelToTab(const QString &channeluniquename, const QString &tabname)
QString channelToTab(IVP1ChannelWidget *)
const QSet< IVP1ChannelWidget * > & visibleChannels() const
IVP1ChannelWidget * selectedChannelWidget() const
bool eventFilter(QObject *, QEvent *)
QString currentTab() const
void cloneTab(const QString &oldtabname, const QString &newtabname)
void removeChannel(const QString &channeluniquename)
void visibleChannelsChanged(const QSet< IVP1ChannelWidget * > &vis, const QSet< IVP1ChannelWidget * > &soonvis, const double &soonvisbonus)
void executePendingChannelRemoval()
bool hasTab(const QString &) const
QString currentChannelUniqueName() const
void saveConfigurationToFile(const QString &filename, const bool &askonoverride=true)
void showChannelFullScreen(IVP1ChannelWidget *)
const QSet< IVP1ChannelWidget * > & soonVisibleChannels() const
void removeChannelAfterQueueEmpties(const QString &)
void addNewTab(const QString &, const int &index=-1)
void showCurrentChannelFullScreen()
void showTabFullScreen(const QString &tabname)
Definition index.py:1
std::string basename(std::string name)
Definition utils.cxx:207