소스 검색

新增 tunnel,但是不好用。完结

mrh 2 년 전
부모
커밋
94f3a07042

+ 2 - 1
.gitignore

@@ -1,2 +1,3 @@
 __pycache__
-env
+env
+qt-apps-qmllive

+ 0 - 0
autoGPT-1-cf-tunnel/.gitignore


+ 19 - 0
autoGPT-1-cf-tunnel/main.py

@@ -0,0 +1,19 @@
+import sys
+import logging
+
+from PySide6.QtCore import QDir, QFile, QUrl
+from PySide6.QtGui import QGuiApplication
+from PySide6.QtQml import QQmlApplicationEngine
+from PySide6.QtSql import QSqlDatabase
+
+
+if __name__ == "__main__":
+    app = QGuiApplication()
+
+    engine = QQmlApplicationEngine()
+    engine.load(QUrl("ui/main.qml"))
+
+    if not engine.rootObjects():
+        sys.exit(-1)
+
+    app.exec()

+ 10 - 0
autoGPT-1-cf-tunnel/project_document.md

@@ -0,0 +1,10 @@
+# Project Document
+
+This document provides an overview of the purpose and meaning of each file in the project.
+
+- `intranet_penetration_ui.qml`: The main QML file for the user interface of the intranet penetration software.
+- `UserPage.qml`: The QML file for the User page, which includes user login and tunnel usage information.
+- `TunnelPage.qml`: The QML file for the Tunnel page, which allows users to manage tunnels and choose tunnel types.
+- `ApplicationPage.qml`: The QML file for the Application page, which displays application scenario entities and plugin tools.
+- `SettingsPage.qml`: The QML file for the Settings page, where users can configure the software settings.
+- `AboutPage.qml`: The QML file for the About page, which provides information about the software and its developers.

BIN
autoGPT-1-cf-tunnel/qtdoc-index.html.lnk


+ 7 - 0
autoGPT-1-cf-tunnel/ui/AboutPage.qml

@@ -0,0 +1,7 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.15
+
+Item {
+  // Implement AboutPage functionality
+}

+ 7 - 0
autoGPT-1-cf-tunnel/ui/ApplicationPage.qml

@@ -0,0 +1,7 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.15
+
+Item {
+  // Implement ApplicationPage functionality
+}

+ 7 - 0
autoGPT-1-cf-tunnel/ui/SettingsPage.qml

@@ -0,0 +1,7 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.15
+
+Item {
+  // Implement SettingsPage functionality
+}

+ 7 - 0
autoGPT-1-cf-tunnel/ui/TunnelPage.qml

@@ -0,0 +1,7 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.15
+
+Item {
+  // Implement TunnelPage functionality
+}

+ 7 - 0
autoGPT-1-cf-tunnel/ui/UserPage.qml

@@ -0,0 +1,7 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.15
+
+Item {
+  // Implement UserPage functionality
+}

+ 9 - 0
autoGPT-1-cf-tunnel/ui/file_logger.txt

@@ -0,0 +1,9 @@
+File Operation Logger write: intranet_penetration_ui.qml #8470f5bcf06ccf8e8caeae0e7bfaa966
+write: intranet_penetration_ui.qml #0a6fd5871f6b771978252cc643c035cd
+write: intranet_penetration_ui.qml #f7238ceed734dacf512365f091d14c38
+write: UserPage.qml #20c7234296f71bc1e692e7c024ede3a5
+write: TunnelPage.qml #4e3f2ebaf67267ad6c0a600e21b19831
+write: ApplicationPage.qml #0679ce15a2921d16932a3b772117e6bf
+write: SettingsPage.qml #59285544ea890b184feabfbf55a6627a
+write: AboutPage.qml #783d91b10b9ba48a1e48e23dfc3b2320
+write: project_document.md #a78a47f1933d63b9ea94bf574efb0a20

BIN
autoGPT-1-cf-tunnel/ui/images/about.png


BIN
autoGPT-1-cf-tunnel/ui/images/appstoreadd.png


BIN
autoGPT-1-cf-tunnel/ui/images/list.png


BIN
autoGPT-1-cf-tunnel/ui/images/setting-fill.png


