umbrello 2.32.3 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(QDomDocument& qDoc, QDomElement& qElement);
42
43 signals:
52 void sigCompMoved(qreal diffX, qreal diffY);
53
54 protected:
55 QSizeF minimumSize() const;
56
57 };
58
59 #endif
UMLObject::id
virtual Uml::ID::Type id() const
Definition: umlobject.cpp:425
UMLWidget::height
qreal height() const
Definition: umlwidget.h:114
WidgetBase::textColor
QColor textColor() const
Definition: widgetbase.cpp:335
UMLPackage::containedObjects
UMLObjectList containedObjects(bool includeInactive=false)
Definition: package.cpp:266
UMLObject::ot_Port
@ ot_Port
Definition: umlobject.h:109
umlview.h
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
WidgetBase::name
QString name() const
Definition: widgetbase.cpp:309
ComponentWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: componentwidget.cpp:55
UMLWidget::setPenFromSettings
void setPenFromSettings(QPainter &p)
Definition: umlwidget.cpp:1392
component.h
UMLWidget::FT_BOLD_ITALIC
@ FT_BOLD_ITALIC
Definition: umlwidget.h:221
ComponentWidget::adjustUnselectedAssocs
virtual void adjustUnselectedAssocs(qreal dx, qreal dy)
Definition: componentwidget.cpp:165
UMLWidget::FT_BOLD
@ FT_BOLD
Definition: umlwidget.h:218
DEBUG_REGISTER_DISABLED
#define DEBUG_REGISTER_DISABLED(src)
Definition: debug_utils.h:132
ComponentWidget::minimumSize
QSizeF minimumSize() const
Definition: componentwidget.cpp:197
UMLScene::backgroundColor
const QColor & backgroundColor() const
Definition: umlscene.cpp:1370
UMLWidget::moveWidgetBy
virtual void moveWidgetBy(qreal diffX, qreal diffY)
Definition: umlwidget.cpp:281
UMLComponent::getExecutable
bool getExecutable()
Definition: component.cpp:123
UMLWidget::m_doc
UMLDoc * m_doc
shortcut for UMLApp::app()->getDocument()
Definition: umlwidget.h:305
ComponentWidget::moveWidgetBy
virtual void moveWidgetBy(qreal diffX, qreal diffY)
Definition: componentwidget.cpp:134
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLDoc::loading
bool loading() const
Definition: umldoc.cpp:1572
UMLObject::baseType
ObjectType baseType() const
Definition: umlobject.cpp:397
optionstate.h
Settings::optionState
OptionState & optionState()
Definition: optionstate.cpp:362
UMLWidget::getFontMetrics
QFontMetrics & getFontMetrics(UMLWidget::FontType fontType) const
Definition: umlwidget.cpp:1936
WidgetBase::font
virtual QFont font() const
Definition: widgetbase.cpp:543
COMPONENT_MARGIN
#define COMPONENT_MARGIN
Definition: componentwidget.h:18
WidgetBase::fillColor
QColor fillColor() const
Definition: widgetbase.cpp:377
ComponentWidget::sigCompMoved
void sigCompMoved(qreal diffX, qreal diffY)
Definition: moc_componentwidget.cpp:131
UMLComponent
Non-graphical information for a Component.
Definition: component.h:28
umlwidget.h
componentwidget.h
ComponentWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: componentwidget.cpp:187
UMLWidget::isInstance
bool isInstance() const
Definition: umlwidget.h:144
WidgetBase::m_scene
UMLScene * m_scene
Definition: widgetbase.h:316
Settings::ClassState::showStereoType
bool showStereoType
Definition: optionstate.h:124
ComponentWidget::adjustAssocs
virtual void adjustAssocs(qreal dx, qreal dy)
Definition: componentwidget.cpp:143
WidgetBase::useFillColor
bool useFillColor()
Definition: widgetbase.cpp:419
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:105
UMLWidget::instanceName
QString instanceName() const
Definition: umlwidget.h:165
UMLWidget::adjustAssocs
virtual void adjustAssocs(qreal dx, qreal dy)
Definition: umlwidget.cpp:1310
UMLWidget::adjustUnselectedAssocs
virtual void adjustUnselectedAssocs(qreal dx, qreal dy)
Definition: umlwidget.cpp:1341
Settings::OptionState
Definition: optionstate.h:314
Settings::OptionState::classState
ClassState classState
Definition: optionstate.h:329
umlscene.h
portwidget.h
ComponentWidget
A graphical version of a Component.
Definition: componentwidget.h:30
debug_utils.h
UMLScene::widgetOnDiagram
UMLWidget * widgetOnDiagram(Uml::ID::Type id)
Definition: umlscene.cpp:1139
UMLScene
Definition: umlscene.h:69
UMLWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlwidget.cpp:2045
uIgnoreZeroPointer
#define uIgnoreZeroPointer(a)
Definition: debug_utils.h:134
ComponentWidget::ComponentWidget
ComponentWidget(UMLScene *scene, UMLComponent *c)
Definition: componentwidget.cpp:32
package.h
UMLWidget::width
qreal width() const
Definition: umlwidget.h:121
WidgetBase::m_umlObject
QPointer< UMLObject > m_umlObject
Definition: widgetbase.h:317
umldoc.h
UMLWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: umlwidget.cpp:1869
UMLPackage
Non-graphical information for a Package.
Definition: package.h:33
ComponentWidget::~ComponentWidget
virtual ~ComponentWidget()
Definition: componentwidget.cpp:47