Jelajahi Sumber

Add unlicensed spam

Change-Id: Iaec758662d3a6fbd1647bd1694dc1a7bd3b775bc
Donald Carr 8 tahun lalu
induk
melakukan
acc5c531cd
3 mengubah file dengan 54 tambahan dan 0 penghapusan
  1. 53 0
      qml/main.qml
  2. 1 0
      resources/resources.qrc
  3. TEMPAT SAMPAH
      resources/unlicensed.png

+ 53 - 0
qml/main.qml

@@ -80,6 +80,7 @@ Window {
         property string month
         property string currentViewFilename
         property string overrideViewFilename
+        property bool displayUnlicensed: false
 
         function setView(view) {
             d.currentViewFilename = deriveViewPath(overrideViewFilename.length ? overrideViewFilename : view)
@@ -124,6 +125,8 @@ Window {
         property bool commonFeed: true
         property bool commonFeedRoundRobin: true
 
+        property bool unlicensed: false
+
         property real artOpacity: 1.0
         property bool randomTapestryColour: false
         property bool fadeInImages: true
@@ -269,6 +272,46 @@ Window {
         showTimer.start()
     }
 
+    Item {
+        z: 1
+        visible: d.displayUnlicensed
+        anchors { right: parent.right; bottom: parent.bottom }
+        width: appWindow.width/2
+        height: appWindow.height/2
+
+        Text {
+            z: 1
+            color: "white"
+            font.pointSize: 60
+            anchors { horizontalCenter: parent.horizontalCenter; top: parent.top }
+            text: "UNLICENCED"
+        }
+
+        Image {
+            id: mug
+            property int revolutions: 1000000
+            fillMode: Image.PreserveAspectFit
+            height: appWindow.height/2
+            anchors { centerIn: parent }
+            source: "qrc:///unlicensed.png"
+            RotationAnimator {
+                   target: mug;
+                   from: 0;
+                   to: 360*mug.revolutions
+                   duration: 2000*mug.revolutions
+                   running: mug.visible
+               }
+        }
+
+        Text {
+            z: 1
+            color: "white"
+            font.pointSize: 60
+            anchors { horizontalCenter: parent.horizontalCenter; bottom: parent.bottom }
+            text: "COPY"
+        }
+    }
+
     Timer {
         id: showTimer
 
@@ -279,4 +322,14 @@ Window {
             showAtCorrectSize()
         }
     }
+
+    Timer {
+        running: true
+        interval: 60*1000
+        onTriggered: {
+            if (globalSettings.unlicensed) {
+                d.displayUnlicensed = true
+            }
+        }
+    }
 }

+ 1 - 0
resources/resources.qrc

@@ -1,5 +1,6 @@
 <RCC>
     <qresource prefix="/">
+        <file>unlicensed.png</file>
         <file>qt_logo_green_rgb.png</file>
         <file>Monty_python_foot.png</file>
         <file>shaders/billboard.fsh</file>

TEMPAT SAMPAH
resources/unlicensed.png