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/treeviews/tagattributeitems.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/treeviews/tagattributeitems.cpp')
-rw-r--r-- | quanta/treeviews/tagattributeitems.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/quanta/treeviews/tagattributeitems.cpp b/quanta/treeviews/tagattributeitems.cpp index 176928c0..aa6c5215 100644 --- a/quanta/treeviews/tagattributeitems.cpp +++ b/quanta/treeviews/tagattributeitems.cpp @@ -40,13 +40,13 @@ #include "qextfileinfo.h" #include "styleeditor.h" -TopLevelItem::TopLevelItem(KListView* parent, const TQString &title) -: KListViewItem(parent, title) +TopLevelItem::TopLevelItem(KListView* tqparent, const TQString &title) +: KListViewItem(tqparent, title) { } -TopLevelItem::TopLevelItem(KListView* parent, TQListViewItem* after, const TQString &title) -: KListViewItem(parent, after, title) +TopLevelItem::TopLevelItem(KListView* tqparent, TQListViewItem* after, const TQString &title) +: KListViewItem(tqparent, after, title) { } @@ -62,7 +62,7 @@ void TopLevelItem::paintCell(TQPainter *p, const TQColorGroup &cg, return; // make toplevel item names bold - if (column == 0 && !parent()) + if (column == 0 && !tqparent()) { TQFont f = p->font(); f.setBold(true); @@ -76,16 +76,16 @@ void TopLevelItem::paintCell(TQPainter *p, const TQColorGroup &cg, } } -ParentItem::ParentItem(TagAttributeTree *listView, TQListViewItem* parent) -: KListViewItem(parent) +ParentItem::ParentItem(TagAttributeTree *listView, TQListViewItem* tqparent) +: KListViewItem(tqparent) { m_listView = listView; comboBox = new TQComboBox(false, m_listView->viewport() ); - TQRect r = m_listView->itemRect( this ); + TQRect r = m_listView->tqitemRect( this ); if ( !r.size().isValid() ) { m_listView->ensureItemVisible( this ); - r = m_listView->itemRect( this ); + r = m_listView->tqitemRect( this ); } r.setX( m_listView->header()->sectionPos( 0 ) + 20); r.setWidth( m_listView->header()->sectionSize( 0 ) - 20); @@ -143,15 +143,15 @@ void ParentItem::showList(bool show) } //Generic attribute item -AttributeItem::AttributeItem(TQListViewItem* parent, const TQString &title, const TQString& title2) -: KListViewItem(parent, title, title2) +AttributeItem::AttributeItem(TQListViewItem* tqparent, const TQString &title, const TQString& title2) +: KListViewItem(tqparent, title, title2) { lin = 0L; lin2 = 0L; } -AttributeItem::AttributeItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2) -: KListViewItem(parent, title, title2) +AttributeItem::AttributeItem(EditableTree* listView, TQListViewItem* tqparent, const TQString &title, const TQString& title2) +: KListViewItem(tqparent, title, title2) { m_listView = listView; lin = new TQLineEdit( m_listView->viewport() ); @@ -262,11 +262,11 @@ void AttributeItem::hideEditor(int column) void AttributeItem::placeEditor( TQWidget *w, int column) { - TQRect r = m_listView->itemRect( this ); + TQRect r = m_listView->tqitemRect( this ); if ( !r.size().isValid() ) { m_listView->ensureItemVisible( this ); - r = m_listView->itemRect( this ); + r = m_listView->tqitemRect( this ); } if(column == 1) { @@ -284,8 +284,8 @@ void AttributeItem::placeEditor( TQWidget *w, int column) } //Boolean attribute item -AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2) -: AttributeItem(parent, title, title2) +AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, TQListViewItem* tqparent, const TQString &title, const TQString& title2) +: AttributeItem(tqparent, title, title2) { m_listView = listView; combo = new TQComboBox( m_listView->viewport() ); @@ -324,8 +324,8 @@ void AttributeBoolItem::hideEditor(int) } //Boolean attribute item -AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2) -: AttributeItem(parent, title, title2) +AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, TQListViewItem* tqparent, const TQString &title, const TQString& title2) +: AttributeItem(tqparent, title, title2) { m_listView = listView; urlRequester = new KURLRequester( m_listView->viewport() ); @@ -345,7 +345,7 @@ TQString AttributeUrlItem::editorText(int) QuantaCommon::setUrl(url, urlRequester->url()); baseURL = (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url(); baseURL.setPath(baseURL.directory()); - url = QExtFileInfo::toRelative(url, baseURL); + url = TQExtFileInfo::toRelative(url, baseURL); TQString s = url.url(); if (url.protocol() == (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url().protocol()) s.remove(0, url.protocol().length() + 3); @@ -360,7 +360,7 @@ void AttributeUrlItem::showEditor(int) baseURL = (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url(); baseURL.setPath(baseURL.directory()); QuantaCommon::setUrl(url, text(1)); - url= QExtFileInfo::toAbsolute(url, baseURL); + url= TQExtFileInfo::toAbsolute(url, baseURL); urlRequester->setURL(url.url()); urlRequester->setFocus(); } @@ -375,13 +375,13 @@ void AttributeUrlItem::hideEditor(int) //editable listbox //Boolean attribute item -AttributeListItem::AttributeListItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2, Attribute *attr) -: AttributeItem(parent, title, title2) +AttributeListItem::AttributeListItem(EditableTree* listView, TQListViewItem* tqparent, const TQString &title, const TQString& title2, Attribute *attr) +: AttributeItem(tqparent, title, title2) { m_listView = listView; combo = new TQComboBox( m_listView->viewport() ); Node *node = (static_cast<TagAttributeTree *>(m_listView))->node(); - QTag *qTag = QuantaCommon::tagFromDTD(node); + TQTag *qTag = QuantaCommon::tagFromDTD(node); if (qTag) { if (!attr) @@ -395,7 +395,7 @@ AttributeListItem::AttributeListItem(EditableTree* listView, TQListViewItem* par if (!attr->interface.isEmpty()) interface = attr->interface; TQString arguments = attr->arguments; - arguments.replace("%tagname%", node->tag->name); + arguments.tqreplace("%tagname%", node->tag->name); DCOPReply reply = QuantaCommon::callDCOPMethod(interface, attr->method, arguments); if (reply.isValid()) { @@ -428,13 +428,13 @@ void AttributeListItem::showEditor(int) combo->show(); int index = -1; Node *node = (static_cast<TagAttributeTree *>(m_listView))->node(); - QTag *qTag = QuantaCommon::tagFromDTD(node); + TQTag *qTag = QuantaCommon::tagFromDTD(node); if (qTag) { Attribute *attr = qTag->attribute(text(0)); if (attr) { - index = attr->values.findIndex(text(1)); + index = attr->values.tqfindIndex(text(1)); } } if (index != -1) @@ -455,8 +455,8 @@ void AttributeListItem::hideEditor(int) } //editable color combobox -AttributeColorItem::AttributeColorItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2) -: AttributeItem(parent, title, title2) +AttributeColorItem::AttributeColorItem(EditableTree* listView, TQListViewItem* tqparent, const TQString &title, const TQString& title2) +: AttributeItem(tqparent, title, title2) { m_listView = listView; combo = new KColorCombo( m_listView->viewport() ); @@ -499,8 +499,8 @@ void AttributeColorItem::hideEditor(int) } //editable style combobox -AttributeStyleItem::AttributeStyleItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2) -: AttributeItem(parent, title, title2) +AttributeStyleItem::AttributeStyleItem(EditableTree* listView, TQListViewItem* tqparent, const TQString &title, const TQString& title2) +: AttributeItem(tqparent, title, title2) { m_listView = listView; m_se = new StyleEditor( m_listView->viewport() ); |