def __init__(self, parent=None): super(inputPannel, self).__init__(parent) # 화면 구성 self.ui = Ui_Form() self.ui.setupUi(self) self.device_handler = None self.location = None from src.widgets.inputWidget.protocolAssembler.protocolAssembler import protocolAssembler self.protocol_assembler = protocolAssembler( self.ui.widget_protocolAssembler) from src.widgets.inputWidget.protocolMangerWidget.protocolManagerWidget import protocolManager self.protocol_manager = protocolManager( self.ui.widget_protocol_manager) # 클래스간의 통신을 위한 설정 self.protocol_assembler.set_handler(self.protocol_manager) self.protocol_manager.set_handler(self.protocol_assembler) # self.protocol_manager.ui.pb_save.connect( # self.protocol_manager.ui.pb_save, # QtCore.SIGNAL("clicked()"), # self.sig_protocol_manager_save # ) self.send_thread = threadSendData(self.commSignal)
def init_ui(self): self.app = QtWidgets.QApplication(sys.argv) self.window = QtWidgets.QWidget() self.ui = Ui_Form() self.ui.setupUi(self.window) self.window.show() self.setup_connections() self.ui.optionsLineEdit.setText(basename(self.pizza.options_file))
from PyQt5 import QtCore, QtGui, QtWidgets import sys import os from ui import Ui_Form # SYNC APP QT: app = QtWidgets.QApplication(sys.argv) # VARS: Form = QtWidgets.QWidget() ui = Ui_Form() database_dir = os.curdir + '/database/' # INIT FORM: ui.setupUi(Form) Form.show() # NEW USER: def write_user(): name = ui.name.text() if name != ' ': with open(database_dir + 'base.txt', 'a+') as file: file.write(name + "\r") with open(database_dir + 'base.txt', 'r') as rFile: ui.list.setText(rFile.read()) ui.name.clear() # CLEAR DATABASE: def delete_database(): os.remove(database_dir + 'base.txt')
def __init__(self, parent=None): super(addTab, self).__init__(parent) self.ui = Ui_Form() self.ui.setupUi(self)
def __init__(self, parent=None): super(Ui, self).__init__(parent) self.pcr_yorn = False self.ui = Ui_Form() self.ui.setupUi(self) self.paramSelect = [] self.paramSelect_group = [] self.run = Run() self.state = 0 self.setAcceptDrops(True) # self.button_params_ok = self.ui.button_params_ok self.tabwidget_run = self.ui.tabwidget_run self.params_panel = self.ui.params_widget self.control_panel = self.ui.widget self.buttonauto = self.ui.Buttonautorun self.buttonorder = self.ui.buttonorder self.buttonstart = self.ui.buttonrun self.buttonback = self.ui.buttonback self.button_autoselect = self.ui.buttonautoselect self.button_refineall = self.ui.buttonrefineall self.button_clearall = self.ui.buttonclearall self.button_output = self.ui.buttonoutput self.button_fold_paramstable = self.ui.buttonfold self.textshow = self.ui.texteditshow self.textrwp = self.ui.textrwp self.tableprofile = self.ui.tableWidgetprofile self.tableatom = self.ui.tableWidgetatom self.tableatombiso = self.ui.tableWidgetatombiso self.tableins = self.ui.tableWidgetins self.tableother = self.ui.tableWidgetother self.tableocc = self.ui.tableWidgetocc self.tab_refine = self.ui.tabWidgettable self.table = [] self.table.append(self.tableprofile) self.table.append(self.tableins) self.table.append(self.tableatom) self.table.append(self.tableatombiso) self.table.append(self.tableother) self.table.append(self.tableocc) self.buttonopen = self.ui.buttonopen self.window_order = Ui_order() self.window_output = Ui_output_Form() self.text_path = self.ui.text_path self.table_phase = self.ui.spinbox_phase.value() icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("autofp.ico")), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon.addPixmap(QtGui.QPixmap(_fromUtf8("autofp.ico")), QtGui.QIcon.Normal, QtGui.QIcon.On) icon.addPixmap(QtGui.QPixmap(_fromUtf8("autofp.ico")), QtGui.QIcon.Active, QtGui.QIcon.On) self.setWindowIcon(icon) self.ui.splitter.resize(self.size()) self.params_fold = False self.show() self.fold_paramstable() # QtCore.QObject.connect(self.ui.pushButton_prf2origin, QtCore.SIGNAL(_fromUtf8("clicked()")), self.prf2origin) QtCore.QObject.connect(self, QtCore.SIGNAL(_fromUtf8("close()")), self.stop_autofp) QtCore.QObject.connect(self.buttonauto, QtCore.SIGNAL(_fromUtf8("clicked()")), self.autorunfp) QtCore.QObject.connect(self.button_autoselect, QtCore.SIGNAL(_fromUtf8("clicked()")), self.auto_select) QtCore.QObject.connect(self.button_refineall, QtCore.SIGNAL(_fromUtf8("clicked()")), self.table_select_all) #select all params QtCore.QObject.connect(self.button_clearall, QtCore.SIGNAL(_fromUtf8("clicked()")), self.table_clear_all) #clear all params QtCore.QObject.connect(self.buttonstart, QtCore.SIGNAL(_fromUtf8("clicked()")), self.runfullprof) QtCore.QObject.connect(self.buttonback, QtCore.SIGNAL(_fromUtf8("clicked()")), self.back) QtCore.QObject.connect(self.buttonopen, QtCore.SIGNAL(_fromUtf8("clicked()")), self.openfile) QtCore.QObject.connect(self.buttonorder, QtCore.SIGNAL(_fromUtf8("clicked()")), self.open_order) QtCore.QObject.connect(self.button_output, QtCore.SIGNAL(_fromUtf8("clicked()")), self.outputset) QtCore.QObject.connect(self.button_fold_paramstable, QtCore.SIGNAL(_fromUtf8("clicked()")), self.fold_paramstable) QtCore.QObject.connect(self.button_params_ok, QtCore.SIGNAL(_fromUtf8("clicked()")), self.fold_paramstable) QtCore.QObject.connect(self.ui.spinbox_phase, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), self.phase_change) QtCore.QObject.connect(self.ui.button_stop, QtCore.SIGNAL(_fromUtf8("clicked()")), self.stop_autofp) self.txt_signal.connect(self.showMsg) self.autofp_done_signal.connect(self.autorunfp_result) self.status_signal.connect(self.showMsg) return
# -*- coding: utf-8 -*- from PyQt5 import QtWidgets import sys from ui import Ui_Form if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) root = QtWidgets.QWidget() #创建一个根容器 window = Ui_Form() window.setupUi(root) #将自己设计的ui加载到根容器中 root.show() sys.exit(app.exec()) #运行 pass
def __init__(self, parent=None): super().__init__(parent) self.ui = Ui_Form() self.ui.setupUi(self) self.ui.pushButton.clicked.connect(self.kaishi)
def __init__(self, parent=None): super(protocolAssembler, self).__init__(parent) # 화면 구성 self.ui = Ui_Form() self.ui.setupUi(self)