38 QList <DiagramTextItem *> texts_list;
39 QList <ElementTextItemGroup *> groups_list;
53 if(texts_list.count() || groups_list.count())
58 if(texts_list.count())
59 text.append(
QObject::tr(
"Pivoter %1 textes").arg(texts_list.count()));
60 if(groups_list.count())
67 text.append(
QObject::tr(
" %1 groupes de textes").arg(groups_list.count()));
77 #if QT_VERSION >= 0x050900 105 cti->forceMovedByUser(
true);
111 QDialog ori_text_dialog;
112 ori_text_dialog.setSizeGripEnabled(
false);
114 ori_text_dialog.setWindowFlags(Qt::Sheet);
116 ori_text_dialog.setWindowTitle(
QObject::tr(
"Orienter les textes sélectionnés",
"window title"));
120 ori_widget->setParent(&ori_text_dialog);
121 ori_widget->
spinBox()->selectAll();
124 QObject::connect(&buttons, SIGNAL(accepted()), &ori_text_dialog, SLOT(accept()));
125 QObject::connect(&buttons, SIGNAL(rejected()), &ori_text_dialog, SLOT(reject()));
127 QVBoxLayout layout_v(&ori_text_dialog);
128 layout_v.setSizeConstraint(QLayout::SetFixedSize);
129 layout_v.addWidget(ori_widget);
130 layout_v.addStretch();
131 layout_v.addWidget(&buttons);
133 if (ori_text_dialog.exec() == QDialog::Accepted)
135 #if QT_VERSION >= 0x050900 146 QPropertyAnimation *animation =
new QPropertyAnimation(target, propertyName);
147 animation->setDuration(300);
148 animation->setStartValue(start);
149 animation->setEndValue(end);
150 animation->setEasingCurve(QEasingCurve::OutQuad);
static QTextOrientationSpinBoxWidget * createTextOrientationSpinBoxWidget()
QList< DiagramTextItem * > selectedTexts() const
DiagramContent::selectedTexts.
QHash< ConductorTextItem *, bool > m_cond_texts
void setupAnimation(QObject *target, const QByteArray &propertyName, const QVariant &start, const QVariant &end)
QDoubleSpinBox * spinBox() const
QPointer< Diagram > m_diagram
QList< ElementTextItemGroup * > selectedTextsGroup() const
DiagramContent::selectedTextsGroup.
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
QParallelAnimationGroup * m_anim_group
virtual bool wasRotateByUser() const
ConductorTextItem::wasRotateByUser.
RotateTextsCommand(Diagram *diagram, QUndoCommand *parent=nullptr)
RotateTextsCommand::RotateTextsCommand.
double orientation() const