mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
fix typo in variable-name (mixture of French and English)
This commit is contained in:
parent
52946f9e3a
commit
da0951d5a0
@ -460,7 +460,7 @@ bool PartDynamicTextField::keepVisualRotation() const {
|
||||
*/
|
||||
void PartDynamicTextField::mouseMoveEvent(QGraphicsSceneMouseEvent *event) {
|
||||
if((event -> buttons() & Qt::LeftButton) && (flags() & QGraphicsItem::ItemIsMovable)) {
|
||||
QPointF pos = event -> scenePos() + (m_origine_pos - event -> buttonDownScenePos(Qt::LeftButton));
|
||||
QPointF pos = event -> scenePos() + (m_origin_pos - event -> buttonDownScenePos(Qt::LeftButton));
|
||||
event -> modifiers() == Qt::ControlModifier ? setPos(pos) : setPos(elementScene() -> snapToGrid(pos));
|
||||
}
|
||||
else
|
||||
@ -473,7 +473,7 @@ void PartDynamicTextField::mouseMoveEvent(QGraphicsSceneMouseEvent *event) {
|
||||
*/
|
||||
void PartDynamicTextField::mousePressEvent(QGraphicsSceneMouseEvent *event) {
|
||||
if(event -> button() == Qt::LeftButton)
|
||||
m_origine_pos = this -> pos();
|
||||
m_origin_pos = this -> pos();
|
||||
|
||||
QGraphicsObject::mousePressEvent(event);
|
||||
}
|
||||
@ -485,9 +485,9 @@ void PartDynamicTextField::mousePressEvent(QGraphicsSceneMouseEvent *event) {
|
||||
void PartDynamicTextField::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {
|
||||
if((event -> button() & Qt::LeftButton) &&
|
||||
(flags() & QGraphicsItem::ItemIsMovable) &&
|
||||
m_origine_pos != pos()) {
|
||||
m_origin_pos != pos()) {
|
||||
QPropertyUndoCommand *undo =\
|
||||
new QPropertyUndoCommand(this, "pos", QVariant(m_origine_pos), QVariant(pos()));
|
||||
new QPropertyUndoCommand(this, "pos", QVariant(m_origin_pos), QVariant(pos()));
|
||||
undo -> setText(tr("Déplacer un champ texte"));
|
||||
undo -> enableAnimation();
|
||||
elementScene() -> undoStack().push(undo);
|
||||
|
@ -114,7 +114,7 @@ class PartDynamicTextField : public QGraphicsTextItem, public CustomElementPart
|
||||
void finishAlignment();
|
||||
|
||||
private:
|
||||
QPointF m_origine_pos,
|
||||
QPointF m_origin_pos,
|
||||
m_saved_point;
|
||||
QString m_text,
|
||||
m_info_name,
|
||||
|
@ -273,7 +273,7 @@ void PartText::setFont(const QFont &font) {
|
||||
|
||||
void PartText::mouseMoveEvent(QGraphicsSceneMouseEvent *event) {
|
||||
if((event -> buttons() & Qt::LeftButton) && (flags() & QGraphicsItem::ItemIsMovable)) {
|
||||
QPointF pos = event -> scenePos() + (m_origine_pos - event -> buttonDownScenePos(Qt::LeftButton));
|
||||
QPointF pos = event -> scenePos() + (m_origin_pos - event -> buttonDownScenePos(Qt::LeftButton));
|
||||
event -> modifiers() == Qt::ControlModifier ? setPos(pos) : setPos(elementScene() -> snapToGrid(pos));
|
||||
}
|
||||
else {
|
||||
@ -283,7 +283,7 @@ void PartText::mouseMoveEvent(QGraphicsSceneMouseEvent *event) {
|
||||
|
||||
void PartText::mousePressEvent(QGraphicsSceneMouseEvent *event) {
|
||||
if(event -> button() == Qt::LeftButton)
|
||||
m_origine_pos = this -> pos();
|
||||
m_origin_pos = this -> pos();
|
||||
|
||||
QGraphicsObject::mousePressEvent(event);
|
||||
}
|
||||
@ -291,9 +291,9 @@ void PartText::mousePressEvent(QGraphicsSceneMouseEvent *event) {
|
||||
void PartText::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {
|
||||
if((event -> button() & Qt::LeftButton) &&
|
||||
(flags() & QGraphicsItem::ItemIsMovable) &&
|
||||
m_origine_pos != pos())
|
||||
m_origin_pos != pos())
|
||||
{
|
||||
QPropertyUndoCommand *undo = new QPropertyUndoCommand(this, "pos", QVariant(m_origine_pos), QVariant(pos()));
|
||||
QPropertyUndoCommand *undo = new QPropertyUndoCommand(this, "pos", QVariant(m_origin_pos), QVariant(pos()));
|
||||
undo -> setText(tr("Déplacer un texte"));
|
||||
undo -> enableAnimation();
|
||||
elementScene() -> undoStack().push(undo);
|
||||
|
@ -100,6 +100,6 @@ class PartText : public QGraphicsTextItem, public CustomElementPart {
|
||||
QPointF saved_point_;
|
||||
qreal saved_font_size_;
|
||||
QGraphicsItem *decorator_;
|
||||
QPointF m_origine_pos;
|
||||
QPointF m_origin_pos;
|
||||
};
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user