Dieses kleine Programm wandelt Text wie ".and." "&&" u.s.w. in Unicode Zeichen um.
Irgendwann kommt noch eine automatische Umformung zur konjunktive Normalform KNF
// input
QString text = ui->lineEdit->text();
// replace easy to write operator with unicode symbol
// and
text = text.replace("&&", QChar(8743));
text = text.replace(".and.", QChar(8743), Qt::CaseInsensitive);
// or
text = text.replace("||", QChar(8744));
text = text.replace(".or.", QChar(8744), Qt::CaseInsensitive);
// negation
text = text.replace("!", QChar(172));
text = text.replace(".not.", QChar(172), Qt::CaseInsensitive);
// output
ui->lineEdit_out->setText(text);
Liste_der_Unicodeblöcke
Unicodeblock_Lateinisch-1,_Ergänzung
Unicodeblock_Mathematische_Operatoren
todo:
History der eingegebenen Formeln mit Ergebnis der Umrechnung. Wenn man eine Formel in der History anklickt, soll sie wieder im Eingabeformular erscheinen.