OpenMS
2.5.0
|
Base class for visualization canvas classes. More...
#include <OpenMS/VISUAL/SpectrumCanvas.h>
Protected Member Functions | |
reimplemented QT events | |
void | resizeEvent (QResizeEvent *e) override |
void | wheelEvent (QWheelEvent *e) override |
void | keyPressEvent (QKeyEvent *e) override |
void | keyReleaseEvent (QKeyEvent *e) override |
void | focusOutEvent (QFocusEvent *e) override |
void | leaveEvent (QEvent *e) override |
void | enterEvent (QEvent *e) override |
virtual void | intensityModeChange_ () |
This method is called whenever the intensity mode changes. Reimplement if you need to react on such changes. 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... | |
Zoom stack methods | |
virtual void | zoom_ (int x, int y, bool zoom_in) |
Zooms such that screen point x, y would still point to the same data point. More... | |
void | zoomBack_ () |
Go backward in zoom history. More... | |
virtual void | zoomForward_ () |
Go forward 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... | |
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... | |
Type definitions | |
enum | ActionModes { AM_TRANSLATE, AM_ZOOM, AM_MEASURE } |
Mouse action modes. More... | |
enum | IntensityModes { IM_NONE, IM_PERCENTAGE, IM_SNAP, IM_LOG } |
Display modes of intensity. More... | |
typedef LayerData::ExperimentType | ExperimentType |
Main data type (experiment) More... | |
typedef LayerData::ExperimentSharedPtrType | ExperimentSharedPtrType |
Main managed data type (experiment) More... | |
typedef LayerData::ConstExperimentSharedPtrType | ConstExperimentSharedPtrType |
typedef LayerData::ODExperimentSharedPtrType | ODExperimentSharedPtrType |
typedef LayerData::FeatureMapType | FeatureMapType |
Main data type (features) More... | |
typedef LayerData::FeatureMapSharedPtrType | FeatureMapSharedPtrType |
Main managed data type (features) More... | |
typedef LayerData::ConsensusMapType | ConsensusMapType |
Main data type (consensus features) More... | |
typedef LayerData::ConsensusMapSharedPtrType | ConsensusMapSharedPtrType |
Main managed data type (consensus features) More... | |
typedef ExperimentType::SpectrumType | SpectrumType |
Spectrum type. More... | |
typedef SpectrumType::ConstIterator | SpectrumConstIteratorType |
Spectrum iterator type (iterates over peaks) More... | |
typedef SpectrumType::PeakType | PeakType |
Peak type. More... | |
typedef FeatureMapType::FeatureType | FeatureType |
Feature type. More... | |
typedef DPosition< 2 > | PointType |
Type of the Points. More... | |
typedef DRange< 2 > | AreaType |
Types of Ranges/Areas. More... | |
SpectrumCanvas (const Param &preferences, QWidget *parent=nullptr) | |
Default constructor. More... | |
~SpectrumCanvas () override | |
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... | |
Dataset handling methods | |
| |
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, ODExperimentSharedPtrType od_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... | |
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 | showCurrentLayerPreferences ()=0 |
Shows the preferences dialog of the active layer. More... | |
virtual void | showMetaData (bool modifiable=false, Int index=-1) |
Shows a dialog with the meta data. More... | |
virtual void | saveCurrentLayer (bool visible)=0 |
Saves the current layer data. More... | |
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... | |
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... | |
void | updateCursor_ () |
Updates the cursor according to the current action mode. More... | |
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... | |
virtual bool | finishAdding_ ()=0 |
Method that is called when a new layer has been added. More... | |
LayerData & | getLayer_ (Size index) |
Returns the layer with index index . More... | |
LayerData & | getCurrentLayer_ () |
Returns the currently active layer. More... | |
Translation methods, which are called when cursor buttons are pressed | |
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... | |
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 | translateForward_ () |
Translation bound to the 'Up' key. More... | |
virtual void | translateBackward_ () |
Translation bound to the 'Down' key. More... | |
virtual void | updateScrollbars_ () |
Updates the scroll bars. 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... | |
virtual void | paintGridLines_ (QPainter &painter) |
Helper function to paint grid lines. 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... | |
Additional Inherited Members | |
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 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... | |
Base class for visualization canvas classes.
This class is the base class for the spectrum data views which are used for 1D, 2D and 3D visualization of data. In TOPPView, each SpectrumCanvas is paired with an enclosing SpectrumWidget (see also the getSpectrumWidget() function that provides a back-reference). To provide additional spectrum views, you can derive from this class and you should also create a subclass from SpectrumWidget which encloses your class derived from SpectrumCanvas. A spectrum canvas can display multiple data layers at the same time (see layers_ member variable).
The actual data to be displayed is stored as a vector of LayerData objects which hold the actual data. It also stores information about the commonly used constants such as ActionModes or IntensityModes.
All derived classes should follow these interface conventions:
Measure mode
Main managed data type (consensus features)
Main data type (consensus features)
Main managed data type (experiment)
Main data type (experiment)
Main managed data type (features)
Main data type (features)
Feature type.
typedef SpectrumType::PeakType PeakType |
Peak type.
Spectrum iterator type (iterates over peaks)
Spectrum type.
enum ActionModes |
enum IntensityModes |
SpectrumCanvas | ( | const Param & | preferences, |
QWidget * | parent = nullptr |
||
) |
Default constructor.
|
override |
Destructor.
|
signal |
Emitted when the action mode changes.
|
pure virtual |
change the active layer (the one that is used for selecting and so on)
Referenced by TOPPViewBase::layerSelectionChange().
Size activeLayerIndex | ( | ) | const |
Returns the index of the active layer.
Referenced by TOPPViewBase::showCurrentPeaksAs2D(), TOPPViewBase::showCurrentPeaksAs3D(), TOPPViewBase::showCurrentPeaksAsDIA(), TOPPViewBase::showCurrentPeaksAsIonMobility(), and TOPPViewBase::updateLayerBar().
|
inlineprotected |
Data processing setter for peak maps.
References VersionInfo::getVersion(), DateTime::now(), and MSExperiment::size().
bool addLayer | ( | ConsensusMapSharedPtrType | map, |
const String & | filename = "" |
||
) |
Add a consensus feature data layer.
map | Shared Pointer to input map. It can be performed in constant time and does not double the required memory. |
filename | This absolute filename is used to monitor changes in the file and reload the data |
bool addLayer | ( | ExperimentSharedPtrType | map, |
ODExperimentSharedPtrType | od_map, | ||
const String & | filename = "" |
||
) |
Add a peak data layer.
If chromatograms are present, a chromatogram layer is shown. Otherwise a peak layer is shown. Make sure to remove chromatograms from peak data and vice versa.
map | Shared pointer to input map. It can be performed in constant time and does not double the required memory. |
od_map | Shared pointer to on disk data which potentially caches some data to save memory (the map can be empty, but do not pass nullptr). |
filename | This absolute filename is used to monitor changes in the file and reload the data |
Referenced by TOPPViewBase::addData(), TOPPViewBase::showCurrentPeaksAs2D(), TOPPViewBase::showCurrentPeaksAs3D(), TOPPViewBase::showCurrentPeaksAsDIA(), and TOPPViewBase::showCurrentPeaksAsIonMobility().
bool addLayer | ( | FeatureMapSharedPtrType | map, |
const String & | filename = "" |
||
) |
Add a feature data layer.
map | Shared Pointer to input map. It can be performed in constant time and does not double the required memory. |
filename | This absolute filename is used to monitor changes in the file and reload the data |
bool addLayer | ( | std::vector< PeptideIdentification > & | peptides, |
const String & | filename = "" |
||
) |
Add an identification data layer.
peptides | Input list of peptides, which has to be mutable and will be empty after adding. Swapping is used to insert the data. It can be performed in constant time and does not double the required memory. |
filename | This absolute filename is used to monitor changes in the file and reload the data |
|
protected |
Changes the size of the paint buffer to the currently required size.
|
slot |
change if the defined data filters are used
i | the index of the layer |
b | true if layer is supposed to be visible |
Referenced by TOPPViewBase::layerFilterVisibilityChange().
|
signal |
Toggle axis legend visibility change.
|
slot |
change the visibility of a layer
i | the index of the layer |
b | true if layer is supposed to be visible |
Referenced by TOPPViewBase::layerVisibilityChange().
|
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 true, a complete repaint is forced. |
add_to_stack | If true the new area is to add to the zoom_stack_. |
Reimplemented in Spectrum1DCanvas.
Convert chart to widget coordinates.
Translates chart coordinates to widget coordinates.
x | the chart coordinate x |
y | the chart coordinate y |
point | returned widget coordinates |
References SpectrumCanvas::IM_LOG.
|
protected |
Draws several lines of text to the upper right corner of the widget.
|
overrideprotected |
|
protectedpure virtual |
Method that is called when a new layer has been added.
Implemented in Spectrum1DCanvas, Spectrum2DCanvas, and Spectrum3DCanvas.
|
overrideprotected |
|
inline |
Returns the action mode.
Returns the current action mode of type ActionModes
|
inline |
returns the layer data of the active layer
References OPENMS_PRECONDITION.
|
inline |
returns the layer data of the active layer
References OPENMS_PRECONDITION.
Referenced by TOPPViewBase::addData(), TOPPViewBase::annotateMS1FromMassFingerprinting_(), TOPPViewBase::annotateWithID(), TOPPViewBase::copyLayer(), TOPPViewBase::editMetadata(), TOPPViewBase::enhancedWorkspaceWindowChanged(), TOPPViewBase::filterContextMenu(), TOPPViewBase::filterEdit(), TOPPViewBase::getCurrentLayer(), TOPPViewBase::layerZoomChanged(), TOPPViewBase::loadFiles(), TOPPViewBase::rerunTOPPTool(), TOPPViewBase::runTOPPTool_(), TOPPViewBase::showCurrentPeaksAs2D(), TOPPViewBase::showCurrentPeaksAsDIA(), TOPPViewBase::showCurrentPeaksAsIonMobility(), TOPPViewBase::showTOPPDialog_(), TOPPViewBase::updateFilterBar(), TOPPViewBase::updateToolBar(), and TOPPViewBase::updateViewBar().
|
inlineprotected |
Returns the currently active layer.
|
inline |
returns the index of the active layer
Referenced by TOPPViewBase::showCurrentPeaksAs3D().
|
inline |
Returns the maximum intensity of the active layer.
References LayerData::DT_CHROMATOGRAM, LayerData::DT_FEATURE, and LayerData::DT_PEAK.
|
inline |
Returns the minimum intensity of the active layer.
References LayerData::DT_CHROMATOGRAM, LayerData::DT_FEATURE, and LayerData::DT_PEAK.
const DRange<3>& getDataRange | ( | ) |
Returns the area which encloses all data points.
|
protected |
Returns the m/z value of an identification depending on the m/z source of the layer (precursor mass/theoretical peptide mass)
|
inline |
Returns the intensity mode.
Returns the current intensity mode of type IntensityModes
Referenced by TOPPViewBase::updateToolBar().
returns the layer data with index index
References OPENMS_PRECONDITION.
Referenced by TOPPViewBase::addData(), TOPPViewBase::fileChanged_(), TOPPViewBase::getFilenamesOfOpenFiles_(), TOPPViewBase::layerContextMenu(), TOPPViewBase::layerVisibilityChange(), and TOPPViewBase::updateLayerBar().
Returns the layer with index index
.
References OPENMS_PRECONDITION.
|
inline |
Returns the number of layers.
Referenced by TOPPViewBase::addData(), TOPPViewBase::enhancedWorkspaceWindowChanged(), TOPPViewBase::fileChanged_(), TOPPViewBase::getFilenamesOfOpenFiles_(), TOPPViewBase::showCurrentPeaksAs3D(), TOPPViewBase::updateFilterBar(), TOPPViewBase::updateLayerBar(), and TOPPViewBase::updateToolBar().
|
inline |
returns a layer flag of the current layer
Referenced by TOPPViewBase::changeUnassigned(), and TOPPViewBase::updateToolBar().
|
inline |
returns a layer flag of the layer layer
References OPENMS_PRECONDITION.
Returns the maximum intensity of the layer with index index
.
References LayerData::DT_CHROMATOGRAM, LayerData::DT_FEATURE, and LayerData::DT_PEAK.
Returns the minimum intensity of the layer with index index
.
References LayerData::DT_CHROMATOGRAM, LayerData::DT_FEATURE, and LayerData::DT_PEAK.
double getPercentageFactor | ( | ) |
Returns the percentage factor.
double getSnapFactor | ( | ) |
Returns the first intensity scaling factor for 'snap to maximum intensity mode'.
|
inline |
Returns the spectrum widget.
Returns the enclosing spectrum widget
|
inline |
Returns the currently visible area.
Referenced by TOPPViewBase::layerZoomChanged().
|
slot |
Fills the handed over map
with the visible consensus features of the current layer.
Takes zoom area and data filters into account.
If the current layer is not a consensus feature layer, map
is cleared only.
Referenced by TOPPViewBase::runTOPPTool_().
|
slot |
Fills the handed over map
with the visible features of the current layer.
Takes zoom area and data filters into account.
If the current layer is not a feature layer, map
is cleared only.
Referenced by TOPPViewBase::runTOPPTool_().
|
slot |
Fills the handed over peptides
with the visible peptide identifications of the current layer.
Takes zoom area into account.
If the current layer is not an identification data layer, peptides
is cleared only.
|
slot |
Fills the handed over map
with the visible peaks of the current layer.
Takes zoom area and data filters into account.
If the current layer is not a peak layer, map
is cleared only.
Referenced by TOPPViewBase::runTOPPTool_().
|
inline |
Returns if the grid is currently shown.
true
if the grid is visible, false
otherwise
|
virtualslot |
Notifies the canvas that the horizontal scrollbar has been moved.
Reimplement this slot to react on scrollbar events.
|
protectedvirtual |
This method is called whenever the intensity mode changes. Reimplement if you need to react on such changes.
Reimplemented in Spectrum2DCanvas, and Spectrum1DCanvas.
|
inline |
Returns the mapping of m/z to axes.
|
overrideprotected |
|
overrideprotected |
|
signal |
Signal emitted whenever a new layer is activated within the current window.
|
signal |
Signal emitted whenever the modification status of a layer changes (editing and storing)
|
signal |
Signal emitted whenever the zoom changed.
|
overrideprotected |
|
protected |
Takes all actions necessary when the modification status of a layer changes (signals etc.)
void mzToXAxis | ( | bool | mz_to_x_axis | ) |
Sets the mapping of m/z to axes.
|
protectedvirtual |
Helper function to paint grid lines.
Reimplemented in Spectrum1DCanvas.
|
signal |
Emitted when the layer preferences have changed.
|
signal |
Forces recalculation of axis ticks in the connected widget.
Recalculates the overall_data_range_.
A small margin is added to each side of the range in order to display all data.
mz_dim | Int of m/z in overall_data_range_ |
rt_dim | Int of RT in overall_data_range_ |
it_dim | Int of intensity in overall_data_range_ |
|
protectedvirtual |
Recalculates the intensity scaling factor for 'snap to maximum intensity mode'.
Reimplemented in Spectrum2DCanvas, and Spectrum1DCanvas.
|
pure virtual |
removes the layer with index layer_index
Referenced by TOPPViewBase::layerContextMenu().
|
slot |
Zooms fully out and resets the zoom stack.
Sets the visible area to the initial value, such that all data is shown.
repaint | If true a repaint is forced. Otherwise only the new area is set. |
Referenced by TOPPViewBase::resetZoom().
|
overrideprotected |
|
pure virtual |
Saves the current layer data.
visible | If true, only the visible data is stored. Otherwise the whole data is stored. |
Implemented in Spectrum1DCanvas, Spectrum3DCanvas, and Spectrum2DCanvas.
Referenced by TOPPViewBase::saveLayerAll(), and TOPPViewBase::saveLayerVisible().
Emitted when the cursor position changes (for displaying e.g. in status bar)
|
signal |
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.
|
slot |
Sets the additional context menu. If not 0, this menu is added to the context menu of the canvas.
|
inline |
Sets the parameters of the current layer.
Referenced by TOPPViewBase::loadFiles().
|
virtual |
Sets the filters applied to the data before drawing (for the current layer)
Referenced by TOPPViewBase::addData(), TOPPViewBase::filterContextMenu(), and TOPPViewBase::filterEdit().
|
inline |
Sets the intensity mode.
Sets the intensity mode
mod | the new intensity mode |
|
inline |
References OPENMS_PRECONDITION.
Referenced by TOPPViewBase::changeLabel().
|
inline |
sets a layer flag of the current layer
Referenced by TOPPViewBase::changeUnassigned().
|
inline |
sets a layer flag of the layer layer
References OPENMS_PRECONDITION.
Sets the name
of layer i
.
Referenced by TOPPViewBase::layerContextMenu(), TOPPViewBase::showCurrentPeaksAs2D(), TOPPViewBase::showCurrentPeaksAs3D(), TOPPViewBase::showCurrentPeaksAsDIA(), and TOPPViewBase::showCurrentPeaksAsIonMobility().
|
inline |
Sets the spectrum widget.
Sets the enclosing spectrum widget. Call this from your SpectrumWidget derived class.
widget | the spectrum widget |
|
slot |
Sets the visible area.
Sets the visible area to a new value. Note that it does not emit visibleAreaChanged()
area | the new visible area |
Referenced by TOPPViewBase::layerZoomChanged(), and TOPPViewBase::showCurrentPeaksAs3D().
|
pure virtual |
Shows the preferences dialog of the active layer.
Implemented in Spectrum1DCanvas, Spectrum3DCanvas, and Spectrum2DCanvas.
Referenced by TOPPViewBase::layerContextMenu(), TOPPViewBase::layerEdit(), and TOPPViewBase::showPreferences().
|
slot |
Whether or not to show grid lines.
Sets whether grid lines are shown or not.
show | Boolean variable deciding whether or not to show the grid lines. |
Referenced by TOPPViewBase::toggleGridLines().
|
virtual |
Shows a dialog with the meta data.
modifiable | indicates if the data can be modified. |
index | If given, the meta data of the corresponding element (spectrum, feature, consensus feature) is shown instead of the layer meta data. |
Referenced by TOPPViewBase::editMetadata(), and TOPPViewBase::showSpectrumMetaData().
|
protectedvirtual |
Translation bound to the 'Down' key.
Reimplemented in Spectrum2DCanvas, and Spectrum3DCanvas.
|
protectedvirtual |
Translation bound to the 'Up' key.
Reimplemented in Spectrum2DCanvas, and Spectrum3DCanvas.
|
protectedvirtual |
Translation bound to the 'Left' key.
Reimplemented in Spectrum2DCanvas, Spectrum1DCanvas, and Spectrum3DCanvas.
|
protectedvirtual |
Translation bound to the 'Right' key.
Reimplemented in Spectrum2DCanvas, Spectrum1DCanvas, and Spectrum3DCanvas.
|
protectedvirtual |
Updates the displayed data.
The default implementation calls QWidget::update().
This method is reimplemented in the 3D view to update the OpenGL widget.
caller_name | Name of the calling function (use OPENMS_PRETTY_FUNCTION). |
Reimplemented in Spectrum3DCanvas.
|
protectedslot |
Updates the cursor according to the current action mode.
Triggers the update of the horizontal scrollbar.
|
pure virtualslot |
Updates layer i
when the data in the corresponding file changes.
Referenced by TOPPViewBase::fileChanged_().
|
protectedvirtual |
Updates the scroll bars.
Updates the scrollbars after a change of the visible area.
Reimplemented in Spectrum1DCanvas, and Spectrum2DCanvas.
Triggers the update of the vertical scrollbar.
|
virtualslot |
Notifies the canvas that the vertical scrollbar has been moved.
Reimplement this slot to react on scrollbar events.
|
signal |
Change of the visible area.
Signal emitted whenever the visible area changes.
area | The new visible area. |
|
overrideprotected |
|
inlineprotected |
Calls widgetToData_ with x and y position of pos
.
Convert widget to chart coordinates.
Translates widget coordinates to chart coordinates.
x | the widget coordinate x |
y | the widget coordinate y |
Zooms such that screen point x, y would still point to the same data point.
Reimplemented in Spectrum1DCanvas.
|
protected |
Add a visible area to the zoom stack.
|
protected |
Go backward in zoom history.
|
protected |
Clears the zoom stack and invalidates the current zoom position. After calling this, a valid zoom position has to be added immediately.
|
protectedvirtual |
Go forward in zoom history.
Reimplemented in Spectrum1DCanvas.
|
protected |
Stores the current action mode (Pick, Zoom, Translate)
|
protected |
Buffer that stores the actual peak information.
|
protected |
External context menu extension.
|
protected |
Stores the index of the currently active layer.
|
protected |
Stores the used intensity mode function.
|
protected |
start position of mouse actions
|
protected |
Layer data.
|
protected |
start peak of measuring mode
|
protected |
Stores the mapping of m/z.
|
protected |
Stores the data range (m/z, RT and intensity) of all layers.
Dimension 0 is the m/z dimension.
Dimension 1 is the RT dimension (2D and 3D view) or the intensity dimension (1D view).
Dimension 2 is the intensity dimension (2D and 3D view) or the RT dimension (1D view).
|
protected |
Intensity scaling factor for relative scale with multiple layers.
In this mode all layers are scaled to the same maximum.
|
protected |
Rubber band for selected area.
|
protected |
selected peak
|
protected |
Stores whether or not to show a grid.
|
protected |
Flag that determines if timing data is printed to the command line.
|
protected |
Intensity scaling factor for 'snap to maximum intensity mode'.
In this mode the highest currently visible intensity is treated like the maximum overall intensity.
|
protected |
Back-pointer to the enclosing spectrum widget.
|
protected |
Whether to recalculate the data in the buffer when repainting.
|
protected |
Stores the currently visible area.
Dimension 0 is the m/z dimension.
Dimension 1 is the RT dimension (2D and 3D view) or the intensity dimension (1D view).
|
protected |
The current position in the zoom stack.
|
protected |
The zoom stack.