OGS
DiagramScene Class Reference

Detailed Description

A scene graph for a 2D Diagram including coordinate axes with labels and ticks for one or more plotted graphs.

Definition at line 28 of file DiagramScene.h.

#include <DiagramScene.h>

Inheritance diagram for DiagramScene:
[legend]
Collaboration diagram for DiagramScene:
[legend]

Public Member Functions

 DiagramScene (QObject *parent=nullptr)
 
 DiagramScene (DiagramList *list, QObject *parent=nullptr)
 
 ~DiagramScene () override
 
QArrowaddArrow (qreal length, qreal angle, QPen &pen)
 
void addGraph (DiagramList *list)
 Adds a graph to the scene, including all data points and meta-information.
 
QGraphicsGridaddGrid (const QRectF &rect, int xTicks, int yTicks, const QPen &pen)
 Adds a grid-object to the scene.
 

Static Public Attributes

static const int MARGIN = 30
 

Private Member Functions

void addCaption (const QString &name, QPen &pen)
 The margin between the boundary of the scene and the bounding box of all items within the scene.
 
QNonScalableGraphicsTextItemaddNonScalableText (const QString &text, const QFont &font=QFont())
 Adds a non-scalable text object to the scene.
 
void adjustAxis (qreal &min, qreal &max, int &numberOfTicks)
 
void adjustScaling ()
 
void clearGrid ()
 Destroys the grid object (coordinate system) when a new graph is added.
 
void constructGrid ()
 
void drawGraph (DiagramList *list)
 Plots the graph.
 
int getXAxisOffset ()
 
int getYAxisOffset ()
 
void initialize ()
 
void setDiagramBoundaries (DiagramList *list)
 
void setXAxis (QArrow *arrow)
 Sets an arrow as x-axis.
 
void setYAxis (QArrow *arrow)
 Sets an arrow as y-axis.
 
void update ()
 

Private Attributes

QRectF _bounds
 
QRectF _unscaledBounds
 
QVector< DiagramList * > _lists
 
QVector< QGraphicsItemGroup * > _graphCaptions
 
QVector< QGraphicsPathItem * > _graphs
 
QGraphicsGrid_grid
 
QDateTime _startDate
 
float _scaleX
 
float _scaleY
 
QArrow_xAxis
 
QArrow_yAxis
 
QNonScalableGraphicsTextItem_xLabel
 
QNonScalableGraphicsTextItem_yLabel
 
QNonScalableGraphicsTextItem_xUnit
 
QNonScalableGraphicsTextItem_yUnit
 
QVector< QNonScalableGraphicsTextItem * > _xTicksText
 
QVector< QNonScalableGraphicsTextItem * > _yTicksText
 

Constructor & Destructor Documentation

◆ DiagramScene() [1/2]

DiagramScene::DiagramScene ( QObject * parent = nullptr)
explicit

Creates a new scene. Since no data points are given some default values are used for constructing all the necessary objects.

Definition at line 28 of file DiagramScene.cpp.

28 : QGraphicsScene(parent)
29{
30 _bounds.setRect(0, 0, 1, 1);
31 initialize();
32}

References _bounds, and initialize().

◆ DiagramScene() [2/2]

DiagramScene::DiagramScene ( DiagramList * list,
QObject * parent = nullptr )
explicit

Creates a new scene.

Parameters
listincludes all necessary information of the graph to display.
parentThe parent QObject.

Definition at line 39 of file DiagramScene.cpp.

40 : QGraphicsScene(parent)
41{
43 initialize();
44}
void setDiagramBoundaries(DiagramList *list)

References initialize(), and setDiagramBoundaries().

◆ ~DiagramScene()

DiagramScene::~DiagramScene ( )
override

Definition at line 46 of file DiagramScene.cpp.

47{
48 delete _grid;
49 delete _xAxis;
50 delete _yAxis;
51 delete _xLabel;
52 delete _yLabel;
53 delete _xUnit;
54 delete _yUnit;
55 for (auto& graphCaption : _graphCaptions)
56 {
57 delete graphCaption;
58 }
59 _graphCaptions.clear();
60 for (auto& graph : _graphs)
61 {
62 delete graph;
63 }
64 _graphs.clear();
65 for (auto& text : _xTicksText)
66 {
67 delete text;
68 }
69 _xTicksText.clear();
70 for (auto& text : _yTicksText)
71 {
72 delete text;
73 }
74 _yTicksText.clear();
75 for (auto& list : _lists)
76 {
77 delete list;
78 }
79 _lists.clear();
80}
QVector< QNonScalableGraphicsTextItem * > _xTicksText
QNonScalableGraphicsTextItem * _xUnit
QArrow * _xAxis
QVector< QGraphicsPathItem * > _graphs
QVector< QGraphicsItemGroup * > _graphCaptions
QVector< QNonScalableGraphicsTextItem * > _yTicksText
QNonScalableGraphicsTextItem * _yUnit
QNonScalableGraphicsTextItem * _yLabel
QNonScalableGraphicsTextItem * _xLabel
QVector< DiagramList * > _lists
QGraphicsGrid * _grid
QArrow * _yAxis

