OpenMS
DataSelectionTabs.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: Chris Bielow $
6 // $Authors: Chris Bielow $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 // OpenMS_GUI config
12 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
13 
15 
16 #include <QTabWidget>
17 
18 namespace OpenMS
19 {
20  class DIATreeTab;
21  class LayerDataBase;
22  class SpectraTreeTab;
23  class SpectraIDViewTab;
24  class TVDIATreeTabController;
25  class TVIdentificationViewController;
26  class TVSpectraViewController;
27  class TOPPViewBase;
28 
30  class OPENMS_GUI_DLLAPI DataTabBase
31  {
32  public:
35  virtual bool hasData(const LayerDataBase* layer) = 0;
36 
39  virtual void updateEntries(LayerDataBase* layer) = 0;
40 
42  virtual void clear() = 0;
43  };
44 
49  class OPENMS_GUI_DLLAPI DataSelectionTabs
50  : public QTabWidget
51  {
52  Q_OBJECT
53 
54  public:
55  enum TAB_INDEX
56  {
57  SPECTRA_IDX = 0,
58  IDENT_IDX = 1,
59  DIAOSW_IDX = 2,
60  SIZE_OF_TAB_INDEX
61  };
62 
65 
68 
74 
76  void currentTabChanged(int tab_index);
77 
79  void showSpectrumAsNew1D(int index);
80 
82  void showChromatogramsAsNew1D(const std::vector<int>& indices);
83 
86  void tabBarDoubleClicked(int tab_index);
87 
89  signals:
90 
91  private:
93 
98  std::vector< DataTabBase* > tab_ptrs_;
99 
106 
109  };
110 
111 } //namespace
Hierarchical visualization and selection of spectra.
Definition: DIATreeTab.h:33
A tabbed view, to browse lists of spectra or identifications.
Definition: DataSelectionTabs.h:51
SpectraIDViewTab * id_view_widget_
Definition: DataSelectionTabs.h:95
TVDIATreeTabController * diatab_controller_
TOPPView behavior for the DIA view.
Definition: DataSelectionTabs.h:105
std::vector< DataTabBase * > tab_ptrs_
holds pointers to all of the above tabs, for iteration purposes
Definition: DataSelectionTabs.h:98
void showSpectrumAsNew1D(int index)
forwards to the TOPPView*Behaviour classes, to show a certain spectrum in 1D
SpectraTreeTab * spectra_view_widget_
Definition: DataSelectionTabs.h:94
TAB_INDEX
Definition: DataSelectionTabs.h:56
TVSpectraViewController * spectraview_controller_
TOPPView behavior for the spectra view.
Definition: DataSelectionTabs.h:101
DIATreeTab * dia_widget_
Definition: DataSelectionTabs.h:96
TOPPViewBase * tv_
pointer to base class to access some members (going signal/slot would be cleaner)
Definition: DataSelectionTabs.h:108
~DataSelectionTabs()
Destructor.
void showChromatogramsAsNew1D(const std::vector< int > &indices)
forwards to the TOPPView*Behaviour classes, to show a certain set of chromatograms in 1D
TVIdentificationViewController * idview_controller_
TOPPView behavior for the identification view.
Definition: DataSelectionTabs.h:103
SpectraIDViewTab * getSpectraIDViewTab()
DataSelectionTabs(QWidget *parent, TOPPViewBase *tv)
Default constructor.
void currentTabChanged(int tab_index)
invoked when user changes the active tab to tab_index
void tabBarDoubleClicked(int tab_index)
all tabs need to implement this interface
Definition: DataSelectionTabs.h:31
virtual bool hasData(const LayerDataBase *layer)=0
virtual void updateEntries(LayerDataBase *layer)=0
virtual void clear()=0
explicitly show no data at all
Class that stores the data for one layer.
Definition: LayerDataBase.h:169
Tabular visualization / selection of identified spectra.
Definition: SpectraIDViewTab.h:33
Hierarchical visualization and selection of spectra.
Definition: SpectraTreeTab.h:33
Main window of TOPPView tool.
Definition: TOPPViewBase.h:103
Behavior of TOPPView in spectra view mode.
Definition: TVDIATreeTabController.h:28
Behavior of TOPPView in identification mode.
Definition: TVIdentificationViewController.h:28
Behavior of TOPPView in spectra view mode.
Definition: TVSpectraViewController.h:25
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22