Quellcode durchsuchen

Login 添加登录界面

Change-Id: I29430266676117ecc8ef30bbeca264652d8c22f7
li_xingqi* vor 6 Monaten
Ursprung
Commit
83756921bc

+ 29 - 0
Login.cpp

@@ -0,0 +1,29 @@
+#include "Login.h"
+#include "ui_Login.h"
+
+Login::Login(QWidget *parent)
+    : QMainWindow(parent)
+    , ui(new Ui::Login)
+{
+    ui->setupUi(this);
+
+    initForm();
+}
+
+Login::~Login()
+{
+    delete ui;
+}
+
+void Login::initForm()
+{
+    QPixmap pixmap(":/images/logo.png");
+    QPixmap scaledPixmap = pixmap.scaled(283, 40, Qt::KeepAspectRatio);
+    ui->label->setPixmap(scaledPixmap);
+}
+
+void Login::on_pushButton_clicked()
+{
+    this->hide();
+}
+

+ 27 - 0
Login.h

@@ -0,0 +1,27 @@
+#ifndef LOGIN_H
+#define LOGIN_H
+
+#include <QMainWindow>
+
+namespace Ui {
+class Login;
+}
+
+class Login : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    explicit Login(QWidget *parent = nullptr);
+    ~Login();
+
+    void initForm();
+
+private slots:
+    void on_pushButton_clicked();
+
+private:
+    Ui::Login *ui;
+};
+
+#endif // LOGIN_H

+ 154 - 0
Login.ui

@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Login</class>
+ <widget class="QMainWindow" name="Login">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1864</width>
+    <height>1149</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <widget class="QWidget" name="widget" native="true">
+    <property name="geometry">
+     <rect>
+      <x>600</x>
+      <y>290</y>
+      <width>550</width>
+      <height>470</height>
+     </rect>
+    </property>
+    <widget class="QLineEdit" name="userNameLineEdit">
+     <property name="geometry">
+      <rect>
+       <x>58</x>
+       <y>167</y>
+       <width>434</width>
+       <height>50</height>
+      </rect>
+     </property>
+     <property name="font">
+      <font>
+       <pointsize>14</pointsize>
+      </font>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="passLineEdit">
+     <property name="geometry">
+      <rect>
+       <x>58</x>
+       <y>253</y>
+       <width>434</width>
+       <height>50</height>
+      </rect>
+     </property>
+     <property name="font">
+      <font>
+       <pointsize>14</pointsize>
+      </font>
+     </property>
+     <property name="echoMode">
+      <enum>QLineEdit::Password</enum>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton">
+     <property name="geometry">
+      <rect>
+       <x>58</x>
+       <y>351</y>
+       <width>434</width>
+       <height>50</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Sing in</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label">
+     <property name="geometry">
+      <rect>
+       <x>134</x>
+       <y>73</y>
+       <width>283</width>
+       <height>40</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_pass">
+     <property name="geometry">
+      <rect>
+       <x>87</x>
+       <y>268</y>
+       <width>16</width>
+       <height>20</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_user">
+     <property name="geometry">
+      <rect>
+       <x>87</x>
+       <y>181</y>
+       <width>20</width>
+       <height>22</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="Line" name="line">
+     <property name="geometry">
+      <rect>
+       <x>123</x>
+       <y>180</y>
+       <width>1</width>
+       <height>24</height>
+      </rect>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+    <widget class="Line" name="line_2">
+     <property name="geometry">
+      <rect>
+       <x>123</x>
+       <y>266</y>
+       <width>1</width>
+       <height>24</height>
+      </rect>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="widget_2" native="true">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>0</y>
+      <width>1768</width>
+      <height>1049</height>
+     </rect>
+    </property>
+   </widget>
+   <zorder>widget_2</zorder>
+   <zorder>widget</zorder>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

+ 143 - 35
MainWnd.cpp

@@ -1,8 +1,9 @@
 #include "MainWnd.h"
 #include "ui_MainWnd.h"
-#include "Demo001_1.h"
-#include "Demo001_2.h"
-#include "Demo001_3.h"
+#include "Login.h"
+#include <QMouseEvent>
+#include <qDebug>
+#include "OriginalWnd/OriginalWnd.h"
 
 MainWnd::MainWnd(QWidget *parent)
     : QMainWindow(parent)
@@ -31,47 +32,154 @@ void MainWnd::initForm()
     QPixmap scaledPixmap = pixmap.scaled(90, 49, Qt::KeepAspectRatio);
     ui->label_logo->setPixmap(scaledPixmap);
 
-    ui->tabBondBtn->setIcon(QIcon(":/images/light/home.png"));
-    ui->tabBondBtn_2->setIcon(QIcon(":/images/light/Productionn assistance.png"));
-    ui->tabBondBtn_3->setIcon(QIcon(":/images/light/Program.png"));
-    ui->tabBondBtn_4->setIcon(QIcon(":/images/light/Message.png"));
-    ui->tabBondBtn_5->setIcon(QIcon(":/images/light/Module.png"));
-    ui->tabBondBtn_6->setIcon(QIcon(":/images/light/Disposition.png"));
-    ui->tabBondBtn_7->setIcon(QIcon(":/images/light/Diagnosis.png"));
-    ui->tabBondBtn_8->setIcon(QIcon(":/images/light/System.png"));
-    ui->tabBondBtn_9->setIcon(QIcon(":/images/light/Help.png"));
-    ui->tabBondBtn_2->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
-
-    ui->toolButton->setIcon(QIcon(":/images/light/stop.png"));
-    ui->toolButton_2->setIcon(QIcon(":/images/light/start.png"));
-    ui->toolButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
-    ui->toolButton_2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+    Login *login = new Login;
+    ui->stackedWidget_3->addWidget(login);
+    ui->stackedWidget_3->setCurrentIndex(ui->stackedWidget_3->indexOf(login));
+
+    //登录监听
+    ui->label_logo->installEventFilter(this);
+
+    //安装监听事件,点击左侧按钮图标变化
+    ui->tabBondBtn->installEventFilter(this);
+    ui->tabBondBtn_2->installEventFilter(this);
+    ui->tabBondBtn_3->installEventFilter(this);
+    ui->tabBondBtn_4->installEventFilter(this);
+    ui->tabBondBtn_5->installEventFilter(this);
+    ui->tabBondBtn_6->installEventFilter(this);
+    ui->tabBondBtn_7->installEventFilter(this);
+    ui->tabBondBtn_8->installEventFilter(this);
+    ui->tabBondBtn_9->installEventFilter(this);
+}
 
