void EditorEllipseItem::validRotationReferencePoint(const QPointF &p)
{
    Q_UNUSED(p);
    prepareUndo();
    m_rotation += m_relativeRotation;
    saveUndo();
}
Esempio n. 2
0
bool ScytaleUI::doAction() {
    if (!checkFields()) return false;

    prepareUndo();
    algo.setLetterOnDiameter(letterNbBox->value());
    algo.setCleanText(cleanTextOpt->isChecked());


    return true;
}
Esempio n. 3
0
void ScytaleUI::onCrackRequest() {
    if (!checkFields()) return;

    if ((text->toPlainText().length() % 2)) {
        QMessageBox::warning(this, tr("Error"), tr("Scytale ciphered message must be odd"));
        return;
    }
    
    prepareUndo();
    algo.setCipherMsg(text->toPlainText());
    algo.setLetterOnDiameter(algo.crack());
    algo.setCleanText(cleanTextOpt->isChecked());
    algo.decipher();
    text->setText(algo.getClearMsg());
}
Esempio n. 4
0
void ScytaleUI::onUndoAction() {
    QString prev = backup;
    prepareUndo();
    text->setText(prev);
}
void EditorEllipseItem::pressPoint(const QPointF &)
{
    prepareUndo();
}