Some more improvements and styling
This commit is contained in:
parent
0b055bc2c1
commit
121589bf29
6 changed files with 98 additions and 65 deletions
|
@ -37,47 +37,25 @@ BusyIndicator {
|
|||
|
||||
anchors.fill: parent
|
||||
|
||||
property int currentHeight: 0
|
||||
|
||||
SequentialAnimation {
|
||||
RotationAnimation {
|
||||
target: blueRockHoldIcon
|
||||
running: control.running
|
||||
loops: Animation.Infinite
|
||||
|
||||
NumberAnimation {
|
||||
target: item
|
||||
property: "currentHeight"
|
||||
from: 0
|
||||
to: 800
|
||||
duration: control.animationSpeed
|
||||
}
|
||||
loops: Animation.Infinite
|
||||
from: 0
|
||||
to: 360
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
|
||||
Row {
|
||||
|
||||
Image {
|
||||
id: blueRockHoldIcon
|
||||
anchors.fill: parent
|
||||
|
||||
spacing: item.width / 9
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
model: 5
|
||||
|
||||
Rectangle {
|
||||
|
||||
property double heightMultiplier: Math.abs( Math.sin( ( ((item.currentHeight/100) + (index*(control.formFactor/repeater.model)))) * (Math.PI/8) ) )
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
width: item.width / 9
|
||||
height: ( heightMultiplier ) * ( item.height - 1 ) + 1
|
||||
|
||||
radius: width * 0.5
|
||||
|
||||
color: control.lineColor
|
||||
source: "qrc:/icons/blueRockHold.png"
|
||||
mipmap: true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ Item {
|
|||
|
||||
Connections {
|
||||
target: control.target
|
||||
function onDragEnded(userPosition) {
|
||||
function onDragEnded() {
|
||||
if(userPosition >= control.dragOutPosition * control.dragRefreshPositionMultiplier){
|
||||
control.state = "refreshing"
|
||||
preRefreshTimer.start()
|
||||
|
|
|
@ -46,6 +46,10 @@ Page {
|
|||
property bool titleIsPageTitle: widgetLd.item !== null && widgetLd.item.hasOwnProperty('titleIsPageTitle') ? widgetLd.item['titleIsPageTitle']:false
|
||||
property Component headerComponent: widgetLd.item !== null && widgetLd.item.hasOwnProperty('headerComponent') ? widgetLd.item['headerComponent']:null
|
||||
|
||||
function onBackRequested() {
|
||||
return !widgetLd.item.hasOwnProperty('onBackRequested') || widgetLd.item.onBackRequested()
|
||||
}
|
||||
|
||||
property var params
|
||||
|
||||
property int status: -1
|
||||
|
@ -360,7 +364,7 @@ Page {
|
|||
delegate: Button {
|
||||
id: catBt
|
||||
|
||||
width: parent.width
|
||||
width: selectorLv.width
|
||||
height: text !== "" ? selectorLv.delegateHeight:0
|
||||
|
||||
flat: true
|
||||
|
|
|
@ -28,6 +28,7 @@ DataListView {
|
|||
property bool ready
|
||||
|
||||
property string title: (params.nation === "ICC" ? "IFSC":params.nation === "GER" ? "DAV":"SAC") + " " + qsTr("calendar") + " " + control.year
|
||||
|
||||
property Component headerComponent: RowLayout {
|
||||
|
||||
height: parent.height
|
||||
|
@ -538,7 +539,7 @@ DataListView {
|
|||
|
||||
Connections {
|
||||
target: control
|
||||
onDisplayedCompCatsChanged: {
|
||||
function onDisplayedCompCatsChanged() {
|
||||
//console.log("filters changed")
|
||||
//competitionDel.visible = control.displayedCompCats.indexOf(parseInt(competitionDel.thisData['cat_id'])) >= 0
|
||||
checked = getCheckedState()
|
||||
|
|
|
@ -60,16 +60,7 @@ DataListView {
|
|||
|
||||
enabled: control.widgetData['route_order'] === "-1" && Object.keys(control.widgetData['route_names']).length > 2
|
||||
|
||||
onClicked: {
|
||||
if(speedFlowChartBackgroundRect.state === "hidden"){
|
||||
speedFlowChartBackgroundRect.state = "visible"
|
||||
control.positionViewAtBeginning()
|
||||
}
|
||||
else {
|
||||
speedFlowChartBackgroundRect.state = "hidden"
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: speedFlowChartBackgroundRect.toggle()
|
||||
icon.name: "flowchart"
|
||||
}
|
||||
}
|
||||
|
@ -113,6 +104,14 @@ DataListView {
|
|||
}
|
||||
}
|
||||
|
||||
function onBackRequested() {
|
||||
if(!speedFlowChartBackgroundRect.isVisible())
|
||||
return true
|
||||
|
||||
speedFlowChartBackgroundRect.toggle()
|
||||
return false
|
||||
}
|
||||
|
||||
function getSubtitle() {
|
||||
var titleString
|
||||
|
||||
|
@ -182,7 +181,7 @@ DataListView {
|
|||
|
||||
enabled: speedFlowChartBackgroundRect.state === "hidden"
|
||||
|
||||
width: parent.width
|
||||
width: control.width
|
||||
height: 70
|
||||
|
||||
text: ""
|
||||
|
@ -296,7 +295,9 @@ DataListView {
|
|||
model: parseInt(widgetData[ "route_num_problems" ])
|
||||
|
||||
function getDataForIcon(index){
|
||||
// TODO: clean
|
||||
var resultString = widgetData[ "participants" ][partDel.ind]["boulder"+(index+1)]
|
||||
var numTrys = widgetData[ "participants" ][partDel.ind]["try"+(index+1)]
|
||||
|
||||
var resultList = []
|
||||
|
||||
|
@ -314,6 +315,13 @@ DataListView {
|
|||
resultList = [-1,-1]
|
||||
}
|
||||
|
||||
if (numTrys !== undefined) {
|
||||
resultList.push(numTrys)
|
||||
}
|
||||
else {
|
||||
resultList.push(-1)
|
||||
}
|
||||
|
||||
return resultList
|
||||
}
|
||||
|
||||
|
@ -449,6 +457,27 @@ DataListView {
|
|||
|
||||
}
|
||||
|
||||
Label {
|
||||
id: boulderResTrysLa
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
height: parent.height / 2
|
||||
width: parent.width / 2
|
||||
|
||||
visible: !boulderResZoneLa.visible
|
||||
|
||||
fontSizeMode: Text.Fit
|
||||
font.pixelSize: height
|
||||
minimumPixelSize: 1
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
text: boulderResCv.resultData[2]
|
||||
|
||||
}
|
||||
|
||||
Label {
|
||||
id: boulderResZoneLa
|
||||
|
||||
|
@ -734,6 +763,20 @@ DataListView {
|
|||
|
||||
color: Material.background
|
||||
|
||||
function toggle() {
|
||||
if(speedFlowChartBackgroundRect.state === "hidden"){
|
||||
speedFlowChartBackgroundRect.state = "visible"
|
||||
control.positionViewAtBeginning()
|
||||
}
|
||||
else {
|
||||
speedFlowChartBackgroundRect.state = "hidden"
|
||||
}
|
||||
}
|
||||
|
||||
function isVisible() {
|
||||
return speedFlowChartBackgroundRect.state === "visible"
|
||||
}
|
||||
|
||||
SpeedFlowChart {
|
||||
id: speedFlowChart
|
||||
|
||||
|
|
|
@ -121,6 +121,7 @@ Window {
|
|||
anchors.fill: parent
|
||||
|
||||
Component.onCompleted: {
|
||||
//loadingDl.open()
|
||||
//app.openAthlete(53139) // dorian: 53139 , rustam: 6933 , helen: 53300
|
||||
//openWidget({nation:'GER'})
|
||||
//mainStack.push("Pages/AthleteSearchPage.qml")
|
||||
|
@ -130,11 +131,7 @@ Window {
|
|||
Shortcut {
|
||||
sequences: ["Esc", "Back"]
|
||||
enabled: mainStack.depth > 1
|
||||
onActivated: {
|
||||
if(!mainStack.currentItem.locked){
|
||||
mainStack.pop()
|
||||
}
|
||||
}
|
||||
onActivated: app.goBack()
|
||||
}
|
||||
|
||||
ServerConn {
|
||||
|
@ -224,12 +221,7 @@ Window {
|
|||
|
||||
height: parent.height
|
||||
|
||||
onClicked: {
|
||||
if(!mainStack.currentItem.locked){
|
||||
mainStack.pop()
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: app.goBack()
|
||||
icon.name: "back"
|
||||
}
|
||||
|
||||
|
@ -445,7 +437,7 @@ Window {
|
|||
]
|
||||
}
|
||||
|
||||
Dialog {
|
||||
Popup {
|
||||
id: loadingDl
|
||||
|
||||
x: ( app.width - width ) / 2
|
||||
|
@ -455,6 +447,9 @@ Window {
|
|||
closePolicy: Dialog.NoAutoClose
|
||||
|
||||
contentItem: Column {
|
||||
|
||||
spacing: 50
|
||||
|
||||
FancyBusyIndicator {
|
||||
running: true
|
||||
}
|
||||
|
@ -464,10 +459,17 @@ Window {
|
|||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
font.bold: true
|
||||
color: "white"
|
||||
|
||||
text: "loading..."
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Store {
|
||||
|
@ -519,6 +521,11 @@ Window {
|
|||
}
|
||||
}
|
||||
|
||||
function goBack() {
|
||||
if(!mainStack.currentItem.hasOwnProperty('onBackRequested') || mainStack.currentItem.onBackRequested())
|
||||
mainStack.pop()
|
||||
}
|
||||
|
||||
function getErrorInfo(errorCode) {
|
||||
|
||||
var infoLevel
|
||||
|
|
Loading…
Reference in a new issue