summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/hierarchicalcodeblock.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /umbrello/umbrello/hierarchicalcodeblock.cpp
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/hierarchicalcodeblock.cpp')
-rw-r--r--umbrello/umbrello/hierarchicalcodeblock.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/umbrello/umbrello/hierarchicalcodeblock.cpp b/umbrello/umbrello/hierarchicalcodeblock.cpp
index 7c04a960..eff7f463 100644
--- a/umbrello/umbrello/hierarchicalcodeblock.cpp
+++ b/umbrello/umbrello/hierarchicalcodeblock.cpp
@@ -31,7 +31,7 @@
// Constructors/Destructors
//
-HierarchicalCodeBlock::HierarchicalCodeBlock ( CodeDocument * doc , const QString &start, const QString &endString, const QString &comment )
+HierarchicalCodeBlock::HierarchicalCodeBlock ( CodeDocument * doc , const TQString &start, const TQString &endString, const TQString &comment )
: CodeBlockWithComments (doc, start, comment), CodeGenObjectWithTextBlocks(doc)
{
setEndText(endString);
@@ -51,7 +51,7 @@ HierarchicalCodeBlock::~HierarchicalCodeBlock ( ) { }
* Set the value of m_endText
* @param new_var the new value of m_endText
*/
-void HierarchicalCodeBlock::setEndText ( const QString &new_var ) {
+void HierarchicalCodeBlock::setEndText ( const TQString &new_var ) {
m_endText = new_var;
}
@@ -59,16 +59,16 @@ void HierarchicalCodeBlock::setEndText ( const QString &new_var ) {
* Get the value of m_endText
* @return the value of m_endText
*/
-QString HierarchicalCodeBlock::getEndText ( ) {
+TQString HierarchicalCodeBlock::getEndText ( ) {
return m_endText;
}
-QString HierarchicalCodeBlock::getUniqueTag()
+TQString HierarchicalCodeBlock::getUniqueTag()
{
return getUniqueTag("hblock_tag");
}
-QString HierarchicalCodeBlock::getUniqueTag( const QString& prefix )
+TQString HierarchicalCodeBlock::getUniqueTag( const TQString& prefix )
{
return getParentDocument()->getUniqueTag(prefix);
}
@@ -113,7 +113,7 @@ bool HierarchicalCodeBlock::insertTextBlock(TextBlock * newBlock, TextBlock * ex
if(!newBlock || !existingBlock)
return false;
- QString tag = existingBlock->getTag();
+ TQString tag = existingBlock->getTag();
// FIX: just do a quick check if the parent DOCUMENT has this.
// IF it does, then the lack of an index will force us into
// a search of any child hierarchical codeblocks we may have
@@ -140,7 +140,7 @@ bool HierarchicalCodeBlock::insertTextBlock(TextBlock * newBlock, TextBlock * ex
// if we get here.. it was in this object so insert
// check for tag FIRST
- QString new_tag = newBlock->getTag();
+ TQString new_tag = newBlock->getTag();
// assign a tag if one doesn't already exist
if(new_tag.isEmpty())
@@ -184,7 +184,7 @@ bool HierarchicalCodeBlock::removeTextBlock ( TextBlock * remove_object ) {
}
// IF we get here, the text block was in THIS object (and not a child)..
- QString tag = remove_object->getTag();
+ TQString tag = remove_object->getTag();
if(!(tag.isEmpty()))
{
m_textBlockTagMap.erase(tag);
@@ -197,14 +197,14 @@ bool HierarchicalCodeBlock::removeTextBlock ( TextBlock * remove_object ) {
/**
* @param text
*/
-void HierarchicalCodeBlock::setStartText ( const QString &text ) {
+void HierarchicalCodeBlock::setStartText ( const TQString &text ) {
m_startText = text;
}
/**
* @return QString
*/
-QString HierarchicalCodeBlock::getStartText ( ) {
+TQString HierarchicalCodeBlock::getStartText ( ) {
return m_startText;
}
@@ -221,7 +221,7 @@ void HierarchicalCodeBlock::addCodeClassFieldMethods(CodeClassFieldList &list )
CodeAccessorMethod * method;
for (CodeAccessorMethodListIt it(list); (method = it.current()) != NULL; ++it)
{
- QString tag = method->getTag();
+ TQString tag = method->getTag();
if(tag.isEmpty())
{
tag = getUniqueTag();
@@ -239,15 +239,15 @@ void HierarchicalCodeBlock::addCodeClassFieldMethods(CodeClassFieldList &list )
/**
* Save the XMI representation of this object
*/
-void HierarchicalCodeBlock::saveToXMI ( QDomDocument & doc, QDomElement & root ) {
- QDomElement blockElement = doc.createElement( "hierarchicalcodeblock" );
+void HierarchicalCodeBlock::saveToXMI ( TQDomDocument & doc, TQDomElement & root ) {
+ TQDomElement blockElement = doc.createElement( "hierarchicalcodeblock" );
setAttributesOnNode(doc, blockElement);
root.appendChild( blockElement );
}
-void HierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomElement & elem ) {
+void HierarchicalCodeBlock::setAttributesOnNode (TQDomDocument & doc, TQDomElement & elem ) {
// set super-class attributes
CodeBlockWithComments::setAttributesOnNode(doc, elem);
@@ -256,7 +256,7 @@ void HierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomElement
// set local class attributes
if(getContentType() != CodeBlock::AutoGenerated)
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
elem.setAttribute("startText",encodeText(getStartText(),endLine));
elem.setAttribute("endText",encodeText(getEndText(),endLine));
}
@@ -265,7 +265,7 @@ void HierarchicalCodeBlock::setAttributesOnNode (QDomDocument & doc, QDomElement
/**
* load params from the appropriate XMI element node.
*/
-void HierarchicalCodeBlock::loadFromXMI ( QDomElement & root ) {
+void HierarchicalCodeBlock::loadFromXMI ( TQDomElement & root ) {
setAttributesFromNode(root);
}
@@ -273,7 +273,7 @@ void HierarchicalCodeBlock::loadFromXMI ( QDomElement & root ) {
/** set the class attributes of this object from
* the passed element node.
*/
-void HierarchicalCodeBlock::setAttributesFromNode ( QDomElement & root)
+void HierarchicalCodeBlock::setAttributesFromNode ( TQDomElement & root)
{
// set attributes from the XMI
@@ -281,7 +281,7 @@ void HierarchicalCodeBlock::setAttributesFromNode ( QDomElement & root)
if(getContentType() != CodeBlock::AutoGenerated)
{
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
setStartText(decodeText(root.attribute("startText",""),endLine));
setEndText(decodeText(root.attribute("endText",""),endLine));
}
@@ -312,22 +312,22 @@ void HierarchicalCodeBlock::setAttributesFromObject (TextBlock * obj) {
/**
* @return QString
*/
-QString HierarchicalCodeBlock::toString ( ) {
+TQString HierarchicalCodeBlock::toString ( ) {
- QString string = QString();
+ TQString string = TQString();
if(getWriteOutText()) {
- QString indent = getIndentationString();
- QString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
- QString startText = "";
- QString endText = "";
+ TQString indent = getIndentationString();
+ TQString endLine = UMLApp::app()->getCommonPolicy()->getNewLineEndingChars();
+ TQString startText = "";
+ TQString endText = "";
if (!getStartText().isEmpty())
startText = formatMultiLineText (getStartText(), indent, endLine);
if (!getEndText().isEmpty())
endText = formatMultiLineText (getEndText(), indent, endLine);
- QString body = childTextBlocksToString();
- QString comment = getComment()->toString();
+ TQString body = childTextBlocksToString();
+ TQString comment = getComment()->toString();
// tack in text, if there is something there..
if(!comment.isEmpty() && getComment()->getWriteOutText())
@@ -346,19 +346,19 @@ QString HierarchicalCodeBlock::toString ( ) {
return string;
}
-QString HierarchicalCodeBlock::childTextBlocksToString() {
+TQString HierarchicalCodeBlock::childTextBlocksToString() {
TextBlockList* list = getTextBlockList();
- QString retString = "";
+ TQString retString = "";
for(TextBlock *block = list->first() ; block; block=list->next())
{
- QString blockValue = block->toString();
+ TQString blockValue = block->toString();
if(!blockValue.isEmpty())
retString.append(blockValue);
}
return retString;
}
-TextBlock * HierarchicalCodeBlock::findCodeClassFieldTextBlockByTag ( const QString &tag )
+TextBlock * HierarchicalCodeBlock::findCodeClassFieldTextBlockByTag ( const TQString &tag )
{
ClassifierCodeDocument * cdoc = dynamic_cast<ClassifierCodeDocument*>(getParentDocument());