umbrello: umbrello/umlwidgets/artifactwidget.h Source File

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

artifactwidget.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 ARTIFACTWIDGET_H
12 #define ARTIFACTWIDGET_H
13
14 #include "umlwidget.h"
15
16 class UMLScene;
17 class UMLArtifact;
18
19 #define ARTIFACT_MARGIN 5
20
30 class ArtifactWidget : public UMLWidget
31 {
32 public:
33 ArtifactWidget(UMLScene *scene, UMLArtifact *a);
34 virtual ~ArtifactWidget();
35
36 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
37
38 // Note: For loading from XMI, the inherited parent method is used.
39 virtual void saveToXMI1(QDomDocument& qDoc, QDomElement& qElement);
40
41 protected:
42 QSizeF minimumSize() const;
43
44 private:
45 void paintAsFile(QPainter *painter, const QStyleOptionGraphicsItem *option);
46 void paintAsLibrary(QPainter *painter, const QStyleOptionGraphicsItem *option);
47 void paintAsTable(QPainter *painter, const QStyleOptionGraphicsItem *option);
48 void paintAsNormal(QPainter *painter, const QStyleOptionGraphicsItem *option);
49
50 QSize calculateIconSize() const;
51 QSize calculateNormalSize() const;
52
53 };
54
55 #endif
UMLWidget::height
qreal height() const
Definition: umlwidget.h:114
ARTIFACT_MARGIN
#define ARTIFACT_MARGIN
Definition: artifactwidget.h:19
WidgetBase::textColor
QColor textColor() const
Definition: widgetbase.cpp:335
UMLArtifact::getDrawAsType
Draw_Type getDrawAsType()
Definition: artifact.cpp:88
UMLArtifact
Non-graphical information for a Artifact.
Definition: artifact.h:27
umlview.h
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:40
WidgetBase::name
QString name() const
Definition: widgetbase.cpp:309
ArtifactWidget
A graphical version of an Artifact.
Definition: artifactwidget.h:30
UMLWidget::setPenFromSettings
void setPenFromSettings(QPainter &p)
Definition: umlwidget.cpp:1392
UMLWidget::FT_NORMAL
@ FT_NORMAL
Definition: umlwidget.h:217
UMLWidget::FT_BOLD_ITALIC
@ FT_BOLD_ITALIC
Definition: umlwidget.h:221
UMLWidget::FT_BOLD
@ FT_BOLD
Definition: umlwidget.h:218
ArtifactWidget::paintAsLibrary
void paintAsLibrary(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:186
DEBUG_REGISTER_DISABLED
#define DEBUG_REGISTER_DISABLED(src)
Definition: debug_utils.h:132
UMLScene::backgroundColor
const QColor & backgroundColor() const
Definition: umlscene.cpp:1355
artifact.h
ArtifactWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: artifactwidget.cpp:45
ArtifactWidget::paintAsTable
void paintAsTable(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:221
ArtifactWidget::paintAsFile
void paintAsFile(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:152
ArtifactWidget::~ArtifactWidget
virtual ~ArtifactWidget()
Definition: artifactwidget.cpp:37
UMLArtifact::defaultDraw
@ defaultDraw
Definition: artifact.h:52
UMLWidget::getFontMetrics
QFontMetrics & getFontMetrics(UMLWidget::FontType fontType) const
Definition: umlwidget.cpp:1936
WidgetBase::font
virtual QFont font() const
Definition: widgetbase.cpp:543
WidgetBase::umlObject
UMLObject * umlObject() const
Definition: widgetbase.cpp:182
WidgetBase::fillColor
QColor fillColor() const
Definition: widgetbase.cpp:377
a
QString a
Definition: petalnode.cpp:18
umlwidget.h
uWarning
#define uWarning()
Definition: debug_utils.h:124
UMLArtifact::table
@ table
Definition: artifact.h:55
UMLWidget::minimumSize
virtual QSizeF minimumSize() const
Definition: umlwidget.cpp:219
WidgetBase::m_scene
UMLScene * m_scene
Definition: widgetbase.h:316
ArtifactWidget::calculateNormalSize
QSize calculateNormalSize() const
Definition: artifactwidget.cpp:130
artifactwidget.h
WidgetBase::useFillColor
bool useFillColor()
Definition: widgetbase.cpp:419
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:104
ArtifactWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: artifactwidget.cpp:87
UMLArtifact::library
@ library
Definition: artifact.h:54
UMLArtifact::Draw_Type
Draw_Type
Definition: artifact.h:43
ArtifactWidget::ArtifactWidget
ArtifactWidget(UMLScene *scene, UMLArtifact *a)
Definition: artifactwidget.cpp:28
ArtifactWidget::minimumSize
QSizeF minimumSize() const
Definition: artifactwidget.cpp:97
ArtifactWidget::paintAsNormal
void paintAsNormal(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:258
umlscene.h
debug_utils.h
UMLScene
Definition: umlscene.h:68
UMLWidget::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlwidget.cpp:2045
UMLArtifact::file
@ file
Definition: artifact.h:53
UMLWidget::width
qreal width() const
Definition: umlwidget.h:121
WidgetBase::m_umlObject
QPointer< UMLObject > m_umlObject
Definition: widgetbase.h:317
UMLWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: umlwidget.cpp:1869
ArtifactWidget::calculateIconSize
QSize calculateIconSize() const
Definition: artifactwidget.cpp:113