diff options
Diffstat (limited to 'src/rateapp.h')
| -rw-r--r-- | src/rateapp.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/rateapp.h b/src/rateapp.h new file mode 100644 index 0000000..50d5b98 --- /dev/null +++ b/src/rateapp.h @@ -0,0 +1,55 @@ +#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(); + void on_rateOnGithub_clicked(); + + void on_donate_clicked(); + + void on_donate_2_clicked(); + +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 |