+bool MainWnd::eventFilter(QObject *obj, QEvent *event)
+{
 
-    ui->label_6->setPixmap(QPixmap(":/images/light/user.png").scaled(20, 20, Qt::KeepAspectRatio));
+    if (obj == this->ui->label_logo)
+    {
+        //判断事件类型是否为鼠标事件
+        if (event->type() == QEvent::MouseButtonPress)
+        {
+            //转换为鼠标事件
+            QMouseEvent* mouseenevt = static_cast<QMouseEvent*>(event);
+            //判断鼠标左键点击
+            if (mouseenevt->button() == Qt::LeftButton)
+            {
+                Login *login = new Login;
+                ui->stackedWidget_3->addWidget(login);
+                ui->stackedWidget_3->setCurrentIndex(ui->stackedWidget_3->indexOf(login));
+                return true;
+            }
+        }
+    }
+
+    static const QStringList buttonNames = {
+        "home",
+        "Productionn assistance",
+        "Program",
+        "Message",
+        "Module",
+        "Disposition",
+        "Diagnosis",
+        "System",
+        "Help"
+    };
+    static QToolButton* lastHoveredButton = nullptr; // 用于跟踪上一个悬停的按钮
+    static QMap<QToolButton*, QString> buttonLightIcons; // 存储每个按钮的亮色图标路径
+
+    // 处理鼠标按下事件或鼠标悬停进入事件
+    if (event->type() == QEvent::MouseButtonPress || event->type() == QEvent::HoverEnter) {
+        if (obj && obj->inherits("QToolButton")) {
+            QToolButton* button = static_cast<QToolButton*>(obj);
+
+            // 恢复所有按钮为亮色图标(如果没有选中)
+            for (int i = 0; i < buttonNames.size(); ++i) {
+                QToolButton* currentButton = nullptr;
+                switch (i) {
+                case 0: currentButton = ui->tabBondBtn; break;
+                case 1: currentButton = ui->tabBondBtn_2; break;
+                case 2: currentButton = ui->tabBondBtn_3; break;
+                case 3: currentButton = ui->tabBondBtn_4; break;
+                case 4: currentButton = ui->tabBondBtn_5; break;
+                case 5: currentButton = ui->tabBondBtn_6; break;
+                case 6: currentButton = ui->tabBondBtn_7; break;
+                case 7: currentButton = ui->tabBondBtn_8; break;
+                case 8: currentButton = ui->tabBondBtn_9; break;
+                }
+
+                if (currentButton) {
+                    QString lightIconPath = QString(":/images/light/%1.png").arg(buttonNames[i]);
+                    if (currentButton == button) {
+                        // 当前悬停的按钮,设置为深色图标
+                        QString deepIconPath = QString(":/images/deep/%1.png").arg(buttonNames[i]);
+                        currentButton->setIcon(QIcon(deepIconPath));
+                        currentButton->setChecked(true);
+                    } else if (!currentButton->isChecked()) {
+                        // 恢复为亮色图标
+                        buttonLightIcons[currentButton] = lightIconPath; // 存储亮色图标路径
+                        currentButton->setIcon(QIcon(lightIconPath));
+                    }
+                }
+            }
+
+            // 如果上一个悬停按钮存在且不是当前按钮,恢复其亮色图标
+            if (lastHoveredButton && lastHoveredButton != button && !lastHoveredButton->isChecked()) {
+                QString lightIconPath = buttonLightIcons.value(lastHoveredButton);
+                if (!lightIconPath.isEmpty()) {
+                    lastHoveredButton->setIcon(QIcon(lightIconPath));
+                }
+            }
+
+            lastHoveredButton = button; // 更新为当前悬停的按钮
+        }
+        return true; // 表示事件已处理
+    }
+
+    // 处理鼠标离开事件
+    if (event->type() == QEvent::HoverLeave) {
+        if (obj && obj->inherits("QToolButton")) {
+            QToolButton* button = static_cast<QToolButton*>(obj);
+            if (button == lastHoveredButton && !button->isChecked()) {
+                QString lightIconPath = buttonLightIcons.value(button);
+                if (!lightIconPath.isEmpty()) {
+                    button->setIcon(QIcon(lightIconPath));
+                }
+                lastHoveredButton = nullptr; // 重置上一个悬停的按钮
+            }
+        }
+        return true; // 表示事件已处理
+    }
+
+    return QWidget::eventFilter(obj, event); // 如果没有处理返回默认事件处理
 }
 
+// void MainWnd::on_pushButton_4_clicked()
+// {
+//     Demo001_1 *demo001_1 = new Demo001_1;
+//     ui->switchShowPageUI->addWidget(demo001_1);
+//     ui->switchShowPageUI->setCurrentIndex(ui->switchShowPageUI->indexOf(demo001_1));
+// }
 
