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

Widget for visualization of several spectra. More...

#include <OpenMS/VISUAL/Spectrum1DWidget.h>

Inheritance diagram for Spectrum1DWidget:
SpectrumWidget QWidget EnhancedTabBarWidgetInterface

Public Slots

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 (double, double)
 Is emitted whenever the visible area changes. More...
 
void showCurrentPeaksAs2D ()
 Requests to display the whole spectrum in 2D view. More...
 
void showCurrentPeaksAs3D ()
 Requests to display the whole spectrum in 3D view. 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

 Spectrum1DWidget (const Param &preferences, QWidget *parent=0)
 Default constructor. More...
 
virtual ~Spectrum1DWidget ()
 Destructor. More...
 
Spectrum1DCanvascanvas ()
 This method is overwritten to make the class specific members accessible. More...
 
virtual void hideAxes ()
 Hides x-axis and y-axis. More...
 
virtual void showLegend (bool show)
 Shows/hides axis labels. More...
 
void toggleMirrorView (bool mirror)
 Switches to mirror view, displays another y-axis for the second spectrum. More...
 
void performAlignment (Size layer_index_1, Size layer_index_2, const Param &param)
 Performs an alignment of the layers with layer_index_1 and layer_index_2. More...
 
void resetAlignment ()
 Resets the alignment. More...
 
virtual void saveAsImage ()
 Saves the widget's content as image file. More...
 
virtual void renderForImage (QPainter &painter)
 
- 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...
 
void setIntensityMode (SpectrumCanvas::IntensityModes mode)
 Sets the intensity mode of the SpectrumCanvas. 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...
 
virtual void recalculateAxes_ ()
 recalculates the Axis ticks 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...
 
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

AxisWidgetflipped_y_axis_
 The second y-axis for the mirror view. More...
 
QSpacerItem * spacer_
 Spacer between the two y-axes in mirror mode (needed when visualizing an alignment) 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_
 

Additional Inherited Members

- 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...
 

Detailed Description

Widget for visualization of several spectra.

The widget is composed of a scroll bar, an AxisWidget and a Spectrum1DCanvas as central widget.

Spectrum1DWidget.png

The example image shows Spectrum1DWidget displaying a raw data layer and a peak data layer.

Constructor & Destructor Documentation

◆ Spectrum1DWidget()

Spectrum1DWidget ( const Param preferences,
QWidget parent = 0 
)

Default constructor.

◆ ~Spectrum1DWidget()

virtual ~Spectrum1DWidget ( )
virtual

Destructor.

Member Function Documentation

◆ canvas()

Spectrum1DCanvas* canvas ( )
inline

◆ 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.

◆ hideAxes()

virtual void hideAxes ( )
virtual

Hides x-axis and y-axis.

Reimplemented from SpectrumWidget.

◆ performAlignment()

void performAlignment ( Size  layer_index_1,
Size  layer_index_2,
const Param param 
)

Performs an alignment of the layers with layer_index_1 and layer_index_2.

Referenced by TOPPViewBase::showSpectrumAlignmentDialog().

◆ recalculateAxes_()

virtual void recalculateAxes_ ( )
protectedvirtual

recalculates the Axis ticks

Implements SpectrumWidget.

◆ renderForImage()

virtual void renderForImage ( QPainter &  painter)
virtual

◆ resetAlignment()

void resetAlignment ( )

Resets the alignment.

◆ saveAsImage()

virtual void saveAsImage ( )
virtual

Saves the widget's content as image file.

Reimplemented from SpectrumWidget.

◆ showCurrentPeaksAs2D

void showCurrentPeaksAs2D ( )
signal

Requests to display the whole spectrum in 2D view.

◆ showCurrentPeaksAs3D

void showCurrentPeaksAs3D ( )
signal

Requests to display the whole spectrum in 3D view.

◆ showGoToDialog

virtual void showGoToDialog ( )
virtualslot

◆ showLegend()

virtual void showLegend ( bool  show)
virtual

Shows/hides axis labels.

Reimplemented from SpectrumWidget.

◆ toggleMirrorView()

void toggleMirrorView ( bool  mirror)

Switches to mirror view, displays another y-axis for the second spectrum.

◆ visibleAreaChanged

void visibleAreaChanged ( double  ,
double   
)
signal

Is emitted whenever the visible area changes.

Member Data Documentation

◆ flipped_y_axis_

AxisWidget* flipped_y_axis_
protected

The second y-axis for the mirror view.

◆ spacer_

QSpacerItem* spacer_
protected

Spacer between the two y-axes in mirror mode (needed when visualizing an alignment)


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