umbrello  2.32.0
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
ownedcodeblock.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 Brian Thomas <thomas@mail630.gsfc.nasa.gov> *
8  * copyright (C) 2004-2020 *
9  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10  ***************************************************************************/
11 
12 #ifndef OWNEDCODEBLOCK_H
13 #define OWNEDCODEBLOCK_H
14 
15 #include <QDomDocument>
16 #include <QDomElement>
17 #include <QObject>
18 
19 class TextBlock;
20 class UMLObject;
21 class QXmlStreamWriter;
22 
27 class OwnedCodeBlock : public QObject
28 {
29  Q_OBJECT
30 public:
31 
32  explicit OwnedCodeBlock (UMLObject * parent);
33  virtual ~OwnedCodeBlock ();
34 
36 
37  virtual void updateContent () = 0;
38 
39 protected:
40 
41  virtual void release ();
42 
43  virtual void setAttributesOnNode (QXmlStreamWriter& writer);
44  virtual void setAttributesFromNode (QDomElement & element);
45  virtual void setAttributesFromObject (TextBlock * obj);
46 
47 private:
48 
49  void initFields (UMLObject * parent);
50 
52 
53 public slots:
54 
55  virtual void syncToParent ();
56 
57 };
58 
59 #endif // OWNEDCODEBLOCK_H
Definition: ownedcodeblock.h:28
virtual void syncToParent()
Definition: ownedcodeblock.cpp:168
OwnedCodeBlock(UMLObject *parent)
Definition: ownedcodeblock.cpp:31
virtual void setAttributesOnNode(QXmlStreamWriter &writer)
Definition: ownedcodeblock.cpp:84
virtual void updateContent()=0
virtual ~OwnedCodeBlock()
Definition: ownedcodeblock.cpp:41
virtual void setAttributesFromNode(QDomElement &element)
Definition: ownedcodeblock.cpp:109
UMLObject * m_parentObject
Definition: ownedcodeblock.h:51
void initFields(UMLObject *parent)
Definition: ownedcodeblock.cpp:157
virtual void setAttributesFromObject(TextBlock *obj)
Definition: ownedcodeblock.cpp:75
UMLObject * getParentObject()
Definition: ownedcodeblock.cpp:67
virtual void release()
Definition: ownedcodeblock.cpp:55
Definition: textblock.h:27
The base class for UML objects.
Definition: umlobject.h:75