def __init__(self): super(ApplicationWindow, self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) self.setFixedSize(1500, 930) ############## UI control lists ############## self.imageViews = [self.ui.graphicsView , self.ui.graphicsView_2 ] self.legend = [0, 0, 0] # guard for legend overaddition for image in self.imageViews : ## hide unwanted options image.ui.histogram.hide() image.ui.roiBtn.hide() image.ui.menuBtn.hide() image.ui.roiPlot.hide() ############# initialize fourier ############# self.originalImage0 = cv.cvtColor(cv.imread('images/Brain2.png'),cv.COLOR_BGR2GRAY) #plot original self.imageViews[0].show() self.imageViews[0].setImage(self.originalImage0.T) #plot fourier self.imageViews[1].show() self.imageViews[1].setImage(fourier(self.originalImage0).T) #################################### #self.axes1 = self.ui.graphicsView1.figure.add_subplot(111, title="$M_x/M_o$ vs time") #self.axes2 = self.ui.graphicsView2.figure.add_subplot(111) #self.axes3 = self.ui.graphicsView3.figure.add_subplot(111) ############## UI Signals ############## self.ui.pushButton.clicked.connect(lambda: self.plotEffect()) self.ui.pushButton_2.clicked.connect(lambda : self.plotFourier())
def __init__(self): super(ApplicationWindow, self).__init__() self.ui = Ui_MainWindow() #intialize memebers of class plot_data that contains all the functions #and the variables needed for plotting to avoid repeativness self.Ugraph_1 = Plot_Data() #Empty arrays used in singular-import function self.Empty_X = [] self.Empty_Y = [] #Toggles for the exception handling of pressing start button and crashing before any graph is drawn, used in import self.HasEntered1stView = 0 pg.setConfigOption('background', 'w') self.ui.setupUi(self) self.ui.StartButton.clicked.connect(self.Startplot) self.ui.StopButton.clicked.connect(self.Stop_1) self.ui.HideButton.clicked.connect(self.Hide) self.ui.ExitButton.clicked.connect(self.Exit) self.ui.EmptyButton.clicked.connect(self.Empty)
def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.ui = Ui_MainWindow() self.ui.setupUi(self) ##################Buttons####################################################################### self.ui.pushButton.clicked.connect(self.calculate)
def __init__(self): super().__init__() self.gui = Ui_MainWindow() self.gui.setupUi(self) try: js = json.load(open('config.json', encoding='utf-8')) self.user_name = js['Login']['user_name'] self.user_password = js['Login']['user_password'] self.user_cookies = js['Login']['user_cookies'] self.ban_status = js['Setting']['ban_status'] self.ban_word = js['Setting']['ban_word'] self.work_thread = js['Setting']['work_thread'] self.download_thread = js['Setting']['download_thread'] self.screening_criteria = js['Setting']['screening_criteria'] except: self.gui.listWidget.addItem('读取配置文件失败') self.work = False else: self.work = True self._search_type = {'全年龄': 'safe', '全部': 'all', 'R18': 'r18'} self.gui.button_search_start.clicked.connect(self.search) self.gui.button_ranking_start.clicked.connect(self.ranking)
def __init__(self): super().__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ip = "" self.port = "" self.link = "http://aargin.com/"
def __init__(self): #Set up DB self.db = DB() #Call keyboard manager self.km = KM (self) #Call GUI & set it up self.gui = Ui_MainWindow(self) self.gui.setup() self.km.stop() sys.exit()
def __init__(self): super(mywindow, self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) self.setAcceptDrops(True) self.ui.pushB_Init2.clicked.connect(self.pushB_Init2) self.ui.pushB_Init12.clicked.connect(self.pushB_Init12) self.ui.pushB_Connect.clicked.connect(self.pushB_Connect) self.ui.pushB_Restart.clicked.connect(self.pushB_Restart)
def main(): app = QtWidgets.QApplication(sys.argv) MainWindow = QtWidgets.QMainWindow() ui = Ui_MainWindow() ui.setupUi(MainWindow) windowStyle.styles.dark(app) mw = windowStyle.window.ModernWindow(MainWindow) mw.setWindowTitle("Volume Buddy") mw.show() app.exec_()
def __init__(self): super(mywindow, self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) #self.setAcceptDrops(True) #print(app.arguments()) mywindow.source = app.arguments()[1] #self.ui.comboBox.addItem(app.arguments()[1]) mywindow.target = r"\\192.168.1.170\мах" self.statusBar().showMessage(mywindow.target + " to " + mywindow.source) self.ui.Send.clicked.connect(self.SendF) self.ui.Cancel.clicked.connect(self.CancelF)
def __init__(self): super(ApplicationWindow,self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ui.actionOpen_Image.triggered.connect(self.OpenImage) self.ui.Combo1.currentTextChanged.connect(self.ChooseOperation) self.ui.comboBox.currentTextChanged.connect(self.Gradients) self.ui.Combo1.setCurrentIndex(0) self.widgets = [self.ui.InputImage1,self.ui.FourierInput1] for i in range(len(self.widgets)): self.widgets[i].ui.histogram.hide() self.widgets[i].ui.roiBtn.hide() self.widgets[i].ui.menuBtn.hide() self.widgets[i].ui.roiPlot.hide() self.pen1 = pg.mkPen(color=(255, 0, 0)) self.pen2 = pg.mkPen(color=(0, 0, 255)) self.ui.pushButton.clicked.connect(self.ShowGraph)
def __init__(self): super(Editor, self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ui.main_text.setText('Hello!') self.ui.menu_save.triggered.connect(self.save) self.ui.menu_open.triggered.connect(self.open) self.ui.menu_print.triggered.connect(self.print_file) self.ui.menu_print_preview.triggered.connect(self.print_preview) self.ui.menu_export_pdf.triggered.connect(self.export_pdf) self.text_weight = lambda: QFont.Bold if self.ui.bold_checkBox.isChecked( ) else 0 self.ui.color_change_button.clicked.connect(self.change_font_color) self.ui.left_alignment.triggered.connect( lambda: self.ui.main_text.setAlignment(Qt.AlignLeft)) self.ui.center_alignment.triggered.connect( lambda: self.ui.main_text.setAlignment(Qt.AlignCenter)) self.ui.right_alignment.triggered.connect( lambda: self.ui.main_text.setAlignment(Qt.AlignRight)) self.ui.justify_alignment.triggered.connect( lambda: self.ui.main_text.setAlignment(Qt.AlignJustify)) self.ui.bold_checkBox.toggled.connect( lambda: self.ui.main_text.setFontWeight(self.text_weight())) self.ui.italic_checkBox.toggled.connect( lambda: self.ui.main_text.setFontItalic(self.ui.italic_checkBox. isChecked())) self.ui.underline_checkBox.toggled.connect( lambda: self.ui.main_text.setFontUnderline( self.ui.underline_checkBox.isChecked())) self.ui.font_size_spinBox.valueChanged.connect( lambda: self.ui.main_text.setFontPointSize( self.ui.font_size_spinBox.value())) self.ui.select_font_box.currentFontChanged.connect(self.change_font)
def __init__(self, parent=None): # call the parent class's constructor QtWidgets.QMainWindow.__init__(self, parent) self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ui.pushButton_1.clicked.connect(self.select_file) self.ui.pushButton_2.clicked.connect(self.run_datapoints) self.ui.dateEdit_1.setDateTime(QtCore.QDateTime.currentDateTime()) self.ui.dateEdit_2.setDateTime(QtCore.QDateTime.currentDateTime()) self.ui.dateEdit_1.dateChanged.connect(self.update_date) self.ui.radioButton_1.setChecked(True) self.ui.radioButton_4.setChecked(True) self.ui.pushButton_3.clicked.connect(self.run_regression) self.ui.lineEdit_3.setText("5") self.ui.lineEdit_4.setText("10") self.ui.pushButton_4.clicked.connect(self.write_excel) self.ui.graphicsView_1.hide() self.ui.graphicsView_2.hide() self.MessageBox = ctypes.windll.user32.MessageBoxW
def __init__(self): super(ApplicationWindow, self).__init__() pg.setConfigOption('background', '042629') self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ui.InputViewerArray = [ self.ui.ImageOneview, self.ui.ImageTwoView, self.ui.ImageOneComponent, self.ui.ImageTwoComponent, self.ui.ModifiedOne, self.ui.ModifiefTwo ] for i in range(len(self.ui.InputViewerArray)): self.ui.InputViewerArray[i].getPlotItem().hideAxis('left') self.ui.InputViewerArray[i].getPlotItem().hideAxis('bottom') self.ImageOneChoice = True self.ImageObject = [0, 0] self.ImageDrawArray = [0, 0] self.ImageArray = [0, 0] self.FilePathArray = [0, 0] self.ui.ComponentOneChoice.currentTextChanged.connect(self.ComboValues) self.ui.Browser.clicked.connect(self.Browse) self.ui.DrawComboArray = [ self.ui.ImageOneViewChoice, self.ui.ImageTwoViewChoice ] self.ui.SlidersArray = [self.ui.MixerSliderOne, self.ui.MixerSliderTwo] self.ui.TextArray = [self.ui.SliderOneValue, self.ui.SliderTwoValue] self.ui.ImageOneViewChoice.currentTextChanged.connect( lambda: self.Draw(0, 0, 0, 2, None)) self.ui.ImageTwoViewChoice.currentTextChanged.connect( lambda: self.Draw(1, 1, 0, 3, None)) self.ui.MixerSliderOne.valueChanged.connect( lambda: self.SlidersValue(0)) self.ui.MixerSliderTwo.valueChanged.connect( lambda: self.SlidersValue(1)) for i in range(2): self.ui.ImageMixerOneChoice.model().item(i + 1).setEnabled(False) self.ui.ImageMixerTwoChoice.model().item(i + 1).setEnabled(False)
def __init__(self, parent=None): super(self.__class__, self).__init__() self.car = None self.rps_counter = None self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ui.forwardBtn.clicked.connect(self.forward_clicked) self.ui.backBtn.clicked.connect(self.backward_clicked) self.ui.leftBtn.clicked.connect(self.left_clicked) self.ui.rightBtn.clicked.connect(self.right_clicked) self.ui.stopBtn.clicked.connect(self.stop_clicked) self.ui.startButton.clicked.connect(self.start_clicked) self.ui.actionOpen_Writer.triggered.connect(self.open_writer) self.ui.actionExit.triggered.connect(self.exit) self.ui.actionAbout.triggered.connect(self.about) self.img_left = self.ui.img_left self.img_right = self.ui.img_right self.img_center = self.ui.img_center self.camera_label = { 'camera_r': self.img_left, 'camera_c': self.img_center, 'camera_l': self.img_right } self.sensor_label = { 'left': self.ui.sensor_left, 'center': self.ui.sensor_center, 'right': self.ui.sensor_right } self.add_log("DrivingMatter GUI Started.") self.show_image()
def __init__(self, parent=None): QWidget.__init__(self, parent) self.ui = Ui_MainWindow() self.ui.setupUi(self) self.setInputStrings() self.ui.buttonCheck.clicked.connect(self.clickMethod)
from GUI import Ui_MainWindow from PyQt5 import QtGui, QtWidgets if __name__ == "__main__": import sys app = QtWidgets.QApplication(sys.argv) MainWindow = QtWidgets.QMainWindow() glFormat = QtGui.QSurfaceFormat() ui = Ui_MainWindow() ui.setupUi(glFormat, MainWindow) MainWindow.show() code = app.exec_() sys.exit(code)
def __init__(self): super(MyWork, self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) #Calls GUI.py, loads the GUI self.show()
def __init__(self, *args, **kwargs): #Configuration QtWidgets.QMainWindow.__init__(self, *args, **kwargs) #Inicializar clases heredadas self.ui = Ui_MainWindow() #Inicializamos la ventanan de la GUI self.ui.setupUi(self) #Set style try: self.real_path = os.path.dirname(os.path.abspath(__file__)) with open(self.real_path + '/GUI_style.css') as f: self.setStyleSheet(f.read()) except: self.real_path = os.path.dirname(sys.executable) with open(self.real_path + '/GUI_style.css') as f: self.setStyleSheet(f.read()) #Arrow icon = QtGui.QIcon() arrow = self.real_path + '/Arrow.jpg' icon.addPixmap(QtGui.QPixmap(arrow), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon.addPixmap(QtGui.QPixmap(arrow), QtGui.QIcon.Normal, QtGui.QIcon.On) self.ui.toolButton_arrow.setIcon(icon) #Properties self.main_dir = '' self.files = [] self.files_order = [] self.files_f = [] self.filter = ["Python (*.py)", "Fortran files (*.f90)"] self.fcomments = 'before' self.terminal = True self.lib = '' self.new_folder = '' self.folder_path = '' self.interface = '' self.py_interface = '' self.module_list = [] self.window_fmodule = ffiles.Window_fmodule(self_fparser=self) self.window_options = ffiles.Window_options(self_fparser=self) self.terminal_text = ffiles.Terminal(self_fparser=self) self.makefile = make.Makefile(self_fparser=self) self.ui.actionOpen_Directory.setShortcut("Ctrl+O") self.ui.actionOpen_Files.setShortcut("Ctrl+F") self.ui.actionOptions.setShortcut("Ctrl+T") self.ui.actionClear.setShortcut("Ctrl+W") #Connect signals #Use .connect(lambda: function(args)) to send extra arguments through the function self.ui.menuFile.triggered[QtWidgets.QAction].connect(self.action) self.ui.toolButton_arrow.clicked.connect( lambda: ffiles.select_ffiles(self)) self.ui.pushButton_fparser.clicked.connect( lambda: ffiles.fortran_parser(self)) # self.ui.combobox.signal.connect(lambda: make.function(self.ui,self.makefile)) #self.ui.pushButton_makeOK.clicked.connect(lambda: make.selectOS(self.ui)) self.ui.comboBox_makeFC.activated.connect(self.makefile.fcompiler) self.ui.pushButton_searchFC.clicked.connect(self.makefile.searchFC) self.ui.toolButton_lib.clicked.connect(self.makefile.searchLib) #self.ui.pushButton_makeOK.clicked.connect(self.makefile.properties) self.ui.pushButton_makeOK.clicked.connect(self.makefile.runmake)
def __init__(self, path_to_patient, index_side, interactive_mode): self.main_win = QMainWindow() self.ui = Ui_MainWindow() self.ui.setupUi(self.main_win) self.path_to_patient = path_to_patient self.index_side = int(index_side) self.interactive_mode = int(interactive_mode) self.rel_folder = self.rel_folder() # Add stylesheet self.stylesheet_filename = '{}/UX/dark.qss'.format(self.rel_folder) self.loadStylesheet(self.stylesheet_filename) self.current_file_name = " " # call classes self.externalNeuronArray = PopUpExternalNeuronArray(self.main_win) self.meshRefinement = PopUpMeshRefinement(self.main_win) self.cpeActive = PopUpCPEActive(self.main_win) self.fullFieldIFFT = PopUpFullFieldIFFT(self.main_win) # Initializations # Extra Widget Group Show/Hide state # self.ui.widget_CPE_Active.hide() # self.ui.widget_Global_Rot.hide() if self.ui.comboBox_Spectrum_Truncation_Method.currentText( ) == 'No Truncation': self.ui.widget_Spectrum_Truncation_Method.hide() self.ui.stackedWidget.setCurrentIndex(0) # self.ui.widget_Name_Prepared_Array.hide() # Initial States # Signals to slots # Test function self.ui.checkBox_Voxel_orr_DTI.stateChanged.connect( lambda: self.selection_list(self.ui.checkBox_Voxel_orr_DTI)) self.ui.checkBox_Init_Neuron_Model_Ready.stateChanged.connect( lambda: self.selection_list(self.ui. checkBox_Init_Neuron_Model_Ready)) self.ui.checkBox_Init_Mesh_Ready.stateChanged.connect( lambda: self.selection_list(self.ui.checkBox_Init_Mesh_Ready)) self.ui.checkBox_Adjusted_Neuron_Model_Ready.stateChanged.connect( lambda: self.selection_list(self.ui. checkBox_Adjusted_Neuron_Model_Ready)) self.ui.checkBox_Signal_Generation_Ready.stateChanged.connect( lambda: self.selection_list(self.ui. checkBox_Signal_Generation_Ready)) self.ui.checkBox_CSF_Mesh_Ready.stateChanged.connect( lambda: self.selection_list(self.ui.checkBox_CSF_Mesh_Ready)) self.ui.checkBox_Adapted_Mesh_Ready.stateChanged.connect( lambda: self.selection_list(self.ui.checkBox_Adapted_Mesh_Ready)) self.ui.checkBox_Parallel_Computing_Ready.stateChanged.connect( lambda: self.selection_list(self.ui. checkBox_Parallel_Computing_Ready)) self.ui.checkBox_Parallel_Computing_Interrupted.stateChanged.connect( lambda: self.selection_list(self.ui. checkBox_Parallel_Computing_Ready)) self.ui.checkBox_IFFT_Ready.stateChanged.connect( lambda: self.selection_list(self.ui.checkBox_IFFT_Ready)) # Page Change self.ui.treeWidget_Project_Browser.itemSelectionChanged.connect( lambda: self.qtree_item()) self.ui.treeWidget_Project_Browser.topLevelItem(0).setSelected(True) # CheckBox signal self.ui.checkBox_Parallel_Computing_Interrupted.stateChanged.connect( lambda: self.connected_check_boxes( self.ui.checkBox_Parallel_Computing_Interrupted, self.ui. checkBox_Parallel_Computing_Ready)) self.ui.checkBox_Parallel_Computing_Ready.stateChanged.connect( lambda: self.connected_check_boxes( self.ui.checkBox_Parallel_Computing_Ready, self.ui. checkBox_Parallel_Computing_Interrupted)) self.ui.checkBox_Current_Control.stateChanged.connect( lambda: self.disable_widget(self.ui.checkBox_Current_Control, self. ui.checkBox_CPE_Active)) self.ui.checkBox_Neuron_Model_Array_Prepared.stateChanged.connect( lambda: self.show_menu_item_on_checkbox_click( self.ui.checkBox_Neuron_Model_Array_Prepared, self.ui. widget_Name_Of_External_Neuron_Array)) self.ui.checkBox_Neuron_Model_Array_Prepared.stateChanged.connect( lambda: self.show_menu_item_on_checkbox_click( self.ui.checkBox_Neuron_Model_Array_Prepared, self.ui. widget_Name_Of_External_Neuron_Array_2)) self.ui.checkBox_Neuron_Model_Array_Prepared.stateChanged.connect( lambda: self.show_menu_item_on_checkbox_click( self.ui.checkBox_Neuron_Model_Array_Prepared, self.ui. widget_Name_Of_External_Neuron_Array_3)) # PopUps self.ui.checkBox_Neuron_Model_Array_Prepared.stateChanged.connect( lambda: self.pop_up_reverse( self.ui.checkBox_Neuron_Model_Array_Prepared, self. externalNeuronArray, self.main_win)) self.ui.checkBox_Skip_Mesh_Refinement.stateChanged.connect( lambda: self.pop_up_reverse(self.ui.checkBox_Skip_Mesh_Refinement, self.meshRefinement, self.main_win)) self.ui.checkBox_CPE_Active.stateChanged.connect(lambda: self.pop_up( self.ui.checkBox_CPE_Active, self.cpeActive, self.main_win)) self.ui.checkBox_Full_Field_IFFT.stateChanged.connect( lambda: self.pop_up(self.ui.checkBox_Full_Field_IFFT, self. fullFieldIFFT, self.main_win)) # Signal to show hidden menu items # self.ui.lineEdit_Brain_Shape.editingFinished.connect(lambda: self.brain_shape_name_control()) # self.ui.lineEdit_Brain_Shape.textEdited.connect(lambda: self.brain_shape_name_control()) # self.ui.lineEdit_Brain_Shape.textChanged.connect(lambda: self.brain_shape_name_control()) self.ui.lineEdit_Approximating_Dimensions.editingFinished.connect( lambda: self.check_lineedit_if_list_entered( self.ui.lineEdit_Approximating_Dimensions.text(), self.ui. lineEdit_Approximating_Dimensions)) self.ui.lineEdit_Approx_Geometry_Center.editingFinished.connect( lambda: self.check_lineedit_if_list_entered( self.ui.lineEdit_Approx_Geometry_Center.text(), self.ui. lineEdit_Approx_Geometry_Center)) self.ui.comboBox_Spectrum_Truncation_Method.currentIndexChanged.connect( lambda: self.show_menu_item_on_combobox_state_change( "No Truncation", self.ui.comboBox_Spectrum_Truncation_Method, self.ui.widget_Spectrum_Truncation_Method)) self.ui.comboBox_Spectrum_Truncation_Method.currentIndexChanged.connect( lambda: self.spectrum_truncation_method_combobox_control()) # self.ui.checkBox_Neuron_Model_Array_Prepared.stateChanged.connect(lambda: self.hide_menu_item_on_checkbox_click(self.ui.checkBox_Neuron_Model_Array_Prepared, self.externalNeuronArray.ui.widget_Global_Rot)) self.ui.checkBox_Dimensions_From_MRI.stateChanged.connect( lambda: self.hide_menu_item_on_checkbox_click( self.ui.checkBox_Dimensions_From_MRI, self.ui. widget_Approximating_Dimensions)) self.ui.checkBox_Dimensions_From_MRI.stateChanged.connect( lambda: self.hide_menu_item_on_checkbox_click( self.ui.checkBox_Dimensions_From_MRI, self.ui. widget_Approximating_Dimensions_2)) self.ui.checkBox_Dimensions_From_MRI.stateChanged.connect( lambda: self.hide_menu_item_on_checkbox_click( self.ui.checkBox_Dimensions_From_MRI, self.ui. widget_Approximating_Dimensions_3)) self.ui.checkBox_Approx_Geom_Centered_On_MRI.stateChanged.connect( lambda: self.hide_menu_item_on_checkbox_click( self.ui.checkBox_Approx_Geom_Centered_On_MRI, self.ui. widget_Approx_Geometry_Center)) self.ui.checkBox_Approx_Geom_Centered_On_MRI.stateChanged.connect( lambda: self.hide_menu_item_on_checkbox_click( self.ui.checkBox_Approx_Geom_Centered_On_MRI, self.ui. widget_Approx_Geometry_Center_2)) self.ui.checkBox_Approx_Geom_Centered_On_MRI.stateChanged.connect( lambda: self.hide_menu_item_on_checkbox_click( self.ui.checkBox_Approx_Geom_Centered_On_MRI, self.ui. widget_Approx_Geometry_Center_3)) self.ui.checkBox_Approx_Geom_Centered_On_MRI.stateChanged.connect( lambda: self.ui.lineEdit_Approx_Geometry_Center.setText('0')) # LineEdit to List functions self.ui.lineEdit_N_Ranvier.editingFinished.connect( lambda: self.check_lineedit_if_list_entered_absolute( self.ui.lineEdit_N_Ranvier.text(), self.ui.lineEdit_N_Ranvier)) self.ui.lineEdit_Fiber_Diameter.editingFinished.connect( lambda: self.check_lineedit_if_list_entered_absolute( self.ui.lineEdit_Fiber_Diameter.text(), self.ui. lineEdit_Fiber_Diameter)) self.ui.lineEdit_Phi_Vector.editingFinished.connect( lambda: self.check_lineedit_if_list_entered( self.ui.lineEdit_Phi_Vector.text(), self.ui.lineEdit_Phi_Vector )) self.ui.lineEdit_Truncation_Parameter.editingFinished.connect( lambda: self.check_lineedit_if_value_entered( self.ui.lineEdit_Truncation_Parameter.text(), self.ui. lineEdit_Truncation_Parameter)) # Load last saved dictionary self.load_last_save_state() # modify me!!!!!!!!!!!!!! self.dict_list = [ "pop_up_control/dictionaries/dict_cpe_active.py", "pop_up_control/dictionaries/dict_external_neuron_array.py", "pop_up_control/dictionaries/dict_full_field_ifft.py", "pop_up_control/dictionaries/dict_mesh_refinement.py" ] # Display Images self.ui.pushButton_Placed_Neurons.clicked.connect(lambda: self.display( self.ui.label_Image_Placed_Neurons, self.path_to_patient + '/Images/Axon_connections.png', self.path_to_patient + '/Images/Placed_neurons.png')) self.ui.pushButton_Signal_Recovered.clicked.connect( lambda: self.display( self.ui.label_Image_Signal_Recovered, self.path_to_patient + '/Images/Signal_recovered_shape.png', self.path_to_patient + '/Images/Signal_recovered_shape.png')) self.ui.pushButton_CSF_Full_Refinement.clicked.connect( lambda: self.display( self.ui.label_Image_CSF_Full_Refinement, self.path_to_patient + '/Images/CSF_full_refinement.png', self.path_to_patient + '/Images/CSF_full_refinement.png')) self.ui.pushButton_Adapted_Mesh.clicked.connect(lambda: self.display( self.ui.label_Image_Adapted_Mesh, self.path_to_patient + '/Images/Adapted_mesh.png', self.path_to_patient + '/Images/Adapted_mesh.png')) self.ui.pushButton_Signal_Convoluted_1st_Point.clicked.connect( lambda: self.display( self.ui.label_Image_Signal_Convoluted_1st_Point, self. path_to_patient + '/Images/Signal_convoluted_1st_point.png', self.path_to_patient + '/Images/Signal_convoluted_1st_point.png')) self.ui.pushButton_Axon_Activation.clicked.connect( lambda: self.display( self.ui.label_Image_Axon_Activation, self.path_to_patient + '/Images/Axon_activation.png', self.path_to_patient + '/Images/Activated_neurons.png')) # Load/Save/Reset/Run to dictionary self.ui.pushButton_Run.clicked.connect(lambda: self.dict_write( self.output_dict(), self.current_file_name)) # Modification to run a subprocess on another thread when Run button is clicked. self.ui.pushButton_Run.clicked.connect(lambda: self.run_thread()) self.ui.pushButton_SaveAs.clicked.connect(lambda: self.save_as()) self.ui.pushButton_Load.clicked.connect(lambda: self.load_dict()) self.ui.pushButton_Reset.clicked.connect(lambda: self.reset_state())
def init_ui(self): self.app = QtWidgets.QApplication(sys.argv) self.MainWindow = QtWidgets.QMainWindow() self.ui = Ui_MainWindow() self.ui.setupUi(self.MainWindow)