summaryrefslogtreecommitdiff
path: root/src/rateapp.h
diff options
context:
space:
mode:
authorLibravatar Mubashshir <[email protected]>2023-03-07 21:11:06 +0600
committerLibravatar Mubashshir <[email protected]>2023-03-07 21:11:06 +0600
commitd830bfc8ce7c6763d074beafdde7cab1835d31f9 (patch)
tree179f81f3b42779b1f6fb69deed6b69dab39f4f89 /src/rateapp.h
downloadwhatsie-upstream/4.12.0.tar.gz
whatsie-upstream/4.12.0.zip
Import Upstream version 4.12.0upstream/4.12.0
Diffstat (limited to 'src/rateapp.h')
-rw-r--r--src/rateapp.h55
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