From 7346aee26bf190a7e70333c40fab4caca847cd27 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:22:56 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- konq-plugins/fsview/inode.cpp | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'konq-plugins/fsview/inode.cpp') diff --git a/konq-plugins/fsview/inode.cpp b/konq-plugins/fsview/inode.cpp index 0411d3a..6f5073c 100644 --- a/konq-plugins/fsview/inode.cpp +++ b/konq-plugins/fsview/inode.cpp @@ -43,7 +43,7 @@ Inode::Inode() Inode::Inode(ScanDir* d, Inode* parent) : TreeMapItem(parent) { - QString absPath; + TQString absPath; if (parent) { absPath = parent->path(); if (!absPath.endsWith("/")) absPath += "/"; @@ -59,7 +59,7 @@ Inode::Inode(ScanDir* d, Inode* parent) Inode::Inode(ScanFile* f, Inode* parent) : TreeMapItem(parent) { - QString absPath; + TQString absPath; if (parent) absPath = parent->path() + "/"; absPath += f->name(); @@ -95,17 +95,17 @@ void Inode::setPeer(ScanDir* d) init(d->name()); } -QString Inode::path() const +TQString Inode::path() const { return _info.absFilePath(); } -void Inode::init(const QString& path) +void Inode::init(const TQString& path) { if (0) kdDebug(90100) << "Inode::init [" << path << "]" << endl; - _info = QFileInfo(path); + _info = TQFileInfo(path); if (!FSView::getDirMetric(path, _sizeEstimation, _fileCountEstimation, @@ -260,16 +260,16 @@ unsigned int Inode::dirCount() const } -QColor Inode::backColor() const +TQColor Inode::backColor() const { - QString n; + TQString n; int id = 0; switch( ((FSView*)widget())->colorMode() ) { case FSView::Depth: { int d = ((FSView*)widget())->pathDepth() + depth(); - return QColor((100*d)%360, 192,128, QColor::Hsv); + return TQColor((100*d)%360, 192,128, TQColor::Hsv); } case FSView::Name: n = text(0); break; @@ -281,7 +281,7 @@ QColor Inode::backColor() const break; } - if (id>0) n = QString::number(id); + if (id>0) n = TQString::number(id); if (n.isEmpty()) return widget()->colorGroup().button(); @@ -293,7 +293,7 @@ QColor Inode::backColor() const s = (s * 17 + h* (unsigned)*str) % 192; str++; } - return QColor(h, 64+s, 192, QColor::Hsv); + return TQColor(h, 64+s, 192, TQColor::Hsv); } KMimeType::Ptr Inode::mimeType() const @@ -308,10 +308,10 @@ KMimeType::Ptr Inode::mimeType() const return _mimeType; } -QString Inode::text(int i) const +TQString Inode::text(int i) const { if (i==0) { - QString name; + TQString name; if (_dirPeer) { name = _dirPeer->name(); if (!name.endsWith("/")) name += "/"; @@ -321,25 +321,25 @@ QString Inode::text(int i) const return name; } if (i==1) { - QString text; + TQString text; double s = size(); if (s < 1000) - text = QString("%1 B").arg((int)(s+.5)); + text = TQString("%1 B").arg((int)(s+.5)); else if (s < 10 * 1024) - text = QString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.005,2)); + text = TQString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.005,2)); else if (s < 100 * 1024) - text = QString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.05,1)); + text = TQString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.05,1)); else if (s < 1000 * 1024) - text = QString("%1 kB").arg((int)(s/1024+.5)); + text = TQString("%1 kB").arg((int)(s/1024+.5)); else if (s < 10 * 1024 * 1024) - text = QString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.005,2)); + text = TQString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.005,2)); else if (s < 100 * 1024 * 1024) - text = QString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.05,1)); + text = TQString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.05,1)); else if (s < 1000 * 1024 * 1024) - text = QString("%1 MB").arg((int)(s/1024/1024+.5)); + text = TQString("%1 MB").arg((int)(s/1024/1024+.5)); else - text = QString("%1 GB").arg(KGlobal::locale()->formatNumber(s/1024/1024/1024+.005,2)); + text = TQString("%1 GB").arg(KGlobal::locale()->formatNumber(s/1024/1024/1024+.005,2)); if (_sizeEstimation>0) text += "+"; return text; @@ -347,17 +347,17 @@ QString Inode::text(int i) const if ((i==2) || (i==3)) { /* file/dir count makes no sense for files */ - if (_filePeer) return QString(); + if (_filePeer) return TQString(); - QString text; + TQString text; unsigned int f = (i==2) ? fileCount() : dirCount(); if (f>0) { while (f>1000) { - text = QString("%1 %2").arg(QString::number(f).right(3)).arg(text); + text = TQString("%1 %2").arg(TQString::number(f).right(3)).arg(text); f /= 1000; } - text = QString("%1 %2").arg(QString::number(f)).arg(text); + text = TQString("%1 %2").arg(TQString::number(f)).arg(text); if (_fileCountEstimation>0) text += "+"; } return text; @@ -367,12 +367,12 @@ QString Inode::text(int i) const if (i==5) return _info.owner(); if (i==6) return _info.group(); if (i==7) return mimeType()->comment(); - return QString(); + return TQString(); } -QPixmap Inode::pixmap(int i) const +TQPixmap Inode::pixmap(int i) const { - if (i!=0) return QPixmap(); + if (i!=0) return TQPixmap(); if (!_mimePixmapSet) { KURL u; -- cgit v1.2.1