OpenMS GUI
3.7.0-pre-nightly-2026-11-10
TOPPView, TOPPAS, INIFileEditor and the OpenMS_GUI library
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Loading...
Searching...
No Matches
Plot1DWidget.h
Go to the documentation of this file.
1
// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2
// SPDX-License-Identifier: BSD-3-Clause
3
//
4
// --------------------------------------------------------------------------
5
// $Maintainer: Timo Sachsenberg$
6
// $Authors: Marc Sturm $
7
// --------------------------------------------------------------------------
8
9
#pragma once
10
11
// OpenMS_GUI config
12
#include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
13
14
// STL
15
#include <vector>
16
17
// OpenMS
18
#include <
OpenMS/VISUAL/PlotWidget.h
>
19
#include <
OpenMS/VISUAL/Plot1DCanvas.h
>
20
21
class
QAction;
22
class
QSpacerItem;
23
24
namespace
OpenMS
25
{
26
class
Plot1DCanvas;
27
39
class
OPENMS_GUI_DLLAPI
Plot1DWidget
:
40
public
PlotWidget
41
{
42
Q_OBJECT
43
44
public
:
46
Plot1DWidget
(
const
Param& preferences,
const
DIM gravity_axis = DIM::Y,
QWidget
* parent =
nullptr
);
48
~Plot1DWidget
()
override
;
49
50
// docu in base class
51
Plot1DCanvas
*
canvas
()
const override
52
{
53
return
static_cast<
Plot1DCanvas
*
>
(canvas_);
54
}
55
56
// Docu in base class
57
void
setMapper
(
const
DimMapper<2>
& mapper)
override
58
{
59
canvas_->setMapper(mapper);
60
}
61
62
// Docu in base class
63
void
hideAxes
()
override
;
64
65
// Docu in base class
66
void
showLegend
(
bool
show)
override
;
67
69
void
toggleMirrorView
(
bool
mirror);
70
72
void
performAlignment
(Size layer_index_1, Size layer_index_2,
const
Param & param);
73
75
void
resetAlignment
();
76
77
// Docu in base class
78
void
saveAsImage
()
override
;
79
80
// Docu in base class
81
virtual
void
renderForImage
(QPainter& painter);
82
83
signals:
85
void
showCurrentPeaksAs2D
();
86
88
void
showCurrentPeaksAs3D
();
89
91
void
showCurrentPeaksAsIonMobility
(
const
MSSpectrum& spec);
92
94
void
showCurrentPeaksAsDIA
(
const
Precursor
& pc,
const
MSExperiment& exp);
95
96
public
slots:
97
// Docu in base class
98
void
showGoToDialog
()
override
;
99
100
protected
:
101
// Docu in base class
102
void
recalculateAxes_
()
override
;
103
105
AxisWidget
*
flipped_y_axis_
;
106
108
QSpacerItem *
spacer_
;
109
110
};
111
}
// namespace OpenMS
112
Plot1DCanvas.h
PlotWidget.h
OpenMS::AxisWidget
Widget that represents an axis of a graph.
Definition
AxisWidget.h:39
OpenMS::Plot1DCanvas
Canvas for visualization of one or several spectra.
Definition
Plot1DCanvas.h:296
OpenMS::Plot1DWidget
Widget for visualization of several spectra.
Definition
Plot1DWidget.h:41
OpenMS::Plot1DWidget::recalculateAxes_
void recalculateAxes_() override
recalculates the Axis ticks
OpenMS::Plot1DWidget::flipped_y_axis_
AxisWidget * flipped_y_axis_
The second y-axis for the mirror view.
Definition
Plot1DWidget.h:105
OpenMS::Plot1DWidget::spacer_
QSpacerItem * spacer_
Spacer between the two y-axes in mirror mode (needed when visualizing an alignment)
Definition
Plot1DWidget.h:108
OpenMS::Plot1DWidget::Plot1DWidget
Plot1DWidget(const Param &preferences, const DIM gravity_axis=DIM::Y, QWidget *parent=nullptr)
Default constructor.
OpenMS::Plot1DWidget::showCurrentPeaksAs2D
void showCurrentPeaksAs2D()
Requests to display the whole spectrum in 2D view.
OpenMS::Plot1DWidget::showCurrentPeaksAsIonMobility
void showCurrentPeaksAsIonMobility(const MSSpectrum &spec)
Requests to display the whole spectrum in ion mobility view.
OpenMS::Plot1DWidget::setMapper
void setMapper(const DimMapper< 2 > &mapper) override
Set a new mapper for the canvas and axis. Internally, all dependent components are updated (e....
Definition
Plot1DWidget.h:57
OpenMS::Plot1DWidget::toggleMirrorView
void toggleMirrorView(bool mirror)
Switches to mirror view, displays another y-axis for the second spectrum.
OpenMS::Plot1DWidget::~Plot1DWidget
~Plot1DWidget() override
Destructor.
OpenMS::Plot1DWidget::performAlignment
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.
OpenMS::Plot1DWidget::saveAsImage
void saveAsImage() override
Saves the widget's content as image file.
OpenMS::Plot1DWidget::showCurrentPeaksAsDIA
void showCurrentPeaksAsDIA(const Precursor &pc, const MSExperiment &exp)
Requests to display a full DIA window.
OpenMS::Plot1DWidget::canvas
Plot1DCanvas * canvas() const override
Returns a pointer to canvas object.
Definition
Plot1DWidget.h:51
OpenMS::Plot1DWidget::showCurrentPeaksAs3D
void showCurrentPeaksAs3D()
Requests to display the whole spectrum in 3D view.
OpenMS::Plot1DWidget::showGoToDialog
void showGoToDialog() override
OpenMS::Plot1DWidget::renderForImage
virtual void renderForImage(QPainter &painter)
OpenMS::Plot1DWidget::hideAxes
void hideAxes() override
Hides x-axis and y-axis.
OpenMS::Plot1DWidget::showLegend
void showLegend(bool show) override
Shows/hides axis labels.
OpenMS::Plot1DWidget::resetAlignment
void resetAlignment()
Resets the alignment.
OpenMS::PlotWidget
Base class for spectrum widgets.
Definition
PlotWidget.h:57
QWidget
OpenMS
Definition
Annotation1DCaret.h:23
OpenMS::DimMapper
Definition
Annotation1DItem.h:22
Precursor
OpenMS
VISUAL
Plot1DWidget.h
Generated by
1.9.8