-void MainWnd::on_pushButton_4_clicked()
-{
-    Demo001_1 *demo001_1 = new Demo001_1;
-    ui->switchShowPageUI->addWidget(demo001_1);
-    ui->switchShowPageUI->setCurrentIndex(ui->switchShowPageUI->indexOf(demo001_1));
-}
 
+// void MainWnd::on_pushButton_5_clicked()
+// {
+//     Demo001_2 *demo001_2 = new Demo001_2;
+//     ui->switchShowPageUI->addWidget(demo001_2);
+//     ui->switchShowPageUI->setCurrentIndex(ui->switchShowPageUI->indexOf(demo001_2));
+// }
 
-void MainWnd::on_pushButton_5_clicked()
-{
-    Demo001_2 *demo001_2 = new Demo001_2;
-    ui->switchShowPageUI->addWidget(demo001_2);
-    ui->switchShowPageUI->setCurrentIndex(ui->switchShowPageUI->indexOf(demo001_2));
-}
+
+// void MainWnd::on_pushButton_6_clicked()
+// {
+//     Demo001_3 *demo001_3 = new Demo001_3;
+//     ui->switchShowPageUI->addWidget(demo001_3);
+//     ui->switchShowPageUI->setCurrentIndex(ui->switchShowPageUI->indexOf(demo001_3));
+// }
 
 
-void MainWnd::on_pushButton_6_clicked()
+void MainWnd::on_tabBondBtn_clicked()
 {
-    Demo001_3 *demo001_3 = new Demo001_3;
-    ui->switchShowPageUI->addWidget(demo001_3);
-    ui->switchShowPageUI->setCurrentIndex(ui->switchShowPageUI->indexOf(demo001_3));
+    OriginalWnd *originalWnd = new OriginalWnd;
+    ui->stackedWidget_3->addWidget(originalWnd);
+    ui->stackedWidget_3->setCurrentIndex(ui->stackedWidget_3->indexOf(originalWnd));
 }
 

+ 5 - 3
MainWnd.h

@@ -19,12 +19,14 @@ public:
 
     void initForm();
 
+protected:
+    bool eventFilter(QObject *obj,QEvent *event);
+
 private slots:
-    void on_pushButton_4_clicked();
 
-    void on_pushButton_5_clicked();
 
-    void on_pushButton_6_clicked();
+    void on_tabBondBtn_clicked();
+
 
 private:
     Ui::MainWnd *ui;

+ 5 - 448
MainWnd.ui

@@ -525,462 +525,19 @@
      </property>
     </widget>
    </widget>
-   <widget class="QStackedWidget" name="switchShowPageUI">
-    <property name="geometry">
-     <rect>
-      <x>136</x>
-      <y>76</y>
-      <width>1102</width>
-      <height>1012</height>
-     </rect>
-    </property>
-    <property name="minimumSize">
-     <size>
-      <width>0</width>
-      <height>0</height>
-     </size>
-    </property>
-   </widget>
-   <widget class="QWidget" name="Toptitlebar" native="true">
+   <widget class="QStackedWidget" name="stackedWidget_3">
     <property name="geometry">
      <rect>
       <x>136</x>
       <y>16</y>
