umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <codeblockwithcomments.h>
Public Member Functions | |
CodeBlockWithComments (CodeDocument *parent, const QString &body=QString(), const QString &comment=QString()) | |
virtual | ~CodeBlockWithComments () |
void | setComment (CodeComment *object) |
CodeComment * | getComment () const |
virtual QString | toString () const |
void | setOverallIndentationLevel (int level) |
virtual void | saveToXMI (QXmlStreamWriter &writer) |
virtual void | loadFromXMI (QDomElement &root) |
virtual void | setAttributesFromObject (TextBlock *obj) |
![]() | |
CodeBlock (CodeDocument *parent, const QString &body=QString()) | |
virtual | ~CodeBlock () |
void | setContentType (ContentType new_var) |
ContentType | contentType () const |
![]() | |
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()) |
bool | canDelete () const |
virtual QString | getNewEditorLine (int amount=0) |
virtual int | firstEditableLine () |
virtual int | lastEditableLine () |
Protected Member Functions | |
virtual void | setAttributesOnNode (QXmlStreamWriter &writer) |
virtual void | setAttributesFromNode (QDomElement &element) |
![]() | |
void | setCanDelete (bool canDelete) |
virtual void | release () |
Private Attributes | |
CodeComment * | m_comment |
Additional Inherited Members | |
![]() | |
enum | ContentType { AutoGenerated =0 , UserGenerated } |
![]() | |
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) |
class CodeBlockWithComments A very common type of text block in any type of code.
|
explicit |
Basic Constructor
|
virtual |
Empty Destructor
CodeComment * CodeBlockWithComments::getComment | ( | ) | const |
Get the Comment object.
|
virtual |
Load params from the appropriate XMI element node.
Reimplemented from CodeBlock.
Reimplemented in CodeAccessorMethod, CodeClassFieldDeclarationBlock, CodeOperation, CPPHeaderClassDeclarationBlock, DClassDeclarationBlock, HierarchicalCodeBlock, JavaClassDeclarationBlock, RubyClassDeclarationBlock, XMLElementCodeBlock, and OwnedHierarchicalCodeBlock.
|
virtual |
Save the XMI representation of this object
Reimplemented from CodeBlock.
Reimplemented in CodeAccessorMethod, CodeClassFieldDeclarationBlock, CodeOperation, CPPHeaderClassDeclarationBlock, DClassDeclarationBlock, HierarchicalCodeBlock, JavaClassDeclarationBlock, RubyClassDeclarationBlock, XMLElementCodeBlock, and OwnedHierarchicalCodeBlock.
|
protectedvirtual |
Set the class attributes of this object from the passed element node.
Reimplemented from CodeBlock.
Reimplemented in CodeAccessorMethod, CodeClassFieldDeclarationBlock, CodeMethodBlock, CodeOperation, DCodeAccessorMethod, HierarchicalCodeBlock, JavaCodeAccessorMethod, OwnedHierarchicalCodeBlock, RubyCodeAccessorMethod, and XMLElementCodeBlock.
|
virtual |
Set the class attributes from a passed object.
Reimplemented from CodeBlock.
Reimplemented in CodeAccessorMethod, CodeClassFieldDeclarationBlock, CodeMethodBlock, CodeOperation, CPPHeaderClassDeclarationBlock, DClassDeclarationBlock, HierarchicalCodeBlock, and OwnedHierarchicalCodeBlock.
|
protectedvirtual |
Set attributes of the node that represents this class in the XMI document.
Reimplemented from CodeBlock.
Reimplemented in CodeAccessorMethod, CodeClassFieldDeclarationBlock, CodeMethodBlock, CodeOperation, DCodeAccessorMethod, HierarchicalCodeBlock, JavaCodeAccessorMethod, OwnedHierarchicalCodeBlock, RubyCodeAccessorMethod, and XMLElementCodeBlock.
void CodeBlockWithComments::setComment | ( | CodeComment * | object | ) |
Set the Comment object.
void CodeBlockWithComments::setOverallIndentationLevel | ( | int | level | ) |
A utility method that causes the comment and body of the code block to have the same indentation level.
|
virtual |
Reimplemented from TextBlock.
Reimplemented in CodeMethodBlock, and HierarchicalCodeBlock.
|
private |