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

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

artifactwidget.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef ARTIFACTWIDGET_H
7#define ARTIFACTWIDGET_H
8
9#include "umlwidget.h"
10
11 class UMLScene;
12 class UMLArtifact;
13
14#define ARTIFACT_MARGIN 5
15
25 class ArtifactWidget : public UMLWidget
26{
27 public:
28 ArtifactWidget(UMLScene *scene, UMLArtifact *a);
29 virtual ~ArtifactWidget();
30
31 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr);
32
33 // Note: For loading from XMI, the inherited parent method is used.
34 virtual void saveToXMI(QXmlStreamWriter& writer);
35
36 protected:
37 QSizeF minimumSize() const;
38
39 private:
40 void paintAsFile(QPainter *painter, const QStyleOptionGraphicsItem *option);
41 void paintAsLibrary(QPainter *painter, const QStyleOptionGraphicsItem *option);
42 void paintAsTable(QPainter *painter, const QStyleOptionGraphicsItem *option);
43 void paintAsNormal(QPainter *painter, const QStyleOptionGraphicsItem *option);
44
45 QSize calculateIconSize() const;
46 QSize calculateNormalSize() const;
47
48};
49
50#endif
ArtifactWidget
A graphical version of an Artifact.
Definition: artifactwidget.h:26
ArtifactWidget::calculateNormalSize
QSize calculateNormalSize() const
Definition: artifactwidget.cpp:129
ArtifactWidget::calculateIconSize
QSize calculateIconSize() const
Definition: artifactwidget.cpp:112
ArtifactWidget::paintAsFile
void paintAsFile(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:151
ArtifactWidget::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition: artifactwidget.cpp:86
ArtifactWidget::paintAsTable
void paintAsTable(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:220
ArtifactWidget::minimumSize
QSizeF minimumSize() const
Definition: artifactwidget.cpp:96
ArtifactWidget::paintAsNormal
void paintAsNormal(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:257
ArtifactWidget::~ArtifactWidget
virtual ~ArtifactWidget()
Definition: artifactwidget.cpp:36
ArtifactWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=nullptr)
Definition: artifactwidget.cpp:44
ArtifactWidget::paintAsLibrary
void paintAsLibrary(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:185
UMLArtifact
Non-graphical information for a Artifact.
Definition: umlartifact.h:23
UMLScene
Definition: umlscene.h:66
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:36
a
QString a
Definition: petalnode.cpp:13
umlwidget.h