[Uml-devel] KDE/kdesdk/umbrello/umbrello/widgets
Ralf Habacker
ralf.habacker at gmail.com
Fri Jan 6 10:48:33 UTC 2012
SVN commit 1272058 by habacker:
fixed ComponentWidget's method documentation locations and ordering according to class definition
M +29 -11 componentwidget.cpp
M +4 -27 componentwidget.h
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/componentwidget.cpp #1272057:1272058
@@ -11,20 +11,26 @@
// own header
#include "componentwidget.h"
-// qt/kde includes
-#include <QtGui/QPainter>
-
// app includes
#include "component.h"
#include "debug_utils.h"
#include "umlview.h"
+/**
+ * Constructs a ComponentWidget.
+ *
+ * @param scene The parent of this ComponentWidget.
+ * @param c The UMLComponent this will be representing.
+ */
ComponentWidget::ComponentWidget(UMLScene * scene, UMLComponent *c)
: UMLWidget(scene, c)
{
init();
}
+/**
+ * Initializes key variables of the class.
+ */
void ComponentWidget::init()
{
UMLWidget::setBaseType(WidgetBase::wt_Component);
@@ -43,10 +49,17 @@
}
}
+/**
+ * Destructor.
+ */
ComponentWidget::~ComponentWidget()
{
}
+/**
+ * Reimplemented from UMLWidget::paint to paint component
+ * widget.
+ */
void ComponentWidget::paint(QPainter & p, int offsetX, int offsetY)
{
UMLComponent *umlcomp = static_cast<UMLComponent*>(m_pObject);
@@ -108,6 +121,19 @@
}
}
+/**
+ * Saves to the "componentwidget" XMI element.
+ */
+void ComponentWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement)
+{
+ QDomElement conceptElement = qDoc.createElement("componentwidget");
+ UMLWidget::saveToXMI(qDoc, conceptElement);
+ qElement.appendChild(conceptElement);
+}
+
+/**
+ * Overrides method from UMLWidget.
+ */
QSize ComponentWidget::calculateSize()
{
if ( !m_pObject) {
@@ -136,11 +162,3 @@
return QSize(width, height);
}
-
-void ComponentWidget::saveToXMI(QDomDocument& qDoc, QDomElement& qElement)
-{
- QDomElement conceptElement = qDoc.createElement("componentwidget");
- UMLWidget::saveToXMI(qDoc, conceptElement);
- qElement.appendChild(conceptElement);
-}
-
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/componentwidget.h #1272057:1272058
@@ -27,44 +27,21 @@
* @see UMLWidget
* Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
*/
-class ComponentWidget : public UMLWidget {
+class ComponentWidget : public UMLWidget
+{
public:
-
- /**
- * Constructs a ComponentWidget.
- *
- * @param scene The parent of this ComponentWidget.
- * @param c The UMLComponent this will be representing.
- */
ComponentWidget(UMLScene * scene, UMLComponent *c);
-
- /**
- * destructor
- */
virtual ~ComponentWidget();
- /**
- * Overrides standard method
- */
- void paint(QPainter& p, int offsetX, int offsetY);
+ virtual void paint(QPainter& p, int offsetX, int offsetY);
- /**
- * Saves to the "componentwidget" XMI element.
- */
- void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
+ virtual void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
protected:
- /**
- * Overrides method from UMLWidget.
- */
QSize calculateSize();
private:
- /**
- * Initializes key variables of the class.
- */
void init();
-
/**
* The right mouse button menu
*/
More information about the umbrello-devel
mailing list