mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Remove the auto refresh list of resource because it takes too much time, instead user has to press refresh button
This commit is contained in:
parent
8aaa5deb11
commit
2a78fc7b38
2 changed files with 38 additions and 23 deletions
|
@ -58,10 +58,11 @@ Item {
|
|||
needFreshList = true
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
||||
/* Timer {
|
||||
interval: 2000; running: true; repeat: true
|
||||
onTriggered: pullFreshValues()
|
||||
}
|
||||
}*/
|
||||
|
||||
function pullFreshValues() {
|
||||
if (needFreshList) {
|
||||
|
@ -138,34 +139,46 @@ Item {
|
|||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
margin: global.horizontalMargin
|
||||
|
||||
|
||||
Item {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: totalCount.height
|
||||
|
||||
Prop.PropScalar {
|
||||
id: totalCount
|
||||
Prop.PropButton {
|
||||
id: refreshButton
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.horizontalCenter
|
||||
label: "Count"
|
||||
object: root.cache
|
||||
property: "numTotal"
|
||||
integral: true
|
||||
readOnly: true
|
||||
onSourceValueVarChanged: { updateItemListFromCache() }
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: "Refresh"
|
||||
color: needFreshList ? global.colorOrangeAccent : global.fontColor
|
||||
onPressed: { pullFreshValues() }
|
||||
}
|
||||
Prop.PropScalar {
|
||||
id: cachedCount
|
||||
anchors.left: parent.horizontalCenter
|
||||
|
||||
Item {
|
||||
anchors.left: refreshButton.right
|
||||
anchors.right: parent.right
|
||||
label: "Cached"
|
||||
object: root.cache
|
||||
property: "numCached"
|
||||
integral: true
|
||||
readOnly: true
|
||||
onSourceValueVarChanged: { updateItemListFromCache() }
|
||||
Prop.PropScalar {
|
||||
id: totalCount
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.horizontalCenter
|
||||
label: "Count"
|
||||
object: root.cache
|
||||
property: "numTotal"
|
||||
integral: true
|
||||
readOnly: true
|
||||
onSourceValueVarChanged: { updateItemListFromCache() }
|
||||
}
|
||||
Prop.PropScalar {
|
||||
id: cachedCount
|
||||
anchors.left: parent.horizontalCenter
|
||||
anchors.right: parent.right
|
||||
label: "Cached"
|
||||
object: root.cache
|
||||
property: "numCached"
|
||||
integral: true
|
||||
readOnly: true
|
||||
onSourceValueVarChanged: { updateItemListFromCache() }
|
||||
}
|
||||
}
|
||||
}
|
||||
Item {
|
||||
|
@ -210,7 +223,6 @@ Item {
|
|||
opacity: (nameFilter.text.length > 0) ? 1.0 : 0.5
|
||||
}
|
||||
}
|
||||
Prop.Prop
|
||||
}
|
||||
|
||||
Component {
|
||||
|
|
|
@ -16,10 +16,13 @@ Button {
|
|||
id: control
|
||||
text: ""
|
||||
spacing: 0
|
||||
property alias color: theContentItem.color
|
||||
|
||||
contentItem: PiText {
|
||||
id: theContentItem
|
||||
text: control.text
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: global.fontColor
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
|
|
Loading…
Reference in a new issue