def textChangeTrigger(self): self.enableInteraction = True self.clearButtons() if self.textedit.toPlainText() == "": self.enableQSolver = True self.enableInteraction = False try: if self.textedit.toPlainText()[:4] != 'mat_': if self.enableQSolver and self.showQSolver: self.qSol, self.enableInteraction, self.simul = quickSimplify(self) if self.qSol is None: self.qSol = "" if not self.simul: renderQuickSol(self, self.qSol, self.showQSolver) elif self.showQSolver is False: self.qSol = "" renderQuickSol(self, self.qSol, self.showQSolver) else: self.matrix = True self.enableInteraction = True except Exception: logger.error('Invalid Expression') self.enableInteraction = False if self.enableInteraction: self.interactionModeButton.setEnabled(True) else: self.interactionModeButton.setEnabled(False)
def textChangeTrigger(self): if self.textedit.toPlainText() == "": self.enableQSolver = True if self.enableQSolver and self.showQuickSim: self.qSol = quickSimplify(self) if self.qSol is None: self.qSol = "" showQSolve(self, self.showQuickSim) elif self.showQuickSim is False: self.qSol = "" showQSolve(self, self.showQuickSim)
def textChangeTrigger(self): self.enableInteraction = True self.clearButtons() if self.textedit.toPlainText() == "": self.enableQSolver = True self.enableInteraction = False try: if self.enableQSolver and self.showQSolver: self.qSol, self.enableInteraction = quickSimplify(self) if self.qSol is None: self.qSol = "" renderQuickSol(self, self.showQSolver) elif self.showQSolver is False: self.qSol = "" renderQuickSol(self, self.showQSolver) except ZeroDivisionError: self.enableInteraction = False if self.enableInteraction: self.interactionModeButton.setEnabled(True) else: self.interactionModeButton.setEnabled(False)