diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
commit | e985f7e545f4739493965aad69bbecb136dc9346 (patch) | |
tree | 54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /quanta/dialogs/tagdialogs/tagxml.cpp | |
parent | f7670c198945adc3b95ad69a959fe5f8ae55b493 (diff) | |
download | tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip |
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/dialogs/tagdialogs/tagxml.cpp')
-rw-r--r-- | quanta/dialogs/tagdialogs/tagxml.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/quanta/dialogs/tagdialogs/tagxml.cpp b/quanta/dialogs/tagdialogs/tagxml.cpp index 5c07b341..41388efc 100644 --- a/quanta/dialogs/tagdialogs/tagxml.cpp +++ b/quanta/dialogs/tagdialogs/tagxml.cpp @@ -29,14 +29,14 @@ #include "styleeditor.h" -Tagxml::Tagxml( TQDomNode &d, QTag *dtdTag, TQWidget *parent, const char *name) - :TQWidget(parent,name), TagWidget(parent,name), doc(d) +Tagxml::Tagxml( TQDomNode &d, TQTag *dtdTag, TQWidget *tqparent, const char *name) + :TQWidget(tqparent,name), TagWidget(TQT_TQOBJECT(tqparent),name), doc(d) { initialize(d, dtdTag); } -Tagxml::Tagxml( TQDomNode &d, QTag *dtdTag, const TQString& selection, TQWidget *parent, const char *name) - : TQWidget(parent,name), TagWidget(parent,name), doc(d), m_selection(selection) +Tagxml::Tagxml( TQDomNode &d, TQTag *dtdTag, const TQString& selection, TQWidget *tqparent, const char *name) + : TQWidget(tqparent,name), TagWidget(TQT_TQOBJECT(tqparent),name), doc(d), m_selection(selection) { initialize(d, dtdTag); } @@ -45,9 +45,9 @@ Tagxml::~Tagxml() { } -void Tagxml::initialize(TQDomNode &d, QTag *dtdTag) +void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) { - m_dtd = dtdTag->parentDTD; + m_dtd = dtdTag->tqparentDTD; m_dtdTag = dtdTag; TQGridLayout *grid = new TQGridLayout( this ); grid->setSpacing( 13 ); @@ -56,7 +56,7 @@ void Tagxml::initialize(TQDomNode &d, QTag *dtdTag) //parse the tag XML file, in order to build up the dialog for ( TQDomNode n = d.firstChild(); !n.isNull(); n = n.nextSibling() ) { - TQDomNode location = findChild(n,"location"); + TQDomNode location = tqfindChild(n,"location"); if ( location.isNull() ) continue; @@ -69,7 +69,7 @@ void Tagxml::initialize(TQDomNode &d, QTag *dtdTag) int colspan = el.attribute("colspan","1").toInt()-1; int rowspan = el.attribute("rowspan","1").toInt()-1; - location = findChild(n,"textlocation"); + location = tqfindChild(n,"textlocation"); el = location.toElement(); int textrow = el.attribute("row","0").toInt(); int textcol = el.attribute("col","0").toInt(); @@ -79,7 +79,7 @@ void Tagxml::initialize(TQDomNode &d, QTag *dtdTag) // qDebug("%s col:%d row:%d cs:%d, rs:%d", n.nodeName().data(), col,row,colspan,rowspan ); TQString tip; - TQDomNode tooltip = findChild( n ,"tooltip" ); + TQDomNode tooltip = tqfindChild( n ,"tooltip" ); if ( !tooltip.isNull() ) { if ( tooltip.firstChild().isText() ) { TQDomText text = tooltip.firstChild().toText(); @@ -87,7 +87,7 @@ void Tagxml::initialize(TQDomNode &d, QTag *dtdTag) } } TQString whatsThis; - TQDomNode what = findChild( n ,"whatsthis" ); + TQDomNode what = tqfindChild( n ,"whatsthis" ); if ( !what.isNull() ) { if ( what.firstChild().isText() ) { TQDomText text = what.firstChild().toText(); @@ -98,7 +98,7 @@ void Tagxml::initialize(TQDomNode &d, QTag *dtdTag) if ( n.nodeName() == "label" ) //a static label { TQLabel *label = new TQLabel(this); - TQDomElement ltext = findChild(n,"text").toElement(); + TQDomElement ltext = tqfindChild(n,"text").toElement(); if ( !ltext.isNull() ) label->setText( ltext.text().isEmpty() ? TQString("") : (ltext.text()+":") ); @@ -116,7 +116,7 @@ void Tagxml::initialize(TQDomNode &d, QTag *dtdTag) TQDomElement el(n.toElement()); TQString type = el.attribute("type","input"); - TQDomElement ltext = findChild(n,"text").toElement(); + TQDomElement ltext = tqfindChild(n,"text").toElement(); if ( !ltext.isNull() && (type != "check") ) //if there is a text label for the attribute { TQLabel *label = new TQLabel(this); @@ -152,7 +152,7 @@ void Tagxml::initialize(TQDomNode &d, QTag *dtdTag) TQCheckBox *w = new TQCheckBox(this); grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); - TQDomElement ltext = findChild(n,"text").toElement(); + TQDomElement ltext = tqfindChild(n,"text").toElement(); if ( !ltext.isNull() ) w->setText( ltext.text() ); if ( !tip.isNull() ) @@ -270,10 +270,10 @@ void Tagxml::readAttributes( TQDict<TQString> *d ) { if (m_dtd->booleanAttributes == "simple") { - d->replace(name, new TQString("") ); + d->tqreplace(name, new TQString("") ); } else { - d->replace(name, new TQString(m_dtd->booleanTrue)); //it seems that browsers don't like <input disabled="false">, so if a checkbox is false, don't put in the tag at all + d->tqreplace(name, new TQString(m_dtd->booleanTrue)); //it seems that browsers don't like <input disabled="false">, so if a checkbox is false, don't put in the tag at all } } else @@ -283,16 +283,16 @@ void Tagxml::readAttributes( TQDict<TQString> *d ) /* } else { value = (value == "checked")?m_dtd->booleanTrue:m_dtd->booleanFalse; - d->replace(name, new TQString(value)); + d->tqreplace(name, new TQString(value)); } */ } else if (dynamic_cast<Attr_file *>(attr)) { // value = KURL::encode_string(value); - d->replace(name, new TQString(value)); + d->tqreplace(name, new TQString(value)); } else { - value.replace(TQRegExp("&(?!amp;)"), "&"); - d->replace(name, new TQString(value) ); + value.tqreplace(TQRegExp("&(?!amp;)"), "&"); + d->tqreplace(name, new TQString(value) ); } } @@ -313,9 +313,9 @@ void Tagxml::writeAttributes( TQDict<TQString> *d ) name = attr->attrName(); - TQString *v = d->find(name); + TQString *v = d->tqfind(name); if ( v ) { - v->replace("&","&"); + v->tqreplace("&","&"); if ( dynamic_cast<Attr_check *>(attr) ) // checkbox value = "checked"; else |