From cf1c9012d9fe368081d473148b9ef0c0128ae4f9 Mon Sep 17 00:00:00 2001 From: "lxbpxylps@126.com" Date: Sun, 31 Oct 2021 14:17:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E7=BB=98=E5=9B=BE=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E6=9B=B2=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data.json | 2 +- mainwindow.py | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/data.json b/data.json index 9c5601a..dddbdf9 100644 --- a/data.json +++ b/data.json @@ -1 +1 @@ -{"time": "2021-10-30 16:25:15", "node2": {"humi": 40.9, "temp": 25.6, "light": 389.2}, "node3": {"humi": 44.5, "temp": 26.7, "light": 14.2}, "node4": {"humi": 46.3, "temp": 26.0, "light": 12.5}, "node5": {"humi": 46.5, "temp": 25.3, "light": 13.3}} \ No newline at end of file +{"time": "2021-10-31 14:13:45", "node2": {"humi": 46.4, "temp": 25.6, "light": 80.8}, "node3": {"humi": 47.6, "temp": 26.3, "light": 73.3}, "node4": {"humi": 47.3, "temp": 26.4, "light": 124.2}, "node5": {"humi": 47.4, "temp": 25.7, "light": 130.8}} \ No newline at end of file diff --git a/mainwindow.py b/mainwindow.py index 8adb1a6..a342b68 100644 --- a/mainwindow.py +++ b/mainwindow.py @@ -32,7 +32,14 @@ class MainWindow(QMainWindow): menubar_file = menubar.addMenu('文件') menubar_file.addAction(exit_action) - # 菜单栏-绘图 + # 菜单栏-校准 + adjust_action = QAction('&校准菜单', self) + adjust_action.triggered.connect(lambda: sys.exit()) + + menubar_adjust = menubar.addMenu('校准') + menubar_adjust.addAction(adjust_action) + + # 菜单栏-曲线 draw_node2_action = QAction('&节点2', self) draw_node3_action = QAction('&节点3', self) draw_node4_action = QAction('&节点4', self) @@ -43,7 +50,7 @@ class MainWindow(QMainWindow): self.node4_drawwindow = DrawWindow() self.node5_drawwindow = DrawWindow() - menubar_draw = menubar.addMenu('绘图') + menubar_draw = menubar.addMenu('曲线') menubar_draw.addAction(draw_node2_action) menubar_draw.addAction(draw_node3_action) menubar_draw.addAction(draw_node4_action)