修改整體架構

This commit is contained in:
JEFF 2025-03-08 18:14:20 +08:00
parent 81b6aa673c
commit cea99ab198
4 changed files with 306 additions and 0 deletions

80
camera/camera_window.py Normal file
View File

@ -0,0 +1,80 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'camera_window.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1363, 1119)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.formLayout = QtWidgets.QFormLayout(self.centralwidget)
self.formLayout.setObjectName("formLayout")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.bt_camera_connect = QtWidgets.QPushButton(self.centralwidget)
self.bt_camera_connect.setMinimumSize(QtCore.QSize(101, 51))
self.bt_camera_connect.setMaximumSize(QtCore.QSize(101, 51))
self.bt_camera_connect.setObjectName("bt_camera_connect")
self.horizontalLayout.addWidget(self.bt_camera_connect)
self.bt_OneShot = QtWidgets.QPushButton(self.centralwidget)
self.bt_OneShot.setMinimumSize(QtCore.QSize(101, 51))
self.bt_OneShot.setMaximumSize(QtCore.QSize(101, 51))
self.bt_OneShot.setObjectName("bt_OneShot")
self.horizontalLayout.addWidget(self.bt_OneShot)
self.bt_KeetShot = QtWidgets.QPushButton(self.centralwidget)
self.bt_KeetShot.setMinimumSize(QtCore.QSize(101, 51))
self.bt_KeetShot.setMaximumSize(QtCore.QSize(101, 51))
self.bt_KeetShot.setObjectName("bt_KeetShot")
self.horizontalLayout.addWidget(self.bt_KeetShot)
self.bt_camera_close = QtWidgets.QPushButton(self.centralwidget)
self.bt_camera_close.setMinimumSize(QtCore.QSize(101, 51))
self.bt_camera_close.setMaximumSize(QtCore.QSize(101, 51))
self.bt_camera_close.setObjectName("bt_camera_close")
self.horizontalLayout.addWidget(self.bt_camera_close)
self.label_3 = QtWidgets.QLabel(self.centralwidget)
self.label_3.setMinimumSize(QtCore.QSize(91, 31))
self.label_3.setMaximumSize(QtCore.QSize(91, 31))
self.label_3.setObjectName("label_3")
self.horizontalLayout.addWidget(self.label_3)
self.Ex_time = QtWidgets.QLineEdit(self.centralwidget)
self.Ex_time.setMinimumSize(QtCore.QSize(100, 30))
self.Ex_time.setMaximumSize(QtCore.QSize(100, 30))
self.Ex_time.setObjectName("Ex_time")
self.horizontalLayout.addWidget(self.Ex_time)
self.formLayout.setLayout(3, QtWidgets.QFormLayout.LabelRole, self.horizontalLayout)
self.label = QtWidgets.QLabel(self.centralwidget)
self.label.setMinimumSize(QtCore.QSize(1000, 1000))
self.label.setMaximumSize(QtCore.QSize(1000, 1000))
self.label.setObjectName("label")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1363, 22))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.bt_camera_connect.setText(_translate("MainWindow", "相機連線"))
self.bt_OneShot.setText(_translate("MainWindow", "單張擷取"))
self.bt_KeetShot.setText(_translate("MainWindow", "連續取像"))
self.bt_camera_close.setText(_translate("MainWindow", "中斷連線"))
self.label_3.setText(_translate("MainWindow", "曝光時間"))
self.label.setText(_translate("MainWindow", "原圖"))

168
camera/camera_window.ui Normal file
View File

@ -0,0 +1,168 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1363</width>
<height>1119</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QFormLayout" name="formLayout">
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="bt_camera_connect">
<property name="minimumSize">
<size>
<width>101</width>
<height>51</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>101</width>
<height>51</height>
</size>
</property>
<property name="text">
<string>相機連線</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bt_OneShot">
<property name="minimumSize">
<size>
<width>101</width>
<height>51</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>101</width>
<height>51</height>
</size>
</property>
<property name="text">
<string>單張擷取</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bt_KeetShot">
<property name="minimumSize">
<size>
<width>101</width>
<height>51</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>101</width>
<height>51</height>
</size>
</property>
<property name="text">
<string>連續取像</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bt_camera_close">
<property name="minimumSize">
<size>
<width>101</width>
<height>51</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>101</width>
<height>51</height>
</size>
</property>
<property name="text">
<string>中斷連線</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="minimumSize">
<size>
<width>91</width>
<height>31</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>91</width>
<height>31</height>
</size>
</property>
<property name="text">
<string>曝光時間</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="Ex_time">
<property name="minimumSize">
<size>
<width>100</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>30</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label">
<property name="minimumSize">
<size>
<width>1000</width>
<height>1000</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>1000</width>
<height>1000</height>
</size>
</property>
<property name="text">
<string>原圖</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1363</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

58
main.ui Normal file
View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1308</width>
<height>865</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>70</x>
<y>110</y>
<width>471</width>
<height>461</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>70</x>
<y>40</y>
<width>91</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string>PushButton</string>
</property>
</widget>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1308</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>