Widget that represents an axis of a graph. More...
#include <OpenMS/VISUAL/AxisWidget.h>
| typedef std::vector < std::vector< DoubleReal > > | GridVector |
| Type definitions. More... | |
| GridVector | grid_line_ |
| Vector that defines the position of the ticks/gridlines and the shown values on axis. More... | |
| bool | is_log_ |
| format of axis scale (linear or logarithmic) More... | |
| bool | show_legend_ |
| display of legend enabled or not More... | |
| AxisPainter::Alignment | alignment_ |
| Position of the axis (right, left, top, down as defined in ALIGNMENT_ENUM) More... | |
| bool | is_inverse_orientation_ |
| true if axis label are displayed in inverse order (left to right or bottom to top) More... | |
| UInt | margin_ |
| margin of axis More... | |
| DoubleReal | min_ |
| minimum value on the axis More... | |
| DoubleReal | max_ |
| maximum value on the axis More... | |
| String | legend_ |
| text/unit on axis More... | |
| UInt | tick_level_ |
| maximum number of tick levels (default=2) More... | |
| bool | allow_short_numbers_ |
| true if k/M/G units can be used More... | |
| AxisWidget (AxisPainter::Alignment alignment, const char *legend="", QWidget *parent=0) | |
| constructor More... | |
| virtual | ~AxisWidget () |
| destructor More... | |
| void | setMargin (UInt size) |
| sets the margin on the top/right side (default is 0) More... | |
| UInt | margin () |
| returns the margin More... | |
| void | showLegend (bool show_legend) |
| enable the display of the legend (default true) More... | |
| bool | isLegendShown () const |
| returns true if legend is shown More... | |
| void | setLegend (const String &legend) |
| sets the legend text More... | |
| const String & | getLegend () |
| returns the actual legend text More... | |
| const GridVector & | gridLines () |
| returns the currently used grid lines More... | |
| void | setLogScale (bool is_log) |
| sets the axis to logarithmic scale More... | |
| bool | isLogScale () |
| returns true if the axis has logarithmic scale More... | |
| void | setInverseOrientation (bool inverse_orientation) |
| set true to display the axis label in inverse order (left to right or bottom to top) More... | |
| bool | hasInverseOrientation () |
| returns if the axis label is displayed in inverse order More... | |
| void | setAllowShortNumbers (bool short_nums) |
| set true to allow for shortened numbers (with k/M/G units) on the axis label More... | |
| DoubleReal | getAxisMinimum () const |
| returns the minimum value displayed on the axis More... | |
| DoubleReal | getAxisMaximum () const |
| returns the maximum value displayed on the axis More... | |
| void | paint (QPainter *painter, QPaintEvent *e) |
| Actual painting takes place here. More... | |
| void | setAxisBounds (DoubleReal min, DoubleReal max) |
| sets min/max of the axis More... | |
| void | setTickLevel (UInt level) |
| set maximum number of tick levels ('1' or '2', default: '2') More... | |
| void | paintEvent (QPaintEvent *) |
| Reimplemented Qt event (calls paint with "this") More... | |
Widget that represents an axis of a graph.
Additional to ticks and tick values a label e.g. the unit can be displayed. It supports both linear and logarithmic scale.
The above image shows a horizontal example axis.
| typedef std::vector<std::vector<DoubleReal> > GridVector |
Type definitions.
Vector of vector of doubles that defines the grid
| AxisWidget | ( | AxisPainter::Alignment | alignment, |
| const char * | legend = "", |
||
| QWidget * | parent = 0 |
||
| ) |
constructor
|
virtual |
destructor
| DoubleReal getAxisMaximum | ( | ) | const |
returns the maximum value displayed on the axis
| DoubleReal getAxisMinimum | ( | ) | const |
returns the minimum value displayed on the axis
| const String& getLegend | ( | ) |
returns the actual legend text
| const GridVector& gridLines | ( | ) |
returns the currently used grid lines
| bool hasInverseOrientation | ( | ) |
returns if the axis label is displayed in inverse order
| bool isLegendShown | ( | ) | const |
returns true if legend is shown
| bool isLogScale | ( | ) |
returns true if the axis has logarithmic scale
| UInt margin | ( | ) |
returns the margin
| void paint | ( | QPainter * | painter, |
| QPaintEvent * | e | ||
| ) |
Actual painting takes place here.
|
protected |
Reimplemented Qt event (calls paint with "this")
| void setAllowShortNumbers | ( | bool | short_nums | ) |
set true to allow for shortened numbers (with k/M/G units) on the axis label
|
slot |
sets min/max of the axis
| void setInverseOrientation | ( | bool | inverse_orientation | ) |
set true to display the axis label in inverse order (left to right or bottom to top)
| void setLegend | ( | const String & | legend | ) |
sets the legend text
Referenced by IDEvaluationBase::IDEvaluationBase(), and IDEvaluationBase::setIntensityMode().
| void setLogScale | ( | bool | is_log | ) |
sets the axis to logarithmic scale
| void setMargin | ( | UInt | size | ) |
sets the margin on the top/right side (default is 0)
|
slot |
set maximum number of tick levels ('1' or '2', default: '2')
| void showLegend | ( | bool | show_legend | ) |
enable the display of the legend (default true)
|
protected |
Position of the axis (right, left, top, down as defined in ALIGNMENT_ENUM)
|
protected |
true if k/M/G units can be used
|
protected |
Vector that defines the position of the ticks/gridlines and the shown values on axis.
|
protected |
true if axis label are displayed in inverse order (left to right or bottom to top)
|
protected |
format of axis scale (linear or logarithmic)
|
protected |
text/unit on axis
|
protected |
margin of axis
|
protected |
maximum value on the axis
|
protected |
minimum value on the axis
|
protected |
display of legend enabled or not
|
protected |
maximum number of tick levels (default=2)
| OpenMS / TOPP release 1.11.1 | Documentation generated on Thu Nov 14 2013 11:19:35 using doxygen 1.8.5 |