KChart

TernaryPoint.h
1 /*
2  * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3  *
4  * This file is part of the KD Chart library.
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #ifndef TERNARYPOINT_H
10 #define TERNARYPOINT_H
11 
12 #include <QtDebug>
13 #include <QPointF>
14 
15 /**
16  * @brief TernaryPoint defines a point within a ternary coordinate plane
17  * \internal
18  */
20 {
21 public:
22  TernaryPoint();
23  TernaryPoint( qreal a, qreal b );
24 
25  qreal a() const { return m_a; }
26  qreal b() const { return m_b; }
27  qreal c() const { return 1.0 - m_a - m_b; }
28 
29  void set( qreal a, qreal b );
30 
31  bool isValid() const;
32 
33 private:
34  qreal m_a;
35  qreal m_b;
36 };
37 
38 QDebug operator<<( QDebug stream, const TernaryPoint& point );
39 
40 QPointF translate( const TernaryPoint& );
41 
42 #endif
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
TernaryPoint defines a point within a ternary coordinate plane.
Definition: TernaryPoint.h:19
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Aug 9 2022 03:55:05 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.