+ 1 - 0
autoGPT-1-cf-tunnel/ui/images/setting.svg

@@ -0,0 +1 @@
+<svg t="1698916346104" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="200" height="200"><path d="M512.5 390.6c-29.9 0-57.9 11.6-79.1 32.8-21.1 21.2-32.8 49.2-32.8 79.1 0 29.9 11.7 57.9 32.8 79.1 21.2 21.1 49.2 32.8 79.1 32.8 29.9 0 57.9-11.7 79.1-32.8 21.1-21.2 32.8-49.2 32.8-79.1 0-29.9-11.7-57.9-32.8-79.1-21.2-21.2-49.2-32.8-79.1-32.8z" fill="#06f24b" p-id="1147"></path><path d="M924.8 626.1l-65.4-55.9c3.1-19 4.7-38.4 4.7-57.7s-1.6-38.8-4.7-57.7l65.4-55.9c10.1-8.6 13.8-22.6 9.3-35.2l-0.9-2.6c-18.1-50.4-44.8-96.8-79.6-137.7l-1.8-2.1c-8.6-10.1-22.5-13.9-35.1-9.5l-81.2 28.9c-30-24.6-63.4-44-99.6-57.5l-15.7-84.9c-2.4-13.1-12.7-23.3-25.8-25.7l-2.7-0.5c-52-9.4-106.8-9.4-158.8 0l-2.7 0.5c-13.1 2.4-23.4 12.6-25.8 25.7l-15.8 85.3c-35.9 13.6-69.1 32.9-98.9 57.3l-81.8-29.1c-12.5-4.4-26.5-0.7-35.1 9.5l-1.8 2.1c-34.8 41.1-61.5 87.4-79.6 137.7l-0.9 2.6c-4.5 12.5-0.8 26.5 9.3 35.2l66.2 56.5c-3.1 18.8-4.6 38-4.6 57 0 19.2 1.5 38.4 4.6 57l-66 56.5c-10.1 8.6-13.8 22.6-9.3 35.2l0.9 2.6c18.1 50.3 44.8 96.8 79.6 137.7l1.8 2.1c8.6 10.1 22.5 13.9 35.1 9.5l81.8-29.1c29.8 24.5 63 43.9 98.9 57.3l15.8 85.3c2.4 13.1 12.7 23.3 25.8 25.7l2.7 0.5c26.1 4.7 52.7 7.1 79.4 7.1 26.7 0 53.4-2.4 79.4-7.1l2.7-0.5c13.1-2.4 23.4-12.6 25.8-25.7l15.7-84.9c36.2-13.6 69.6-32.9 99.6-57.5l81.2 28.9c12.5 4.4 26.5 0.7 35.1-9.5l1.8-2.1c34.8-41.1 61.5-87.4 79.6-137.7l0.9-2.6c4.3-12.4 0.6-26.3-9.5-35z m-412.3 52.2c-97.1 0-175.8-78.7-175.8-175.8s78.7-175.8 175.8-175.8 175.8 78.7 175.8 175.8-78.7 175.8-175.8 175.8z" fill="#06f24b" p-id="1148"></path></svg>

BIN
autoGPT-1-cf-tunnel/ui/images/user.png


+ 84 - 0
autoGPT-1-cf-tunnel/ui/main.qml