References _graphCaptions, _graphs, _grid, _lists, _xAxis, _xLabel, _xTicksText, _xUnit, _yAxis, _yLabel, _yTicksText, and _yUnit.

Member Function Documentation

◆ addArrow()

QArrow * DiagramScene::addArrow ( qreal length,
qreal angle,
QPen & pen )

Adds an arrow object to the diagram which might be used as a coordinate axis, etc.

Definition at line 84 of file DiagramScene.cpp.

85{
86 auto* arrow = new QArrow(length, angle, 8, 5, pen);
87 addItem(arrow);
88 return arrow;
89}
An arrow as a QGraphicsObject.
Definition QArrow.h:26

Referenced by initialize().

◆ addCaption()

void DiagramScene::addCaption ( const QString & name,
QPen & pen )
private

The margin between the boundary of the scene and the bounding box of all items within the scene.

Adds a caption for a graph beneath the actual diagram.

Definition at line 92 of file DiagramScene.cpp.

93{
94 auto* caption = new QGraphicsItemGroup(nullptr);
95 QGraphicsLineItem* l = addLine(0, 0, 100, 0, pen);
96 QGraphicsTextItem* t = addText(name);
97 l->setPos(0, 0);
98 t->setPos(110, -(t->boundingRect()).height() / 2);
99 caption->addToGroup(l);
100 caption->addToGroup(t);
101 caption->setFlag(QGraphicsItem::ItemIgnoresTransformations, true);
102
103 _graphCaptions.push_back(caption);
104 addItem(_graphCaptions[_graphCaptions.size() - 1]);
105}

References _graphCaptions.

Referenced by drawGraph().

◆ addGraph()

void DiagramScene::addGraph ( DiagramList * list)

Adds a graph to the scene, including all data points and meta-information.

Definition at line 108 of file DiagramScene.cpp.

109{
112 _xLabel->setPlainText(list->getXLabel());
113 _yLabel->setPlainText(list->getYLabel());
114 _xUnit->setPlainText(list->getXUnit());
115 _yUnit->setPlainText(list->getYUnit());
116
117 clearGrid();
119
120 _lists.push_back(list);
121 for (auto& list : _lists)
122 {
123 drawGraph(list);
124 }
125
126 update();
127}
QString getYUnit() const
Returns the unit associated with the y-axis.
Definition DiagramList.h:87
QString getXLabel() const
Returns the label associated with the x-axis.
Definition DiagramList.h:78
QString getXUnit() const
Returns the unit associated with the x-axis.
Definition DiagramList.h:84
QString getYLabel() const
Returns the label associated with the y-axis.
Definition DiagramList.h:81
void drawGraph(DiagramList *list)
Plots the graph.
void clearGrid()
Destroys the grid object (coordinate system) when a new graph is added.

References _lists, _xLabel, _xUnit, _yLabel, _yUnit, adjustScaling(), clearGrid(), constructGrid(), drawGraph(), DiagramList::getXLabel(), DiagramList::getXUnit(), DiagramList::getYLabel(), DiagramList::getYUnit(), setDiagramBoundaries(), and update().

Referenced by DiagramView::addGraph().

◆ addGrid()

QGraphicsGrid * DiagramScene::addGrid ( const QRectF & rect,
int xTicks,
int yTicks,
const QPen & pen )

Adds a grid-object to the scene.

Definition at line 130 of file DiagramScene.cpp.

132{
133 QGraphicsGrid* g = new QGraphicsGrid(rect, xTicks, yTicks, true, pen);
134 addItem(g);
135 return g;
136}
A 2D cartesian grid as a QGraphicsItem.

Referenced by constructGrid().

◆ addNonScalableText()

QNonScalableGraphicsTextItem * DiagramScene::addNonScalableText ( const QString & text,
const QFont & font = QFont() )
private

Adds a non-scalable text object to the scene.

