#include <OpenMS/VISUAL/SpectrumWidget.h>
This class is the base class for the different MDI window types in the TOPPView application. For each type of spectrum view (such as 1D view, 2D view etc.), there must exist a corresponding class derived from this class.
To integrate a new spectrum view (i.e. classes derived from SpectrumWidget and SpectrumCanvas) into the TOPPView application, a class must be derived from this class which holds an instance of the SpectrumCanvas class as a child widget.
This Widget also provides axis widgets and scrollbars.
Public Slots | |
void | showStatistics () |
Shows statistics about the data (count,min,max,avg of Intensity, Charge, Quality and meta data). | |
void | showIntensityDistribution () |
Shows the intensity distribution of the data. | |
void | updateAxes () |
Updates the axes by setting the right labels and calling recalculateAxes_();. | |
void | updateHScrollbar (float min, float disp_min, float disp_max, float max) |
Updates the horizontal scrollbar. | |
void | updateVScrollbar (float min, float disp_min, float disp_max, float max) |
Updates the vertical scrollbar. | |
virtual void | showGoToDialog ()=0 |
Shows a goto dialog. | |
void | changeLegendVisibility () |
Toggles the axis legend visibility. | |
Signals | |
void | modesChanged (QWidget *) |
Signals that draw mode or display mode changed (e.g. used to update the tool bar). | |
void | sendStatusMessage (std::string, OpenMS::UInt) |
Displays a status message. See TOPPViewBase::showStatusMessage . | |
void | sendCursorStatus (double mz=-1.0, double intens=-1.0, double rt=-1.0) |
Displays peak information in the status bar (m/z, RT, intensity). | |
void | aboutToBeDestroyed (int window_id) |
Message about the destruction of this widget. | |
void | openPreferences () |
Shows the main preferences dialog. | |
Public Member Functions | |
SpectrumWidget (const Param &preferences, QWidget *parent=0) | |
Default constructor. | |
~SpectrumWidget () | |
Destructor. | |
SpectrumCanvas * | canvas () |
Returns a pointer to canvas object. | |
AxisWidget * | xAxis () |
Returns a pointer to the x-axis axis widget. | |
AxisWidget * | yAxis () |
Returns a pointer to the y-axis axis widget. | |
Int | getActionMode () const |
Get the mouse action mode. | |
void | setActionMode (SpectrumCanvas::ActionModes mode) |
SpectrumWidgetActionModes. | |
virtual bool | isLegendShown () const |
Returns if the axis labels are shown. | |
virtual void | showLegend (bool show) |
Shows/hides axis labels. | |
void | setIntensityMode (SpectrumCanvas::IntensityModes mode) |
Sets the intensity mode of the SpectrumCanvas. | |
void | hideAxes () |
Hides x-axis and y-axis. | |
Public Attributes | |
Int | window_id |
Widget id used as identifier. | |
Protected Member Functions | |
void | setCanvas_ (SpectrumCanvas *canvas, UInt row=0, UInt col=2) |
Adds the canvas, axes and scrollbars to the layout. | |
virtual void | intensityModeChange_ () |
Switch between different intensitiy modes. | |
virtual Math::Histogram< UInt, float > | createIntensityDistribution_ ()=0 |
creates the intensity distribution of the widget | |
virtual void | recalculateAxes_ ()=0 |
recalculates the Axis ticks | |
Protected Attributes | |
SpectrumCanvas * | canvas_ |
Pointer to the canvas widget. | |
QGridLayout * | grid_ |
Main layout. | |
AxisWidget * | y_axis_ |
Vertical axis. | |
AxisWidget * | x_axis_ |
Horizontal axis. | |
QScrollBar * | x_scrollbar_ |
Horizontal scrollbar. | |
QScrollBar * | y_scrollbar_ |
Vertical scrollbar. |
SpectrumWidget | ( | const Param & | preferences, | |
QWidget * | parent = 0 | |||
) |
Default constructor.
~SpectrumWidget | ( | ) |
Destructor.
SpectrumCanvas* canvas | ( | ) | [inline] |
Returns a pointer to canvas object.
The canvas object is set with the setCanvas_() method. This is usually done in the constructor.
Reimplemented in Spectrum1DWidget, Spectrum2DWidget, and Spectrum3DWidget.
AxisWidget* xAxis | ( | ) | [inline] |
Returns a pointer to the x-axis axis widget.
AxisWidget* yAxis | ( | ) | [inline] |
Returns a pointer to the y-axis axis widget.
Int getActionMode | ( | ) | const |
Get the mouse action mode.
void setActionMode | ( | SpectrumCanvas::ActionModes | mode | ) |
SpectrumWidgetActionModes.
virtual bool isLegendShown | ( | ) | const [virtual] |
virtual void showLegend | ( | bool | show | ) | [virtual] |
void setIntensityMode | ( | SpectrumCanvas::IntensityModes | mode | ) |
Sets the intensity mode of the SpectrumCanvas.
void hideAxes | ( | ) |
Hides x-axis and y-axis.
void modesChanged | ( | QWidget * | ) | [signal] |
Signals that draw mode or display mode changed (e.g. used to update the tool bar).
void sendStatusMessage | ( | std::string | , | |
OpenMS::UInt | ||||
) | [signal] |
Displays a status message. See TOPPViewBase::showStatusMessage .
void sendCursorStatus | ( | double | mz = -1.0 , |
|
double | intens = -1.0 , |
|||
double | rt = -1.0 | |||
) | [signal] |
Displays peak information in the status bar (m/z, RT, intensity).
void aboutToBeDestroyed | ( | int | window_id | ) | [signal] |
Message about the destruction of this widget.
void openPreferences | ( | ) | [signal] |
Shows the main preferences dialog.
void showStatistics | ( | ) | [slot] |
Shows statistics about the data (count,min,max,avg of Intensity, Charge, Quality and meta data).
void showIntensityDistribution | ( | ) | [slot] |
Shows the intensity distribution of the data.
void updateAxes | ( | ) | [slot] |
Updates the axes by setting the right labels and calling recalculateAxes_();.
void updateHScrollbar | ( | float | min, | |
float | disp_min, | |||
float | disp_max, | |||
float | max | |||
) | [slot] |
Updates the horizontal scrollbar.
min | The overall minimum of the range | |
disp_min | The displayed minimum | |
disp_max | The displayed maximum | |
max | The overall maximum of the range |
void updateVScrollbar | ( | float | min, | |
float | disp_min, | |||
float | disp_max, | |||
float | max | |||
) | [slot] |
Updates the vertical scrollbar.
min | The overall minimum of the range | |
disp_min | The displayed minimum | |
disp_max | The displayed maximum | |
max | The overall maximum of the range |
virtual void showGoToDialog | ( | ) | [pure virtual, slot] |
void changeLegendVisibility | ( | ) | [slot] |
Toggles the axis legend visibility.
void setCanvas_ | ( | SpectrumCanvas * | canvas, | |
UInt | row = 0 , |
|||
UInt | col = 2 | |||
) | [protected] |
Adds the canvas, axes and scrollbars to the layout.
row
and col
define the position of the canvas. Axes and scrollbars are added to the left and bottom of the canvas.
virtual void intensityModeChange_ | ( | ) | [protected, virtual] |
Switch between different intensitiy modes.
virtual Math::Histogram<UInt,float> createIntensityDistribution_ | ( | ) | [protected, pure virtual] |
creates the intensity distribution of the widget
Implemented in Spectrum1DWidget, Spectrum2DWidget, and Spectrum3DWidget.
virtual void recalculateAxes_ | ( | ) | [protected, pure virtual] |
recalculates the Axis ticks
Implemented in Spectrum1DWidget, Spectrum2DWidget, and Spectrum3DWidget.
SpectrumCanvas* canvas_ [protected] |
Pointer to the canvas widget.
QGridLayout* grid_ [protected] |
Main layout.
AxisWidget* y_axis_ [protected] |
Vertical axis.
AxisWidget* x_axis_ [protected] |
Horizontal axis.
QScrollBar* x_scrollbar_ [protected] |
Horizontal scrollbar.
QScrollBar* y_scrollbar_ [protected] |
Vertical scrollbar.
Generated Tue Apr 1 15:36:48 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |