OpenMS
EnhancedTabBarWidgetInterface.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: Timo Sachsenberg $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/CONCEPT/Types.h>
13 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
14 
15 #include <QObject>
16 
17 namespace OpenMS
18 {
19  class EnhancedTabBar;
20 
40  class OPENMS_GUI_DLLAPI SignalProvider
41  : public QObject
42  {
43  Q_OBJECT
44  public:
46  {
47  emit aboutToBeDestroyed(id);
48  }
49  signals:
50  void aboutToBeDestroyed(int id);
51  };
52 
58  class OPENMS_GUI_DLLAPI EnhancedTabBarWidgetInterface
59  {
60  public:
65 
68  void addToTabBar(EnhancedTabBar* const parent, const String& caption, const bool make_active_tab = true);
69 
71  Int getWindowId() const;
72 
75 
76  private:
77  Int window_id_ { -1 };
79  };
80 } // namespace OpenMS
81 
Widgets that are placed into an EnhancedTabBar must implement this interface.
Definition: EnhancedTabBarWidgetInterface.h:59
Int getWindowId() const
get the EnhancedTabBar unique window id
SignalProvider sp_
emits the signal that the EnhancedTabBarWidgetInterface is about to be destroyed
Definition: EnhancedTabBarWidgetInterface.h:78
virtual ~EnhancedTabBarWidgetInterface()
Destructor (emits SignalProvider::aboutToBeDestroyed)
void addToTabBar(EnhancedTabBar *const parent, const String &caption, const bool make_active_tab=true)
EnhancedTabBarWidgetInterface()
C'tor; creates a new ID;.
static Int getFirstWindowID()
the first object to be created will get this ID
Convenience tab bar implementation.
Definition: EnhancedTabBar.h:36
provides a signal mechanism (by deriving from QObject) for classes which are not allowed to have sign...
Definition: EnhancedTabBarWidgetInterface.h:42
void aboutToBeDestroyed(int id)
void emitAboutToBeDestroyed(int id)
Definition: EnhancedTabBarWidgetInterface.h:45
A more convenient string class.
Definition: String.h:34
int Int
Signed integer type.
Definition: Types.h:76
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22