Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Private Slots | List of all members
Spectrum2DWidget Class Reference

Widget for 2D-visualization of peak map and feature map data. More...

#include <OpenMS/VISUAL/Spectrum2DWidget.h>

Inheritance diagram for Spectrum2DWidget:
SpectrumWidget QWidget EnhancedTabBarWidgetInterface

Public Types

typedef LayerData::ExperimentSharedPtrType ExperimentSharedPtrType
 Main managed data type (experiment) More...
 
- Public Types inherited from SpectrumWidget
typedef LayerData::ExperimentType ExperimentType
 Main data type (experiment) More...
 
typedef LayerData::FeatureMapType FeatureMapType
 Main data type (features) More...
 
typedef ExperimentType::SpectrumType SpectrumType
 Spectrum type. More...
 

Public Slots

virtual void recalculateAxes_ ()
 
void toggleProjections ()
 Shows/hides the projections. More...
 
void updateProjections ()
 Updates and shows the projections. More...
 
virtual void showGoToDialog ()
 
- Public Slots inherited from SpectrumWidget
void showStatistics ()
 Shows statistics about the data (count, min, max, avg of intensity, charge, quality and meta data) More...
 
void showIntensityDistribution ()
 Shows the intensity distribution of the current layer. More...
 
void showMetaDistribution (const String &name)
 Shows the meta data distribution of value name of the current layer. More...
 
void updateAxes ()
 Updates the axes by setting the right labels and calling recalculateAxes_();. More...
 
void updateHScrollbar (float min, float disp_min, float disp_max, float max)
 Updates the horizontal scrollbar. More...
 
void updateVScrollbar (float min, float disp_min, float disp_max, float max)
 Updates the vertical scrollbar. More...
 
virtual void showGoToDialog ()=0
 Shows a goto dialog. More...
 
void changeLegendVisibility ()
 Toggles the axis legend visibility. More...
 

Signals

void visibleAreaChanged (DRange< 2 > area)
 Signal emitted whenever the visible area changes. More...
 
void showSpectrumAs1D (int index)
 Requests to display the spectrum with index index in 1D. More...
 
void showSpectrumAs1D (std::vector< int, std::allocator< int > > indices)
 
void showCurrentPeaksAs3D ()
 Requests to display all spectra as 1D. More...
 
- Signals inherited from SpectrumWidget
void sendStatusMessage (std::string, OpenMS::UInt)
 Emits a status message that should be displayed for time ms. If time is 0 the message should be displayed until the next message is emitted. More...
 
void sendCursorStatus (double mz=-1.0, double rt=-1.0)
 Emitted when the cursor position changes (for displaying e.g. in status bar) More...
 
void aboutToBeDestroyed (int window_id)
 Message about the destruction of this widget. More...
 
void openPreferences ()
 Shows the main preferences dialog. More...
 
void dropReceived (const QMimeData *data, QWidget *source, int id)
 Signal that is emitted, when a drag-and-drop action ends on this widget. More...
 

Public Member Functions

 Spectrum2DWidget (const Param &preferences, QWidget *parent=0)
 Default constructor. More...
 
virtual ~Spectrum2DWidget ()
 Destructor. More...
 
Spectrum2DCanvascanvas ()
 This method is overwritten to make the class specific members accessible. More...
 
const Spectrum1DWidgetgetHorizontalProjection () const
 const reference to the horizontal projection More...
 
const Spectrum1DWidgetgetVerticalProjection () const
 const reference to the vertical projection More...
 
bool projectionsVisible () const
 Returns if one of the projections is visible (or both are visible) More...
 
- Public Member Functions inherited from SpectrumWidget
 SpectrumWidget (const Param &preferences, QWidget *parent=0)
 Default constructor. More...
 
virtual ~SpectrumWidget ()
 Destructor. More...
 
SpectrumCanvascanvas ()
 Returns a pointer to canvas object. More...
 
SpectrumCanvascanvas () const
 
virtual AxisWidgetxAxis ()
 Returns a pointer to the x-axis axis widget. More...
 
