38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h> 43 #include <QTextDocument> 95 DrawModes getDrawMode()
const;
98 void setDrawMode(DrawModes mode);
101 void showCurrentLayerPreferences()
override;
104 void saveCurrentLayer(
bool visible)
override;
107 bool flippedLayersExist();
110 void flipLayer(
Size index);
113 bool mirrorModeActive();
116 void setMirrorModeActive(
bool b);
119 void dataToWidget(
const PeakType & peak, QPoint & point,
bool flipped =
false,
bool percentage =
true);
122 void dataToWidget(
double x,
double y, QPoint & point,
bool flipped =
false,
bool percentage =
false);
125 PointType widgetToData(
const QPoint & pos,
bool percentage =
false);
128 PointType widgetToData(
double x,
double y,
bool percentage =
false);
131 void setTextBox(
const QString& html);
139 void drawAnnotations(
Size layer_index, QPainter & painter);
144 void performAlignment(
Size layer_index_1,
Size layer_index_2,
const Param & param);
147 void resetAlignment();
150 void drawAlignment(QPainter & painter);
153 Size getAlignmentSize();
156 double getAlignmentScore();
159 std::vector<std::pair<Size, Size> > getAlignedPeaksIndices();
162 void activateSpectrum(
Size index,
bool repaint =
true);
165 void setSwappedAxis(
bool swapped);
168 void setCurrentLayerPeakPenStyle(Qt::PenStyle ps);
171 void paint(QPainter * paint_device, QPaintEvent * e);
174 void setIonLadderVisible(
bool show);
177 bool isIonLadderVisible()
const;
181 void showCurrentPeaksAs2D();
184 void showCurrentPeaksAs3D();
187 void showCurrentPeaksAsIonMobility();
190 void showCurrentPeaksAsDIA();
194 void activateLayer(
Size layer_index)
override;
196 void removeLayer(
Size layer_index)
override;
198 void updateLayer(
Size i)
override;
208 void horizontalScrollBarChange(
int value)
override;
213 void currentLayerParamtersChanged_();
217 bool finishAdding_()
override;
220 void drawCoordinates_(QPainter & painter,
const PeakIndex & peak);
229 void changeVisibleArea_(
double lo,
double hi,
bool repaint =
true,
bool add_to_stack =
false);
232 void drawHighlightedPeak_(
Size layer_index,
const PeakIndex & peak, QPainter & painter,
bool draw_elongation =
false);
235 void drawDashedLine_(
const QPoint & from,
const QPoint & to, QPainter & painter);
238 void updatePercentageFactor_(
Size layer_index);
250 void changeVisibleArea_(
const AreaType & new_area,
bool repaint =
true,
bool add_to_stack =
false)
override;
252 void recalculateSnapFactor_()
override;
254 void updateScrollbars_()
override;
256 void intensityModeChange_()
override;
292 void addUserLabelAnnotation_(
const QPoint & screen_position);
294 void addLabelAnnotation_(
const QPoint & screen_position, QString label_text);
296 void addUserPeakAnnotation_(
PeakIndex near_peak);
299 void ensureAnnotationsWithinDataRange_();
305 void paintEvent(QPaintEvent * e)
override;
306 void mousePressEvent(QMouseEvent * e)
override;
307 void mouseReleaseEvent(QMouseEvent * e)
override;
308 void mouseMoveEvent(QMouseEvent * e)
override;
309 void keyPressEvent(QKeyEvent * e)
override;
310 void contextMenuEvent(QContextMenuEvent * e)
override;
314 void zoomForward_()
override;
316 void zoom_(
int x,
int y,
bool zoom_in)
override;
318 void translateLeft_(Qt::KeyboardModifiers m)
override;
320 void translateRight_(Qt::KeyboardModifiers m)
override;
322 void paintGridLines_(QPainter & painter)
override;
An abstract class acting as an interface for the different 1D annotation items.
Definition: Annotation1DItem.h:59
bool moving_annotations_
Indicates whether annotation items are just being moved on the canvas.
Definition: Spectrum1DCanvas.h:269
QTextDocument text_box_content_
Definition: Spectrum1DCanvas.h:301
std::vector< DrawModes > draw_modes_
Draw modes (for each spectrum)
Definition: Spectrum1DCanvas.h:259
Size alignment_layer_2_
Layer index of the second alignment layer.
Definition: Spectrum1DCanvas.h:276
LabelMode
Label modes (percentage or absolute) of x axis and y axis.
Definition: Spectrum1DCanvas.h:74
DrawModes
Enumerate all available paint styles.
Definition: Spectrum1DCanvas.h:88
A 2-dimensional raw data point or peak.
Definition: Peak2D.h:54
draw data as peak
Definition: Spectrum1DCanvas.h:90
Definition: Spectrum1DCanvas.h:76
Base class for visualization canvas classes.
Definition: SpectrumCanvas.h:100
std::vector< Qt::PenStyle > peak_penstyle_
Draw style.
Definition: Spectrum1DCanvas.h:261
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
bool is_swapped_
is this widget showing data with swapped m/z and RT axis? (for drawCoordinates_ only) ...
Definition: Spectrum1DCanvas.h:284
bool show_alignment_
Indicates whether an alignment is currently visualized.
Definition: Spectrum1DCanvas.h:272
Size alignment_layer_1_
Layer index of the first alignment layer.
Definition: Spectrum1DCanvas.h:274
bool mirror_mode_
Indicates whether this widget is currently in mirror mode.
Definition: Spectrum1DCanvas.h:266
Canvas for visualization of one or several spectra.
Definition: Spectrum1DCanvas.h:67
Management and storage of parameters / INI files.
Definition: Param.h:74
double alignment_score_
Stores the score of the last alignment.
Definition: Spectrum1DCanvas.h:282
Definition: Spectrum1DCanvas.h:78
QPoint measurement_start_point_
start point of "ruler" for measure mode
Definition: Spectrum1DCanvas.h:264
bool ion_ladder_visible_
whether the ion ladder is displayed on the top right corner in ID view
Definition: Spectrum1DCanvas.h:286
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: Spectrum1DCanvas.h:278
std::vector< std::pair< Size, Size > > aligned_peaks_indices_
Stores the peak indices of pairs of aligned peaks in both spectra.
Definition: Spectrum1DCanvas.h:280
Definition: Spectrum1DCanvas.h:77
Index of a peak or feature.
Definition: PeakIndex.h:50