summaryrefslogtreecommitdiffstats
path: root/src/part/fileTree.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-26 00:38:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-26 00:38:19 +0000
commitf0296ef9e1f94e23c00d6f490e565d1dc768416d (patch)
tree7f3fd9f99621c111ff67f2d62feb5960a3371853 /src/part/fileTree.h
parent3098eb909534268622ce776f9a7bb5310d31b3c1 (diff)
downloadfilelight-f0296ef9e1f94e23c00d6f490e565d1dc768416d.tar.gz
filelight-f0296ef9e1f94e23c00d6f490e565d1dc768416d.zip
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
Diffstat (limited to 'src/part/fileTree.h')
-rw-r--r--src/part/fileTree.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/part/fileTree.h b/src/part/fileTree.h
index 25ac6fb..eb0cad2 100644
--- a/src/part/fileTree.h
+++ b/src/part/fileTree.h
@@ -4,8 +4,8 @@
#ifndef FILETREE_H
#define FILETREE_H
-#include <qcstring.h> //qstrdup
-#include <qfile.h> //decodeName()
+#include <tqcstring.h> //qstrdup
+#include <tqfile.h> //decodeName()
#include <stdlib.h>
@@ -153,7 +153,7 @@ private:
class Directory;
-class QString;
+class TQString;
class File
{
@@ -168,21 +168,21 @@ public:
File( const char *name, FileSize size ) : m_parent( 0 ), m_name( qstrdup( name ) ), m_size( size ) {}
virtual ~File() { delete [] m_name; }
- const Directory *parent() const { return m_parent; }
+ const Directory *tqparent() const { return m_parent; }
const char *name8Bit() const { return m_name; }
const FileSize size() const { return m_size; }
- QString name() const { return QFile::decodeName( m_name ); }
+ TQString name() const { return TQFile::decodeName( m_name ); }
virtual bool isDirectory() const { return false; }
- QString fullPath( const Directory* = 0 ) const;
- QString humanReadableSize( UnitPrefix key = mega ) const;
+ TQString fullPath( const Directory* = 0 ) const;
+ TQString humanReadableSize( UnitPrefix key = mega ) const;
public:
- static QString humanReadableSize( uint size, UnitPrefix Key = mega );
+ static TQString humanReadableSize( uint size, UnitPrefix Key = mega );
protected:
- File( const char *name, FileSize size, Directory *parent ) : m_parent( parent ), m_name( qstrdup( name ) ), m_size( size ) {}
+ File( const char *name, FileSize size, Directory *tqparent ) : m_parent( tqparent ), m_name( qstrdup( name ) ), m_size( size ) {}
Directory *m_parent; //0 if this is treeRoot
char *m_name;
@@ -197,9 +197,9 @@ private:
class Directory : public Chain<File>, public File
{
public:
- Directory( const char *name ) : File( name, 0 ), m_children( 0 ) {} //DON'T pass the full path!
+ Directory( const char *name ) : File( name, 0 ), m_tqchildren( 0 ) {} //DON'T pass the full path!
- uint children() const { return m_children; }
+ uint tqchildren() const { return m_tqchildren; }
virtual bool isDirectory() const { return true; }
///appends a Directory
@@ -209,7 +209,7 @@ public:
delete [] d->m_name;
d->m_name = qstrdup( name ); } //directories that had a fullpath copy just their names this way
- m_children += d->children(); //doesn't include the dir itself
+ m_tqchildren += d->tqchildren(); //doesn't include the dir itself
d->m_parent = this;
append( (File*)d ); //will add 1 to filecount for the dir itself
}
@@ -223,12 +223,12 @@ public:
private:
void append( File *p )
{
- m_children++;
+ m_tqchildren++;
m_size += p->size();
Chain<File>::append( p );
}
- uint m_children;
+ uint m_tqchildren;
private:
Directory( const Directory& ); //undefined