Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
Draw.h
Go to the documentation of this file.
1#pragma once
2#include <QPainter>
3#include <misc/global.h>
4
5namespace sf
6{
7
14{
15 public:
20
25 {
27 roNone = 0x0,
29 roLeft = 0x1,
31 roRight = 0x2,
33 roTop = 0x4,
35 roBottom = 0x8,
36 };
37
53 bool ruler(
54 QPainter& painter, ERulerOrientation ro, const QColor& color, const QColor& font_color, const QRect& bounds, const QRect& area, double start, double stop,
55 int digits, const QString& unit
56 ) const;
57
62 {
64 goHorizontal = 0x1,
66 goVertical = 0x2
67 };
68
81 bool gridLines(QPainter& painter, EGridOrientation go, const QColor& color, const QRect& bounds, double start, double stop, unsigned digits) const;
82
92 bool textCross(QPainter& painter, const QRect& bounds, const QString& text, const QColor& color);
93
94 private:
98 const double _sepFactor;
99
103 static struct Tick
104 {
105 int Value;
106 int Ticks;
107 } _tickListVertical[], _tickListHorizontal[];
108};
109
110}// namespace sf
contains functions for drawing general stuff for graphs.
Definition Draw.h:14
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.
ERulerOrientation
Orientation for drawing a graph ruler.
Definition Draw.h:25
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.
EGridOrientation
Orientation for drawing grid lines in a graph.
Definition Draw.h:62
Draw()
Default constructor.
Value container class able to performing arithmetic functions.
Definition Value.h:19
#define _MISC_CLASS
Definition misc/global.h:40
Definition Application.h:10