22 #include <QDoubleSpinBox>    24 #include <QVBoxLayout>    25 #include <QHBoxLayout>    39     qle_x = 
new QDoubleSpinBox();
    40     qle_y = 
new QDoubleSpinBox();
    42     qle_x -> setRange(-5000, 5000);
    43     qle_y -> setRange(-5000, 5000);
    51     QVBoxLayout *main_layout = 
new QVBoxLayout();
    52     main_layout -> addWidget(
new QLabel(
tr(
"Position : ")));
    54     QHBoxLayout *position = 
new QHBoxLayout();
    55     position -> addWidget(
new QLabel(
tr(
"x : ")));
    56     position -> addWidget(
qle_x                 );
    57     position -> addWidget(
new QLabel(
tr(
"y : ")));
    58     position -> addWidget(
qle_y                 );
    59     main_layout -> addLayout(position);
    61     QHBoxLayout *ori = 
new QHBoxLayout();
    62     ori -> addWidget(
new QLabel(
tr(
"Orientation : ")));
    64     main_layout -> addLayout(ori);
    66     main_layout -> addStretch();
    67     setLayout(main_layout);
    94     if (
PartTerminal *part_terminal = dynamic_cast<PartTerminal *>(new_part))
    96         if(
part == part_terminal) 
return true;
   123         undo->setText(
tr(
"Modifier l'orientation d'une borne"));
   133     QPointF new_pos(
qle_x->value(), 
qle_y->value());
   134     if (new_pos != 
part->pos())
   137         undo->setText(
tr(
"Déplacer une borne"));
   165         connect(
qle_x,       SIGNAL(editingFinished()), 
this, SLOT(
updatePos()));
   166         connect(
qle_y,       SIGNAL(editingFinished()), 
this, SLOT(
updatePos()));
   171         disconnect(
qle_x,       SIGNAL(editingFinished()), 
this, SLOT(
updatePos()));
   172         disconnect(
qle_y,       SIGNAL(editingFinished()), 
this, SLOT(
updatePos()));
 The QPropertyUndoCommand class This undo command manage QProperty of a QObject. This undo command can...
bool setPart(CustomElementPart *) override
void enableAnimation(bool animate=true)
QPropertyUndoCommand::enableAnimation True to enable animation. 
TerminalEditor(QETElementEditor *, PartTerminal *=nullptr, QWidget *=nullptr)
CustomElementPart * currentPart() const override
QVariant property(const char *name) const override
~TerminalEditor() override
Destructeur. 
void activeConnections(bool)
void updateForm() override
update Number and name, create cancel object 
void updateTerminalO()
Met a jour l'orientation de la borne et cree un objet d'annulation. 
void orientationChanged()
virtual QUndoStack & undoStack() const