File indexing completed on 2024-04-28 16:54:30

0001 /*
0002     SPDX-FileCopyrightText: 2017 Roman Gilg <subdiff@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 #pragma once
0007 
0008 #include <QDate>
0009 #include <QObject>
0010 #include <QPair>
0011 #include <QTime>
0012 #include <QVariant>
0013 
0014 #include "colorcorrect_export.h"
0015 
0016 namespace ColorCorrect
0017 {
0018 /*
0019  * The purpose of this class is solely to enable workspace to present the
0020  * resulting timings of the current or requested configuration to the user.
0021  * The final calculations happen in similar functions in the compositor.
0022  *
0023  * The functions provided by this class here therefore needs to be hold in
0024  * sync with the functions in the compositor.
0025  */
0026 
0027 class COLORCORRECT_EXPORT SunCalc : public QObject
0028 {
0029     Q_OBJECT
0030 
0031 public:
0032     /**
0033      * Calculates for a given location and date two of the
0034      * following sun timings in their temporal order:
0035      * - Nautical dawn and sunrise for the morning
0036      * - Sunset and nautical dusk for the evening
0037      * @since 5.12
0038      **/
0039     Q_INVOKABLE QVariantMap getMorningTimings(double latitude, double longitude);
0040     Q_INVOKABLE QVariantMap getEveningTimings(double latitude, double longitude);
0041 };
0042 
0043 }