38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h> 45 #include <QTextDocument> 86 constexpr
static double TOP_MARGIN{1.09};
103 bool addChromLayer(ExperimentSharedPtrType chrom_exp_sptr,
104 ODExperimentSharedPtrType ondisc_sptr,
105 OSWDataSharedPtrType chrom_annotation,
109 const bool multiple_select);
120 DrawModes getDrawMode()
const;
123 void setDrawMode(DrawModes mode);
126 void showCurrentLayerPreferences()
override;
129 void saveCurrentLayer(
bool visible)
override;
132 bool flippedLayersExist();
135 void flipLayer(
Size index);
138 bool mirrorModeActive()
const;
141 void setMirrorModeActive(
bool b);
144 void dataToWidget(
const PeakType& peak, QPoint& point,
bool flipped =
false,
bool percentage =
true);
147 void dataToWidget(
double x,
double y, QPoint& point,
bool flipped =
false,
bool percentage =
false);
150 PointType widgetToData(
const QPoint& pos,
bool percentage =
false);
153 PointType widgetToData(
double x,
double y,
bool percentage =
false);
156 void setTextBox(
const QString& html);
165 void performAlignment(
Size layer_index_1,
Size layer_index_2,
const Param& param);
168 void resetAlignment();
171 Size getAlignmentSize();
174 double getAlignmentScore()
const;
177 std::vector<std::pair<Size, Size> > getAlignedPeaksIndices();
180 void activateSpectrum(
Size index,
bool repaint =
true);
183 void setSwappedAxis(
bool swapped);
186 void setCurrentLayerPeakPenStyle(Qt::PenStyle ps);
189 void paint(QPainter* paint_device, QPaintEvent* e);
192 void setDrawInterestingMZs(
bool enable);
195 bool isDrawInterestingMZs()
const;
198 void setIonLadderVisible(
bool show);
201 bool isIonLadderVisible()
const;
205 void showCurrentPeaksAs2D();
208 void showCurrentPeaksAs3D();
211 void showCurrentPeaksAsIonMobility();
214 void showCurrentPeaksAsDIA();
218 void activateLayer(
Size layer_index)
override;
220 void removeLayer(
Size layer_index)
override;
222 void updateLayer(
Size i)
override;
232 void horizontalScrollBarChange(
int value)
override;
237 void currentLayerParamtersChanged_();
241 bool finishAdding_()
override;
244 void drawCoordinates_(QPainter& painter,
const PeakIndex& peak);
249 void drawAlignment_(QPainter& painter);
256 void changeVisibleArea_(
double lo,
double hi,
bool repaint =
true,
bool add_to_stack =
false);
259 void drawHighlightedPeak_(
Size layer_index,
const PeakIndex& peak, QPainter& painter,
bool draw_elongation =
false);
262 void updatePercentageFactor_(
Size layer_index);
274 void changeVisibleArea_(
const AreaType& new_area,
bool repaint =
true,
bool add_to_stack =
false)
override;
276 void recalculateSnapFactor_()
override;
278 void updateScrollbars_()
override;
280 void intensityModeChange_()
override;
318 void addUserLabelAnnotation_(
const QPoint& screen_position);
320 void addLabelAnnotation_(
const QPoint& screen_position,
const QString& label_text);
322 void addUserPeakAnnotation_(
PeakIndex near_peak);
325 void ensureAnnotationsWithinDataRange_();
331 void paintEvent(QPaintEvent* e)
override;
332 void mousePressEvent(QMouseEvent* e)
override;
333 void mouseReleaseEvent(QMouseEvent* e)
override;
334 void mouseMoveEvent(QMouseEvent* e)
override;
335 void keyPressEvent(QKeyEvent* e)
override;
336 void contextMenuEvent(QContextMenuEvent* e)
override;
340 void zoomForward_()
override;
342 void zoom_(
int x,
int y,
bool zoom_in)
override;
344 void translateLeft_(Qt::KeyboardModifiers m)
override;
346 void translateRight_(Qt::KeyboardModifiers m)
override;
348 void paintGridLines_(QPainter& painter)
override;
An abstract class acting as an interface for the different 1D annotation items.
Definition: Annotation1DItem.h:59
bool is_swapped_
is this widget showing data with swapped m/z and RT axis? (for drawCoordinates_ only) ...
Definition: Plot1DCanvas.h:308
std::vector< Qt::PenStyle > peak_penstyle_
Draw style (for each layer)
Definition: Plot1DCanvas.h:285
Size alignment_layer_1_
Layer index of the first alignment layer.
Definition: Plot1DCanvas.h:298
A more convenient string class.
Definition: String.h:58
double alignment_score_
Stores the score of the last alignment.
Definition: Plot1DCanvas.h:306
std::vector< DrawModes > draw_modes_
Draw modes (for each layer)
Definition: Plot1DCanvas.h:283
A 2-dimensional raw data point or peak.
Definition: Peak2D.h:54
std::vector< std::pair< Size, Size > > aligned_peaks_indices_
Stores the peak indices of pairs of aligned peaks in both spectra.
Definition: Plot1DCanvas.h:304
bool mirror_mode_
Indicates whether this widget is currently in mirror mode.
Definition: Plot1DCanvas.h:290
Canvas for visualization of one or several spectra.
Definition: Plot1DCanvas.h:70
bool draw_interesting_MZs_
annotate interesting peaks with m/z's
Definition: Plot1DCanvas.h:312
Definition: Plot1DCanvas.h:80
QPoint measurement_start_point_
start point of "ruler" for measure mode
Definition: Plot1DCanvas.h:288
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
draw data as peak
Definition: Plot1DCanvas.h:115
Definition: Plot1DCanvas.h:79
LabelMode
Label modes (percentage or absolute) of x axis and y axis.
Definition: Plot1DCanvas.h:77
bool show_alignment_
Indicates whether an alignment is currently visualized.
Definition: Plot1DCanvas.h:296
QTextDocument text_box_content_
Definition: Plot1DCanvas.h:327
Management and storage of parameters / INI files.
Definition: Param.h:69
bool moving_annotations_
Indicates whether annotation items are just being moved on the canvas.
Definition: Plot1DCanvas.h:293
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
std::vector< std::pair< double, double > > aligned_peaks_mz_delta_
Stores the alignment as MZ values of pairs of aligned peaks in both spectra.
Definition: Plot1DCanvas.h:302
bool ion_ladder_visible_
whether the ion ladder is displayed on the top right corner in ID view
Definition: Plot1DCanvas.h:310
Definition: Plot1DCanvas.h:81
Size alignment_layer_2_
Layer index of the second alignment layer.
Definition: Plot1DCanvas.h:300
Base class for visualization canvas classes.
Definition: PlotCanvas.h:135
Painter1D for spectra.
Definition: Painter1DBase.h:72
DrawModes
Enumerate all available paint styles.
Definition: Plot1DCanvas.h:113
Index of a peak or feature.
Definition: PeakIndex.h:50