[Uml-devel] KDE/kdesdk/umbrello/umbrello/widgets
Andi Fischer
andi.fischer at hispeed.ch
Wed Jan 11 18:54:02 UTC 2012
SVN commit 1273090 by fischer:
More method descriptions moved from header to source file.
M +70 -1 umlwidget.cpp
M +1 -76 umlwidget.h
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/umlwidget.cpp #1273089:1273090
@@ -655,6 +655,12 @@
}
}
+/**
+ * Activate the object after serializing it from a QDataStream
+ *
+ * @param ChangeLog
+ * @return true for success
+ */
bool UMLWidget::activate(IDChangeLog* /*ChangeLog = 0 */)
{
if (widgetHasUMLObject(m_Type) && m_pObject == NULL) {
@@ -739,6 +745,10 @@
m_activated = Active;
}
+/**
+ * Adds an already created association to the list of
+ * associations that include this UMLWidget
+ */
void UMLWidget::addAssoc(AssociationWidget* pAssoc)
{
if (pAssoc && !m_Assocs.contains(pAssoc)) {
@@ -746,6 +756,10 @@
}
}
+/**
+ * Removes an already created association from the list of
+ * associations that include this UMLWidget
+ */
void UMLWidget::removeAssoc(AssociationWidget* pAssoc)
{
if (pAssoc) {
@@ -753,6 +767,12 @@
}
}
+/**
+ * Adjusts associations with the given co-ordinates
+ *
+ * @param x The x-coordinate.
+ * @param y The y-coordinate.
+ */
void UMLWidget::adjustAssocs(int x, int y)
{
// 2004-04-30: Achim Spangler
@@ -779,9 +799,14 @@
}
}
+/**
+ * Adjusts all unselected associations with the given co-ordinates
+ *
+ * @param x The x-coordinate.
+ * @param y The y-coordinate.
+ */
void UMLWidget::adjustUnselectedAssocs(int x, int y)
{
-
foreach(AssociationWidget* assocwidget , m_Assocs) {
if (!assocwidget->getSelected())
@@ -902,6 +927,10 @@
return (w + h) / 2;
}
+/**
+ * Move the widget by an X and Y offset relative to
+ * the current position.
+ */
void UMLWidget::moveByLocal(int dx, int dy)
{
int newX = getX() + dx;
@@ -930,6 +959,11 @@
paint(p, getX(), getY());
}
+/**
+ * Sets the state of whether the widget is selected.
+ *
+ * @param _select The state of whether the widget is selected.
+ */
void UMLWidget::setSelected(bool _select)
{
const WidgetBase::WidgetType wt = m_Type;
@@ -977,6 +1011,11 @@
setSelected(false);
}
+/**
+ * Sets the view the widget is on.
+ *
+ * @param v The view the widget is on.
+ */
void UMLWidget::setScene(UMLScene * v)
{
//remove signals from old view - was probably 0 anyway
@@ -991,6 +1030,13 @@
connect(m_scene, SIGNAL(sigLineWidthChanged(Uml::IDType)), this, SLOT(slotLineWidthChanged(Uml::IDType)));
}
+/**
+ * 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)
{
if (!m_ignoreSnapToGrid) {
@@ -999,6 +1045,13 @@
UMLSceneItem::setX(x);
}
+/**
+ * Sets the y-coordinate.
+ * Currently, the only class that reimplements this method is
+ * ObjectWidget.
+ *
+ * @param y The y-coordinate to be set.
+ */
void UMLWidget::setY(int y)
{
if (!m_ignoreSnapToGrid) {
@@ -1007,6 +1060,11 @@
UMLSceneItem::setY(y);
}
+/**
+ * Sets the z-coordinate.
+ *
+ * @param z The z-coordinate to be set.
+ */
void UMLWidget::setZ(int z)
{
m_origZ = getZ();
@@ -1082,16 +1140,27 @@
}
}
+/**
+ * Set m_ignoreSnapToGrid.
+ */
void UMLWidget::setIgnoreSnapToGrid(bool to)
{
m_ignoreSnapToGrid = to;
}
+/**
+ * Return the value of m_ignoreSnapToGrid.
+ */
bool UMLWidget::getIgnoreSnapToGrid() const
{
return m_ignoreSnapToGrid;
}
+/**
+ * Sets the size.
+ * If m_scene->getSnapComponentSizeToGrid() is true, then
+ * set the next larger size that snaps to the grid.
+ */
void UMLWidget::setSize(int width, int height)
{
// snap to the next larger size that is a multiple of the grid
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/umlwidget.h #1273089:1273090
@@ -87,11 +87,6 @@
return false;
}
- /**
- * Sets the state of whether the widget is selected.
- *
- * @param _select The state of whether the widget is selected.
- */
virtual void setSelected(bool _select);
/**
@@ -107,19 +102,8 @@
m_selected = _select;
}
- /**
- * Sets the view the widget is on.
- *
- * @param v The view the widget is on.
- */
void setScene(UMLScene * v);
- /**
- * Activate the object after serializing it from a QDataStream
- *
- * @param ChangeLog
- * @return true for success
- */
virtual bool activate(IDChangeLog* ChangeLog = 0);
virtual int onWidget(const QPoint & p);
@@ -149,29 +133,8 @@
return m_startMove;
}
- /**
- * Sets the x-coordinate.
- * Currently, the only class that reimplements this method is
- * ObjectWidget.
- *
- * @param x The x-coordinate to be set.
- */
virtual void setX( int x );
-
- /**
- * Sets the y-coordinate.
- * Currently, the only class that reimplements this method is
- * ObjectWidget.
- *
- * @param y The y-coordinate to be set.
- */
virtual void setY( int y );
-
- /**
- * Sets the z-coordinate.
- *
- * @param z The z-coordinate to be set.
- */
virtual void setZ( int z );
/**
@@ -209,39 +172,14 @@
return UMLSceneRectangle::width();
}
- /**
- * Sets the size.
- * If m_scene->getSnapComponentSizeToGrid() is true, then
- * set the next larger size that snaps to the grid.
- */
void setSize(int width,int height);
- /**
- * Set m_ignoreSnapToGrid.
- */
+ bool getIgnoreSnapToGrid() const;
void setIgnoreSnapToGrid(bool to);
- /**
- * Return the value of m_ignoreSnapToGrid.
- */
- bool getIgnoreSnapToGrid() const;
-
- /**
- * Move the widget by an X and Y offset relative to
- * the current position.
- */
void moveByLocal(int dx, int dy);
- /**
- * Removes an already created association from the list of
- * associations that include this UMLWidget
- */
void removeAssoc(AssociationWidget* pAssoc);
-
- /**
- * Adds an already created association to the list of
- * associations that include this UMLWidget
- */
void addAssoc(AssociationWidget* pAssoc);
/**
@@ -319,20 +257,7 @@
virtual ListPopupMenu* setupPopupMenu(ListPopupMenu *menu=0);
- /**
- * Adjusts associations with the given co-ordinates
- *
- * @param x The x-coordinate.
- * @param y The y-coordinate.
- */
virtual void adjustAssocs(int x, int y);
-
- /**
- * Adjusts all unselected associations with the given co-ordinates
- *
- * @param x The x-coordinate.
- * @param y The y-coordinate.
- */
void adjustUnselectedAssocs(int x, int y);
void setActivated(bool Active = true);
More information about the umbrello-devel
mailing list