diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:58:12 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:58:12 -0600 |
commit | 6b45a7b7b2a804ccb2d522eb9ba6423fedb59b8f (patch) | |
tree | a08b27e3f4fde1ed82a5f061a2725998e8012f93 /konq-plugins/fsview/treemap.cpp | |
parent | ca82971624269719d487c6f7980d7237f9420036 (diff) | |
download | tdeaddons-6b45a7b7b2a804ccb2d522eb9ba6423fedb59b8f.tar.gz tdeaddons-6b45a7b7b2a804ccb2d522eb9ba6423fedb59b8f.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit ca82971624269719d487c6f7980d7237f9420036.
Diffstat (limited to 'konq-plugins/fsview/treemap.cpp')
-rw-r--r-- | konq-plugins/fsview/treemap.cpp | 176 |
1 files changed, 88 insertions, 88 deletions
diff --git a/konq-plugins/fsview/treemap.cpp b/konq-plugins/fsview/treemap.cpp index cab9809..fc83601 100644 --- a/konq-plugins/fsview/treemap.cpp +++ b/konq-plugins/fsview/treemap.cpp @@ -756,7 +756,7 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value) _parent = parent; _sum = 0; - _children = 0; + _tqchildren = 0; _widget = 0; _index = -1; _depth = -1; // not set @@ -789,7 +789,7 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value, setText(0, text1); _sum = 0; - _children = 0; + _tqchildren = 0; _widget = 0; _index = -1; _depth = -1; // not set @@ -801,7 +801,7 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value, TreeMapItem::~TreeMapItem() { - if (_children) delete _children; + if (_tqchildren) delete _tqchildren; if (_freeRects) delete _freeRects; // finally, notify widget about deletion @@ -842,18 +842,18 @@ void TreeMapItem::redraw() void TreeMapItem::clear() { - if (_children) { + if (_tqchildren) { // delete selected items below this item from selection if (_widget) _widget->clearSelection(this); - delete _children; - _children = 0; + delete _tqchildren; + _tqchildren = 0; } } -// invalidates current children and forces redraw -// this is only usefull when children are created on demand in items() +// invalidates current tqchildren and forces redraw +// this is only usefull when tqchildren are created on demand in items() void TreeMapItem::refresh() { clear(); @@ -887,9 +887,9 @@ int TreeMapItem::depth() const bool TreeMapItem::initialized() { - if (!_children) { - _children = new TreeMapItemList; - _children->setAutoDelete(true); + if (!_tqchildren) { + _tqchildren = new TreeMapItemList; + _tqchildren->setAutoDelete(true); return false; } return true; @@ -899,16 +899,16 @@ void TreeMapItem::addItem(TreeMapItem* i) { if (!i) return; - if (!_children) { - _children = new TreeMapItemList; - _children->setAutoDelete(true); + if (!_tqchildren) { + _tqchildren = new TreeMapItemList; + _tqchildren->setAutoDelete(true); } i->setParent(this); if (sorting(0) == -1) - _children->append(i); // preserve insertion order + _tqchildren->append(i); // preserve insertion order else - _children->inSort(i); + _tqchildren->inSort(i); } @@ -974,17 +974,17 @@ void TreeMapItem::setSorting(int textNo, bool ascending) _sortAscending = ascending; _sortTextNo = textNo; - if (_children && _sortTextNo != -1) _children->sort(); + if (_tqchildren && _sortTextNo != -1) _tqchildren->sort(); } void TreeMapItem::resort(bool recursive) { - if (!_children) return; + if (!_tqchildren) return; - if (_sortTextNo != -1) _children->sort(); + if (_sortTextNo != -1) _tqchildren->sort(); if (recursive) - for (TreeMapItem* i=_children->first(); i; i=_children->next()) + for (TreeMapItem* i=_tqchildren->first(); i; i=_tqchildren->next()) i->resort(recursive); } @@ -1002,13 +1002,13 @@ int TreeMapItem::rtti() const return 0; } -TreeMapItemList* TreeMapItem::children() +TreeMapItemList* TreeMapItem::tqchildren() { - if (!_children) { - _children = new TreeMapItemList; - _children->setAutoDelete(true); + if (!_tqchildren) { + _tqchildren = new TreeMapItemList; + _tqchildren->setAutoDelete(true); } - return _children; + return _tqchildren; } void TreeMapItem::clearItemRect() @@ -1252,7 +1252,7 @@ void TreeMapWidget::setMaxDrawingDepth(int d) TQString TreeMapWidget::defaultFieldType(int f) const { - return i18n("Text %1").arg(f+1); + return i18n("Text %1").tqarg(f+1); } TQString TreeMapWidget::defaultFieldStop(int) const @@ -1482,7 +1482,7 @@ TreeMapItem* TreeMapWidget::item(int x, int y) const if (DEBUG_DRAWING) kdDebug(90100) << "item(" << x << "," << y << "):" << endl; while (1) { - TreeMapItemList* list = p->children(); + TreeMapItemList* list = p->tqchildren(); if (!list) i = 0; else { @@ -1491,11 +1491,11 @@ TreeMapItem* TreeMapWidget::item(int x, int y) const if (DEBUG_DRAWING) kdDebug(90100) << " Checking " << i->path(0).join("/") << " (" - << i->itemRect().x() << "/" << i->itemRect().y() - << "-" << i->itemRect().width() - << "x" << i->itemRect().height() << ")" << endl; + << i->tqitemRect().x() << "/" << i->tqitemRect().y() + << "-" << i->tqitemRect().width() + << "x" << i->tqitemRect().height() << ")" << endl; - if (i->itemRect().contains(x, y)) { + if (i->tqitemRect().contains(x, y)) { if (DEBUG_DRAWING) kdDebug(90100) << " .. Got. Index " << idx << endl; @@ -1513,7 +1513,7 @@ TreeMapItem* TreeMapWidget::item(int x, int y) const if (DEBUG_DRAWING) kdDebug(90100) << "item(" << x << "," << y << "): Got " << p->path(0).join("/") << " (Size " - << p->itemRect().width() << "x" << p->itemRect().height() + << p->tqitemRect().width() << "x" << p->tqitemRect().height() << ", Val " << p->value() << ")" << endl; } @@ -1542,16 +1542,16 @@ TreeMapItem* TreeMapWidget::visibleItem(TreeMapItem* i) const { if (i) { /* Must have a visible area */ - while(i && ((i->itemRect().width() <1) || - (i->itemRect().height() <1))) { + while(i && ((i->tqitemRect().width() <1) || + (i->tqitemRect().height() <1))) { TreeMapItem* p = i->parent(); if (!p) break; - int idx = p->children()->findRef(i); + int idx = p->tqchildren()->findRef(i); idx--; if (idx<0) i = p; else - i = p->children()->at(idx); + i = p->tqchildren()->at(idx); } } return i; @@ -1745,7 +1745,7 @@ TreeMapItem* TreeMapWidget::setTmpRangeSelection(TreeMapItem* i1, i2 = i2->parent(); if (!i2) return changed; - TreeMapItemList* list = commonParent->children(); + TreeMapItemList* list = commonParent->tqchildren(); if (!list) return changed; TreeMapItem* i = list->first(); @@ -1768,11 +1768,11 @@ void TreeMapWidget::contextMenuEvent( TQContextMenuEvent* e ) { //kdDebug(90100) << "TreeMapWidget::contextMenuEvent" << endl; - if ( receivers( TQT_SIGNAL(contextMenuRequested(TreeMapItem*, const TQPoint &)) ) ) + if ( tqreceivers( TQT_SIGNAL(contextMenuRequested(TreeMapItem*, const TQPoint &)) ) ) e->accept(); if ( e->reason() == TQContextMenuEvent::Keyboard ) { - TQRect r = (_current) ? _current->itemRect() : _base->itemRect(); + TQRect r = (_current) ? _current->tqitemRect() : _base->tqitemRect(); TQPoint p = TQPoint(r.left() + r.width()/2, r.top() + r.height()/2); emit contextMenuRequested(_current, p); } @@ -1936,14 +1936,14 @@ void TreeMapWidget::mouseDoubleClickEvent( TQMouseEvent* e ) int nextVisible(TreeMapItem* i) { TreeMapItem* p = i->parent(); - if (!p || p->itemRect().isEmpty()) return -1; + if (!p || p->tqitemRect().isEmpty()) return -1; - int idx = p->children()->findRef(i); + int idx = p->tqchildren()->findRef(i); if (idx<0) return -1; - while (idx < (int)p->children()->count()-1) { + while (idx < (int)p->tqchildren()->count()-1) { idx++; - TQRect r = p->children()->at(idx)->itemRect(); + TQRect r = p->tqchildren()->at(idx)->tqitemRect(); if (r.width()>1 && r.height()>1) return idx; } @@ -1954,14 +1954,14 @@ int nextVisible(TreeMapItem* i) int prevVisible(TreeMapItem* i) { TreeMapItem* p = i->parent(); - if (!p || p->itemRect().isEmpty()) return -1; + if (!p || p->tqitemRect().isEmpty()) return -1; - int idx = p->children()->findRef(i); + int idx = p->tqchildren()->findRef(i); if (idx<0) return -1; while (idx > 0) { idx--; - TQRect r = p->children()->at(idx)->itemRect(); + TQRect r = p->tqchildren()->at(idx)->tqitemRect(); if (r.width()>1 && r.height()>1) return idx; } @@ -2042,24 +2042,24 @@ void TreeMapWidget::keyPressEvent( TQKeyEvent* e ) int newIdx = goBack ? nextVisible(_current) : prevVisible(_current); if (p && newIdx>=0) { p->setIndex(newIdx); - setCurrent(p->children()->at(newIdx), true); + setCurrent(p->tqchildren()->at(newIdx), true); } } else if (e->key() == Key_Right) { int newIdx = goBack ? prevVisible(_current) : nextVisible(_current); if (p && newIdx>=0) { p->setIndex(newIdx); - setCurrent(p->children()->at(newIdx), true); + setCurrent(p->tqchildren()->at(newIdx), true); } } else if (e->key() == Key_Down) { - if (_current->children() && _current->children()->count()>0) { + if (_current->tqchildren() && _current->tqchildren()->count()>0) { int newIdx = _current->index(); if (newIdx<0) - newIdx = goBack ? (_current->children()->count()-1) : 0; - if (newIdx>=(int)_current->children()->count()) - newIdx = _current->children()->count()-1; - newItem = visibleItem(_current->children()->at(newIdx)); + newIdx = goBack ? (_current->tqchildren()->count()-1) : 0; + if (newIdx>=(int)_current->tqchildren()->count()) + newIdx = _current->tqchildren()->count()-1; + newItem = visibleItem(_current->tqchildren()->at(newIdx)); setCurrent(newItem, true); } } @@ -2136,7 +2136,7 @@ void TreeMapWidget::drawTreeMap() } else { // only subitem - if (!_needsRefresh->itemRect().isValid()) return; + if (!_needsRefresh->tqitemRect().isValid()) return; } // reset cached font object; it could have been changed @@ -2154,7 +2154,7 @@ void TreeMapWidget::drawTreeMap() TQPainter p(this); tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, TQRect(0, 0, TQWidget::width(), TQWidget::height()), - colorGroup() ); + tqcolorGroup() ); } } @@ -2198,7 +2198,7 @@ void TreeMapWidget::drawItem(TQPainter* p, bool isCurrent = _current && item->isChildOf(_current); - RectDrawing d(item->itemRect()); + RectDrawing d(item->tqitemRect()); item->setSelected(isSelected); item->setCurrent(isCurrent); item->setShaded(_shading); @@ -2232,25 +2232,25 @@ void TreeMapWidget::drawItems(TQPainter* p, { if (DEBUG_DRAWING) kdDebug(90100) << "+drawItems(" << item->path(0).join("/") << ", " - << item->itemRect().x() << "/" << item->itemRect().y() - << "-" << item->itemRect().width() << "x" - << item->itemRect().height() << "), Val " << item->value() + << item->tqitemRect().x() << "/" << item->tqitemRect().y() + << "-" << item->tqitemRect().width() << "x" + << item->tqitemRect().height() << "), Val " << item->value() << ", Sum " << item->sum() << endl; drawItem(p, item); item->clearFreeRects(); - TQRect origRect = item->itemRect(); + TQRect origRect = item->tqitemRect(); int bw = item->borderWidth(); TQRect r = TQRect(origRect.x()+bw, origRect.y()+bw, origRect.width()-2*bw, origRect.height()-2*bw); - TreeMapItemList* list = item->children(); + TreeMapItemList* list = item->tqchildren(); TreeMapItem* i; bool stopDrawing = false; - // only subdivide if there are children + // only subdivide if there are tqchildren if (!list || list->count()==0) stopDrawing = true; @@ -2283,12 +2283,12 @@ void TreeMapWidget::drawItems(TQPainter* p, if (stopDrawing) { if (list) { - // invalidate rects + // tqinvalidate rects for (i=list->first();i;i=list->next()) i->clearItemRect(); } // tooltip apears on whole item rect - item->addFreeRect(item->itemRect()); + item->addFreeRect(item->tqitemRect()); // if we have space for text... if ((r.height() < _fontHeight) || (r.width() < _fontHeight)) return; @@ -2399,7 +2399,7 @@ void TreeMapWidget::drawItems(TQPainter* p, r.setRect(r.x(), r.y()+sr.height(), r.width(), r.height()-sr.height()); } - // set selfRect (not occupied by children) for tooltip + // set selfRect (not occupied by tqchildren) for tooltip item->addFreeRect(sr); if (0) kdDebug(90100) << "Item " << item->path(0).join("/") << ": SelfR " @@ -2537,7 +2537,7 @@ void TreeMapWidget::drawItems(TQPainter* p, kdDebug(90100) << "-drawItems(" << item->path(0).join("/") << ")" << endl; } -// fills area with a pattern if to small to draw children +// fills area with a pattern if to small to draw tqchildren void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r) { p->setBrush(TQt::Dense4Pattern); @@ -2546,7 +2546,7 @@ void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r) i->addFreeRect(r); } -// fills area with a pattern if to small to draw children +// fills area with a pattern if to small to draw tqchildren void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r, TreeMapItemListIterator it, int len, bool goBack) { @@ -2845,10 +2845,10 @@ void TreeMapWidget::addVisualizationItems(TQPopupMenu* popup, int id) popup->insertItem(i18n("Border"), bpopup, id+1); bpopup->insertItem(i18n("Correct Borders Only"), id+2); bpopup->insertSeparator(); - bpopup->insertItem(i18n("Width %1").arg(0), id+3); - bpopup->insertItem(i18n("Width %1").arg(1), id+4); - bpopup->insertItem(i18n("Width %1").arg(2), id+5); - bpopup->insertItem(i18n("Width %1").arg(3), id+6); + bpopup->insertItem(i18n("Width %1").tqarg(0), id+3); + bpopup->insertItem(i18n("Width %1").tqarg(1), id+4); + bpopup->insertItem(i18n("Width %1").tqarg(2), id+5); + bpopup->insertItem(i18n("Width %1").tqarg(3), id+6); bpopup->setItemChecked(id+2, skipIncorrectBorder()); bpopup->setItemChecked(id+3, borderWidth()==0); bpopup->setItemChecked(id+4, borderWidth()==1); @@ -2955,7 +2955,7 @@ void TreeMapWidget::addFieldStopItems(TQPopupMenu* popup, connect(popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(fieldStopActivated(int))); - popup->insertItem(i18n("No %1 Limit").arg(fieldType(0)), id); + popup->insertItem(i18n("No %1 Limit").tqarg(fieldType(0)), id); popup->setItemChecked(id, fieldStop(0).isEmpty()); _menuItem = i; bool foundFieldStop = false; @@ -3014,7 +3014,7 @@ void TreeMapWidget::addAreaStopItems(TQPopupMenu* popup, int area = i->width() * i->height(); popup->insertSeparator(); popup->insertItem(i18n("Area of '%1' (%2)") - .arg(i->text(0)).arg(area), id+1); + .tqarg(i->text(0)).tqarg(area), id+1); if (area == minimalArea()) { popup->setItemChecked(id+1, true); foundArea = true; @@ -3040,9 +3040,9 @@ void TreeMapWidget::addAreaStopItems(TQPopupMenu* popup, } popup->insertItem(i18n("Double Area Limit (to %1)") - .arg(minimalArea()*2), id+5); + .tqarg(minimalArea()*2), id+5); popup->insertItem(i18n("Halve Area Limit (to %1)") - .arg(minimalArea()/2), id+6); + .tqarg(minimalArea()/2), id+6); } } @@ -3079,7 +3079,7 @@ void TreeMapWidget::addDepthStopItems(TQPopupMenu* popup, int d = i->depth(); popup->insertSeparator(); popup->insertItem(i18n("Depth of '%1' (%2)") - .arg(i->text(0)).arg(d), id+1); + .tqarg(i->text(0)).tqarg(d), id+1); if (d == maxDrawingDepth()) { popup->setItemChecked(id+1, true); foundDepth = true; @@ -3089,7 +3089,7 @@ void TreeMapWidget::addDepthStopItems(TQPopupMenu* popup, popup->insertSeparator(); int depth = 2, count; for (count=0;count<3;count++) { - popup->insertItem(i18n("Depth %1").arg(depth), id+4+count); + popup->insertItem(i18n("Depth %1").tqarg(depth), id+4+count); if (depth == maxDrawingDepth()) { popup->setItemChecked(id+4+count, true); foundDepth = true; @@ -3100,14 +3100,14 @@ void TreeMapWidget::addDepthStopItems(TQPopupMenu* popup, if (maxDrawingDepth()>1) { popup->insertSeparator(); if (!foundDepth) { - popup->insertItem(i18n("Depth %1").arg(maxDrawingDepth()), id+10); + popup->insertItem(i18n("Depth %1").tqarg(maxDrawingDepth()), id+10); popup->setItemChecked(id+10, true); } popup->insertItem(i18n("Decrement (to %1)") - .arg(maxDrawingDepth()-1), id+2); + .tqarg(maxDrawingDepth()-1), id+2); popup->insertItem(i18n("Increment (to %1)") - .arg(maxDrawingDepth()+1), id+3); + .tqarg(maxDrawingDepth()+1), id+3); } } @@ -3130,13 +3130,13 @@ void TreeMapWidget::saveOptions(KConfigGroup* config, TQString prefix) int f, fCount = _attr.size(); config->writeEntry(prefix+"FieldCount", fCount); for (f=0;f<fCount;f++) { - config->writeEntry(TQString(prefix+"FieldVisible%1").arg(f), + config->writeEntry(TQString(prefix+"FieldVisible%1").tqarg(f), _attr[f].visible); - config->writeEntry(TQString(prefix+"FieldForced%1").arg(f), + config->writeEntry(TQString(prefix+"FieldForced%1").tqarg(f), _attr[f].forced); - config->writeEntry(TQString(prefix+"FieldStop%1").arg(f), + config->writeEntry(TQString(prefix+"FieldStop%1").tqarg(f), _attr[f].stop); - config->writeEntry(TQString(prefix+"FieldPosition%1").arg(f), + config->writeEntry(TQString(prefix+"FieldPosition%1").tqarg(f), fieldPositionString(f)); } } @@ -3180,18 +3180,18 @@ void TreeMapWidget::restoreOptions(KConfigGroup* config, TQString prefix) int f; for (f=0;f<num;f++) { - str = TQString(prefix+"FieldVisible%1").arg(f); + str = TQString(prefix+"FieldVisible%1").tqarg(f); if (config->hasKey(str)) setFieldVisible(f, config->readBoolEntry(str)); - str = TQString(prefix+"FieldForced%1").arg(f); + str = TQString(prefix+"FieldForced%1").tqarg(f); if (config->hasKey(str)) setFieldForced(f, config->readBoolEntry(str)); - str = config->readEntry(TQString(prefix+"FieldStop%1").arg(f)); + str = config->readEntry(TQString(prefix+"FieldStop%1").tqarg(f)); setFieldStop(f, str); - str = config->readEntry(TQString(prefix+"FieldPosition%1").arg(f)); + str = config->readEntry(TQString(prefix+"FieldPosition%1").tqarg(f)); if (!str.isEmpty()) setFieldPosition(f, str); } } |