diff options
Diffstat (limited to 'quanta/src')
-rw-r--r-- | quanta/src/dcopquanta.cpp | 12 | ||||
-rw-r--r-- | quanta/src/dcopsettings.cpp | 6 | ||||
-rw-r--r-- | quanta/src/document.cpp | 290 | ||||
-rw-r--r-- | quanta/src/document.h | 45 | ||||
-rw-r--r-- | quanta/src/dtds.cpp | 122 | ||||
-rw-r--r-- | quanta/src/dtds.h | 29 | ||||
-rw-r--r-- | quanta/src/kqapp.cpp | 40 | ||||
-rw-r--r-- | quanta/src/kqapp.h | 27 | ||||
-rw-r--r-- | quanta/src/main.cpp | 6 | ||||
-rw-r--r-- | quanta/src/quanta.cpp | 388 | ||||
-rw-r--r-- | quanta/src/quanta.h | 47 | ||||
-rw-r--r-- | quanta/src/quanta_init.cpp | 506 | ||||
-rw-r--r-- | quanta/src/quanta_init.h | 5 | ||||
-rw-r--r-- | quanta/src/quantadoc.cpp | 42 | ||||
-rw-r--r-- | quanta/src/quantadoc.h | 9 | ||||
-rw-r--r-- | quanta/src/quantaview.cpp | 80 | ||||
-rw-r--r-- | quanta/src/quantaview.h | 13 | ||||
-rw-r--r-- | quanta/src/viewmanager.cpp | 58 | ||||
-rw-r--r-- | quanta/src/viewmanager.h | 11 |
19 files changed, 873 insertions, 863 deletions
diff --git a/quanta/src/dcopquanta.cpp b/quanta/src/dcopquanta.cpp index 149240d6..8dde34bc 100644 --- a/quanta/src/dcopquanta.cpp +++ b/quanta/src/dcopquanta.cpp @@ -40,11 +40,11 @@ TQStringList DCOPQuanta::selectors(const TQString& tag) if (key.startsWith("Selectors|")) { TQString selectorName = key.mid(10); - int index = selectorName.find(':'); + int index = selectorName.tqfind(':'); if (index != -1) selectorName = selectorName.mid(0, index); TQString tmpStr; - index = selectorName.find(rx); + index = selectorName.tqfind(rx); if (index != -1) { tmpStr = selectorName.left(index).lower(); @@ -54,8 +54,8 @@ TQStringList DCOPQuanta::selectors(const TQString& tag) } if (tmpStr.isEmpty() || tag.lower() == tmpStr || tmpStr == "*") { - tmpStr = selectorName.mid(index + 1).replace('.',' '); - if (!tmpStr.isEmpty() && !selectorList.contains(tmpStr)) + tmpStr = selectorName.mid(index + 1).tqreplace('.',' '); + if (!tmpStr.isEmpty() && !selectorList.tqcontains(tmpStr)) selectorList << tmpStr; } } @@ -93,11 +93,11 @@ TQStringList DCOPQuanta::groupElements(const TQString& group) if (key.startsWith(group + "|")) { TQString name = key.mid(10); - int index = name.find(':'); + int index = name.tqfind(':'); if (index != -1) name = name.mid(0, index); TQString tmpStr; - index = name.find("|"); + index = name.tqfind("|"); if (index != -1) { tmpStr = name.left(index).lower(); diff --git a/quanta/src/dcopsettings.cpp b/quanta/src/dcopsettings.cpp index 504eca84..c640b956 100644 --- a/quanta/src/dcopsettings.cpp +++ b/quanta/src/dcopsettings.cpp @@ -28,9 +28,9 @@ DCOPSettings::DCOPSettings() : DCOPObject("SettingsIf") TQString DCOPSettings::encoding() { TQString encoding = quantaApp->defaultEncoding(); - encoding.replace("iso ", "iso-"); //it's said that "iso-8859-x" is the valid format - encoding.replace("utf", "utf-"); //it's said that "utf-x" is the valid format - encoding.replace("cp ", "windows-"); + encoding.tqreplace("iso ", "iso-"); //it's said that "iso-8859-x" is the valid format + encoding.tqreplace("utf", "utf-"); //it's said that "utf-x" is the valid format + encoding.tqreplace("cp ", "windows-"); return encoding; } diff --git a/quanta/src/document.cpp b/quanta/src/document.cpp index f42986ab..70fce267 100644 --- a/quanta/src/document.cpp +++ b/quanta/src/document.cpp @@ -93,8 +93,8 @@ extern GroupElementMapList globalGroupMap; Document::Document(KTextEditor::Document *doc, - TQWidget *parent, const char *name, WFlags f ) - : TQWidget(parent, name, f) + TQWidget *tqparent, const char *name, WFlags f ) + : TQWidget(tqparent, name, f) { m_dirty = false; busy = false; @@ -102,7 +102,7 @@ Document::Document(KTextEditor::Document *doc, m_md5sum = ""; m_doc = doc; m_view = 0L; //needed, because createView() calls processEvents() and the "this" may be deleted before m_view gets a value => crash on delete m_view; - m_view = m_doc->createView(parent, 0L); + m_view = m_doc->createView(tqparent, 0L); completionInProgress = false; argHintVisible = false; completionRequested = false; @@ -142,11 +142,11 @@ Document::Document(KTextEditor::Document *doc, //conflicting shortcuts, so change them a = m_view->actionCollection()->action("view_border"); if (a) - a->setShortcut(Qt::SHIFT + Qt::Key_F9); + a->setShortcut(TQt::SHIFT + TQt::Key_F9); a = m_view->actionCollection()->action("view_folding_markers"); if (a) - a->setShortcut(Qt::SHIFT + Qt::Key_F11); + a->setShortcut(TQt::SHIFT + TQt::Key_F11); KActionMenu *bookmarkAction = dynamic_cast<KActionMenu*>(m_view->actionCollection()->action( "bookmarks" )); if (bookmarkAction) @@ -190,15 +190,15 @@ Document::Document(KTextEditor::Document *doc, } tempFile = 0; - m_tempFileName = TQString::null; + m_tempFileName = TQString(); dtdName = Project::ref()->defaultDTD(); reparseEnabled = true; - repaintEnabled = true; + tqrepaintEnabled = true; delayedTextChangedEnabled = true; docUndoRedo = new undoRedo(this); //path of the backup copy file of the document - m_backupPathValue = TQString::null; + m_backupPathValue = TQString(); connect( m_doc, TQT_SIGNAL(charactersInteractivelyInserted (int ,int ,const TQString&)), this, TQT_SLOT(slotCharactersInserted(int ,int ,const TQString&)) ); @@ -409,7 +409,7 @@ void Document::insertFile(const KURL& url) { if (!KIO::NetAccess::download(url, fileName, this)) { - KMessageBox::error(this, i18n("<qt>Cannot download <b>%1</b>.</qt>").arg( url.prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(this, i18n("<qt>Cannot download <b>%1</b>.</qt>").tqarg( url.prettyURL(0, KURL::StripFileProtocol))); return; } } @@ -421,7 +421,7 @@ void Document::insertFile(const KURL& url) insertText(stream.read()); file.close(); } else - KMessageBox::error(this, i18n("<qt>Cannot open <b>%1</b> for reading.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(this, i18n("<qt>Cannot open <b>%1</b> for reading.</qt>").tqarg(url.prettyURL(0, KURL::StripFileProtocol))); } /** Inserts text at the current cursor position */ @@ -461,8 +461,8 @@ void Document::insertText(const TQString &a_text, bool adjustCursor, bool repars } if (insideQuotes && closeQuotationFound) { - text.replace("\\\"", "\""); - text.replace("\"", "\\\""); + text.tqreplace("\\\"", "\""); + text.tqreplace("\"", "\\\""); } } @@ -552,7 +552,7 @@ void Document::insertText(const TQString &a_text, bool adjustCursor, bool repars } } -bool Document::insertChildTags(QTag *tag, QTag *lastTag) +bool Document::insertChildTags(TQTag *tag, TQTag *lastTag) { bool childInserted = false; if (!tag || tag == lastTag) //avoid infinite recursion @@ -565,9 +565,9 @@ bool Document::insertChildTags(QTag *tag, QTag *lastTag) if (it.data()) { childInserted = true; - QTag *childTag = QuantaCommon::tagFromDTD(tag->parentDTD, it.key()); + TQTag *childTag = QuantaCommon::tagFromDTD(tag->tqparentDTD, it.key()); TQString tagStr =QuantaCommon::tagCase(it.key()); - if ( tag->parentDTD->singleTagStyle == "xml" && + if ( tag->tqparentDTD->singleTagStyle == "xml" && ( childTag->isSingle() || (childTag->isOptional() && !qConfig.closeOptionalTags)) ) { @@ -648,7 +648,7 @@ void Document::closeTempFile() if (TQFileInfo(m_tempFileName).exists()) TQFile::remove(m_tempFileName); - m_tempFileName = TQString::null; + m_tempFileName = TQString(); } TQString Document::tempFileName() @@ -669,8 +669,8 @@ TQString Document::getTagNameAt(int line, int col ) while (line >= 0) { QuantaCommon::removeCommentsAndQuotes(textLine, completionDTD); - int pos = textLine.findRev("<"); - int pos2 = textLine.findRev(">"); + int pos = textLine.tqfindRev("<"); + int pos2 = textLine.tqfindRev(">"); if (pos != -1 && pos2 < pos) { textLine.remove(0, pos + 1); @@ -680,7 +680,7 @@ TQString Document::getTagNameAt(int line, int col ) textLine[pos] != '>') pos++; name = textLine.left(pos).stripWhiteSpace(); - pos = name.find(":"); + pos = name.tqfind(":"); if (pos != -1) name = name.mid(pos + 1); break; @@ -732,7 +732,7 @@ void Document::slotCompletionDone( KTextEditor::CompletionEntry completion ) viewCursorIf->setCursorPositionReal(line,col-1); if (dtd) { - QTag *tag = QuantaCommon::tagFromDTD(dtd,completion.userdata); + TQTag *tag = QuantaCommon::tagFromDTD(dtd,completion.userdata); if (tag) { m_lastCompletionList = getAttributeValueCompletions(tag->name(), completion.text); @@ -778,7 +778,7 @@ void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,T { kdDebug(24000) << *string << endl; kdDebug(24000) << completion->userdata << endl; - int pos = completion->userdata.find("|"); + int pos = completion->userdata.tqfind("|"); TQString s = completion->userdata.left(pos); completion->userdata.remove(0,pos+1); string->remove(0, s.length()); @@ -791,7 +791,7 @@ void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,T viewCursorIf->cursorPositionReal(&line, &col); TQString s2 = editIf->textLine(line).left(col); kdDebug(24000) << s2 << endl; - int pos = s2.findRev('&'); + int pos = s2.tqfindRev('&'); if (pos != -1) { s2 = s2.mid(pos + 1); @@ -820,7 +820,7 @@ void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,T s = *string; string->remove(0, string->length()); TQString s2 = TQString("public \""+DTDs::ref()->getDTDNameFromNickName(s)+"\""); - const DTDStruct *dtd = DTDs::ref()->find(DTDs::ref()->getDTDNameFromNickName(s)); + const DTDStruct *dtd = DTDs::ref()->tqfind(DTDs::ref()->getDTDNameFromNickName(s)); if (dtd && !dtd->url.isEmpty()) { s2 += " \""+dtd->url+"\""; @@ -858,7 +858,7 @@ void Document::slotCharactersInserted(int line, int column, const TQString& stri { m_replaceLine = line; m_replaceCol = column; - m_replaceStr = QuantaCommon::encodedChar(string[0].unicode()); + m_replaceStr = QuantaCommon::encodedChar(string[0].tqunicode()); TQTimer::singleShot(0, this, TQT_SLOT(slotReplaceChar())); return; } @@ -866,7 +866,7 @@ void Document::slotCharactersInserted(int line, int column, const TQString& stri } if (qConfig.replaceAccented) { - uint c = string[0].unicode(); + uint c = string[0].tqunicode(); if (c > 191) { m_replaceLine = line; @@ -936,13 +936,13 @@ void Document::slotCharactersInserted(int line, int column, const TQString& stri */ bool Document::xmlAutoCompletion(int line, int column, const TQString & string) { - QTag *tag; + TQTag *tag; TQString tagName; bool handled = false; tagName = getTagNameAt(line, column); tag = QuantaCommon::tagFromDTD(completionDTD, tagName); if (!tag && !tagName.isEmpty()) - tag = userTagList.find(tagName.lower()); + tag = userTagList.tqfind(tagName.lower()); TQString s = editIf->textLine(line).left(column + 1); bool namespacecompletion = false; @@ -978,13 +978,13 @@ bool Document::xmlAutoCompletion(int line, int column, const TQString & string) if (string == "/" && s.endsWith("</") && tagName.isEmpty()) { Node *node = parser->nodeAt(line, column, false); - if (node && node->parent ) + if (node && node->tqparent ) { - node = node->parent; + node = node->tqparent; if (node->tag->type == Tag::XmlTag && (!node->next || !QuantaCommon::closesTag(node->tag, node->next->tag))) { TQString name = node->tag->name; - name = name.left(name.find(" | ")); + name = name.left(name.tqfind(" | ")); if (!node->tag->nameSpace.isEmpty()) name.prepend(node->tag->nameSpace + ":"); editIf->insertText(line, column + 1, name + ">"); @@ -1000,7 +1000,7 @@ bool Document::xmlAutoCompletion(int line, int column, const TQString & string) if ( string == ">" && tagName[0] != '/' && !tagName.endsWith("/") && !s.endsWith("/>") && tag) { - if ( tag->parentDTD->singleTagStyle == "xml" && + if ( tag->tqparentDTD->singleTagStyle == "xml" && (tag->isSingle() || (!qConfig.closeOptionalTags && tag->isOptional())) ) { @@ -1052,10 +1052,10 @@ bool Document::xmlAutoCompletion(int line, int column, const TQString & string) { //we need to find the attribute name TQString textLine = editIf->textLine(line).left(column-1); - TQString attribute = textLine.mid(textLine.findRev(' ')+1); - if (attribute == "style" && completionDTD->insideDTDs.contains("css")) + TQString attribute = textLine.mid(textLine.tqfindRev(' ')+1); + if (attribute == "style" && completionDTD->insideDTDs.tqcontains("css")) { - completionDTD = DTDs::ref()->find("text/css"); + completionDTD = DTDs::ref()->tqfind("text/css"); completionRequested = true; return scriptAutoCompletion(line, column + 1, string); } @@ -1068,20 +1068,20 @@ bool Document::xmlAutoCompletion(int line, int column, const TQString & string) //check if we are inside a style attribute, and use css autocompletion if we are TQString textLine = editIf->textLine(line); textLine = textLine.left(column); - int pos = textLine.findRev('"'); + int pos = textLine.tqfindRev('"'); if (pos != -1) { - pos = textLine.findRev(' ', pos); + pos = textLine.tqfindRev(' ', pos); if (pos != -1) { textLine = textLine.mid(pos + 1); - pos = textLine.find('='); + pos = textLine.tqfind('='); if (pos != -1) { TQString attribute = textLine.left(pos); - if (attribute == "style" && completionDTD->insideDTDs.contains("css")) + if (attribute == "style" && completionDTD->insideDTDs.tqcontains("css")) { - completionDTD = DTDs::ref()->find("text/css"); + completionDTD = DTDs::ref()->tqfind("text/css"); completionRequested = true; return scriptAutoCompletion(line, column + 1, string); } @@ -1089,7 +1089,7 @@ bool Document::xmlAutoCompletion(int line, int column, const TQString & string) } } TQString s = editIf->textLine(line).left(column + 1); - pos = s.findRev('&'); + pos = s.tqfindRev('&'); if (pos != -1) { //complete character codes @@ -1125,7 +1125,7 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *n GroupElementList elementList = it.data(); for (uint i = 0; i < elementList.count(); i++) { - if (elementList[i]->parentNode == 0L || elementList[i]->global) + if (elementList[i]->tqparentNode == 0L || elementList[i]->global) { completion.text = it.key().section('|', -1).stripWhiteSpace(); completions->append(completion); @@ -1133,11 +1133,11 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *n } else { Node *n = node; - while (n && n != elementList[i]->parentNode) + while (n && n != elementList[i]->tqparentNode) { - n = n->parent; + n = n->tqparent; } - if (n == elementList[i]->parentNode) + if (n == elementList[i]->tqparentNode) { completion.text = it.key().section('|', -1).stripWhiteSpace(); completions->append(completion); @@ -1169,18 +1169,18 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *n bool Document::isDerivatedFrom(const TQString& className, const TQString &baseClass) { - if (className.isEmpty() || !completionDTD->classInheritance.contains(className)) + if (className.isEmpty() || !completionDTD->classInheritance.tqcontains(className)) return false; - TQString parentClass = completionDTD->classInheritance[className]; + TQString tqparentClass = completionDTD->classInheritance[className]; int result = 0; do { - if (parentClass == baseClass) + if (tqparentClass == baseClass) result = 1; //className extends baseClass else { - if (completionDTD->classInheritance.contains(parentClass)) - parentClass = completionDTD->classInheritance[parentClass]; + if (completionDTD->classInheritance.tqcontains(tqparentClass)) + tqparentClass = completionDTD->classInheritance[tqparentClass]; else result = -1;//nothing was found in the inheritance list } @@ -1205,12 +1205,12 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, } Node *node = parser->nodeAt(line, col); if (node && node->tag->type != Tag::XmlTag) - node = node->parent; + node = node->tqparent; if (node && node->tag->type != Tag::XmlTag) node = 0L; - QTag *parentQTag= 0L; - if (node && node->parent) - parentQTag = QuantaCommon::tagFromDTD(node->parent); + TQTag *tqparentTQTag= 0L; + if (node && node->tqparent) + tqparentTQTag = QuantaCommon::tagFromDTD(node->tqparent); TQString textLine = editIf->textLine(line).left(col); TQString word = findWordRev(textLine, completionDTD).upper(); TQString classStr = ""; @@ -1229,7 +1229,7 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, objStr = r->cap(1); if (objStr == "this") { - TQString parentGroupStr = ""; + TQString tqparentGroupStr = ""; bool classFound = false; parser->synchParseInDetail(); Node *n = parser->nodeAt(line, col); @@ -1244,11 +1244,11 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, while (it != n->m_groupElements.end()) { GroupElement *e = *it; - if (parentGroupStr.isEmpty() && e->group->appendToTags) + if (tqparentGroupStr.isEmpty() && e->group->appendToTags) { - parentGroupStr = e->group->parentGroup; + tqparentGroupStr = e->group->tqparentGroup; } - if (!parentGroupStr.isEmpty() && e->group->name == parentGroupStr) + if (!tqparentGroupStr.isEmpty() && e->group->name == tqparentGroupStr) { classStr = e->tag->name; classFound = true; @@ -1260,7 +1260,7 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, it = n->m_groupElements.erase(it); } delete gParser; - n = n->parent; + n = n->tqparent; } } else { @@ -1290,20 +1290,20 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, //A TQMap to hold the completion type (function/string/class/etc) TQMap<TQString, TQString> type; TQString tagName; - TQDictIterator<QTag> it(*(completionDTD->tagsList)); + TQDictIterator<TQTag> it(*(completionDTD->tagsList)); int i = 0; for( ; it.current(); ++it ) { - QTag *tag = it.current(); + TQTag *tag = it.current(); if ((tag->type != "entity") && (tag->className == classStr || isDerivatedFrom(classStr, tag->className))) { tagName = tag->name(); if (!tagName.isEmpty() && tagName.upper().startsWith(word)) { - if (!parentQTag || (parentQTag && parentQTag->isChild(tagName))) + if (!tqparentTQTag || (tqparentTQTag && tqparentTQTag->isChild(tagName))) { - tagName = tag->name() + TQString("%1").arg(i, 10); + tagName = tag->name() + TQString("%1").tqarg(i, 10); tagNameList += tagName; comments.insert(tagName, tag->comment); i++; @@ -1312,14 +1312,14 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, } } - TQDictIterator<QTag> it2(userTagList); + TQDictIterator<TQTag> it2(userTagList); for( ; it2.current(); ++it2 ) { - QTag *tag = it2.current(); + TQTag *tag = it2.current(); if ((tag->className == classStr || isDerivatedFrom(classStr, tag->className)) && tag->name().upper().startsWith(word)) { - tagName = tag->name() + TQString("%1").arg(i, 10); + tagName = tag->name() + TQString("%1").tqarg(i, 10); tagNameList += tagName; comments.insert(tagName, tag->comment); @@ -1366,7 +1366,7 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, // Here we actually append the completion type completion.type = type[tagNameList[i]]; // And here is out sorting... - if(completion.type.contains("variable")) + if(completion.type.tqcontains("variable")) { // Insert after the last variable variableIt++; @@ -1374,7 +1374,7 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, } else { - if(completion.type.contains("script")) + if(completion.type.tqcontains("script")) { //Scripts can go at the end of the list completions->append(completion); @@ -1404,10 +1404,10 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(con { TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>(); KTextEditor::CompletionEntry completion; - QTag *tag = QuantaCommon::tagFromDTD(completionDTD, tagName); + TQTag *tag = QuantaCommon::tagFromDTD(completionDTD, tagName); if (!tag) { - tag = userTagList.find(tagName.lower()); + tag = userTagList.tqfind(tagName.lower()); } TQString startsWith = a_startsWith.upper(); if (tag) @@ -1438,7 +1438,7 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(con //list common attributes for this tag for (TQStringList::Iterator it = tag->commonGroups.begin(); it != tag->commonGroups.end(); ++it) { - AttributeList *attrs = tag->parentDTD->commonAttrs->find(*it); + AttributeList *attrs = tag->tqparentDTD->commonAttrs->tqfind(*it); for (uint j = 0; j < attrs->count(); j++) { TQString name = attrs->at(j)->name; @@ -1452,7 +1452,7 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(con } } - if (tag->name().contains("!doctype",false)) //special case, list all the known document types + if (tag->name().tqcontains("!doctype",false)) //special case, list all the known document types { TQStringList nickNames = DTDs::ref()->nickNameList(true); for ( TQStringList::Iterator it = nickNames.begin(); it != nickNames.end(); ++it ) @@ -1538,7 +1538,7 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletion } if (deleteValues) delete values; - int andSignPos = startsWith.find('&'); + int andSignPos = startsWith.tqfind('&'); if (andSignPos != -1) { TQValueList<KTextEditor::CompletionEntry> *charCompletions = getCharacterCompletions(startsWith.mid(andSignPos + 1)); @@ -1557,7 +1557,7 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(con TQMap<TQString, KTextEditor::CompletionEntry> completionMap; //first search for entities defined in the document - const DTDStruct *dtdDTD = DTDs::ref()->find("dtd"); + const DTDStruct *dtdDTD = DTDs::ref()->tqfind("dtd"); if (dtdDTD) { StructTreeGroup group; @@ -1588,10 +1588,10 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(con KTextEditor::CompletionEntry completion; completion.type = "charCompletion"; //add the entities from the tag files - TQDictIterator<QTag> it(*(completionDTD->tagsList)); + TQDictIterator<TQTag> it(*(completionDTD->tagsList)); for( ; it.current(); ++it ) { - QTag *tag = it.current(); + TQTag *tag = it.current(); if (tag->type == "entity") { TQString tagName = tag->name(true); @@ -1616,10 +1616,10 @@ TQValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(con for ( TQStringList::Iterator it = charList.begin(); it != charList.end(); ++it ) { completion.text = *it; - int begin = completion.text.find("(&") + 2; + int begin = completion.text.tqfind("(&") + 2; if (begin == 1) continue; - int length = completion.text.find(";)") - begin + 1; + int length = completion.text.tqfind(";)") - begin + 1; TQString s = completion.text.mid(begin, length - 1); completion.text = s + " : " + completion.text.left(begin -2) + " - " + completion.text.mid(begin + length + 1); if (s.startsWith(startsWith)) @@ -1661,9 +1661,9 @@ const DTDStruct* Document::currentDTD(bool fallback) /** Get a pointer to the default DTD (document, or app). */ const DTDStruct* Document::defaultDTD() const { - const DTDStruct* dtd = DTDs::ref()->find(dtdName); - if (!dtd) dtd = DTDs::ref()->find(Project::ref()->defaultDTD()); - if (!dtd) dtd = DTDs::ref()->find(qConfig.defaultDocType); //this will always exists + const DTDStruct* dtd = DTDs::ref()->tqfind(dtdName); + if (!dtd) dtd = DTDs::ref()->tqfind(Project::ref()->defaultDTD()); + if (!dtd) dtd = DTDs::ref()->tqfind(qConfig.defaultDocType); //this will always exists return dtd; } @@ -1682,17 +1682,17 @@ TQString Document::findDTDName(Tag **tag) { text = editIf->textLine(i); //search for !DOCTYPE tags - pos = text.find("!doctype",0,false); + pos = text.tqfind("!doctype",0,false); if (pos != -1) //parse the found !DOCTYPE tag { int bl, bc, el, ec; line = i; bl = line; - startPos = text.findRev('<',pos); + startPos = text.tqfindRev('<',pos); while (startPos == -1 && line >=0) { text = editIf->textLine(line); - startPos = text.findRev('<'); + startPos = text.tqfindRev('<'); bl = line; line--; } @@ -1704,12 +1704,12 @@ TQString Document::findDTDName(Tag **tag) bc = startPos; line = i; text = editIf->textLine(i); - startPos = text.find('>',pos); + startPos = text.tqfind('>',pos); el = line; while (startPos == -1 && line < endLine) { text = editIf->textLine(line); - startPos = text.find('>'); + startPos = text.tqfind('>'); el = line; line++; } @@ -1724,17 +1724,17 @@ TQString Document::findDTDName(Tag **tag) text = this->text(bl, bc, el, ec); (*tag)->parse(text, this); (*tag)->type = Tag::XmlTag; - text.replace("\\\"", "\""); - pos = text.find("public",0,false); + text.tqreplace("\\\"", "\""); + pos = text.tqfind("public",0,false); if (pos == -1) //if no PUBLIC info, use the word after !DOCTYPE as the doc.type { foundText = (*tag)->attribute(0); } else { //use the quoted string after PUBLIC as doc. type - pos = text.find("\"", pos+1); + pos = text.tqfind("\"", pos+1); if (pos !=-1) { - int endPos = text.find("\"",pos+1); + int endPos = text.tqfind("\"",pos+1); foundText = text.mid(pos+1, endPos-pos-1); } } @@ -1759,8 +1759,8 @@ bool Document::scriptAutoCompletion(int line, int column, const TQString& insert if (node->prev) node = node->prev; else - if (node->parent) - node = node->parent; + if (node->tqparent) + node = node->tqparent; int bl, bc; node->tag->beginPos(bl, bc); @@ -1794,11 +1794,11 @@ bool Document::scriptAutoCompletion(int line, int column, const TQString& insert { TQString textLine = s.left(i); TQString word = findWordRev(textLine, completionDTD); - TQValueList<QTag *> tags; + TQValueList<TQTag *> tags; if (!word.isEmpty()) { - tags.append(userTagList.find(word.lower())); - TQDictIterator<QTag> it(*(completionDTD->tagsList)); + tags.append(userTagList.tqfind(word.lower())); + TQDictIterator<TQTag> it(*(completionDTD->tagsList)); for( ; it.current(); ++it ) { if (it.currentKey() == word) @@ -1806,9 +1806,9 @@ bool Document::scriptAutoCompletion(int line, int column, const TQString& insert } } TQStringList argList; - for (TQValueList<QTag*>::ConstIterator it = tags.constBegin(); it != tags.constEnd(); ++it) + for (TQValueList<TQTag*>::ConstIterator it = tags.constBegin(); it != tags.constEnd(); ++it) { - QTag *tag = *it; + TQTag *tag = *it; if (!tag) continue; TQString arguments; @@ -1907,7 +1907,7 @@ TQString Document::text(const AreaStruct &area) const return text(area.bLine, area.bCol, area.eLine, area.eCol); } -TQString Document::find(const TQRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol) +TQString Document::tqfind(const TQRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol) { TQRegExp rx = regExp; @@ -1937,11 +1937,11 @@ TQString Document::find(const TQRegExp& regExp, int sLine, int sCol, int& fbLine { foundText = rx.cap(); TQString s = textToSearch.left(pos); - int linesUntilFound = s.contains("\n"); + int linesUntilFound = s.tqcontains("\n"); fbLine = sLine + linesUntilFound; - fbCol = s.length()-s.findRev("\n")-1; - int linesInFound = foundText.contains("\n"); - feCol = foundText.length()-foundText.findRev("\n")-2; + fbCol = s.length()-s.tqfindRev("\n")-1; + int linesInFound = foundText.tqcontains("\n"); + feCol = foundText.length()-foundText.tqfindRev("\n")-2; feLine = fbLine + linesInFound; if (linesUntilFound == 0) { @@ -1965,7 +1965,7 @@ TQString Document::find(const TQRegExp& regExp, int sLine, int sCol, int& fbLine return foundText; } -TQString Document::findRev(const TQRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol) +TQString Document::tqfindRev(const TQRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol) { TQRegExp rx = regExp; TQString foundText = ""; @@ -1993,8 +1993,8 @@ TQString Document::findRev(const TQRegExp& regExp, int sLine, int sCol, int& fbL foundText = rx.cap(); fbLine = line; fbCol = pos; - int linesInFound = foundText.contains("\n"); - feCol = foundText.length()-foundText.findRev("\n")-2; + int linesInFound = foundText.tqcontains("\n"); + feCol = foundText.length()-foundText.tqfindRev("\n")-2; feLine = fbLine + linesInFound; if (linesInFound == 0) { @@ -2047,7 +2047,7 @@ void Document::handleCodeCompletion() { completionDTD = defaultDTD(); TQString s = text(line, 0, line, col).stripWhiteSpace(); - if (s.findRev("<") != -1) + if (s.tqfindRev("<") != -1) { //showCodeCompletions(getTagCompletions(line, col + 1)); @@ -2079,8 +2079,8 @@ void Document::codeCompletionHintRequested() if (completionDTD->family == Script) { // TQString textLine = editIf->textLine(line).left(col); -// int pos = textLine.findRev("("); -// int pos2 = textLine.findRev(")"); +// int pos = textLine.tqfindRev("("); +// int pos2 = textLine.tqfindRev(")"); //if (pos > pos2 ) hintRequested = true; scriptAutoCompletion(line, col - 1, ""); @@ -2093,8 +2093,8 @@ TQString Document::currentWord() uint line, col; viewCursorIf->cursorPositionReal(&line, &col); TQString textLine = editIf->textLine(line); - int startPos = textLine.findRev(TQRegExp("\\W"), col); - int endPos = textLine.find(TQRegExp("\\W"), col); + int startPos = textLine.tqfindRev(TQRegExp("\\W"), col); + int endPos = textLine.tqfind(TQRegExp("\\W"), col); if (startPos == -1) startPos = 0; else @@ -2114,7 +2114,7 @@ TQString Document::findWordRev(const TQString& textToSearch, const DTDStruct *dt int pos; bool end = false; do{ - pos = t.findRev(TQRegExp("\\W"), startPos); + pos = t.tqfindRev(TQRegExp("\\W"), startPos); if (t[pos] == '_' || (dtd && dtd->minusAllowedInWord && t[pos] == '-')) { @@ -2155,9 +2155,9 @@ bool Document::xmlCodeCompletion(int line, int col) if (index != -1) //inside a value { s = tag->attribute(index); - if (s == "style" && completionDTD->insideDTDs.contains("css")) + if (s == "style" && completionDTD->insideDTDs.tqcontains("css")) { - completionDTD = DTDs::ref()->find("text/css"); + completionDTD = DTDs::ref()->tqfind("text/css"); return scriptAutoCompletion(line, col, ""); } else { @@ -2190,7 +2190,7 @@ bool Document::xmlCodeCompletion(int line, int col) if (!handled) { TQString s = editIf->textLine(line).left(col); - int pos = s.findRev('&'); + int pos = s.tqfindRev('&'); if (pos != -1) { s = s.mid(pos + 1); @@ -2212,7 +2212,7 @@ void Document::slotCompletionAborted() } /** Ask for user confirmation if the file was changed outside. */ -void Document::checkDirtyStatus() +void Document::checkDirtytqStatus() { TQString fileName; if (url().isLocalFile()) @@ -2236,7 +2236,7 @@ void Document::checkDirtyStatus() const char* c = ""; KMD5 context(c); context.reset(); - context.update(f); + context.update(*TQT_TQIODEVICE(&f)); m_md5sum = context.hexDigest(); f.close(); } @@ -2252,7 +2252,7 @@ void Document::checkDirtyStatus() const char* c = ""; KMD5 context(c); context.reset(); - context.update(f); + context.update(*TQT_TQIODEVICE(&f)); md5sum = context.hexDigest(); kdDebug(24000) << "MD5 sum of current doc: " << m_md5sum << endl; kdDebug(24000) << "MD5 sum of doc on disc : " << md5sum << endl; @@ -2323,7 +2323,7 @@ bool Document::saveAs(const KURL& url) const char* c = ""; KMD5 context(c); context.reset(); - context.update(f); + context.update(*TQT_TQIODEVICE(&f)); m_md5sum = context.hexDigest(); f.close(); } @@ -2338,7 +2338,7 @@ void Document::enableGroupsForDTEP(const TQString& dtepName, bool enable) m_groupsForDTEPs = m_DTEPList; if (enable) { - if (m_groupsForDTEPs.contains(dtepName) == 0) + if (m_groupsForDTEPs.tqcontains(dtepName) == 0) m_groupsForDTEPs.append(dtepName); } else { @@ -2354,7 +2354,7 @@ void Document::resetGroupsForDTEPList() /** Returns true if the number of " (excluding \") inside text is even. */ bool Document::evenQuotes(const TQString &text) { - int num = text.contains(TQRegExp("[^\\\\]\"")); + int num = text.tqcontains(TQRegExp("[^\\\\]\"")); return (num /2 *2 == num); } @@ -2521,7 +2521,7 @@ TQStringList* Document::tagAttributeValues(const TQString& dtdName, const TQStri { TQStringList *values = 0L; deleteResult = true; - const DTDStruct* dtd = DTDs::ref()->find(dtdName); + const DTDStruct* dtd = DTDs::ref()->tqfind(dtdName); if (dtd) { TQString searchForAttr = (dtd->caseSensitive) ? attribute : attribute.upper(); @@ -2546,7 +2546,7 @@ TQStringList* Document::tagAttributeValues(const TQString& dtdName, const TQStri for (uint i = 0; i < values->count(); i++) { u = (*values)[i]; - u = QExtFileInfo::toRelative(u, base); + u = TQExtFileInfo::toRelative(u, base); (*values)[i] = u.path(); } values->remove(values->at(0)); @@ -2576,9 +2576,9 @@ bool Document::hasChanged() return b; } -void Document::setChanged(bool newStatus) +void Document::setChanged(bool newtqStatus) { - changed = newStatus; + changed = newtqStatus; } void Document::paste() @@ -2614,7 +2614,7 @@ TQStringList Document::tagAreas(const TQString& tag, bool includeCoordinates, bo TQString s = text(bl, bc, el, ec); if (includeCoordinates) { - s.prepend(TQString("%1,%2,%3,%4\n").arg(bl).arg(bc).arg(el).arg(ec)); + s.prepend(TQString("%1,%2,%3,%4\n").tqarg(bl).tqarg(bc).tqarg(el).tqarg(ec)); } result += s; if (skipFoundContent) @@ -2632,7 +2632,7 @@ TQStringList Document::tagAreas(const TQString& tag, bool includeCoordinates, bo void Document::activateRepaintView(bool activation) { - repaintEnabled = activation; + tqrepaintEnabled = activation; m_view->setUpdatesEnabled(activation); } @@ -2691,7 +2691,7 @@ void Document::createBackup(KConfig* config) config->setGroup("General Options"); TQStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files"); //the files that were backedup TQStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files"); //the list of actual backup files inside $KDEHOME/share/apps/quanta/backups - if (!autosavedFilesEntryList.contains(backupPathValueURL)) //not yet backed up, add an entry for this file + if (!autosavedFilesEntryList.tqcontains(backupPathValueURL)) //not yet backed up, add an entry for this file { autosavedFilesEntryList.append(backupPathValueURL); config->writePathEntry("List of autosaved files", autosavedFilesEntryList); @@ -2875,10 +2875,10 @@ void Document::open(const KURL &url, const TQString &encoding) connect(m_doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotOpeningCompleted())); connect(m_doc, TQT_SIGNAL(canceled(const TQString&)), this, TQT_SLOT(slotOpeningFailed(const TQString&))); if (!openURL(url)) - slotOpeningFailed(TQString::null); + slotOpeningFailed(TQString()); if (!url.isLocalFile()) { - QExtFileInfo internalFileInfo; + TQExtFileInfo internalFileInfo; internalFileInfo.enter_loop(); } } @@ -2889,7 +2889,7 @@ void Document::slotOpeningCompleted() if (!u.isLocalFile()) { m_modifTime = TQDateTime(); - qApp->exit_loop(); + tqApp->exit_loop(); } else { @@ -2910,7 +2910,7 @@ void Document::slotOpeningFailed(const TQString &errorMessage) m_md5sum = ""; Q_UNUSED(errorMessage); //TODO: append the error message to our own error message if (!url().isLocalFile()) - qApp->exit_loop(); + tqApp->exit_loop(); disconnect(m_doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotOpeningCompleted())); disconnect(m_doc, TQT_SIGNAL(canceled(const TQString&)), this, TQT_SLOT(slotOpeningFailed(const TQString&))); emit openingFailed(url()); @@ -2943,11 +2943,11 @@ void Document::processDTD(const TQString& documentType) } } - if (!DTDs::ref()->find(foundName)) + if (!DTDs::ref()->tqfind(foundName)) { //try to find the closest matching DTD TQString s = foundName.lower(); - uint spaceNum = s.contains(' '); + uint spaceNum = s.tqcontains(' '); TQStringList dtdList = DTDs::ref()->nameList(); TQStringList lastDtdList; for (uint i = 0; i <= spaceNum && !dtdList.empty(); i++) @@ -3006,7 +3006,7 @@ void Document::processDTD(const TQString& documentType) { qConfig.showDTDSelectDialog = !dtdWidget->useClosestMatching->isChecked(); setDTDIdentifier(DTDs::ref()->getDTDNameFromNickName(dtdWidget->dtdCombo->currentText())); - const DTDStruct *dtd = DTDs::ref()->find(dtdName); + const DTDStruct *dtd = DTDs::ref()->tqfind(dtdName); if (dtdWidget->convertDTD->isChecked() && dtd->family == Xml) { int bLine, bCol, eLine, eCol; @@ -3024,12 +3024,12 @@ void Document::processDTD(const TQString& documentType) TQString dtdId = DTDs::ref()->DTDforURL(u)->name; // if (dtdId == "empty") { - const DTDStruct * dtd = DTDs::ref()->find(projectDTD); + const DTDStruct * dtd = DTDs::ref()->tqfind(projectDTD); if (DTDs::canHandle(dtd, u)) dtdId = projectDTD; else { - dtd = DTDs::ref()->find(qConfig.defaultDocType); + dtd = DTDs::ref()->tqfind(qConfig.defaultDocType); if (DTDs::canHandle(dtd, u)) dtdId = qConfig.defaultDocType; } @@ -3043,7 +3043,7 @@ void Document::processDTD(const TQString& documentType) if (!isUntitled()) { - quantaApp->messageOutput()->showMessage(i18n("\"%1\" is used for \"%2\".\n").arg(DTDs::ref()->getDTDNickNameFromName(dtdName)).arg(url().prettyURL(0, KURL::StripFileProtocol))); + quantaApp->messageOutput()->showMessage(i18n("\"%1\" is used for \"%2\".\n").tqarg(DTDs::ref()->getDTDNickNameFromName(dtdName)).tqarg(url().prettyURL(0, KURL::StripFileProtocol))); } quantaApp->slotLoadToolbarForDTD(dtdName); StructTreeView::ref()->useOpenLevelSetting = true; @@ -3056,10 +3056,10 @@ void Document::slotFileDirty(const TQString& fileName) { if ( url().path() == fileName && !dirty() ) { - setDirtyStatus(true); + setDirtytqStatus(true); if (this == ViewManager::ref()->activeDocument()) { - checkDirtyStatus(); + checkDirtytqStatus(); } } } @@ -3083,7 +3083,7 @@ void Document::resetDTEPs() void Document::addDTEP(const TQString &dtepName) { - if (m_DTEPList.contains(dtepName) == 0) + if (m_DTEPList.tqcontains(dtepName) == 0) { m_DTEPList.append(dtepName); } @@ -3099,11 +3099,11 @@ TQStringList Document::groupsForDTEPs() TQString Document::annotationText(uint line) { - TQMap<uint, QPair<TQString, TQString> >::Iterator it = m_annotations.find(line); + TQMap<uint, TQPair<TQString, TQString> >::Iterator it = m_annotations.tqfind(line); if (it != m_annotations.end()) return it.data().first; else - return TQString::null; + return TQString(); } void Document::setAnnotationText(uint line, const TQString& text) @@ -3115,7 +3115,7 @@ void Document::setAnnotationText(uint line, const TQString& text) markIf->removeMark(line, KTextEditor::MarkInterface::markType08); } else { - m_annotations.insert(line, qMakePair(text, TQString(""))); + m_annotations.insert(line, tqMakePair(text, TQString(""))); if (markIf) markIf->setMark(line, KTextEditor::MarkInterface::markType08); uint line, column; @@ -3147,11 +3147,11 @@ void Document::setAnnotationText(uint line, const TQString& text) s.prepend(commentBegin + " "); s.append(" " + commentEnd + "\n"); insertText(s, true, true); - emit showAnnotation(line, "", qMakePair(text, TQString(""))); + emit showAnnotation(line, "", tqMakePair(text, TQString(""))); } } -void Document::addAnnotation(uint line, const QPair<TQString, TQString>& annotation) +void Document::addAnnotation(uint line, const TQPair<TQString, TQString>& annotation) { m_annotations.insert(line, annotation); if (markIf) @@ -3181,7 +3181,7 @@ bool Document::openURL(const KURL& url) const char* c = ""; KMD5 context(c); context.reset(); - context.update(f); + context.update(*TQT_TQIODEVICE(&f)); m_md5sum = context.hexDigest(); f.close(); } diff --git a/quanta/src/document.h b/quanta/src/document.h index b812ddb9..975b9f31 100644 --- a/quanta/src/document.h +++ b/quanta/src/document.h @@ -66,12 +66,13 @@ namespace KTextEditor class Mark; } -class Document : public QWidget{ +class Document : public TQWidget{ Q_OBJECT + TQ_OBJECT public: Document(KTextEditor::Document *doc, - TQWidget *parent = 0, const char *name = 0, WFlags f=0); + TQWidget *tqparent = 0, const char *name = 0, WFlags f=0); ~Document(); KURL url(); @@ -85,7 +86,7 @@ public: void replaceSelected(const TQString &s); /** insert tag in document */ - void insertTag(const TQString &s1, const TQString &s2 = TQString::null); + void insertTag(const TQString &s1, const TQString &s2 = TQString()); /** Change the current tag's attributes with those from dict */ void changeTag(Tag *tag, TQDict<TQString> *dict ); /**Change the attr value of the called attrName to attrValue*/ @@ -99,11 +100,11 @@ public: void insertText(const TQString &text, bool adjustCursor = true, bool reparse = true); /** Recursively insert the mandatory childs of tag. Returns true if a child was inserted.*/ - bool insertChildTags(QTag *tag, QTag* lastTag = 0L); + bool insertChildTags(TQTag *tag, TQTag* lastTag = 0L); TQPoint getGlobalCursorPos(); - TQString find(const TQRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol); - TQString findRev(const TQRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol); + TQString tqfind(const TQRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol); + TQString tqfindRev(const TQRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol); /** Get the view of the document */ KTextEditor::View* view(); /** Get the KTextEditor::Document of the document */ @@ -118,7 +119,7 @@ public: void createTempFile(); /** Closes and removes the temporary file. */ void closeTempFile(); - /** Returns the name of the temporary file, TQString::null if no temporary file exists. */ + /** Returns the name of the temporary file, TQString() if no temporary file exists. */ TQString tempFileName(); /** Returns the DTD identifier for the document */ @@ -142,9 +143,9 @@ work correctly. */ void codeCompletionHintRequested(); /** Returns the dirty status. */ bool dirty() const {return m_dirty;}; - void setDirtyStatus(bool status) {m_dirty = status;}; + void setDirtytqStatus(bool status) {m_dirty = status;}; /** Ask for user confirmation if the file was changed outside. */ - void checkDirtyStatus(); + void checkDirtytqStatus(); /** Save the document and reset the dirty status. */ void save(); /** Save the document under a new name and calculate the new md5sum. */ @@ -158,7 +159,7 @@ work correctly. */ /** Returns the changed status since the last query. Resets changed.*/ bool hasChanged(); /** Sets the changed status.*/ - void setChanged(bool newStatus); + void setChanged(bool newtqStatus); /** Paste the contents of clipboard into the document */ void paste(); @@ -169,9 +170,9 @@ work correctly. */ /** returns all the areas that are between tag and it's closing pair */ TQStringList tagAreas(const TQString &tag, bool includeCoordinates, bool skipFoundContent); - /** disable/enable the repaint of the Kate view */ + /** disable/enable the tqrepaint of the Kate view */ void activateRepaintView(bool activation); - bool RepaintViewActivated() {return repaintEnabled;} + bool RepaintViewActivated() {return tqrepaintEnabled;} void setErrorMark(int line); void clearErrorMarks(); @@ -187,7 +188,7 @@ work correctly. */ */ bool openURL(const KURL& url); /** Reads the DTD info from the file, tries to find the correct DTD and builds the tag/attribute list from the DTD file. */ - void processDTD(const TQString& documentType = TQString::null); + void processDTD(const TQString& documentType = TQString()); /** Resets the list of DTEPs found in the document */ void resetDTEPs(); @@ -211,7 +212,7 @@ work correctly. */ KTextEditor::MarkInterface* markIf; /** Hold the list of user tags (real or not, like functions) that are in the document*/ - QTagList userTagList; + TQTagList userTagList; /** The undo/redo stack */ undoRedo *docUndoRedo; @@ -228,8 +229,8 @@ work correctly. */ static TQString hashFilePath(const TQString& p); TQString annotationText(uint line); void setAnnotationText(uint line, const TQString& text); - TQMap<uint, QPair<TQString, TQString> > annotations() {return m_annotations;} - void addAnnotation(uint line, const QPair<TQString, TQString>& annotation); + TQMap<uint, TQPair<TQString, TQString> > annotations() {return m_annotations;} + void addAnnotation(uint line, const TQPair<TQString, TQString>& annotation); void clearAnnotations(); public slots: @@ -259,7 +260,7 @@ signals: void breakpointMarked(Document*, int); void breakpointUnmarked(Document*, int); - void showAnnotation(uint, const TQString&, const QPair<TQString, TQString>&); + void showAnnotation(uint, const TQString&, const TQPair<TQString, TQString>&); private slots: void slotReplaceChar(); @@ -280,7 +281,7 @@ private: - TQMap<uint, QPair<TQString, TQString> > m_annotations; + TQMap<uint, TQPair<TQString, TQString> > m_annotations; TQString untitledUrl; int m_replaceLine; int m_replaceCol; @@ -306,7 +307,7 @@ private: bool argHintVisible; bool hintRequested; bool reparseEnabled; - bool repaintEnabled; + bool tqrepaintEnabled; bool delayedTextChangedEnabled; /** True if the document is dirty (has been modified outside). */ bool m_dirty; @@ -326,11 +327,11 @@ private: /** Get list of possibile tag name completions */ TQValueList<KTextEditor::CompletionEntry>* getTagCompletions(int line, int col); /** Get list of possibile tag attribute completions */ - TQValueList<KTextEditor::CompletionEntry>* getAttributeCompletions(const TQString& tagName,const TQString& startsWith=TQString::null); + TQValueList<KTextEditor::CompletionEntry>* getAttributeCompletions(const TQString& tagName,const TQString& startsWith=TQString()); /** Get list of possibile tag attribute value completions */ - TQValueList<KTextEditor::CompletionEntry>* getAttributeValueCompletions(const TQString& tagName, const TQString& attribute, const TQString& startsWith=TQString::null); + TQValueList<KTextEditor::CompletionEntry>* getAttributeValueCompletions(const TQString& tagName, const TQString& attribute, const TQString& startsWith=TQString()); /** Get list of possibile completions in normal text input (nt creating a tag) */ - TQValueList<KTextEditor::CompletionEntry>* getCharacterCompletions(const TQString& starstWith=TQString::null); + TQValueList<KTextEditor::CompletionEntry>* getCharacterCompletions(const TQString& starstWith=TQString()); /** Invoke code completion dialog for XML like tags according to the position (line, col), using DTD dtd. */ bool xmlCodeCompletion(int line, int col); /** Returns list of values for attribute. If deleteResult is true after the call, diff --git a/quanta/src/dtds.cpp b/quanta/src/dtds.cpp index cc25516f..e1c5a742 100644 --- a/quanta/src/dtds.cpp +++ b/quanta/src/dtds.cpp @@ -56,12 +56,12 @@ const TQString m_rcFilename("description.rc"); This constructor reads the dictionary of known dtd's, the attributes and tags will be loaded on the first access to one dtd. */ -DTDs::DTDs(TQObject *parent) - :TQObject(parent) +DTDs::DTDs(TQObject *tqparent) + :TQObject(tqparent) { - connect(this, TQT_SIGNAL(hideSplash()), parent, TQT_SLOT(slotHideSplash())); - connect(this, TQT_SIGNAL(enableIdleTimer(bool)), parent, TQT_SLOT(slotEnableIdleTimer(bool))); - connect(this, TQT_SIGNAL(loadToolbarForDTD(const TQString&)), parent, TQT_SLOT(slotLoadToolbarForDTD(const TQString&))); + connect(this, TQT_SIGNAL(hideSplash()), tqparent, TQT_SLOT(slotHideSplash())); + connect(this, TQT_SIGNAL(enableIdleTimer(bool)), tqparent, TQT_SLOT(slotEnableIdleTimer(bool))); + connect(this, TQT_SIGNAL(loadToolbarForDTD(const TQString&)), tqparent, TQT_SLOT(slotLoadToolbarForDTD(const TQString&))); // kdDebug(24000) << "dtds::dtds" << endl; m_dict = new TQDict<DTDStruct>(119, false); //optimized for max 119 DTD. This should be enough. m_dict->setAutoDelete(true); @@ -120,9 +120,9 @@ DTDs::DTDs(TQObject *parent) DTDStruct * dtd = it.current(); for (uint i = 0; i < dtd->insideDTDs.count(); i++) { - const DTDStruct *insideDTD = m_dict->find(dtd->insideDTDs[i]); // search but don't load + const DTDStruct *insideDTD = m_dict->tqfind(dtd->insideDTDs[i]); // search but don't load if (!insideDTD) - insideDTD = m_dict->find(getDTDNameFromNickName(dtd->insideDTDs[i])); // search but don't load + insideDTD = m_dict->tqfind(getDTDNameFromNickName(dtd->insideDTDs[i])); // search but don't load if (insideDTD && !insideDTD->toplevel) dtd->mimeTypes += insideDTD->mimeTypes; } @@ -168,7 +168,7 @@ bool DTDs::readTagDir(const TQString &dirName, bool loadAll) KConfig *dtdConfig = new KConfig(tmpStr, true); dtdConfig->setGroup("General"); TQString dtdName = dtdConfig->readEntry("Name", "Unknown"); - if (m_dict->find(dtdName.lower())) + if (m_dict->tqfind(dtdName.lower())) { delete dtdConfig; kdDebug(24000) << "dtds::readTagDir from " << dirName @@ -205,8 +205,8 @@ bool DTDs::readTagDir(const TQString &dirName, bool loadAll) for (uint i = 0; i < tmpStrList.count(); i++) { tmpStr = tmpStrList[i].stripWhiteSpace(); - int pos = tmpStr.find('('); - dtd->definitionTags[tmpStr.left(pos).stripWhiteSpace()] = tmpStr.mid(pos+1, tmpStr.findRev(')')-pos-1).stripWhiteSpace(); + int pos = tmpStr.tqfind('('); + dtd->definitionTags[tmpStr.left(pos).stripWhiteSpace()] = tmpStr.mid(pos+1, tmpStr.tqfindRev(')')-pos-1).stripWhiteSpace(); } //Which DTD can be present in this one? dtd->insideDTDs = dtdConfig->readListEntry("MayContain"); @@ -239,7 +239,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd) if (!TQFile::exists(dtd->fileName)) return false; - kapp->setOverrideCursor( TQCursor(Qt::WaitCursor) ); + kapp->setOverrideCursor( TQCursor(TQt::WaitCursor) ); KConfig *dtdConfig = new KConfig(dtd->fileName, true); @@ -264,7 +264,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd) dtd->defaultExtension = dtdConfig->readEntry("DefaultExtension"); dtd->caseSensitive = caseSensitive; int numOfTags = 0; - QTagList *tagList = new QTagList(119, false); //max 119 tag in a DTD + TQTagList *tagList = new TQTagList(119, false); //max 119 tag in a DTD tagList->setAutoDelete(true); //read all the tag files KURL dirURL(dtd->fileName); @@ -272,10 +272,10 @@ bool DTDs::readTagDir2(DTDStruct *dtd) TQString dirName = dirURL.path(1); if (TQFile::exists(dirName + "common.tag")) readTagFile(dirName + "common.tag", dtd, 0L); - //bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false); + //bool idleTimertqStatus = quantaApp->slotEnableIdleTimer(false); emit enableIdleTimer(false); - KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*.tag", 0L); - //quantaApp->slotEnableIdleTimer(idleTimerStatus); + KURL::List files = TQExtFileInfo::allFilesRelative(dirURL, "*.tag", 0L); + //quantaApp->slotEnableIdleTimer(idleTimertqStatus); emit enableIdleTimer(true); TQString tmpStr; KURL::List::ConstIterator end_f = files.constEnd(); @@ -313,16 +313,16 @@ bool DTDs::readTagDir2(DTDStruct *dtd) TQStrList attrList; for (uint i = 0 ; i < extraTagsList.count(); i++) { - QTag *tag = new QTag(); + TQTag *tag = new TQTag(); tag->setName(TQString(extraTagsList.at(i)).stripWhiteSpace()); tmpStr = (dtd->caseSensitive) ? tag->name() : tag->name().upper(); - if (tagList->find(tmpStr)) //the tag is already defined in a .tag file + if (tagList->tqfind(tmpStr)) //the tag is already defined in a .tag file { delete tag; continue; //skip this tag } - tag->parentDTD = dtd; + tag->tqparentDTD = dtd; //read the possible stopping tags TQStrList stoppingTags; dtdConfig->readListEntry(tag->name() + "_stoppingtags",stoppingTags); @@ -422,8 +422,8 @@ bool DTDs::readTagDir2(DTDStruct *dtd) for (uint i = 0; i < tmpStrList.count(); i++) { tmpStr = tmpStrList[i].stripWhiteSpace(); - int pos = tmpStr.find('('); - dtd->specialTags[tmpStr.left(pos).stripWhiteSpace()] = tmpStr.mid(pos+1, tmpStr.findRev(')')-pos-1).stripWhiteSpace(); + int pos = tmpStr.tqfind('('); + dtd->specialTags[tmpStr.left(pos).stripWhiteSpace()] = tmpStr.mid(pos+1, tmpStr.tqfindRev(')')-pos-1).stripWhiteSpace(); } //static const TQString quotationStr = "\\\\\"|\\\\'"; @@ -533,7 +533,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd) TQString tagStr; for (uint index = 1; index <= structGroupsCount; index++) { - dtdConfig->setGroup(TQString("StructGroup_%1").arg(index)); + dtdConfig->setGroup(TQString("StructGroup_%1").tqarg(index)); //new code group.name = dtdConfig->readEntry("Name").stripWhiteSpace(); group.noName = dtdConfig->readEntry("No_Name").stripWhiteSpace(); @@ -547,7 +547,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd) group.hasDefinitionRx = !group.definitionRx.pattern().isEmpty(); group.isMinimalDefinitionRx = dtdConfig->readBoolEntry("DefinitionRx_Minimal", false); group.appendToTags = dtdConfig->readBoolEntry("AppendToTags", false); - group.parentGroup = dtdConfig->readEntry("ParentGroup").stripWhiteSpace(); + group.tqparentGroup = dtdConfig->readEntry("ParentGroup").stripWhiteSpace(); tagStr = dtdConfig->readEntry("TagType", "Text").stripWhiteSpace(); if (tagStr == "XmlTag") group.tagType = Tag::XmlTag; @@ -583,19 +583,19 @@ bool DTDs::readTagDir2(DTDStruct *dtd) TQString tagName; for (uint index = 1; index <= structGroupsCount; index++) { - dtdConfig->setGroup(TQString("StructGroup_%1").arg(index)); + dtdConfig->setGroup(TQString("StructGroup_%1").tqarg(index)); group.name = dtdConfig->readEntry("Name").stripWhiteSpace(); group.noName = dtdConfig->readEntry("No_Name").stripWhiteSpace(); group.icon = dtdConfig->readEntry("Icon").stripWhiteSpace(); group.appendToTags = dtdConfig->readBoolEntry("AppendToTags", false); - group.parentGroup = dtdConfig->readEntry("ParentGroup").stripWhiteSpace(); + group.tqparentGroup = dtdConfig->readEntry("ParentGroup").stripWhiteSpace(); TQString tagStr = dtdConfig->readEntry("Tag").stripWhiteSpace(); if (!tagStr.isEmpty()) { attrRx.search(tagStr); tmpStr = attrRx.cap(); tmpStrList = TQStringList::split(',', tmpStr.mid(1, tmpStr.length()-2)); - tagName = tagStr.left(tagStr.find('(')).lower(); + tagName = tagStr.left(tagStr.tqfind('(')).lower(); group.attributes.clear(); for (uint i = 0; i < tmpStrList.count(); i++) group.attributes += tmpStrList[i].stripWhiteSpace(); @@ -620,15 +620,15 @@ void DTDs::resolveInherited (DTDStruct *dtd) //Resolve the inheritence if (!dtd->inheritsTagsFrom.isEmpty()) { - DTDStruct *parent = (DTDStruct *) find(dtd->inheritsTagsFrom); // this loads the dtd, if not present in memory - TQDictIterator<QTag> tag_it(*(parent->tagsList)); + DTDStruct *tqparent = (DTDStruct *) tqfind(dtd->inheritsTagsFrom); // this loads the dtd, if not present in memory + TQDictIterator<TQTag> tag_it(*(tqparent->tagsList)); for ( ; tag_it.current(); ++tag_it) { - QTag *tag = tag_it.current(); + TQTag *tag = tag_it.current(); TQString searchForTag = (dtd->caseSensitive) ? tag->name() : tag->name().upper(); - if (!dtd->tagsList->find(searchForTag)) + if (!dtd->tagsList->tqfind(searchForTag)) { - QTag *newTag = new QTag(*tag); + TQTag *newTag = new TQTag(*tag); dtd->tagsList->insert(searchForTag, newTag); } } @@ -642,9 +642,9 @@ void DTDs::resolveInherited (DTDStruct *dtd) specialAreaStartRxStr += "|"; for (uint i = 0; i < dtd->insideDTDs.count(); i++) { - const DTDStruct *insideDTD = m_dict->find(dtd->insideDTDs[i]); // search but don't load + const DTDStruct *insideDTD = m_dict->tqfind(dtd->insideDTDs[i]); // search but don't load if (!insideDTD) - insideDTD = m_dict->find(getDTDNameFromNickName(dtd->insideDTDs[i])); // search but don't load + insideDTD = m_dict->tqfind(getDTDNameFromNickName(dtd->insideDTDs[i])); // search but don't load if (insideDTD) { for (mapIt = insideDTD->definitionAreas.begin(); mapIt != insideDTD->definitionAreas.end(); ++mapIt) @@ -667,7 +667,7 @@ void DTDs::resolveInherited (DTDStruct *dtd) /** Reads the tags for the tag files. Returns the number of read tags. */ -uint DTDs::readTagFile(const TQString& fileName, DTDStruct* parentDTD, QTagList *tagList) +uint DTDs::readTagFile(const TQString& fileName, DTDStruct* tqparentDTD, TQTagList *tagList) { // kdDebug(24000) << "dtds::readTagFile:" << fileName << endl; TQFile f(fileName); @@ -678,14 +678,14 @@ uint DTDs::readTagFile(const TQString& fileName, DTDStruct* parentDTD, QTagList bool result = f.open( IO_ReadOnly ); if (! result) kdError() << "dtds::readTagFile unable to open:" << fileName - << " Status: " << f.status() << endl; + << " tqStatus: " << f.status() << endl; } TQString errorMsg; int errorLine, errorCol; if (!m_doc->setContent( &f, &errorMsg, &errorLine, &errorCol )) { emit hideSplash(); - KMessageBox::error(0L, i18n("<qt>The DTD tag file %1 is not valid.<br> The error message is: <i>%2 in line %3, column %4.</i></qt>").arg(fileName).arg(errorMsg).arg(errorLine).arg(errorCol), + KMessageBox::error(0L, i18n("<qt>The DTD tag file %1 is not valid.<br> The error message is: <i>%2 in line %3, column %4.</i></qt>").tqarg(fileName).tqarg(errorMsg).tqarg(errorLine).tqarg(errorCol), i18n("Invalid Tag File")); kdWarning() << fileName << ": " << errorMsg << ": " << errorLine << "," << errorCol << endl; } @@ -702,13 +702,13 @@ uint DTDs::readTagFile(const TQString& fileName, DTDStruct* parentDTD, QTagList TQString extends = e.attribute("extends"); TQString name = e.attribute("name"); if (!name.isEmpty() && !extends.isEmpty()) - parentDTD->classInheritance[name] = extends; + tqparentDTD->classInheritance[name] = extends; continue; } - QTag *tag = new QTag(); + TQTag *tag = new TQTag(); tag->setName(e.attribute("name")); tag->setFileName(fileName); - tag->parentDTD = parentDTD; + tag->tqparentDTD = tqparentDTD; bool common = false; setAttributes(&n, tag, common); if (common) @@ -720,15 +720,15 @@ uint DTDs::readTagFile(const TQString& fileName, DTDStruct* parentDTD, QTagList commonAttrList->setAutoDelete(true); *commonAttrList = *attrs; //delete tag; - parentDTD->commonAttrs->insert(groupName, commonAttrList); + tqparentDTD->commonAttrs->insert(groupName, commonAttrList); } else { - if (parentDTD->caseSensitive) + if (tqparentDTD->caseSensitive) { - tagList->replace(tag->name(), tag); //append the tag to the list for this DTD + tagList->tqreplace(tag->name(), tag); //append the tag to the list for this DTD } else { - tagList->replace(tag->name().upper(), tag); + tagList->tqreplace(tag->name().upper(), tag); } } } @@ -739,7 +739,7 @@ uint DTDs::readTagFile(const TQString& fileName, DTDStruct* parentDTD, QTagList /** Parse the dom document and retrieve the tag attributes */ -void DTDs::setAttributes(TQDomNode *dom, QTag* tag, bool &common) +void DTDs::setAttributes(TQDomNode *dom, TQTag* tag, bool &common) { common = false; Attribute *attr; @@ -750,9 +750,9 @@ void DTDs::setAttributes(TQDomNode *dom, QTag* tag, bool &common) tmpStr = el.attribute("common"); if ((tmpStr != "1" && tmpStr != "yes")) //in case of common tags, we are not interested in these options { - if (tag->parentDTD->commonAttrs) + if (tag->tqparentDTD->commonAttrs) { - TQDictIterator<AttributeList> it(*(tag->parentDTD->commonAttrs)); + TQDictIterator<AttributeList> it(*(tag->tqparentDTD->commonAttrs)); for( ; it.current(); ++it ) { TQString lookForAttr = "has" + TQString(it.currentKey()).stripWhiteSpace(); @@ -794,7 +794,7 @@ void DTDs::setAttributes(TQDomNode *dom, QTag* tag, bool &common) for ( TQDomNode n = dom->firstChild(); !n.isNull(); n = n.nextSibling() ) { tmpStr = n.nodeName(); - if (tmpStr == "children") + if (tmpStr == "tqchildren") { TQDomElement el = n.toElement(); TQDomElement item = el.firstChild().toElement(); @@ -804,7 +804,7 @@ void DTDs::setAttributes(TQDomNode *dom, QTag* tag, bool &common) if (tmpStr == "child") { TQString childTag = item.attribute("name"); - if (!tag->parentDTD->caseSensitive) + if (!tag->tqparentDTD->caseSensitive) childTag = childTag.upper(); tag->childTags.insert(childTag, item.attribute("usage") == "required"); } @@ -820,7 +820,7 @@ void DTDs::setAttributes(TQDomNode *dom, QTag* tag, bool &common) if (item.tagName() == "stoppingtag") { TQString stopTag = item.attribute("name"); - if (!tag->parentDTD->caseSensitive) + if (!tag->tqparentDTD->caseSensitive) stopTag = stopTag.upper(); tag->stoppingTags.append(stopTag); } @@ -837,7 +837,7 @@ void DTDs::setAttributes(TQDomNode *dom, QTag* tag, bool &common) attr->method = el.attribute("method"); attr->arguments = el.attribute("arguments"); - attr->type = el.attribute("type",tag->parentDTD->defaultAttrType); + attr->type = el.attribute("type",tag->tqparentDTD->defaultAttrType); attr->defaultValue = el.attribute("defaultValue"); attr->status = el.attribute("status"); @@ -912,9 +912,9 @@ void DTDs::slotLoadDTD() dtdcfg.setGroup("General"); TQString dtdName = dtdcfg.readEntry("Name"); TQString nickName = dtdcfg.readEntry("NickName", dtdName); - DTDStruct * dtd = m_dict->find(dtdName) ; + DTDStruct * dtd = m_dict->tqfind(dtdName) ; if (dtd && - KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), TQString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No) + KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").tqarg(nickName), TQString(), i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No) { return; } @@ -924,7 +924,7 @@ void DTDs::slotLoadDTD() TQString family = dtdcfg.readEntry("Family", "1"); Document *w = ViewManager::ref()->activeDocument(); if (family == "1" && w && - KMessageBox::questionYesNo(0L, i18n("<qt>Use the newly loaded <b>%1</b> DTD for the current document?</qt>").arg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes) + KMessageBox::questionYesNo(0L, i18n("<qt>Use the newly loaded <b>%1</b> DTD for the current document?</qt>").tqarg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes) { w->setDTDIdentifier(dtdName); emit loadToolbarForDTD(w->getDTDIdentifier()); @@ -944,20 +944,20 @@ void DTDs::slotLoadDTEP(const TQString &_dirName, bool askForAutoload) dtdcfg.setGroup("General"); TQString dtdName = dtdcfg.readEntry("Name"); TQString nickName = dtdcfg.readEntry("NickName", dtdName); - DTDStruct * dtd = m_dict->find(dtdName) ; + DTDStruct * dtd = m_dict->tqfind(dtdName) ; if ( dtd && - KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), TQString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No) + KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").tqarg(nickName), TQString(), i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No) { return; } removeDTD(dtd); if (!readTagDir(dirName)) { - KMessageBox::error(0L, i18n("<qt>Cannot read the DTEP from <b>%1</b>. Check that the folder contains a valid DTEP (<i>description.rc and *.tag files</i>).</qt>").arg(dirName), i18n("Error Loading DTEP")); + KMessageBox::error(0L, i18n("<qt>Cannot read the DTEP from <b>%1</b>. Check that the folder contains a valid DTEP (<i>description.rc and *.tag files</i>).</qt>").tqarg(dirName), i18n("Error Loading DTEP")); } else { TQString family = dtdcfg.readEntry("Family", "1"); - if (askForAutoload && KMessageBox::questionYesNo(0L, i18n("<qt>Autoload the <b>%1</b> DTD in the future?</qt>").arg(nickName), TQString::null, i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes) + if (askForAutoload && KMessageBox::questionYesNo(0L, i18n("<qt>Autoload the <b>%1</b> DTD in the future?</qt>").tqarg(nickName), TQString(), i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes) { KURL src; src.setPath(dirName); @@ -968,7 +968,7 @@ void DTDs::slotLoadDTEP(const TQString &_dirName, bool askForAutoload) } Document *w = ViewManager::ref()->activeDocument(); if (family == "1" && w && - KMessageBox::questionYesNo(0L, i18n("<qt>Use the newly loaded <b>%1</b> DTD for the current document?</qt>").arg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes) + KMessageBox::questionYesNo(0L, i18n("<qt>Use the newly loaded <b>%1</b> DTD for the current document?</qt>").tqarg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes) { w->setDTDIdentifier(dtdName); emit loadToolbarForDTD(w->getDTDIdentifier()); @@ -987,12 +987,12 @@ void DTDs::slotLoadEntities() if (w) { TQString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier()); - entitiesWidget.targetDTEPCombo->setCurrentItem(lst.findIndex(nickName)); + entitiesWidget.targetDTEPCombo->setCurrentItem(lst.tqfindIndex(nickName)); } dlg.setMainWidget(&entitiesWidget); if (dlg.exec()) { - DTDStruct * dtd = m_dict->find(getDTDNameFromNickName(entitiesWidget.targetDTEPCombo->currentText())); + DTDStruct * dtd = m_dict->tqfind(getDTDNameFromNickName(entitiesWidget.targetDTEPCombo->currentText())); DTDParser dtdParser(KURL::fromPathOrURL(entitiesWidget.sourceDTDRequester->url()), KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep"); TQString dtdDir = TQFileInfo(dtd->fileName).dirPath(); if (dtdParser.parse(dtdDir, true)) @@ -1077,7 +1077,7 @@ const DTDStruct * DTDs::DTDforURL(const KURL &url) } } if (foundList.isEmpty()) - return find("empty"); + return tqfind("empty"); else { TQString path = url.path(); @@ -1093,7 +1093,7 @@ const DTDStruct * DTDs::DTDforURL(const KURL &url) bool DTDs::canHandle(const DTDStruct *dtd, const KURL &url) { TQString mimetype = KMimeType::findByURL(url)->name(); - if (dtd->mimeTypes.contains(mimetype)) + if (dtd->mimeTypes.tqcontains(mimetype)) return true; if (url.path().endsWith('.' + dtd->defaultExtension)) return true; diff --git a/quanta/src/dtds.h b/quanta/src/dtds.h index 120157a8..ae7c28f1 100644 --- a/quanta/src/dtds.h +++ b/quanta/src/dtds.h @@ -34,7 +34,7 @@ class TQDomNode; class TQDomDocument; -class QTag; +class TQTag; class TQString; class TQStringList; class KConfig; @@ -44,11 +44,12 @@ struct DTDStruct; /** @short This class manages the DTD's for Quanta. * * The constructor only loads the necessary information from the description.rc file. - * The rest is later loaded on demand of the find() function. + * The rest is later loaded on demand of the tqfind() function. */ -class DTDs : public QObject +class DTDs : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -56,10 +57,10 @@ public: * since this class is a singleton you must use this function to access it * @return the class pointer */ - static DTDs* ref(TQObject *parent = 0L) + static DTDs* ref(TQObject *tqparent = 0L) { static DTDs *m_ref; - if (!m_ref) m_ref = new DTDs(parent); + if (!m_ref) m_ref = new DTDs(tqparent); return m_ref; } @@ -72,10 +73,10 @@ public: * @param dtdName name of the dtd, will be converted to lowercase inside * @return the found dtd structure */ - const DTDStruct * find (const TQString &dtdName) + const DTDStruct * tqfind (const TQString &dtdName) { -// kdDebug(24000) << "dtds::find " << dtdName << endl; - DTDStruct *dtd = m_dict->find(dtdName.lower()) ; +// kdDebug(24000) << "dtds::tqfind " << dtdName << endl; + DTDStruct *dtd = m_dict->tqfind(dtdName.lower()) ; if (dtd && ! dtd->loaded ) readTagDir2(dtd); return dtd; } @@ -92,7 +93,7 @@ public: */ TQString getDTDNickNameFromName(const TQString& name) { - DTDStruct *dtd = m_dict->find(name); + DTDStruct *dtd = m_dict->tqfind(name); if ( dtd ) return dtd->nickName; else @@ -178,7 +179,7 @@ private: * If you need the class use DTDs::ref() for * construction and reference */ - DTDs(TQObject *parent); + DTDs(TQObject *tqparent); /** Reads the tag files and the description.rc from tagDir in order to @@ -208,19 +209,19 @@ private: /** Reads the tags from the tag files. * * @param fileName path of the tag file - * @param parentDTD the DTD where the tags belog to + * @param tqparentDTD the DTD where the tags belog to * @param tagList the list where the tags are inserted * @return the number of read tags. */ - uint readTagFile(const TQString& fileName, DTDStruct* parentDTD, QTagList *tagList); + uint readTagFile(const TQString& fileName, DTDStruct* tqparentDTD, TQTagList *tagList); /** Parses the dom document and retrieve the tag attributes * * @param dom the DOM node containing the tag definition - * @param tag the QTag object that will be initialized by using the information in dom + * @param tag the TQTag object that will be initialized by using the information in dom * @param common will be true, if the tag is a just a list of common group attributes */ - void setAttributes(TQDomNode *dom, QTag* tag, bool &common); + void setAttributes(TQDomNode *dom, TQTag* tag, bool &common); /** removes dtd from dictonary and deletes all components * * @param dtd the dtd to delete diff --git a/quanta/src/kqapp.cpp b/quanta/src/kqapp.cpp index 32e1044c..1f1f0401 100644 --- a/quanta/src/kqapp.cpp +++ b/quanta/src/kqapp.cpp @@ -1,5 +1,5 @@ /* - KQApplication.cpp + KTQApplication.cpp KNode, the KDE newsreader Copyright (c) 1999-2001 the KNode authors. @@ -59,7 +59,7 @@ KSplash::~KSplash() } -KQApplication::KQApplication() +KTQApplication::KTQApplication() : KApplication() { args = KCmdLineArgs::parsedArgs(); @@ -80,12 +80,12 @@ KQApplication::KQApplication() KConfig *config = kapp->config(); config->setGroup("General Options"); int mdiMode = config->readNumEntry("MDI mode", KMdi::IDEAlMode); - TQString layout = config->readEntry("Window layout", "Default"); - if (layout == "Default" || args->isSet("resetlayout")) + TQString tqlayout = config->readEntry("Window tqlayout", "Default"); + if (tqlayout == "Default" || args->isSet("resettqlayout")) { mdiMode = KMdi::IDEAlMode; config->writeEntry("MDI mode", KMdi::IDEAlMode); - config->writeEntry("Window layout", "Default"); + config->writeEntry("Window tqlayout", "Default"); } quantaApp = new QuantaApp(mdiMode); config->setGroup("General Options"); @@ -101,16 +101,16 @@ KQApplication::KQApplication() } } -void KQApplication::slotInit() +void KTQApplication::slotInit() { - KQApplicationPrivate::init(); + KTQApplicationPrivate::init(); } -KQApplication::~KQApplication() +KTQApplication::~KTQApplication() { } -void KQApplication::slotSplashTimeout() +void KTQApplication::slotSplashTimeout() { delete splash; delete sp; @@ -118,19 +118,19 @@ void KQApplication::slotSplashTimeout() sp = 0L; } -KQUniqueApplication::KQUniqueApplication() +KTQUniqueApplication::KTQUniqueApplication() : KUniqueApplication() { KGlobal::dirs()->addPrefix(PREFIX); dcopClient()->registerAs("quanta", false); } -KQUniqueApplication::~KQUniqueApplication() +KTQUniqueApplication::~KTQUniqueApplication() { } -int KQUniqueApplication::newInstance() +int KTQUniqueApplication::newInstance() { args = KCmdLineArgs::parsedArgs(); if (mainWidget()) @@ -151,11 +151,11 @@ int KQUniqueApplication::newInstance() KConfig *config = kapp->config(); config->setGroup("General Options"); int mdiMode = config->readNumEntry("MDI mode", KMdi::IDEAlMode); - TQString layout = config->readEntry("Window layout", "Default"); - if (layout == "Default" || args->isSet("resetlayout")) + TQString tqlayout = config->readEntry("Window tqlayout", "Default"); + if (tqlayout == "Default" || args->isSet("resettqlayout")) { mdiMode = KMdi::IDEAlMode; - config->writeEntry("Window layout", "Default"); + config->writeEntry("Window tqlayout", "Default"); config->writeEntry("MDI mode", KMdi::IDEAlMode); } quantaApp = new QuantaApp(mdiMode); @@ -174,12 +174,12 @@ int KQUniqueApplication::newInstance() return 0; } -void KQUniqueApplication::slotInit() +void KTQUniqueApplication::slotInit() { - KQApplicationPrivate::init(); + KTQApplicationPrivate::init(); } -void KQUniqueApplication::slotSplashTimeout() +void KTQUniqueApplication::slotSplashTimeout() { delete splash; delete sp; @@ -188,7 +188,7 @@ void KQUniqueApplication::slotSplashTimeout() } -void KQApplicationPrivate::init() +void KTQApplicationPrivate::init() { if (quantaApp->quantaStarted) { @@ -203,7 +203,7 @@ void KQApplicationPrivate::init() { TQString arg = args->url(i).url(); - if(arg.findRev(TQRegExp(".+\\.webprj")) != -1) + if(arg.tqfindRev(TQRegExp(".+\\.webprj")) != -1) initialProject = arg; else initialFiles += arg; diff --git a/quanta/src/kqapp.h b/quanta/src/kqapp.h index 1ecda501..ea4b9b7d 100644 --- a/quanta/src/kqapp.h +++ b/quanta/src/kqapp.h @@ -16,8 +16,8 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US */ -#ifndef KQAPPLICATION_H -#define KQAPPLICATION_H +#ifndef KTQAPPLICATION_H +#define KTQAPPLICATION_H #include <tqframe.h> #include <kuniqueapplication.h> @@ -25,20 +25,21 @@ class KCmdLineArgs; class KSplashScreen; -class KSplash : public QFrame +class KSplash : public TQFrame { Q_OBJECT + TQ_OBJECT public: KSplash(); ~KSplash(); }; -class KQApplicationPrivate +class KTQApplicationPrivate { public: - KQApplicationPrivate():splash(0L), sp(0L) {}; - ~KQApplicationPrivate() {}; + KTQApplicationPrivate():splash(0L), sp(0L) {}; + ~KTQApplicationPrivate() {}; protected: void init(); @@ -48,25 +49,27 @@ class KQApplicationPrivate KSplashScreen *sp; }; -class KQApplication : public KApplication, KQApplicationPrivate +class KTQApplication : public KApplication, KTQApplicationPrivate { Q_OBJECT + TQ_OBJECT public: - KQApplication(); - ~KQApplication(); + KTQApplication(); + ~KTQApplication(); public slots: void slotInit(); void slotSplashTimeout(); }; -class KQUniqueApplication : public KUniqueApplication, KQApplicationPrivate +class KTQUniqueApplication : public KUniqueApplication, KTQApplicationPrivate { Q_OBJECT + TQ_OBJECT public: - KQUniqueApplication(); - ~KQUniqueApplication(); + KTQUniqueApplication(); + ~KTQUniqueApplication(); /** Create new instance of Quanta. Make the existing main window active if Quanta is already running */ diff --git a/quanta/src/main.cpp b/quanta/src/main.cpp index 527c9956..7c2fe22a 100644 --- a/quanta/src/main.cpp +++ b/quanta/src/main.cpp @@ -56,7 +56,7 @@ static KCmdLineOptions options[] = { "+[File]", I18N_NOOP("File to open"), 0 }, { "unique", I18N_NOOP("Whether we start as a one-instance application"), 0 }, { "nologo", I18N_NOOP("Do not show the nice logo during startup"), 0 }, - { "resetlayout", I18N_NOOP("Reset the layout of the user interface to the default"), 0}, + { "resettqlayout", I18N_NOOP("Reset the tqlayout of the user interface to the default"), 0}, KCmdLineLastOption // INSERT YOUR COMMANDLINE OPTIONS HERE }; @@ -208,9 +208,9 @@ int main(int argc, char *argv[]) DCOPRef("quanta", QUANTA_PACKAGE).call("newInstance()"); exit(0); } - app = new KQUniqueApplication; + app = new KTQUniqueApplication; } else { - app = new KQApplication; + app = new KTQApplication; } return app->exec(); diff --git a/quanta/src/quanta.cpp b/quanta/src/quanta.cpp index 16795ec9..ada60632 100644 --- a/quanta/src/quanta.cpp +++ b/quanta/src/quanta.cpp @@ -196,7 +196,7 @@ extern int NN; const TQString resourceDir = TQString(QUANTA_PACKAGE) + "/"; // from kfiledialog.cpp - avoid qt warning in STDERR (~/.xsessionerrors) -static void silenceQToolBar(QtMsgType, const char *){} +static void silenceTQToolBar(TQtMsgType, const char *){} QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm( 0, "Quanta", (KMdi::MdiMode) mdiMode) @@ -206,13 +206,13 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm( m_quantaInit = new QuantaInit(this); dcopSettings = new DCOPSettings; dcopQuanta = new DCOPQuanta; - DTDs::ref(this); + DTDs::ref(TQT_TQOBJECT(this)); quantaStarted = true; tempFileList.setAutoDelete(true); m_toolbarList.setAutoDelete(true); userToolbarsCount = 0; baseNode = 0L; - currentToolbarDTD = TQString::null; + currentToolbarDTD = TQString(); m_config=kapp->config(); idleTimer = new TQTimer(this); connect(idleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotIdleTimerExpired())); @@ -232,7 +232,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm( qConfig.enableDTDToolbar = true; // connect up signals from KXXsldbgPart - connectDCOPSignal(0, 0, "debuggerPositionChangedQString,int)", "newDebuggerPosition(TQString,int)", false ); + connectDCOPSignal(0, 0, "debuggerPositionChangedTQString,int)", "newDebuggerPosition(TQString,int)", false ); connectDCOPSignal(0, 0, "editorPositionChanged(TQString,int,int)", "newCursorPosition(TQString,int,int)", false ); connectDCOPSignal(0, 0, "openFile(TQString,int,int)", "openFile(TQString,int,int)", false); @@ -258,7 +258,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm( m_parserEnabled = true; cursorLine = 0; cursorCol = 0; - emit eventHappened("quanta_start", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString::null); + emit eventHappened("quanta_start", TQDateTime::tqcurrentDateTime().toString(Qt::ISODate), TQString()); setAcceptDrops(true); tabWidget()->installEventFilter(this); } @@ -320,7 +320,7 @@ QuantaApp::~QuantaApp() tmpDir = tmpDirs[0]; for (uint i = 0; i < tmpDirs.count(); i++) { - if (tmpDirs[i].contains("kde-")) + if (tmpDirs[i].tqcontains("kde-")) tmpDir = tmpDirs[i]; } TQString infoCss = tmpDir; @@ -373,9 +373,9 @@ void QuantaApp::slotFileOpen(const KURL::List &urls, const TQString& encoding) m_parserEnabled = false; for (KURL::List::ConstIterator i = urls.begin(); i != urls.end(); ++i) { - if (!QExtFileInfo::exists(*i, true, this)) + if (!TQExtFileInfo::exists(*i, true, this)) { - KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").arg((*i).prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").tqarg((*i).prettyURL(0, KURL::StripFileProtocol))); } else { @@ -409,10 +409,10 @@ void QuantaApp::slotFileOpen(const KURL &url, const TQString& encoding, bool rea void QuantaApp::slotFileOpenRecent(const KURL &url) { - if (!QExtFileInfo::exists(url, true, this)) + if (!TQExtFileInfo::exists(url, true, this)) { if (KMessageBox::questionYesNo(this, - i18n("The file %1 does not exist.\n Do you want to remove it from the list?").arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString::null, KStdGuiItem::del(), i18n("Keep")) + i18n("The file %1 does not exist.\n Do you want to remove it from the list?").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), TQString(), KStdGuiItem::del(), i18n("Keep")) == KMessageBox::Yes) { fileRecent->removeURL(url); @@ -433,7 +433,7 @@ void QuantaApp::slotFileSave() Document *w = view->document(); if (w) { - w->checkDirtyStatus(); + w->checkDirtytqStatus(); if (w->isUntitled()) slotFileSaveAs(); else @@ -457,7 +457,7 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave) if (w) { KURL oldURL = w->url(); - w->checkDirtyStatus(); + w->checkDirtytqStatus(); if (!w->isUntitled() && oldURL.isLocalFile()) { fileWatcher->removeFile(oldURL.path()); @@ -522,8 +522,8 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave) if (QuantaCommon::checkOverwrite(saveUrl, this) && view->saveDocument(saveUrl)) { oldURL = saveUrl; - if (Project::ref()->hasProject() && !Project::ref()->contains(saveUrl) && - KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("<qt>Do you want to add the<br><b>%1</b><br>file to project?</qt>").arg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), TQString::null, KStdGuiItem::add(), i18n("Do Not Add")) + if (Project::ref()->hasProject() && !Project::ref()->tqcontains(saveUrl) && + KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("<qt>Do you want to add the<br><b>%1</b><br>file to project?</qt>").tqarg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), TQString(), KStdGuiItem::add(), i18n("Do Not Add")) ) { if (saveUrl.isLocalFile()) @@ -557,7 +557,7 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly) KURL url; int query; KURL projectTemplateURL; - w->checkDirtyStatus(); + w->checkDirtytqStatus(); TQString localTemplateDir = locateLocal("data", resourceDir + "templates/"); do { @@ -565,10 +565,10 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly) if (projectTemplate) { - url = KFileDialog::getSaveURL(Project::ref()->templateURL().url(), TQString::null, this); + url = KFileDialog::getSaveURL(Project::ref()->templateURL().url(), TQString(), this); } else { - url = KFileDialog::getSaveURL(locateLocal("data", resourceDir + "templates/"), TQString::null, this); + url = KFileDialog::getSaveURL(locateLocal("data", resourceDir + "templates/"), TQString(), this); } if (url.isEmpty()) return; @@ -584,7 +584,7 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly) { if (projectTemplate) localTemplateDir = projectTemplateURL.path(1); - KMessageBox::sorry(this,i18n("You must save the templates in the following folder: \n\n%1").arg(localTemplateDir)); + KMessageBox::sorry(this,i18n("You must save the templates in the following folder: \n\n%1").tqarg(localTemplateDir)); query = KMessageBox::No; } } while (query != KMessageBox::Yes); @@ -602,8 +602,8 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly) stream << content; tempFile->file()->flush(); tempFile->close(); - if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url, -1, true, false, this)) - KMessageBox::error(this, i18n("<qt>There was an error while creating the template file.<br>Check that you have write access to <i>%1</i>.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Template Creation Error")); + if (!TQExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url, -1, true, false, this)) + KMessageBox::error(this, i18n("<qt>There was an error while creating the template file.<br>Check that you have write access to <i>%1</i>.</qt>").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Template Creation Error")); delete tempFile; } else { @@ -684,7 +684,7 @@ void QuantaApp::slotFileCloseAll() part->write(" "); part->end(); - slotNewStatus(); + slotNewtqStatus(); } void QuantaApp::slotFileQuit() @@ -703,19 +703,19 @@ void QuantaApp::slotEditFindInFiles() void QuantaApp::slotHelpTip() { - KTipDialog::showTip(this, TQString::null, true); + KTipDialog::showTip(this, TQString(), true); } void QuantaApp::slotStatusMsg(const TQString &msg) { statusbarTimer->stop(); statusBar()->changeItem(" " + KStringHandler::cPixelSqueeze(msg, statusBar()->fontMetrics(), progressBar->x() - 20), IDS_STATUS); - statusBar()->repaint(); - kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); + statusBar()->tqrepaint(); + kapp->tqprocessEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); statusbarTimer->start(10000, true); } -/** repaint preview */ +/** tqrepaint preview */ void QuantaApp::slotRepaintPreview() { Document *w = ViewManager::ref()->activeDocument(); @@ -761,7 +761,7 @@ void QuantaApp::slotRepaintPreview() TQString noFramesText = w->text(0,0, bl, bc - 1); noFramesText += noframearea[0]; noFramesText += w->text(el, ec + 1, w->editIf->numLines() - 1, w->editIf->lineLength(w->editIf->numLines() - 1)); - noFramesText.replace(TQRegExp("</?noframes[^>]*>", false), ""); + noFramesText.tqreplace(TQRegExp("</?noframes[^>]*>", false), ""); //kdDebug(24000) << "NOFRAMES: " << noFramesText << endl; if (w->isUntitled()) m_htmlPart->begin(Project::ref()->projectBaseURL(), xOffset, yOffset); @@ -809,7 +809,7 @@ void QuantaApp::slotRepaintPreview() tmpFile->textStream()->setCodec(TQTextCodec::codecForName(encoding.ascii())); *(tmpFile->textStream()) << w->editIf->text(); tmpFile->close(); - if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFileName), previewURL, -1, true)) { + if (!TQExtFileInfo::copy(KURL::fromPathOrURL(tempFileName), previewURL, -1, true)) { m_htmlPart->setPreviewedURL(KURL()); // copy failed, force the preview of the original }; delete tmpFile; @@ -864,7 +864,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo) baseURL = w->url(); baseURL.setFileName(""); } - KURL relURL = QExtFileInfo::toRelative(url, baseURL); + KURL relURL = TQExtFileInfo::toRelative(url, baseURL); TQString urlStr = relURL.url(); if (relURL.protocol() == baseURL.protocol()) urlStr = relURL.path(); @@ -876,7 +876,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo) } else { TQString mimetype = KMimeType::findByURL(url)->name(); - if (mimetype.contains("image")) + if (mimetype.tqcontains("image")) { TQString imgFileName; KIO::NetAccess::download(url, imgFileName, this); @@ -915,7 +915,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo) } } -void QuantaApp::slotNewStatus() +void QuantaApp::slotNewtqStatus() { fileRecent->setEnabled(true); actionCollection()->action("project_open_recent")->setEnabled(true); @@ -965,7 +965,7 @@ void QuantaApp::slotOptionsConfigureKeys() for( TQPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it ) { - if (toolbarGuiClients.contains(*it) <= 0) //no need to insert the collections of the toolbars as they are present in the main actionCollection + if (toolbarGuiClients.tqcontains(*it) <= 0) //no need to insert the collections of the toolbars as they are present in the main actionCollection dlg.insert((*it)->actionCollection()); } if (dlg.configure() == KKeyDialog::Accepted) @@ -1026,7 +1026,7 @@ void QuantaApp::slotOptionsConfigureKeys() el.setAttribute("shortcut", action->shortcut().toString()); el = node.toElement(); node = node.nextSibling(); - el.parentNode().removeChild(el); + el.tqparentNode().removeChild(el); } else { node = node.nextSibling(); @@ -1161,7 +1161,7 @@ void QuantaApp::slotOptions() KDialogBase::Ok, this, "tabdialog"); // Tag Style options - TQVBox *page=kd->addVBoxPage(i18n("Tag Style"), TQString::null, BarIcon("kwrite", KIcon::SizeMedium)); + TQVBox *page=kd->addVBoxPage(i18n("Tag Style"), TQString(), BarIcon("kwrite", KIcon::SizeMedium)); StyleOptionsS *styleOptionsS = new StyleOptionsS( (TQWidget *)page); styleOptionsS->tagCase->setCurrentItem( qConfig.tagCase); @@ -1175,7 +1175,7 @@ void QuantaApp::slotOptions() // Environment options //TODO FileMasks name is not good anymore - page=kd->addVBoxPage(i18n("Environment"), TQString::null, UserIcon("files", KIcon::SizeMedium ) ); + page=kd->addVBoxPage(i18n("Environment"), TQString(), UserIcon("files", KIcon::SizeMedium ) ); FileMasks *fileMasks = new FileMasks((TQWidget *)page); fileMasks->lineMarkup->setText( qConfig.markupMimeTypes ); @@ -1215,7 +1215,7 @@ void QuantaApp::slotOptions() fileMasks->defaultDTDCombo->setCurrentItem(pos); // Preview options - page=kd->addVBoxPage(i18n("User Interface"), TQString::null, BarIcon("view_choose", KIcon::SizeMedium ) ); + page=kd->addVBoxPage(i18n("User Interface"), TQString(), BarIcon("view_choose", KIcon::SizeMedium ) ); PreviewOptions *uiOptions = new PreviewOptions( (TQWidget *)page ); uiOptions->setPosition(qConfig.previewPosition); @@ -1238,10 +1238,10 @@ void QuantaApp::slotOptions() uiOptions->warnEventActions->setChecked(true); } //kafka options - page = kd->addVBoxPage(i18n("VPL View"), TQString::null, UserIcon("vpl_text", KIcon::SizeMedium)); + page = kd->addVBoxPage(i18n("VPL View"), TQString(), UserIcon("vpl_text", KIcon::SizeMedium)); KafkaSyncOptions *kafkaOptions = new KafkaSyncOptions( m_config, (TQWidget *)page ); - page=kd->addVBoxPage(i18n("Parser"), TQString::null, BarIcon("kcmsystem", KIcon::SizeMedium ) ); + page=kd->addVBoxPage(i18n("Parser"), TQString(), BarIcon("kcmsystem", KIcon::SizeMedium ) ); ParserOptions *parserOptions = new ParserOptions( m_config, (TQWidget *)page ); parserOptions->refreshFrequency->setValue(qConfig.refreshFrequency); @@ -1250,7 +1250,7 @@ void QuantaApp::slotOptions() parserOptions->showClosingTags->setChecked(qConfig.showClosingTags); parserOptions->spinExpand->setValue(qConfig.expandLevel); - page = kd->addVBoxPage(i18n("Abbreviations"), TQString::null, BarIcon("fontsizeup", KIcon::SizeMedium)); + page = kd->addVBoxPage(i18n("Abbreviations"), TQString(), BarIcon("fontsizeup", KIcon::SizeMedium)); AbbreviationDlg *abbreviationOptions = new AbbreviationDlg((TQWidget*)(page)); bool reloadTrees = false; @@ -1348,7 +1348,7 @@ void QuantaApp::slotOptions() if (previewSettingsChanged) slotShowPreviewWidget(true); qConfig.docPosition = uiOptions->docPosition(); - qConfig.windowLayout = uiOptions->layout(); + qConfig.windowLayout = uiOptions->tqlayout(); m_htmlPart->closeURL(); m_htmlPart->begin( Project::ref()->projectBaseURL()); @@ -1356,7 +1356,7 @@ void QuantaApp::slotOptions() m_htmlPart->end(); reparse(true); - slotNewStatus(); + slotNewtqStatus(); } m_config->sync(); @@ -1379,7 +1379,7 @@ void QuantaApp::slotShowPreviewWidget(bool show) { delete m_previewToolView; m_previewToolView = 0L; - view->addCustomWidget(m_htmlPart->view(), TQString::null); + view->addCustomWidget(m_htmlPart->view(), TQString()); } else { if (!m_previewToolView) @@ -1402,7 +1402,7 @@ void QuantaApp::slotShowPreviewWidget(bool show) m_htmlPart->view()->hide(); if (qConfig.previewPosition == "Editor") { - view->addCustomWidget(0L, TQString::null); + view->addCustomWidget(0L, TQString()); delete m_previewToolView; m_previewToolView = 0L; } else @@ -1437,7 +1437,7 @@ void QuantaApp::slotShowPreviewWidget(bool show) } } -void QuantaApp::slotChangePreviewStatus() +void QuantaApp::slotChangePreviewtqStatus() { if (qConfig.previewPosition == "Editor") { @@ -1446,7 +1446,7 @@ void QuantaApp::slotChangePreviewStatus() if (m_previewToolView && m_htmlPart->view()->isVisible()) { //hiding the preview when it's in a toolview means that the current tab has changed, - //so we just repaint the content and restore the document on the disc. + //so we just tqrepaint the content and restore the document on the disc. m_previewVisible = true; if (m_previewedDocument) { @@ -1511,7 +1511,7 @@ void QuantaApp::newCursorPosition(const TQString &file, int lineNumber, int colu startIdleTimer(); // updateTreeViews(); TQString linenumber; - linenumber = i18n("Line: %1 Col: %2").arg(lineNumber).arg(columnNumber); + linenumber = i18n("Line: %1 Col: %2").tqarg(lineNumber).tqarg(columnNumber); statusBar()->changeItem(linenumber, IDS_STATUS_CLM); statusBar()->changeItem(i18n(" R/O "),IDS_INS_OVR); statusBar()->changeItem("",IDS_MODIFIED); @@ -1525,7 +1525,7 @@ void QuantaApp::newDebuggerPosition(const TQString &file, int lineNumber) void QuantaApp::openFile(const TQString &file, int lineNumber, int columnNumber) { gotoFileAndLine(file, lineNumber, columnNumber); - slotNewStatus(); + slotNewtqStatus(); } void QuantaApp::slotNewLineColumn() @@ -1539,7 +1539,7 @@ void QuantaApp::slotNewLineColumn() Document *w = ViewManager::ref()->activeDocument(); if (w) w->viewCursorIf->cursorPosition(&cursorLine, &cursorCol); - linenumber = i18n("Line: %1 Col: %2").arg(cursorLine+1).arg(cursorCol+1); + linenumber = i18n("Line: %1 Col: %2").tqarg(cursorLine+1).tqarg(cursorCol+1); statusBar()->changeItem(linenumber, IDS_STATUS_CLM); } @@ -1781,7 +1781,7 @@ void QuantaApp::slotShowAnnotationView() makeDockVisible(dynamic_cast<KDockWidget*>(m_annotationOutputView->wrapperWidget())); } -TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomElement &element, int &id ) +TQWidget* QuantaApp::createContainer( TQWidget *tqparent, int index, const TQDomElement &element, int &id ) { TQString tabname = element.attribute( "i18ntabname", "" ); @@ -1790,12 +1790,12 @@ TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomEl if ( element.tagName().lower() == "toolbar" && !tabname.isEmpty()) { //avoid TQToolBar warning in the log - QtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar ); + TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceTQToolBar ); ToolbarTabWidget *toolbarTab = ToolbarTabWidget::ref(); TQWidget *w = new TQWidget(toolbarTab, TQString("ToolbarHoldingWidget" + element.attribute("name")).ascii()); QuantaToolBar *tb = new QuantaToolBar(w, element.attribute("name").ascii(), true, true); tb->loadState(element); - tb->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum); + tb->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum); //kdDebug(24000) << "tb->iconSize() " << tb->iconSize() << endl; if (toolbarTab->iconText() == KToolBar::IconTextBottom) @@ -1813,7 +1813,7 @@ TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomEl kdDebug(24000) << "toolbarTab->tabHeight() " << toolbarTab->tabHeight() << endl; */ toolbarTab->insertTab(tb, tabname, idStr); - qInstallMsgHandler( oldHandler ); + tqInstallMsgHandler( oldHandler ); connect(tb, TQT_SIGNAL(removeAction(const TQString&, const TQString&)), TQT_SLOT(slotRemoveAction(const TQString&, const TQString&))); @@ -1822,18 +1822,18 @@ TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomEl return tb; } - return KMainWindow::createContainer( parent, index, element, id ); + return KMainWindow::createContainer( tqparent, index, element, id ); } -void QuantaApp::removeContainer( TQWidget *container, TQWidget *parent, TQDomElement &element, int id ) +void QuantaApp::removeContainer( TQWidget *container, TQWidget *tqparent, TQDomElement &element, int id ) { if (dynamic_cast<QuantaToolBar*>(container)) { ToolbarTabWidget::ref()->removePage(container); } else - KMainWindow::removeContainer( container, parent, element, id ); + KMainWindow::removeContainer( container, tqparent, element, id ); } void QuantaApp::slotBack() @@ -1911,14 +1911,14 @@ void QuantaApp::slotContextMenuAboutToShow() name = tagStr.mid(pos, group.definitionRx.matchedLength()); node->tag->beginPos(bl, bc); TQString tmpStr = tagStr.left(pos); - int newLines = tmpStr.contains('\n'); + int newLines = tmpStr.tqcontains('\n'); bl += newLines; - int l = tmpStr.findRev('\n'); //the last EOL + int l = tmpStr.tqfindRev('\n'); //the last EOL bc = (l == -1) ? bc+pos : pos - l - 1; - newLines = name.contains('\n'); + newLines = name.tqcontains('\n'); l = name.length(); el = bl + newLines; - ec = (newLines > 0) ? l - name.findRev('\n') : bc + l - 1; + ec = (newLines > 0) ? l - name.tqfindRev('\n') : bc + l - 1; pos += l; int p = group.definitionRx.search(cleanName); if (p != -1) @@ -1942,7 +1942,7 @@ void QuantaApp::slotContextMenuAboutToShow() } } else { - TQMap<TQString, XMLStructGroup>::ConstIterator it = node->tag->dtd()->xmlStructTreeGroups.find(node->tag->name.lower()); + TQMap<TQString, XMLStructGroup>::ConstIterator it = node->tag->dtd()->xmlStructTreeGroups.tqfind(node->tag->name.lower()); if (it != node->tag->dtd()->xmlStructTreeGroups.constEnd()) { @@ -1964,11 +1964,11 @@ void QuantaApp::slotContextMenuAboutToShow() { if (!name.isEmpty()) { - KURL baseUrl = QExtFileInfo::path(w->url()); + KURL baseUrl = TQExtFileInfo::path(w->url()); urlUnderCursor = baseUrl; QuantaCommon::setUrl(urlUnderCursor, name.stripWhiteSpace()); - urlUnderCursor = QExtFileInfo::toAbsolute(urlUnderCursor, baseUrl); - action->setText(i18n("Open File: %1").arg(KStringHandler::lsqueeze(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol), 80))); + urlUnderCursor = TQExtFileInfo::toAbsolute(urlUnderCursor, baseUrl); + action->setText(i18n("Open File: %1").tqarg(KStringHandler::lsqueeze(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol), 80))); action->setEnabled(true); } else { @@ -1979,7 +1979,7 @@ void QuantaApp::slotContextMenuAboutToShow() action = actionCollection()->action("upload_file"); if (action) { - action->setEnabled(Project::ref()->contains(w->url())); + action->setEnabled(Project::ref()->tqcontains(w->url())); } // If we have a debugger session active... @@ -1997,16 +1997,16 @@ void QuantaApp::slotContextMenuAboutToShow() { // Otherwise, find the word under the cursor word = w->editIf->textLine(w->viewCursorIf->cursorLine()); - startpos = word.findRev(TQRegExp("$|[^a-zA-Z0-9_]"), w->viewCursorIf->cursorColumn()); + startpos = word.tqfindRev(TQRegExp("$|[^a-zA-Z0-9_]"), w->viewCursorIf->cursorColumn()); word.remove(0, startpos); if(word.left(1) != "$") word.remove(0, 1); - word = word.left(word.find(TQRegExp("[^a-zA-Z0-9_]"), 1)); + word = word.left(word.tqfind(TQRegExp("[^a-zA-Z0-9_]"), 1)); } // If we have a linebreak, take everything before the break - startpos = word.find("\n"); + startpos = word.tqfind("\n"); if(startpos > 0) word = word.left(startpos); @@ -2027,7 +2027,7 @@ void QuantaApp::slotContextMenuAboutToShow() action = actionCollection()->action("debug_addwatch"); if(action) { - action->setText(i18n("Add Watch: '%1'").arg(word)); + action->setText(i18n("Add Watch: '%1'").tqarg(word)); action->setEnabled(!word.isEmpty()); if(!action->isPlugged(popup)) @@ -2038,7 +2038,7 @@ void QuantaApp::slotContextMenuAboutToShow() action = actionCollection()->action("debug_variable_set"); if(action) { - action->setText(i18n("Set Value of '%1'").arg(word)); + action->setText(i18n("Set Value of '%1'").tqarg(word)); action->setEnabled(!word.isEmpty()); if(!action->isPlugged(popup)) @@ -2049,7 +2049,7 @@ void QuantaApp::slotContextMenuAboutToShow() action = actionCollection()->action("debug_conditional_break"); if(action) { - action->setText(i18n("Break When '%1'...").arg(word)); + action->setText(i18n("Break When '%1'...").tqarg(word)); action->setEnabled(!word.isEmpty()); if(!action->isPlugged(popup)) @@ -2074,7 +2074,7 @@ void QuantaApp::slotContextMenuAboutToShow() void QuantaApp::slotOpenFileUnderCursor() { - if (QExtFileInfo::exists(urlUnderCursor, true, this)) + if (TQExtFileInfo::exists(urlUnderCursor, true, this)) { if (QuantaCommon::checkMimeGroup(urlUnderCursor, "text" )) { @@ -2087,7 +2087,7 @@ void QuantaApp::slotOpenFileUnderCursor() } } else { - KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").arg(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").tqarg(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol))); } } @@ -2166,8 +2166,8 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url) { if ((nodeList.item(i).cloneNode().toElement().attribute("name").lower() ) == name.lower()) { - newName = origName + TQString(" (%1)").arg(count); - i18nName = i18n(origName.utf8()) + TQString(" (%1)").arg(count); + newName = origName + TQString(" (%1)").tqarg(count); + i18nName = i18n(origName.utf8()) + TQString(" (%1)").tqarg(count); nameModified = true; count++; found = true; @@ -2195,12 +2195,12 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url) TQString s = i18nName.lower(); TQString toolbarId = s; TQRegExp rx("\\s|\\."); - toolbarId.replace(rx, "_"); + toolbarId.tqreplace(rx, "_"); int n = 1; - while (m_toolbarList.find(toolbarId) != 0L) + while (m_toolbarList.tqfind(toolbarId) != 0L) { - toolbarId = s + TQString("%1").arg(n); - toolbarId.replace(rx, "_"); + toolbarId = s + TQString("%1").tqarg(n); + toolbarId.tqreplace(rx, "_"); n++; } @@ -2250,7 +2250,7 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url) //Compatility code (read the action shortcuts from quantaui.rc) //TODO: Remove after upgrade from 3.1 is not supported - if (oldShortcuts.contains(actionName)) + if (oldShortcuts.tqcontains(actionName)) { tagAction->setModified(true); tagAction->data().setAttribute("shortcut", oldShortcuts[actionName]); @@ -2438,7 +2438,7 @@ KURL QuantaApp::saveToolbarToFile(const TQString& toolbarName, const KURL& destF TQString error; int el, ec; if (!dom->setContent(s, &error, &el, &ec)) - kdError(24000) << TQString("Error %1 at (%2, %3)").arg(error).arg(el).arg(ec)<<endl; + kdError(24000) << TQString("Error %1 at (%2, %3)").tqarg(error).tqarg(el).tqarg(ec)<<endl; p_toolbar->dom = dom; TQTextStream bufferStr(&buffer); @@ -2458,10 +2458,10 @@ KURL QuantaApp::saveToolbarToFile(const TQString& toolbarName, const KURL& destF if (!tar.writeFile(TQFileInfo(tarFile.path()).baseName()+".actions", "user", "group", buffer2.buffer().size(), buffer2.buffer().data())) return KURL(); tar.close(); - if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), tarFile, -1, true, false, this)) + if (!TQExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), tarFile, -1, true, false, this)) { KMessageBox::error(this, i18n("<qt>An error happened while saving the <b>%1</b> toolbar.<br>" - "Check that you have write permissions for<br><b>%2</b>.<br><br>This might happen if you tried save to save a global toolbar as a simple user. Use <i>Save As</i> or <i>Toolbars->Save Toolbars->Save as Local Toolbar</i> in this case. </qt>").arg(p_toolbar->name).arg(tarFile.prettyURL(0, KURL::StripFileProtocol)), i18n("Toolbar Saving Error")); + "Check that you have write permissions for<br><b>%2</b>.<br><br>This might happen if you tried save to save a global toolbar as a simple user. Use <i>Save As</i> or <i>Toolbars->Save Toolbars->Save as Local Toolbar</i> in this case. </qt>").tqarg(p_toolbar->name).tqarg(tarFile.prettyURL(0, KURL::StripFileProtocol)), i18n("Toolbar Saving Error")); tarFile = KURL(); delete p_toolbar->dom; p_toolbar->dom = oldDom; @@ -2554,7 +2554,7 @@ bool QuantaApp::saveToolbar(bool localToolbar, const TQString& toolbarToSave, co if (!localToolbar) localToolbarsDir = projectToolbarsURL.prettyURL(); KMessageBox::sorry(0,i18n("<qt>You must save the toolbars to the following folder: <br><br><b>%1</b></qt>") - .arg(localToolbarsDir)); + .tqarg(localToolbarsDir)); query = KMessageBox::No; } } while (query != KMessageBox::Yes); @@ -2591,16 +2591,16 @@ void QuantaApp::slotSaveProjectToolbar() void QuantaApp::slotAddToolbar() { bool ok; - TQString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").arg(userToolbarsCount), &ok, this); + TQString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").tqarg(userToolbarsCount), &ok, this); if (ok) { userToolbarsCount++; TQString toolbarId = name; int n = 1; - while (m_toolbarList.find(toolbarId) != 0L) + while (m_toolbarList.tqfind(toolbarId) != 0L) { - toolbarId = name + TQString("%1").arg(n); + toolbarId = name + TQString("%1").tqarg(n); n++; } toolbarId = toolbarId.lower(); @@ -2609,7 +2609,7 @@ void QuantaApp::slotAddToolbar() tempFile->setAutoDelete(true); tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8); * (tempFile->textStream()) << TQString("<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n<ToolBar name=\"%1\" tabname=\"%2\" i18ntabname=\"%3\" id=\"%4\">\n<text>%5</text>\n</ToolBar>\n</kpartgui>\n") - .arg(name.lower()).arg(name).arg(name).arg(toolbarId).arg(name); + .tqarg(name.lower()).tqarg(name).tqarg(name).tqarg(toolbarId).tqarg(name); tempFile->close(); ToolbarXMLGUI * toolbarGUI = new ToolbarXMLGUI(tempFile->name()); @@ -2700,7 +2700,7 @@ TQString QuantaApp::createToolbarTarball() i18n( "Please select a toolbar:" ), lst, current, false, &ok, this ); if (!ok) - return TQString::null; + return TQString(); TQString toolbarName = res; for (uint i = 0; i < lst.count(); i++) @@ -2759,7 +2759,7 @@ void QuantaApp::slotSendToolbar() return; } - kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, toolbarFile); + kapp->invokeMailer(toStr, TQString(), TQString(), subjectStr, message, TQString(), toolbarFile); } delete mailDlg; } @@ -2767,7 +2767,7 @@ void QuantaApp::slotSendToolbar() void QuantaApp::slotDownloadToolbar() { if (!m_newToolbarStuff) - m_newToolbarStuff = new QNewToolbarStuff("quanta/toolbar", this); + m_newToolbarStuff = new TQNewToolbarStuff("quanta/toolbar", this); m_newToolbarStuff->downloadResource(); } @@ -2777,7 +2777,7 @@ void QuantaApp::slotUploadToolbar() if (tempFileName.isNull()) return; if (!m_newToolbarStuff) - m_newToolbarStuff = new QNewToolbarStuff("quanta/toolbar", this); + m_newToolbarStuff = new TQNewToolbarStuff("quanta/toolbar", this); // tempDirList.append(m_newToolbarStuff->uploadResource(tempFileName)); m_newToolbarStuff->uploadResource(tempFileName); } @@ -2846,7 +2846,7 @@ void QuantaApp::slotRenameToolbar(const TQString& name) { if (tb->id(i) == name) { - tb->setTabLabel(tb->page(i)->parentWidget(), i18n(p_toolbar->name.utf8())); + tb->setTabLabel(tb->page(i)->tqparentWidget(), i18n(p_toolbar->name.utf8())); m_tagsMenu->changeItem(m_tagsMenu->idAt(i + 2), i18n(p_toolbar->name.utf8())); break; } @@ -2920,7 +2920,7 @@ void QuantaApp::slotDeleteAction(KAction *action) //we found a toolbar that contains the action if (nodeList.item(j).toElement().attribute("name") == actionName) { - nodeList.item(j).parentNode().removeChild(nodeList.item(j)); + nodeList.item(j).tqparentNode().removeChild(nodeList.item(j)); KXMLGUIFactory::saveConfigFile(guiClient->domDocument(), guiClient->xmlFile()); break; } @@ -2936,7 +2936,7 @@ void QuantaApp::slotRemoveAction(const TQString& toolbarName, const TQString& a_ { KAction *action = 0L; TQString actionName = a_actionName; - actionName.replace('&',"&&"); + actionName.tqreplace('&',"&&"); KActionCollection *ac = actionCollection(); uint actionCount = ac->count(); TQString str; @@ -2976,7 +2976,7 @@ void QuantaApp::slotRemoveAction(const TQString& toolbarName, const TQString& a_ { action->unplug(ToolbarTabWidget::ref()->page(toolbarName)); action->unplug(p_toolbar->menu); - node.parentNode().removeChild(node); + node.tqparentNode().removeChild(node); } node = node.nextSibling(); } @@ -3014,10 +3014,10 @@ void QuantaApp::setDtep(const TQString& dtepName, bool convert) if (w) { TQString dtep = DTDs::ref()->getDTDNameFromNickName(dtepName); - if (!DTDs::ref()->find(dtep)) + if (!DTDs::ref()->tqfind(dtep)) return; w->setDTDIdentifier(dtep); - const DTDStruct *dtd = DTDs::ref()->find(w->getDTDIdentifier()); + const DTDStruct *dtd = DTDs::ref()->tqfind(w->getDTDIdentifier()); if (convert && dtd->family == Xml) { Tag *tag = 0L; @@ -3096,7 +3096,7 @@ void QuantaApp::slotEditDTD() bool ok = false; TQString res = KInputDialog::getItem( i18n( "Edit DTD" ), - i18n( "Please select a DTD:" ), lst, lst.findIndex(nickName), false, &ok, this ); + i18n( "Please select a DTD:" ), lst, lst.tqfindIndex(nickName), false, &ok, this ); TQString s = i18n("Create a new DTEP description"); s = i18n("Load DTEP description from disk"); @@ -3106,7 +3106,7 @@ void QuantaApp::slotEditDTD() TQString dtdName = DTDs::ref()->getDTDNameFromNickName(res); KDialogBase editDlg(this, "edit_dtep", true, i18n("Configure DTEP"), KDialogBase::Ok | KDialogBase::Cancel); - DTEPEditDlg dtepDlg(DTDs::ref()->find(dtdName)->fileName, &editDlg); + DTEPEditDlg dtepDlg(DTDs::ref()->tqfind(dtdName)->fileName, &editDlg); editDlg.setMainWidget(&dtepDlg); if (editDlg.exec()) { @@ -3122,7 +3122,7 @@ void QuantaApp::focusInEvent(TQFocusEvent* e) if (w) { w->view()->setFocus(); - w->checkDirtyStatus(); + w->checkDirtytqStatus(); } } @@ -3166,17 +3166,17 @@ void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName) if (!currentToolbarDTD.isEmpty()) { - oldDtd = DTDs::ref()->find(currentToolbarDTD); + oldDtd = DTDs::ref()->tqfind(currentToolbarDTD); if (!oldDtd) - oldDtd = DTDs::ref()->find(Project::ref()->defaultDTD()); + oldDtd = DTDs::ref()->tqfind(Project::ref()->defaultDTD()); } TQString fileName; - const DTDStruct *newDtd = DTDs::ref()->find(dtdName); + const DTDStruct *newDtd = DTDs::ref()->tqfind(dtdName); if (!newDtd) { - newDtd = DTDs::ref()->find(Project::ref()->defaultDTD()); + newDtd = DTDs::ref()->tqfind(Project::ref()->defaultDTD()); if (!newDtd) - newDtd = DTDs::ref()->find(qConfig.defaultDocType); //extreme case + newDtd = DTDs::ref()->tqfind(qConfig.defaultDocType); //extreme case } ToolbarEntry *p_toolbar; @@ -3200,7 +3200,7 @@ void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName) //first load the local version if it exists fileName = locateLocal("data", resourceDir + "toolbars/"+newDtd->toolbars[i]); QuantaCommon::setUrl(url, fileName); - if (QExtFileInfo::exists(url, true, this)) + if (TQExtFileInfo::exists(url, true, this)) { //showToolbarFile(url); newToolbars += url; @@ -3208,7 +3208,7 @@ void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName) { fileName = qConfig.globalDataDir + resourceDir + "toolbars/"+newDtd->toolbars[i]; QuantaCommon::setUrl(url, fileName); - if (QExtFileInfo::exists(url, true, this)) + if (TQExtFileInfo::exists(url, true, this)) { newToolbars += url;// showToolbarFile(url); } @@ -3225,7 +3225,7 @@ void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName) KURL urlLocal; fileName = locateLocal("data", resourceDir + "toolbars/"+oldDtd->toolbars[i]); QuantaCommon::setUrl(urlLocal, fileName); - if (newToolbars.contains(url) == 0) + if (newToolbars.tqcontains(url) == 0) { TQDictIterator<ToolbarEntry> iter(m_toolbarList); for( ; iter.current(); ++iter ) @@ -3309,8 +3309,8 @@ bool QuantaApp::slotRemoveToolbar(const TQString& a_name) name1.remove(" tab"); TQString name2 = name1; name2.remove(TQRegExp("[\\s]\\([0-9]+\\)")); - s2.replace(name1, name2); - s2.replace(name1.lower(), name2.lower()); + s2.tqreplace(name1, name2); + s2.tqreplace(name1.lower(), name2.lower()); } bool useToolbarGUI = true; if ( s1 != s2 /*|| actionsModified */) @@ -3318,12 +3318,12 @@ bool QuantaApp::slotRemoveToolbar(const TQString& a_name) int result; if (p_toolbar->url.isEmpty()) { - result = KMessageBox::warningYesNoCancel(this, i18n("<qt>Toolbar <b>%1</b> is new and unsaved. Do you want to save it before it is removed?</qt>").arg(p_toolbar->name), + result = KMessageBox::warningYesNoCancel(this, i18n("<qt>Toolbar <b>%1</b> is new and unsaved. Do you want to save it before it is removed?</qt>").tqarg(p_toolbar->name), i18n("Save Toolbar"), KStdGuiItem::save(), KStdGuiItem::discard()); } else { FourButtonMessageBox dlg(this, 0, true); - dlg.textLabel->setText(i18n("<qt>The toolbar <b>%1</b> was modified. Do you want to save it before it is removed?</qt>").arg(p_toolbar->name)); + dlg.textLabel->setText(i18n("<qt>The toolbar <b>%1</b> was modified. Do you want to save it before it is removed?</qt>").tqarg(p_toolbar->name)); dlg.setCaption(i18n("Save Toolbar")); dlg.pixmapLabel->setPixmap(BarIcon("messagebox_info", KIcon::SizeMedium)); dlg.exec(); @@ -3461,7 +3461,7 @@ void QuantaApp::slotBuildPrjToolbarsMenu() if (Project::ref()->hasProject()) { buildInProgress = true; - toolbarList = QExtFileInfo::allFiles(Project::ref()->toolbarURL(), "*"+toolbarExtension, this); + toolbarList = TQExtFileInfo::allFiles(Project::ref()->toolbarURL(), "*"+toolbarExtension, this); buildInProgress = false; projectToolbarFiles->setMaxItems(toolbarList.count()); for (uint i = 0; i < toolbarList.count(); i++) @@ -3542,7 +3542,7 @@ bool QuantaApp::allToolbarsHidden() const void QuantaApp::slotLoadDTEP() { - TQString dirName = KFileDialog::getExistingDirectory(TQString::null, 0, i18n("Select DTEP Directory")); + TQString dirName = KFileDialog::getExistingDirectory(TQString(), 0, i18n("Select DTEP Directory")); if (!dirName.isEmpty()) { DTDs::ref()->slotLoadDTEP(dirName, true); @@ -3559,10 +3559,10 @@ TQString QuantaApp::createDTEPTarball() bool ok = false; TQString res = KInputDialog::getItem( i18n( "Send DTD" ), - i18n( "Please select a DTD:" ), lst, lst.findIndex(nickName), false, &ok, this ); + i18n( "Please select a DTD:" ), lst, lst.tqfindIndex(nickName), false, &ok, this ); if (!ok) - return TQString::null; + return TQString(); TQString dtdName = DTDs::ref()->getDTDNameFromNickName(res); @@ -3570,17 +3570,17 @@ TQString QuantaApp::createDTEPTarball() KTempDir* tempDir = new KTempDir(tmpDir); tempDir->setAutoDelete(true); tempDirList.append(tempDir); - TQString tempFileName=tempDir->name() +"/"+ DTDs::ref()->getDTDNickNameFromName(dtdName).replace(TQRegExp("\\s|\\."), "_") + ".tgz"; + TQString tempFileName=tempDir->name() +"/"+ DTDs::ref()->getDTDNickNameFromName(dtdName).tqreplace(TQRegExp("\\s|\\."), "_") + ".tgz"; //pack the .tag files and the description.rc into a .tgz file KTar tar(tempFileName, "application/x-gzip"); tar.open(IO_WriteOnly); KURL dirURL; - dirURL.setPath(DTDs::ref()->find(dtdName)->fileName); + dirURL.setPath(DTDs::ref()->tqfind(dtdName)->fileName); dirURL.setPath(dirURL.directory(false)); - KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*", this); + KURL::List files = TQExtFileInfo::allFilesRelative(dirURL, "*", this); for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f ) { TQString name = (*it_f).fileName(); @@ -3595,7 +3595,7 @@ TQString QuantaApp::createDTEPTarball() tar.close(); return tempFileName; } - return TQString::null; + return TQString(); } void QuantaApp::slotEmailDTEP() @@ -3634,7 +3634,7 @@ void QuantaApp::slotEmailDTEP() return; } - kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, dtdFile); + kapp->invokeMailer(toStr, TQString(), TQString(), subjectStr, message, TQString(), dtdFile); } delete mailDlg; } @@ -3643,7 +3643,7 @@ void QuantaApp::slotEmailDTEP() void QuantaApp::slotDownloadDTEP() { if (!m_newDTEPStuff) - m_newDTEPStuff = new QNewDTEPStuff("quanta/dtep", this); + m_newDTEPStuff = new TQNewDTEPStuff("quanta/dtep", this); m_newDTEPStuff->downloadResource(); } @@ -3653,7 +3653,7 @@ void QuantaApp::slotUploadDTEP() if (tempFileName.isNull()) return; if (!m_newDTEPStuff) - m_newDTEPStuff = new QNewDTEPStuff("quanta/dtep", this); + m_newDTEPStuff = new TQNewDTEPStuff("quanta/dtep", this); // tempDirList.append(m_newDTEPStuff->uploadResource(tempFileName)); m_newDTEPStuff->uploadResource(tempFileName); } @@ -3664,7 +3664,7 @@ void QuantaApp::slotSmartTagInsertion() if(!action) return; if(!ViewManager::ref()->activeDocument() || !ViewManager::ref()->activeView() || - ViewManager::ref()->activeDocument()->defaultDTD()->name.contains("HTML", false) == 0) + ViewManager::ref()->activeDocument()->defaultDTD()->name.tqcontains("HTML", false) == 0) { KMessageBox::error(this, "Smart Tag Insertion is available only for (X)HTML for the moment."); qConfig.smartTagInsertion = false; @@ -3677,14 +3677,14 @@ void QuantaApp::slotSmartTagInsertion() void QuantaApp::slotDownloadTemplate() { if (!m_newTemplateStuff) - m_newTemplateStuff = new QNewTemplateStuff("quanta/template", this); + m_newTemplateStuff = new TQNewTemplateStuff("quanta/template", this); m_newTemplateStuff->downloadResource(); } void QuantaApp::slotUploadTemplate(const TQString &fileName) { if (!m_newTemplateStuff) - m_newTemplateStuff = new QNewTemplateStuff("quanta/template", this); + m_newTemplateStuff = new TQNewTemplateStuff("quanta/template", this); // tempDirList.append(m_newTemplateStuff->uploadResource(fileName)); m_newTemplateStuff->uploadResource(fileName); } @@ -3692,14 +3692,14 @@ void QuantaApp::slotUploadTemplate(const TQString &fileName) void QuantaApp::slotDownloadScript() { if (!m_newScriptStuff) - m_newScriptStuff = new QNewScriptStuff("quanta/script", this); + m_newScriptStuff = new TQNewScriptStuff("quanta/script", this); m_newScriptStuff->downloadResource(); } void QuantaApp::slotUploadScript(const TQString &fileName) { if (!m_newScriptStuff) - m_newScriptStuff = new QNewScriptStuff("quanta/script", this); + m_newScriptStuff = new TQNewScriptStuff("quanta/script", this); // tempDirList.append(m_newScriptStuff->uploadResource(fileName)); m_newScriptStuff->uploadResource(fileName); } @@ -3708,7 +3708,7 @@ void QuantaApp::slotDownloadDoc() { if (!m_newDocStuff) { - m_newDocStuff = new QNewDocStuff("quanta/documentation", this); + m_newDocStuff = new TQNewDocStuff("quanta/documentation", this); connect(m_newDocStuff, TQT_SIGNAL(installFinished()), dTab, TQT_SLOT(slotRefreshTree())); } m_newDocStuff->downloadResource(); @@ -3736,7 +3736,7 @@ void QuantaApp::documentProperties(bool forceInsertionOfMinimalTree) Document *w = ViewManager::ref()->activeDocument(); if (w) { - if (w->defaultDTD()->name.contains("HTML", false) == 0) + if (w->defaultDTD()->name.tqcontains("HTML", false) == 0) { KMessageBox::information(this, i18n("The Document Properties Dialog is only for HTML and XHTML.")); return; @@ -3784,7 +3784,7 @@ TQStringList QuantaApp::openedURLs() const Document *w = qView->document(); if ( w ) { - list.prepend( TQString("%1:%2").arg(w->editIf->editInterfaceNumber()).arg(w->url().url())); + list.prepend( TQString("%1:%2").tqarg(w->editIf->editInterfaceNumber()).tqarg(w->url().url())); } } } @@ -3808,7 +3808,7 @@ void QuantaApp::slotExpandAbbreviation() { bool found = false; Abbreviation abbrev = it.data(); - if (abbrev.dteps.contains(dtd->name)) + if (abbrev.dteps.tqcontains(dtd->name)) { TQMap<TQString, TQString>::ConstIterator it2; for (it2 = abbrev.abbreviations.constBegin(); it2 != abbrev.abbreviations.constEnd(); ++it2) @@ -3830,20 +3830,20 @@ void QuantaApp::slotExpandAbbreviation() w->editIf->removeText(line, col - text.length() + 1, line, col); w->activateParser(true); col -= (text.length() - 1); - int pos = textToInsert.find('|'); + int pos = textToInsert.tqfind('|'); if (pos != -1) { text = textToInsert.left(pos); - if (text.contains('\n')) + if (text.tqcontains('\n')) { - line += text.contains('\n'); - col = text.length() - text.findRev('\n') - 1; + line += text.tqcontains('\n'); + col = text.length() - text.tqfindRev('\n') - 1; } else { col += pos; } } - textToInsert.replace('|',""); + textToInsert.tqreplace('|',""); w->insertText(textToInsert, false); w->viewCursorIf->setCursorPositionReal(line, col); } @@ -3957,7 +3957,7 @@ void QuantaApp::slotAutosaveTimer() void QuantaApp::slotGetScriptOutput(KProcess* ,char* buf,int buflen) { TQCString tmp( buf, buflen + 1 ); - m_scriptOutput = TQString::null; + m_scriptOutput = TQString(); m_scriptOutput = TQString::fromLocal8Bit(tmp).remove(" "); } @@ -3980,7 +3980,7 @@ void QuantaApp::slotProcessTimeout() { if (m_loopStarted) { - qApp->exit_loop(); + tqApp->exit_loop(); m_loopStarted = false; } } @@ -4040,7 +4040,7 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly) } Tag *commentTag = n->tag; TQString text = commentTag->tagStr(); - int pos = text.find("@annotation"); + int pos = text.tqfind("@annotation"); if (pos != -1) { pos += 11; @@ -4048,7 +4048,7 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly) if (text[pos] == '(') { int p = pos; - pos = text.find(')'); + pos = text.tqfind(')'); if (pos != -1) { receiver = text.mid(p + 1, pos - p - 1); @@ -4062,7 +4062,7 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly) n->next->tag->beginPos(l, c); else n->tag->endPos(l, c); - commentTag->write()->addAnnotation(l, qMakePair(text, receiver)); + commentTag->write()->addAnnotation(l, tqMakePair(text, receiver)); } } node = node->nextSibling(); @@ -4074,7 +4074,7 @@ TQString QuantaApp::saveCurrentFile() { Document *w = ViewManager::ref()->activeDocument(); if (!w) - return TQString::null; + return TQString(); if (w->isModified()) { if ( KMessageBox::questionYesNo(this, @@ -4094,7 +4094,7 @@ TQString QuantaApp::saveCurrentFile() } } else { - return TQString::null; + return TQString(); } } KURL url = Project::ref()->urlWithPrefix(w->url()); @@ -4160,7 +4160,7 @@ bool QuantaApp::queryClose() { saveOptions(); // kdDebug(24000) << "Quanta will exit" << endl; - emit eventHappened("quanta_exit", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString::null); + emit eventHappened("quanta_exit", TQDateTime::tqcurrentDateTime().toString(Qt::ISODate), TQString()); } else slotFileNew(); return canExit; @@ -4200,7 +4200,7 @@ void QuantaApp::saveOptions() m_config->writeEntry("Smart Tag Insertion", qConfig.smartTagInsertion); - m_config->writeEntry("Window layout", qConfig.windowLayout); + m_config->writeEntry("Window tqlayout", qConfig.windowLayout); m_config->writeEntry("Follow Cursor", StructTreeView::ref()->followCursor() ); //If user choose the timer interval, it needs to restart the timer too m_config->writeEntry("Autosave interval", qConfig.autosaveInterval); @@ -4297,10 +4297,10 @@ void QuantaApp::slotEditCurrentTag() if (dtd->family == Xml) { TQString currentLine = w->editIf->textLine(line); - int sPos = currentLine.findRev('<', col); + int sPos = currentLine.tqfindRev('<', col); if (sPos != -1) { - int ePos = currentLine.find('>', col); + int ePos = currentLine.tqfind('>', col); if (ePos != -1) { AreaStruct area(line, sPos, line, ePos); @@ -4327,7 +4327,7 @@ void QuantaApp::slotEditCurrentTag() slotEnableIdleTimer(true); if (isUnknown) { - TQString message = i18n("Unknown tag: %1").arg(tagName); + TQString message = i18n("Unknown tag: %1").tqarg(tagName); slotStatusMsg( message ); } } @@ -4442,21 +4442,21 @@ void QuantaApp::slotInsertCSS() if (styleNode->tag->type == Tag::XmlTagEnd && styleNode->prev) styleNode = styleNode->prev; - while (styleNode && styleNode->parent && styleNode->tag->name.lower() != "style" && styleNode->tag->dtd()->name == "text/css") - styleNode = styleNode->parent; + while (styleNode && styleNode->tqparent && styleNode->tag->name.lower() != "style" && styleNode->tag->dtd()->name == "text/css") + styleNode = styleNode->tqparent; - Node *parentNode = node; - if (parentNode->tag->type == Tag::XmlTagEnd && parentNode->prev) - parentNode = parentNode->prev; + Node *tqparentNode = node; + if (tqparentNode->tag->type == Tag::XmlTagEnd && tqparentNode->prev) + tqparentNode = tqparentNode->prev; else - while (parentNode && parentNode->parent && - parentNode->tag->type != Tag::XmlTag) - parentNode = parentNode->parent; + while (tqparentNode && tqparentNode->tqparent && + tqparentNode->tag->type != Tag::XmlTag) + tqparentNode = tqparentNode->tqparent; TQString fullDocument = w->editIf->text().stripWhiteSpace(); - if (styleNode->tag->name.lower() == "comment block" && styleNode->parent) { - if (styleNode->parent->tag->name.lower() == "style") { - styleNode = styleNode->parent; + if (styleNode->tag->name.lower() == "comment block" && styleNode->tqparent) { + if (styleNode->tqparent->tag->name.lower() == "style") { + styleNode = styleNode->tqparent; } } @@ -4469,7 +4469,7 @@ void QuantaApp::slotInsertCSS() styleNode->next->tag->beginPos(eLine, eCol); TQString styleTagContent(w->text(bLine, bCol+1, eLine, eCol-1).remove("<!--").remove("-->"));// <style></style> block content - kdDebug(24000) << "Style tag contains: " << endl << styleTagContent << endl; + kdDebug(24000) << "Style tag tqcontains: " << endl << styleTagContent << endl; CSSSelector *dlg = new CSSSelector; dlg->setCallingFrom("XHTML"); @@ -4513,29 +4513,29 @@ void QuantaApp::slotInsertCSS() } delete dlg; } else - if (parentNode && parentNode->tag->type == Tag::XmlTag) + if (tqparentNode && tqparentNode->tag->type == Tag::XmlTag) { - kdDebug(24000) << "[CSS editor] We will add a style attribute to: " << parentNode->tag->name << endl; + kdDebug(24000) << "[CSS editor] We will add a style attribute to: " << tqparentNode->tag->name << endl; CSSEditor *dlg = new CSSEditor(this); TQFileInfo fi(ViewManager::ref()->currentURL()); dlg->setFileToPreview(projectBaseURL().path() + fi.baseName(),false); - parentNode->tag->beginPos(bLine, bCol); - parentNode->tag->endPos(eLine, eCol); + tqparentNode->tag->beginPos(bLine, bCol); + tqparentNode->tag->endPos(eLine, eCol); dlg->setFooter(">" + w->text(eLine, eCol + 1, lastLine, lastCol)); TQString temp; - if (parentNode->tag->hasAttribute("style")) + if (tqparentNode->tag->hasAttribute("style")) { - dlg->setInlineStyleContent(parentNode->tag->attributeValue("style")); - Tag tempTag(*(parentNode->tag)); + dlg->setInlineStyleContent(tqparentNode->tag->attributeValue("style")); + Tag tempTag(*(tqparentNode->tag)); tempTag.deleteAttribute("style"); temp = tempTag.toString(); } else { - dlg->setInlineStyleContent(TQString::null); - temp = parentNode->tag->toString(); + dlg->setInlineStyleContent(TQString()); + temp = tqparentNode->tag->toString(); } //using TQString::mid sometimes generates strange results; maybe this is due to a (random) blank in temp temp = temp.left(temp.length()-1);//remove > @@ -4545,7 +4545,7 @@ void QuantaApp::slotInsertCSS() dlg->initialize(); if( dlg->exec() ) { - w->changeTagAttribute(parentNode->tag, "style", dlg->generateProperties()); + w->changeTagAttribute(tqparentNode->tag, "style", dlg->generateProperties()); } delete dlg; } else @@ -4786,7 +4786,7 @@ void QuantaApp::slotViewInKFM() } if ( !w->isUntitled() ) { - KProcess *show = new KProcess(this); + KProcess *show = new KProcess(TQT_TQOBJECT(this)); KURL url = Project::ref()->urlWithPrefix(w->url()); *show << "kfmclient" << "newTab" << url.url(); show->start( KProcess::DontCare ); @@ -4820,7 +4820,7 @@ void QuantaApp::slotViewInLynx() } if ( !w->isUntitled() ) { - KProcess *show = new KProcess(this); + KProcess *show = new KProcess(TQT_TQOBJECT(this)); KURL url = Project::ref()->urlWithPrefix(w->url()); *show << "konsole" << "--nohist" @@ -4840,15 +4840,15 @@ void QuantaApp::slotPasteHTMLQuoted() Document *w = ViewManager::ref()->activeDocument(); if (w) { - QClipboard *cb = qApp->clipboard(); + TQClipboard *cb = tqApp->tqclipboard(); TQString text = cb->text(); if ( ( !text.isNull() ) && (!text.isEmpty() ) ) { - text.replace( "&", "&" ); - text.replace( "<", "<" ); - text.replace( "\"", """ ); - text.replace( ">", ">" ); + text.tqreplace( "&", "&" ); + text.tqreplace( "<", "<" ); + text.tqreplace( "\"", """ ); + text.tqreplace( ">", ">" ); //TODO: Replace only the chars not present in the current encoding. TQString encoding = defaultEncoding(); @@ -4860,16 +4860,16 @@ void QuantaApp::slotPasteHTMLQuoted() for ( TQStringList::Iterator it = charList.begin(); it != charList.end(); ++it ) { TQString s = *it; - int begin = s.find("(&#") + 3; + int begin = s.tqfind("(&#") + 3; if (begin == 1) continue; - int length = s.find(";)") - begin + 1; + int length = s.tqfind(";)") - begin + 1; s = s.mid(begin, length - 1); bool ok; int code = s.toInt(&ok); if (!ok || code < 191) continue; - text.replace(TQChar(code), TQString("&#%1;").arg(s)); + text.tqreplace(TQChar(code), TQString("&#%1;").tqarg(s)); } } unsigned int line, col; @@ -4885,7 +4885,7 @@ void QuantaApp::slotPasteURLEncoded() Document *w = ViewManager::ref()->activeDocument(); if (w) { - QClipboard *cb = qApp->clipboard(); + TQClipboard *cb = tqApp->tqclipboard(); TQString text = cb->text(); if ( ( !text.isNull() ) && (!text.isEmpty() ) ) @@ -4907,7 +4907,7 @@ void QuantaApp::slotUndo () if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus && w) { /**MessageBox::information(this, i18n("VPL does not support this functionality yet."), - TQString::null, "show undo unavailable");*/ + TQString(), "show undo unavailable");*/ w->docUndoRedo->undo(); return; } @@ -4932,7 +4932,7 @@ void QuantaApp::slotRedo () if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus) { /**KMessageBox::information(this, i18n("VPL does not support this functionality yet."), - TQString::null, "show redo unavailable");*/ + TQString(), "show redo unavailable");*/ w->docUndoRedo->redo(); return; } @@ -4971,7 +4971,7 @@ void QuantaApp::slotCut() { /* KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."), - TQString::null, "show cut unavailable"); + TQString(), "show cut unavailable"); */ KafkaDocument::ref()->slotCut(); return; @@ -4991,7 +4991,7 @@ void QuantaApp::slotCopy() if(view && view->hadLastFocus() == QuantaView::VPLFocus) { //KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."), - //TQString::null, "show copy unavailable"); + //TQString(), "show copy unavailable"); KafkaDocument::ref()->slotCopy(); return; } @@ -5004,15 +5004,15 @@ void QuantaApp::slotCopy() if (m_htmlPart->view()->hasFocus()) { TQString selection = m_htmlPart->selectedText(); - QClipboard *cb = TQApplication::clipboard(); - cb->setText(selection, QClipboard::Clipboard); + TQClipboard *cb = TQApplication::tqclipboard(); + cb->setText(selection, TQClipboard::Clipboard); } else if (m_htmlPartDoc->view()->hasFocus()) { TQString selection = m_htmlPartDoc->selectedText(); - QClipboard *cb = TQApplication::clipboard(); - cb->setText(selection, QClipboard::Clipboard); + TQClipboard *cb = TQApplication::tqclipboard(); + cb->setText(selection, TQClipboard::Clipboard); } } @@ -5024,7 +5024,7 @@ void QuantaApp::slotPaste() if(view && view->hadLastFocus() == QuantaView::VPLFocus) { //KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."), - //TQString::null, "show paste unavailable"); + //TQString(), "show paste unavailable"); KafkaDocument::ref()->slotPaste(); return; } @@ -5120,9 +5120,9 @@ void QuantaApp::slotFileClosed(Document *w) if (w) { KURL url = w->url(); - if (Project::ref()->hasProject() && Project::ref()->contains(url)) + if (Project::ref()->hasProject() && Project::ref()->tqcontains(url)) { - KURL u = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()); + KURL u = TQExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()); m_annotationOutput->writeAnnotations(QuantaCommon::qUrl(u), w->annotations()); } } @@ -5134,9 +5134,9 @@ void QuantaApp::slotCVSCommandExecuted(const TQString& command, const TQStringLi for (uint i = 0; i < files.count(); i++) { file = files[i]; - if (Project::ref()->contains(KURL::fromPathOrURL(file))) + if (Project::ref()->tqcontains(KURL::fromPathOrURL(file))) { - emit eventHappened("after_" + command, file, TQString::null); + emit eventHappened("after_" + command, file, TQString()); } } } diff --git a/quanta/src/quanta.h b/quanta/src/quanta.h index e55c8814..b10d6480 100644 --- a/quanta/src/quanta.h +++ b/quanta/src/quanta.h @@ -30,7 +30,7 @@ #define IDS_DEFAULT "Ready." -// include files for Qt +// include files for TQt #include <tqmap.h> #include <tqdict.h> #include <tqvaluelist.h> @@ -56,11 +56,11 @@ class QuantaPluginInterface; class QuantaDoc; class QuantaView; -class QNewDTEPStuff; -class QNewToolbarStuff; -class QNewTemplateStuff; -class QNewScriptStuff; -class QNewDocStuff; +class TQNewDTEPStuff; +class TQNewToolbarStuff; +class TQNewTemplateStuff; +class TQNewScriptStuff; +class TQNewDocStuff; class TQTabWidget; class TQWidgetStack; @@ -112,6 +112,7 @@ struct ToolbarEntry; class QuantaApp : public KMdiMainFrm, public DCOPWindowManagerIf { Q_OBJECT + TQ_OBJECT friend class QuantaInit; @@ -131,8 +132,8 @@ public: DebuggerManager *debugger() const {return m_debugger;} KParts::PartManager *partManager() {return m_partManager;} - TQWidget* createContainer(TQWidget *parent, int index, const TQDomElement &element, int &id ); - void removeContainer(TQWidget *container, TQWidget *parent, TQDomElement &element, int id ); + TQWidget* createContainer(TQWidget *tqparent, int index, const TQDomElement &element, int &id ); + void removeContainer(TQWidget *container, TQWidget *tqparent, TQDomElement &element, int id ); /** Returns the project's base URL if it exists, the HOME dir if there is no project and no opened document (or the current opened document was not saved yet), and the base URL of the opened document, if it is saved somewhere. maps to the same function in Project*/ @@ -193,7 +194,7 @@ public: * @param attr The string containing the attrs of the new Node to create. * @return Returns a new Node created according to the contents of the TagDialog. */ - Node *showTagDialogAndReturnNode(const TQString &tag, const TQString &attr = TQString::null); + Node *showTagDialogAndReturnNode(const TQString &tag, const TQString &attr = TQString()); /** Returns the baseURL of the document. */ KURL baseURL(); @@ -281,15 +282,15 @@ public slots: unexpected things may happen. */ void slotStatusMsg(const TQString &text); - void slotNewStatus(); + void slotNewtqStatus(); void slotNewLineColumn(); -// void slotUpdateStatus(TQWidget*);FIXME: +// void slotUpdatetqStatus(TQWidget*);FIXME: - /** repaint preview */ + /** tqrepaint preview */ void slotRepaintPreview(); /** toggles showing the preview */ void slotToggleShowPreview(); - /** Shows the preview widget and repaints the preview or + /** Shows the preview widget and tqrepaints the preview or hides the preview widget and restores the original document */ void slotShowPreviewWidget(bool show); @@ -297,7 +298,7 @@ public slots: - hide if the preview was in the editor area - update if the preview is in a toolview */ - void slotChangePreviewStatus(); + void slotChangePreviewtqStatus(); /** Called when the preview widget got or lost the focus */ void slotPreviewHasFocus(bool focus); @@ -315,7 +316,7 @@ public slots: void slotOptionsConfigureToolbars(); void slotNewToolbarConfig(); /** Configure toolbars, show defaultToolbar by default */ - void slotConfigureToolbars(const TQString& defaultToolbar = TQString::null); + void slotConfigureToolbars(const TQString& defaultToolbar = TQString()); void slotOptionsConfigureActions(); void setCursorPosition(int row, int col ); @@ -523,12 +524,12 @@ protected slots: protected: /** Create a DTEP tarball which can be uploaded or sent in email. Returns - * the name of the created file or TQString::null if creation has failed. + * the name of the created file or TQString() if creation has failed. */ TQString createDTEPTarball(); /** Create a toolbar tarball which can be uploaded or sent in email. Returns - * the name of the created file or TQString::null if creation has failed. + * the name of the created file or TQString() if creation has failed. */ TQString createToolbarTarball(); @@ -543,7 +544,7 @@ protected: virtual bool queryClose(); void saveAsTemplate (bool projectTemplate, bool selectionOnly = false); /** Saves a toolbar as local or project specific. */ - bool saveToolbar(bool localToolbar = true, const TQString& toolbarToSave = TQString::null, const KURL& destURL = KURL()); + bool saveToolbar(bool localToolbar = true, const TQString& toolbarToSave = TQString(), const KURL& destURL = KURL()); /** Saves the toolbar and the actions. Returns the name of the actions file*/ KURL saveToolbarToFile(const TQString& toolbarName,const KURL& destFile); /** Makes the tabwidget look and behave like we want. If closeButtonsOnly is true, @@ -643,11 +644,11 @@ protected: // Protected attributes DCOPQuanta *dcopQuanta; KParts::PartManager *m_partManager; ///< the pointer to the part manager TQGuardedPtr<KTextEditor::View> m_oldKTextEditor; ///< remembers the last activated GUI - QNewDTEPStuff *m_newDTEPStuff; - QNewToolbarStuff *m_newToolbarStuff; - QNewTemplateStuff *m_newTemplateStuff; - QNewScriptStuff *m_newScriptStuff; - QNewDocStuff *m_newDocStuff; + TQNewDTEPStuff *m_newDTEPStuff; + TQNewToolbarStuff *m_newToolbarStuff; + TQNewTemplateStuff *m_newTemplateStuff; + TQNewScriptStuff *m_newScriptStuff; + TQNewDocStuff *m_newDocStuff; TQDict<ToolbarEntry> m_toolbarList; public: //TODO: check if it's worth to make a read method for them diff --git a/quanta/src/quanta_init.cpp b/quanta/src/quanta_init.cpp index e7a5fa75..2fcdda6b 100644 --- a/quanta/src/quanta_init.cpp +++ b/quanta/src/quanta_init.cpp @@ -119,7 +119,7 @@ QuantaInit::QuantaInit(QuantaApp * quantaApp) : TQObject() { m_quanta = quantaApp; - connect(this, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash())); + connect(this, TQT_SIGNAL(hideSplash()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotHideSplash())); } QuantaInit::~QuantaInit() @@ -138,7 +138,7 @@ void QuantaInit::initQuanta() tmpDir = tmpDirs[0]; for (uint i = 0; i < tmpDirs.count(); i++) { - if (tmpDirs[i].contains("kde-")) + if (tmpDirs[i].tqcontains("kde-")) tmpDir = tmpDirs[i]; } dir.mkdir(tmpDir + "quanta"); @@ -154,9 +154,9 @@ void QuantaInit::initQuanta() //defaultDocType must be read before the Project object is created!! m_config->setGroup("General Options"); qConfig.defaultDocType = m_config->readEntry("Default DTD",DEFAULT_DTD); - if (! DTDs::ref()->find(qConfig.defaultDocType)) + if (! DTDs::ref()->tqfind(qConfig.defaultDocType)) qConfig.defaultDocType = DEFAULT_DTD; - DTDs::ref()->find("dtd"); //load on startup + DTDs::ref()->tqfind("dtd"); //load on startup initView(); initDocument(); // after initView because of init of treeViews @@ -170,14 +170,14 @@ void QuantaInit::initQuanta() readAbbreviations(); // Initialize debugger - m_quanta->m_debugger = new DebuggerManager(m_quanta); + m_quanta->m_debugger = new DebuggerManager(TQT_TQOBJECT(m_quanta)); connect(Project::ref(), TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)), m_quanta->m_debugger, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &))); connect(Project::ref(), TQT_SIGNAL(eventHappened(const TQString &, const TQString &, const TQString &)), m_quanta->m_debugger, TQT_SLOT(slotHandleEvent(const TQString &, const TQString &, const TQString &))); - connect(m_quanta->m_debugger, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash())); + connect(m_quanta->m_debugger, TQT_SIGNAL(hideSplash()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotHideSplash())); - //m_quanta->KDockMainWindow::createGUI( TQString::null, false /* conserveMemory */ ); + //m_quanta->KDockMainWindow::createGUI( TQString(), false /* conserveMemory */ ); m_quanta->createShellGUI(true); addToolTreeView(m_quanta->fTab, i18n("Files"), UserIcon("ftab"), KDockWidget::DockLeft); @@ -191,13 +191,13 @@ void QuantaInit::initQuanta() m_quanta->m_problemsOutputView = addToolTreeView(m_quanta->m_problemOutput, i18n("Problems"), SmallIcon("info"), KDockWidget::DockBottom); m_quanta->m_annotationOutputView = addToolTreeView(m_quanta->m_annotationOutput, i18n("Annotations"), SmallIcon("stamp"), KDockWidget::DockBottom); - // Restore the dock layout + // Restore the dock tqlayout m_config->setGroup ("General Options"); - TQString layout = m_config->readEntry("Window layout", "Default"); + TQString tqlayout = m_config->readEntry("Window tqlayout", "Default"); int mdiMode = m_config->readNumEntry("MDI mode", -1); - if (mdiMode != -1 && layout != "Default") + if (mdiMode != -1 && tqlayout != "Default") { - m_quanta->readDockConfig(m_config); //FIXME: This causes the visible widget construction on startup, but is needed to restore the window layout... + m_quanta->readDockConfig(m_config); //FIXME: This causes the visible widget construction on startup, but is needed to restore the window tqlayout... if (mdiMode != KMdi::IDEAlMode) m_quanta->setToolviewStyle(qConfig.toolviewTabs); } @@ -209,7 +209,7 @@ void QuantaInit::initQuanta() if (mdiMode == KMdi::ToplevelMode) { m_quanta->switchToChildframeMode(); - TQTimer::singleShot(0, m_quanta, TQT_SLOT(switchToToplevelMode())); + TQTimer::singleShot(0, TQT_TQOBJECT(m_quanta), TQT_SLOT(switchToToplevelMode())); } // Always hide debugger toolbar at this point @@ -229,7 +229,7 @@ void QuantaInit::initQuanta() TQDomElement el = node.toElement(); m_quanta->oldShortcuts.insert(el.attribute("name"), el.attribute("shortcut")); node = node.nextSibling(); - el.parentNode().removeChild(el); + el.tqparentNode().removeChild(el); } else { node = node.nextSibling(); @@ -253,22 +253,22 @@ void QuantaInit::initQuanta() toolviewMenu->plug(m_quanta->windowMenu()); TQPopupMenu *toolbarsMenu = (TQPopupMenu*)(m_quanta->guiFactory())->container("toolbars_load", m_quanta); - connect(toolbarsMenu, TQT_SIGNAL(aboutToShow()), m_quanta, TQT_SLOT(slotBuildPrjToolbarsMenu())); + connect(toolbarsMenu, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotBuildPrjToolbarsMenu())); TQPopupMenu *contextMenu = (TQPopupMenu*)(m_quanta->guiFactory())->container("popup_editor", m_quanta); - connect(contextMenu, TQT_SIGNAL(aboutToShow()), m_quanta, TQT_SLOT(slotContextMenuAboutToShow())); + connect(contextMenu, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotContextMenuAboutToShow())); connect(m_quanta->m_messageOutput, TQT_SIGNAL(clicked(const TQString&, int, int)), - m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); connect(m_quanta->m_problemOutput, TQT_SIGNAL(clicked(const TQString&, int, int)), - m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); connect(m_quanta->m_annotationOutput->currentFileAnnotations(), TQT_SIGNAL(clicked(const TQString&, int, int)), - m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); connect(m_quanta->m_annotationOutput, TQT_SIGNAL(clicked(const TQString&, int, int)), - m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); m_quanta->slotFileNew(); - m_quanta->slotNewStatus(); + m_quanta->slotNewtqStatus(); initToolBars(); Project::ref()->setProjectToolbarVisible(m_quanta->factory()->container("project_toolbar", m_quanta)->isShown()); Project::ref()->slotShowProjectToolbar(Project::ref()->hasProject()); @@ -279,12 +279,12 @@ void QuantaInit::initQuanta() qConfig.backupDirPath = KGlobal::instance()->dirs()->saveLocation("data", resourceDir + "backups/"); m_quanta->autosaveTimer = new TQTimer(m_quanta); - connect(m_quanta->autosaveTimer, TQT_SIGNAL(timeout()), m_quanta, TQT_SLOT(slotAutosaveTimer())); + connect(m_quanta->autosaveTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotAutosaveTimer())); m_quanta->autosaveTimer->start(qConfig.autosaveInterval * 60000, false); - connect(m_quanta->m_doc, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash())); + connect(m_quanta->m_doc, TQT_SIGNAL(hideSplash()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotHideSplash())); connect(parser, TQT_SIGNAL(rebuildStructureTree(bool)), - m_quanta, TQT_SLOT(slotReloadStructTreeView(bool))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotReloadStructTreeView(bool))); // Read list of characters TQFile file(locate("appdata","chars")); @@ -296,26 +296,26 @@ void QuantaInit::initQuanta() { s = t.readLine(); charList << i18n(s.utf8()); // line excluding '\n' - int begin = s.find("(&") + 1; + int begin = s.tqfind("(&") + 1; if (begin == 1) continue; - int length = s.find(";)") - begin + 1; + int length = s.tqfind(";)") - begin + 1; TQString s2 = s.mid(begin, length - 1); - replacementMap[s[0].unicode()] = s2; + replacementMap[s[0].tqunicode()] = s2; } file.close(); } TQString infoCss = tmpDir; - infoCss.replace(TQRegExp("/quanta$"),""); + infoCss.tqreplace(TQRegExp("/quanta$"),""); infoCss += "/info.css"; - QExtFileInfo::copy(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.css"), KURL().fromPathOrURL(infoCss)); + TQExtFileInfo::copy(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.css"), KURL().fromPathOrURL(infoCss)); checkRuntimeDependencies(); ViewManager::ref()->activeDocument()->view()->setFocus(); m_quanta->refreshTimer = new TQTimer(m_quanta); - connect(m_quanta->refreshTimer, TQT_SIGNAL(timeout()), m_quanta, TQT_SLOT(slotReparse())); + connect(m_quanta->refreshTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotReparse())); m_quanta->refreshTimer->start( qConfig.refreshFrequency*1000, false ); //update the structure tree every 5 seconds if (qConfig.instantUpdate || qConfig.refreshFrequency == 0) { @@ -334,7 +334,7 @@ void QuantaInit::initStatusBar() { m_quanta->statusbarTimer = new TQTimer(m_quanta); connect(m_quanta->statusbarTimer,TQT_SIGNAL(timeout()), - m_quanta, TQT_SLOT(statusBarTimeout())); + TQT_TQOBJECT(m_quanta), TQT_SLOT(statusBarTimeout())); progressBar = new KProgress(m_quanta->statusBar()); progressBar->setTextEnabled(false); @@ -356,30 +356,30 @@ void QuantaInit::initStatusBar() void QuantaInit::initDocument() { m_quanta->m_doc = new QuantaDoc(0L); - connect(m_quanta->m_doc, TQT_SIGNAL(newStatus()), - m_quanta, TQT_SLOT(slotNewStatus())); + connect(m_quanta->m_doc, TQT_SIGNAL(newtqStatus()), + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotNewtqStatus())); } void QuantaInit::initProject() { Project *m_project = Project::ref(m_quanta); - connect(m_project, TQT_SIGNAL(getTreeStatus(TQStringList *)), - pTab, TQT_SLOT(slotGetTreeStatus(TQStringList *))); + connect(m_project, TQT_SIGNAL(getTreetqStatus(TQStringList *)), + pTab, TQT_SLOT(slotGetTreetqStatus(TQStringList *))); connect(m_project, TQT_SIGNAL(loadToolbarFile(const KURL &)), - m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL &))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotLoadToolbarFile(const KURL &))); connect(m_project, TQT_SIGNAL(getUserToolbarFiles(KURL::List *)), - m_quanta, TQT_SLOT(slotGetUserToolbarFiles(KURL::List *))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotGetUserToolbarFiles(KURL::List *))); connect(m_project, TQT_SIGNAL(openFiles(const KURL::List &, const TQString&)), - m_quanta, TQT_SLOT(slotFileOpen(const KURL::List &, const TQString&))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotFileOpen(const KURL::List &, const TQString&))); connect(m_project, TQT_SIGNAL(openFile(const KURL &, const TQString&)), - m_quanta, TQT_SLOT(slotFileOpen(const KURL &, const TQString&))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotFileOpen(const KURL &, const TQString&))); connect(m_project, TQT_SIGNAL(closeFile(const KURL &)), - m_quanta, TQT_SLOT(slotFileClose(const KURL &))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotFileClose(const KURL &))); connect(m_project, TQT_SIGNAL(reloadTree(ProjectList *, bool, const TQStringList &)), pTab, TQT_SLOT(slotReloadTree(ProjectList *, bool, const TQStringList &))); connect(m_project, TQT_SIGNAL(closeFiles()), ViewManager::ref(), TQT_SLOT(closeAll())); - connect(m_project, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + connect(m_project, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), TQPEvents::ref(TQT_TQOBJECT(m_quanta)), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); connect(m_quanta->fTab, TQT_SIGNAL(insertDirInProject(const KURL&)), m_project, TQT_SLOT(slotAddDirectory(const KURL&))); @@ -393,8 +393,8 @@ void QuantaInit::initProject() connect(TemplatesTreeView::ref(), TQT_SIGNAL(insertFileInProject(const KURL&)), m_project, TQT_SLOT(slotInsertFile(const KURL&))); connect(TemplatesTreeView::ref(), TQT_SIGNAL(downloadTemplate()), - m_quanta, TQT_SLOT(slotDownloadTemplate())); - connect(TemplatesTreeView::ref(), TQT_SIGNAL(uploadTemplate(const TQString&)), m_quanta, TQT_SLOT(slotUploadTemplate(const TQString&))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotDownloadTemplate())); + connect(TemplatesTreeView::ref(), TQT_SIGNAL(uploadTemplate(const TQString&)), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotUploadTemplate(const TQString&))); // inform project if something was renamed connect(pTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)), @@ -419,13 +419,13 @@ void QuantaInit::initProject() connect(m_project, TQT_SIGNAL(addProjectDoc(const KURL&)), m_quanta->dTab, TQT_SLOT(slotAddProjectDoc(const KURL&))); connect(m_project, TQT_SIGNAL(enableMessageWidget()), - m_quanta, TQT_SLOT(slotShowMessagesView())); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotShowMessagesView())); connect(m_project, TQT_SIGNAL(messages(const TQString&)), m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&))); - connect(m_project, TQT_SIGNAL(newStatus()), - m_quanta, TQT_SLOT(slotNewStatus())); + connect(m_project, TQT_SIGNAL(newtqStatus()), + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotNewtqStatus())); connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)), TemplatesTreeView::ref(), TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &))); @@ -438,20 +438,20 @@ void QuantaInit::initProject() connect(pTab, TQT_SIGNAL(changeFileDescription(const KURL&, const TQString&)), m_project, TQT_SLOT(slotFileDescChanged(const KURL&, const TQString&))); - connect(pTab, TQT_SIGNAL(changeUploadStatus(const KURL&, int)), + connect(pTab, TQT_SIGNAL(changeUploadtqStatus(const KURL&, int)), m_project, TQT_SLOT(slotUploadStatusChanged(const KURL&, int))); - connect(pTab, TQT_SIGNAL(changeDocumentFolderStatus(const KURL&, bool)), - m_project, TQT_SLOT(slotChangeDocumentFolderStatus(const KURL&, bool))); + connect(pTab, TQT_SIGNAL(changeDocumentFoldertqStatus(const KURL&, bool)), + m_project, TQT_SLOT(slotChangeDocumentFoldertqStatus(const KURL&, bool))); - connect(m_project, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash())); + connect(m_project, TQT_SIGNAL(hideSplash()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotHideSplash())); connect(m_project, TQT_SIGNAL(statusMsg(const TQString &)), - m_quanta, TQT_SLOT(slotStatusMsg(const TQString & ))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotStatusMsg(const TQString & ))); } void QuantaInit::initView() { - ViewManager *m_viewManager = ViewManager::ref(m_quanta); + ViewManager *m_viewManager = ViewManager::ref(TQT_TQOBJECT(m_quanta)); connect(m_quanta, TQT_SIGNAL(viewActivated (KMdiChildView *)), m_viewManager, TQT_SLOT(slotViewActivated(KMdiChildView*))); connect(m_quanta, TQT_SIGNAL(lastChildViewClosed()), m_viewManager, TQT_SLOT(slotLastViewClosed())); // connect(m_quanta, TQT_SIGNAL(viewDeactivated(KMdiChildView *)), m_viewManager, TQT_SLOT(slotViewDeactivated(KMdiChildView*))); @@ -472,7 +472,7 @@ void QuantaInit::initView() m_quanta->setStandardMDIMenuEnabled(false); m_quanta->setManagedDockPositionModeEnabled(true); - m_quanta->fTab = new FilesTreeView(m_config, m_quanta, "filestree"); + m_quanta->fTab = new FilesTreeView(m_config, m_quanta, "filestree"); m_quanta->aTab = new EnhancedTagAttributeTree(m_quanta, "TagAttributes"); pTab = ProjectTreeView::ref(m_quanta, "Project"); tTab = TemplatesTreeView::ref(m_quanta, "Templates"); // creates the treeview @@ -481,15 +481,15 @@ void QuantaInit::initView() m_quanta->scriptTab = new ScriptTreeView(m_quanta, "Scripts"); m_quanta->m_messageOutput = new MessageOutput(m_quanta, "Messages"); - m_quanta->m_messageOutput->setFocusPolicy(TQWidget::NoFocus); + m_quanta->m_messageOutput->setFocusPolicy(TQ_NoFocus); m_quanta->m_messageOutput->showMessage(i18n("Message Window...")); connect(m_quanta, TQT_SIGNAL(showMessage(const TQString&, bool)), m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&, bool))); connect(m_quanta, TQT_SIGNAL(clearMessages()), m_quanta->m_messageOutput, TQT_SLOT(clear())); m_quanta->m_problemOutput = new MessageOutput(m_quanta, "Problems"); - m_quanta->m_problemOutput->setFocusPolicy(TQWidget::NoFocus); + m_quanta->m_problemOutput->setFocusPolicy(TQ_NoFocus); m_quanta->m_annotationOutput = new AnnotationOutput(m_quanta, "Annotations"); - m_quanta->m_annotationOutput->setFocusPolicy(TQWidget::NoFocus); + m_quanta->m_annotationOutput->setFocusPolicy(TQ_NoFocus); m_quanta->createPreviewPart(); m_quanta->createDocPart(); @@ -498,7 +498,7 @@ void QuantaInit::initView() m_quanta->fTab, TQT_SLOT(slotReloadAllTrees())); connect(pTab, TQT_SIGNAL(loadToolbarFile (const KURL&)), - m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL&))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotLoadToolbarFile(const KURL&))); connect(m_viewManager, TQT_SIGNAL(viewActivated(const KURL&)), pTab, TQT_SLOT(slotViewActivated(const KURL&))); @@ -512,39 +512,39 @@ void QuantaInit::initView() m_quanta->fTab, TQT_SLOT(slotDocumentClosed(const KURL&))); connect(tTab, TQT_SIGNAL(insertFile (const KURL &)), - m_quanta, TQT_SLOT(slotInsertFile(const KURL &))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotInsertFile(const KURL &))); connect(m_quanta->scriptTab, TQT_SIGNAL(openFileInPreview(const KURL &)), - m_quanta, TQT_SLOT(slotOpenFileInPreview(const KURL &))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotOpenFileInPreview(const KURL &))); connect(m_quanta->scriptTab, TQT_SIGNAL(showPreviewWidget(bool)), - m_quanta, TQT_SLOT(slotShowPreviewWidget(bool))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotShowPreviewWidget(bool))); connect(m_quanta->scriptTab, TQT_SIGNAL(assignActionToScript(const KURL &, const TQString&)), - m_quanta, TQT_SLOT(slotAssignActionToScript(const KURL &, const TQString&))); - connect(m_quanta->scriptTab, TQT_SIGNAL(downloadScript()), m_quanta, TQT_SLOT(slotDownloadScript())); - connect(m_quanta->scriptTab, TQT_SIGNAL(uploadScript(const TQString&)), m_quanta, TQT_SLOT(slotUploadScript(const TQString&))); - connect(m_quanta->dTab, TQT_SIGNAL(downloadDoc()), m_quanta, TQT_SLOT(slotDownloadDoc())); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotAssignActionToScript(const KURL &, const TQString&))); + connect(m_quanta->scriptTab, TQT_SIGNAL(downloadScript()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotDownloadScript())); + connect(m_quanta->scriptTab, TQT_SIGNAL(uploadScript(const TQString&)), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotUploadScript(const TQString&))); + connect(m_quanta->dTab, TQT_SIGNAL(downloadDoc()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotDownloadDoc())); connect(m_quanta->m_htmlPart, TQT_SIGNAL(onURL(const TQString&)), - m_quanta, TQT_SLOT(slotStatusMsg(const TQString&))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotStatusMsg(const TQString&))); connect(m_quanta->m_htmlPartDoc, TQT_SIGNAL(onURL(const TQString&)), - m_quanta, TQT_SLOT(slotStatusMsg(const TQString&))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotStatusMsg(const TQString&))); - connect(sTab, TQT_SIGNAL(newCursorPosition(int,int)), m_quanta, TQT_SLOT(setCursorPosition(int,int))); - connect(sTab, TQT_SIGNAL(selectArea(int,int,int,int)), m_quanta, TQT_SLOT( selectArea(int,int,int,int))); - connect(sTab, TQT_SIGNAL(selectTagArea(Node*)), m_quanta, TQT_SLOT(slotSelectTagArea(Node*))); - connect(sTab, TQT_SIGNAL(needReparse()), m_quanta, TQT_SLOT(slotForceReparse())); - connect(sTab, TQT_SIGNAL(showGroupsForDTEP(const TQString&, bool)), m_quanta, TQT_SLOT(slotShowGroupsForDTEP(const TQString&, bool))); + connect(sTab, TQT_SIGNAL(newCursorPosition(int,int)), TQT_TQOBJECT(m_quanta), TQT_SLOT(setCursorPosition(int,int))); + connect(sTab, TQT_SIGNAL(selectArea(int,int,int,int)), TQT_TQOBJECT(m_quanta), TQT_SLOT( selectArea(int,int,int,int))); + connect(sTab, TQT_SIGNAL(selectTagArea(Node*)), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotSelectTagArea(Node*))); + connect(sTab, TQT_SIGNAL(needReparse()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotForceReparse())); + connect(sTab, TQT_SIGNAL(showGroupsForDTEP(const TQString&, bool)), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotShowGroupsForDTEP(const TQString&, bool))); connect(sTab, TQT_SIGNAL(openFile(const KURL &)), - m_quanta, TQT_SLOT (slotFileOpen(const KURL &))); + TQT_TQOBJECT(m_quanta), TQT_SLOT (slotFileOpen(const KURL &))); connect(sTab, TQT_SIGNAL(openImage (const KURL&)), - m_quanta, TQT_SLOT(slotImageOpen(const KURL&))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotImageOpen(const KURL&))); connect(sTab, TQT_SIGNAL(showProblemMessage(const TQString&)), m_quanta->m_problemOutput, TQT_SLOT(showMessage(const TQString&))); connect(sTab, TQT_SIGNAL(clearProblemOutput()), m_quanta->m_problemOutput, TQT_SLOT(clear())); connect(parser, TQT_SIGNAL(nodeTreeChanged()), sTab, TQT_SLOT(slotNodeTreeChanged())); - connect(m_quanta->dTab, TQT_SIGNAL(openURL(const TQString&)), m_quanta, TQT_SLOT(openDoc(const TQString&))); + connect(m_quanta->dTab, TQT_SIGNAL(openURL(const TQString&)), TQT_TQOBJECT(m_quanta), TQT_SLOT(openDoc(const TQString&))); connect(m_viewManager, TQT_SIGNAL(dragInsert(TQDropEvent *)), tTab, TQT_SLOT(slotDragInsert(TQDropEvent *))); @@ -679,7 +679,7 @@ void QuantaInit::openLastFiles() if (w) //w==0 might happen on quick close on startup { m_quanta->setTitle(w->url().prettyURL(0, KURL::StripFileProtocol) ); -// m_quanta->slotUpdateStatus(w);//FIXME: +// m_quanta->slotUpdatetqStatus(w);//FIXME: } } @@ -706,75 +706,75 @@ void QuantaInit::loadInitialProject(const TQString& url) void QuantaInit::initActions() { KActionCollection *ac = m_quanta->actionCollection(); - new KAction(i18n("Annotate..."), 0, m_quanta, TQT_SLOT(slotAnnotate()),ac, "annotate"); + new KAction(i18n("Annotate..."), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotAnnotate()),ac, "annotate"); m_quanta->editTagAction = new KAction( i18n( "&Edit Current Tag..." ), CTRL+Key_E, - m_quanta, TQT_SLOT( slotEditCurrentTag() ), - ac, "edit_current_tag" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotEditCurrentTag() ), + TQT_TQOBJECT(ac), "edit_current_tag" ); m_quanta->selectTagAreaAction = new KAction( i18n( "&Select Current Tag Area" ), 0, - m_quanta, TQT_SLOT( slotSelectTagArea() ), - ac, "select_tag_area" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotSelectTagArea() ), + TQT_TQOBJECT(ac), "select_tag_area" ); new KAction( i18n( "E&xpand Abbreviation" ), CTRL+SHIFT+Key_J, - m_quanta, TQT_SLOT( slotExpandAbbreviation() ), - ac, "expand_abbreviation" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotExpandAbbreviation() ), + TQT_TQOBJECT(ac), "expand_abbreviation" ); - new KAction(i18n("&Report Bug..."), 0, m_quanta, TQT_SLOT(slotReportBug()), ac, "help_reportbug"); //needed, because quanta_be bugs should be reported for quanta + new KAction(i18n("&Report Bug..."), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotReportBug()), TQT_TQOBJECT(ac), "help_reportbug"); //needed, because quanta_be bugs should be reported for quanta //Kate actions //Edit menu - KStdAction::undo(m_quanta, TQT_SLOT(slotUndo()), ac); - KStdAction::redo(m_quanta, TQT_SLOT(slotRedo()), ac); - KStdAction::cut(m_quanta, TQT_SLOT(slotCut()), ac); - KStdAction::copy(m_quanta, TQT_SLOT(slotCopy()), ac) ; - KStdAction::pasteText(m_quanta, TQT_SLOT(slotPaste()), ac); + KStdAction::undo(TQT_TQOBJECT(m_quanta), TQT_SLOT(slotUndo()), ac); + KStdAction::redo(TQT_TQOBJECT(m_quanta), TQT_SLOT(slotRedo()), ac); + KStdAction::cut(TQT_TQOBJECT(m_quanta), TQT_SLOT(slotCut()), ac); + KStdAction::copy(TQT_TQOBJECT(m_quanta), TQT_SLOT(slotCopy()), ac) ; + KStdAction::pasteText(TQT_TQOBJECT(m_quanta), TQT_SLOT(slotPaste()), ac); //help - (void) new KAction(i18n("Ti&p of the Day"), "idea", "", m_quanta, - TQT_SLOT(slotHelpTip()), ac, "help_tip"); + (void) new KAction(i18n("Ti&p of the Day"), "idea", "", TQT_TQOBJECT(m_quanta), + TQT_SLOT(slotHelpTip()), TQT_TQOBJECT(ac), "help_tip"); // File actions // - KStdAction::openNew( m_quanta, TQT_SLOT( slotFileNew() ), ac); - KStdAction::open ( m_quanta, TQT_SLOT( slotFileOpen() ), ac, "file_open"); - (void) new KAction(i18n("Close Other Tabs"), 0, ViewManager::ref(), TQT_SLOT(slotCloseOtherTabs()), ac, "close_other_tabs"); + KStdAction::openNew( TQT_TQOBJECT(m_quanta), TQT_SLOT( slotFileNew() ), ac); + KStdAction::open ( TQT_TQOBJECT(m_quanta), TQT_SLOT( slotFileOpen() ), ac, "file_open"); + (void) new KAction(i18n("Close Other Tabs"), 0, ViewManager::ref(), TQT_SLOT(slotCloseOtherTabs()), TQT_TQOBJECT(ac), "close_other_tabs"); - m_quanta->fileRecent = KStdAction::openRecent(m_quanta, TQT_SLOT(slotFileOpenRecent(const KURL&)), + m_quanta->fileRecent = KStdAction::openRecent(TQT_TQOBJECT(m_quanta), TQT_SLOT(slotFileOpenRecent(const KURL&)), ac, "file_open_recent"); m_quanta->fileRecent->setToolTip(i18n("Open / Open Recent")); - connect(m_quanta->fileRecent, TQT_SIGNAL(activated()), m_quanta, TQT_SLOT(slotFileOpen())); + connect(m_quanta->fileRecent, TQT_SIGNAL(activated()), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotFileOpen())); - (void) new KAction( i18n( "Close All" ), 0, m_quanta, + (void) new KAction( i18n( "Close All" ), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT( slotFileCloseAll() ), - ac, "file_close_all" ); + TQT_TQOBJECT(ac), "file_close_all" ); - m_quanta->saveAction = KStdAction::save(m_quanta, TQT_SLOT( slotFileSave() ), ac); + m_quanta->saveAction = KStdAction::save(TQT_TQOBJECT(m_quanta), TQT_SLOT( slotFileSave() ), ac); - KStdAction::saveAs( m_quanta, TQT_SLOT( slotFileSaveAs() ), ac ); + KStdAction::saveAs( TQT_TQOBJECT(m_quanta), TQT_SLOT( slotFileSaveAs() ), ac ); m_quanta->saveAllAction = new KAction( i18n( "Save All..." ), "save_all", SHIFT+KStdAccel::shortcut(KStdAccel::Save).keyCodeQt(), - m_quanta, TQT_SLOT( slotFileSaveAll() ), - ac, "file_save_all" ); - (void) new KAction(i18n("Reloa&d"), "revert", SHIFT+Key_F5, m_quanta, - TQT_SLOT(slotFileReload()), ac, "file_reload"); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotFileSaveAll() ), + TQT_TQOBJECT(ac), "file_save_all" ); + (void) new KAction(i18n("Reloa&d"), "revert", SHIFT+Key_F5, TQT_TQOBJECT(m_quanta), + TQT_SLOT(slotFileReload()), TQT_TQOBJECT(ac), "file_reload"); // (void) new KAction(i18n("Reload All "), 0, 0, m_quanta, -// TQT_SLOT(slotFileReloadAll()), ac, "file_reload_all"); +// TQT_SLOT(slotFileReloadAll()), TQT_TQOBJECT(ac), "file_reload_all"); (void) new KAction( i18n( "Save as Local Template..." ), 0, - m_quanta, TQT_SLOT( slotFileSaveAsLocalTemplate() ), - ac, "save_local_template" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotFileSaveAsLocalTemplate() ), + TQT_TQOBJECT(ac), "save_local_template" ); (void) new KAction( i18n( "Save Selection to Local Template File..." ), 0, - m_quanta, TQT_SLOT( slotFileSaveSelectionAsLocalTemplate() ), - ac, "save_selection_local_template" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotFileSaveSelectionAsLocalTemplate() ), + TQT_TQOBJECT(ac), "save_selection_local_template" ); - KStdAction::quit( m_quanta, TQT_SLOT( slotFileQuit() ), ac ); + KStdAction::quit( TQT_TQOBJECT(m_quanta), TQT_SLOT( slotFileQuit() ), ac ); // Edit actions (void) new KAction( i18n( "Find in Files..." ), - SmallIcon("filefind"), CTRL+ALT+Key_F, - m_quanta, TQT_SLOT( slotEditFindInFiles() ), - ac, "find_in_files" ); + SmallIcon("filetqfind"), CTRL+ALT+Key_F, + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotEditFindInFiles() ), + TQT_TQOBJECT(ac), "find_in_files" ); KAction* aux = TagActionManager::self()->actionCollection()->action("apply_source_indentation"); aux->setEnabled(false); @@ -783,90 +783,90 @@ void QuantaInit::initActions() // Tool actions (void) new KAction( i18n( "&Context Help..." ), CTRL+Key_H, - m_quanta, TQT_SLOT( slotContextHelp() ), - ac, "context_help" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotContextHelp() ), + TQT_TQOBJECT(ac), "context_help" ); (void) new KAction( i18n( "&Quanta Homepage" ), 0, - m_quanta, TQT_SLOT( slotHelpHomepage() ), - ac, "help_homepage" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotHelpHomepage() ), + TQT_TQOBJECT(ac), "help_homepage" ); (void) new KAction( i18n( "&User Mailing List" ), 0, - m_quanta, TQT_SLOT( slotHelpUserList() ), - ac, "help_userlist" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotHelpUserList() ), + TQT_TQOBJECT(ac), "help_userlist" ); (void) new KAction( i18n( "Make &Donation" ), 0, - m_quanta, TQT_SLOT( slotMakeDonation() ), - ac, "help_donation" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotMakeDonation() ), + TQT_TQOBJECT(ac), "help_donation" ); (void) new KAction( i18n( "Tag &Attributes..." ), ALT+Key_Down, m_quanta->m_doc, TQT_SLOT( slotAttribPopup() ), - ac, "tag_attributes" ); + TQT_TQOBJECT(ac), "tag_attributes" ); (void) new KAction( i18n( "&Change the DTD..." ), 0, - m_quanta, TQT_SLOT( slotChangeDTD() ), - ac, "change_dtd" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotChangeDTD() ), + TQT_TQOBJECT(ac), "change_dtd" ); (void) new KAction( i18n( "&Edit DTD Settings..." ), 0, - m_quanta, TQT_SLOT( slotEditDTD() ), - ac, "edit_dtd" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotEditDTD() ), + TQT_TQOBJECT(ac), "edit_dtd" ); (void) new KAction( i18n( "&Load && Convert DTD..." ), 0, DTDs::ref(), TQT_SLOT( slotLoadDTD() ), - ac, "load_dtd" ); + TQT_TQOBJECT(ac), "load_dtd" ); (void) new KAction( i18n( "Load DTD E&ntities..." ), 0, DTDs::ref(), TQT_SLOT( slotLoadEntities() ), - ac, "load_entities" ); + TQT_TQOBJECT(ac), "load_entities" ); (void) new KAction( i18n( "Load DTD &Package (DTEP)..." ), 0, - m_quanta, TQT_SLOT( slotLoadDTEP() ), - ac, "load_dtep" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotLoadDTEP() ), + TQT_TQOBJECT(ac), "load_dtep" ); (void) new KAction( i18n( "Send DTD Package (DTEP) in E&mail..." ), "mail_send", 0, - m_quanta, TQT_SLOT( slotEmailDTEP() ), - ac, "send_dtep" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotEmailDTEP() ), + TQT_TQOBJECT(ac), "send_dtep" ); (void) new KAction( i18n( "&Download DTD Package (DTEP)..." ), "network", 0, - m_quanta, TQT_SLOT( slotDownloadDTEP() ), - ac, "download_dtep" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotDownloadDTEP() ), + TQT_TQOBJECT(ac), "download_dtep" ); (void) new KAction( i18n( "&Upload DTD Package (DTEP)..." ), "network", 0, - m_quanta, TQT_SLOT( slotUploadDTEP() ), - ac, "upload_dtep" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotUploadDTEP() ), + TQT_TQOBJECT(ac), "upload_dtep" ); /* (void) new KAction( i18n( "&Upload DTD Package (DTEP)..." ), 0, - m_quanta, TQT_SLOT( slotUploadDTEP() ), - ac, "send_dtep" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotUploadDTEP() ), + TQT_TQOBJECT(ac), "send_dtep" ); */ (void) new KAction( i18n( "&Document Properties" ), 0, - m_quanta, TQT_SLOT( slotDocumentProperties() ), - ac, "tools_document_properties" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotDocumentProperties() ), + TQT_TQOBJECT(ac), "tools_document_properties" ); (void) new KAction ( i18n ("F&ormat XML Code"), 0, - m_quanta, TQT_SLOT( slotCodeFormatting() ), - ac, "tools_code_formatting"); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotCodeFormatting() ), + TQT_TQOBJECT(ac), "tools_code_formatting"); (void) new KAction( i18n( "&Convert Tag && Attribute Case..."), 0, - m_quanta, TQT_SLOT(slotConvertCase()), - ac, "tools_change_case"); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotConvertCase()), + TQT_TQOBJECT(ac), "tools_change_case"); // View actions m_quanta->showSourceAction = new KToggleAction( i18n( "&Source Editor"), UserIcon ("view_text"), ALT+Key_F9, - m_quanta, TQT_SLOT( slotShowSourceEditor()), - ac, "show_quanta_editor"); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotShowSourceEditor()), + TQT_TQOBJECT(ac), "show_quanta_editor"); m_quanta->showSourceAction->setExclusiveGroup("view"); m_quanta->showVPLAction = new KToggleAction( i18n( "&VPL Editor"), UserIcon ("vpl"), CTRL+SHIFT+Key_F9, - m_quanta, TQT_SLOT( slotShowVPLOnly() ), - ac, "show_kafka_view"); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotShowVPLOnly() ), + TQT_TQOBJECT(ac), "show_kafka_view"); m_quanta->showVPLAction->setExclusiveGroup("view"); m_quanta->showVPLSourceAction = new KToggleAction( i18n("VPL && So&urce Editors"), UserIcon ("vpl_text"), Key_F9, - m_quanta, TQT_SLOT( slotShowVPLAndSourceEditor() ), - ac, "show_kafka_and_quanta"); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotShowVPLAndSourceEditor() ), + TQT_TQOBJECT(ac), "show_kafka_and_quanta"); m_quanta->showVPLSourceAction->setExclusiveGroup("view"); /**kafkaSelectAction = new KSelectAction(i18n("Main &View"), 0, ac,"show_kafka"); TQStringList list2; @@ -874,73 +874,73 @@ void QuantaInit::initActions() list2.append(i18n("&VPL Editor (experimental)")); list2.append(i18n("&Both Editors")); kafkaSelectAction->setItems(list2); - connect(kafkaSelectAction, TQT_SIGNAL(activated(int)), m_quanta, TQT_SLOT(slotShowKafkaPartl(int)));*/ + connect(kafkaSelectAction, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotShowKafkaPartl(int)));*/ (void) new KAction( i18n( "&Reload Preview" ), "reload", KStdAccel::shortcut(KStdAccel::Reload).keyCodeQt(), - m_quanta, TQT_SLOT(slotRepaintPreview()), - ac, "reload" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotRepaintPreview()), + TQT_TQOBJECT(ac), "reload" ); (void) new KAction( i18n( "&Previous File" ), "1leftarrow", KStdAccel::back(), - m_quanta, TQT_SLOT( slotBack() ), - ac, "previous_file" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotBack() ), + TQT_TQOBJECT(ac), "previous_file" ); (void) new KAction( i18n( "&Next File" ), "1rightarrow", KStdAccel::forward(), - m_quanta, TQT_SLOT( slotForward() ), - ac, "next_file" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotForward() ), + TQT_TQOBJECT(ac), "next_file" ); // Options actions // (void) new KAction( i18n( "Configure &Actions..." ), UserIcon("ball"),0, - m_quanta, TQT_SLOT( slotOptionsConfigureActions() ), - ac, "configure_actions" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotOptionsConfigureActions() ), + TQT_TQOBJECT(ac), "configure_actions" ); - KStdAction::showMenubar(m_quanta, TQT_SLOT(slotShowMenuBar()), ac, "options_show_menubar"); - KStdAction::keyBindings(m_quanta, TQT_SLOT( slotOptionsConfigureKeys() ), ac, "configure_shortcuts"); - KStdAction::configureToolbars( m_quanta, TQT_SLOT( slotOptionsConfigureToolbars() ), ac, "options_configure_toolbars"); - KStdAction::preferences(m_quanta, TQT_SLOT( slotOptions() ), ac, "general_options"); - new KAction(i18n("Configure Pre&view..."), SmallIcon("konqueror"), 0, m_quanta, TQT_SLOT(slotPreviewOptions()), ac, "preview_options"); + KStdAction::showMenubar(TQT_TQOBJECT(m_quanta), TQT_SLOT(slotShowMenuBar()), ac, "options_show_menubar"); + KStdAction::keyBindings(TQT_TQOBJECT(m_quanta), TQT_SLOT( slotOptionsConfigureKeys() ), ac, "configure_shortcuts"); + KStdAction::configureToolbars(TQT_TQOBJECT(m_quanta), TQT_SLOT( slotOptionsConfigureToolbars() ), ac, "options_configure_toolbars"); + KStdAction::preferences(TQT_TQOBJECT(m_quanta), TQT_SLOT( slotOptions() ), ac, "general_options"); + new KAction(i18n("Configure Pre&view..."), SmallIcon("konqueror"), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotPreviewOptions()), TQT_TQOBJECT(ac), "preview_options"); // Toolbars actions m_quanta->projectToolbarFiles = new KRecentFilesAction(i18n("Load &Project Toolbar"),0, - m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL&)), - ac, "toolbars_load_project"); - - new KAction(i18n("Load &Global Toolbar..."), 0, m_quanta, TQT_SLOT(slotLoadGlobalToolbar()), ac, "toolbars_load_global"); - new KAction(i18n("Load &Local Toolbar..."), 0, m_quanta, TQT_SLOT(slotLoadToolbar()), ac, "toolbars_load_user"); - new KAction(i18n("Save as &Local Toolbar..."), 0, m_quanta, TQT_SLOT(slotSaveLocalToolbar()), ac, "toolbars_save_local"); - new KAction(i18n("Save as &Project Toolbar..."), 0, m_quanta, TQT_SLOT(slotSaveProjectToolbar()), ac, "toolbars_save_project"); - new KAction(i18n("&New User Toolbar..."), 0, m_quanta, TQT_SLOT(slotAddToolbar()), ac, "toolbars_add"); - new KAction(i18n("&Remove User Toolbar..."), 0, m_quanta, TQT_SLOT(slotRemoveToolbar()), ac, "toolbars_remove"); - new KAction(i18n("Re&name User Toolbar..."), 0, m_quanta, TQT_SLOT(slotRenameToolbar()), ac, "toolbars_rename"); - new KAction(i18n("Send Toolbar in E&mail..."), "mail_send", 0, m_quanta, TQT_SLOT(slotSendToolbar()), ac, "toolbars_send"); - new KAction(i18n("&Upload Toolbar..." ), "network", 0, m_quanta, TQT_SLOT(slotUploadToolbar()), ac, "toolbars_upload" ); - new KAction(i18n("&Download Toolbar..." ), "network", 0, m_quanta, TQT_SLOT(slotDownloadToolbar()), ac, "toolbars_download" ); - - KToggleAction *toggle = new KToggleAction( i18n("Smart Tag Insertion"), 0, ac, "smart_tag_insertion"); - connect(toggle, TQT_SIGNAL(toggled(bool)), m_quanta, TQT_SLOT(slotSmartTagInsertion())); - - m_quanta->showDTDToolbar=new KToggleAction(i18n("Show DTD Toolbar"), 0, ac, "view_dtd_toolbar"); - - connect(m_quanta->showDTDToolbar, TQT_SIGNAL(toggled(bool)), m_quanta, TQT_SLOT(slotToggleDTDToolbar(bool))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotLoadToolbarFile(const KURL&)), + TQT_TQOBJECT(ac), "toolbars_load_project"); + + new KAction(i18n("Load &Global Toolbar..."), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotLoadGlobalToolbar()), TQT_TQOBJECT(ac), "toolbars_load_global"); + new KAction(i18n("Load &Local Toolbar..."), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotLoadToolbar()), TQT_TQOBJECT(ac), "toolbars_load_user"); + new KAction(i18n("Save as &Local Toolbar..."), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotSaveLocalToolbar()), TQT_TQOBJECT(ac), "toolbars_save_local"); + new KAction(i18n("Save as &Project Toolbar..."), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotSaveProjectToolbar()), TQT_TQOBJECT(ac), "toolbars_save_project"); + new KAction(i18n("&New User Toolbar..."), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotAddToolbar()), TQT_TQOBJECT(ac), "toolbars_add"); + new KAction(i18n("&Remove User Toolbar..."), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotRemoveToolbar()), TQT_TQOBJECT(ac), "toolbars_remove"); + new KAction(i18n("Re&name User Toolbar..."), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotRenameToolbar()), TQT_TQOBJECT(ac), "toolbars_rename"); + new KAction(i18n("Send Toolbar in E&mail..."), "mail_send", 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotSendToolbar()), TQT_TQOBJECT(ac), "toolbars_send"); + new KAction(i18n("&Upload Toolbar..." ), "network", 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotUploadToolbar()), TQT_TQOBJECT(ac), "toolbars_upload" ); + new KAction(i18n("&Download Toolbar..." ), "network", 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotDownloadToolbar()), TQT_TQOBJECT(ac), "toolbars_download" ); + + KToggleAction *toggle = new KToggleAction( i18n("Smart Tag Insertion"), 0, TQT_TQOBJECT(ac), "smart_tag_insertion"); + connect(toggle, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotSmartTagInsertion())); + + m_quanta->showDTDToolbar=new KToggleAction(i18n("Show DTD Toolbar"), 0, TQT_TQOBJECT(ac), "view_dtd_toolbar"); + + connect(m_quanta->showDTDToolbar, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotToggleDTDToolbar(bool))); m_quanta->showDTDToolbar->setCheckedState(i18n("Hide DTD Toolbar")); new KAction(i18n("Complete Text"), CTRL+Key_Space, - m_quanta, TQT_SLOT(slotShowCompletion()), ac,"show_completion"); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotShowCompletion()), ac,"show_completion"); new KAction(i18n("Completion Hints"), CTRL+SHIFT+Key_Space, - m_quanta, TQT_SLOT(slotShowCompletionHint()), ac,"show_completion_hint"); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotShowCompletionHint()), ac,"show_completion_hint"); - KStdAction::back(m_quanta, TQT_SLOT( slotBack() ), ac, "w_back"); - KStdAction::forward(m_quanta, TQT_SLOT( slotForward() ), ac, "w_forward"); + KStdAction::back(TQT_TQOBJECT(m_quanta), TQT_SLOT( slotBack() ), ac, "w_back"); + KStdAction::forward(TQT_TQOBJECT(m_quanta), TQT_SLOT( slotForward() ), ac, "w_forward"); - new KAction(i18n("Open File: none"), 0, m_quanta, TQT_SLOT(slotOpenFileUnderCursor()), ac, "open_file_under_cursor"); - new KAction(i18n("Upload..."), 0, m_quanta, TQT_SLOT(slotUploadFile()), ac, "upload_file"); - new KAction(i18n("Delete File"), 0, m_quanta, TQT_SLOT(slotDeleteFile()), ac, "delete_file"); + new KAction(i18n("Open File: none"), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotOpenFileUnderCursor()), TQT_TQOBJECT(ac), "open_file_under_cursor"); + new KAction(i18n("Upload..."), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotUploadFile()), TQT_TQOBJECT(ac), "upload_file"); + new KAction(i18n("Delete File"), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotDeleteFile()), TQT_TQOBJECT(ac), "delete_file"); TQString ss = i18n("Upload Opened Project Files..."); -/* new KAction(i18n("Upload Opened Project Files"), 0, m_quanta, TQT_SLOT(slotUploadOpenedFiles()), ac, "upload_opened_files"); */ +/* new KAction(i18n("Upload Opened Project Files"), 0, TQT_TQOBJECT(m_quanta), TQT_SLOT(slotUploadOpenedFiles()), TQT_TQOBJECT(ac), "upload_opened_files"); */ TQString error; int el, ec; @@ -963,7 +963,7 @@ void QuantaInit::initActions() n = n.nextSibling(); } } else - kdError(24000) << TQString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl; + kdError(24000) << TQString("Error %1 at (%2, %3) in %4").tqarg(error).tqarg(el).tqarg(ec).tqarg(f.name()) << endl; f.close(); } m_quanta->m_actions->clear(); @@ -990,7 +990,7 @@ void QuantaInit::initActions() n = n.nextSibling(); } } else - kdError(24000) << TQString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl; + kdError(24000) << TQString("Error %1 at (%2, %3) in %4").tqarg(error).tqarg(el).tqarg(ec).tqarg(f.name()) << endl; f.close(); } } else @@ -1001,17 +1001,17 @@ void QuantaInit::initActions() // create the preview action m_quanta->showPreviewAction = new KToolBarPopupAction( i18n( "&Preview" ), "preview", Key_F6, - m_quanta, TQT_SLOT( slotToggleShowPreview() ), - ac, "show_preview" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotToggleShowPreview() ), + TQT_TQOBJECT(ac), "show_preview" ); KAction *act = new KAction( i18n( "Preview Without Frames" ), "", 0, - m_quanta, TQT_SLOT(slotShowNoFramesPreview()), - ac, "show_preview_no_frames" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotShowNoFramesPreview()), + TQT_TQOBJECT(ac), "show_preview_no_frames" ); act->plug(m_quanta->showPreviewAction->popupMenu()); act = new KAction( i18n( "View with &Konqueror" ), "konqueror", Key_F12, - m_quanta, TQT_SLOT( slotViewInKFM() ), - ac, "view_with_konqueror" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotViewInKFM() ), + TQT_TQOBJECT(ac), "view_with_konqueror" ); act->plug(m_quanta->showPreviewAction->popupMenu()); @@ -1032,62 +1032,62 @@ void QuantaInit::initActions() act->plug(m_quanta->showPreviewAction->popupMenu()); act = new KAction( i18n( "View with L&ynx" ), "terminal", 0, - m_quanta, TQT_SLOT( slotViewInLynx() ), - ac, "view_with_lynx" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotViewInLynx() ), + TQT_TQOBJECT(ac), "view_with_lynx" ); act->plug(m_quanta->showPreviewAction->popupMenu()); (void) new KAction( i18n( "Table Editor..." ), "quick_table", 0, - m_quanta, TQT_SLOT( slotTagEditTable() ), - ac, "tag_edit_table" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotTagEditTable() ), + TQT_TQOBJECT(ac), "tag_edit_table" ); (void) new KAction( i18n( "Quick List..." ), "quick_list", 0, - m_quanta, TQT_SLOT( slotTagQuickList() ), - ac, "tag_quick_list" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotTagQuickList() ), + TQT_TQOBJECT(ac), "tag_quick_list" ); (void) new KAction( i18n( "Color..." ), "colorize", CTRL+SHIFT+Key_C, - m_quanta, TQT_SLOT( slotTagColor() ), - ac, "tag_color" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotTagColor() ), + TQT_TQOBJECT(ac), "tag_color" ); (void) new KAction( i18n( "Email..." ), "tag_mail", 0, - m_quanta, TQT_SLOT( slotTagMail() ), - ac, "tag_mail" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotTagMail() ), + TQT_TQOBJECT(ac), "tag_mail" ); (void) new KAction( i18n( "Misc. Tag..." ), "tag_misc", CTRL+SHIFT+Key_T, - m_quanta, TQT_SLOT( slotTagMisc() ), - ac, "tag_misc" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotTagMisc() ), + TQT_TQOBJECT(ac), "tag_misc" ); (void) new KAction( i18n( "Frame Wizard..." ), "frame", 0, - m_quanta, TQT_SLOT( slotFrameWizard() ), - ac, "tag_frame_wizard" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotFrameWizard() ), + TQT_TQOBJECT(ac), "tag_frame_wizard" ); (void) new KAction( i18n( "Paste &HTML Quoted" ), "editpaste", 0, - m_quanta, TQT_SLOT( slotPasteHTMLQuoted() ), - ac, "edit_paste_html_quoted" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotPasteHTMLQuoted() ), + TQT_TQOBJECT(ac), "edit_paste_html_quoted" ); (void) new KAction( i18n( "Paste &URL Encoded" ), "editpaste", 0, - m_quanta, TQT_SLOT( slotPasteURLEncoded() ), - ac, "edit_paste_url_encoded" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotPasteURLEncoded() ), + TQT_TQOBJECT(ac), "edit_paste_url_encoded" ); (void) new KAction( i18n( "Insert CSS..." ),"css", 0, - m_quanta, TQT_SLOT( slotInsertCSS() ), - ac, "insert_css" ); + TQT_TQOBJECT(m_quanta), TQT_SLOT( slotInsertCSS() ), + TQT_TQOBJECT(ac), "insert_css" ); // special-character combo KAction* char_action = new KAction( i18n( "Insert Special Character" ), "charset", 0, - ac, "insert_char" ); + TQT_TQOBJECT(ac), "insert_char" ); connect( char_action, TQT_SIGNAL(activated()), - m_quanta, TQT_SLOT(slotInsertChar()) ); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotInsertChar()) ); - connect(m_quanta, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); - connect(m_quanta->doc(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); - connect(ViewManager::ref(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + connect(m_quanta, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), TQPEvents::ref(TQT_TQOBJECT(m_quanta)), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + connect(m_quanta->doc(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), TQPEvents::ref(TQT_TQOBJECT(m_quanta)), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + connect(ViewManager::ref(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), TQPEvents::ref(TQT_TQOBJECT(m_quanta)), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); - QuantaBookmarks *m_bookmarks = new QuantaBookmarks(ViewManager::ref(m_quanta)); + QuantaBookmarks *m_bookmarks = new QuantaBookmarks(ViewManager::ref(TQT_TQOBJECT(m_quanta))); m_bookmarks->createActions(ac); - connect(m_bookmarks, TQT_SIGNAL(gotoFileAndLine(const TQString&, int, int)), m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); + connect(m_bookmarks, TQT_SIGNAL(gotoFileAndLine(const TQString&, int, int)), TQT_TQOBJECT(m_quanta), TQT_SLOT(gotoFileAndLine(const TQString&, int, int))); } /** Initialize the plugin architecture. */ @@ -1098,9 +1098,9 @@ void QuantaInit::initPlugins() m_quanta->m_pluginInterface = QuantaPluginInterface::ref(m_quanta); connect(m_quanta->m_pluginInterface, TQT_SIGNAL(hideSplash()), - m_quanta, TQT_SLOT(slotHideSplash())); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotHideSplash())); connect(m_quanta->m_pluginInterface, TQT_SIGNAL(statusMsg(const TQString &)), - m_quanta, TQT_SLOT(slotStatusMsg(const TQString & ))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotStatusMsg(const TQString & ))); m_quanta->m_pluginInterface->readConfig(); if (!m_quanta->m_pluginInterface->pluginAvailable("KFileReplace")) @@ -1140,7 +1140,7 @@ void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList) { // when quanta crashes and file autoreloading option is on // then if user restarts quanta, the backup copies will reload - TQString backedUpFileName = (*backedUpUrlsIt).left((*backedUpUrlsIt).findRev(".")); //the filename without the PID + TQString backedUpFileName = (*backedUpUrlsIt).left((*backedUpUrlsIt).tqfindRev(".")); //the filename without the PID bool notFound; TQString autosavedPath = searchPathListEntry(backedUpFileName, autosavedUrlsList, notFound); if (!autosavedPath.isEmpty()) //the current item was autosaved and is not in use by another Quanta @@ -1180,9 +1180,9 @@ void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList) "Backup file size: <b>%4</b><br>" "Backup created on: <b>%5</b><br><br>" "</qt>") - .arg(originalVersion.prettyURL(0, KURL::StripFileProtocol )) - .arg(KIO::convertSize(origSize)).arg(origTime) - .arg(KIO::convertSize(backupSize)).arg(backupTime)); + .tqarg(originalVersion.prettyURL(0, KURL::StripFileProtocol )) + .tqarg(KIO::convertSize(origSize)).tqarg(origTime) + .tqarg(KIO::convertSize(backupSize)).tqarg(backupTime)); w->buttonLoad->setText(i18n("&Restore the file from backup")); w->buttonIgnore->setText(i18n("Do ¬ restore the file from backup")); delete w->warningLabel; @@ -1199,9 +1199,9 @@ void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList) //backup the current version and restore it from the autosaved backup KURL backupURL = originalVersion; backupURL.setPath(backupURL.path() + "." + TQString::number(getpid(),10) + ".backup"); - QExtFileInfo::copy(originalVersion, backupURL, -1, true, false, m_quanta); - QExtFileInfo::copy(autosavedVersion, originalVersion, -1, true, false, m_quanta); - //we save a list of autosaved file names so "KQApplicationPrivate::init()" + TQExtFileInfo::copy(originalVersion, backupURL, -1, true, false, m_quanta); + TQExtFileInfo::copy(autosavedVersion, originalVersion, -1, true, false, m_quanta); + //we save a list of autosaved file names so "KTQApplicationPrivate::init()" //can open them. If autosavedVersion.path().right(1) == "U" then we are recovering //an untitled document if(isUntitledDocument) @@ -1285,11 +1285,11 @@ void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList) *(execCommand) << TQStringList::split(" ",cmd); connect(execCommand, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), - m_quanta, TQT_SLOT(slotGetScriptOutput(KProcess*,char*,int))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotGetScriptOutput(KProcess*,char*,int))); connect(execCommand, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), - m_quanta, TQT_SLOT(slotGetScriptError(KProcess*,char*,int))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotGetScriptError(KProcess*,char*,int))); connect(execCommand, TQT_SIGNAL(processExited(KProcess*)), - m_quanta, TQT_SLOT(slotProcessExited(KProcess*))); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotProcessExited(KProcess*))); if (!execCommand->start(KProcess::NotifyOnExit,KProcess::All)) { @@ -1300,9 +1300,9 @@ void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList) //To avoid lock-ups, start a timer. TQTimer *timer = new TQTimer(m_quanta); connect(timer, TQT_SIGNAL(timeout()), - m_quanta, TQT_SLOT(slotProcessTimeout())); + TQT_TQOBJECT(m_quanta), TQT_SLOT(slotProcessTimeout())); timer->start(180*1000, true); - QExtFileInfo internalFileInfo; + TQExtFileInfo internalFileInfo; m_quanta->m_loopStarted = true; internalFileInfo.enter_loop(); delete timer; @@ -1341,14 +1341,14 @@ void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList) } } - return TQString::null; + return TQString(); } /** Retrieves hashed path from the name of a backup file */ TQString QuantaInit::retrieveHashedPath(const TQString& filename) { - int lastPoint = filename.findRev("."); - int Ppos = filename.find("P", lastPoint); + int lastPoint = filename.tqfindRev("."); + int Ppos = filename.tqfind("P", lastPoint); return filename.mid(lastPoint + 1, Ppos - lastPoint); } @@ -1357,11 +1357,11 @@ TQString QuantaInit::retrieveHashedPath(const TQString& filename) /** Retrieves PID from the name of a backup file */ TQString QuantaInit::retrievePID(const TQString& filename) { - TQString strPID = TQString::null; - strPID = filename.mid(filename.findRev("P") + 1); + TQString strPID = TQString(); + strPID = filename.mid(filename.tqfindRev("P") + 1); if (strPID.isEmpty()) - strPID = filename.mid(filename.findRev("N") + 1); + strPID = filename.mid(filename.tqfindRev("N") + 1); if (strPID.endsWith("U")) strPID = strPID.left(strPID.length() - 1); @@ -1460,7 +1460,7 @@ void QuantaInit::checkRuntimeDependencies() dependencies.append(dependency); - dependency.name = "KLinkStatus"; + dependency.name = "KLinktqStatus"; dependency.execName = "Link Checker"; dependency.url = "http://kde-apps.org/content/show.php?content=12318"; dependency.description = i18n("link validity checking"); @@ -1482,13 +1482,13 @@ void QuantaInit::checkRuntimeDependencies() if (dependency.type == Dependency::Executable) { if (KStandardDirs::findExe(dependency.execName).isNull()) - errorStr += TQString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description); + errorStr += TQString(stdErrorMsg).tqarg(dependency.name).tqarg(dependency.url).tqarg(dependency.description); } else if (dependency.type == Dependency::Plugin) { if (!QuantaPlugin::validatePlugin(m_quanta->m_pluginInterface->plugin(dependency.execName))) - errorStr += TQString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description); + errorStr += TQString(stdErrorMsg).tqarg(dependency.name).tqarg(dependency.url).tqarg(dependency.description); } } @@ -1500,14 +1500,14 @@ void QuantaInit::checkRuntimeDependencies() &appId); if (appId.isEmpty()) { - errorStr += TQString(stdErrorMsg).arg("Cervisia (cvsservice)").arg("http://www.kde.org/apps/cervisia").arg(i18n("integrated CVS management")); + errorStr += TQString(stdErrorMsg).tqarg("Cervisia (cvsservice)").tqarg("http://www.kde.org/apps/cervisia").tqarg(i18n("integrated CVS management")); } else { CVSService::ref(m_quanta->actionCollection())->setAppId(appId); connect(CVSService::ref(), TQT_SIGNAL(clearMessages()), m_quanta->m_messageOutput, TQT_SLOT(clear())); connect(CVSService::ref(), TQT_SIGNAL(showMessage(const TQString&, bool)), m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&, bool))); - connect(CVSService::ref(), TQT_SIGNAL(commandExecuted(const TQString&, const TQStringList&)), m_quanta, TQT_SLOT(slotCVSCommandExecuted(const TQString&, const TQStringList&))); - //connect(CVSService::ref(), TQT_SIGNAL(statusMsg(const TQString &)), m_quanta, TQT_SLOT(slotStatusMsg(const TQString & ))); + connect(CVSService::ref(), TQT_SIGNAL(commandExecuted(const TQString&, const TQStringList&)), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotCVSCommandExecuted(const TQString&, const TQStringList&))); + //connect(CVSService::ref(), TQT_SIGNAL(statusMsg(const TQString &)), TQT_TQOBJECT(m_quanta), TQT_SLOT(slotStatusMsg(const TQString & ))); m_quanta->fTab->plugCVSMenu(); pTab->plugCVSMenu(); } @@ -1569,7 +1569,7 @@ void QuantaInit::readAbbreviations() TQStringList::Iterator it; for (it = filenameList.begin(); it != filenameList.end(); ++it) { - int pos =(*it).find('|'); + int pos =(*it).tqfind('|'); TQString dirName = (*it).mid(pos + 1); TQString dtepName = (*it).left(pos); KURL dirURL(dirName); @@ -1622,7 +1622,7 @@ int QuantaInit::runningQuantas() int i = 0; for (QCStringList::iterator it = list.begin(); it != list.end(); ++it) { - if (TQString(*it).startsWith("quanta", false)) + if (TQString(*it).tqstartsWith("quanta", false)) ++i; } return i; diff --git a/quanta/src/quanta_init.h b/quanta/src/quanta_init.h index 0b1f6ae9..17bbb09a 100644 --- a/quanta/src/quanta_init.h +++ b/quanta/src/quanta_init.h @@ -19,7 +19,7 @@ #define QUANTAINIT_H -// include files for Qt +// include files for TQt #include <tqobject.h> // include files for KDE @@ -39,9 +39,10 @@ class KConfig; /** * The base class for Quanta application windows. */ -class QuantaInit : public QObject +class QuantaInit : public TQObject { Q_OBJECT + TQ_OBJECT public: QuantaInit(QuantaApp * quantaApp); diff --git a/quanta/src/quantadoc.cpp b/quanta/src/quantadoc.cpp index 31fb795b..51729fb6 100644 --- a/quanta/src/quantadoc.cpp +++ b/quanta/src/quantadoc.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// include files for Qt +// include files for TQt #include <tqdir.h> #include <tqfileinfo.h> #include <tqwidget.h> @@ -76,7 +76,7 @@ #include "tagactionmanager.h" #include "tagactionset.h" -QuantaDoc::QuantaDoc(TQWidget *parent, const char *name) : TQObject(parent, name) +QuantaDoc::QuantaDoc(TQWidget *tqparent, const char *name) : TQObject(tqparent, name) { fileWatcher = new KDirWatch(this); @@ -132,7 +132,7 @@ bool QuantaDoc::newDocument( const KURL& url, bool switchToExisting ) else // select opened if (switchToExisting) { - view->document()->checkDirtyStatus(); + view->document()->checkDirtytqStatus(); if (view != ViewManager::ref()->activeView()) { view->activate(); @@ -147,7 +147,7 @@ bool QuantaDoc::newDocument( const KURL& url, bool switchToExisting ) void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding, bool switchToExisting, bool readOnly) { - bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false); + bool idleTimertqStatus = quantaApp->slotEnableIdleTimer(false); KURL url = urlToOpen; if (url.isLocalFile()) { @@ -158,7 +158,7 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding, TQString encoding = a_encoding; if (!newDocument(url, switchToExisting)) { - quantaApp->slotEnableIdleTimer(idleTimerStatus); + quantaApp->slotEnableIdleTimer(idleTimertqStatus); return; } Document *w = ViewManager::ref()->activeDocument(); @@ -171,7 +171,7 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding, } if (!url.isEmpty()) { - if (QExtFileInfo::exists(url, true, quantaApp)) + if (TQExtFileInfo::exists(url, true, quantaApp)) { if (encoding.isEmpty()) encoding = quantaApp->defaultEncoding(); @@ -211,23 +211,23 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding, highlightIf->setHlMode(htmlIdx); } } - emit newStatus(); + emit newtqStatus(); } - quantaApp->slotEnableIdleTimer(idleTimerStatus); + quantaApp->slotEnableIdleTimer(idleTimertqStatus); } void QuantaDoc::slotOpeningFailed(const KURL &url) { Q_UNUSED(url); - bool signalStatus = signalsBlocked(); + bool signaltqStatus = signalsBlocked(); blockSignals(false); emit hideSplash(); //Seems to be not needed anymore since KDE 3.2, but keep until it's completely verified /* - KMessageBox::error(quantaApp, i18n("<qt>Cannot open document <b>%1</b>.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol))); + KMessageBox::error(quantaApp, i18n("<qt>Cannot open document <b>%1</b>.</qt>").tqarg(url.prettyURL(0, KURL::StripFileProtocol))); */ ViewManager::ref()->removeActiveView(); - blockSignals(signalStatus); + blockSignals(signaltqStatus); } void QuantaDoc::slotOpeningCompleted(const KURL &url) @@ -240,10 +240,10 @@ void QuantaDoc::slotOpeningCompleted(const KURL &url) quantaApp->reparse(true); if (url.isLocalFile()) quantaApp->debugger()->fileOpened(url.prettyURL(0, KURL::StripFileProtocol)); - quantaApp->slotNewStatus(); + quantaApp->slotNewtqStatus(); quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol)); Project::ref()->loadCursorPosition(w->url(), dynamic_cast<KTextEditor::ViewCursorInterface*>(w->view())); - emit eventHappened("after_open", url.url(), TQString::null); + emit eventHappened("after_open", url.url(), TQString()); bool flag = TagActionManager::canIndentDTD(w->defaultDTD()->name); quantaApp->actionCollection()->action("apply_source_indentation")->setEnabled(flag); @@ -272,7 +272,7 @@ void QuantaDoc::slotAttribPopup() if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(),tagName) ) { - TQString caption = i18n("Attributes of <%1>").arg(tagName); + TQString caption = i18n("Attributes of <%1>").tqarg(tagName); attribMenu->insertTitle( caption ); AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(),tagName ); @@ -281,23 +281,23 @@ void QuantaDoc::slotAttribPopup() { name = list->at(i)->name; attribMenu->insertItem( name , i);//list->findIndex(*item) ); - if (attrList.contains(name.ascii())) + if (attrList.tqcontains(name.ascii())) { attribMenu->setItemEnabled( i , false ); } menuId++; } - QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName); + TQTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName); for (TQStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it) { TQPopupMenu* popUpMenu = new TQPopupMenu(attribMenu, (*it).latin1()); - AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it); + AttributeList *attrs = qtag->tqparentDTD->commonAttrs->tqfind(*it); for (uint j = 0; j < attrs->count(); j++) { name = attrs->at(j)->name; popUpMenu->insertItem(name, ++menuId); - if (attrList.contains(name.ascii())) + if (attrList.tqcontains(name.ascii())) { popUpMenu->setItemEnabled( menuId , false ); } @@ -317,7 +317,7 @@ void QuantaDoc::slotAttribPopup() } } else { - TQString message = i18n("Unknown tag: %1").arg(tagName); + TQString message = i18n("Unknown tag: %1").tqarg(tagName); quantaApp->slotStatusMsg( message ); } } @@ -345,10 +345,10 @@ void QuantaDoc::slotInsertAttrib( int id ) attrStr = list->at(id)->name; } else { - QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName); + TQTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName); for (TQStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it) { - AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it); + AttributeList *attrs = qtag->tqparentDTD->commonAttrs->tqfind(*it); menuId += attrs->count(); if (id <= menuId) { diff --git a/quanta/src/quantadoc.h b/quanta/src/quantadoc.h index 37891d69..48c3b631 100644 --- a/quanta/src/quantadoc.h +++ b/quanta/src/quantadoc.h @@ -25,17 +25,18 @@ class Document; class KConfig; class KURL; -class QuantaDoc : public QObject +class QuantaDoc : public TQObject { Q_OBJECT + TQ_OBJECT public: - QuantaDoc(TQWidget *parent, const char *name=0); + QuantaDoc(TQWidget *tqparent, const char *name=0); ~QuantaDoc(); bool newDocument(const KURL&, bool switchToExisting = true); - void openDocument(const KURL&, const TQString& a_encoding = TQString::null, bool switchToExisting = true, bool readOnly = false); + void openDocument(const KURL&, const TQString& a_encoding = TQString(), bool switchToExisting = true, bool readOnly = false); public slots: /** close documents. */ @@ -47,7 +48,7 @@ public slots: void slotOpeningFailed(const KURL &url); signals: - void newStatus(); + void newtqStatus(); void hideSplash(); void eventHappened(const TQString&, const TQString&, const TQString& ); diff --git a/quanta/src/quantaview.cpp b/quanta/src/quantaview.cpp index 51f93294..e0c761e9 100644 --- a/quanta/src/quantaview.cpp +++ b/quanta/src/quantaview.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// include files for Qt +// include files for TQt #include <tqprinter.h> #include <tqpainter.h> #include <tqtabbar.h> @@ -76,8 +76,8 @@ extern int NN; extern TQValueList<Node*> nodes; -QuantaView::QuantaView(TQWidget *parent, const char *name, const TQString &caption ) - : KMdiChildView(parent, name) +QuantaView::QuantaView(TQWidget *tqparent, const char *name, const TQString &caption ) + : KMdiChildView(tqparent, name) , m_document(0L) , m_plugin(0L) , m_customWidget(0L) @@ -95,7 +95,7 @@ QuantaView::QuantaView(TQWidget *parent, const char *name, const TQString &capti //get the reference to the user toolbar holding widget ToolbarTabWidget *m_toolbarTab = ToolbarTabWidget::ref(); m_toolbarTab->reparent(this, 0, TQPoint(), true); - m_toolbarTab ->setFocusPolicy( TQWidget::NoFocus ); + m_toolbarTab ->setFocusPolicy( TQ_NoFocus ); //create a splitter to separate the VPL and document area m_splitter = new TQSplitter(Qt::Vertical, this); @@ -159,7 +159,7 @@ bool QuantaView::mayRemove() KURL url = m_document->url(); Project::ref()->saveBookmarks(url, dynamic_cast<KTextEditor::MarkInterface*>(m_document->doc())); if (!unmodifiedUntitled) - emit eventHappened("before_close", url.url(), TQString::null); + emit eventHappened("before_close", url.url(), TQString()); m_currentViewsLayout = -1; // m_document->closeTempFile(); if (!m_document->isUntitled() && url.isLocalFile()) @@ -172,7 +172,7 @@ bool QuantaView::mayRemove() quantaApp->menuBar()->activateItemAt(-1); quantaApp->guiFactory()->removeClient(m_document->view()); if (!unmodifiedUntitled) - emit eventHappened("after_close", url.url(), TQString::null); + emit eventHappened("after_close", url.url(), TQString()); } /* kdDebug(24000) << "Calling reparse from close " << endl; parser->setSAParserEnabled(true); @@ -208,7 +208,7 @@ void QuantaView::addDocument(Document *document) reloadUpdateTimers(); - m_currentViewsLayout = -1; //force loading of this layout + m_currentViewsLayout = -1; //force loading of this tqlayout slotSetSourceLayout(); } @@ -263,7 +263,7 @@ void QuantaView::addCustomWidget(TQWidget *widget, const TQString &label) void QuantaView::reloadLayout() { int currentViewsLayout = m_currentViewsLayout; - m_currentViewsLayout = -1; //force loading of this layout + m_currentViewsLayout = -1; //force loading of this tqlayout switch (currentViewsLayout) { case SourceOnly: @@ -290,7 +290,7 @@ void QuantaView::updateTab() TQIconSet mimeIcon (KMimeType::pixmapForURL(m_document->url(), 0, KIcon::Small)); if (mimeIcon.isNull()) mimeIcon = TQIconSet(SmallIcon("document")); - TQString urlStr = QExtFileInfo::shortName(m_document->url().path()); + TQString urlStr = TQExtFileInfo::shortName(m_document->url().path()); if (m_document->isModified()) { if (qConfig.showCloseButtons == "ShowAlways") @@ -393,9 +393,9 @@ void QuantaView::slotSetSourceAndVPLLayout() KToggleAction *ta = (KToggleAction *) quantaApp->actionCollection()->action( "show_kafka_and_quanta" ); - if (m_document->defaultDTD()->name.contains("HTML", false) == 0) + if (m_document->defaultDTD()->name.tqcontains("HTML", false) == 0) { - KMessageBox::information(this, i18n("The VPL Mode does not support the current DTD, at the moment: %1").arg(m_document->defaultDTD()->nickName)); + KMessageBox::information(this, i18n("The VPL Mode does not support the current DTD, at the moment: %1").tqarg(m_document->defaultDTD()->nickName)); KToggleAction *ta2 = (KToggleAction *) quantaApp->actionCollection()->action( "show_quanta_editor" ); if (ta2) ta2->setChecked(true); @@ -442,9 +442,9 @@ void QuantaView::slotSetVPLOnlyLayout() KToggleAction *ta = (KToggleAction *) quantaApp->actionCollection()->action( "show_kafka_view" ); - if (m_document->defaultDTD()->name.contains("HTML", false) == 0) + if (m_document->defaultDTD()->name.tqcontains("HTML", false) == 0) { - KMessageBox::information(this, i18n("The VPL Mode does not support the current DTD, at the moment: %1").arg(m_document->defaultDTD()->nickName)); + KMessageBox::information(this, i18n("The VPL Mode does not support the current DTD, at the moment: %1").tqarg(m_document->defaultDTD()->nickName)); KToggleAction *ta2 = (KToggleAction *) quantaApp->actionCollection()->action( "show_quanta_editor" ); if (ta2) ta2->setChecked(true); @@ -786,9 +786,9 @@ void QuantaView::insertOutputInTheNodeTree(const TQString &str1, const TQString NodeModifsSet *modifs; DOM::Node domNode, domStartContainer, domEndContainer; TQString tagName; - QTag *nodeQTag, *qTag, *nodeParentQTag; + TQTag *nodeTQTag, *qTag, *nodeParentTQTag; Node *nodeCursor, *startContainer, *endContainer, *nodeParent, *dummy; - TQPtrList<QTag> qTagList; + TQPtrList<TQTag> qTagList; int startCol, startLine, endCol, endLine; bool specialTagInsertion = false; long nodeOffset, startOffset, endOffset, domNodeOffset; @@ -833,24 +833,24 @@ void QuantaView::insertOutputInTheNodeTree(const TQString &str1, const TQString nodeParent = nodeCursor; if (nodeParent->tag->type == Tag::Text) - nodeParent = nodeParent->parent; + nodeParent = nodeParent->tqparent; - //Checking if at least one parent of node can have a Text Node as child, otherwise + //Checking if at least one tqparent of node can have a Text Node as child, otherwise //it is impossible for the - //user to add this node. In that case, try to insert the Node in the closest parent accepting it. + //user to add this node. In that case, try to insert the Node in the closest tqparent accepting it. //e.g. TR : a normal insertion would require to have the caret in the TABLE Node, but it is //impossible - nodeQTag = QuantaCommon::tagFromDTD(m_document->defaultDTD(), + nodeTQTag = QuantaCommon::tagFromDTD(m_document->defaultDTD(), node->tag->name); - if (!nodeQTag) + if (!nodeTQTag) return; - qTagList = nodeQTag->parents(); + qTagList = nodeTQTag->tqparents(); #ifdef HEAVY_DEBUG - kdDebug(25001)<< "nodeQTag name : " << nodeQTag->name() << endl; - /**kdDebug(25001)<< nodeQTag->isChild("#text", false) << endl; - kdDebug(25001)<< nodeQTag->isChild("#text", true) << endl;*/ + kdDebug(25001)<< "nodeTQTag name : " << nodeTQTag->name() << endl; + /**kdDebug(25001)<< nodeTQTag->isChild("#text", false) << endl; + kdDebug(25001)<< nodeTQTag->isChild("#text", true) << endl;*/ #endif for (qTag = qTagList.first(); qTag; qTag = qTagList.next()) { @@ -904,13 +904,13 @@ void QuantaView::insertOutputInTheNodeTree(const TQString &str1, const TQString nodeTreeModified = false; if (specialTagInsertion) { - //let's try to insert this node in the closest parent accepting it. + //let's try to insert this node in the closest tqparent accepting it. while (nodeParent) { - nodeParentQTag = + nodeParentTQTag = QuantaCommon::tagFromDTD(m_document->defaultDTD(), nodeParent->tag->name); - if (nodeParentQTag && nodeParentQTag->isChild(node)) + if (nodeParentTQTag && nodeParentTQTag->isChild(node)) { nodeCursor = kafkaCommon::createMandatoryNodeSubtree(node, m_document); @@ -919,10 +919,10 @@ void QuantaView::insertOutputInTheNodeTree(const TQString &str1, const TQString nodeTreeModified = true; break; } - nodeParent = nodeParent->parent; + nodeParent = nodeParent->tqparent; } } - else if (hasSelection && !nodeQTag->isSingle()) + else if (hasSelection && !nodeTQTag->isSingle()) { //If some text is selected in kafka, surround the selection with the new Node. if(!startContainer || !endContainer) @@ -934,7 +934,7 @@ void QuantaView::insertOutputInTheNodeTree(const TQString &str1, const TQString else { //Nothing is selected, simply inserting the Node if it is not an inline. -/* if(!kafkaCommon::isInline(node->tag->name) || nodeQTag->isSingle()) +/* if(!kafkaCommon::isInline(node->tag->name) || nodeTQTag->isSingle()) {*/ nodeTreeModified = kafkaCommon::DTDinsertRemoveNode(node, nodeCursor, (int)nodeOffset, nodeCursor, (int)nodeOffset, m_document, &nodeCursor, nodeOffset, modifs); @@ -1021,14 +1021,14 @@ void QuantaView::activated() ToolbarTabWidget::ref()->reparent(this, 0, TQPoint(), qConfig.enableDTDToolbar); m_viewLayout->addWidget(ToolbarTabWidget::ref(), 0 , 0); quantaApp->partManager()->setActivePart(m_document->doc(), m_document->view()); - m_document->checkDirtyStatus(); + m_document->checkDirtytqStatus(); StructTreeView::ref()->useOpenLevelSetting = true; quantaApp->slotLoadToolbarForDTD(m_document->getDTDIdentifier()); //TEMP : If the activated document is not a (X)HTML document, disable smartTagInsertion //Will be removed when VPL will support every DTD KAction *action = quantaApp->actionCollection()->action("smart_tag_insertion"); - if(action && m_document->defaultDTD()->name.contains("HTML", false) == 0) + if(action && m_document->defaultDTD()->name.tqcontains("HTML", false) == 0) { qConfig.smartTagInsertion = false; (static_cast<KToggleAction* >(action))->setChecked(false); @@ -1064,7 +1064,7 @@ bool QuantaView::saveModified(bool ask) int want_save; if (ask) want_save = KMessageBox::warningYesNoCancel(this, - i18n("The file \"%1\" has been modified.\nDo you want to save it?").arg(fileName), + i18n("The file \"%1\" has been modified.\nDo you want to save it?").tqarg(fileName), i18n("Warning"), KStdGuiItem::save(), KStdGuiItem::discard()); else want_save = KMessageBox::Yes; @@ -1108,7 +1108,7 @@ bool QuantaView::saveDocument(const KURL& url) if (url.isEmpty()) return false; - emit eventHappened("before_save", url.url(), TQString::null); + emit eventHappened("before_save", url.url(), TQString()); m_saveResult = true; KURL oldURL = m_document->url(); if (!m_document->isUntitled() && oldURL.isLocalFile()) @@ -1125,7 +1125,7 @@ bool QuantaView::saveDocument(const KURL& url) return false; //saving to a local file failed } else //successful saving to a local file { - m_document->setDirtyStatus(false); + m_document->setDirtytqStatus(false); m_document->removeBackup(quantaApp->config()); fileWatcher->addFile(m_document->url().path()); // kdDebug(24000) << "addFile[saveDocument, 2]: " << m_document->url().path() << endl; @@ -1140,7 +1140,7 @@ bool QuantaView::saveDocument(const KURL& url) if (m_saveResult) { //start an event loop and wait until the saving finished - QExtFileInfo internalFileInfo; + TQExtFileInfo internalFileInfo; m_eventLoopStarted = true; internalFileInfo.enter_loop(); } @@ -1161,7 +1161,7 @@ bool QuantaView::saveDocument(const KURL& url) { setCaption(m_document->url().fileName()); } - emit eventHappened("after_save", m_document->url().url(), TQString::null); + emit eventHappened("after_save", m_document->url().url(), TQString()); return true; } @@ -1170,16 +1170,16 @@ void QuantaView::slotSavingFailed(const TQString &error) Q_UNUSED(error); m_saveResult = false; if (m_eventLoopStarted) - qApp->exit_loop(); + tqApp->exit_loop(); } void QuantaView::slotSavingCompleted() { m_saveResult = true; - m_document->setDirtyStatus(false); + m_document->setDirtytqStatus(false); m_document->removeBackup(quantaApp->config()); if (m_eventLoopStarted) - qApp->exit_loop(); + tqApp->exit_loop(); } #include "quantaview.moc" diff --git a/quanta/src/quantaview.h b/quanta/src/quantaview.h index e3688d93..dc6d7414 100644 --- a/quanta/src/quantaview.h +++ b/quanta/src/quantaview.h @@ -18,7 +18,7 @@ #ifndef QUANTAVIEW_H #define QUANTAVIEW_H -// include files for Qt +// include files for TQt #include <tqguardedptr.h> #include <tqwidget.h> #include <tqptrlist.h> @@ -64,10 +64,11 @@ class Node; class QuantaView : public KMdiChildView { Q_OBJECT + TQ_OBJECT public: - QuantaView(TQWidget *parent = 0, const char *name=0, const TQString &caption = TQString::null); + QuantaView(TQWidget *tqparent = 0, const char *name=0, const TQString &caption = TQString()); ~QuantaView(); /** returns true if the view can be removed, false otherwise */ @@ -104,7 +105,7 @@ public: void reloadVPLView(bool force = false); /** reload the Quanta view from the Node Tree. Set force to true if you want to reload even if not necessary. */ void reloadSourceView(bool force = false); - /** Return the curren views layout*/ + /** Return the curren views tqlayout*/ int currentViewsLayout() {return m_currentViewsLayout;} void reloadLayout(); @@ -129,12 +130,12 @@ public: void insertTag( const char *tag); /** Insert a new tag by bringing up the TagDialog. */ - void insertNewTag(const TQString &tag, const TQString &attr = TQString::null, bool insertInLine = true); + void insertNewTag(const TQString &tag, const TQString &attr = TQString(), bool insertInLine = true); /** * This function take the output of the TagAction, parse it into Nodes and insert it * in the Node tree. Then kafka will take care of updating itself from the Node Tree. */ - void insertOutputInTheNodeTree(const TQString &str1, const TQString &str2 = TQString::null, Node *node = 0L); + void insertOutputInTheNodeTree(const TQString &str1, const TQString &str2 = TQString(), Node *node = 0L); enum ViewFocus { SourceFocus = 0, @@ -220,7 +221,7 @@ private: TQGuardedPtr<KafkaDocument> m_kafkaDocument; TQSplitter *m_splitter; TQGridLayout *m_viewLayout; - int m_currentViewsLayout; ///< holds the current layout, which can be SourceOnly, VPLOnly or SourceAndVPL + int m_currentViewsLayout; ///< holds the current tqlayout, which can be SourceOnly, VPLOnly or SourceAndVPL int m_currentFocus; bool m_saveResult; bool m_eventLoopStarted; diff --git a/quanta/src/viewmanager.cpp b/quanta/src/viewmanager.cpp index 5d9ea103..152063c8 100644 --- a/quanta/src/viewmanager.cpp +++ b/quanta/src/viewmanager.cpp @@ -61,7 +61,7 @@ #define UPLOAD_ID 12 #define DELETE_ID 13 -ViewManager::ViewManager(TQObject *parent, const char *name) : TQObject(parent, name) +ViewManager::ViewManager(TQObject *tqparent, const char *name) : TQObject(tqparent, name) { m_lastActiveView = 0L; m_lastActiveEditorView = 0L; @@ -95,11 +95,11 @@ QuantaView* ViewManager::createView(const TQString &caption) connect(view, TQT_SIGNAL(cursorPositionChanged()), quantaApp, TQT_SLOT(slotNewLineColumn())); connect(view, TQT_SIGNAL(title(const TQString &)), quantaApp, TQT_SLOT(slotNewLineColumn())); connect(view, TQT_SIGNAL(dragInsert(TQDropEvent*)), this, TQT_SIGNAL(dragInsert(TQDropEvent *))); - connect(view, TQT_SIGNAL(hidePreview()), quantaApp, TQT_SLOT(slotChangePreviewStatus())); + connect(view, TQT_SIGNAL(hidePreview()), quantaApp, TQT_SLOT(slotChangePreviewtqStatus())); disconnect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView *)), 0, 0 ); connect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView*)), this, TQT_SLOT(slotCloseRequest(KMdiChildView*))); connect(view, TQT_SIGNAL(documentClosed(const KURL&)), this, TQT_SLOT(slotDocumentClosed(const KURL&))); - connect(view, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); + connect(view, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), TQPEvents::ref(), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& ))); return view; } @@ -107,8 +107,8 @@ QuantaView* ViewManager::createView(const TQString &caption) void ViewManager::createNewDocument() { int i = 1; - while (isOpened(KURL("file:"+i18n("Untitled%1").arg(i)))) i++; - TQString fname = i18n("Untitled%1").arg(i); + while (isOpened(KURL("file:"+i18n("Untitled%1").tqarg(i)))) i++; + TQString fname = i18n("Untitled%1").tqarg(i); QuantaView *view = createView(fname); #ifdef ENABLE_EDITORS @@ -118,10 +118,10 @@ void ViewManager::createNewDocument() "KTextEditor::Document" ); #else - KTextEditor::Document *doc = KTextEditor::createDocument ("libkatepart", view, "KTextEditor::Document"); + KTextEditor::Document *doc = KTextEditor::createDocument ("libkatepart", TQT_TQOBJECT(view), "KTextEditor::Document"); #endif Document *w = new Document(doc, 0L); - connect(w, TQT_SIGNAL(showAnnotation(uint, const TQString&, const QPair<TQString, TQString>&)), quantaApp->annotationOutput(), TQT_SLOT(insertAnnotation(uint, const TQString&, const QPair<TQString, TQString>&))); + connect(w, TQT_SIGNAL(showAnnotation(uint, const TQString&, const TQPair<TQString, TQString>&)), quantaApp->annotationOutput(), TQT_SLOT(insertAnnotation(uint, const TQString&, const TQPair<TQString, TQString>&))); TQString encoding = quantaApp->defaultEncoding(); KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(doc); if (encodingIf) @@ -138,8 +138,8 @@ void ViewManager::createNewDocument() popupIf->installPopup((TQPopupMenu *)quantaApp->factory()->container("popup_editor", quantaApp)); quantaApp->setFocusProxy(w->view()); - w->view()->setFocusPolicy(TQWidget::WheelFocus); - connect( v, TQT_SIGNAL(newStatus()), quantaApp, TQT_SLOT(slotNewStatus())); + w->view()->setFocusPolicy(TQ_WheelFocus); + connect( v, TQT_SIGNAL(newtqStatus()), quantaApp, TQT_SLOT(slotNewtqStatus())); quantaApp->slotNewPart(doc, true); // register new part in partmanager and make active view->addDocument(w); @@ -226,7 +226,7 @@ void ViewManager::slotViewActivated(KMdiChildView *view) parser->clearGroups(); parser->setSAParserEnabled(true); quantaApp->reparse(true); //FIXME - quantaApp->slotNewStatus(); + quantaApp->slotNewtqStatus(); quantaApp->slotNewLineColumn(); typingInProgress = false; //need to reset, as it's set to true in the above slots m_lastActiveView = qView; @@ -257,16 +257,16 @@ void ViewManager::slotCloseOtherTabs() if (dynamic_cast<QuantaView*>(currentView) && !static_cast<QuantaView*>(currentView)->document()) ToolbarTabWidget::ref()->reparent(0, 0, TQPoint(), false); KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator(); - //save the children first to a list, as removing invalidates our iterator - TQValueList<KMdiChildView *> children; + //save the tqchildren first to a list, as removing tqinvalidates our iterator + TQValueList<KMdiChildView *> tqchildren; for (it->first(); !it->isDone(); it->next()) { - children.append(it->currentItem()); + tqchildren.append(it->currentItem()); } delete it; KURL::List modifiedList; TQValueListIterator<KMdiChildView *> childIt; - for (childIt = children.begin(); childIt != children.end(); ++childIt) + for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt) { view = *childIt; qView = dynamic_cast<QuantaView*>(view); @@ -286,7 +286,7 @@ void ViewManager::slotCloseOtherTabs() if (dlg.exec() == TQDialog::Accepted) { filesToSave = dlg.filesToSave(); - for (childIt = children.begin(); childIt != children.end(); ++childIt) + for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt) { view = *childIt; qView = dynamic_cast<QuantaView*>(view); @@ -295,7 +295,7 @@ void ViewManager::slotCloseOtherTabs() Document *w = qView->document(); if (w) { - if (filesToSave.contains(w->url())) + if (filesToSave.tqcontains(w->url())) if (!qView->saveModified(false)) { return; //save aborted @@ -311,7 +311,7 @@ void ViewManager::slotCloseOtherTabs() } } - for (childIt = children.begin(); childIt != children.end(); ++childIt) + for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt) { view = *childIt; if (view != currentView) @@ -400,13 +400,13 @@ bool ViewManager::saveAll() { if (!w->isUntitled()) { - emit eventHappened("before_save", w->url().url(), TQString::null); + emit eventHappened("before_save", w->url().url(), TQString()); w->docUndoRedo->fileSaved(); w->save(); w->removeBackup(quantaApp->config()); if (w->isModified()) flagsave = false; - emit eventHappened("after_save", w->url().url(), TQString::null); + emit eventHappened("after_save", w->url().url(), TQString()); } else { if (!view->saveModified()) @@ -427,16 +427,16 @@ bool ViewManager::closeAll(bool createNew) parser->setSAParserEnabled(false); KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator(); QuantaView *view; - //save the children first to a list, as removing invalidates our iterator - TQValueList<KMdiChildView *> children; + //save the tqchildren first to a list, as removing tqinvalidates our iterator + TQValueList<KMdiChildView *> tqchildren; for (it->first(); !it->isDone(); it->next()) { - children.append(it->currentItem()); + tqchildren.append(it->currentItem()); } delete it; KURL::List modifiedList; TQValueListIterator<KMdiChildView *> childIt; - for (childIt = children.begin(); childIt != children.end(); ++childIt) + for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt) { view = dynamic_cast<QuantaView*>(*childIt); if (view) @@ -455,7 +455,7 @@ bool ViewManager::closeAll(bool createNew) if (dlg.exec() == TQDialog::Accepted) { filesToSave = dlg.filesToSave(); - for (childIt = children.begin(); childIt != children.end(); ++childIt) + for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt) { view = dynamic_cast<QuantaView*>(*childIt); if (view) @@ -463,7 +463,7 @@ bool ViewManager::closeAll(bool createNew) Document *w = view->document(); if (w) { - if (filesToSave.contains(w->url())) + if (filesToSave.tqcontains(w->url())) if (!view->saveModified(false)) { emit filesClosed(false); @@ -484,7 +484,7 @@ bool ViewManager::closeAll(bool createNew) disconnect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed())); ToolbarTabWidget::ref()->reparent(0L, 0, TQPoint(), false); - for (childIt = children.begin(); childIt != children.end(); ++childIt) + for (childIt = tqchildren.begin(); childIt != tqchildren.end(); ++childIt) { view = dynamic_cast<QuantaView*>(*childIt); if (view) @@ -528,7 +528,7 @@ bool ViewManager::closeAll(bool createNew) if (createNew) { createNewDocument(); - quantaApp->slotNewStatus(); + quantaApp->slotNewtqStatus(); } emit filesClosed(true); return true; @@ -604,7 +604,7 @@ void ViewManager::slotTabContextMenu(TQWidget *widget, const TQPoint& point) m_separatorVisible = true; m_tabPopup->insertSeparator(SEPARATOR_INDEX); } - if (Project::ref()->hasProject() && Project::ref()->contains(w->url())) + if (Project::ref()->hasProject() && Project::ref()->tqcontains(w->url())) m_tabPopup->setItemVisible(UPLOAD_ID, true); else m_tabPopup->setItemVisible(UPLOAD_ID, false); @@ -647,7 +647,7 @@ void ViewManager::slotTabContextMenu(TQWidget *widget, const TQPoint& point) m_tabPopup->insertSeparator(); m_cvsMenuId = m_tabPopup->insertItem(SmallIcon("cervisia"), i18n("CVS"), CVSService::ref()->menu()); } - if (Project::ref()->contains(w->url())) + if (Project::ref()->tqcontains(w->url())) CVSService::ref()->setRepository(Project::ref()->projectBaseURL().path()); else CVSService::ref()->setRepository(w->url().directory()); diff --git a/quanta/src/viewmanager.h b/quanta/src/viewmanager.h index 05278901..9b600d00 100644 --- a/quanta/src/viewmanager.h +++ b/quanta/src/viewmanager.h @@ -29,22 +29,23 @@ class KMdiChildView; /** This singleton class takes care of creating new views for documents, help, plugins, preview and so. * As the name says, it also manages the views. */ -class ViewManager : public QObject +class ViewManager : public TQObject { Q_OBJECT + TQ_OBJECT public: /** Returns a reference to the viewmanager object */ - static ViewManager* const ref(TQObject *parent = 0L, const char *name = 0L) + static ViewManager* const ref(TQObject *tqparent = 0L, const char *name = 0L) { static ViewManager *m_ref; - if (!m_ref) m_ref = new ViewManager(parent, name); + if (!m_ref) m_ref = new ViewManager(tqparent, name); return m_ref; } /** The destructor. */ virtual ~ViewManager(){}; /** Creates a QuantaView object */ - QuantaView *createView(const TQString &caption = TQString::null); + QuantaView *createView(const TQString &caption = TQString()); /** Removes a QuantaView object. Returns false on failure (eg. the view was not saved and it refused the delete itself.) If force is true, the view is removed without asking for save. */ @@ -123,7 +124,7 @@ private slots: private: /** Private constructor for the singleton object. */ - ViewManager(TQObject * parent = 0, const char * name = 0); + ViewManager(TQObject * tqparent = 0, const char * name = 0); /** Returns true if there isn't any opened view holding an editor */ bool allEditorsClosed(); |