summaryrefslogtreecommitdiffstats
path: root/konq-plugins/fsview/inode.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
commit395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch)
tree9829cadb79d2cc7c29a940627fadb28b11e54150 /konq-plugins/fsview/inode.cpp
parent399f47c376fdf4d19192732a701ea9578d11619d (diff)
downloadtdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz
tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/fsview/inode.cpp')
-rw-r--r--konq-plugins/fsview/inode.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/konq-plugins/fsview/inode.cpp b/konq-plugins/fsview/inode.cpp
index 6f5073c..849877e 100644
--- a/konq-plugins/fsview/inode.cpp
+++ b/konq-plugins/fsview/inode.cpp
@@ -40,12 +40,12 @@ Inode::Inode()
init("");
}
-Inode::Inode(ScanDir* d, Inode* parent)
- : TreeMapItem(parent)
+Inode::Inode(ScanDir* d, Inode* tqparent)
+ : TreeMapItem(tqparent)
{
TQString absPath;
- if (parent) {
- absPath = parent->path();
+ if (tqparent) {
+ absPath = tqparent->path();
if (!absPath.endsWith("/")) absPath += "/";
}
absPath += d->name();
@@ -56,12 +56,12 @@ Inode::Inode(ScanDir* d, Inode* parent)
init(absPath);
}
-Inode::Inode(ScanFile* f, Inode* parent)
- : TreeMapItem(parent)
+Inode::Inode(ScanFile* f, Inode* tqparent)
+ : TreeMapItem(tqparent)
{
TQString absPath;
- if (parent)
- absPath = parent->path() + "/";
+ if (tqparent)
+ absPath = tqparent->path() + "/";
absPath += f->name();
_dirPeer = 0;
@@ -168,7 +168,7 @@ void Inode::destroyed(ScanDir* d)
{
if (_dirPeer == d) _dirPeer = 0;
- // remove children
+ // remove tqchildren
clear();
}
@@ -179,15 +179,15 @@ void Inode::destroyed(ScanFile* f)
-TreeMapItemList* Inode::children()
+TreeMapItemList* Inode::tqchildren()
{
if (!_dirPeer) return 0;
- if (!_children) {
+ if (!_tqchildren) {
if (!_dirPeer->scanStarted()) return 0;
- _children = new TreeMapItemList;
- _children->setAutoDelete(true);
+ _tqchildren = new TreeMapItemList;
+ _tqchildren->setAutoDelete(true);
setSorting(-1);
@@ -215,7 +215,7 @@ TreeMapItemList* Inode::children()
_resortNeeded = false;
}
- return _children;
+ return _tqchildren;
}
@@ -284,7 +284,7 @@ TQColor Inode::backColor() const
if (id>0) n = TQString::number(id);
if (n.isEmpty())
- return widget()->colorGroup().button();
+ return widget()->tqcolorGroup().button();
const char* str = n.ascii();
int h = 0, s = 100;
@@ -325,21 +325,21 @@ TQString Inode::text(int i) const
double s = size();
if (s < 1000)
- text = TQString("%1 B").arg((int)(s+.5));
+ text = TQString("%1 B").tqarg((int)(s+.5));
else if (s < 10 * 1024)
- text = TQString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.005,2));
+ text = TQString("%1 kB").tqarg(KGlobal::locale()->formatNumber(s/1024+.005,2));
else if (s < 100 * 1024)
- text = TQString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.05,1));
+ text = TQString("%1 kB").tqarg(KGlobal::locale()->formatNumber(s/1024+.05,1));
else if (s < 1000 * 1024)
- text = TQString("%1 kB").arg((int)(s/1024+.5));
+ text = TQString("%1 kB").tqarg((int)(s/1024+.5));
else if (s < 10 * 1024 * 1024)
- text = TQString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.005,2));
+ text = TQString("%1 MB").tqarg(KGlobal::locale()->formatNumber(s/1024/1024+.005,2));
else if (s < 100 * 1024 * 1024)
- text = TQString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.05,1));
+ text = TQString("%1 MB").tqarg(KGlobal::locale()->formatNumber(s/1024/1024+.05,1));
else if (s < 1000 * 1024 * 1024)
- text = TQString("%1 MB").arg((int)(s/1024/1024+.5));
+ text = TQString("%1 MB").tqarg((int)(s/1024/1024+.5));
else
- text = TQString("%1 GB").arg(KGlobal::locale()->formatNumber(s/1024/1024/1024+.005,2));
+ text = TQString("%1 GB").tqarg(KGlobal::locale()->formatNumber(s/1024/1024/1024+.005,2));
if (_sizeEstimation>0) text += "+";
return text;
@@ -354,10 +354,10 @@ TQString Inode::text(int i) const
if (f>0) {
while (f>1000) {
- text = TQString("%1 %2").arg(TQString::number(f).right(3)).arg(text);
+ text = TQString("%1 %2").tqarg(TQString::number(f).right(3)).tqarg(text);
f /= 1000;
}
- text = TQString("%1 %2").arg(TQString::number(f)).arg(text);
+ text = TQString("%1 %2").tqarg(TQString::number(f)).tqarg(text);
if (_fileCountEstimation>0) text += "+";
}
return text;