1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QBARDATAITEM_H
5#define QBARDATAITEM_H
6
7#include <QtGraphs/qgraphsglobal.h>
8
9QT_BEGIN_NAMESPACE
10
11class QBarDataItem
12{
13public:
14 constexpr QBarDataItem() noexcept = default;
15 explicit constexpr QBarDataItem(float value) noexcept
16 : m_value(value)
17 {}
18 explicit constexpr QBarDataItem(float value, float angle) noexcept
19 : m_value(value)
20 , m_angle(angle)
21 {}
22
23 constexpr void setValue(float val) noexcept { m_value = val; }
24 constexpr float value() const noexcept { return m_value; }
25 constexpr void setRotation(float angle) noexcept { m_angle = angle; }
26 constexpr float rotation() const noexcept { return m_angle; }
27
28private:
29 float m_value = 0.f;
30 float m_angle = 0.f;
31};
32
33QT_END_NAMESPACE
34
35#endif
36

Provided by KDAB

Privacy Policy
Start learning QML with our Intro Training
Find out more

source code of qtgraphs/src/graphs3d/data/qbardataitem.h