-      <width>1779</width>
-      <height>44</height>
-     </rect>
-    </property>
-    <widget class="QLabel" name="label">
-     <property name="geometry">
-      <rect>
-       <x>32</x>
-       <y>12</y>
-       <width>69</width>
-       <height>19</height>
-      </rect>
-     </property>
-     <property name="styleSheet">
-      <string notr="true">color : #FFFFFF</string>
-     </property>
-     <property name="text">
-      <string>name001</string>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_2">
-     <property name="geometry">
-      <rect>
-       <x>284</x>
-       <y>12</y>
-       <width>181</width>
-       <height>19</height>
-      </rect>
-     </property>
-     <property name="styleSheet">
-      <string notr="true">color : #FFFFFF</string>
-     </property>
-     <property name="text">
-      <string>Registration number 001</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton">
-     <property name="geometry">
-      <rect>
-       <x>539</x>
-       <y>7</y>
-       <width>60</width>
-       <height>30</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>Calibration</string>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_3">
-     <property name="geometry">
-      <rect>
-       <x>789</x>
-       <y>12</y>
-       <width>171</width>
-       <height>19</height>
-      </rect>
-     </property>
-     <property name="styleSheet">
-      <string notr="true">color : #FFFFFF</string>
-     </property>
-     <property name="text">
-      <string>xxxProduct lot number</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_2">
-     <property name="geometry">
-      <rect>
-       <x>1061</x>
-       <y>5</y>
-       <width>34</width>
-       <height>34</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_3">
-     <property name="geometry">
-      <rect>
-       <x>1111</x>
-       <y>5</y>
-       <width>34</width>
-       <height>34</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_4">
-     <property name="geometry">
-      <rect>
-       <x>1334</x>
-       <y>12</y>
-       <width>151</width>
-       <height>19</height>
-      </rect>
-     </property>
-     <property name="styleSheet">
-      <string notr="true">color : #FFFFFF</string>
-     </property>
-     <property name="text">
-      <string>2024-11-28 10:20:32</string>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_5">
-     <property name="geometry">
-      <rect>
-       <x>1686</x>
-       <y>12</y>
-       <width>69</width>
-       <height>19</height>
-      </rect>
-     </property>
-     <property name="styleSheet">
-      <string notr="true">color : #FFFFFF</string>
-     </property>
-     <property name="text">
-      <string>Zhangsan</string>
-     </property>
-    </widget>
-    <widget class="QLabel" name="label_6">
-     <property name="geometry">
-      <rect>
-       <x>1658</x>
-       <y>12</y>
-       <width>20</width>
-       <height>20</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-   </widget>
-   <widget class="QWidget" name="widget" native="true">
-    <property name="geometry">
-     <rect>
-      <x>1730</x>
-      <y>76</y>
-      <width>190</width>
-      <height>988</height>
-     </rect>
-    </property>
-    <widget class="QToolButton" name="toolButton">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>16</y>
-       <width>158</width>
-       <height>60</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>Stop
-production</string>
-     </property>
-    </widget>
-    <widget class="QToolButton" name="toolButton_2">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>92</y>
-       <width>158</width>
-       <height>60</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>Start of
-production</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_4">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>168</y>
-       <width>48</width>
-       <height>45</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_5">
-     <property name="geometry">
-      <rect>
-       <x>71</x>
-       <y>168</y>
-       <width>48</width>
-       <height>45</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_6">
-     <property name="geometry">
-      <rect>
-       <x>126</x>
-       <y>168</y>
-       <width>48</width>
-       <height>45</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string/>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_7">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>245</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-    <widget class="Line" name="line_2">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>229</y>
-       <width>158</width>
-       <height>1</height>
-      </rect>
-     </property>
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_8">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>306</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_9">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>367</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_10">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>428</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_11">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>489</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_12">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>550</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_13">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>611</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_14">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>672</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_15">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>733</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_16">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>794</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_17">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>855</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_18">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>900916</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-    <widget class="QPushButton" name="pushButton_20">
-     <property name="geometry">
-      <rect>
-       <x>16</x>
-       <y>916</y>
-       <width>158</width>
-       <height>48</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-   </widget>
-   <widget class="QWidget" name="widget_2" native="true">
-    <property name="geometry">
-     <rect>
-      <x>1254</x>
-      <y>76</y>
-      <width>460</width>
-      <height>988</height>
-     </rect>
-    </property>
-    <widget class="QPushButton" name="pushButton_19">
-     <property name="geometry">
-      <rect>
-       <x>328</x>
-       <y>16</y>
-       <width>76</width>
-       <height>30</height>
-      </rect>
-     </property>
-     <property name="text">
-      <string>PushButton</string>
-     </property>
-    </widget>
-   </widget>
-   <widget class="QWidget" name="widget_3" native="true">
-    <property name="geometry">
-     <rect>
-      <x>0</x>
-      <y>0</y>
-      <width>1920</width>
-      <height>1080</height>
+      <width>1784</width>
+      <height>1049</height>
      </rect>
     </property>
+    <widget class="QWidget" name="stackedWidget_3Page1"/>
    </widget>
-   <zorder>widget_3</zorder>
+   <zorder>stackedWidget_3</zorder>
    <zorder>TabSideBar</zorder>
-   <zorder>switchShowPageUI</zorder>
-   <zorder>Toptitlebar</zorder>
-   <zorder>widget</zorder>
-   <zorder>widget_2</zorder>
   </widget>
  </widget>
  <resources/>

+ 27 - 0
OriginalWnd.cpp

@@ -0,0 +1,27 @@
+#include "OriginalWnd.h"
+#include "ui_OriginalWnd.h"
+
+OriginalWnd::OriginalWnd(QWidget *parent)
+    : QMainWindow(parent)
+    , ui(new Ui::OriginalWnd)
+{
+    ui->setupUi(this);
+
+    initForm();
+}
+
+OriginalWnd::~OriginalWnd()
+{
+    delete ui;
+}
+
+void OriginalWnd::initForm()
+{
+    ui->toolButton->setIcon(QIcon(":/images/light/stop.png"));
+    ui->toolButton_2->setIcon(QIcon(":/images/light/start.png"));
+    ui->toolButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+    ui->toolButton_2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+
+
+    ui->label_6->setPixmap(QPixmap(":/images/light/user.png").scaled(20, 20, Qt::KeepAspectRatio));
+}

+ 461 - 0
OriginalWnd.ui

