예제 #1
0
def setupGame():
    d = ConfigDialog(win, G.numMines, G.gridRows, G.gridCols)
    d.eMines.focus_set()
    d.top.grab_set()
    win.wait_window(d.top)
    if d.changed:
        # d.top (widget) destroyed but d still exists..
        G.numMines = d.mines
        G.gridRows = d.rows
        G.gridCols = d.cols
        newGame()
예제 #2
0
파일: main.py 프로젝트: ddiaz-yx/respiface
	def btnConfig_pressed(self, event: QMouseEvent):
		'''
		Adjust all params in a single screen
		'''
		self.plot_update_timer.stop()
		dialog_cfg = ConfigDialog(params=self.params, parent=self.centralwidget)
		result = dialog_cfg.exec_()
		self.plot_update_timer.start()
		if result:
			self.params = copy.deepcopy(dialog_cfg.params)
			self.dq_user_set_param.append([p for k, p in self.params.items()])  # Envia el nuevo valor al controlador
			print(f"Modo: {self.params['mode'].value}")
			self.update_adjustable()
			self.set_blockable_ui_mouse_press_events()
		self.update_param_labels()
예제 #3
0
 def run(self):
     dlg = ConfigDialog()
     dlg.exec_()
	def do_create_configure_widget(self):
		if self.config_dialog == None:
			self.config_dialog = ConfigDialog()
		return self.config_dialog.config_box