umbrello/umbrello
textblock.cpp
Go to the documentation of this file.
334 blockElement.setAttribute(QLatin1String("indentLevel"), QString::number(getIndentationLevel()));
338 blockElement.setAttribute(QLatin1String("writeOutText"), getWriteOutText() ? trueStr : falseStr);
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
QString & append(QChar ch)
QString attribute(const QString &name, const QString &defValue) const
void setText(const QString &text)
Set the value of m_text The actual text of this code block.
Definition: textblock.cpp:80
QString getNewLineEndingChars() const
Utility function to get the actual characters.
Definition: codegenerationpolicy.cpp:248
QDebug & nospace()
class CodeGenerationPolicy This class describes the code generation policy for this project...
Definition: codegenerationpolicy.h:29
QString & remove(int position, int n)
int getIndentationLevel() const
Get how many times to indent this text block.
Definition: textblock.cpp:163
static QString getNewLineEndingChars()
Get the new line chars which ends the line.
Definition: textblock.cpp:172
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Set attributes of the node that represents this class in the XMI document.
Definition: textblock.cpp:322
QString number(int n, int base)
void setAttribute(const QString &name, const QString &value)
int toInt(bool *ok, int base) const
bool isEmpty() const
QString getIndentation() const
Utility method to get the amount (and type of whitespace) to indent with.
Definition: codegenerationpolicy.cpp:299
void setWriteOutText(bool write)
Set the value of m_writeOutText Whether or not to include the text of this TextBlock into a file...
Definition: textblock.cpp:131
virtual void setAttributesFromNode(QDomElement &root)
Set the class attributes of this object from the passed element node.
Definition: textblock.cpp:361
CodeGenerationPolicy * commonPolicy() const
Returns the default code generation policy.
Definition: uml.cpp:2219
bool contains(QChar ch, Qt::CaseSensitivity cs) const
QDebug & space()
bool canDelete() const
Determine if its OK to delete this textblock from the document.
Definition: textblock.cpp:61
TextBlock(CodeDocument *parent, const QString &text=QString())
Constructor.
Definition: textblock.cpp:28
QString & replace(int position, int n, QChar after)
The fundemental unit of text within an output file containing code.
Definition: textblock.h:24
QDebug operator<<(QDebug os, const TextBlock &obj)
Operator '<<' for TextBlock.
Definition: textblock.cpp:422
static QString formatMultiLineText(const QString &work, const QString &linePrefix, const QString &breakStr, bool addBreak=true, bool lastLineHasBreak=true)
Format a long text string to be more readable.
Definition: textblock.cpp:288
QString section(QChar sep, int start, int end, QFlags< QString::SectionFlag > flags) const
QString getIndentationString(int level=0) const
Get the actual amount of indentation for a given level of indentation.
Definition: textblock.cpp:193
static QString decodeText(const QString &text, const QString &endLine)
Decode text from XML storage.
Definition: textblock.cpp:395
bool getWriteOutText() const
Get the value of m_writeOutText Whether or not to include the text of this TextBlock into a file...
Definition: textblock.cpp:141
void setIndentationLevel(int level)
Set how many times to indent this text block.
Definition: textblock.cpp:152
virtual void setAttributesFromObject(TextBlock *obj)
Set the class attributes from a passed object.
Definition: textblock.cpp:347
static QString encodeText(const QString &text, const QString &endLine)
Encode text for XML storage.
Definition: textblock.cpp:381
QString getText() const
Get the value of m_text The actual text of this code block.
Definition: textblock.cpp:99
static QString getIndentation()
Get how much a single "level" of indentation will actually indent.
Definition: textblock.cpp:182
virtual void release()
Causes the text block to release all of its connections and any other text blocks that it 'owns'...
Definition: textblock.cpp:275
virtual QString unformatText(const QString &text, const QString &indent=QString())
UnFormat a long text string.
Definition: textblock.cpp:253
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.