-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
120 lines (108 loc) · 2.52 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QApplication>
#include <QCloseEvent>
#include <QAction>
#include <QMediaPlayer>
#include <QSystemTrayIcon>
extern QString sel_locale;
extern QString version;
extern int cal_m;
extern int madhab_cal;
extern double latitude;
extern double longitude;
extern double Time_Zone;
extern int clock_format;
extern QString fajr_n;
extern QString shuruk_n;
extern QString dhuhr_n;
extern QString asr_n;
extern QString maghrib_n;
extern QString isha_n;
extern QString fajr_n_24;
extern QString shuruk_n_24;
extern QString dhuhr_n_24;
extern QString asr_n_24;
extern QString maghrib_n_24;
extern QString isha_n_24;
extern int currentHour;
extern int currentMinute;
extern int betweenHour;
extern int betweenMinute;
extern QAction *fajr_tr;
extern QAction *dhuhr_tr;
extern QAction *asr_tr;
extern QAction *maghrib_tr;
extern QAction *isha_tr;
extern QAction *time_left_tray;
extern QAction *location_tr;
extern QAction *home_tr;
extern bool enable_audio_notif;
extern int time_before_notification;
extern int fajr_azan;
extern int normal_azan;
extern bool hijri_calendar;
extern bool aot;
extern bool dark_mode;
extern QSystemTrayIcon *tray;
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
Ui::MainWindow *ui;
void quit() {
QApplication::quit();
return;
}
void showHome() {
sel_home();
MainWindow::show();
}
void showQibla() {
sel_qibla();
MainWindow::show();
}
void showCalendar() {
sel_calendar();
MainWindow::show();
}
void showSettings() {
sel_settings();
MainWindow::show();
}
void showAbout() {
sel_about();
MainWindow::show();
}
public slots:
void get_locations();
void get_hours_and_minutes();
void set_locales();
void sel_home();
void sel_qibla();
void sel_calendar();
void sel_settings();
void sel_about();
void get_prayer();
void calc_prayer(int, int, double, double, double);
void call_prayer(QString, QString, int);
void play_fajr_audio();
void play_normal_audio();
void set_dark_mode(bool);
void save_settings_data();
void showHide(QSystemTrayIcon::ActivationReason);
private:
QMediaPlayer *player;
protected:
void closeEvent(QCloseEvent *event) override {
event->ignore();
hide();
}
};
#endif // MAINWINDOW_H