virtual AxisWidgetyAxis ()
 Returns a pointer to the y-axis axis widget. More...
 
Int getActionMode () const
 Get the mouse action mode. More...
 
virtual bool isLegendShown () const
 Returns if the axis labels are shown. More...
 
virtual void showLegend (bool show)
 Shows/hides axis labels. More...
 
void setIntensityMode (SpectrumCanvas::IntensityModes mode)
 Sets the intensity mode of the SpectrumCanvas. More...
 
virtual void hideAxes ()
 Hides x-axis and y-axis. More...
 
virtual void saveAsImage ()
 Saves the widget's content as image file. More...
 
virtual Int getWindowId ()
 getter for the EnhancedTabBar window id as defined in the interface More...
 
virtual void setWindowId (Int window_id)
 setter for the EnhancedTabBar window id as defined in the interface More...
 
- Public Member Functions inherited from EnhancedTabBarWidgetInterface
virtual ~EnhancedTabBarWidgetInterface ()
 Destructor. More...
 

Protected Member Functions

virtual Math::Histogram createIntensityDistribution_ () const
 creates the intensity distribution of the current layer More...
 
virtual Math::Histogram createMetaDistribution_ (const String &name) const
 creates the meta data distribution of value name of the current layer More...
 
- Protected Member Functions inherited from SpectrumWidget
void setCanvas_ (SpectrumCanvas *canvas, UInt row=0, UInt col=2)
 Adds the canvas, axes and scrollbars to the layout. More...
 
virtual void intensityModeChange_ ()
 Switch between different intensity modes. More...
 
virtual void recalculateAxes_ ()=0
 recalculates the Axis ticks More...
 
void correctAreaToObeyMinMaxRanges_ (SpectrumCanvas::AreaType &area)
 correct given area X/Y-values if the values under-/overflow the min-/max values of the data More...
 
void closeEvent (QCloseEvent *e)
 
void dragEnterEvent (QDragEnterEvent *event)
 
void dragMoveEvent (QDragMoveEvent *event)
 
void dropEvent (QDropEvent *event)
 

Protected Attributes

Spectrum1DWidgetprojection_vert_
 Vertical projection widget. More...
 
Spectrum1DWidgetprojection_horz_
 Horizontal projection widget. More...
 
QGroupBox * projection_box_
 Group box that shows information about the projections. More...
 
QLabel * projection_peaks_
 Number of peaks of the projection. More...
 
QLabel * projection_sum_
 Intensity sum of the projection. More...
 
QLabel * projection_max_
 Intensity maximum of the projection. More...
 
QCheckBox * projections_auto_
 Checkbox that indicates that projections should be automatically updated (with a slight delay) More...
 
QTimer * projections_timer_
 Timer that triggers auto-update of projections. More...
 
- Protected Attributes inherited from SpectrumWidget
SpectrumCanvascanvas_
 Pointer to the canvas widget. More...
 
QGridLayout * grid_
 Main layout. More...
 
AxisWidgety_axis_
 Vertical axis. More...
 
AxisWidgetx_axis_
 Horizontal axis. More...
 
QScrollBar * x_scrollbar_
 Horizontal scrollbar. More...
 
QScrollBar * y_scrollbar_
 Vertical scrollbar. More...
 
Int window_id_
 

Private Slots

void horizontalProjection (ExperimentSharedPtrType exp)
 shows the horizontal projection with the given data and draw mode More...
 
void verticalProjection (ExperimentSharedPtrType exp)
 shows the vertical projection with the given data and draw mode More...
 
void projectionInfo (int peaks, double intensity, double max)
 shows projections information More...
 
void autoUpdateProjections ()
 slot that monitors the visible area changes and triggers the update of projections More...
 

Detailed Description

Widget for 2D-visualization of peak map and feature map data.

The widget is composed of two scroll bars, two AxisWidget and a Spectrum2DCanvas as central widget.

Spectrum2DWidget.png

The example image shows Spectrum2DWidget displaying a peak layer and a feature layer.

Member Typedef Documentation

◆ ExperimentSharedPtrType

Main managed data type (experiment)

