def _on_log(self, checked = False): with qui_utils.notify_error(self._errorLog): logPath = linux_utils.get_resource_path( "cache", self._constants.__app_name__, "%s.log" % self._constants.__app_name__ ) with open(logPath, "r") as f: logLines = f.xreadlines() log = "".join(logLines) self._clipboard.setText(log)
def _on_focus_changed(self, oldWindow, newWindow): with qui_utils.notify_error(self._app.errorLog): if oldWindow is None and newWindow is not None: self._window.setUpdatesEnabled(True) elif oldWindow is not None and newWindow is None: self._window.setUpdatesEnabled(False)
def _on_close_window(self, checked = True): with qui_utils.notify_error(self._errorLog): self.close()
def _on_quit(self, checked = False): with qui_utils.notify_error(self._errorLog): self._close_windows()
def _on_next_orientation(self, checked = False): with qui_utils.notify_error(self._errorLog): self.set_orientation(self._next_orientation(self._orientation))
def _on_toggle_fullscreen(self, checked = False): with qui_utils.notify_error(self._errorLog): self._mainWindow.set_fullscreen(checked)