contains functions for drawing general stuff for graphs.
More...
#include <Draw.h>
|
| | Draw () |
| | Default constructor.
|
| |
| bool | ruler (QPainter &painter, ERulerOrientation ro, const QColor &color, const QColor &font_color, const QRect &bounds, const QRect &area, double start, double stop, int digits, const QString &unit) const |
| | Draws a ruler for example around a graph.
|
| |
| bool | gridLines (QPainter &painter, EGridOrientation go, const QColor &color, const QRect &bounds, double start, double stop, unsigned digits) const |
| | Draws the lines in the graph as the ruler ticks.
|
| |
| bool | textCross (QPainter &painter, const QRect &bounds, const QString &text, const QColor &color) |
| | Draws a cross with text rectangle in the middle.
|
| |
| void | gaugeBarPanel (QWidget *widget, QPaintEvent *event, double progress, const QString &str={}) |
| | Draws a horizontal gauge rectangle inside a styled panel.
|
| |
contains functions for drawing general stuff for graphs.
◆ EGridOrientation
Orientation for drawing grid lines in a graph.
| Enumerator |
|---|
| goHorizontal | Draws grid horizontally.
|
| goVertical | Draws grid vertically.
|
◆ ERulerOrientation
Orientation for drawing a graph ruler.
| Enumerator |
|---|
| roNone | Disable value.
|
| roLeft | Draws ruler as situated at the left of a graph.
|
| roRight | Draws ruler as situated at the right of a graph.
|
| roTop | Draws ruler as situated at the top of a graph.
|
| roBottom | Draws ruler as situated at the bottom of a graph.
|
◆ Draw()
◆ gaugeBarPanel()
| void sf::Draw::gaugeBarPanel |
( |
QWidget * |
widget, |
|
|
QPaintEvent * |
event, |
|
|
double |
progress, |
|
|
const QString & |
str = {} |
|
) |
| |
Draws a horizontal gauge rectangle inside a styled panel.
- Parameters
-
| widget | Widget which send this event. |
| event | Paint event send from the widget. |
| progress | Progress value for drawing the bar. When negative only the string is drawn. |
| str | Text put in a rectangle in the middle. By default, the percentage is drawn. |
◆ gridLines()
| bool sf::Draw::gridLines |
( |
QPainter & |
painter, |
|
|
EGridOrientation |
go, |
|
|
const QColor & |
color, |
|
|
const QRect & |
bounds, |
|
|
double |
start, |
|
|
double |
stop, |
|
|
unsigned |
digits |
|
) |
| const |
Draws the lines in the graph as the ruler ticks.
- Parameters
-
| painter | Painter context. |
| go | Orientation. |
| color | Color of the grid lines. |
| bounds | area boundaries for the ruler. |
| start | Start value of grid lines. |
| stop | Stop value of grid lines. |
| digits | To make the grid correspond with the ruler when vertical. |
- Returns
- True on success false in case of an exception.
◆ ruler()
| bool sf::Draw::ruler |
( |
QPainter & |
painter, |
|
|
ERulerOrientation |
ro, |
|
|
const QColor & |
color, |
|
|
const QColor & |
font_color, |
|
|
const QRect & |
bounds, |
|
|
const QRect & |
area, |
|
|
double |
start, |
|
|
double |
stop, |
|
|
int |
digits, |
|
|
const QString & |
unit |
|
) |
| const |
Draws a ruler for example around a graph.
- Parameters
-
| painter | Painter context. |
| ro | Orientation. |
| color | Color for the ticks. |
| font_color | Color of the texts. |
| bounds | Boundaries for the ruler. |
| area | area available to paint texts on. |
| start | Start value of ruler. |
| stop | Stop value of ruler. |
| digits | Amount of significant digits or resolution of the printed values. |
| unit | unit string. |
- Returns
- True on success false in case of an exception.
◆ textCross()
| bool sf::Draw::textCross |
( |
QPainter & |
painter, |
|
|
const QRect & |
bounds, |
|
|
const QString & |
text, |
|
|
const QColor & |
color |
|
) |
| |
Draws a cross with text rectangle in the middle.
- Parameters
-
| painter | Painter context. |
| bounds | area boundaries for the ruler. |
| text | Text put in a rectangle in the middle. |
| color | Color of the cross and text. |
- Returns
- True on success false in case of an exception.
The documentation for this class was generated from the following file: