OpenMS
2.8.0
|
Widget for 2D-visualization of peak map and feature map data. More...
#include <OpenMS/VISUAL/Plot2DWidget.h>
Public Types | |
typedef LayerDataBase::ExperimentSharedPtrType | ExperimentSharedPtrType |
Main managed data type (experiment) More... | |
Public Types inherited from PlotWidget | |
typedef LayerDataBase::ExperimentType | ExperimentType |
Main data type (experiment) More... | |
typedef LayerDataBase::FeatureMapType | FeatureMapType |
Main data type (features) More... | |
typedef ExperimentType::SpectrumType | SpectrumType |
Spectrum type. More... | |
Public Slots | |
void | recalculateAxes_ () override |
void | toggleProjections () |
Shows/hides the projections. More... | |
void | updateProjections () |
Updates and shows the projections. More... | |
void | showGoToDialog () override |
Public Slots inherited from PlotWidget | |
void | showStatistics () |
Shows statistics about the data (count, min, max, avg of intensity, charge, quality and meta data) More... | |
void | showIntensityDistribution (const Math::Histogram<> &dist) |
Shows the intensity distribution of the current layer. More... | |
void | showMetaDistribution (const String &name, const Math::Histogram<> &dist) |
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 | showSpectrumAsNew1D (int index) |
Requests to display the spectrum with index index in 1D. More... | |
void | showChromatogramsAsNew1D (std::vector< int, std::allocator< int > > indices) |
void | showCurrentPeaksAs3D () |
Requests to display all spectra as 1D. More... | |
Signals inherited from PlotWidget | |
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 | |
Plot2DWidget (const Param &preferences, QWidget *parent=nullptr) | |
Default constructor. More... | |
~Plot2DWidget () override | |
Destructor. More... | |
Plot2DCanvas * | canvas () |
This method is overwritten to make the class specific members accessible. More... | |
const Plot1DWidget * | getHorizontalProjection () const |
const reference to the horizontal projection More... | |
const Plot1DWidget * | getVerticalProjection () 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 PlotWidget | |
PlotWidget (const Param &preferences, QWidget *parent=nullptr) | |
Default constructor. More... | |
~PlotWidget () override | |
Destructor. More... | |
PlotCanvas * | canvas () |
Returns a pointer to canvas object. More... | |
PlotCanvas * | 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... | |
virtual void | showLegend (bool show) |
Shows/hides axis labels. More... | |
void | setIntensityMode (PlotCanvas::IntensityModes mode) |
Sets the intensity mode of the PlotCanvas. More... | |
virtual void | hideAxes () |
Hides x-axis and y-axis. More... | |
virtual void | saveAsImage () |
Saves the widget's content as image file. More... | |
Public Member Functions inherited from EnhancedTabBarWidgetInterface | |
EnhancedTabBarWidgetInterface () | |
C'tor; creates a new ID;. More... | |
virtual | ~EnhancedTabBarWidgetInterface () |
Destructor (emits SignalProvider::aboutToBeDestroyed) More... | |
void | addToTabBar (EnhancedTabBar *const parent, const String &caption, const bool make_active_tab=true) |
Int | getWindowId () const |
get the EnhancedTabBar unique window id More... | |
Protected Attributes | |
Plot1DWidget * | projection_vert_ |
Vertical projection widget. More... | |
Plot1DWidget * | projection_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 PlotWidget | |
PlotCanvas * | 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... | |
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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from EnhancedTabBarWidgetInterface | |
static Int | getFirstWindowID () |
the first object to be created will get this ID More... | |
Static Public Attributes inherited from PlotWidget | |
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 [] |
Protected Member Functions inherited from PlotWidget | |
void | closeEvent (QCloseEvent *e) override |
void | setCanvas_ (PlotCanvas *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_ (PlotCanvas::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 |
void | paintEvent (QPaintEvent *) override |
make our subclassed QWidget listen to things like stylesheet changes More... | |
Widget for 2D-visualization of peak map and feature map data.
The widget is composed of two scroll bars, two AxisWidget and a Plot2DCanvas as central widget.
The example image shows Plot2DWidget displaying a peak layer and a feature layer.
Main managed data type (experiment)
Plot2DWidget | ( | const Param & | preferences, |
QWidget * | parent = nullptr |
||
) |
Default constructor.
|
override |
Destructor.
|
privateslot |
slot that monitors the visible area changes and triggers the update of projections
|
inline |
This method is overwritten to make the class specific members accessible.
Referenced by TOPPViewBase::changeLabel(), TOPPViewBase::changeUnassigned(), TOPPViewBase::showCurrentPeaksAs2D(), TOPPViewBase::showCurrentPeaksAsDIA(), TOPPViewBase::showCurrentPeaksAsIonMobility(), and TOPPViewBase::updateToolBar().
const Plot1DWidget* getHorizontalProjection | ( | ) | const |
const reference to the horizontal projection
Referenced by TOPPViewBase::showPlotWidgetInWindow().
const Plot1DWidget* getVerticalProjection | ( | ) | const |
const reference to the vertical projection
Referenced by TOPPViewBase::showPlotWidgetInWindow().
|
privateslot |
shows the horizontal projection with the given data and draw mode
|
privateslot |
shows projections information
bool projectionsVisible | ( | ) | const |
Returns if one of the projections is visible (or both are visible)
Referenced by TOPPViewBase::toggleProjections().
|
overrideslot |
|
signal |
|
signal |
Requests to display all spectra as 1D.
Referenced by TOPPViewBase::showPlotWidgetInWindow().
|
overrideslot |
|
signal |
Requests to display the spectrum with index index
in 1D.
Referenced by TOPPViewBase::showPlotWidgetInWindow().
|
slot |
Shows/hides the projections.
Referenced by TOPPViewBase::toggleProjections().
|
slot |
Updates and shows the projections.
|
privateslot |
shows the vertical projection with the given data and draw mode
|
signal |
Signal emitted whenever the visible area changes.
area | The new visible area. |
|
protected |
Group box that shows information about the projections.
|
protected |
Horizontal projection widget.
|
protected |
Intensity maximum of the projection.
|
protected |
Number of peaks of the projection.
|
protected |
Intensity sum of the projection.
|
protected |
Vertical projection widget.
|
protected |
Checkbox that indicates that projections should be automatically updated (with a slight delay)
|
protected |
Timer that triggers auto-update of projections.