|
OpenMS
2.6.0
|
Go to the documentation of this file.
38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
43 #include <QTextDocument>
83 constexpr
static double TOP_MARGIN{1.09};
98 DrawModes getDrawMode()
const;
101 void setDrawMode(DrawModes mode);
104 void showCurrentLayerPreferences()
override;
107 void saveCurrentLayer(
bool visible)
override;
110 bool flippedLayersExist();
113 void flipLayer(
Size index);
116 bool mirrorModeActive();
119 void setMirrorModeActive(
bool b);
122 void dataToWidget(
const PeakType& peak, QPoint& point,
bool flipped =
false,
bool percentage =
true);
125 void dataToWidget(
double x,
double y, QPoint& point,
bool flipped =
false,
bool percentage =
false);
128 PointType widgetToData(
const QPoint& pos,
bool percentage =
false);
131 PointType widgetToData(
double x,
double y,
bool percentage =
false);
134 void setTextBox(
const QString& html);
142 void drawAnnotations(
Size layer_index, QPainter& painter);
147 void performAlignment(
Size layer_index_1,
Size layer_index_2,
const Param& param);
150 void resetAlignment();
153 void drawAlignment(QPainter& painter);
156 Size getAlignmentSize();
159 double getAlignmentScore();
162 std::vector<std::pair<Size, Size> > getAlignedPeaksIndices();
165 void activateSpectrum(
Size index,
bool repaint =
true);
168 void setSwappedAxis(
bool swapped);
171 void setCurrentLayerPeakPenStyle(Qt::PenStyle ps);
174 void paint(QPainter* paint_device, QPaintEvent* e);
177 void setDrawInterestingMZs(
bool enable);
180 bool isDrawInterestingMZs()
const;
183 void setIonLadderVisible(
bool show);
186 bool isIonLadderVisible()
const;
190 void showCurrentPeaksAs2D();
193 void showCurrentPeaksAs3D();
196 void showCurrentPeaksAsIonMobility();
199 void showCurrentPeaksAsDIA();
203 void activateLayer(
Size layer_index)
override;
205 void removeLayer(
Size layer_index)
override;
207 void updateLayer(
Size i)
override;
217 void horizontalScrollBarChange(
int value)
override;
222 void currentLayerParamtersChanged_();
226 bool finishAdding_()
override;
229 void drawCoordinates_(QPainter& painter,
const PeakIndex& peak);
234 void drawMZAtInterestingPeaks_(
Size layer_index, QPainter& painter);
241 void changeVisibleArea_(
double lo,
double hi,
bool repaint =
true,
bool add_to_stack =
false);
244 void drawHighlightedPeak_(
Size layer_index,
const PeakIndex& peak, QPainter& painter,
bool draw_elongation =
false);
247 void drawDashedLine_(
const QPoint& from,
const QPoint& to, QPainter& painter);
250 void updatePercentageFactor_(
Size layer_index);
262 void changeVisibleArea_(
const AreaType& new_area,
bool repaint =
true,
bool add_to_stack =
false)
override;
264 void recalculateSnapFactor_()
override;
266 void updateScrollbars_()
override;
268 void intensityModeChange_()
override;
306 void addUserLabelAnnotation_(
const QPoint& screen_position);
308 void addLabelAnnotation_(
const QPoint& screen_position, QString label_text);
310 void addUserPeakAnnotation_(
PeakIndex near_peak);
313 void ensureAnnotationsWithinDataRange_();
319 void paintEvent(QPaintEvent* e)
override;
320 void mousePressEvent(QMouseEvent* e)
override;
321 void mouseReleaseEvent(QMouseEvent* e)
override;
322 void mouseMoveEvent(QMouseEvent* e)
override;
323 void keyPressEvent(QKeyEvent* e)
override;
324 void contextMenuEvent(QContextMenuEvent* e)
override;
328 void zoomForward_()
override;
330 void zoom_(
int x,
int y,
bool zoom_in)
override;
332 void translateLeft_(Qt::KeyboardModifiers m)
override;
334 void translateRight_(Qt::KeyboardModifiers m)
override;
336 void paintGridLines_(QPainter& painter)
override;
bool ion_ladder_visible_
whether the ion ladder is displayed on the top right corner in ID view
Definition: Spectrum1DCanvas.h:298
std::vector< Qt::PenStyle > peak_penstyle_
Draw style.
Definition: Spectrum1DCanvas.h:273
bool moving_annotations_
Indicates whether annotation items are just being moved on the canvas.
Definition: Spectrum1DCanvas.h:281
std::vector< DrawModes > draw_modes_
Draw modes (for each spectrum)
Definition: Spectrum1DCanvas.h:271
LabelMode
Label modes (percentage or absolute) of x axis and y axis.
Definition: Spectrum1DCanvas.h:74
A 2-dimensional raw data point or peak.
Definition: Peak2D.h:54
double alignment_score_
Stores the score of the last alignment.
Definition: Spectrum1DCanvas.h:294
Definition: Spectrum1DCanvas.h:77
Canvas for visualization of one or several spectra.
Definition: Spectrum1DCanvas.h:67
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Size alignment_layer_1_
Layer index of the first alignment layer.
Definition: Spectrum1DCanvas.h:286
draw data as peak
Definition: Spectrum1DCanvas.h:93
QTextDocument text_box_content_
Definition: Spectrum1DCanvas.h:315
QPoint measurement_start_point_
start point of "ruler" for measure mode
Definition: Spectrum1DCanvas.h:276
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Index of a peak or feature.
Definition: PeakIndex.h:50
bool show_alignment_
Indicates whether an alignment is currently visualized.
Definition: Spectrum1DCanvas.h:284
Definition: Spectrum1DCanvas.h:76
An abstract class acting as an interface for the different 1D annotation items.
Definition: Annotation1DItem.h:59
Size alignment_layer_2_
Layer index of the second alignment layer.
Definition: Spectrum1DCanvas.h:288
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:290
DrawModes
Enumerate all available paint styles.
Definition: Spectrum1DCanvas.h:91
std::vector< std::pair< Size, Size > > aligned_peaks_indices_
Stores the peak indices of pairs of aligned peaks in both spectra.
Definition: Spectrum1DCanvas.h:292
Management and storage of parameters / INI files.
Definition: Param.h:73
Base class for visualization canvas classes.
Definition: SpectrumCanvas.h:98
Definition: Spectrum1DCanvas.h:78
bool draw_interesting_MZs_
annotate interesting peaks with m/z's
Definition: Spectrum1DCanvas.h:300
bool is_swapped_
is this widget showing data with swapped m/z and RT axis? (for drawCoordinates_ only)
Definition: Spectrum1DCanvas.h:296
bool mirror_mode_
Indicates whether this widget is currently in mirror mode.
Definition: Spectrum1DCanvas.h:278