[Uml-devel] branches/work/soc-umbrello/umbrello/widgets

Andi Fischer andi.fischer at hispeed.ch
Wed May 12 20:55:43 UTC 2010


SVN commit 1125985 by fischer:

Adds double click on note widget for text editing.

 M  +13 -0     notewidget.cpp  
 M  +1 -0      notewidget.h  


--- branches/work/soc-umbrello/umbrello/widgets/notewidget.cpp #1125984:1125985
@@ -301,4 +301,17 @@
     }
 }
 
+void NoteWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
+{
+    Q_UNUSED(event);
+    umlScene()->updateDocumentation(false);
+    NoteDialog * dlg = new NoteDialog(umlScene()->activeView(), this);
+    if (dlg->exec()) {
+        umlScene()->showDocumentation(this, true);
+        umlDoc()->setModified(true);
+        update();
+    }
+    delete dlg;
+}
+
 #include "notewidget.moc"
--- branches/work/soc-umbrello/umbrello/widgets/notewidget.h #1125984:1125985
@@ -68,6 +68,7 @@
     void slotMenuSelection(QAction* action);
 
 protected:
+    virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
     virtual void updateGeometry();
     virtual void updateTextItemGroups();
     virtual QVariant attributeChange(WidgetAttributeChange change, const QVariant& oldValue);




More information about the umbrello-devel mailing list