Marble

SunLocator.h
1// SPDX-FileCopyrightText: 2007-2009 David Roberts <dvdr18@gmail.com>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef MARBLE_SUNLOCATOR_H
6#define MARBLE_SUNLOCATOR_H
7
8#include <QColor>
9#include <QObject>
10
11// FIXME: This class shouldn't be exposed but is needed by the worldclock plasmoid
12#include "marble_export.h"
13
14namespace Marble
15{
16class MarbleClock;
17class SunLocatorPrivate;
18class Planet;
19
20class MARBLE_EXPORT SunLocator : public QObject
21{
22 Q_OBJECT
23
24public:
25 SunLocator(const MarbleClock *clock, const Planet *planet);
26 ~SunLocator() override;
27
28 qreal shading(qreal lon, qreal a, qreal c) const;
29 static void shadePixel(QRgb &pixcol, qreal shade);
30 static void shadePixelComposite(QRgb &pixcol, const QRgb &dpixcol, qreal shade);
31
32 void setPlanet(const Planet *planet);
33
34 qreal getLon() const;
35 qreal getLat() const;
36
37public Q_SLOTS:
38 void update();
39
40Q_SIGNALS:
41 void positionChanged(qreal lon, qreal lat);
42
43private:
44 SunLocatorPrivate *const d;
45
46 Q_DISABLE_COPY(SunLocator)
47};
48
49}
50
51#endif
void update(Part *part, const QByteArray &data, qint64 dataSize)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.