aboutsummaryrefslogtreecommitdiff
path: root/src/automatictheme.h
diff options
context:
space:
mode:
authorLibravatar Keshav Bhatt <keshavnrj@gmail.com>2023-05-17 21:59:43 +0530
committerLibravatar Keshav Bhatt <keshavnrj@gmail.com>2023-05-17 21:59:43 +0530
commit5f10a0f9657358fcd86c55ec065f3855bad0c160 (patch)
tree340f949dbe076db57bf62879ad150fabc884905a /src/automatictheme.h
parentb4b5dc3397966bea899bbb5ec0f756bb745dbff1 (diff)
downloadwhatsie-5f10a0f9657358fcd86c55ec065f3855bad0c160.tar.gz
whatsie-5f10a0f9657358fcd86c55ec065f3855bad0c160.zip
feat: minor fixes + code cleanup
Diffstat (limited to '')
-rw-r--r--src/automatictheme.h42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/automatictheme.h b/src/automatictheme.h
index 55904e5..f013713 100644
--- a/src/automatictheme.h
+++ b/src/automatictheme.h
@@ -1,47 +1,45 @@
#ifndef AUTOMATICTHEME_H
#define AUTOMATICTHEME_H
-#include <QWidget>
-#include <QGeoPositionInfoSource>
#include <QDebug>
+#include <QGeoPositionInfoSource>
+#include <QMessageBox>
#include <QTimeZone>
-#include <QSettings>
+#include <QWidget>
+
+#include "settingsmanager.h"
namespace Ui {
class AutomaticTheme;
}
-class AutomaticTheme : public QWidget
-{
- Q_OBJECT
+class AutomaticTheme : public QWidget {
+ Q_OBJECT
public:
- explicit AutomaticTheme(QWidget *parent = nullptr);
- ~AutomaticTheme();
-
+ explicit AutomaticTheme(QWidget *parent = nullptr);
+ ~AutomaticTheme();
private slots:
- void on_refresh_clicked();
+ void on_refresh_clicked();
- void on_save_clicked();
+ void on_save_clicked();
- void on_cancel_clicked();
+ void on_cancel_clicked();
- void on_sunrise_timeChanged(const QTime &time);
+ void on_sunrise_timeChanged(const QTime &time);
- void on_sunset_timeChanged(const QTime &time);
+ void on_sunset_timeChanged(const QTime &time);
private:
- Ui::AutomaticTheme *ui;
-
- QGeoPositionInfoSource *gPosInfoSrc;
- QDateTime sunrise, sunset;
+ Ui::AutomaticTheme *ui;
- double hour_offset = 0.0;
- double lon = 0.0;
- double lat = 0.0;
+ QGeoPositionInfoSource *m_gPosInfoSrc;
+ QDateTime m_sunrise, m_sunset;
- QSettings settings;
+ double m_hourOffset = 0.0;
+ double m_longitude = 0.0;
+ double m_latitube = 0.0;
};
#endif // AUTOMATICTHEME_H