Definition at line 139 of file DiagramScene.cpp.

141{
142 auto* item = new QNonScalableGraphicsTextItem(text);
143 item->setFont(font);
144 addItem(item);
145 return item;
146}
A QGraphicsTextItem that will ignore all geometric transformations.

Referenced by constructGrid(), and initialize().

◆ adjustAxis()

void DiagramScene::adjustAxis ( qreal & min,
qreal & max,
int & numberOfTicks )
private

Resizes a given axis to "nice" dimensions and calculates an adequate number of ticks to be placed on it

Definition at line 150 of file DiagramScene.cpp.

151{
152 const int MinTicks = 4;
153 double grossStep = (max - min) / MinTicks;
154 double step = pow(10.0, std::floor(log10(grossStep)));
155 if (5 * step < grossStep)
156 {
157 step *= 5;
158 }
159 else if (2 * step < grossStep)
160 {
161 step *= 2;
162 }
163 numberOfTicks = int(ceil(max / step) - std::floor(min / step));
164 if (numberOfTicks < MinTicks)
165 {
166 numberOfTicks = MinTicks;
167 }
168 min = std::floor(min / step) * step;
169 max = ceil(max / step) * step;
170}

Referenced by constructGrid().

◆ adjustScaling()

void DiagramScene::adjustScaling ( )
private

Calculates scaling factors to set coordinate system and graphs to default window size

Definition at line 174 of file DiagramScene.cpp.

175{
176 if ((_unscaledBounds.width() > 0) && (_unscaledBounds.height() > 0))
177 {
178 _scaleX = kDefaultX / static_cast<float>(_unscaledBounds.width());
179 _scaleY = kDefaultY / static_cast<float>(_unscaledBounds.height());
180 }
181}
static constexpr float kDefaultX
static constexpr float kDefaultY
QRectF _unscaledBounds

References _scaleX, _scaleY, _unscaledBounds, kDefaultX, and kDefaultY.

Referenced by addGraph().

◆ clearGrid()

void DiagramScene::clearGrid ( )
private

Destroys the grid object (coordinate system) when a new graph is added.

Definition at line 184 of file DiagramScene.cpp.

185{
186 if (!_lists.isEmpty())
187 {
188 removeItem(_grid);
189
190 for (auto& text : _xTicksText)
191 {
192 removeItem(text);
193 }
194 for (auto& text : _yTicksText)
195 {
196 removeItem(text);
197 }
198 for (auto& graph : _graphs)
199 {
200 removeItem(graph);
201 }
202 for (auto& graphCaption : _graphCaptions)
203 {
204 removeItem(graphCaption);
205 }
206
207 _xTicksText.clear();
208 _yTicksText.clear();
209 _graphs.clear();
210 _graphCaptions.clear();
211 }
212}

References _graphCaptions, _graphs, _grid, _lists, _xTicksText, and _yTicksText.

Referenced by addGraph().

◆ constructGrid()

void DiagramScene::constructGrid ( )
private

Adjusts the underlying grid based on the graphs that are displayed in the diagram

Definition at line 216 of file DiagramScene.cpp.

