[qet] [2407] Minor changes, enable image import |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 2407
Author: scorpio810
Date: 2013-08-03 13:16:00 +0200 (Sat, 03 Aug 2013)
Log Message:
-----------
Minor changes, enable image import
Modified Paths:
--------------
branches/0.4/sources/diagramview.cpp
Modified: branches/0.4/sources/diagramview.cpp
===================================================================
--- branches/0.4/sources/diagramview.cpp 2013-08-01 23:17:39 UTC (rev 2406)
+++ branches/0.4/sources/diagramview.cpp 2013-08-03 11:16:00 UTC (rev 2407)
@@ -1258,27 +1258,30 @@
* @param pos
* @return
*/
-DiagramImageItem *DiagramView::addDiagramImageAtPos(const QPointF &pos) {
+DiagramImageItem *DiagramView::addDiagramImageAtPos(const QPointF &) {
if (!isInteractive() || scene -> isReadOnly()) return(0);
- /*addImage();
+
QGraphicsPixmapItem *pixItem = new QGraphicsPixmapItem( QPixmap::fromImage(image_to_add_) );
pixItem->setFlag(QGraphicsItem::ItemIsMovable,true);
pixItem->setFlag(QGraphicsItem::ItemIsSelectable,true);
pixItem->setCursor(Qt::PointingHandCursor);
- scene ->addItem(pixItem);*/
-
+
+ scene ->addItem(pixItem);
+
+
// cree un nouveau champ image
DiagramImageItem *Imageitem = new DiagramImageItem( QPixmap::fromImage(image_to_add_) );
-
+
// le place a la position pos en gerant l'annulation
//scene -> undoStack().push(new AddImageCommand(scene, Imageitem, pos));
adjustSceneRect();
// emet le signal ImageAdded
emit(ImageAdded(false));
-
+
return(Imageitem);
+
}
/**