OpenMS
DIATreeTab.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, 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 #include <QtWidgets>
12 
15 
16 class QLineEdit;
17 class QComboBox;
18 class QTreeWidget;
19 class QTreeWidgetItem;
20 
21 namespace OpenMS
22 {
23  class TreeView;
24  struct OSWIndexTrace;
25 
31  class OPENMS_GUI_DLLAPI DIATreeTab :
32  public QWidget, public DataTabBase
33  {
34  Q_OBJECT
35  public:
37  DIATreeTab(QWidget* parent = nullptr);
39  ~DIATreeTab() override = default;
40 
41  // docu in base class
42  bool hasData(const LayerDataBase* layer) override;
43 
46  void updateEntries(LayerDataBase* cl) override;
47 
49  void clear() override;
50 
51  signals:
53  void entityClicked(const OSWIndexTrace& trace);
55  void entityDoubleClicked(const OSWIndexTrace& trace);
56 
57  private:
58  QLineEdit* spectra_search_box_ = nullptr;
59  QComboBox* spectra_combo_box_ = nullptr;
60  TreeView* dia_treewidget_ = nullptr;
61 
64  OSWData* current_data_ = nullptr;
65 
72  OSWIndexTrace prepareSignal_(QTreeWidgetItem* item);
73 
74  private slots:
80  void rowSelectionChange_(QTreeWidgetItem*, QTreeWidgetItem*);
82  void rowClicked_(QTreeWidgetItem*, int col);
84  void rowDoubleClicked_(QTreeWidgetItem*, int col);
87  };
88 }
89 
Hierarchical visualization and selection of spectra.
Definition: DIATreeTab.h:33
OSWIndexTrace prepareSignal_(QTreeWidgetItem *item)
convert a tree item to a pointer into an OSWData structure
void spectrumSearchText_()
searches for rows containing a search text (from spectra_search_box_); called when text search box is...
void entityClicked(const OSWIndexTrace &trace)
emitted when a protein, peptide, feature or transition was selected
void searchAndShow_()
searches using text box and plots the spectrum
DIATreeTab(QWidget *parent=nullptr)
Constructor.
bool hasData(const LayerDataBase *layer) override
void rowSelectionChange_(QTreeWidgetItem *, QTreeWidgetItem *)
emits entityClicked() for all subitems
void populateSearchBox_()
fill the search-combo-box with current column header names
~DIATreeTab() override=default
Destructor.
void rowClicked_(QTreeWidgetItem *, int col)
emits entityClicked() for all subitems
void entityDoubleClicked(const OSWIndexTrace &trace)
emitted when a protein, peptide, feature or transition was double-clicked
void rowDoubleClicked_(QTreeWidgetItem *, int col)
emits entityDoubleClicked() for all subitems
void updateEntries(LayerDataBase *cl) override
void clear() override
remove all visible data
all tabs need to implement this interface
Definition: DataSelectionTabs.h:31
Class that stores the data for one layer.
Definition: LayerDataBase.h:169
Holds all or partial information from an OSW file.
Definition: OSWData.h:279
A better QTreeWidget for TOPPView, which supports header context menu and conveniently adding/getting...
Definition: TreeView.h:22
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Definition: OSWData.h:40