Compare commits

...

9 Commits

Author SHA1 Message Date
p02945817 dd899dc6b4 “修改” 2022-06-15 20:15:44 +08:00
p02945817 9db3fea739 “修改” 2022-06-15 20:10:26 +08:00
p02945817 beda9ae7cc “修改” 2022-06-15 20:07:23 +08:00
p02945817 bad76208e0 “修改” 2022-06-15 20:02:55 +08:00
p02945817 ef0db7de04 “修改” 2022-06-14 19:01:58 +08:00
p02945817 4495094e94 “修改” 2022-06-14 18:58:14 +08:00
p02945817 b817c5c3bc “按钮添加” 2022-06-14 18:53:20 +08:00
p02945817 23630001f6 “push” 2022-06-13 20:46:05 +08:00
p02945817 053f0b48f1 “代码修改” 2022-06-13 20:37:38 +08:00
4 changed files with 27 additions and 9 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
__pycache__
TODO.md
script.py
.idea

View File

@ -1,9 +1,6 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MainWindow_map.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# Created by: PyQt5 UI code generator 5.15.4
# 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.
@ -96,6 +93,13 @@ class Ui_MainWindow(object):
self.horizontalLayout.addLayout(self.formLayout_2)
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.pushButton = QtWidgets.QPushButton(self.centralwidget)
font = QtGui.QFont()
font.setFamily("宋体")
font.setPointSize(12)
self.pushButton.setFont(font)
self.pushButton.setObjectName("pushButton")
self.verticalLayout_2.addWidget(self.pushButton)
self.pushButton_run = QtWidgets.QPushButton(self.centralwidget)
font = QtGui.QFont()
font.setFamily("宋体")
@ -149,6 +153,7 @@ class Ui_MainWindow(object):
self.label_9.setText(_translate("MainWindow", "移动节点电池容量"))
self.lineEdit_bettery.setText(_translate("MainWindow", "100"))
self.label_4.setText(_translate("MainWindow", "算法选择"))
self.pushButton.setText(_translate("MainWindow", "设置"))
self.pushButton_run.setText(_translate("MainWindow", "运行"))
self.pushButton_stop.setText(_translate("MainWindow", "停止"))
self.label_show.setText(_translate("MainWindow", "<html><head/><body><p><br/></p></body></html>"))

View File

@ -157,6 +157,19 @@
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QPushButton" name="pushButton">
<property name="font">
<font>
<family>宋体</family>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>设置</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_run">
<property name="font">

View File

@ -5,7 +5,7 @@ from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import QPixmap
import threading, time, subprocess
import threading, subprocess
class mywindow(QtWidgets.QMainWindow, Ui_MainWindow):
def __init__(self):
@ -13,11 +13,11 @@ class mywindow(QtWidgets.QMainWindow, Ui_MainWindow):
self.setupUi(self)
self.comboBox_map.addItems(['地图0', '地图1', '地图2'])
# 地图选择
self.comboBox_algo.addItems(['野火法+牛耕法', '野火法+内螺旋法', '野火法+贪心法'])
# 算法选择
self.comboBox_axis.addItems(['x', 'y'])
# 划分方向选择
self.comboBox_render.addItems(['', ''])
self.comboBox_around.addItems(['不考虑', '考虑'])
@ -122,6 +122,5 @@ class mywindow(QtWidgets.QMainWindow, Ui_MainWindow):
if __name__ == '__main__':
app = QApplication(sys.argv)
window = mywindow()
# window.showMaximized()
window.show()
sys.exit(app.exec_())