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/tagattributetree.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/tagattributetree.cpp')
| -rw-r--r-- | quanta/treeviews/tagattributetree.cpp | 62 | 
1 files changed, 31 insertions, 31 deletions
| diff --git a/quanta/treeviews/tagattributetree.cpp b/quanta/treeviews/tagattributetree.cpp index 9ea6fc40..46de89b3 100644 --- a/quanta/treeviews/tagattributetree.cpp +++ b/quanta/treeviews/tagattributetree.cpp @@ -50,8 +50,8 @@  #include "viewmanager.h" -EditableTree::EditableTree(TQWidget *parent, const char *name) -: KListView(parent, name) +EditableTree::EditableTree(TQWidget *tqparent, const char *name) +: KListView(tqparent, name)  {    m_editable = true;  } @@ -100,11 +100,11 @@ void EditableTree::focusOutEvent(TQFocusEvent *)    }*/  } -DualEditableTree::DualEditableTree(TQWidget *parent, const char *name) -: EditableTree(parent, name) +DualEditableTree::DualEditableTree(TQWidget *tqparent, const char *name) +: EditableTree(tqparent, name)  {    curCol = 0; -  setFocusPolicy(TQWidget::ClickFocus); +  setFocusPolicy(TQ_ClickFocus);    this->installEventFilter(this);    connect(this, TQT_SIGNAL(clicked(TQListViewItem *, const TQPoint &, int )),      this, TQT_SLOT(itemClicked(TQListViewItem *, const TQPoint &, int ))); @@ -128,7 +128,7 @@ bool DualEditableTree::eventFilter(TQObject *object, TQEvent *event)    if(event->type() == TQEvent::KeyPress && m_editable)    { -    TQKeyEvent *keyevent = static_cast<TQKeyEvent *>(event); +    TQKeyEvent *keyevent = TQT_TQKEYEVENT(event);      switch(keyevent->key())      {        case Key_Left: @@ -216,14 +216,14 @@ void DualEditableTree::itemClicked(TQListViewItem *item, const TQPoint &, int co    }  } -TagAttributeTree::TagAttributeTree(TQWidget *parent, const char *name) -: EditableTree(parent, name) +TagAttributeTree::TagAttributeTree(TQWidget *tqparent, const char *name) +: EditableTree(tqparent, name)  {    setRootIsDecorated( true );    setSorting(-1);    setFrameStyle( Panel | Sunken );    setLineWidth( 2 ); -  setFocusPolicy(TQWidget::ClickFocus); +  setFocusPolicy(TQ_ClickFocus);    addColumn(i18n("Attribute Name"));    addColumn(i18n("Value"));    setResizeMode(TQListView::LastColumn); @@ -247,9 +247,9 @@ void TagAttributeTree::setCurrentNode(Node *node)        return;    clear();    m_parentItem = 0L; -  //We don't want to be able to edit the text node but it's parent. +  //We don't want to be able to edit the text node but it's tqparent.    if (node && node->tag->type == Tag::Text) -    m_node = node = node->parent; +    m_node = node = node->tqparent;    if (!node)        return;  #ifdef HEAVY_DEBUG @@ -259,8 +259,8 @@ void TagAttributeTree::setCurrentNode(Node *node)    AttributeItem *item = 0L;    TopLevelItem *group = 0L;    TQString attrName; -  QTag *qTag = QuantaCommon::tagFromDTD(node); -  Node *n = node->parent; +  TQTag *qTag = QuantaCommon::tagFromDTD(node); +  Node *n = node->tqparent;    while (n)    {      if (n->tag->type == Tag::XmlTag) @@ -272,7 +272,7 @@ void TagAttributeTree::setCurrentNode(Node *node)        }        m_parentItem->addNode(n);      } -    n = n->parent; +    n = n->tqparent;    }    if (m_parentItem) @@ -333,7 +333,7 @@ void TagAttributeTree::setCurrentNode(Node *node)      for (uint i = 0; i < qTag->commonGroups.count(); i++)      {        group = new TopLevelItem(this, group, i18n(qTag->commonGroups[i].utf8())); -      AttributeList *groupAttrs = qTag->parentDTD->commonAttrs->find(qTag->commonGroups[i]); +      AttributeList *groupAttrs = qTag->tqparentDTD->commonAttrs->tqfind(qTag->commonGroups[i]);        for (uint j = 0; j < groupAttrs->count(); j++)        {          Attribute *attr = groupAttrs->at(j); @@ -429,13 +429,13 @@ void TagAttributeTree::slotParentSelected(int index)  void TagAttributeTree::slotCollapsed(TQListViewItem *item)  { -  if (m_parentItem && item == m_parentItem->parent()) +  if (m_parentItem && item == m_parentItem->tqparent())        m_parentItem->showList(false);  }  void TagAttributeTree::slotExpanded(TQListViewItem *item)  { -  if (m_parentItem && item == m_parentItem->parent()) +  if (m_parentItem && item == m_parentItem->tqparent())        m_parentItem->showList(true);  } @@ -451,18 +451,18 @@ void TagAttributeTree::slotDelayedSetCurrentNode()    }  } -EnhancedTagAttributeTree::EnhancedTagAttributeTree(TQWidget *parent, const char *name) -: TQWidget(parent, name) +EnhancedTagAttributeTree::EnhancedTagAttributeTree(TQWidget *tqparent, const char *name) +: TQWidget(tqparent, name)  {    widgetLayout = new TQGridLayout( this, 1, 1, 11, 6, "MainLayout");    attrTree = new TagAttributeTree(this, "TagAttributeTree"); -  attrTree->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); +  attrTree->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);    widgetLayout->addMultiCellWidget( attrTree, 1, 1, 0, 3 );    nodeName = new TQLabel(this, i18n( "Node Name" ).ascii()); -  nodeName->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) ); +  nodeName->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) );    widgetLayout->addWidget( nodeName, 0, 0 );    deleteTag = new KPushButton(this, i18n( "Delete Tag" ).ascii()); @@ -475,7 +475,7 @@ EnhancedTagAttributeTree::EnhancedTagAttributeTree(TQWidget *parent, const char    deleteAll->setPixmap(SmallIcon("editdelete"));    deleteAll->setMaximumHeight(32);    deleteAll->setMaximumWidth(32); -  TQToolTip::add(deleteAll, i18n("Delete the current tag and all its children.")); +  TQToolTip::add(deleteAll, i18n("Delete the current tag and all its tqchildren."));    widgetLayout->addWidget( deleteTag, 0, 2 );    widgetLayout->addWidget( deleteAll, 0, 3 ); @@ -501,9 +501,9 @@ void EnhancedTagAttributeTree::setCurrentNode(Node *node)  void EnhancedTagAttributeTree::NodeSelected(Node *node)  {    curNode = node; -  //We don't want to be able to edit the text node but it's parent. +  //We don't want to be able to edit the text node but it's tqparent.    if (node && node->tag->type == Tag::Text) -    curNode = node = node->parent; +    curNode = node = node->tqparent;    showCaption();    emit newNodeSelected(node);  } @@ -515,7 +515,7 @@ void EnhancedTagAttributeTree::showCaption()      if(curNode->tag->type == Tag::XmlTag || curNode->tag->type == Tag::XmlTagEnd ||        curNode->tag->type == Tag::ScriptTag)      { -      TQString s = i18n("Current tag: <b>%1</b>").arg(curNode->tag->name); +      TQString s = i18n("Current tag: <b>%1</b>").tqarg(curNode->tag->name);        nodeName->setText(KStringHandler::rPixelSqueeze(s, nodeName->fontMetrics(), attrTree->width()- 50));      }      else if(curNode->tag->type == Tag::Text) @@ -586,7 +586,7 @@ void EnhancedTagAttributeTree::deleteNode()      return;    Node *oldCurNode, *oldCurNodeParent, *child; -  QTag *oldCurNodeParentQTag; +  TQTag *oldCurNodeParentTQTag;    int curLine, curCol;    long offset;    DOM::Node domNode; @@ -614,23 +614,23 @@ void EnhancedTagAttributeTree::deleteNode()    //remove the Nodes    oldCurNode = curNode; -  oldCurNodeParent = curNode->parent; +  oldCurNodeParent = curNode->tqparent;    curNode = 0L;    attrTree->setCurrentNode(curNode);    modifs = new NodeModifsSet();    kafkaCommon::extractAndDeleteNode(oldCurNode, modifs, false); -  //Then we see if the new parent - child relationships are valid, and if not, delete the child and restart +  //Then we see if the new tqparent - child relationships are valid, and if not, delete the child and restart    if(oldCurNodeParent)    { -    oldCurNodeParentQTag = QuantaCommon::tagFromDTD(oldCurNodeParent); -    if(oldCurNodeParentQTag) +    oldCurNodeParentTQTag = QuantaCommon::tagFromDTD(oldCurNodeParent); +    if(oldCurNodeParentTQTag)      {        child = oldCurNodeParent->child;        while(child)        { -        if(!oldCurNodeParentQTag->isChild(child)) +        if(!oldCurNodeParentTQTag->isChild(child))          {            kafkaCommon::extractAndDeleteNode(child, modifs, false);            //too lazy to get the real next node ;-) | 
