mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-30 07:09:59 +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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,8 +56,8 @@ class DynamicTextFieldEditor : public ElementItemEditor
|
||||
void on_m_width_sb_editingFinished();
|
||||
void on_m_elmt_info_cb_activated(const QString &arg1);
|
||||
void on_m_text_from_cb_activated(int index);
|
||||
|
||||
void on_m_composite_text_pb_clicked();
|
||||
void on_m_alignment_pb_clicked();
|
||||
|
||||
private:
|
||||
Ui::DynamicTextFieldEditor *ui;
|
||||
|
||||
@@ -196,6 +196,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<widget class="QPushButton" name="m_alignment_pb">
|
||||
<property name="text">
|
||||
<string>Alignement</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user