summaryrefslogtreecommitdiffstats
path: root/konq-plugins/fsview/treemap.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:45:00 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:45:00 -0600
commitca82971624269719d487c6f7980d7237f9420036 (patch)
treecac461d765c50b2709a9ef6324940e70fe056ba2 /konq-plugins/fsview/treemap.cpp
parent0e4ea21f450acbb4ea3c5a1293341668494d7dd4 (diff)
downloadtdeaddons-ca82971624269719d487c6f7980d7237f9420036.tar.gz
tdeaddons-ca82971624269719d487c6f7980d7237f9420036.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'konq-plugins/fsview/treemap.cpp')
-rw-r--r--konq-plugins/fsview/treemap.cpp176
1 files changed, 88 insertions, 88 deletions
diff --git a/konq-plugins/fsview/treemap.cpp b/konq-plugins/fsview/treemap.cpp
index fc83601..cab9809 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;
- _tqchildren = 0;
+ _children = 0;
_widget = 0;
_index = -1;
_depth = -1; // not set
@@ -789,7 +789,7 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value,
setText(0, text1);
_sum = 0;
- _tqchildren = 0;
+ _children = 0;
_widget = 0;
_index = -1;
_depth = -1; // not set
@@ -801,7 +801,7 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value,
TreeMapItem::~TreeMapItem()
{
- if (_tqchildren) delete _tqchildren;
+ if (_children) delete _children;
if (_freeRects) delete _freeRects;
// finally, notify widget about deletion
@@ -842,18 +842,18 @@ void TreeMapItem::redraw()
void TreeMapItem::clear()
{
- if (_tqchildren) {
+ if (_children) {
// delete selected items below this item from selection
if (_widget) _widget->clearSelection(this);
- delete _tqchildren;
- _tqchildren = 0;
+ delete _children;
+ _children = 0;
}
}
-// invalidates current tqchildren and forces redraw
-// this is only usefull when tqchildren are created on demand in items()
+// invalidates current children and forces redraw
+// this is only usefull when children are created on demand in items()
void TreeMapItem::refresh()
{
clear();
@@ -887,9 +887,9 @@ int TreeMapItem::depth() const
bool TreeMapItem::initialized()
{
- if (!_tqchildren) {
- _tqchildren = new TreeMapItemList;
- _tqchildren->setAutoDelete(true);
+ if (!_children) {
+ _children = new TreeMapItemList;
+ _children->setAutoDelete(true);
return false;
}
return true;
@@ -899,16 +899,16 @@ void TreeMapItem::addItem(TreeMapItem* i)
{
if (!i) return;
- if (!_tqchildren) {
- _tqchildren = new TreeMapItemList;
- _tqchildren->setAutoDelete(true);
+ if (!_children) {
+ _children = new TreeMapItemList;
+ _children->setAutoDelete(true);
}
i->setParent(this);
if (sorting(0) == -1)
- _tqchildren->append(i); // preserve insertion order
+ _children->append(i); // preserve insertion order
else
- _tqchildren->inSort(i);
+ _children->inSort(i);
}
@@ -974,17 +974,17 @@ void TreeMapItem::setSorting(int textNo, bool ascending)
_sortAscending = ascending;
_sortTextNo = textNo;
- if (_tqchildren && _sortTextNo != -1) _tqchildren->sort();
+ if (_children && _sortTextNo != -1) _children->sort();
}
void TreeMapItem::resort(bool recursive)
{
- if (!_tqchildren) return;
+ if (!_children) return;
- if (_sortTextNo != -1) _tqchildren->sort();
+ if (_sortTextNo != -1) _children->sort();
if (recursive)
- for (TreeMapItem* i=_tqchildren->first(); i; i=_tqchildren->next())
+ for (TreeMapItem* i=_children->first(); i; i=_children->next())
i->resort(recursive);
}
@@ -1002,13 +1002,13 @@ int TreeMapItem::rtti() const
return 0;
}
-TreeMapItemList* TreeMapItem::tqchildren()
+TreeMapItemList* TreeMapItem::children()
{
- if (!_tqchildren) {
- _tqchildren = new TreeMapItemList;
- _tqchildren->setAutoDelete(true);
+ if (!_children) {
+ _children = new TreeMapItemList;
+ _children->setAutoDelete(true);
}
- return _tqchildren;
+ return _children;
}
void TreeMapItem::clearItemRect()
@@ -1252,7 +1252,7 @@ void TreeMapWidget::setMaxDrawingDepth(int d)
TQString TreeMapWidget::defaultFieldType(int f) const
{
- return i18n("Text %1").tqarg(f+1);
+ return i18n("Text %1").arg(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->tqchildren();
+ TreeMapItemList* list = p->children();
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->tqitemRect().x() << "/" << i->tqitemRect().y()
- << "-" << i->tqitemRect().width()
- << "x" << i->tqitemRect().height() << ")" << endl;
+ << i->itemRect().x() << "/" << i->itemRect().y()
+ << "-" << i->itemRect().width()
+ << "x" << i->itemRect().height() << ")" << endl;
- if (i->tqitemRect().contains(x, y)) {
+ if (i->itemRect().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->tqitemRect().width() << "x" << p->tqitemRect().height()
+ << p->itemRect().width() << "x" << p->itemRect().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->tqitemRect().width() <1) ||
- (i->tqitemRect().height() <1))) {
+ while(i && ((i->itemRect().width() <1) ||
+ (i->itemRect().height() <1))) {
TreeMapItem* p = i->parent();
if (!p) break;
- int idx = p->tqchildren()->findRef(i);
+ int idx = p->children()->findRef(i);
idx--;
if (idx<0)
i = p;
else
- i = p->tqchildren()->at(idx);
+ i = p->children()->at(idx);
}
}
return i;
@@ -1745,7 +1745,7 @@ TreeMapItem* TreeMapWidget::setTmpRangeSelection(TreeMapItem* i1,
i2 = i2->parent();
if (!i2) return changed;
- TreeMapItemList* list = commonParent->tqchildren();
+ TreeMapItemList* list = commonParent->children();
if (!list) return changed;
TreeMapItem* i = list->first();
@@ -1768,11 +1768,11 @@ void TreeMapWidget::contextMenuEvent( TQContextMenuEvent* e )
{
//kdDebug(90100) << "TreeMapWidget::contextMenuEvent" << endl;
- if ( tqreceivers( TQT_SIGNAL(contextMenuRequested(TreeMapItem*, const TQPoint &)) ) )
+ if ( receivers( TQT_SIGNAL(contextMenuRequested(TreeMapItem*, const TQPoint &)) ) )
e->accept();
if ( e->reason() == TQContextMenuEvent::Keyboard ) {
- TQRect r = (_current) ? _current->tqitemRect() : _base->tqitemRect();
+ TQRect r = (_current) ? _current->itemRect() : _base->itemRect();
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->tqitemRect().isEmpty()) return -1;
+ if (!p || p->itemRect().isEmpty()) return -1;
- int idx = p->tqchildren()->findRef(i);
+ int idx = p->children()->findRef(i);
if (idx<0) return -1;
- while (idx < (int)p->tqchildren()->count()-1) {
+ while (idx < (int)p->children()->count()-1) {
idx++;
- TQRect r = p->tqchildren()->at(idx)->tqitemRect();
+ TQRect r = p->children()->at(idx)->itemRect();
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->tqitemRect().isEmpty()) return -1;
+ if (!p || p->itemRect().isEmpty()) return -1;
- int idx = p->tqchildren()->findRef(i);
+ int idx = p->children()->findRef(i);
if (idx<0) return -1;
while (idx > 0) {
idx--;
- TQRect r = p->tqchildren()->at(idx)->tqitemRect();
+ TQRect r = p->children()->at(idx)->itemRect();
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->tqchildren()->at(newIdx), true);
+ setCurrent(p->children()->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->tqchildren()->at(newIdx), true);
+ setCurrent(p->children()->at(newIdx), true);
}
}
else if (e->key() == Key_Down) {
- if (_current->tqchildren() && _current->tqchildren()->count()>0) {
+ if (_current->children() && _current->children()->count()>0) {
int newIdx = _current->index();
if (newIdx<0)
- newIdx = goBack ? (_current->tqchildren()->count()-1) : 0;
- if (newIdx>=(int)_current->tqchildren()->count())
- newIdx = _current->tqchildren()->count()-1;
- newItem = visibleItem(_current->tqchildren()->at(newIdx));
+ newIdx = goBack ? (_current->children()->count()-1) : 0;
+ if (newIdx>=(int)_current->children()->count())
+ newIdx = _current->children()->count()-1;
+ newItem = visibleItem(_current->children()->at(newIdx));
setCurrent(newItem, true);
}
}
@@ -2136,7 +2136,7 @@ void TreeMapWidget::drawTreeMap()
}
else {
// only subitem
- if (!_needsRefresh->tqitemRect().isValid()) return;
+ if (!_needsRefresh->itemRect().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()),
- tqcolorGroup() );
+ colorGroup() );
}
}
@@ -2198,7 +2198,7 @@ void TreeMapWidget::drawItem(TQPainter* p,
bool isCurrent = _current && item->isChildOf(_current);
- RectDrawing d(item->tqitemRect());
+ RectDrawing d(item->itemRect());
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->tqitemRect().x() << "/" << item->tqitemRect().y()
- << "-" << item->tqitemRect().width() << "x"
- << item->tqitemRect().height() << "), Val " << item->value()
+ << item->itemRect().x() << "/" << item->itemRect().y()
+ << "-" << item->itemRect().width() << "x"
+ << item->itemRect().height() << "), Val " << item->value()
<< ", Sum " << item->sum() << endl;
drawItem(p, item);
item->clearFreeRects();
- TQRect origRect = item->tqitemRect();
+ TQRect origRect = item->itemRect();
int bw = item->borderWidth();
TQRect r = TQRect(origRect.x()+bw, origRect.y()+bw,
origRect.width()-2*bw, origRect.height()-2*bw);
- TreeMapItemList* list = item->tqchildren();
+ TreeMapItemList* list = item->children();
TreeMapItem* i;
bool stopDrawing = false;
- // only subdivide if there are tqchildren
+ // only subdivide if there are children
if (!list || list->count()==0)
stopDrawing = true;
@@ -2283,12 +2283,12 @@ void TreeMapWidget::drawItems(TQPainter* p,
if (stopDrawing) {
if (list) {
- // tqinvalidate rects
+ // invalidate rects
for (i=list->first();i;i=list->next())
i->clearItemRect();
}
// tooltip apears on whole item rect
- item->addFreeRect(item->tqitemRect());
+ item->addFreeRect(item->itemRect());
// 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 tqchildren) for tooltip
+ // set selfRect (not occupied by children) 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 tqchildren
+// fills area with a pattern if to small to draw children
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 tqchildren
+// fills area with a pattern if to small to draw children
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").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->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->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").tqarg(fieldType(0)), id);
+ popup->insertItem(i18n("No %1 Limit").arg(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)")
- .tqarg(i->text(0)).tqarg(area), id+1);
+ .arg(i->text(0)).arg(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)")
- .tqarg(minimalArea()*2), id+5);
+ .arg(minimalArea()*2), id+5);
popup->insertItem(i18n("Halve Area Limit (to %1)")
- .tqarg(minimalArea()/2), id+6);
+ .arg(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)")
- .tqarg(i->text(0)).tqarg(d), id+1);
+ .arg(i->text(0)).arg(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").tqarg(depth), id+4+count);
+ popup->insertItem(i18n("Depth %1").arg(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").tqarg(maxDrawingDepth()), id+10);
+ popup->insertItem(i18n("Depth %1").arg(maxDrawingDepth()), id+10);
popup->setItemChecked(id+10, true);
}
popup->insertItem(i18n("Decrement (to %1)")
- .tqarg(maxDrawingDepth()-1), id+2);
+ .arg(maxDrawingDepth()-1), id+2);
popup->insertItem(i18n("Increment (to %1)")
- .tqarg(maxDrawingDepth()+1), id+3);
+ .arg(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").tqarg(f),
+ config->writeEntry(TQString(prefix+"FieldVisible%1").arg(f),
_attr[f].visible);
- config->writeEntry(TQString(prefix+"FieldForced%1").tqarg(f),
+ config->writeEntry(TQString(prefix+"FieldForced%1").arg(f),
_attr[f].forced);
- config->writeEntry(TQString(prefix+"FieldStop%1").tqarg(f),
+ config->writeEntry(TQString(prefix+"FieldStop%1").arg(f),
_attr[f].stop);
- config->writeEntry(TQString(prefix+"FieldPosition%1").tqarg(f),
+ config->writeEntry(TQString(prefix+"FieldPosition%1").arg(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").tqarg(f);
+ str = TQString(prefix+"FieldVisible%1").arg(f);
if (config->hasKey(str))
setFieldVisible(f, config->readBoolEntry(str));
- str = TQString(prefix+"FieldForced%1").tqarg(f);
+ str = TQString(prefix+"FieldForced%1").arg(f);
if (config->hasKey(str))
setFieldForced(f, config->readBoolEntry(str));
- str = config->readEntry(TQString(prefix+"FieldStop%1").tqarg(f));
+ str = config->readEntry(TQString(prefix+"FieldStop%1").arg(f));
setFieldStop(f, str);
- str = config->readEntry(TQString(prefix+"FieldPosition%1").tqarg(f));
+ str = config->readEntry(TQString(prefix+"FieldPosition%1").arg(f));
if (!str.isEmpty()) setFieldPosition(f, str);
}
}