diff options
author | 2021-05-05 02:47:48 +0530 | |
---|---|---|
committer | 2021-05-05 02:47:48 +0530 | |
commit | 45f7260d85197a6d6fc82f9058bdb00941e471ab (patch) | |
tree | f4e90a89a3207b7528cf95cd6ac6307174f9c6ce /src/rateapp.h | |
parent | a11a1df736dc275f6df57a2a4ff007090f89ace2 (diff) | |
download | whatsie-45f7260d85197a6d6fc82f9058bdb00941e471ab.tar.gz whatsie-45f7260d85197a6d6fc82f9058bdb00941e471ab.zip |
added rate app dialog
Diffstat (limited to 'src/rateapp.h')
-rw-r--r-- | src/rateapp.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/rateapp.h b/src/rateapp.h new file mode 100644 index 0000000..7b23214 --- /dev/null +++ b/src/rateapp.h @@ -0,0 +1,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(); +protected slots: + void closeEvent(QCloseEvent *event); +private slots: + void on_rateNowBtn_clicked(); + + void on_alreadyDoneBtn_clicked(); + + void on_laterBtn_clicked(); + + bool shouldShow(); +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 |