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
9#include <QObject>
10#include <QColor>
11
12//FIXME: This class shouldn't be exposed but is needed by the worldclock plasmoid
13#include "marble_export.h"
14
15namespace Marble
16{
17class MarbleClock;
18class SunLocatorPrivate;
19class Planet;
20
21class MARBLE_EXPORT SunLocator : public QObject
22{
23 Q_OBJECT
24
25 public:
26 SunLocator( const MarbleClock *clock, const Planet *planet );
27 ~SunLocator() override;
28
29 qreal shading(qreal lon, qreal a, qreal c) const;
30 static void shadePixel(QRgb &pixcol, qreal shade);
31 static void shadePixelComposite(QRgb &pixcol, const QRgb &dpixcol, qreal shade);
32
33 void setPlanet( const Planet *planet );
34
35 qreal getLon() const;
36 qreal getLat() const;
37
38 public Q_SLOTS:
39 void update();
40
41 Q_SIGNALS:
42 void positionChanged( qreal lon, qreal lat );
43
44 private:
45 SunLocatorPrivate * const d;
46
47 Q_DISABLE_COPY( SunLocator )
48};
49
50}
51
52#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 Fri Jun 14 2024 11:54:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.