@@ -0,0 +1,461 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>OriginalWnd</class>
+ <widget class="QMainWindow" name="OriginalWnd">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1856</width>
+    <height>1080</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <widget class="QStackedWidget" name="switchShowPageUI">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>60</y>
+      <width>1102</width>
+      <height>988</height>
+     </rect>
+    </property>
+    <property name="minimumSize">
+     <size>
+      <width>0</width>
+      <height>0</height>
+     </size>
+    </property>
+   </widget>
+   <widget class="QWidget" name="widget_2" native="true">
+    <property name="geometry">
+     <rect>
+      <x>1118</x>
+      <y>60</y>
+      <width>460</width>
+      <height>988</height>
+     </rect>
+    </property>
+    <widget class="QPushButton" name="pushButton_19">
+     <property name="geometry">
+      <rect>
+       <x>328</x>
+       <y>16</y>
+       <width>76</width>
+       <height>30</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="widget" native="true">
+    <property name="geometry">
+     <rect>
+      <x>1594</x>
+      <y>60</y>
+      <width>190</width>
+      <height>988</height>
+     </rect>
+    </property>
+    <widget class="QToolButton" name="toolButton">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>16</y>
+       <width>158</width>
+       <height>60</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Stop
+production</string>
+     </property>
+    </widget>
+    <widget class="QToolButton" name="toolButton_2">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>92</y>
+       <width>158</width>
+       <height>60</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Start of
+production</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_4">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>168</y>
+       <width>48</width>
+       <height>45</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_5">
+     <property name="geometry">
+      <rect>
+       <x>71</x>
+       <y>168</y>
+       <width>48</width>
+       <height>45</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_6">
+     <property name="geometry">
+      <rect>
+       <x>126</x>
+       <y>168</y>
+       <width>48</width>
+       <height>45</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_7">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>245</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="Line" name="line_2">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>229</y>
+       <width>158</width>
+       <height>1</height>
+      </rect>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_8">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>306</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_9">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>367</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_10">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>428</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_11">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>489</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_12">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>550</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_13">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>611</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_14">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>672</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_15">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>733</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_16">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>794</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_17">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>855</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_18">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>900916</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_20">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>916</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="Toptitlebar" native="true">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>0</y>
+      <width>1779</width>
+      <height>44</height>
+     </rect>
+    </property>
+    <widget class="QLabel" name="label">
+     <property name="geometry">
+      <rect>
+       <x>32</x>
+       <y>12</y>
+       <width>69</width>
+       <height>19</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">color : #FFFFFF</string>
+     </property>
+     <property name="text">
+      <string>name001</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_2">
+     <property name="geometry">
+      <rect>
+       <x>284</x>
+       <y>12</y>
+       <width>181</width>
+       <height>19</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">color : #FFFFFF</string>
+     </property>
+     <property name="text">
+      <string>Registration number 001</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton">
+     <property name="geometry">
+      <rect>
+       <x>539</x>
+       <y>7</y>
+       <width>60</width>
+       <height>30</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Calibration</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_3">
+     <property name="geometry">
+      <rect>
+       <x>789</x>
+       <y>12</y>
+       <width>171</width>
+       <height>19</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">color : #FFFFFF</string>
+     </property>
+     <property name="text">
+      <string>xxxProduct lot number</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_2">
+     <property name="geometry">
+      <rect>
+       <x>1061</x>
+       <y>5</y>
+       <width>34</width>
+       <height>34</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_3">
+     <property name="geometry">
+      <rect>
+       <x>1111</x>
+       <y>5</y>
+       <width>34</width>
+       <height>34</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_4">
+     <property name="geometry">
+      <rect>
+       <x>1334</x>
+       <y>12</y>
+       <width>151</width>
+       <height>19</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">color : #FFFFFF</string>
+     </property>
+     <property name="text">
+      <string>2024-11-28 10:20:32</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_5">
+     <property name="geometry">
+      <rect>
+       <x>1686</x>
+       <y>12</y>
+       <width>69</width>
+       <height>19</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">color : #FFFFFF</string>
+     </property>
+     <property name="text">
+      <string>Zhangsan</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_6">
+     <property name="geometry">
+      <rect>
+       <x>1658</x>
+       <y>12</y>
+       <width>20</width>
+       <height>20</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </widget>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

+ 14 - 0
OriginalWnd/Demo001_1.cpp

@@ -0,0 +1,14 @@
+#include "Demo001_1.h"
+#include "ui_Demo001_1.h"
+
+Demo001_1::Demo001_1(QWidget *parent)
+    : QMainWindow(parent)
+    , ui(new Ui::Demo001_1)
+{
+    ui->setupUi(this);
+}
+
+Demo001_1::~Demo001_1()
+{
+    delete ui;
+}

+ 22 - 0
OriginalWnd/Demo001_1.h

@@ -0,0 +1,22 @@
+#ifndef DEMO001_1_H
+#define DEMO001_1_H
+
+#include <QMainWindow>
+
+namespace Ui {
+class Demo001_1;
+}
+
+class Demo001_1 : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    explicit Demo001_1(QWidget *parent = nullptr);
+    ~Demo001_1();
+
+private:
+    Ui::Demo001_1 *ui;
+};
+
+#endif // DEMO001_1_H

+ 32 - 0
OriginalWnd/Demo001_1.ui

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Demo001_1</class>
+ <widget class="QMainWindow" name="Demo001_1">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <widget class="QComboBox" name="comboBox">
+    <property name="geometry">
+     <rect>
+      <x>40</x>
+      <y>20</y>
+      <width>174</width>
+      <height>32</height>
+     </rect>
+    </property>
+   </widget>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

+ 14 - 0
OriginalWnd/Demo001_2.cpp

@@ -0,0 +1,14 @@
+#include "Demo001_2.h"
+#include "ui_Demo001_2.h"
+
+Demo001_2::Demo001_2(QWidget *parent)
+    : QMainWindow(parent)
+    , ui(new Ui::Demo001_2)
+{
+    ui->setupUi(this);
+}
+
+Demo001_2::~Demo001_2()
+{
+    delete ui;
+}

+ 22 - 0
OriginalWnd/Demo001_2.h

@@ -0,0 +1,22 @@
+#ifndef DEMO001_2_H
+#define DEMO001_2_H
+
+#include <QMainWindow>
+
+namespace Ui {
+class Demo001_2;
+}
+
+class Demo001_2 : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    explicit Demo001_2(QWidget *parent = nullptr);
+    ~Demo001_2();
+
+private:
+    Ui::Demo001_2 *ui;
+};
+
+#endif // DEMO001_2_H

+ 35 - 0
OriginalWnd/Demo001_2.ui

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Demo001_2</class>
+ <widget class="QMainWindow" name="Demo001_2">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <widget class="QPushButton" name="pushButton">
+    <property name="geometry">
+     <rect>
+      <x>180</x>
+      <y>140</y>
+      <width>391</width>
+      <height>271</height>
+     </rect>
+    </property>
+    <property name="text">
+     <string>PushButton</string>
+    </property>
+   </widget>
+  </widget>
+  <widget class="QStatusBar" name="statusbar"/>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

+ 14 - 0
OriginalWnd/Demo001_3.cpp