217{
218 // be very careful with scaling parameters here!
219 int numXTicks;
220 int numYTicks;
221 qreal xMin = _unscaledBounds.left();
222 qreal yMin = _unscaledBounds.top();
223 qreal xMax = _unscaledBounds.right();
224 qreal yMax = _unscaledBounds.bottom();
225
226 adjustAxis(xMin, xMax, numXTicks);
227 adjustAxis(yMin, yMax, numYTicks);
228
229 // adjust boundaries of coordinate system according to scaling
230 _bounds.setRect(xMin * _scaleX,
231 yMin * _scaleY,
232 (xMax - xMin) * _scaleX,
233 (yMax - yMin) * _scaleY);
234
235 QPen pen(Qt::black, 1, Qt::SolidLine, Qt::SquareCap, Qt::RoundJoin);
236 _grid = addGrid(_bounds, numXTicks, numYTicks, pen);
237
238 if (_startDate == QDateTime())
239 {
240 for (int i = 0; i <= numXTicks; ++i)
241 {
242 auto x =
243 static_cast<int>(_bounds.left() / _scaleX +
244 (i * (_bounds.width() / _scaleX) / numXTicks));
245 _xTicksText.push_back(addNonScalableText(QString::number(x)));
246 _xTicksText.last()->setPos(x * _scaleX, _bounds.bottom() + 15);
247 }
248 }
249 else
250 {
251 for (int i = 0; i <= numXTicks; ++i)
252 {
253 auto x =
254 static_cast<int>(_bounds.left() / _scaleX +
255 (i * (_bounds.width() / _scaleX) / numXTicks));
256 QDateTime currentDate = _startDate.addSecs(x);
257 _xTicksText.push_back(
258 addNonScalableText(currentDate.toString("dd.MM.yyyy")));
259 _xTicksText.last()->setPos(x * _scaleX, _bounds.bottom() + 15);
260 }
261 }
262
263 for (int j = 0; j <= numYTicks; ++j)
264 {
265 qreal y = _bounds.bottom() / _scaleY -
266 (j * (_bounds.height() / _scaleY) / numYTicks);
267 qreal label = _bounds.top() / _scaleY +
268 (j * (_bounds.height() / _scaleY) / numYTicks);
269 _yTicksText.push_back(addNonScalableText(QString::number(label)));
270 _yTicksText.last()->setPos(_bounds.left() - MARGIN / 2, y * _scaleY);
271 }
272}
QDateTime _startDate
void adjustAxis(qreal &min, qreal &max, int &numberOfTicks)
QGraphicsGrid * addGrid(const QRectF &rect, int xTicks, int yTicks, const QPen &pen)
Adds a grid-object to the scene.
QNonScalableGraphicsTextItem * addNonScalableText(const QString &text, const QFont &font=QFont())
Adds a non-scalable text object to the scene.
static const int MARGIN

References _bounds, _grid, _scaleX, _scaleY, _startDate, _unscaledBounds, _xTicksText, _yTicksText, addGrid(), addNonScalableText(), adjustAxis(), and MARGIN.

Referenced by addGraph().

◆ drawGraph()

void DiagramScene::drawGraph ( DiagramList * list)
private

Plots the graph.

For correct display the graph needs to be flipped vertically and then translated back to its original position

Definition at line 275 of file DiagramScene.cpp.

276{
277 QPainterPath path;
278
279 if (list->getPath(path, _scaleX, _scaleY))
280 {
281 QPen pen(list->getColor(), 2, Qt::SolidLine, Qt::SquareCap,
282 Qt::RoundJoin);
283 pen.setCosmetic(true);
284 _graphs.push_back(addPath(path, pen));
285 addCaption(list->getName(), pen);
286
287 int last = _graphs.size() - 1;
288
293 int verticalShift =
294 static_cast<int>(2 * (list->minYValue() * _scaleY) +
295 (_graphs[last]->boundingRect()).height());
296 _graphs[last]->setTransform(
297 QTransform(QMatrix(1, 0, 0, -1, 0, verticalShift)));
298 }
299}
float minYValue() const
Returns the minimum y-value.
Definition DiagramList.h:48
QString getName() const
Returns the name of the diagram.
Definition DiagramList.h:57
QColor getColor() const
Returns the colour of the graph.
Definition DiagramList.h:36
bool getPath(QPainterPath &path, float scaleX, float scaleY)
void addCaption(const QString &name, QPen &pen)
The margin between the boundary of the scene and the bounding box of all items within the scene.

References _graphs, _scaleX, _scaleY, addCaption(), DiagramList::getColor(), DiagramList::getName(), DiagramList::getPath(), and DiagramList::minYValue().

Referenced by addGraph().

◆ getXAxisOffset()

int DiagramScene::getXAxisOffset ( )
private

Returns the y-value at which the x-axis should cross the y-axis. This value is zero if minYValue<0<maxYValue and minYValue otherwise.

Definition at line 303 of file DiagramScene.cpp.

304{
305 return (_bounds.top() <= 0 && _bounds.bottom() > 0)
306 ? static_cast<int>(_bounds.bottom() + _bounds.top())
307 : static_cast<int>(_bounds.bottom());
308}

References _bounds.

Referenced by update().

◆ getYAxisOffset()

int DiagramScene::getYAxisOffset ( )
private

Returns the x-value at which the y-axis should cross the x-axis. This value is zero if minXValue<0<maxXValue and minXValue otherwise.

Definition at line 312 of file DiagramScene.cpp.

313{
314 return (_bounds.left() <= 0 && _bounds.right() > 0)
315 ? 0
316 : static_cast<int>(_bounds.left());
317}

References _bounds.

Referenced by update().

◆ initialize()

void DiagramScene::initialize ( )
private

Initialises the coordinate axes, adds labels and/or units to the axes, calculates axes-lengths, offsets, etc.

Definition at line 321 of file DiagramScene.cpp.

