From f0296ef9e1f94e23c00d6f490e565d1dc768416d Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 26 May 2011 00:38:19 +0000 Subject: TQt4 port Filelight This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/filelight@1233561 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/part/radialMap/builder.cpp | 14 +++---- src/part/radialMap/labels.cpp | 36 +++++++++--------- src/part/radialMap/map.cpp | 62 +++++++++++++++--------------- src/part/radialMap/radialMap.h | 10 ++--- src/part/radialMap/segmentTip.cpp | 76 ++++++++++++++++++------------------- src/part/radialMap/segmentTip.h | 12 +++--- src/part/radialMap/widget.cpp | 42 ++++++++++---------- src/part/radialMap/widget.h | 43 +++++++++++---------- src/part/radialMap/widgetEvents.cpp | 62 +++++++++++++++--------------- 9 files changed, 179 insertions(+), 178 deletions(-) (limited to 'src/part/radialMap') diff --git a/src/part/radialMap/builder.cpp b/src/part/radialMap/builder.cpp index 68dc382..bae6626 100644 --- a/src/part/radialMap/builder.cpp +++ b/src/part/radialMap/builder.cpp @@ -40,7 +40,7 @@ RadialMap::Builder::Builder( RadialMap::Map *m, const Directory* const d, bool f void RadialMap::Builder::findVisibleDepth( const Directory* const dir, const unsigned int depth ) { - //**** because I don't use the same minimumSize criteria as in the visual function + //**** because I don't use the same tqminimumSize criteria as in the visual function // this can lead to incorrect visual representation //**** BUT, you can't set those limits until you know m_depth! @@ -84,7 +84,7 @@ RadialMap::Builder::build( const Directory* const dir, const unsigned int depth, { //first iteration: dir == m_root - if( dir->children() == 0 ) //we do fileCount rather than size to avoid chance of divide by zero later + if( dir->tqchildren() == 0 ) //we do fileCount rather than size to avoid chance of divide by zero later return false; uint hiddenSize = 0, hiddenFileCount = 0; @@ -116,13 +116,13 @@ RadialMap::Builder::build( const Directory* const dir, const unsigned int depth, hiddenSize += (*it)->size(); if( (*it)->isDirectory() ) //**** considered virtual, but dir wouldn't count itself! - hiddenFileCount += static_cast(*it)->children(); //need to add one to count the dir as well + hiddenFileCount += static_cast(*it)->tqchildren(); //need to add one to count the dir as well ++hiddenFileCount; } } - if( hiddenFileCount == dir->children() && !Config::showSmallFiles ) + if( hiddenFileCount == dir->tqchildren() && !Config::showSmallFiles ) return true; else if( (Config::showSmallFiles && hiddenSize > m_limits[depth]) || (depth == 0 && (hiddenSize > dir->size()/8)) /*|| > size() * 0.75*/ ) @@ -130,9 +130,9 @@ RadialMap::Builder::build( const Directory* const dir, const unsigned int depth, //append a segment for unrepresented space - a "fake" segment // I dunno how to i18n this - const QString s = i18n( "There can't ever be only 1 file", "%1 files, each about %2" ) - .arg( hiddenFileCount ) - .arg( File::humanReadableSize( hiddenSize/hiddenFileCount ) ); + const TQString s = i18n( "There can't ever be only 1 file", "%1 files, each about %2" ) + .tqarg( hiddenFileCount ) + .tqarg( File::humanReadableSize( hiddenSize/hiddenFileCount ) ); (m_signature + depth)->append( new Segment( new File( s.local8Bit(), hiddenSize ), a_start, a_end - a_start, true ) ); } diff --git a/src/part/radialMap/labels.cpp b/src/part/radialMap/labels.cpp index 73a7ba8..402a7f7 100644 --- a/src/part/radialMap/labels.cpp +++ b/src/part/radialMap/labels.cpp @@ -2,10 +2,10 @@ //Copyright: See COPYING file that comes with this distribution #include -#include -#include -#include -#include +#include +#include +#include +#include #include "Config.h" #include "fileTree.h" @@ -30,13 +30,13 @@ namespace RadialMap int x1, y1, x2, y2, x3; int tx, ty; - QString qs; + TQString qs; }; - class LabelList : public QPtrList