From 4ae0c208b66e0f7954e194384464fe2d0a2c56dd Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:51:49 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- umbrello/umbrello/hierarchicalcodeblock.cpp | 60 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'umbrello/umbrello/hierarchicalcodeblock.cpp') 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(getParentDocument()); -- cgit v1.2.3