[Uml-devel] KDE/kdesdk/umbrello/umbrello/widgets
Ralf Habacker
ralf.habacker at gmail.com
Thu Apr 5 05:30:10 UTC 2012
SVN commit 1288315 by habacker:
Moved implementation of some getters into cpp file.
M +22 -3 umlwidget.cpp
M +7 -24 umlwidget.h
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/umlwidget.cpp #1288314:1288315
@@ -1125,13 +1125,32 @@
}
/**
+ * Gets the x-coordinate.
+ */
+UMLSceneValue UMLWidget::getX() const {
+ return UMLSceneRectItem::x();
+}
+/**
+ * Gets the y-coordinate.
+ */
+UMLSceneValue UMLWidget::getY() const {
+ return UMLSceneRectItem::y();
+}
+/**
+ * Gets the z-coordinate.
+ */
+UMLSceneValue UMLWidget::getZ() const {
+ return UMLSceneRectItem::z();
+}
+
+/**
* Sets the x-coordinate.
* Currently, the only class that reimplements this method is
* ObjectWidget.
*
* @param x The x-coordinate to be set.
*/
-void UMLWidget::setX(int x)
+void UMLWidget::setX(UMLSceneValue x)
{
if (!m_ignoreSnapToGrid) {
x = m_scene->snappedX(x);
@@ -1146,7 +1165,7 @@
*
* @param y The y-coordinate to be set.
*/
-void UMLWidget::setY(int y)
+void UMLWidget::setY(UMLSceneValue y)
{
if (!m_ignoreSnapToGrid) {
y = m_scene->snappedX(y);
@@ -1159,7 +1178,7 @@
*
* @param z The z-coordinate to be set.
*/
-void UMLWidget::setZ(int z)
+void UMLWidget::setZ(UMLSceneValue z)
{
m_origZ = getZ();
UMLSceneItem::setZ(z);
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/umlwidget.h #1288314:1288315
@@ -128,32 +128,15 @@
return m_startMove;
}
- virtual void setX(int x);
- virtual void setY(int y);
- virtual void setZ(int z);
+ UMLSceneValue getX() const;
+ UMLSceneValue getY() const;
+ UMLSceneValue getZ() const;
- /**
- * Gets the x-coordinate.
- */
- UMLSceneValue getX() const {
- return x();
- }
+ virtual void setX(UMLSceneValue x);
+ virtual void setY(UMLSceneValue y);
+ virtual void setZ(UMLSceneValue z);
/**
- * Gets the y-coordinate.
- */
- UMLSceneValue getY() const {
- return y();
- }
-
- /**
- * Gets the z-coordinate.
- */
- UMLSceneValue getZ() const {
- return z();
- }
-
- /**
* Returns the height of widget.
*/
int height() const {
@@ -341,7 +324,7 @@
bool m_selected, m_startMove;
int m_nPosX;
- int m_origZ;
+ UMLSceneValue m_origZ;
ListPopupMenu *m_pMenu;
bool m_menuIsEmbedded;
UMLDoc *m_doc; ///< shortcut for UMLApp::app()->getDocument()
More information about the umbrello-devel
mailing list