@@ -0,0 +1,14 @@
+#include "Demo001_3.h"
+#include "ui_Demo001_3.h"
+
+Demo001_3::Demo001_3(QWidget *parent)
+    : QMainWindow(parent)
+    , ui(new Ui::Demo001_3)
+{
+    ui->setupUi(this);
+}
+
+Demo001_3::~Demo001_3()
+{
+    delete ui;
+}

+ 22 - 0
OriginalWnd/Demo001_3.h

@@ -0,0 +1,22 @@
+#ifndef DEMO001_3_H
+#define DEMO001_3_H
+
+#include <QMainWindow>
+
+namespace Ui {
+class Demo001_3;
+}
+
+class Demo001_3 : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    explicit Demo001_3(QWidget *parent = nullptr);
+    ~Demo001_3();
+
+private:
+    Ui::Demo001_3 *ui;
+};
+
+#endif // DEMO001_3_H

+ 21 - 0
OriginalWnd/Demo001_3.ui

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Demo001_3</class>
+ <widget class="QMainWindow" name="Demo001_3">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget"/>
+  <widget class="QStatusBar" name="statusbar"/>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

+ 27 - 0
OriginalWnd/OriginalWnd.cpp

@@ -0,0 +1,27 @@
+#include "OriginalWnd.h"
+#include "ui_OriginalWnd.h"
+
+OriginalWnd::OriginalWnd(QWidget *parent)
+    : QMainWindow(parent)
+    , ui(new Ui::OriginalWnd)
+{
+    ui->setupUi(this);
+
+    initForm();
+}
+
+OriginalWnd::~OriginalWnd()
+{
+    delete ui;
+}
+
+void OriginalWnd::initForm()
+{
+    ui->toolButton->setIcon(QIcon(":/images/light/stop.png"));
+    ui->toolButton_2->setIcon(QIcon(":/images/light/start.png"));
+    ui->toolButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+    ui->toolButton_2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+
+
+    ui->label_6->setPixmap(QPixmap(":/images/light/user.png").scaled(20, 20, Qt::KeepAspectRatio));
+}

+ 24 - 0
OriginalWnd/OriginalWnd.h

@@ -0,0 +1,24 @@
+#ifndef ORIGINALWND_H
+#define ORIGINALWND_H
+
+#include <QMainWindow>
+
+namespace Ui {
+class OriginalWnd;
+}
+
+class OriginalWnd : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    explicit OriginalWnd(QWidget *parent = nullptr);
+    ~OriginalWnd();
+
+    void initForm();
+
+private:
+    Ui::OriginalWnd *ui;
+};
+
+#endif // ORIGINALWND_H

+ 461 - 0
OriginalWnd/OriginalWnd.ui

@@ -0,0 +1,461 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>OriginalWnd</class>
+ <widget class="QMainWindow" name="OriginalWnd">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1856</width>
+    <height>1080</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralwidget">
+   <widget class="QStackedWidget" name="switchShowPageUI">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>60</y>
+      <width>1102</width>
+      <height>988</height>
+     </rect>
+    </property>
+    <property name="minimumSize">
+     <size>
+      <width>0</width>
+      <height>0</height>
+     </size>
+    </property>
+   </widget>
+   <widget class="QWidget" name="widget_2" native="true">
+    <property name="geometry">
+     <rect>
+      <x>1118</x>
+      <y>60</y>
+      <width>460</width>
+      <height>988</height>
+     </rect>
+    </property>
+    <widget class="QPushButton" name="pushButton_19">
+     <property name="geometry">
+      <rect>
+       <x>328</x>
+       <y>16</y>
+       <width>76</width>
+       <height>30</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="widget" native="true">
+    <property name="geometry">
+     <rect>
+      <x>1594</x>
+      <y>60</y>
+      <width>190</width>
+      <height>988</height>
+     </rect>
+    </property>
+    <widget class="QToolButton" name="toolButton">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>16</y>
+       <width>158</width>
+       <height>60</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Stop
+production</string>
+     </property>
+    </widget>
+    <widget class="QToolButton" name="toolButton_2">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>92</y>
+       <width>158</width>
+       <height>60</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Start of
+production</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_4">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>168</y>
+       <width>48</width>
+       <height>45</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_5">
+     <property name="geometry">
+      <rect>
+       <x>71</x>
+       <y>168</y>
+       <width>48</width>
+       <height>45</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_6">
+     <property name="geometry">
+      <rect>
+       <x>126</x>
+       <y>168</y>
+       <width>48</width>
+       <height>45</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_7">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>245</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="Line" name="line_2">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>229</y>
+       <width>158</width>
+       <height>1</height>
+      </rect>
+     </property>
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_8">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>306</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_9">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>367</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_10">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>428</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_11">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>489</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_12">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>550</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_13">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>611</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_14">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>672</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_15">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>733</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_16">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>794</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_17">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>855</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_18">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>900916</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_20">
+     <property name="geometry">
+      <rect>
+       <x>16</x>
+       <y>916</y>
+       <width>158</width>
+       <height>48</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>PushButton</string>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="Toptitlebar" native="true">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>0</y>
+      <width>1779</width>
+      <height>44</height>
+     </rect>
+    </property>
+    <widget class="QLabel" name="label">
+     <property name="geometry">
+      <rect>
+       <x>32</x>
+       <y>12</y>
+       <width>69</width>
+       <height>19</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">color : #FFFFFF</string>
+     </property>
+     <property name="text">
+      <string>name001</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_2">
+     <property name="geometry">
+      <rect>
+       <x>284</x>
+       <y>12</y>
+       <width>181</width>
+       <height>19</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">color : #FFFFFF</string>
+     </property>
+     <property name="text">
+      <string>Registration number 001</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton">
+     <property name="geometry">
+      <rect>
+       <x>539</x>
+       <y>7</y>
+       <width>60</width>
+       <height>30</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Calibration</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_3">
+     <property name="geometry">
+      <rect>
+       <x>789</x>
+       <y>12</y>
+       <width>171</width>
+       <height>19</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">color : #FFFFFF</string>
+     </property>
+     <property name="text">
+      <string>xxxProduct lot number</string>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_2">
+     <property name="geometry">
+      <rect>
+       <x>1061</x>
+       <y>5</y>
+       <width>34</width>
+       <height>34</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="pushButton_3">
+     <property name="geometry">
+      <rect>
+       <x>1111</x>
+       <y>5</y>
+       <width>34</width>
+       <height>34</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_4">
+     <property name="geometry">
+      <rect>
+       <x>1334</x>
+       <y>12</y>
+       <width>151</width>
+       <height>19</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">color : #FFFFFF</string>
+     </property>
+     <property name="text">
+      <string>2024-11-28 10:20:32</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_5">
+     <property name="geometry">
+      <rect>
+       <x>1686</x>
+       <y>12</y>
+       <width>69</width>
+       <height>19</height>
+      </rect>
+     </property>
+     <property name="styleSheet">
+      <string notr="true">color : #FFFFFF</string>
+     </property>
+     <property name="text">
+      <string>Zhangsan</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_6">
+     <property name="geometry">
+      <rect>
+       <x>1658</x>
+       <y>12</y>
+       <width>20</width>
+       <height>20</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string/>
+     </property>
+    </widget>
+   </widget>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

