umbrello 2.32.3 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
23 class CodeBlockWithComments : public CodeBlock
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 (QDomDocument & doc, QDomElement & root);
43
44 virtual void loadFromXMI1 (QDomElement & root);
45
46 virtual void setAttributesFromObject (TextBlock * obj);
47
48 protected:
49
50 virtual void setAttributesOnNode (QDomDocument & doc, QDomElement & blockElement);
51
52 virtual void setAttributesFromNode (QDomElement & element);
53
54 private:
55
56 CodeComment * m_comment;
57
58 };
59
60 #endif // CODEBLOCKWITHCOMMENTS_H
TextBlock::getWriteOutText
bool getWriteOutText() const
Definition: textblock.cpp:141
codegenfactory.h
TextBlock::toString
virtual QString toString() const
Definition: textblock.cpp:407
codeblockwithcomments.h
CodeBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: codeblock.cpp:101
TextBlock::setAttributesFromObject
virtual void setAttributesFromObject(TextBlock *obj)
Definition: textblock.cpp:347
CodeComment
Definition: codecomment.h:24
CodeBlockWithComments::toString
virtual QString toString() const
Definition: codeblockwithcomments.cpp:137
TextBlock::getIndentationString
QString getIndentationString(int level=0) const
Definition: textblock.cpp:193
CodeComment::saveToXMI1
virtual void saveToXMI1(QDomDocument &doc, QDomElement &root)
Definition: codecomment.cpp:31
CodeBlockWithComments::getComment
CodeComment * getComment() const
Definition: codeblockwithcomments.cpp:47
CodeDocument
Definition: codedocument.h:33
codeblock.h
CodeBlockWithComments::~CodeBlockWithComments
virtual ~CodeBlockWithComments()
Definition: codeblockwithcomments.cpp:31
CodeBlockWithComments::m_comment
CodeComment * m_comment
Definition: codeblockwithcomments.h:56
CodeBlock
Definition: codeblock.h:21
CodeBlockWithComments::setOverallIndentationLevel
void setOverallIndentationLevel(int level)
Definition: codeblockwithcomments.cpp:164
CodeBlockWithComments::setComment
void setComment(CodeComment *object)
Definition: codeblockwithcomments.cpp:39
CodeBlockWithComments::saveToXMI1
virtual void saveToXMI1(QDomDocument &doc, QDomElement &root)
Definition: codeblockwithcomments.cpp:55
CodeGenFactory::newCodeComment
CodeComment * newCodeComment(CodeDocument *cd)
Definition: codegenfactory.cpp:402
uWarning
#define uWarning()
Definition: debug_utils.h:124
CodeBlockWithComments::loadFromXMI1
virtual void loadFromXMI1(QDomElement &root)
Definition: codeblockwithcomments.cpp:97
TextBlock::setIndentationLevel
void setIndentationLevel(int level)
Definition: textblock.cpp:152
CodeBlockWithComments
Definition: codeblockwithcomments.h:24
CodeBlockWithComments::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: codeblockwithcomments.cpp:106
codedocument.h
TextBlock::formatMultiLineText
static QString formatMultiLineText(const QString &work, const QString &linePrefix, const QString &breakStr, bool addBreak=true, bool lastLineHasBreak=true)
Definition: textblock.cpp:288
debug_utils.h
TextBlock::getNewLineEndingChars
static QString getNewLineEndingChars()
Definition: textblock.cpp:172
CodeComment::loadFromXMI1
virtual void loadFromXMI1(QDomElement &root)
Definition: codecomment.cpp:42
TextBlock
Definition: textblock.h:25
CodeBlockWithComments::setAttributesOnNode
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Definition: codeblockwithcomments.cpp:69
TextBlock::setText
void setText(const QString &text)
Definition: textblock.cpp:80
CodeBlock::setAttributesFromObject
virtual void setAttributesFromObject(TextBlock *obj)
Definition: codeblock.cpp:113
CodeBlockWithComments::CodeBlockWithComments
CodeBlockWithComments(CodeDocument *parent, const QString &body=QString(), const QString &comment=QString())
Definition: codeblockwithcomments.cpp:23
TextBlock::getText
QString getText() const
Definition: textblock.cpp:99
codecomment.h
TextBlock::getTag
QString getTag() const
Definition: textblock.cpp:110
CodeBlock::setAttributesOnNode
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Definition: codeblock.cpp:78
CodeBlockWithComments::setAttributesFromObject
virtual void setAttributesFromObject(TextBlock *obj)
Definition: codeblockwithcomments.cpp:84