OpenMS
2.6.0
|
Widget for visualization of several spectra. More...
#include <OpenMS/VISUAL/Spectrum1DWidget.h>
Public Slots | |
void | showGoToDialog () override |
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... | |
void | showCurrentPeaksAsIonMobility () |
Requests to display the whole spectrum in ion mobility view. More... | |
void | showCurrentPeaksAsDIA () |
Requests to display a full DIA window. 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=nullptr) | |
Default constructor. More... | |
~Spectrum1DWidget () override | |
Destructor. More... | |
Spectrum1DCanvas * | canvas () |
This method is overwritten to make the class specific members accessible. More... | |
void | hideAxes () override |
Hides x-axis and y-axis. More... | |
void | showLegend (bool show) override |
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 ¶m) |
Performs an alignment of the layers with layer_index_1 and layer_index_2 . More... | |
void | resetAlignment () |
Resets the alignment. More... | |
void | saveAsImage () override |
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=nullptr) | |
Default constructor. More... | |
~SpectrumWidget () override | |
Destructor. More... | |
SpectrumCanvas * | canvas () |
Returns a pointer to canvas object. More... | |
SpectrumCanvas * | canvas () const |
virtual AxisWidget * | xAxis () |
Returns a pointer to the x-axis axis widget. More... | |
virtual AxisWidget * | yAxis () |
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... | |
Int | getWindowId () override |
getter for the EnhancedTabBar window id as defined in the interface More... | |
void | setWindowId (Int window_id) override |
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 | |
Math::Histogram | createIntensityDistribution_ () const override |
creates the intensity distribution of the current layer More... | |
Math::Histogram | createMetaDistribution_ (const String &name) const override |
creates the meta data distribution of value name of the current layer More... | |
void | recalculateAxes_ () override |
recalculates the Axis ticks More... | |
Protected Member Functions inherited from SpectrumWidget | |
void | closeEvent (QCloseEvent *e) override |
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 | dragEnterEvent (QDragEnterEvent *event) override |
void | dragMoveEvent (QDragMoveEvent *event) override |
void | dropEvent (QDropEvent *event) override |
Protected Attributes | |
AxisWidget * | flipped_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 | |
SpectrumCanvas * | canvas_ |
Pointer to the canvas widget. More... | |
QGridLayout * | grid_ |
Main layout. More... | |
AxisWidget * | y_axis_ |
Vertical axis. More... | |
AxisWidget * | x_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... | |
Static Public Attributes inherited from SpectrumWidget | |
static const char | RT_AXIS_TITLE [] |
static const char | MZ_AXIS_TITLE [] |
static const char | INTENSITY_AXIS_TITLE [] |
static const char | IM_MS_AXIS_TITLE [] |
static const char | IM_ONEKZERO_AXIS_TITLE [] |
Widget for visualization of several spectra.
The widget is composed of a scroll bar, an AxisWidget and a Spectrum1DCanvas as central widget.
The example image shows Spectrum1DWidget displaying a raw data layer and a peak data layer.
Spectrum1DWidget | ( | const Param & | preferences, |
QWidget * | parent = nullptr |
||
) |
Default constructor.
|
override |
Destructor.
|
inline |
This method is overwritten to make the class specific members accessible.
Referenced by TOPPViewBase::addData(), TOPPViewBase::layerContextMenu(), TOPPViewBase::layerZoomChanged(), TOPPViewBase::setDrawMode1D(), TOPPViewBase::showSpectrumAlignmentDialog(), TOPPViewBase::updateMenu(), and TOPPViewBase::updateToolBar().
|
overrideprotectedvirtual |
creates the intensity distribution of the current layer
Implements SpectrumWidget.
|
overrideprotectedvirtual |
creates the meta data distribution of value name
of the current layer
Implements SpectrumWidget.
|
overridevirtual |
Hides x-axis and y-axis.
Reimplemented from SpectrumWidget.
Performs an alignment of the layers with layer_index_1
and layer_index_2
.
Referenced by TOPPViewBase::showSpectrumAlignmentDialog().
|
overrideprotectedvirtual |
recalculates the Axis ticks
Implements SpectrumWidget.
|
virtual |
void resetAlignment | ( | ) |
Resets the alignment.
|
overridevirtual |
Saves the widget's content as image file.
Reimplemented from SpectrumWidget.
|
signal |
Requests to display the whole spectrum in 2D view.
Referenced by TOPPViewBase::showSpectrumWidgetInWindow().
|
signal |
Requests to display the whole spectrum in 3D view.
Referenced by TOPPViewBase::showSpectrumWidgetInWindow().
|
signal |
Requests to display a full DIA window.
Referenced by TOPPViewBase::showSpectrumWidgetInWindow().
|
signal |
Requests to display the whole spectrum in ion mobility view.
Referenced by TOPPViewBase::showSpectrumWidgetInWindow().
|
overrideslot |
|
overridevirtual |
Shows/hides axis labels.
Reimplemented from SpectrumWidget.
void toggleMirrorView | ( | bool | mirror | ) |
Switches to mirror view, displays another y-axis for the second spectrum.
|
protected |
The second y-axis for the mirror view.
|
protected |
Spacer between the two y-axes in mirror mode (needed when visualizing an alignment)