Qt World Summit Conference App
import QtQuick 2.9
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import Felgo 3.0
import "../common"
Dialog {
id: ratingDialog
negativeAction: true
negativeActionLabel: "Close"
positiveActionLabel: "Rate"
autoSize: true
outsideTouchable: false
onCanceled: {
logic.setFeedBackSent(true)
ratingDialog.close()
}
onAccepted: {
amplitude.logEvent("RateInStore")
logic.setFeedBackSent(true)
ratingDialog.close()
openUrlTimeout.start()
}
Item {
id: contentArea
width: parent.width
height: content.height
Column {
id: content
width: parent.width - dp(Theme.navigationBar.defaultBarItemPadding)*2
anchors.horizontalCenter: parent.horizontalCenter
topPadding: dp(15)
spacing: dp(10)
bottomPadding: dp(15)
Text {
id: ratingText
horizontalAlignment: Theme.isIos ? Text.AlignHCenter : Text.AlignLeft
anchors.horizontalCenter: Theme.isIos ? parent.horizontalCenter : undefined
text: "Rate This App"
color: Theme.textColor
font.pixelSize: sp(18)
width: parent.width * 0.8
wrapMode: Text.Wrap
font.bold: true
}
Text {
id: ratingNote
horizontalAlignment: Theme.isIos ? Text.AlignHCenter : Text.AlignLeft
anchors.horizontalCenter: Theme.isIos ? parent.horizontalCenter : undefined
text: "Great that you like it! Please support us by rating the app in the store."
color: Theme.textColor
font.pixelSize: sp(14)
width: parent.width * 0.8
wrapMode: Text.Wrap
}
}
Timer {
id: openUrlTimeout
interval: 500
onTriggered: {
nativeUtils.openUrl(ratingUrl)
}
}