umbrello: umbrello/umlwidgets/componentwidget.h Source File

umbrello 2.32.0 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

componentwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2003-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef COMPONENTWIDGET_H
12 #define COMPONENTWIDGET_H
13
14 #include "umlwidget.h"
15
16 class UMLComponent;
17
18 #define COMPONENT_MARGIN 10
19
29 class ComponentWidget : public UMLWidget
30 {
31 Q_OBJECT
32 public:
33 ComponentWidget(UMLScene * scene, UMLComponent *c);
34 virtual ~ComponentWidget();
35
36 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
37 virtual void moveWidgetBy(qreal diffX, qreal diffY);
38 virtual void adjustAssocs(qreal dx, qreal dy);
39 virtual void adjustUnselectedAssocs(qreal dx, qreal dy);
40
41 virtual void saveToXMI1(QXmlStreamWriter& writer);
42
43 signals:
52 void sigCompMoved(qreal diffX, qreal diffY);
53
54 protected:
55 QSizeF minimumSize() const;
56
57 };
58
59 #endif
ComponentWidget
A graphical version of a Component.
Definition: componentwidget.h:30
ComponentWidget::~ComponentWidget
virtual ~ComponentWidget()
Definition: componentwidget.cpp:50
ComponentWidget::sigCompMoved
void sigCompMoved(qreal diffX, qreal diffY)
ComponentWidget::moveWidgetBy
virtual void moveWidgetBy(qreal diffX, qreal diffY)
Definition: componentwidget.cpp:137
ComponentWidget::adjustUnselectedAssocs
virtual void adjustUnselectedAssocs(qreal dx, qreal dy)
Definition: componentwidget.cpp:168
ComponentWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: componentwidget.cpp:58
ComponentWidget::adjustAssocs
virtual void adjustAssocs(qreal dx, qreal dy)
Definition: componentwidget.cpp:146
ComponentWidget::minimumSize
QSizeF minimumSize() const
Definition: componentwidget.cpp:200
ComponentWidget::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: componentwidget.cpp:190
ComponentWidget::ComponentWidget
ComponentWidget(UMLScene *scene, UMLComponent *c)
Definition: componentwidget.cpp:35
UMLComponent
Non-graphical information for a Component.
Definition: component.h:28
UMLScene
Definition: umlscene.h:70
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
umlwidget.h