Element editor : alignment of text field can be edited

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5362 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2018-05-13 19:03:38 +00:00
parent a0b26b847b
commit 31e6db8757
8 changed files with 129 additions and 18 deletions

View File

@@ -23,6 +23,7 @@
#include "qetelementeditor.h"
#include "qetapp.h"
#include "compositetexteditdialog.h"
#include "alignmenttextdialog.h"
#include <QPointer>
#include <QGraphicsItem>
@@ -292,3 +293,16 @@ void DynamicTextFieldEditor::on_m_composite_text_pb_clicked()
}
}
}
void DynamicTextFieldEditor::on_m_alignment_pb_clicked()
{
AlignmentTextDialog atd(m_text_field.data()->alignment(), this);
atd.exec();
if(atd.alignment() != m_text_field.data()->alignment())
{
QPropertyUndoCommand *undo = new QPropertyUndoCommand(m_text_field.data(), "alignment", QVariant(m_text_field.data()->alignment()), QVariant(atd.alignment()));
undo->setText(tr("Modifier l'alignement d'un champ texte"));
undoStack().push(undo);
}
}