Canvas for visualization of one or several spectra. More...
#include <OpenMS/VISUAL/Spectrum1DCanvas.h>
Public Slots | |
void | activateLayer (Size layer_index) |
void | removeLayer (Size layer_index) |
virtual void | updateLayer (Size i) |
void | setVisibleArea (DRange< 2 > range) |
Sets the visible area. More... | |
virtual void | horizontalScrollBarChange (int value) |
Public Slots inherited from SpectrumCanvas | |
void | changeVisibility (Size i, bool b) |
change the visibility of a layer More... | |
void | changeLayerFilterState (Size i, bool b) |
change if the defined data filters are used More... | |
void | showGridLines (bool show) |
Whether or not to show grid lines. More... | |
void | resetZoom (bool repaint=true) |
Zooms fully out and resets the zoom stack. More... | |
void | setVisibleArea (AreaType area) |
Sets the visible area. More... | |
virtual void | horizontalScrollBarChange (int value) |
Notifies the canvas that the horizontal scrollbar has been moved. More... | |
virtual void | verticalScrollBarChange (int value) |
Notifies the canvas that the vertical scrollbar has been moved. More... | |
void | setAdditionalContextMenu (QMenu *menu) |
Sets the additional context menu. If not 0, this menu is added to the context menu of the canvas. More... | |
void | getVisiblePeakData (ExperimentType &map) const |
Fills the handed over map with the visible peaks of the current layer. More... | |
void | getVisibleFeatureData (FeatureMapType &map) const |
Fills the handed over map with the visible features of the current layer. More... | |
void | getVisibleConsensusData (ConsensusMapType &map) const |
Fills the handed over map with the visible consensus features of the current layer. More... | |
void | getVisibleIdentifications (std::vector< PeptideIdentification > &peptides) const |
Fills the handed over peptides with the visible peptide identifications of the current layer. More... | |
virtual void | updateLayer (Size i)=0 |
Updates layer i when the data in the corresponding file changes. More... | |
Signals | |
void | showCurrentPeaksAs2D () |
Requests to display all spectra in 2D plot. More... | |
void | showCurrentPeaksAs3D () |
Requests to display all spectra in 3D plot. More... | |
Signals inherited from SpectrumCanvas | |
void | layerModficationChange (Size layer, bool modified) |
Signal emitted whenever the modification status of a layer changes (editing and storing) More... | |
void | layerActivated (QWidget *w) |
Signal emitted whenever a new layer is activated within the current window. More... | |
void | layerZoomChanged (QWidget *w) |
Signal emitted whenever the zoom changed. More... | |
void | visibleAreaChanged (DRange< 2 > area) |
Change of the visible area. 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 | sendStatusMessage (std::string message, OpenMS::UInt time) |
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 | recalculateAxes () |
Forces recalculation of axis ticks in the connected widget. More... | |
void | updateVScrollbar (float, float, float, float) |
Triggers the update of the vertical scrollbar. More... | |
void | updateHScrollbar (float, float, float, float) |
Triggers the update of the horizontal scrollbar. More... | |
void | changeLegendVisibility () |
Toggle axis legend visibility change. More... | |
void | actionModeChange () |
Emitted when the action mode changes. More... | |
void | preferencesChange () |
Emitted when the layer preferences have changed. More... | |
Public Member Functions | |
Spectrum1DCanvas (const Param &preferences, QWidget *parent=0) | |
Default constructor. More... | |
virtual | ~Spectrum1DCanvas () |
Destructor. More... | |
DrawModes | getDrawMode () const |
Returns the draw mode of the current layer. More... | |
void | setDrawMode (DrawModes mode) |
Sets draw mode of the current layer. More... | |
virtual void | showCurrentLayerPreferences () |
Shows the preferences dialog of the active layer. More... | |
virtual void | saveCurrentLayer (bool visible) |
Saves the current layer data. More... | |
bool | flippedLayersExist () |
Returns whether flipped layers exist or not. More... | |
void | flipLayer (Size index) |
Flips the layer with index up/downwards. More... | |
bool | mirrorModeActive () |
Returns whether this widget is currently in mirror mode. More... | |
void | setMirrorModeActive (bool b) |
Sets whether this widget is currently in mirror mode. More... | |
void | dataToWidget (const PeakType &peak, QPoint &point, bool flipped=false, bool percentage=true) |
For convenience - calls dataToWidget. More... | |
void | dataToWidget (double x, double y, QPoint &point, bool flipped=false, bool percentage=false) |
Calls SpectrumCanvas::dataToWidget_(), takes mirror mode into account. More... | |
PointType | widgetToData (const QPoint &pos, bool percentage=false) |
For convenience - calls widgetToData. More... | |
PointType | widgetToData (double x, double y, bool percentage=false) |
Calls SpectrumCanvas::widgetToData_(), takes mirror mode into account. More... | |
void | setTextBox (const QString &html) |
Display a static text box on the top right. More... | |
Annotation1DItem * | addPeakAnnotation (const PeakIndex &peak_index, const QString &text, const QColor &color) |
—– Annotations More... | |
void | drawAnnotations (Size layer_index, QPainter &painter) |
Draws all annotation items of layer_index on painter . More... | |
void | performAlignment (Size layer_index_1, Size layer_index_2, const Param ¶m) |
—– Alignment More... | |
void | resetAlignment () |
Resets alignment_. More... | |
void | drawAlignment (QPainter &painter) |
Draws the alignment on painter . More... | |
Size | getAlignmentSize () |
Returns the number of aligned pairs of peaks. More... | |
double | getAlignmentScore () |
Returns the score of the alignment. More... | |
std::vector< std::pair< Size, Size > > | getAlignedPeaksIndices () |
Returns aligned_peaks_indices_. More... | |
void | activateSpectrum (Size index, bool repaint=true) |
Sets current spectrum index of current layer to index . More... | |
void | setSwappedAxis (bool swapped) |
is the widget shown vertically? (for projections) More... | |
void | setCurrentLayerPeakPenStyle (Qt::PenStyle ps) |
Set's the Qt PenStyle of the active layer. More... | |
void | paint (QPainter *paint_device, QPaintEvent *e) |
Actual painting takes place here. More... | |
Public Member Functions inherited from SpectrumCanvas | |
SpectrumCanvas (const Param &preferences, QWidget *parent=0) | |
Default constructor. More... | |
virtual | ~SpectrumCanvas () |
Destructor. More... | |
void | setSpectrumWidget (SpectrumWidget *widget) |
Sets the spectrum widget. More... | |
SpectrumWidget * | getSpectrumWidget () const |
Returns the spectrum widget. More... | |
Int | getActionMode () const |
Returns the action mode. More... | |
IntensityModes | getIntensityMode () const |
Returns the intensity mode. More... | |
void | setIntensityMode (IntensityModes mod) |
Sets the intensity mode. More... | |
bool | gridLinesShown () const |
Returns if the grid is currently shown. More... | |
const LayerData & | getLayer (Size index) const |
returns the layer data with index index More... | |
const LayerData & | getCurrentLayer () const |
returns the layer data of the active layer More... | |
Size | getCurrentLayerIndex () const |
returns the index of the active layer More... | |
LayerData & | getCurrentLayer () |
returns the layer data of the active layer More... | |
bool | getLayerFlag (LayerData::Flags f) const |
returns a layer flag of the current layer More... | |
void | setLayerFlag (LayerData::Flags f, bool value) |
sets a layer flag of the current layer More... | |
bool | getLayerFlag (Size layer, LayerData::Flags f) const |
returns a layer flag of the layer layer More... | |
void | setLayerFlag (Size layer, LayerData::Flags f, bool value) |
sets a layer flag of the layer layer More... | |
void | setLabel (LayerData::LabelType label) |
const AreaType & | getVisibleArea () const |
Returns the currently visible area. More... | |
virtual void | setFilters (const DataFilters &filters) |
Sets the filters applied to the data before drawing (for the current layer) More... | |
bool | isMzToXAxis () |
Returns the mapping of m/z to axes. More... | |
void | mzToXAxis (bool mz_to_x_axis) |
Sets the mapping of m/z to axes. More... | |
bool | addLayer (std::vector< PeptideIdentification > &peptides, const String &filename="") |
Add an identification data layer. More... | |
float | getCurrentMinIntensity () const |
Returns the minimum intensity of the active layer. More... | |
float | getCurrentMaxIntensity () const |
Returns the maximum intensity of the active layer. More... | |
float | getMinIntensity (Size index) const |
Returns the minimum intensity of the layer with index index . More... | |
float | getMaxIntensity (Size index) const |
Returns the maximum intensity of the layer with index index . More... | |
void | setLayerName (Size i, const String &name) |
Sets the name of layer i . More... | |
String | getLayerName (Size i) |
Gets the name of layer i . More... | |
void | setCurrentLayerParameters (const Param ¶m) |
Sets the parameters of the current layer. More... | |
const DRange< 3 > & | getDataRange () |
Returns the area which encloses all data points. More... | |
double | getSnapFactor () |
Returns the first intensity scaling factor for 'snap to maximum intensity mode'. More... | |
double | getPercentageFactor () |
Returns the percentage factor. More... | |
virtual void | showMetaData (bool modifiable=false, Int index=-1) |
Shows a dialog with the meta data. More... | |
Size | getLayerCount () const |
Returns the number of layers. More... | |
Size | activeLayerIndex () const |
Returns the index of the active layer. More... | |
virtual void | activateLayer (Size layer_index)=0 |
change the active layer (the one that is used for selecting and so on) More... | |
virtual void | removeLayer (Size layer_index)=0 |
removes the layer with index layer_index More... | |
bool | addLayer (ExperimentSharedPtrType map, const String &filename="") |
Add a peak data layer. More... | |
bool | addLayer (FeatureMapSharedPtrType map, const String &filename="") |
Add a feature data layer. More... | |
bool | addLayer (ConsensusMapSharedPtrType map, const String &filename="") |
Add a consensus feature data layer. More... | |
Public Member Functions inherited from DefaultParamHandler | |
DefaultParamHandler (const String &name) | |
Constructor with name that is displayed in error messages. More... | |
DefaultParamHandler (const DefaultParamHandler &rhs) | |
Copy constructor. More... | |
virtual | ~DefaultParamHandler () |
Destructor. More... | |
virtual DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () const |
Non-mutable access to the name. More... | |
void | setName (const String &name) |
Mutable access to the name. More... | |
const std::vector< String > & | getSubsections () const |
Non-mutable access to the registered subsections. More... | |
Protected Slots | |
void | currentLayerParamtersChanged_ () |
Reacts on changed layer parameters. More... | |
Protected Slots inherited from SpectrumCanvas | |
void | updateCursor_ () |
Updates the cursor according to the current action mode. More... | |
Protected Member Functions | |
bool | finishAdding_ () |
Method that is called when a new layer has been added. More... | |
void | drawCoordinates_ (QPainter &painter, const PeakIndex &peak) |
Draws the coordinates (or coordinate deltas) to the widget's upper left corner. More... | |
void | drawDeltas_ (QPainter &painter, const PeakIndex &start, const PeakIndex &end) |
Draws the coordinates (or coordinate deltas) to the widget's upper left corner. More... | |
void | changeVisibleArea_ (double lo, double hi, bool repaint=true, bool add_to_stack=false) |
Changes visible area interval. More... | |
void | drawHighlightedPeak_ (Size layer_index, const PeakIndex &peak, QPainter &painter, bool draw_elongation=false) |
Draws a highlighted peak; if draw_elongation is true, the elongation line is drawn (for measuring) More... | |
void | drawDashedLine_ (const QPoint &from, const QPoint &to, QPainter &painter) |
Draws a dashed line using the highlighted peak color parameter. More... | |
void | updatePercentageFactor_ (Size layer_index) |
Recalculates the current scale factor based on the specified layer (= 1.0 if intensity mode != IM_PERCENTAGE) More... | |
virtual void | changeVisibleArea_ (const AreaType &new_area, bool repaint=true, bool add_to_stack=false) |
Sets the visible area. More... | |
virtual void | recalculateSnapFactor_ () |
Recalculates the intensity scaling factor for 'snap to maximum intensity mode'. More... | |
virtual void | updateScrollbars_ () |
Updates the scroll bars. More... | |
virtual void | intensityModeChange_ () |
This method is called whenever the intensity mode changes. Reimplement if you need to react on such changes. More... | |
PeakIndex | findPeakAtPosition_ (QPoint) |
Find peak next to the given position. More... | |
void | addUserLabelAnnotation_ (const QPoint &screen_position) |
Shows dialog and calls addLabelAnnotation_. More... | |
void | addLabelAnnotation_ (const QPoint &screen_position, QString label_text) |
Adds an annotation item at the given screen position. More... | |
void | addUserPeakAnnotation_ (PeakIndex near_peak) |
Shows dialog and calls addPeakAnnotation_. More... | |
void | ensureAnnotationsWithinDataRange_ () |
Ensure that all annotations are within data range. More... | |
virtual void | zoomForward_ () |
Go forward in zoom history. More... | |
virtual void | zoom_ (int x, int y, bool zoom_in) |
docu in base class More... | |
virtual void | translateLeft_ (Qt::KeyboardModifiers m) |
Translation bound to the 'Left' key. More... | |
virtual void | translateRight_ (Qt::KeyboardModifiers m) |
Translation bound to the 'Right' key. More... | |
virtual void | paintGridLines_ (QPainter &painter) |
Helper function to paint grid lines. More... | |
Reimplemented QT events | |
void | paintEvent (QPaintEvent *e) |
void | mousePressEvent (QMouseEvent *e) |
void | mouseReleaseEvent (QMouseEvent *e) |
void | mouseMoveEvent (QMouseEvent *e) |
void | keyPressEvent (QKeyEvent *e) |
void | contextMenuEvent (QContextMenuEvent *e) |
Protected Member Functions inherited from SpectrumCanvas | |
void | drawText_ (QPainter &painter, QStringList text) |
Draws several lines of text to the upper right corner of the widget. More... | |
double | getIdentificationMZ_ (const Size layer_index, const PeptideIdentification &peptide) const |
Returns the m/z value of an identification depending on the m/z source of the layer (precursor mass/theoretical peptide mass) More... | |
LayerData & | getLayer_ (Size index) |
Returns the layer with index index . More... | |
LayerData & | getCurrentLayer_ () |
Returns the currently active layer. More... | |
ExperimentSharedPtrType | currentPeakData_ () |
Returns the currently active layer (mutable) More... | |
PointType | widgetToData_ (double x, double y) |
Convert widget to chart coordinates. More... | |
PointType | widgetToData_ (const QPoint &pos) |
Calls widgetToData_ with x and y position of pos . More... | |
void | dataToWidget_ (double x, double y, QPoint &point) |
Convert chart to widget coordinates. More... | |
void | recalculateRanges_ (UInt mz_dim, UInt rt_dim, UInt it_dim) |
Recalculates the overall_data_range_. More... | |
virtual void | update_ (const char *caller_name) |
Updates the displayed data. More... | |
void | modificationStatus_ (Size layer_index, bool modified) |
Takes all actions necessary when the modification status of a layer changes (signals etc.) More... | |
void | adjustBuffer_ () |
Changes the size of the paint buffer to the currently required size. More... | |
void | addDataProcessing_ (PeakMap &map, DataProcessing::ProcessingAction action) const |
Data processing setter for peak maps. More... | |
void | resizeEvent (QResizeEvent *e) |
void | wheelEvent (QWheelEvent *e) |
void | keyPressEvent (QKeyEvent *e) |
void | keyReleaseEvent (QKeyEvent *e) |
void | focusOutEvent (QFocusEvent *e) |
void | leaveEvent (QEvent *e) |
void | enterEvent (QEvent *e) |
void | zoomBack_ () |
Go backward in zoom history. More... | |
void | zoomAdd_ (const AreaType &area) |
Add a visible area to the zoom stack. More... | |
void | zoomClear_ () |
Clears the zoom stack and invalidates the current zoom position. After calling this, a valid zoom position has to be added immediately. More... | |
virtual void | translateForward_ () |
Translation bound to the 'Up' key. More... | |
virtual void | translateBackward_ () |
Translation bound to the 'Down' key. More... | |
Protected Member Functions inherited from DefaultParamHandler | |
virtual void | updateMembers_ () |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Protected Attributes | |
std::vector< DrawModes > | draw_modes_ |
Draw modes (for each spectrum) More... | |
std::vector< Qt::PenStyle > | peak_penstyle_ |
Draw style. More... | |
QPoint | measurement_start_point_ |
start point of "ruler" for measure mode More... | |
bool | mirror_mode_ |
Indicates whether this widget is currently in mirror mode. More... | |
bool | moving_annotations_ |
Indicates whether annotation items are just being moved on the canvas. More... | |
bool | show_alignment_ |
Indicates whether an alignment is currently visualized. More... | |
Size | alignment_layer_1_ |
Layer index of the first alignment layer. More... | |
Size | alignment_layer_2_ |
Layer index of the second alignment layer. More... | |
std::vector< std::pair< double, double > > | aligned_peaks_mz_delta_ |
Stores the alignment as MZ values of pairs of aligned peaks in both spectra. More... | |
std::vector< std::pair< Size, Size > > | aligned_peaks_indices_ |
Stores the peak indices of pairs of aligned peaks in both spectra. More... | |
double | alignment_score_ |
Stores the score of the last alignment. More... | |
bool | is_swapped_ |
is this widget showing data with swapped m/z and RT axis? (for drawCoordinates_ only) More... | |
QTextDocument | text_box_content_ |
Protected Attributes inherited from SpectrumCanvas | |
QImage | buffer_ |
Buffer that stores the actual peak information. More... | |
ActionModes | action_mode_ |
Stores the current action mode (Pick, Zoom, Translate) More... | |
IntensityModes | intensity_mode_ |
Stores the used intensity mode function. More... | |
std::vector< LayerData > | layers_ |
Layer data. More... | |
bool | mz_to_x_axis_ |
Stores the mapping of m/z. More... | |
AreaType | visible_area_ |
Stores the currently visible area. More... | |
DRange< 3 > | overall_data_range_ |
Stores the data range (m/z, RT and intensity) of all layers. More... | |
bool | show_grid_ |
Stores whether or not to show a grid. More... | |
std::vector< AreaType > | zoom_stack_ |
The zoom stack. More... | |
std::vector< AreaType >::iterator | zoom_pos_ |
The current position in the zoom stack. More... | |
bool | update_buffer_ |
Whether to recalculate the data in the buffer when repainting. More... | |
Size | current_layer_ |
Stores the index of the currently active layer. More... | |
SpectrumWidget * | spectrum_widget_ |
Back-pointer to the enclosing spectrum widget. More... | |
QPoint | last_mouse_pos_ |
start position of mouse actions More... | |
double | percentage_factor_ |
Intensity scaling factor for relative scale with multiple layers. More... | |
std::vector< double > | snap_factors_ |
Intensity scaling factor for 'snap to maximum intensity mode'. More... | |
QRubberBand | rubber_band_ |
Rubber band for selected area. More... | |
QMenu * | context_add_ |
External context menu extension. More... | |
bool | show_timing_ |
Flag that determines if timing data is printed to the command line. More... | |
PeakIndex | selected_peak_ |
selected peak More... | |
PeakIndex | measurement_start_ |
start peak of measuring mode More... | |
Protected Attributes inherited from DefaultParamHandler | |
Param | param_ |
Container for current parameters. More... | |
Param | defaults_ |
Container for default parameters. This member should be filled in the constructor of derived classes! More... | |
std::vector< String > | subsections_ |
Container for registered subsections. This member should be filled in the constructor of derived classes! More... | |
String | error_name_ |
Name that is displayed in error messages during the parameter checking. More... | |
bool | check_defaults_ |
If this member is set to false no checking if parameters in done;. More... | |
bool | warn_empty_defaults_ |
If this member is set to false no warning is emitted when defaults are empty;. More... | |
Canvas for visualization of one or several spectra.
The example image shows Spectrum1DCanvas displaying a raw data layer and a peak data layer.
Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
default_path | string | . | Default path for loading/storing data. | |
highlighted_peak_color | string | @#ff0000 | Highlighted peak color. | |
icon_color | string | @#000000 | Peak icon color. | |
peak_color | string | @#000000 | Peak color. | |
annotation_color | string | @#000055 | Annotation color. | |
background_color | string | @#ffffff | Background color. | |
show_legend | string | false | Annotate each layer with its name on the canvas. |
enum DrawModes |
enum LabelMode |
Spectrum1DCanvas | ( | const Param & | preferences, |
QWidget * | parent = 0 |
||
) |
Default constructor.
|
virtual |
Destructor.
|
slot |
void activateSpectrum | ( | Size | index, |
bool | repaint = true |
||
) |
Sets current spectrum index of current layer to index
.
Referenced by TOPPViewBase::addData().
|
protected |
Adds an annotation item at the given screen position.
Annotation1DItem* addPeakAnnotation | ( | const PeakIndex & | peak_index, |
const QString & | text, | ||
const QColor & | color | ||
) |
—– Annotations
Add an annotation item for the given peak
|
protected |
Shows dialog and calls addLabelAnnotation_.
|
protected |
Shows dialog and calls addPeakAnnotation_.
|
protected |
Changes visible area interval.
This method is for convenience only. It calls changeVisibleArea_(const AreaType&, bool, bool) .
|
protectedvirtual |
Sets the visible area.
Changes the visible area, adjusts the zoom stack and notifies interested clients about the change. If parts of the area are outside of the data area, the new area will be adjusted.
new_area | The new visible area. |
repaint | if repainting of the widget should be triggered |
add_to_stack | If the new area is to add to the zoom_stack_ |
Reimplemented from SpectrumCanvas.
|
protected |
|
protectedslot |
Reacts on changed layer parameters.
void dataToWidget | ( | const PeakType & | peak, |
QPoint & | point, | ||
bool | flipped = false , |
||
bool | percentage = true |
||
) |
For convenience - calls dataToWidget.
void dataToWidget | ( | double | x, |
double | y, | ||
QPoint & | point, | ||
bool | flipped = false , |
||
bool | percentage = false |
||
) |
Calls SpectrumCanvas::dataToWidget_(), takes mirror mode into account.
void drawAlignment | ( | QPainter & | painter | ) |
Draws the alignment on painter
.
void drawAnnotations | ( | Size | layer_index, |
QPainter & | painter | ||
) |
Draws all annotation items of layer_index
on painter
.
|
protected |
Draws the coordinates (or coordinate deltas) to the widget's upper left corner.
|
protected |
Draws a dashed line using the highlighted peak color parameter.
Draws the coordinates (or coordinate deltas) to the widget's upper left corner.
|
protected |
Draws a highlighted peak; if draw_elongation is true, the elongation line is drawn (for measuring)
|
protected |
Ensure that all annotations are within data range.
|
protected |
Find peak next to the given position.
|
protectedvirtual |
Method that is called when a new layer has been added.
Implements SpectrumCanvas.
void flipLayer | ( | Size | index | ) |
Flips the layer with index
up/downwards.
Referenced by TOPPViewBase::layerContextMenu().
bool flippedLayersExist | ( | ) |
Returns whether flipped layers exist or not.
Referenced by TOPPViewBase::layerContextMenu().
double getAlignmentScore | ( | ) |
Returns the score of the alignment.
Referenced by TOPPViewBase::showSpectrumAlignmentDialog().
Size getAlignmentSize | ( | ) |
Returns the number of aligned pairs of peaks.
Referenced by TOPPViewBase::showSpectrumAlignmentDialog().
DrawModes getDrawMode | ( | ) | const |
Returns the draw mode of the current layer.
Referenced by TOPPViewBase::updateToolBar().
|
virtualslot |
|
protectedvirtual |
This method is called whenever the intensity mode changes. Reimplement if you need to react on such changes.
Reimplemented from SpectrumCanvas.
|
protected |
bool mirrorModeActive | ( | ) |
Returns whether this widget is currently in mirror mode.
Referenced by TOPPViewBase::showSpectrumAlignmentDialog(), and TOPPViewBase::updateMenu().
|
protected |
|
protected |
|
protected |
void paint | ( | QPainter * | paint_device, |
QPaintEvent * | e | ||
) |
Actual painting takes place here.
|
protected |
|
protectedvirtual |
Helper function to paint grid lines.
Reimplemented from SpectrumCanvas.
—– Alignment
Performs an alignment of the layers with layer_index_1
and layer_index_2
|
protectedvirtual |
Recalculates the intensity scaling factor for 'snap to maximum intensity mode'.
Reimplemented from SpectrumCanvas.
|
slot |
void resetAlignment | ( | ) |
Resets alignment_.
|
virtual |
Saves the current layer data.
visible | If true, only the visible data is stored. Otherwise the whole data is stored. |
Implements SpectrumCanvas.
void setCurrentLayerPeakPenStyle | ( | Qt::PenStyle | ps | ) |
Set's the Qt PenStyle of the active layer.
void setDrawMode | ( | DrawModes | mode | ) |
Sets draw mode of the current layer.
Referenced by TOPPViewBase::setDrawMode1D().
void setMirrorModeActive | ( | bool | b | ) |
Sets whether this widget is currently in mirror mode.
Referenced by TOPPViewBase::layerContextMenu().
void setSwappedAxis | ( | bool | swapped | ) |
is the widget shown vertically? (for projections)
void setTextBox | ( | const QString & | html | ) |
Display a static text box on the top right.
|
slot |
Sets the visible area.
Sets the visible area to a new value. Note that it does not emit visibleAreaChanged()
range | the new visible area |
Referenced by IDEvaluationBase::setVisibleArea().
|
virtual |
Shows the preferences dialog of the active layer.
Implements SpectrumCanvas.
|
signal |
Requests to display all spectra in 2D plot.
|
signal |
Requests to display all spectra in 3D plot.
|
protectedvirtual |
Translation bound to the 'Left' key.
Reimplemented from SpectrumCanvas.
|
protectedvirtual |
Translation bound to the 'Right' key.
Reimplemented from SpectrumCanvas.
|
virtualslot |
|
protected |
Recalculates the current scale factor based on the specified layer (= 1.0 if intensity mode != IM_PERCENTAGE)
|
protectedvirtual |
Updates the scroll bars.
Updates the scrollbars after a change of the visible area.
Reimplemented from SpectrumCanvas.
PointType widgetToData | ( | const QPoint & | pos, |
bool | percentage = false |
||
) |
For convenience - calls widgetToData.
Calls SpectrumCanvas::widgetToData_(), takes mirror mode into account.
|
protectedvirtual |
docu in base class
Reimplemented from SpectrumCanvas.
|
protectedvirtual |
Go forward in zoom history.
Reimplemented from SpectrumCanvas.
Stores the peak indices of pairs of aligned peaks in both spectra.
Stores the alignment as MZ values of pairs of aligned peaks in both spectra.
|
protected |
Layer index of the first alignment layer.
|
protected |
Layer index of the second alignment layer.
|
protected |
Stores the score of the last alignment.
|
protected |
Draw modes (for each spectrum)
|
protected |
is this widget showing data with swapped m/z and RT axis? (for drawCoordinates_ only)
|
protected |
start point of "ruler" for measure mode
|
protected |
Indicates whether this widget is currently in mirror mode.
|
protected |
Indicates whether annotation items are just being moved on the canvas.
|
protected |
Draw style.
|
protected |
Indicates whether an alignment is currently visualized.
|
protected |
OpenMS / TOPP release 2.3.0 | Documentation generated on Tue Jan 9 2018 18:22:12 using doxygen 1.8.13 |