-
Notifications
You must be signed in to change notification settings - Fork 0
/
rateapp.h
49 lines (38 loc) · 890 Bytes
/
rateapp.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
#ifndef RATEAPP_H
#define RATEAPP_H
#include <QWidget>
#include <QSettings>
#include <QDateTime>
#include <QUrl>
#include <QDesktopServices>
#include <QTimer>
namespace Ui {
class RateApp;
}
class RateApp : public QWidget
{
Q_OBJECT
signals:
void showRateDialog();
public:
explicit RateApp(QWidget *parent = nullptr , QString app_rating_url = "",
int app_launch_count = 5, int app_install_days = 5, int present_delay = 5000);
~RateApp();
public slots:
void delayShowEvent();
private slots:
void on_rateNowBtn_clicked();
void on_alreadyDoneBtn_clicked();
void on_laterBtn_clicked();
bool shouldShow();
void reset();
private:
Ui::RateApp *ui;
QString app_rating_url;
int app_launch_count;
int app_install_days;
int present_delay;
QSettings settings;
QTimer *showTimer;
};
#endif // RATEAPP_H