KQuickCharts

LineGridNode.h
1/*
2 * This file is part of KQuickCharts
3 * SPDX-FileCopyrightText: 2019 Arjen Hiemstra <ahiemstra@heimr.nl>
4 *
5 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7
8#ifndef LINEGRIDNODE_H
9#define LINEGRIDNODE_H
10
11#include <QColor>
12#include <QSGGeometryNode>
13
15
16/**
17 * @todo write docs
18 */
20{
21public:
24
25 void setVisible(bool visible);
26 void setVertical(bool vertical);
27 void setRect(const QRectF &rect);
28 void setColor(const QColor &color);
29 void setSpacing(float spacing);
30 void setLineWidth(float lineWidth);
31
32 bool isSubtreeBlocked() const override;
33
34 void update();
35
36private:
37 void line(QSGGeometry::Point2D *vertices, quint16 *indices, int &index, qreal fromX, qreal fromY, qreal toX, qreal toY);
38
39 QSGGeometry *m_geometry = nullptr;
40 QSGFlatColorMaterial *m_material = nullptr;
41
42 bool m_visible = true;
43 bool m_vertical = false;
44 QRectF m_rect;
45 float m_spacing = 1.0;
46 float m_lineWidth = 1.0;
47};
48
49#endif // LINEGRIDNODE_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:54:54 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.