BIN
images/deep/Diagnosis.png


BIN
images/deep/Disposition.png


BIN
images/deep/Help.png


BIN
images/deep/Message.png


BIN
images/deep/Module.png


BIN
images/deep/Productionn assistance.png


BIN
images/deep/Program.png


BIN
images/deep/System.png


BIN
images/deep/home.png


BIN
images/light/home.png


BIN
images/login.png


BIN
images/login_pass.png


BIN
images/login_user.png


BIN
images/logo.png


+ 111 - 14
light.qss

@@ -2,21 +2,68 @@
     font-family: "思源黑体M", "Source Han Sans", "Microsoft YaHei", sans-serif; /* 确保字体的兼容性 */
     font-size: 14px;
     font-weight: normal;
-
     outline: 0px;
 }
 
+/*登录*/
+Login QWidget#widget_2
+{
+    border-radius: 10px;
+    image: url(:/images/login.png);
+}
+
+Login QWidget#widget
+{
+    border-radius: 20px;
+    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6164D6, stop: 1 #6164D6); /* 第一层渐变 */
+}
+
+Login QPushButton
+{
+    color:#FFFFFF;
+    border-radius: 8px;
+    background: #9294FF;
+}
+
+Login QLineEdit#userNameLineEdit,
+Login QLineEdit#passLineEdit
+{
+    border-radius: 8px;
+    padding-left:82px;
+    border: 1px solid #9294FF;
+    background: rgba(111, 113, 223, 0.2);
+}
+
+Login QLabel#label_user
+{
+    image: url(:/images/login_user.png);
+}
+
+Login QLabel#label_pass
+{
+    image: url(:/images/login_pass.png);
+}
+
+Login QFrame#line,
+Login QFrame#line_2
+{
+    background: #9294FF;
+}
+
+
+/*主界面*/
 MainWnd QWidget#TabSideBar
 {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #EEF0F8, stop: 1 #E6E7F9);
 }
 
-MainWnd QWidget#widget_3
+MainWnd QWidget#centralwidget
 {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #E8EAFA, stop: 1 #D0D1EB);
 }
 
-QFrame#line {
+QFrame#line
+{
     background-color: #BABBDC;
 }
 
@@ -28,10 +75,12 @@ MainWnd QWidget#TabSideBar QToolButton
     border-radius:6px;
 }
 
-MainWnd QWidget#TabSideBar QToolButton:hover
+/*侧边栏按钮*/
+QWidget#TabSideBar>QToolButton::hover,QWidget#TabSideBar>QToolButton::pressed,QWidget#TabSideBar>QToolButton::checked
 {
-    color: #FFFFFF;
-    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #949FE8, stop: 1 #2D309B); /* 渐变背景 */
+    border:none;
+    color:#FFFFFF;
+    background:qlineargradient(spread:pad,x1:0,y1:0,x2:0,y2:1,stop:0 #949FE8,stop:1 #2D309B);
 }
 
 MainWnd QToolButton
@@ -39,6 +88,52 @@ MainWnd QToolButton
     padding-top: 8px;
 }
 
+QWidget#TabSideBar>QToolButton#tabBondBtn
+{
+    qproperty-icon:url(:/images/light/home.png);
+}
+
+QWidget#TabSideBar>QToolButton#tabBondBtn_2
+{
+    qproperty-icon:url(:/images/light/Productionn assistance.png);
+}
+
+QWidget#TabSideBar>QToolButton#tabBondBtn_3
+{
+    qproperty-icon:url(:/images/light/Program.png);
+}
+
+QWidget#TabSideBar>QToolButton#tabBondBtn_4
+{
+    qproperty-icon:url(:/images/light/Message.png);
+}
+
+QWidget#TabSideBar>QToolButton#tabBondBtn_5
+{
+    qproperty-icon:url(:/images/light/Module.png);
+}
+
+QWidget#TabSideBar>QToolButton#tabBondBtn_6
+{
+    qproperty-icon:url(:/images/light/Disposition.png);
+}
+
+QWidget#TabSideBar>QToolButton#tabBondBtn_7
+{
+    qproperty-icon:url(:/images/light/Diagnosis.png);
+}
+
+QWidget#TabSideBar>QToolButton#tabBondBtn_8
+{
+    qproperty-icon:url(:/images/light/System.png);
+}
+
+QWidget#TabSideBar>QToolButton#tabBondBtn_9
+{
+    qproperty-icon:url(:/images/light/Help.png);
+}
+
+/*顶部*/
 QWidget#Toptitlebar
 {
     border-radius: 6px;
@@ -51,7 +146,7 @@ QWidget#Toptitlebar QLable#label_4
     color: #FFFFFF;
 }
 
