diff options
-rw-r--r-- | src/rateapp.cpp | 14 | ||||
-rw-r--r-- | src/rateapp.h | 4 | ||||
-rw-r--r-- | src/rateapp.ui | 123 |
3 files changed, 105 insertions, 36 deletions
diff --git a/src/rateapp.cpp b/src/rateapp.cpp index ead9508..21d2f1c 100644 --- a/src/rateapp.cpp +++ b/src/rateapp.cpp @@ -116,3 +116,17 @@ void RateApp::reset() settings.setValue("app_launched_count",0); settings.setValue("app_install_time",QDateTime::currentSecsSinceEpoch()); } + +void RateApp::on_rateOnGithub_clicked() +{ + QDesktopServices::openUrl(QUrl("https://github.com/keshavbhatt/whatsie")); + this->reset(); + this->close(); +} + +void RateApp::on_donate_clicked() +{ + QDesktopServices::openUrl(QUrl("https://paypal.me/keshavnrj/5.00")); + this->reset(); + this->close(); +} diff --git a/src/rateapp.h b/src/rateapp.h index e296080..e87719e 100644 --- a/src/rateapp.h +++ b/src/rateapp.h @@ -36,6 +36,10 @@ private slots: bool shouldShow(); void reset(); + void on_rateOnGithub_clicked(); + + void on_donate_clicked(); + private: Ui::RateApp *ui; QString app_rating_url; diff --git a/src/rateapp.ui b/src/rateapp.ui index 9243daa..9b6ee24 100644 --- a/src/rateapp.ui +++ b/src/rateapp.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>424</width> - <height>189</height> + <width>472</width> + <height>224</height> </rect> </property> <property name="windowTitle"> @@ -51,43 +51,94 @@ </widget> </item> <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QPushButton" name="laterBtn"> - <property name="text"> - <string>Later</string> - </property> - </widget> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>10</height> - </size> - </property> - </spacer> - </item> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="bottomMargin"> + <number>0</number> + </property> <item> - <widget class="QPushButton" name="alreadyDoneBtn"> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="text"> - <string> Already Done </string> - </property> - </widget> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QPushButton" name="rateNowBtn"> + <property name="text"> + <string> Rate in Store</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_4"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Or</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="rateOnGithub"> + <property name="text"> + <string>Star rate Github repo</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="label_3"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Or</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="donate"> + <property name="text"> + <string>Donate</string> + </property> + </widget> + </item> + </layout> </item> <item> - <widget class="QPushButton" name="rateNowBtn"> - <property name="text"> - <string> Rate Now </string> - </property> - </widget> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QPushButton" name="laterBtn"> + <property name="text"> + <string>Later</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>10</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="alreadyDoneBtn"> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string> Already Done </string> + </property> + </widget> + </item> + </layout> </item> </layout> </item> |