[qet] [2315] Add move and focus to import image

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


Revision: 2315
Author:   scorpio810
Date:     2013-06-21 19:16:28 +0200 (Fri, 21 Jun 2013)
Log Message:
-----------
Add move and focus to import image

Modified Paths:
--------------
    branches/0.4/sources/diagramview.cpp

Modified: branches/0.4/sources/diagramview.cpp
===================================================================
--- branches/0.4/sources/diagramview.cpp	2013-06-21 14:09:22 UTC (rev 2314)
+++ branches/0.4/sources/diagramview.cpp	2013-06-21 17:16:28 UTC (rev 2315)
@@ -37,6 +37,7 @@
 #include "qeticons.h"
 #include "qetmessagebox.h"
 #include "qtextorientationspinboxwidget.h"
+#include <QGraphicsPixmapItem>
 
 
 /**
@@ -1259,6 +1260,10 @@
 
 	addImage();
 	QGraphicsPixmapItem *pixItem = new QGraphicsPixmapItem( QPixmap::fromImage(image_to_add_) );
+	pixItem->setFlag(QGraphicsItem::ItemIsMovable,true);
+	pixItem->setFlag(QGraphicsItem::ItemIsSelectable,true);
+	pixItem->setFlag(QGraphicsItem::ItemIsPanel, true);
+	pixItem->setPos(qrand()*500/RAND_MAX,qrand()*500/RAND_MAX);
 	scene ->addItem( pixItem );
 
 /*// cree un nouveau champ de texte


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