-MainWnd QWidget#Toptitlebar QPushButton#pushButton
+OriginalWnd QWidget#Toptitlebar QPushButton#pushButton
 {
     color: #FFFFFF;
     border-radius: 4px;
@@ -70,14 +165,16 @@ QWidget#Toptitlebar QPushButton#pushButton_3
     image: url(:/images/one.png);
 }
 
-MainWnd QWidget#widget_2,
-MainWnd QWidget#widget
+/*初始界面*/
+OriginalWnd QWidget#widget_2,
+OriginalWnd QWidget#widget
 {
     background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F1F4FD, stop: 1 #E5E4F6);
     border-radius: 10px;
 }
 
-MainWnd QWidget#widget QToolButton#toolButton
+
+OriginalWnd QWidget#widget QToolButton#toolButton
 {
     border-radius: 6px;
     background: #F02962;
@@ -86,7 +183,7 @@ MainWnd QWidget#widget QToolButton#toolButton
     padding-left: 28px;
 }
 
-MainWnd QWidget#widget QToolButton#toolButton_2
+OriginalWnd QWidget#widget QToolButton#toolButton_2
 {
     border-radius: 6px;
     background: #4AB832;
@@ -95,21 +192,21 @@ MainWnd QWidget#widget QToolButton#toolButton_2
     padding-left: 28px;
 }
 
-MainWnd QWidget#widget QPushButton#pushButton_4
+OriginalWnd QWidget#widget QPushButton#pushButton_4
 {
     border-radius: 6px;
     background: #CBD0FF;
     image: url(:/images/light/Demo001_1.png);
 }
 
-MainWnd QWidget#widget QPushButton#pushButton_5
+OriginalWnd QWidget#widget QPushButton#pushButton_5
 {
     border-radius: 6px;
     background: #CBD0FF;
     image: url(:/images/light/Demo001_2.png);
 }
 
-MainWnd QWidget#widget QPushButton#pushButton_6
+OriginalWnd QWidget#widget QPushButton#pushButton_6
 {
     border-radius: 6px;
     background: #CBD0FF;

+ 17 - 11
project01.pro

@@ -9,23 +9,29 @@ CONFIG += c++17
 #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
 
 SOURCES += \
-    Demo001_1.cpp \
-    Demo001_2.cpp \
-    Demo001_3.cpp \
+    Login.cpp \
+    OriginalWnd/Demo001_1.cpp \
+    OriginalWnd/Demo001_2.cpp \
+    OriginalWnd/Demo001_3.cpp \
+    OriginalWnd/OriginalWnd.cpp \
     main.cpp \
     MainWnd.cpp
 
 HEADERS += \
-    Demo001_1.h \
-    Demo001_2.h \
-    Demo001_3.h \
-    MainWnd.h
+    Login.h \
+    MainWnd.h \
+    OriginalWnd/Demo001_1.h \
+    OriginalWnd/Demo001_2.h \
+    OriginalWnd/Demo001_3.h \
+    OriginalWnd/OriginalWnd.h
 
 FORMS += \
-    Demo001_1.ui \
-    Demo001_2.ui \
-    Demo001_3.ui \
-    MainWnd.ui
+    Login.ui \
+    MainWnd.ui \
+    OriginalWnd/Demo001_1.ui \
+    OriginalWnd/Demo001_2.ui \
+    OriginalWnd/Demo001_3.ui \
+    OriginalWnd/OriginalWnd.ui
 
 # Default rules for deployment.
 qnx: target.path = /tmp/$${TARGET}/bin

+ 1 - 1
project01.pro.user

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 14.0.2, 2024-12-10T18:02:54. -->
+<!-- Written by QtCreator 14.0.2, 2024-12-12T10:29:56. -->
 <qtcreator>
  <data>
   <variable>EnvironmentId</variable>

+ 15 - 1
res.qrc

@@ -3,7 +3,6 @@
         <file>light.qss</file>
         <file>images/light/logo1.png</file>
         <file>images/light/Productionn assistance.png</file>
-        <file>images/light/home.png</file>
         <file>images/light/Disposition.png</file>
         <file>images/light/Help.png</file>
         <file>images/light/Diagnosis.png</file>
@@ -19,5 +18,20 @@
         <file>images/light/Demo001_3.png</file>
         <file>images/light/stop.png</file>
         <file>images/light/start.png</file>
+        <file>images/light/home.png</file>
+        <file>images/deep/Diagnosis.png</file>
+        <file>images/deep/Disposition.png</file>
+        <file>images/deep/Help.png</file>
+        <file>images/deep/home.png</file>
+        <file>images/deep/Message.png</file>
+        <file>images/deep/Module.png</file>
+        <file>images/deep/Productionn assistance.png</file>
+        <file>images/deep/Program.png</file>
+        <file>images/deep/System.png</file>
+        <file>images/light/logo.png</file>
+        <file>images/login.png</file>
+        <file>images/logo.png</file>
+        <file>images/login_user.png</file>
+        <file>images/login_pass.png</file>
     </qresource>
 </RCC>