umbrello  2.32.2
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:
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
A graphical version of a Component.
Definition: componentwidget.h:30
virtual ~ComponentWidget()
Definition: componentwidget.cpp:50
void sigCompMoved(qreal diffX, qreal diffY)
virtual void moveWidgetBy(qreal diffX, qreal diffY)
Definition: componentwidget.cpp:137
virtual void adjustUnselectedAssocs(qreal dx, qreal dy)
Definition: componentwidget.cpp:168
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: componentwidget.cpp:58
virtual void adjustAssocs(qreal dx, qreal dy)
Definition: componentwidget.cpp:146
QSizeF minimumSize() const
Definition: componentwidget.cpp:200
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: componentwidget.cpp:190
ComponentWidget(UMLScene *scene, UMLComponent *c)
Definition: componentwidget.cpp:35
Non-graphical information for a Component.
Definition: component.h:28
Definition: umlscene.h:70
The base class for graphical UML objects.
Definition: umlwidget.h:41