umbrello 25.07.80
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
DCodeComment Class Reference

#include <dcodecomment.h>

Inheritance diagram for DCodeComment:
Collaboration diagram for DCodeComment:

Public Member Functions

 DCodeComment (CodeDocument *doc, const QString &text=QString())
virtual ~DCodeComment ()
virtual void saveToXMI (QXmlStreamWriter &writer)
QString toString () const
virtual QString unformatText (const QString &text, const QString &indent=QString())
virtual QString getNewEditorLine (int amount)
Public Member Functions inherited from CodeComment
 CodeComment (CodeDocument *doc, const QString &comment=QString())
virtual ~CodeComment ()
virtual void loadFromXMI (QDomElement &root)
Public Member Functions inherited from TextBlock
 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
CodeDocumentgetParentDocument () const
void setWriteOutText (bool write)
bool getWriteOutText () const
void setIndentationLevel (int level)
int getIndentationLevel () const
QString getIndentationString (int level=0) const
bool canDelete () const
virtual void setAttributesFromObject (TextBlock *obj)
virtual int firstEditableLine ()
virtual int lastEditableLine ()

Additional Inherited Members

Static Public Member Functions inherited from TextBlock
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 inherited from TextBlock
void setCanDelete (bool canDelete)
virtual void release ()
virtual void setAttributesOnNode (QXmlStreamWriter &writer)
virtual void setAttributesFromNode (QDomElement &root)

Detailed Description

A class representing a D code comment.

The syntax follows the D Style Guide (

See also
http://www.digitalmars.com/d/dstyle.html). Single line comments begin with // and multiline comments use the longer form.

Constructor & Destructor Documentation

◆ DCodeComment()

DCodeComment::DCodeComment ( CodeDocument * doc,
const QString & text = QString() )
explicit

Constructors

Here is the call graph for this function:

◆ ~DCodeComment()

DCodeComment::~DCodeComment ( )
virtual

Empty Destructor

Member Function Documentation

◆ getNewEditorLine()

QString DCodeComment::getNewEditorLine ( int amount)
virtual

A special version here because we want to not only indent the new line, but to add the "//" sequence as well.

Reimplemented from TextBlock.

Here is the call graph for this function:

◆ saveToXMI()

void DCodeComment::saveToXMI ( QXmlStreamWriter & writer)
virtual

Save the XMI representation of this object.

Reimplemented from CodeComment.

Here is the call graph for this function:

◆ toString()

QString DCodeComment::toString ( ) const
virtual

Creates a comment block.

The syntax follows the D Style Guide (

See also
http://www.digitalmars.com/d/dstyle.html). Single line comments begin with // and multiline comments use the longer form.
Returns
QString Comment block source code.

Reimplemented from TextBlock.

Here is the call graph for this function:

◆ unformatText()

QString DCodeComment::unformatText ( const QString & text,
const QString & indent = QString() )
virtual

UnFormat a long text string. Typically, this means removing the indentation (linePrefix) and/or newline chars from each line.

Reimplemented from TextBlock.

Here is the call graph for this function:

The documentation for this class was generated from the following files: