umbrello  2.32.1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
codeblockwithcomments.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 CODEBLOCKWITHCOMMENTS_H
13 #define CODEBLOCKWITHCOMMENTS_H
14 
15 #include "codeblock.h"
16 #include "codecomment.h"
17 
18 
24 {
25 public:
26 
27  explicit CodeBlockWithComments (CodeDocument * parent, const QString & body = QString(), const QString & comment = QString());
28 
32  virtual ~CodeBlockWithComments ();
33 
34  void setComment (CodeComment * object);
35 
36  CodeComment * getComment () const;
37 
38  virtual QString toString () const;
39 
40  void setOverallIndentationLevel (int level);
41 
42  virtual void saveToXMI1(QXmlStreamWriter& writer);
43 
44  virtual void loadFromXMI1 (QDomElement & root);
45 
46  virtual void setAttributesFromObject (TextBlock * obj);
47 
48 protected:
49 
50  virtual void setAttributesOnNode (QXmlStreamWriter& writer);
51 
52  virtual void setAttributesFromNode (QDomElement & element);
53 
54 private:
55 
57 
58 };
59 
60 #endif // CODEBLOCKWITHCOMMENTS_H
Definition: codeblockwithcomments.h:24
virtual void setAttributesFromNode(QDomElement &element)
Definition: codeblockwithcomments.cpp:109
CodeBlockWithComments(CodeDocument *parent, const QString &body=QString(), const QString &comment=QString())
Definition: codeblockwithcomments.cpp:26
virtual void setAttributesFromObject(TextBlock *obj)
Definition: codeblockwithcomments.cpp:87
CodeComment * getComment() const
Definition: codeblockwithcomments.cpp:50
virtual void setAttributesOnNode(QXmlStreamWriter &writer)
Definition: codeblockwithcomments.cpp:72
void setComment(CodeComment *object)
Definition: codeblockwithcomments.cpp:42
virtual ~CodeBlockWithComments()
Definition: codeblockwithcomments.cpp:34
void setOverallIndentationLevel(int level)
Definition: codeblockwithcomments.cpp:167
CodeComment * m_comment
Definition: codeblockwithcomments.h:56
virtual void loadFromXMI1(QDomElement &root)
Definition: codeblockwithcomments.cpp:100
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: codeblockwithcomments.cpp:58
virtual QString toString() const
Definition: codeblockwithcomments.cpp:140
Definition: codeblock.h:21
Definition: codecomment.h:24
Definition: codedocument.h:34
Definition: textblock.h:27