Parcourir la source

generalSettings => globalSettings

Change-Id: Ia8bbd461a02e4ec2670665ae6c2fc89e22e076f0
Donald Carr il y a 9 ans
Parent
commit
4347830ef7
5 fichiers modifiés avec 21 ajouts et 21 suppressions
  1. 6 6
      qml/basic/Basic.qml
  2. 2 2
      qml/common/ArtImage.qml
  3. 1 1
      qml/common/View.qml
  4. 8 8
      qml/main.qml
  5. 4 4
      qml/physics/Physics.qml

+ 6 - 6
qml/basic/Basic.qml

@@ -22,7 +22,7 @@ View {
 
             x: width * index
             height: parent.height
-            width: parent.width/generalSettings.columnCount
+            width: parent.width/globalSettings.columnCount
 
             Item {
                 id: artworkStack
@@ -51,8 +51,8 @@ View {
                 function addImage() {
                     var image = pictureDelegate.createObject(artworkStack)
 
-                    if (generalSettings.effect !== "" && Effects.validate(generalSettings.effect)) {
-                        image.effect = effectDelegate.createObject(artworkStack, { target: image, effect: generalSettings.effect })
+                    if (globalSettings.effect !== "" && Effects.validate(globalSettings.effect)) {
+                        image.effect = effectDelegate.createObject(artworkStack, { target: image, effect: globalSettings.effect })
                     }
 
                     artworkHeight += image.height
@@ -95,7 +95,7 @@ View {
 
                 Timer {
                     id: deathTimer
-                    running: !generalSettings.commonFeed && artworkStack.initialized
+                    running: !globalSettings.commonFeed && artworkStack.initialized
                     repeat: true
                     interval: globalUtil.adjustedInterval
                     onTriggered: artworkStack.shift()
@@ -112,6 +112,6 @@ View {
         }
     }
 
-    Keys.onUpPressed: generalSettings.interval++
-    Keys.onDownPressed: generalSettings.interval = Math.max(1, generalSettings.interval - 1)
+    Keys.onUpPressed: globalSettings.interval++
+    Keys.onDownPressed: globalSettings.interval = Math.max(1, globalSettings.interval - 1)
 }

+ 2 - 2
qml/common/ArtImage.qml

@@ -6,8 +6,8 @@ Image {
     fillMode: Image.PreserveAspectCrop
     source: imageModel.randomPicture()
     width: parent.width
-    mirror: generalSettings.randomlyMirrorArt && (Math.random() < 0.5)
-    smooth: generalSettings.smoothArt
+    mirror: globalSettings.randomlyMirrorArt && (Math.random() < 0.5)
+    smooth: globalSettings.smoothArt
 
     sourceSize.height: height
     sourceSize.width: width

+ 1 - 1
qml/common/View.qml

@@ -19,7 +19,7 @@ Item {
 
     Timer {
         id: globalDeathTimer
-        running: generalSettings.commonFeed && globalUtil.primed
+        running: globalSettings.commonFeed && globalUtil.primed
         repeat: true
         interval: globalUtil.adjustedInterval
         onTriggered: columnArray[globalUtil.columnSelection()].shift()

+ 8 - 8
qml/main.qml

@@ -19,9 +19,9 @@ Window {
         property int currentColumn: 0
         property bool primed: d.primedColumns === columnCount
 
-        property bool commonFeedRoundRobin: generalSettings.commonFeedRoundRobin
-        property int columnCount: generalSettings.columnCount
-        property int adjustedInterval: 1000*(generalSettings.interval > 60 ? 60*(generalSettings.interval-60) : Math.max(generalSettings.interval, 1))
+        property bool commonFeedRoundRobin: globalSettings.commonFeedRoundRobin
+        property int columnCount: globalSettings.columnCount
+        property int adjustedInterval: 1000*(globalSettings.interval > 60 ? 60*(globalSettings.interval-60) : Math.max(globalSettings.interval, 1))
 
         function registerColumnPrimed() {
             d.primedColumns++
@@ -44,7 +44,7 @@ Window {
     }
 
     Settings {
-        id: generalSettings
+        id: globalSettings
         property int columnCount: 5
         property int interval: 5
         property bool viewItemCount: false
@@ -57,7 +57,7 @@ Window {
         property bool commonFeedRoundRobin: true
 
         onColumnCountChanged: globalUtil.reset()
-        Component.onCompleted: loader.source = generalSettings.view.toLowerCase() + "/" + generalSettings.view + ".qml"
+        Component.onCompleted: loader.source = globalSettings.view.toLowerCase() + "/" + globalSettings.view + ".qml"
     }
 
     Rectangle {
@@ -76,8 +76,8 @@ Window {
     Rectangle {
         id: toplevelhandler
         focus: true
-        Keys.onLeftPressed: generalSettings.columnCount = Math.max(generalSettings.columnCount-1,1)
-        Keys.onRightPressed: generalSettings.columnCount++
+        Keys.onLeftPressed: globalSettings.columnCount = Math.max(globalSettings.columnCount-1,1)
+        Keys.onRightPressed: globalSettings.columnCount++
     }
 
     Rectangle {
@@ -98,7 +98,7 @@ Window {
     Rectangle {
         z: 1
         opacity: 0.5
-        visible: generalSettings.viewItemCount
+        visible: globalSettings.viewItemCount
         color: "black"
 
         anchors { right: parent.right; top: parent.top }

+ 4 - 4
qml/physics/Physics.qml

@@ -63,8 +63,8 @@ View {
             function addImage() {
                 var image = pictureDelegate.createObject(column, { x: -1000, y: -1000 })
 
-                if (generalSettings.effect !== "" && Effects.validate(generalSettings.effect)) {
-                    image.effect = effectDelegate.createObject(column, { target: image, effect: generalSettings.effect })
+                if (globalSettings.effect !== "" && Effects.validate(globalSettings.effect)) {
+                    image.effect = effectDelegate.createObject(column, { target: image, effect: globalSettings.effect })
                 }
 
                 image.beyondThePale.connect(removeImage)
@@ -105,7 +105,7 @@ View {
                 }
             }
 
-            width: parent.width/generalSettings.columnCount
+            width: parent.width/globalSettings.columnCount
             anchors { top: parent.top; bottom: parent.bottom }
 
             World {
@@ -140,7 +140,7 @@ View {
 
             Timer {
                 id: deathTimer
-                running: !generalSettings.commonFeed && globalUtil.primed && d.paused
+                running: !globalSettings.commonFeed && globalUtil.primed && d.paused
                 repeat: true
                 interval: globalUtil.adjustedInterval
                 onTriggered: shift()