yf_zjb vor 2 Jahren
Ursprung
Commit
bce1eccd47

Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/a.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 30 - 0
q6_felgo_iot/assets/collt.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/current.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/dhl.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/floder.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/gps.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/humidity.svg


BIN
q6_felgo_iot/assets/icon.jpg


Datei-Diff unterdrückt, da er zu groß ist
+ 4 - 0
q6_felgo_iot/assets/logout.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/net.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 5 - 0
q6_felgo_iot/assets/photoico.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/reboot.svg


BIN
q6_felgo_iot/assets/screen.jpg


Datei-Diff unterdrückt, da er zu groß ist
+ 9 - 0
q6_felgo_iot/assets/screen.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/screenoff.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/set.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/tempture.svg


+ 3 - 0
q6_felgo_iot/assets/themset.svg

@@ -0,0 +1,3 @@
+<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M32 56C45.2552 56 56 45.2552 56 32C56 18.7448 45.2552 8 32 8C18.7448 8 8 18.7448 8 32C8 45.2552 18.7448 56 32 56ZM32 51.2V12.8C37.0922 12.8 41.9758 14.8229 45.5765 18.4236C49.1772 22.0242 51.2 26.9078 51.2 32C51.2 37.0922 49.1772 41.9758 45.5765 45.5765C41.9758 49.1772 37.0922 51.2 32 51.2Z" fill="#0AA26B"/>
+</svg>

+ 3 - 0
q6_felgo_iot/assets/time.svg

@@ -0,0 +1,3 @@
+<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M32 54C19.85 54 10 44.15 10 32C10 19.85 19.85 10 32 10C44.15 10 54 19.85 54 32C54 44.15 44.15 54 32 54ZM34 19H30V32.828L38 40.828L40.828 38L34 31.172V19Z" fill="#0AA26B"/>
+</svg>

Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/updateapp.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/updateboard.svg


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
q6_felgo_iot/assets/vbat.svg


+ 3 - 0
q6_felgo_iot/assets/ztl.svg

@@ -0,0 +1,3 @@
+<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M10 14C7.79086 14 6 15.7909 6 18V46.0002C6 48.2093 7.79086 50.0002 10 50.0002H54C56.2091 50.0002 58 48.2093 58 46.0002V18C58 15.7909 56.2091 14 54 14H10ZM11.8519 18.0002C10.7473 18.0002 9.85185 18.8957 9.85185 20.0002C9.85185 21.1048 10.7473 22.0002 11.8519 22.0002H52.1481C53.2527 22.0002 54.1481 21.1048 54.1481 20.0002C54.1481 18.8957 53.2527 18.0002 52.1481 18.0002H11.8519Z" fill="#0AA26B"/>
+</svg>

+ 99 - 0
q6_felgo_iot/qml/model/NumberPad.qml

@@ -0,0 +1,99 @@
+// NumberPad.qml
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import Felgo 4.0
+
+Item {
+    property alias txtPassword: passwd_tf
+    property alias mlogin: btn_login
+
+    width: 300
+    height: 400
+
+    MouseArea {
+        anchors.fill: parent
+        onClicked: {
+            console.log("AppPage clicked!")
+            // 在这里添加处理点击事件的逻辑
+            //设置屏幕亮度为?
+            serial.setLightness(128)
+            loginpage.logintimeout = 0
+        }
+    }
+
+    ColumnLayout {
+        anchors.fill: parent
+
+
+        AppTextField {
+            id: passwd_tf
+            background: Rectangle {
+                color: "lightgray"
+                radius: 5
+            }
+
+            Layout.alignment: Qt.AlignCenter
+            font.pixelSize: 20
+            inputMode: inputModePassword
+            //readOnly: false
+            horizontalAlignment: Qt.AlignLeft
+            placeholderText: "请输入密码"
+            cursorDelegate: Rectangle {
+                visible: false
+            }
+        }
+
+        GridLayout {
+            id: grid
+            columns: 3
+            columnSpacing: -5
+            rowSpacing: -5
+            //spacing: 5
+
+            Repeater {
+                model: 10
+                AppButton {
+                    flat: false
+                    width: 50
+                    height: 50
+                    text: (index + 1) % 10
+                    fontBold: true
+                    backgroundColor: "white"
+
+                    onClicked: {
+                        console.log("text:",text)
+                        passwd_tf.text += text
+                    }
+                }
+            }
+
+            AppButton {
+                width: 50
+                height: 50
+                text: "清空"
+                textColor: "black"
+                flat: false
+                backgroundColor: "white"
+
+                onClicked: {
+                    passwd_tf.text = ""
+                }
+            }
+
+            AppButton {
+                id: btn_login
+                width: 40
+                height: 40
+                flat: false
+                text: "解锁"
+                textColor: "white"
+                backgroundColor: "green"
+                borderColor: "green"
+                onClicked: {
+                    console.log("解锁")
+                }
+            }
+        }
+    }
+}

+ 48 - 0
q6_felgo_iot/shaders/mandelbrot.frag

@@ -0,0 +1,48 @@
+//! [1]
+#version 440
+
+layout(location = 0) in vec2 vTexCoord;
+
+layout(location = 0) out vec4 fragColor;
+
+//! [2]
+// uniform block: 84 bytes
+layout(std140, binding = 0) uniform buf {
+    mat4 qt_Matrix; // offset 0
+    float qt_Opacity; // offset 64
+    float zoom; // offset 68
+    vec2 center; // offset 72
+    int limit; // offset 80
+} ubuf;
+//! [2]
+
+void main()
+{
+    vec4 color1 = vec4(1.0, 0.85, 0.55, 1);
+    vec4 color2 = vec4(0.226, 0.0, 0.615, 1);
+
+    float aspect_ratio = -ubuf.qt_Matrix[0][0]/ubuf.qt_Matrix[1][1];
+    vec2 z, c;
+
+    c.x = (vTexCoord.x - 0.5) / ubuf.zoom + ubuf.center.x;
+    c.y = aspect_ratio * (vTexCoord.y - 0.5) / ubuf.zoom + ubuf.center.y;
+
+    int i;
+    z = c;
+    for (i = 0; i < ubuf.limit; i++) {
+        float x = (z.x * z.x - z.y * z.y) + c.x;
+        float y = (z.y * z.x + z.x * z.y) + c.y;
+
+        if ((x * x + y * y) > 4.0) break;
+        z.x = x;
+        z.y = y;
+    }
+
+    if (i == ubuf.limit) {
+        fragColor = vec4(0.0, 0.0, 0.0, 1.0);
+    } else {
+        float f = (i * 1.0) / ubuf.limit;
+        fragColor = mix(color1, color2, sqrt(f));
+    }
+}
+//! [1]

+ 22 - 0
q6_felgo_iot/shaders/mandelbrot.vert

@@ -0,0 +1,22 @@
+#version 440
+
+layout(location = 0) in vec4 aVertex;
+layout(location = 1) in vec2 aTexCoord;
+
+layout(location = 0) out vec2 vTexCoord;
+
+layout(std140, binding = 0) uniform buf {
+    mat4 qt_Matrix;
+    float qt_Opacity;
+    float zoom;
+    vec2 center;
+    int limit;
+} ubuf;
+
+out gl_PerVertex { vec4 gl_Position; };
+
+void main()
+{
+    gl_Position = ubuf.qt_Matrix * aVertex;
+    vTexCoord = aTexCoord;
+}