umbrello: umbrello/umlwidgets/artifactwidget.h Source File

umbrello 2.32.1 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(QXmlStreamWriter& writer);
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
ArtifactWidget
A graphical version of an Artifact.
Definition: artifactwidget.h:31
ArtifactWidget::calculateNormalSize
QSize calculateNormalSize() const
Definition: artifactwidget.cpp:133
ArtifactWidget::calculateIconSize
QSize calculateIconSize() const
Definition: artifactwidget.cpp:116
ArtifactWidget::paintAsFile
void paintAsFile(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:155
ArtifactWidget::paintAsTable
void paintAsTable(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:224
ArtifactWidget::minimumSize
QSizeF minimumSize() const
Definition: artifactwidget.cpp:100
ArtifactWidget::paintAsNormal
void paintAsNormal(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:261
ArtifactWidget::~ArtifactWidget
virtual ~ArtifactWidget()
Definition: artifactwidget.cpp:40
ArtifactWidget::ArtifactWidget
ArtifactWidget(UMLScene *scene, UMLArtifact *a)
Definition: artifactwidget.cpp:31
ArtifactWidget::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: artifactwidget.cpp:90
ArtifactWidget::paintAsLibrary
void paintAsLibrary(QPainter *painter, const QStyleOptionGraphicsItem *option)
Definition: artifactwidget.cpp:189
ArtifactWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: artifactwidget.cpp:48
UMLArtifact
Non-graphical information for a Artifact.
Definition: artifact.h:28
UMLScene
Definition: umlscene.h:70
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
a
QString a
Definition: petalnode.cpp:18
umlwidget.h