umbrello
2.31.1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <codeblock.h>
Public Types | |
enum | ContentType { AutoGenerated =0, UserGenerated } |
Public Member Functions | |
CodeBlock (CodeDocument *parent, const QString &body=QString()) | |
virtual | ~CodeBlock () |
void | setContentType (ContentType new_var) |
ContentType | contentType () const |
virtual void | saveToXMI1 (QDomDocument &doc, QDomElement &root) |
virtual void | loadFromXMI1 (QDomElement &root) |
virtual void | setAttributesFromObject (TextBlock *obj) |
![]() | |
TextBlock (CodeDocument *parent, const QString &text=QString()) | |
virtual | ~TextBlock () |
void | setText (const QString &text) |
QString | getText () const |
void | appendText (const QString &text) |
void | setTag (const QString &value) |
QString | getTag () const |
CodeDocument * | getParentDocument () const |
void | setWriteOutText (bool write) |
bool | getWriteOutText () const |
void | setIndentationLevel (int level) |
int | getIndentationLevel () const |
QString | getIndentationString (int level=0) const |
virtual QString | unformatText (const QString &text, const QString &indent=QString()) |
virtual QString | toString () const |
bool | canDelete () const |
virtual QString | getNewEditorLine (int amount=0) |
virtual int | firstEditableLine () |
virtual int | lastEditableLine () |
Static Public Member Functions | |
static QString | enumToString (const ContentType &val) |
![]() | |
static QString | getIndentation () |
static QString | getNewLineEndingChars () |
static QString | formatMultiLineText (const QString &work, const QString &linePrefix, const QString &breakStr, bool addBreak=true, bool lastLineHasBreak=true) |
static QString | encodeText (const QString &text, const QString &endLine) |
static QString | decodeText (const QString &text, const QString &endLine) |
Protected Member Functions | |
virtual void | setAttributesOnNode (QDomDocument &doc, QDomElement &blockElement) |
virtual void | setAttributesFromNode (QDomElement &element) |
![]() | |
void | setCanDelete (bool canDelete) |
virtual void | release () |
Private Attributes | |
ContentType | m_contentType |
Friends | |
QDebug | operator<< (QDebug str, const CodeBlock &obj) |
A "chunk" of code within the code document.
|
explicit |
Constructor.
doc | the documentation text |
body | the body text |
|
virtual |
Empty Destructor.
CodeBlock::ContentType CodeBlock::contentType | ( | ) | const |
Get the value of m_contentType specifies whether the content (text) of this object was generated by the code generator or was supplied by the user.
|
static |
Return a string representation of ContentType.
val | the enum value of the ContentType |
|
virtual |
Load params from the appropriate XMI element node.
root | the starting point to load from |
Implements TextBlock.
Reimplemented in OwnedHierarchicalCodeBlock, HierarchicalCodeBlock, RubyClassDeclarationBlock, CPPHeaderClassDeclarationBlock, CodeBlockWithComments, CodeOperation, DClassDeclarationBlock, JavaClassDeclarationBlock, CodeAccessorMethod, CodeClassFieldDeclarationBlock, and XMLElementCodeBlock.
|
virtual |
Save the XMI representation of this object.
doc | the xmi document |
root | the starting point to append |
Implements TextBlock.
Reimplemented in OwnedHierarchicalCodeBlock, HierarchicalCodeBlock, RubyClassDeclarationBlock, CPPHeaderClassDeclarationBlock, CodeBlockWithComments, CodeOperation, CodeAccessorMethod, DClassDeclarationBlock, JavaClassDeclarationBlock, CodeClassFieldDeclarationBlock, and XMLElementCodeBlock.
|
protectedvirtual |
Set the class attributes of this object from the passed element node.
elem | the xmi element from which to load |
Reimplemented from TextBlock.
Reimplemented in HierarchicalCodeBlock, CodeMethodBlock, XMLElementCodeBlock, CodeOperation, OwnedHierarchicalCodeBlock, CodeBlockWithComments, CodeAccessorMethod, CodeClassFieldDeclarationBlock, DCodeAccessorMethod, JavaCodeAccessorMethod, and RubyCodeAccessorMethod.
|
virtual |
Set the class attributes from a passed object.
obj | text block from which the attributes are taken |
Reimplemented from TextBlock.
Reimplemented in HierarchicalCodeBlock, CodeMethodBlock, OwnedHierarchicalCodeBlock, DClassDeclarationBlock, CPPHeaderClassDeclarationBlock, CodeOperation, CodeBlockWithComments, CodeAccessorMethod, and CodeClassFieldDeclarationBlock.
|
protectedvirtual |
Set attributes of the node that represents this class in the XMI document.
doc | the xmi document |
blockElement | the xmi element holding the attributes |
Reimplemented from TextBlock.
Reimplemented in HierarchicalCodeBlock, CodeMethodBlock, CodeOperation, XMLElementCodeBlock, OwnedHierarchicalCodeBlock, CodeBlockWithComments, CodeAccessorMethod, CodeClassFieldDeclarationBlock, DCodeAccessorMethod, JavaCodeAccessorMethod, and RubyCodeAccessorMethod.
void CodeBlock::setContentType | ( | ContentType | new_var | ) |
Set the value of m_contentType specifies whether the content (text) of this object was generated by the code generator or was supplied by the user.
new_var | the new value of m_contentType |
|
friend |
|
private |