[qet] [844] Rapatriement dans le trunk de la revision 843 (branche 0.3).

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 844
Author:   xavier
Date:     2010-01-21 23:41:40 +0100 (Thu, 21 Jan 2010)
Log Message:
-----------
Rapatriement dans le trunk de la revision 843 (branche 0.3).
Cela permet d'adapter le trunk au nouveau comportement de Qt 4.6 relatif au signalement des changements de geometrie dans QGraphicsItem::itemChange(...).

Modified Paths:
--------------
    trunk/sources/editor/partarc.cpp
    trunk/sources/editor/partcircle.cpp
    trunk/sources/editor/partellipse.cpp
    trunk/sources/editor/partline.cpp
    trunk/sources/editor/partpolygon.cpp
    trunk/sources/editor/partrectangle.cpp
    trunk/sources/editor/partterminal.cpp
    trunk/sources/editor/parttext.cpp
    trunk/sources/editor/parttextfield.cpp

Modified: trunk/sources/editor/partarc.cpp
===================================================================
--- trunk/sources/editor/partarc.cpp	2010-01-20 00:16:55 UTC (rev 843)
+++ trunk/sources/editor/partarc.cpp	2010-01-21 22:41:40 UTC (rev 844)
@@ -31,6 +31,9 @@
 	start_angle(0)
 {
 	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+#if QT_VERSION >= 0x040600
+	setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
+#endif
 	setAcceptedMouseButtons(Qt::LeftButton);
 	informations = new ArcEditor(elementEditor(), this);
 	informations -> setElementTypeName(name());

Modified: trunk/sources/editor/partcircle.cpp
===================================================================
--- trunk/sources/editor/partcircle.cpp	2010-01-20 00:16:55 UTC (rev 843)
+++ trunk/sources/editor/partcircle.cpp	2010-01-21 22:41:40 UTC (rev 844)
@@ -26,6 +26,9 @@
 */
 PartCircle::PartCircle(QETElementEditor *editor, QGraphicsItem *parent, QGraphicsScene *scene) : QGraphicsEllipseItem(parent, scene), CustomElementGraphicPart(editor) {
 	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+#if QT_VERSION >= 0x040600
+	setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
+#endif
 	setAcceptedMouseButtons(Qt::LeftButton);
 	informations = new CircleEditor(elementEditor(), this);
 	informations -> setElementTypeName(name());

Modified: trunk/sources/editor/partellipse.cpp
===================================================================
--- trunk/sources/editor/partellipse.cpp	2010-01-20 00:16:55 UTC (rev 843)
+++ trunk/sources/editor/partellipse.cpp	2010-01-21 22:41:40 UTC (rev 844)
@@ -26,6 +26,9 @@
 */
 PartEllipse::PartEllipse(QETElementEditor *editor, QGraphicsItem *parent, QGraphicsScene *scene) : QGraphicsEllipseItem(parent, scene), CustomElementGraphicPart(editor) {
 	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+#if QT_VERSION >= 0x040600
+	setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
+#endif
 	setAcceptedMouseButtons(Qt::LeftButton);
 	informations = new EllipseEditor(elementEditor(), this);
 	informations -> setElementTypeName(name());

Modified: trunk/sources/editor/partline.cpp
===================================================================
--- trunk/sources/editor/partline.cpp	2010-01-20 00:16:55 UTC (rev 843)
+++ trunk/sources/editor/partline.cpp	2010-01-21 22:41:40 UTC (rev 844)
@@ -34,6 +34,9 @@
 	second_length(1.5)
 {
 	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+#if QT_VERSION >= 0x040600
+	setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
+#endif
 	setAcceptedMouseButtons(Qt::LeftButton);
 	informations = new LineEditor(elementEditor(), this);
 	informations -> setElementTypeName(name());

Modified: trunk/sources/editor/partpolygon.cpp
===================================================================
--- trunk/sources/editor/partpolygon.cpp	2010-01-20 00:16:55 UTC (rev 843)
+++ trunk/sources/editor/partpolygon.cpp	2010-01-21 22:41:40 UTC (rev 844)
@@ -31,6 +31,9 @@
 	closed(false)
 {
 	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+#if QT_VERSION >= 0x040600
+	setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
+#endif
 	setAcceptedMouseButtons(Qt::LeftButton);
 	informations = new PolygonEditor(elementEditor(), this);
 	informations -> setElementTypeName(name());

Modified: trunk/sources/editor/partrectangle.cpp
===================================================================
--- trunk/sources/editor/partrectangle.cpp	2010-01-20 00:16:55 UTC (rev 843)
+++ trunk/sources/editor/partrectangle.cpp	2010-01-21 22:41:40 UTC (rev 844)
@@ -26,6 +26,9 @@
 */
 PartRectangle::PartRectangle(QETElementEditor *editor, QGraphicsItem *parent, QGraphicsScene *scene) : QGraphicsRectItem(parent, scene), CustomElementGraphicPart(editor) {
 	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+#if QT_VERSION >= 0x040600
+	setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
+#endif
 	setAcceptedMouseButtons(Qt::LeftButton);
 	informations = new RectangleEditor(elementEditor(), this);
 	informations -> setElementTypeName(name());

Modified: trunk/sources/editor/partterminal.cpp
===================================================================
--- trunk/sources/editor/partterminal.cpp	2010-01-20 00:16:55 UTC (rev 843)
+++ trunk/sources/editor/partterminal.cpp	2010-01-21 22:41:40 UTC (rev 844)
@@ -34,6 +34,9 @@
 	informations -> setElementTypeName(name());
 	updateSecondPoint();
 	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+#if QT_VERSION >= 0x040600
+	setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
+#endif
 	setZValue(100000);
 }
 

Modified: trunk/sources/editor/parttext.cpp
===================================================================
--- trunk/sources/editor/parttext.cpp	2010-01-20 00:16:55 UTC (rev 843)
+++ trunk/sources/editor/parttext.cpp	2010-01-21 22:41:40 UTC (rev 844)
@@ -34,6 +34,9 @@
 	setDefaultTextColor(Qt::black);
 	setFont(QETApp::diagramTextsFont());
 	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+#if QT_VERSION >= 0x040600
+	setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
+#endif
 	setPlainText(QObject::tr("T", "default text when adding a text in the element editor"));
 	infos = new TextEditor(elementEditor(), this);
 	infos -> setElementTypeName(name());
@@ -147,7 +150,7 @@
 	setTextCursor(qtc);
 	
 	setTextInteractionFlags(Qt::NoTextInteraction);
-	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+	setFlag(QGraphicsItem::ItemIsFocusable, false);
 }
 
 /**
@@ -155,7 +158,7 @@
 	@param e Le QGraphicsSceneMouseEvent qui decrit le double-clic
 */
 void PartText::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *e) {
-	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsFocusable);
+	setFlag(QGraphicsItem::ItemIsFocusable, true);
 	setTextInteractionFlags(Qt::TextEditorInteraction);
 	previous_text = toPlainText();
 	QGraphicsTextItem::mouseDoubleClickEvent(e);

Modified: trunk/sources/editor/parttextfield.cpp
===================================================================
--- trunk/sources/editor/parttextfield.cpp	2010-01-20 00:16:55 UTC (rev 843)
+++ trunk/sources/editor/parttextfield.cpp	2010-01-21 22:41:40 UTC (rev 844)
@@ -34,6 +34,9 @@
 	setDefaultTextColor(Qt::black);
 	setFont(QETApp::diagramTextsFont());
 	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+#if QT_VERSION >= 0x040600
+	setFlag(QGraphicsItem::ItemSendsGeometryChanges, true);
+#endif
 	setPlainText(QObject::tr("_", "default text when adding a textfield in the element editor"));
 	infos = new TextFieldEditor(elementEditor(), this);
 	infos -> setElementTypeName(name());
@@ -166,7 +169,7 @@
 	setTextCursor(qtc);
 	
 	setTextInteractionFlags(Qt::NoTextInteraction);
-	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
+	setFlag(QGraphicsItem::ItemIsFocusable, false);
 }
 
 /**
@@ -174,7 +177,7 @@
 	@param e Le QGraphicsSceneMouseEvent qui decrit le double-clic
 */
 void PartTextField::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *e) {
-	setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsFocusable);
+	setFlag(QGraphicsItem::ItemIsFocusable, true);
 	setTextInteractionFlags(Qt::TextEditorInteraction);
 	previous_text = toPlainText();
 	QGraphicsTextItem::mouseDoubleClickEvent(e);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/