Marble

SunLocator.h
1 // SPDX-FileCopyrightText: 2007-2009 David Roberts <[email protected]>
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 
15 namespace Marble
16 {
17 class MarbleClock;
18 class SunLocatorPrivate;
19 class Planet;
20 
21 class 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
Binds a QML item to a specific geodetic location in screen coordinates.
void update(Part *part, const QByteArray &data, qint64 dataSize)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:28 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.