OpenMS  2.7.0
Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
DIATreeTab Class Reference

Hierarchical visualization and selection of spectra. More...

#include <OpenMS/VISUAL/DIATreeTab.h>

Inheritance diagram for DIATreeTab:
[legend]
Collaboration diagram for DIATreeTab:
[legend]

Signals

void entityClicked (const OSWIndexTrace &trace)
 emitted when a protein, peptide, feature or transition was selected More...
 
void entityDoubleClicked (const OSWIndexTrace &trace)
 emitted when a protein, peptide, feature or transition was double-clicked More...
 

Public Member Functions

 DIATreeTab (QWidget *parent=nullptr)
 Constructor. More...
 
 ~DIATreeTab ()=default
 Destructor. More...
 
bool hasData (const LayerData *layer) override
 
void updateEntries (LayerData *cl) override
 
void clear () override
 remove all visible data More...
 

Private Slots

void populateSearchBox_ ()
 fill the search-combo-box with current column header names More...
 
void spectrumSearchText_ ()
 searches for rows containing a search text (from spectra_search_box_); called when text search box is used More...
 
void rowSelectionChange_ (QTreeWidgetItem *, QTreeWidgetItem *)
 emits entityClicked() for all subitems More...
 
void rowClicked_ (QTreeWidgetItem *, int col)
 emits entityClicked() for all subitems More...
 
void rowDoubleClicked_ (QTreeWidgetItem *, int col)
 emits entityDoubleClicked() for all subitems More...
 
void searchAndShow_ ()
 searches using text box and plots the spectrum More...
 

Private Member Functions

OSWIndexTrace prepareSignal_ (QTreeWidgetItem *item)
 convert a tree item to a pointer into an OSWData structure More...
 

Private Attributes

QLineEditspectra_search_box_ = nullptr
 
QComboBox * spectra_combo_box_ = nullptr
 
TreeViewdia_treewidget_ = nullptr
 
OSWDatacurrent_data_ = nullptr
 

Detailed Description

Hierarchical visualization and selection of spectra.

Constructor & Destructor Documentation

◆ DIATreeTab()

DIATreeTab ( QWidget parent = nullptr)

Constructor.

◆ ~DIATreeTab()

~DIATreeTab ( )
default

Destructor.

Member Function Documentation

◆ clear()

void clear ( )
overridevirtual

remove all visible data

Implements DataTabBase.

◆ entityClicked

void entityClicked ( const OSWIndexTrace trace)
signal

emitted when a protein, peptide, feature or transition was selected

◆ entityDoubleClicked

void entityDoubleClicked ( const OSWIndexTrace trace)
signal

emitted when a protein, peptide, feature or transition was double-clicked

◆ hasData()

bool hasData ( const LayerData layer)
overridevirtual

given a layer, determine if the tab could use it to show data (useful to decide if the tab should be enabled/disabled) If a nullptr is given, it HAS to return false!

Implements DataTabBase.

◆ populateSearchBox_

void populateSearchBox_ ( )
privateslot

fill the search-combo-box with current column header names

◆ prepareSignal_()

OSWIndexTrace prepareSignal_ ( QTreeWidgetItem *  item)
private

convert a tree item to a pointer into an OSWData structure

Parameters
itemThe tree item (protein, peptide,...) that was clicked
Returns
The index into the current OSWData current_data_

◆ rowClicked_

void rowClicked_ ( QTreeWidgetItem *  ,
int  col 
)
privateslot

emits entityClicked() for all subitems

◆ rowDoubleClicked_

void rowDoubleClicked_ ( QTreeWidgetItem *  ,
int  col 
)
privateslot

emits entityDoubleClicked() for all subitems

◆ rowSelectionChange_

void rowSelectionChange_ ( QTreeWidgetItem *  ,
QTreeWidgetItem *   
)
privateslot

emits entityClicked() for all subitems

◆ searchAndShow_

void searchAndShow_ ( )
privateslot

searches using text box and plots the spectrum

◆ spectrumSearchText_

void spectrumSearchText_ ( )
privateslot

searches for rows containing a search text (from spectra_search_box_); called when text search box is used

◆ updateEntries()

void updateEntries ( LayerData cl)
overridevirtual

refresh the table using data from cl

Parameters
clLayer with OSW data; cannot be const, since we might read missing protein data from source on demand

Implements DataTabBase.

Member Data Documentation

◆ current_data_

OSWData* current_data_ = nullptr
private

points to the data which is currently shown Useful to avoid useless repaintings, which would loose the open/close state of internal tree nodes and selected items

◆ dia_treewidget_

TreeView* dia_treewidget_ = nullptr
private

◆ spectra_combo_box_

QComboBox* spectra_combo_box_ = nullptr
private

◆ spectra_search_box_

QLineEdit* spectra_search_box_ = nullptr
private