322{
323 QPen pen(Qt::black, 1, Qt::SolidLine, Qt::SquareCap, Qt::RoundJoin);
324 pen.setCosmetic(true);
325
326 setXAxis(addArrow(_bounds.width(), 0, pen));
327 setYAxis(addArrow(_bounds.height(), -90, pen));
330 _yLabel->setRotation(-90);
331
334
335 update();
336}
QArrow * addArrow(qreal length, qreal angle, QPen &pen)
void setYAxis(QArrow *arrow)
Sets an arrow as y-axis.
void setXAxis(QArrow *arrow)
Sets an arrow as x-axis.

References _bounds, _xLabel, _xUnit, _yLabel, _yUnit, addArrow(), addNonScalableText(), setXAxis(), setYAxis(), and update().

Referenced by DiagramScene(), and DiagramScene().

◆ setDiagramBoundaries()

void DiagramScene::setDiagramBoundaries ( DiagramList * list)
private

Updates the (unscaled) boundaries of the visible coordinate system when a new list is added (boundaries are rescaled in the constructGrid-method

Definition at line 340 of file DiagramScene.cpp.

341{
342 if (!_lists.isEmpty())
343 {
344 if (list->minXValue() < _unscaledBounds.left())
345 {
346 _unscaledBounds.setLeft(list->minXValue());
347 }
348 if (list->minYValue() < _unscaledBounds.top())
349 {
350 _unscaledBounds.setTop(list->minYValue());
351 }
352 if (list->maxXValue() > _unscaledBounds.right())
353 {
354 _unscaledBounds.setRight(list->maxXValue());
355 }
356 if (list->maxYValue() > _unscaledBounds.bottom())
357 {
358 _unscaledBounds.setBottom(list->maxYValue());
359 }
360 if (_startDate > list->getStartDate())
361 {
362 _startDate = list->getStartDate();
363 }
364 }
365 else
366 {
367 _unscaledBounds.setRect(list->minXValue(), list->minYValue(),
368 list->maxXValue() - list->minXValue(),
369 list->maxYValue() - list->minYValue());
370 _startDate = list->getStartDate();
371 }
372}
float maxXValue() const
Returns the maximum x-value.
Definition DiagramList.h:45
const QDateTime getStartDate() const
Returns the start date of this list.
Definition DiagramList.h:54
float maxYValue() const
Returns the maximum y-value.
Definition DiagramList.h:51
float minXValue() const
Returns the minimum x-value.
Definition DiagramList.h:42

References _lists, _startDate, _unscaledBounds, DiagramList::getStartDate(), DiagramList::maxXValue(), DiagramList::maxYValue(), DiagramList::minXValue(), and DiagramList::minYValue().

Referenced by DiagramScene(), and addGraph().

◆ setXAxis()

void DiagramScene::setXAxis ( QArrow * arrow)
inlineprivate

Sets an arrow as x-axis.

Definition at line 56 of file DiagramScene.h.

56{ _xAxis = arrow; }

References _xAxis.

Referenced by initialize().

◆ setYAxis()

void DiagramScene::setYAxis ( QArrow * arrow)
inlineprivate

Sets an arrow as y-axis.

Definition at line 59 of file DiagramScene.h.

59{ _yAxis = arrow; }

References _yAxis.

Referenced by initialize().

◆ update()

void DiagramScene::update ( )
private

Updates the scene at the start and every time new data points are added. Specifically, objects on the scene are assigned their position in the new coordinate system and are resized if necessary.

Definition at line 380 of file DiagramScene.cpp.

381{
382 _xAxis->setPos(_bounds.left(), getXAxisOffset());
383 _yAxis->setPos(getYAxisOffset(), _bounds.bottom());
384 _xAxis->setLength(_bounds.width());
385 _yAxis->setLength(_bounds.height());
386
387 _xLabel->setPos(_bounds.left() + _bounds.width() / 2,
388 _bounds.bottom() + 1.5 * MARGIN);
389 _yLabel->setPos(_bounds.left() - 1.5 * MARGIN,
390 _bounds.top() + _bounds.height() / 2);
391
392 _xUnit->setPos(_bounds.right(), _bounds.bottom() + 1.2 * MARGIN);
393 _yUnit->setPos(_bounds.left(), _bounds.top() - 0.5 * MARGIN);
394
395 /* update graphs and their captions */
396 QRectF rect;
397 for (int i = 0; i < _graphs.size(); i++)
398 {
399 rect = _graphs[i]->boundingRect();
400 auto offset = static_cast<int>(fabs(rect.bottom() - _bounds.bottom()) -
401 fabs(rect.top() - _bounds.top()));
402 _graphs[i]->setPos(0, offset);
403
404 rect = itemsBoundingRect();
405 _graphCaptions[i]->setPos(_bounds.left(), rect.bottom() + 10);
406 }
407}
void setLength(qreal l)
Changes the length of the arrow.
Definition QArrow.cpp:130
QRectF boundingRect() const override
Returns the bounding rectangle of the text item.

References _bounds, _graphCaptions, _graphs, _xAxis, _xLabel, _xUnit, _yAxis, _yLabel, _yUnit, QNonScalableGraphicsTextItem::boundingRect(), getXAxisOffset(), getYAxisOffset(), MARGIN, and QArrow::setLength().

Referenced by addGraph(), and initialize().

Member Data Documentation

◆ _bounds

QRectF DiagramScene::_bounds
private

◆ _graphCaptions

QVector<QGraphicsItemGroup*> DiagramScene::_graphCaptions
private

Definition at line 66 of file DiagramScene.h.

Referenced by ~DiagramScene(), addCaption(), clearGrid(), and update().

◆ _graphs

QVector<QGraphicsPathItem*> DiagramScene::_graphs
private

Definition at line 67 of file DiagramScene.h.

Referenced by ~DiagramScene(), clearGrid(), drawGraph(), and update().

◆ _grid

QGraphicsGrid* DiagramScene::_grid
private

Definition at line 68 of file DiagramScene.h.

Referenced by ~DiagramScene(), clearGrid(), and constructGrid().

◆ _lists

QVector<DiagramList*> DiagramScene::_lists
private

Definition at line 65 of file DiagramScene.h.

Referenced by ~DiagramScene(), addGraph(), clearGrid(), and setDiagramBoundaries().

◆ _scaleX

float DiagramScene::_scaleX
private

Definition at line 70 of file DiagramScene.h.

Referenced by adjustScaling(), constructGrid(), and drawGraph().

◆ _scaleY

float DiagramScene::_scaleY
private

Definition at line 71 of file DiagramScene.h.

Referenced by adjustScaling(), constructGrid(), and drawGraph().

◆ _startDate

QDateTime DiagramScene::_startDate
private

Definition at line 69 of file DiagramScene.h.

Referenced by constructGrid(), and setDiagramBoundaries().

◆ _unscaledBounds

QRectF DiagramScene::_unscaledBounds
private

Definition at line 64 of file DiagramScene.h.

Referenced by adjustScaling(), constructGrid(), and setDiagramBoundaries().

◆ _xAxis

QArrow* DiagramScene::_xAxis
private

Definition at line 72 of file DiagramScene.h.

Referenced by ~DiagramScene(), setXAxis(), and update().

◆ _xLabel

QNonScalableGraphicsTextItem* DiagramScene::_xLabel
private

Definition at line 74 of file DiagramScene.h.

Referenced by ~DiagramScene(), addGraph(), initialize(), and update().

◆ _xTicksText

QVector<QNonScalableGraphicsTextItem*> DiagramScene::_xTicksText
private

Definition at line 78 of file DiagramScene.h.

Referenced by ~DiagramScene(), clearGrid(), and constructGrid().

◆ _xUnit

QNonScalableGraphicsTextItem* DiagramScene::_xUnit
private

Definition at line 76 of file DiagramScene.h.

Referenced by ~DiagramScene(), addGraph(), initialize(), and update().

◆ _yAxis

QArrow* DiagramScene::_yAxis
private

Definition at line 73 of file DiagramScene.h.

Referenced by ~DiagramScene(), setYAxis(), and update().

◆ _yLabel

QNonScalableGraphicsTextItem* DiagramScene::_yLabel
private

Definition at line 75 of file DiagramScene.h.

Referenced by ~DiagramScene(), addGraph(), initialize(), and update().

◆ _yTicksText

QVector<QNonScalableGraphicsTextItem*> DiagramScene::_yTicksText
private

Definition at line 79 of file DiagramScene.h.

Referenced by ~DiagramScene(), clearGrid(), and constructGrid().

◆ _yUnit

QNonScalableGraphicsTextItem* DiagramScene::_yUnit
private

Definition at line 77 of file DiagramScene.h.

Referenced by ~DiagramScene(), addGraph(), initialize(), and update().

◆ MARGIN

const int DiagramScene::MARGIN = 30
static

The documentation for this class was generated from the following files: