umbrello: umbrello/umlwidgets/artifactwidget.h Source File

umbrello 2.38.2 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
11class UMLScene;
12class UMLArtifact;
13
14#define ARTIFACT_MARGIN 5
15
25 class ArtifactWidget : public UMLWidget
26{
27public:
28 ArtifactWidget(UMLScene *scene, UMLArtifact *a);
29 virtual ~ArtifactWidget();
30
31 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
32
33 // Note: For loading from XMI, the inherited parent method is used.
34 virtual void saveToXMI(QXmlStreamWriter& writer);
35
36protected:
37 QSizeF minimumSize() const;
38
39private:
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::paintAsLibrary
void paintAsLibrary(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:185
ArtifactWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: artifactwidget.cpp:44
UMLArtifact
Non-graphical information for a Artifact.
Definition: artifact.h:23
UMLScene
Definition: umlscene.h:65
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:36
a
QString a
Definition: petalnode.cpp:13
umlwidget.h