aboutsummaryrefslogtreecommitdiff
path: root/src/automatictheme.h
diff options
context:
space:
mode:
authorLibravatar keshavbhatt <keshavnrj@gmail.com>2021-05-03 16:51:52 +0530
committerLibravatar keshavbhatt <keshavnrj@gmail.com>2021-05-03 16:51:52 +0530
commit144e905baae34c1e889147e2cdc47fb3e04531d2 (patch)
tree1c7683a9f59ea728491939da8f3820928eb48c4e /src/automatictheme.h
parentffb449445c97c0e92f520fc1fdb1baae3d43482e (diff)
downloadwhatsie-144e905baae34c1e889147e2cdc47fb3e04531d2.tar.gz
whatsie-144e905baae34c1e889147e2cdc47fb3e04531d2.zip
added falgs icons.
Diffstat (limited to 'src/automatictheme.h')
-rw-r--r--src/automatictheme.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/automatictheme.h b/src/automatictheme.h
new file mode 100644
index 0000000..55904e5
--- /dev/null
+++ b/src/automatictheme.h
@@ -0,0 +1,47 @@
+#ifndef AUTOMATICTHEME_H
+#define AUTOMATICTHEME_H
+
+#include <QWidget>
+#include <QGeoPositionInfoSource>
+#include <QDebug>
+#include <QTimeZone>
+#include <QSettings>
+
+namespace Ui {
+class AutomaticTheme;
+}
+
+class AutomaticTheme : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit AutomaticTheme(QWidget *parent = nullptr);
+ ~AutomaticTheme();
+
+
+private slots:
+ void on_refresh_clicked();
+
+ void on_save_clicked();
+
+ void on_cancel_clicked();
+
+ void on_sunrise_timeChanged(const QTime &time);
+
+ void on_sunset_timeChanged(const QTime &time);
+
+private:
+ Ui::AutomaticTheme *ui;
+
+ QGeoPositionInfoSource *gPosInfoSrc;
+ QDateTime sunrise, sunset;
+
+ double hour_offset = 0.0;
+ double lon = 0.0;
+ double lat = 0.0;
+
+ QSettings settings;
+};
+
+#endif // AUTOMATICTHEME_H