[Uml-devel] KDE/kdesdk/umbrello/umbrello/widgets
Ralf Habacker
ralf.habacker at gmail.com
Tue Dec 13 14:09:53 UTC 2011
SVN commit 1268462 by habacker:
fixed method documentation locations and ordering according to class definition
MM +43 -19 datatypewidget.cpp
MM +3 -29 datatypewidget.h
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/datatypewidget.cpp #1268461:1268462
@@ -16,30 +16,36 @@
// app includes
#include "classifier.h"
+#include "classifierlistitem.h"
#include "debug_utils.h"
#include "operation.h"
-#include "classifierlistitem.h"
+#include "umldoc.h"
#include "umlview.h"
-#include "umldoc.h"
#define CIRCLE_SIZE 30
+
+/**
+ * Constructs an DatatypeWidget.
+ *
+ * @param view The parent of this DatatypeWidget.
+ * @param d The UMLClassifier this will be representing.
+ */
DatatypeWidget::DatatypeWidget(UMLView* view, UMLClassifier *d) : UMLWidget(view, d)
{
init();
}
+/**
+ * Standard deconstructor.
+ */
DatatypeWidget::~DatatypeWidget()
{
}
-void DatatypeWidget::init()
-{
- UMLWidget::setBaseType(WidgetBase::wt_Datatype);
- setSize(100, 30);
- m_pMenu = 0;
-}
-
+/**
+ * Overrides standard method.
+ */
void DatatypeWidget::draw(QPainter& p, int offsetX, int offsetY)
{
setPenFromSettings(p);
@@ -75,6 +81,27 @@
}
}
+/**
+ * Loads from a "datatypewidget" XMI element.
+ */
+bool DatatypeWidget::loadFromXMI( QDomElement & qElement )
+{
+ return UMLWidget::loadFromXMI(qElement);
+}
+
+/**
+ * Saves to the "datatypewidget" XMI element.
+ */
+void DatatypeWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement )
+{
+ QDomElement conceptElement = qDoc.createElement("datatypewidget");
+ UMLWidget::saveToXMI(qDoc, conceptElement);
+ qElement.appendChild(conceptElement);
+}
+
+/**
+ * Overrides method from UMLWidget.
+ */
QSize DatatypeWidget::calculateSize()
{
if (!m_pObject) {
@@ -104,15 +131,12 @@
return QSize(width, height);
}
-void DatatypeWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement )
+/**
+ * Initializes key variables of the class.
+ */
+void DatatypeWidget::init()
{
- QDomElement conceptElement = qDoc.createElement("datatypewidget");
- UMLWidget::saveToXMI(qDoc, conceptElement);
- qElement.appendChild(conceptElement);
+ UMLWidget::setBaseType(WidgetBase::wt_Datatype);
+ setSize(100, 30);
+ m_pMenu = 0;
}
-
-bool DatatypeWidget::loadFromXMI( QDomElement & qElement )
-{
- return UMLWidget::loadFromXMI(qElement);
-}
-
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/datatypewidget.h #1268461:1268462
@@ -5,7 +5,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * copyright (C) 2003-2007 *
+ * copyright (C) 2003-2011 *
* Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
***************************************************************************/
@@ -29,45 +29,20 @@
*/
class DatatypeWidget : public UMLWidget {
public:
-
- /**
- * Constructs an DatatypeWidget.
- *
- * @param view The parent of this DatatypeWidget.
- * @param d The UMLClassifier this will be representing.
- */
DatatypeWidget(UMLView* view, UMLClassifier *d);
-
- /**
- * Standard deconstructor.
- */
virtual ~DatatypeWidget();
- /**
- * Overrides standard method.
- */
void draw(QPainter& p, int offsetX, int offsetY);
- /**
- * Saves to the "datatypewidget" XMI element.
- */
+ bool loadFromXMI(QDomElement& qElement);
void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
- /**
- * Loads from a "datatypewidget" XMI element.
- */
- bool loadFromXMI(QDomElement& qElement);
+public Q_SLOTS:
protected:
- /**
- * Overrides method from UMLWidget.
- */
QSize calculateSize();
private:
- /**
- * Initializes key variables of the class.
- */
void init();
/**
@@ -75,7 +50,6 @@
*/
ListPopupMenu* m_pMenu;
-public slots:
};
#endif
More information about the umbrello-devel
mailing list