diff options
Diffstat (limited to 'quanta/dialogs/tagdialogs/tagdialog.cpp')
-rw-r--r-- | quanta/dialogs/tagdialogs/tagdialog.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/quanta/dialogs/tagdialogs/tagdialog.cpp b/quanta/dialogs/tagdialogs/tagdialog.cpp index bc5800ae..12ecec0d 100644 --- a/quanta/dialogs/tagdialogs/tagdialog.cpp +++ b/quanta/dialogs/tagdialogs/tagdialog.cpp @@ -42,7 +42,7 @@ #include "qtag.h" #include "kafkacommon.h" -TagDialog::TagDialog(QTag* dtdTag, Tag *tag, KURL a_baseURL) +TagDialog::TagDialog(TQTag* dtdTag, Tag *tag, KURL a_baseURL) : TQTabDialog( 0L, "tagdialog", true) { init(dtdTag, a_baseURL); @@ -60,7 +60,7 @@ TagDialog::TagDialog(QTag* dtdTag, Tag *tag, KURL a_baseURL) } -TagDialog::TagDialog(QTag* dtdTag, Tag *tag, const TQString& selection, KURL a_baseURL) +TagDialog::TagDialog(TQTag* dtdTag, Tag *tag, const TQString& selection, KURL a_baseURL) : TQTabDialog( 0L, "tagdialog", true), m_selection(selection) { init(dtdTag, a_baseURL); @@ -77,7 +77,7 @@ TagDialog::TagDialog(QTag* dtdTag, Tag *tag, const TQString& selection, KURL a_b parseTag(); } -TagDialog::TagDialog(QTag* dtdTag, TQString attrs, KURL a_baseURL) +TagDialog::TagDialog(TQTag* dtdTag, TQString attrs, KURL a_baseURL) : TQTabDialog( 0L, "tagdialog", true) { init(dtdTag, a_baseURL); @@ -90,7 +90,7 @@ TagDialog::TagDialog(QTag* dtdTag, TQString attrs, KURL a_baseURL) parseTag(); } -TagDialog::TagDialog(QTag* dtdTag, const TQString& selection, TQString attrs, KURL a_baseURL) +TagDialog::TagDialog(TQTag* dtdTag, const TQString& selection, TQString attrs, KURL a_baseURL) : TQTabDialog( 0L, "tagdialog", true), m_selection(selection) { init(dtdTag, a_baseURL); @@ -113,7 +113,7 @@ TagDialog::~TagDialog() } -void TagDialog::init(QTag *a_dtdTag, KURL a_baseURL) +void TagDialog::init(TQTag *a_dtdTag, KURL a_baseURL) { setOkButton(KStdGuiItem::ok().text()); setCancelButton(KStdGuiItem::cancel().text()); @@ -123,7 +123,7 @@ void TagDialog::init(QTag *a_dtdTag, KURL a_baseURL) if (!a_dtdTag) //the tag is invalid, let's create a default one { - dtdTag = new QTag(); + dtdTag = new TQTag(); dtdTag->setName(i18n("Unknown tag")); deleteTag = true; } else @@ -148,7 +148,7 @@ void TagDialog::parseTag() TQDomDocument doc; if (dtdTag->name().lower() == "img") //NOTE: HTML specific code! { - mainDlg = new TagImgDlg(dtdTag->parentDTD, this); + mainDlg = new TagImgDlg(dtdTag->tqparentDTD, this); ((TagImgDlg *)mainDlg)->writeAttributes( dict ); } //read the tag file it is available @@ -164,7 +164,7 @@ void TagDialog::parseTag() { TQDomNode n = nodeList.item(i); TQString nodeTagName = n.toElement().attribute("name"); - if (!dtdTag->parentDTD->caseSensitive) + if (!dtdTag->tqparentDTD->caseSensitive) nodeTagName = nodeTagName.upper(); if (nodeTagName == tagName && n.toElement().elementsByTagName("attr").count() > 0) //read a tag { @@ -179,7 +179,7 @@ void TagDialog::parseTag() else { TQString docString = "<!DOCTYPE TAGS>\n<TAGS>\n"; - docString += TQString("<tag name=\"%1\">\n").arg(dtdTag->name()); + docString += TQString("<tag name=\"%1\">\n").tqarg(dtdTag->name()); docString += QuantaCommon::xmlFromAttributes(dtdTag->attributes()); docString += "</tag>\n</TAGS>\n"; doc.setContent(docString); @@ -192,7 +192,7 @@ void TagDialog::parseTag() addTab( mainDlg, i18n("Main") ); } - KConfig *dtdConfig = new KConfig(dtdTag->parentDTD->fileName); + KConfig *dtdConfig = new KConfig(dtdTag->tqparentDTD->fileName); dtdConfig->setGroup("General"); int numOfPages = dtdConfig->readNumEntry("NumOfPages"); extraPageList = new TQPtrList<Tagxml>(); @@ -200,14 +200,14 @@ void TagDialog::parseTag() for (int i = 1; i <= numOfPages; i++) { Tagxml *extraPage = 0L; - dtdConfig->setGroup(TQString("Page%1").arg(i)); + dtdConfig->setGroup(TQString("Page%1").tqarg(i)); TQString title = dtdConfig->readEntry("Title"); TQStringList groupList; groupList = dtdConfig->readListEntry("Groups"); TQDomDocument extraDoc; //build an internal tag XML for the groups bool addPage = false; TQString docString = "<!DOCTYPE TAGS>\n<TAGS>\n"; - docString += TQString("<tag name=\"Page%1\">\n").arg(i); + docString += TQString("<tag name=\"Page%1\">\n").tqarg(i); for (uint j = 0; j < groupList.count(); j++) { groupList[j] = groupList[j].stripWhiteSpace(); @@ -226,7 +226,7 @@ void TagDialog::parseTag() { TQDomNode node = nodeList.item(j); TQString nodeTagName = node.toElement().attribute("name"); - if (groupList.contains(nodeTagName) && dtdTag->commonGroups.contains(nodeTagName)) //add the attributes of this common tag to a new tab + if (groupList.tqcontains(nodeTagName) && dtdTag->commonGroups.tqcontains(nodeTagName)) //add the attributes of this common tag to a new tab { TQString s; TQTextStream str(&s, IO_ReadWrite); @@ -325,15 +325,15 @@ TQString TagDialog::getAttributeString() TQString TagDialog::getAttribute(const TQString& attr) { TQString attrStr = getAttributeString()+" "; - int pos = attrStr.upper().find(attr.upper()); + int pos = attrStr.upper().tqfind(attr.upper()); if (pos != -1) { - pos = attrStr.find("=",pos+1) + 1; - return attrStr.mid(pos, attrStr.find(" ",pos) - pos); + pos = attrStr.tqfind("=",pos+1) + 1; + return attrStr.mid(pos, attrStr.tqfind(" ",pos) - pos); } else { - return TQString::null; + return TQString(); } } @@ -429,7 +429,7 @@ void TagDialog::insertTag(Document *w, bool insertInLine) TQString newTag = getAttributeString(); newTag = TQString("<")+QuantaCommon::tagCase(dtdTag->name())+newTag; - if ( dtdTag->parentDTD->singleTagStyle == "xml" && + if ( dtdTag->tqparentDTD->singleTagStyle == "xml" && (dtdTag->isSingle() || (!qConfig.closeOptionalTags && dtdTag->isOptional())) ) { |