diff --git a/Server/emergency.py b/Server/visual_land.py similarity index 58% rename from Server/emergency.py rename to Server/visual_land.py index 85dbef9..60b9b71 100644 --- a/Server/emergency.py +++ b/Server/visual_land.py @@ -1,36 +1,20 @@ # -*- coding: utf-8 -*- -# Form implementation generated from reading ui file 'emergency.ui' +# Form implementation generated from reading ui file 'visual_land.ui' # -# Created by: PyQt5 UI code generator 5.11.3 +# Created by: PyQt5 UI code generator 5.13.0 # # WARNING! All changes made in this file will be lost! + from PyQt5 import QtCore, QtGui, QtWidgets -import os -import glob -from PyQt5 import QtWidgets -from PyQt5.QtGui import QStandardItemModel, QStandardItem -from PyQt5.QtCore import Qt, pyqtSlot, pyqtSignal, QObject - -from PyQt5.QtWidgets import QDialog - -# Importing gui form -from server_qt import * -from server import * class Ui_Dialog(object): - - def __init__(self): - self.Dialog = None def setupUi(self, Dialog): - self.Dialog = Dialog Dialog.setObjectName("Dialog") Dialog.resize(746, 620) - Dialog.setStyleSheet("QDialog{\n" -"background-color: #fffdd0;\n" -"}") + Dialog.setStyleSheet("") self.two_button = QtWidgets.QPushButton(Dialog) self.two_button.setGeometry(QtCore.QRect(420, 120, 231, 171)) self.two_button.setSizeIncrement(QtCore.QSize(16, 16)) @@ -42,10 +26,12 @@ class Ui_Dialog(object): "}") self.two_button.setObjectName("two_button") self.label = QtWidgets.QLabel(Dialog) - self.label.setGeometry(QtCore.QRect(90, 30, 561, 51)) + self.label.setGeometry(QtCore.QRect(60, 30, 631, 51)) font = QtGui.QFont() - font.setPointSize(16) + font.setPointSize(20) self.label.setFont(font) + self.label.setLayoutDirection(QtCore.Qt.LeftToRight) + self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.one_button = QtWidgets.QPushButton(Dialog) self.one_button.setGeometry(QtCore.QRect(90, 120, 231, 171)) @@ -54,7 +40,7 @@ class Ui_Dialog(object): "color: white;\n" "font-weight: 600;\n" "font-size: 25pt;\n" -"background-color: RGB(118, 255, 122);\n" +"background-color: green;\n" "}") self.one_button.setObjectName("one_button") self.land_emergency_button = QtWidgets.QPushButton(Dialog) @@ -73,39 +59,15 @@ class Ui_Dialog(object): "background-color: white;\n" "}") self.disarm_emergency_button.setObjectName("disarm_emergency_button") - self.one_button.clicked.connect(self.one_button_click) - self.two_button.clicked.connect(self.two_button_click) - self.land_emergency_button.clicked.connect(self.land_emergency_click) - self.disarm_emergency_button.clicked.connect(self.disarm_emergency_click) self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog) def retranslateUi(self, Dialog): _translate = QtCore.QCoreApplication.translate - Dialog.setWindowTitle(_translate("Dialog", "Dialog")) + Dialog.setWindowTitle(_translate("Dialog", "Visual land")) self.two_button.setText(_translate("Dialog", "2")) - self.label.setText(_translate("Dialog", "\n" -"Select a group in which the drone does not work correctly")) + self.label.setText(_translate("Dialog", "Select the group with the defective copter")) self.one_button.setText(_translate("Dialog", "1")) self.land_emergency_button.setText(_translate("Dialog", "Land")) - self.disarm_emergency_button.setText(_translate("Dialog", "Disarm")) - def one_button_click(self): - self.Dialog.done(1) - def two_button_click(self): - self.Dialog.done(2) - def land_emergency_click(self): - self.Dialog.done(3) - def disarm_emergency_click(self): - self.Dialog.done(4) - - -if __name__ == "__main__": - import sys - app = QtWidgets.QApplication(sys.argv) - Dialog = QtWidgets.QDialog() - ui = Ui_Dialog() - ui.setupUi(Dialog) - Dialog.show() - sys.exit(app.exec_()) - + self.disarm_emergency_button.setText(_translate("Dialog", "Disarm")) diff --git a/Server/emergency.ui b/Server/visual_land.ui similarity index 87% rename from Server/emergency.ui rename to Server/visual_land.ui index df5c698..212f2bb 100644 --- a/Server/emergency.ui +++ b/Server/visual_land.ui @@ -11,12 +11,10 @@ - Dialog + Visual land - QDialog{ -background-color: #fffdd0; -} + @@ -48,20 +46,25 @@ background-color: red; - 90 + 60 30 - 561 + 631 51 - 16 + 20 + + Qt::LeftToRight + - -Select a group in which the drone does not work correctly + Select the group with the defective copter + + + Qt::AlignCenter @@ -84,7 +87,7 @@ Select a group in which the drone does not work correctly color: white; font-weight: 600; font-size: 25pt; -background-color: RGB(118, 255, 122); +background-color: green; }