Exemple #1
0
 def to_str(self, p_args):
     try:
         self.line_polynom.setText(polys.get_str(p_args[1]))
         polys.get_pict(polys.get_str(self.arg[1]), IMAGE_PATH)
         self.poly_formula.setPixmap(QPixmap(IMAGE_PATH))
     except InvalidMults:
         pass
Exemple #2
0
 def save_pict(self):
     path, okBtnPressed = QInputDialog.getText(self, '',
                                               'Введите название файла')
     if okBtnPressed:
         s = self.line_polynom.text()
         try:
             polys.get_pict(polys.get_str(s), path)
         except InvalidMults:
             polys.get_pict(s, path)
Exemple #3
0
 def mult_clicked(self):
     self.arg = [self.line_polynom.text(), '']
     self.cur_proc = self.polymult
     self.line_polynom.setText('')
     try:
         self.last_polynom.setText(polys.get_str(self.arg[0]))
         polys.get_pict(polys.get_str(self.arg[0]), IMAGE_PATH)
         self.poly_formula.setPixmap(QPixmap(IMAGE_PATH))
     except InvalidMults:
         pass
Exemple #4
0
    def polysub(self, p_args):
        pol1 = p_args[0]
        pol2 = p_args[1]

        try:
            p = polys.sub(pol1, pol2)
            self.line_polynom.setText(p)
            self.last_polynom.setText(p)
            polys.get_pict(p, IMAGE_PATH)
            self.poly_formula.setPixmap(QPixmap(IMAGE_PATH))
        except InvalidMults:
            self.line_polynom.setText('Неверно введен(ы) многочлен(ы)')