Constructor & Destructor Documentation

◆ Spectrum2DWidget()

Spectrum2DWidget ( const Param preferences,
QWidget parent = 0 
)

Default constructor.

◆ ~Spectrum2DWidget()

virtual ~Spectrum2DWidget ( )
virtual

Destructor.

Member Function Documentation

◆ autoUpdateProjections

void autoUpdateProjections ( )
privateslot

slot that monitors the visible area changes and triggers the update of projections

◆ canvas()

Spectrum2DCanvas* canvas ( )
inline

This method is overwritten to make the class specific members accessible.

Referenced by TOPPViewBase::changeLabel(), TOPPViewBase::changeUnassigned(), TOPPViewBase::showCurrentPeaksAs2D(), and TOPPViewBase::updateToolBar().

◆ createIntensityDistribution_()

virtual Math::Histogram createIntensityDistribution_ ( ) const
protectedvirtual

creates the intensity distribution of the current layer

Implements SpectrumWidget.

◆ createMetaDistribution_()

virtual Math::Histogram createMetaDistribution_ ( const String name) const
protectedvirtual

creates the meta data distribution of value name of the current layer

Implements SpectrumWidget.

◆ getHorizontalProjection()

const Spectrum1DWidget* getHorizontalProjection ( ) const

const reference to the horizontal projection

Referenced by TOPPViewBase::showSpectrumWidgetInWindow().

◆ getVerticalProjection()

const Spectrum1DWidget* getVerticalProjection ( ) const

const reference to the vertical projection

Referenced by TOPPViewBase::showSpectrumWidgetInWindow().

◆ horizontalProjection

void horizontalProjection ( ExperimentSharedPtrType  exp)
privateslot

shows the horizontal projection with the given data and draw mode

◆ projectionInfo

void projectionInfo ( int  peaks,
double  intensity,
double  max 
)
privateslot

shows projections information

◆ projectionsVisible()

bool projectionsVisible ( ) const

Returns if one of the projections is visible (or both are visible)

Referenced by TOPPViewBase::toggleProjections().

◆ recalculateAxes_

virtual void recalculateAxes_ ( )
virtualslot

◆ showCurrentPeaksAs3D

void showCurrentPeaksAs3D ( )
signal

Requests to display all spectra as 1D.

◆ showGoToDialog

virtual void showGoToDialog ( )
virtualslot

◆ showSpectrumAs1D [1/2]

void showSpectrumAs1D ( int  index)
signal

Requests to display the spectrum with index index in 1D.

◆ showSpectrumAs1D [2/2]

void showSpectrumAs1D ( std::vector< int, std::allocator< int > >  indices)
signal

◆ toggleProjections

void toggleProjections ( )
slot

Shows/hides the projections.

Referenced by TOPPViewBase::toggleProjections().

◆ updateProjections

void updateProjections ( )
slot

Updates and shows the projections.

◆ verticalProjection

void verticalProjection ( ExperimentSharedPtrType  exp)
privateslot

shows the vertical projection with the given data and draw mode

◆ visibleAreaChanged

void visibleAreaChanged ( DRange< 2 >  area)
signal

Signal emitted whenever the visible area changes.

Parameters
areaThe new visible area.

Member Data Documentation

◆ projection_box_

QGroupBox* projection_box_
protected

Group box that shows information about the projections.

◆ projection_horz_

Spectrum1DWidget* projection_horz_
protected

Horizontal projection widget.

◆ projection_max_

QLabel* projection_max_
protected

Intensity maximum of the projection.

◆ projection_peaks_

QLabel* projection_peaks_
protected

Number of peaks of the projection.

◆ projection_sum_

QLabel* projection_sum_
protected

Intensity sum of the projection.

◆ projection_vert_

Spectrum1DWidget* projection_vert_
protected

Vertical projection widget.

◆ projections_auto_

QCheckBox* projections_auto_
protected

Checkbox that indicates that projections should be automatically updated (with a slight delay)

◆ projections_timer_

QTimer* projections_timer_
protected

Timer that triggers auto-update of projections.


OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:13 using doxygen 1.8.13