@@ -0,0 +1,84 @@
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import QtQuick.Controls.Material
+
+ApplicationWindow {
+    id: mainWindow
+    width: 800
+    height: 600
+    visible: true
+    GridLayout {
+        columns: 2
+        anchors.fill: parent
+        Column{
+            anchors.top: parent.top
+            spacing: 20
+            Layout.column:0
+            Layout.row: 0
+            Rectangle{
+                Button { 
+                    background: null
+                    icon.source: './images/user.png'; 
+                    onClicked: mainStack.push(Qt.resolvedUrl('UserPage.qml')) 
+                }
+            }
+            Button { 
+                icon.source: './images/list.png'; onClicked: mainStack.push(Qt.resolvedUrl('TunnelPage.qml')) 
+            }
+            Button { 
+                icon.source: './images/appstoreadd.png'; 
+                onClicked: mainStack.push(Qt.resolvedUrl('ApplicationPage.qml')) 
+            }
+            Button { 
+                icon.source: './images/setting.svg'; onClicked: mainStack.push(Qt.resolvedUrl('SettingsPage.qml')) 
+            }
+            Button { 
+                icon.source: './images/about.png'; onClicked: mainStack.push(Qt.resolvedUrl('AboutPage.qml')) 
+            }
+        }
+
+        // Button { 
+        //     Layout.column:0
+        //     Layout.row: 0
+        //     icon.source: './images/user.png'; 
+        //     onClicked: mainStack.push(Qt.resolvedUrl('UserPage.qml')) 
+        // }
+        // Button { 
+        //     Layout.column:0
+        //     Layout.row:1
+        //     icon.source: './images/list.png'; onClicked: mainStack.push(Qt.resolvedUrl('TunnelPage.qml')) 
+        // }
+        // Button { 
+        //     Layout.column:0
+        //     Layout.row:2
+        //     icon.source: './images/appstoreadd.png'; 
+        //     onClicked: mainStack.push(Qt.resolvedUrl('ApplicationPage.qml')) 
+        // }
+        // Button { 
+        //     Layout.column:0
+        //     Layout.row:3
+        //     icon.source: './images/setting.svg'; onClicked: mainStack.push(Qt.resolvedUrl('SettingsPage.qml')) 
+        // }
+        // Button { 
+        //     Layout.column:0
+        //     Layout.row:4
+        //     icon.source: './images/about.png'; onClicked: mainStack.push(Qt.resolvedUrl('AboutPage.qml')) 
+        // }
+        //etc
+    }
+//   Drawer {
+//     id: drawer
+//     width: mainWindow.width * 0.5
+//     height: mainWindow.height
+
+//   }
+
+  StackView {
+    id: mainStack
+    anchors.fill: parent
+    initialItem: Qt.resolvedUrl('UserPage.qml')
+  }
+
+  // Optimize performance and user experience
+}

+ 0 - 0
chat-database.sqlite3


+ 0 - 0
chat.log


+ 37 - 0
readme.md

@@ -1,3 +1,11 @@
+
+- 不支持 css 文件,即便支持,也需要编译QT库,一点也不优雅好用 https://github.com/Ableton/aqt-stylesheets
+- 开发工具难用到无语,实时预览都不太支持,问题很多,安装包都要 2.5G ,不支持 vscode
+- 社区资源太少,不火的东西说明没前途
+- 不够现代化,连 element 、vue 这种非常好看的样式都用不了,要自己一点点定义,浪费时间和生命
+- 教程少的可怜
+
+
 # 介绍
 QML 是一种声明性语言,它能比传统语言更快更好地开发项目
 
@@ -19,6 +27,35 @@ python -c "import sys; print(sys.getdefaultencoding())"  看到系统编码明
 详见: 1-YourFirstQtQuickQMLApplication
 
 
+
+python -c "import PySide6.QtCore; print(PySide6.QtCore.__version__)"
+
+官方 QML 文档:
+https://doc.qt.io/qt-6/qml-qtquick-controls-button.html
+
+
+
+# 安装QT(不好用文件太大)
+参考 https://blog.csdn.net/zhizhengguan/article/details/107567449 
+
+https://download.qt.io/archive/qt/5.14/5.14.2/
+
+
+安装 make
+
+参考:https://blog.csdn.net/weixin_41896770/article/details/131262178 
+
+下载地址 Complete package, except sources : https://gnuwin32.sourceforge.net/packages/make.htm
+
+安装完成后将 `C:\Program Files (x86)\GnuWin32\bin` 假如到系统环境变量,重启 vscode
+
+https://doc.qt.io/QMLLive/qmllive-installation.html
+```shell
+git clone git@github.com:qtproject/qt-apps-qmllive.git
+cd F:\Engineer\python\Pyside6-QML\qt-apps-qmllive
+make install
+```
+
 # 为什么要使用 Pyside6
 没有用 pysimpleGUI ,因为它无法设置现代化的组件,一点也不美观