[Uml-devel] KDE/kdesdk/umbrello/umbrello/widgets
Ralf Habacker
ralf.habacker at gmail.com
Wed Dec 14 09:25:30 UTC 2011
SVN commit 1268710 by habacker:
fixed UseCaseWidget's method documentation locations and ordering according to class definition
M +24 -9 usecasewidget.cpp
M +5 -23 usecasewidget.h
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/usecasewidget.cpp #1268709:1268710
@@ -11,12 +11,15 @@
// own header file
#include "usecasewidget.h"
-// system includes
-#include <QtGui/QPainter>
// local includes
#include "usecase.h"
#include "umlview.h"
+/**
+ * Creates a UseCase widget.
+ * @param view The parent of the widget.
+ * @param o The UMLObject to represent.
+ */
UseCaseWidget::UseCaseWidget(UMLView * view, UMLUseCase *o)
: UMLWidget(view, o)
{
@@ -25,10 +28,16 @@
// Instead, it is done afterwards by UMLWidget::activate()
}
+/**
+ * Destructor.
+ */
UseCaseWidget::~UseCaseWidget()
{
}
+/**
+ * Overrides the standard paint event.
+ */
void UseCaseWidget::draw(QPainter & p, int offsetX, int offsetY)
{
setPenFromSettings(p);
@@ -54,6 +63,19 @@
drawSelected(&p, offsetX, offsetY);
}
+/**
+ * Saves this UseCase to file.
+ */
+void UseCaseWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement )
+{
+ QDomElement usecaseElement = qDoc.createElement( "usecasewidget" );
+ UMLWidget::saveToXMI( qDoc, usecaseElement );
+ qElement.appendChild( usecaseElement );
+}
+
+/**
+ * Overrides method from UMLWidget
+ */
QSize UseCaseWidget::calculateSize()
{
const UMLWidget::FontType ft = ( m_pObject->isAbstract() ? FT_BOLD_ITALIC : FT_BOLD );
@@ -67,10 +89,3 @@
return QSize(width, height);
}
-
-void UseCaseWidget::saveToXMI( QDomDocument & qDoc, QDomElement & qElement )
-{
- QDomElement usecaseElement = qDoc.createElement( "usecasewidget" );
- UMLWidget::saveToXMI( qDoc, usecaseElement );
- qElement.appendChild( usecaseElement );
-}
--- trunk/KDE/kdesdk/umbrello/umbrello/widgets/usecasewidget.h #1268709:1268710
@@ -1,10 +1,11 @@
/***************************************************************************
+ * *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * copyright (C) 2002-2009 *
+ * copyright (C) 2002-2011 *
* Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
***************************************************************************/
@@ -13,11 +14,12 @@
#include "umlwidget.h"
+class UMLUseCase;
+
#define UC_MARGIN 5
#define UC_WIDTH 60
#define UC_HEIGHT 30
-class UMLUseCase;
/**
* This class is the graphical version of a UMLUseCase. A UseCaseWidget is created
@@ -37,35 +39,15 @@
class UseCaseWidget : public UMLWidget
{
public:
-
- /**
- * Creates a UseCase widget.
- * @param view The parent of the widget.
- * @param o The UMLObject to represent.
- */
UseCaseWidget(UMLView * view, UMLUseCase *o);
-
- /**
- * Destructor.
- */
virtual ~UseCaseWidget();
- /**
- * Overrides the standard paint event.
- */
void draw(QPainter & p, int offsetX, int offsetY);
- /**
- * Saves this UseCase to file.
- */
+ // For loading we can use the loadFromXMI() inherited from UMLWidget.
void saveToXMI( QDomDocument & qDoc, QDomElement & qElement );
- // For loading we can use the loadFromXMI() inherited from UMLWidget.
-
protected:
- /**
- * Overrides method from UMLWidget
- */
QSize calculateSize();
};
More information about the umbrello-devel
mailing list