[Uml-devel] branches/work/soc-umbrello/umbrello
Ralf Habacker
ralf.habacker at gmail.com
Sun Apr 1 08:52:53 UTC 2012
SVN commit 1287801 by habacker:
Reduced differences to trunk.
M +68 -68 umlscene.cpp
M +0 -3 umlscene.h
--- branches/work/soc-umbrello/umbrello/umlscene.cpp #1287800:1287801
@@ -959,6 +959,18 @@
}
/**
+ * Return pointer to the first selected widget (for multi-selection)
+ */
+UMLWidget* UMLScene::getFirstMultiSelectedWidget() const
+{
+ UMLWidgetList list = selectedWidgets();
+ if(list.isEmpty()) {
+ return 0;
+ }
+ return list.first();
+}
+
+/**
* Tests the given point against all widgets and returns the
* widget for which the point is within its bounding rectangle.
* In case of multiple matches, returns the smallest widget.
@@ -1291,18 +1303,6 @@
}
/**
- * Return pointer to the first selected widget (for multi-selection)
- */
-UMLWidget* UMLScene::getFirstMultiSelectedWidget() const
-{
- UMLWidgetList list = selectedWidgets();
- if(list.isEmpty()) {
- return 0;
- }
- return list.first();
-}
-
-/**
* Clear the selected widgets list.
*/
void UMLScene::clearSelected()
@@ -3383,62 +3383,6 @@
}
/**
- * Returns the x grid size.
- */
-int UMLScene::getSnapX() const
-{
- return m_layoutGrid->gridSpacingX();
-}
-
-/**
- * Returns the y grid size.
- */
-int UMLScene::getSnapY() const
-{
- return m_layoutGrid->gridSpacingY();
-}
-
-/**
- * Sets the grid size in x and y.
- */
-void UMLScene::setSnapSpacing(int x, int y)
-{
- m_layoutGrid->setGridSpacing(x, y);
-}
-
-/**
- * Returns the input coordinate with possible grid-snap applied.
- */
-qreal UMLScene::snappedX(qreal _x)
-{
- int x = (int)_x;
- if (getSnapToGrid()) {
- int gridX = getSnapX();
- int modX = x % gridX;
- x -= modX;
- if (modX >= gridX / 2)
- x += gridX;
- }
- return x;
-}
-
-/**
- * Returns the input coordinate with possible grid-snap applied.
- */
-qreal UMLScene::snappedY(qreal _y)
-{
- int y = (int)_y;
- if (getSnapToGrid()) {
- int gridY = getSnapY();
- int modY = y % gridY;
- y -= modY;
- if (modY >= gridY / 2)
- y += gridY;
- }
- return y;
-}
-
-/**
* Shows the properties dialog for the view.
*/
bool UMLScene::showPropDialog()
@@ -3701,6 +3645,62 @@
}
/**
+ * Returns the x grid size.
+ */
+int UMLScene::getSnapX() const
+{
+ return m_layoutGrid->gridSpacingX();
+}
+
+/**
+ * Returns the y grid size.
+ */
+int UMLScene::getSnapY() const
+{
+ return m_layoutGrid->gridSpacingY();
+}
+
+/**
+ * Sets the grid size in x and y.
+ */
+void UMLScene::setSnapSpacing(int x, int y)
+{
+ m_layoutGrid->setGridSpacing(x, y);
+}
+
+/**
+ * Returns the input coordinate with possible grid-snap applied.
+ */
+qreal UMLScene::snappedX(qreal _x)
+{
+ int x = (int)_x;
+ if (getSnapToGrid()) {
+ int gridX = getSnapX();
+ int modX = x % gridX;
+ x -= modX;
+ if (modX >= gridX / 2)
+ x += gridX;
+ }
+ return x;
+}
+
+/**
+ * Returns the input coordinate with possible grid-snap applied.
+ */
+qreal UMLScene::snappedY(qreal _y)
+{
+ int y = (int)_y;
+ if (getSnapToGrid()) {
+ int gridY = getSnapY();
+ int modY = y % gridY;
+ y -= modY;
+ if (modY >= gridY / 2)
+ y += gridY;
+ }
+ return y;
+}
+
+/**
* Returns whether to show snap grid or not.
*/
bool UMLScene::isSnapGridVisible() const
--- branches/work/soc-umbrello/umbrello/umlscene.h #1287800:1287801
@@ -172,10 +172,8 @@
UMLWidget* findWidget(Uml::IDType id);
AssociationWidget* findAssocWidget(Uml::IDType id);
-
AssociationWidget* findAssocWidget(Uml::AssociationType at,
UMLWidget *pWidgetA, UMLWidget *pWidgetB);
-
AssociationWidget* findAssocWidget(UMLWidget *pWidgetA,
UMLWidget *pWidgetB, const QString& roleNameB);
@@ -335,7 +333,6 @@
bool loadWidgetsFromXMI(QDomElement & qElement);
bool loadMessagesFromXMI(QDomElement & qElement);
bool loadAssociationsFromXMI(QDomElement & qElement);
-
bool loadUisDiagramPresentation(QDomElement & qElement);
/**
More information about the umbrello-devel
mailing list