mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user