Kstars

polylist.h
1/*
2 SPDX-FileCopyrightText: 2007 James B. Bowlin <bowlin@mindspring.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QHash>
10#include <QPolygonF>
11#include <QPointF>
12
13/* @class PolyList is almost a clone of LineList but since they have no data
14 * members in common, this is a new class instead of a subclass
15 *
16 *
17 * @author James B. Bowlin @version 0.1
18 */
19class PolyList
20{
21 public:
22 /* @short trivial constructor that also sets the name. It was
23 * convenient to specify the name at construction time.
24 */
25 explicit PolyList(const QString &name) : m_wrapRA(false)
26 {
27 m_name = name;
28 };
29
30 /* @short returns the QPolygonF that holds the points. */
31 const QPolygonF *poly()
32 {
33 return &m_poly;
34 }
35
36 /* @short we need a new append() method to append QPointF's
37 * instead of SkyPoints.
38 */
39 void append(const QPointF &p)
40 {
41 m_poly.append(p);
42 }
43
44 /* @short returns the name. */
45 const QString &name()
46 {
47 return m_name;
48 }
49
50 bool wrapRA()
51 {
52 return m_wrapRA;
53 }
54
55 void setWrapRA(bool wrap)
56 {
57 m_wrapRA = wrap;
58 }
59
60 private:
61 QPolygonF m_poly;
62 QString m_name;
63 bool m_wrapRA;
64};
QString name(StandardAction id)
void append(QList< T > &&value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.