umbrello  2.32.2
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
codeblock.h
Go to the documentation of this file.
1 /*
2  SPDX-License-Identifier: GPL-2.0-or-later
3 
4  SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov>
5  SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
6 */
7 
8 #ifndef CODEBLOCK_H
9 #define CODEBLOCK_H
10 
11 #include "textblock.h"
12 
16 class CodeBlock : public TextBlock
17 {
18 public:
19 
23  enum ContentType {
26  };
27 
28  explicit CodeBlock(CodeDocument * parent, const QString & body = QString());
29  virtual ~CodeBlock();
30 
31  void setContentType(ContentType new_var);
32  ContentType contentType() const;
33 
34  static QString enumToString(const ContentType& val);
35 
36  virtual void saveToXMI1(QXmlStreamWriter& writer);
37  virtual void loadFromXMI1(QDomElement & root);
38 
39  virtual void setAttributesFromObject(TextBlock * obj);
40 
41  friend QDebug operator<<(QDebug str, const CodeBlock& obj);
42 
43 protected:
44 
45  virtual void setAttributesOnNode(QXmlStreamWriter& writer);
46  virtual void setAttributesFromNode(QDomElement & element);
47 
48 private:
49 
50  // specifies whether the content (text) of this object
51  // was generated by the code generator or was supplied by the user (or some other way).
53 
54 };
55 
56 #endif // CODEBLOCK_H
TextBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &root)
Definition: textblock.cpp:355
CodeBlock::loadFromXMI1
virtual void loadFromXMI1(QDomElement &root)
Definition: codeblock.cpp:87
textblock.h
CodeBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: codeblock.cpp:97
TextBlock::setAttributesFromObject
virtual void setAttributesFromObject(TextBlock *obj)
Definition: textblock.cpp:341
CodeBlock::operator<<
friend QDebug operator<<(QDebug str, const CodeBlock &obj)
Definition: codeblock.cpp:133
CodeBlock::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: codeblock.cpp:60
CodeBlock::m_contentType
ContentType m_contentType
Definition: codeblock.h:52
CodeDocument
Definition: codedocument.h:29
codeblock.h
CodeBlock::UserGenerated
@ UserGenerated
the content was entered by the user
Definition: codeblock.h:25
CodeBlock::~CodeBlock
virtual ~CodeBlock()
Definition: codeblock.cpp:29
CodeBlock
Definition: codeblock.h:16
operator<<
QDebug operator<<(QDebug str, const CodeBlock &obj)
Definition: codeblock.cpp:133
number
it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those so that distribution is permitted only in or among countries not thus excluded In such this License incorporates the limitation as if written in the body of this License The Free Software Foundation may publish revised and or new versions of the Library General Public License from time to time Such new versions will be similar in spirit to the present but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Library specifies a version number of this License which applies to it and any later you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation If the Library does not specify a license version number
Definition: LGPL-2.0-only.txt:368
CodeBlock::enumToString
static QString enumToString(const ContentType &val)
Definition: codeblock.cpp:123
CodeBlock::setAttributesOnNode
virtual void setAttributesOnNode(QXmlStreamWriter &writer)
Definition: codeblock.cpp:74
CodeBlock::ContentType
ContentType
Definition: codeblock.h:23
CodeBlock::setContentType
void setContentType(ContentType new_var)
Definition: codeblock.cpp:39
CodeBlock::contentType
ContentType contentType() const
Definition: codeblock.cpp:50
CodeBlock::AutoGenerated
@ AutoGenerated
the content was generated by code generation itself
Definition: codeblock.h:24
CodeBlock::CodeBlock
CodeBlock(CodeDocument *parent, const QString &body=QString())
Definition: codeblock.cpp:20
codedocument.h
TextBlock::setAttributesOnNode
virtual void setAttributesOnNode(QXmlStreamWriter &writer)
Definition: textblock.cpp:318
debug_utils.h
TextBlock
Definition: textblock.h:22
CodeBlock::setAttributesFromObject
virtual void setAttributesFromObject(TextBlock *obj)
Definition: codeblock.cpp:109