[Uml-devel] KDE/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Fri May 27 11:48:58 UTC 2005


SVN commit 418812 by okellogg:

testOnWidget(): New.

 M  +10 -0     umlview.cpp  
 M  +8 -0      umlview.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/umlview.cpp #418811:418812
@@ -715,6 +715,16 @@
 	return 0;
 }
 
+UMLWidget *UMLView::testOnWidget(QPoint p) {
+	UMLWidget *obj;
+	UMLWidgetListIt it(m_WidgetList);
+	for (UMLWidgetListIt it(m_WidgetList); (obj = it.current()) != NULL; ++it) {
+		if (obj->onWidget(p))
+			return obj;
+	}
+	return NULL;
+}
+
 void UMLView::checkMessages(ObjectWidget * w) {
 	if(getType() != dt_Sequence)
 		return;
--- trunk/KDE/kdesdk/umbrello/umbrello/umlview.h #418811:418812
@@ -917,6 +917,14 @@
 	}
 
 	/**
+	 * Tests the given point against all widgets and returns the
+	 * widget for which the point is within its bounding rectangle.
+	 * Returns NULL is the point is not inside any widget.
+	 * Does not use or modify the m_pOnWidget member.
+	 */
+	UMLWidget *testOnWidget(QPoint p);
+
+	/**
 	 * Initialize and announce a newly created widget.
 	 * Auxiliary to contentsMouseReleaseEvent().
 	 */




More information about the umbrello-devel mailing list