summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kdirstat/kactivitytracker.cpp6
-rw-r--r--kdirstat/kactivitytracker.h11
-rw-r--r--kdirstat/kcleanup.cpp70
-rw-r--r--kdirstat/kcleanup.h49
-rw-r--r--kdirstat/kcleanupcollection.cpp40
-rw-r--r--kdirstat/kcleanupcollection.h17
-rw-r--r--kdirstat/kdirsaver.cpp10
-rw-r--r--kdirstat/kdirsaver.h12
-rw-r--r--kdirstat/kdirstatapp.cpp168
-rw-r--r--kdirstat/kdirstatapp.h23
-rw-r--r--kdirstat/kdirstatfeedback.cpp4
-rw-r--r--kdirstat/kdirstatsettings.cpp364
-rw-r--r--kdirstat/kdirstatsettings.h140
-rw-r--r--kdirstat/kdirtree.cpp212
-rw-r--r--kdirstat/kdirtree.h136
-rw-r--r--kdirstat/kdirtreeiterators.cpp74
-rw-r--r--kdirstat/kdirtreeiterators.h64
-rw-r--r--kdirstat/kdirtreeview.cpp409
-rw-r--r--kdirstat/kdirtreeview.h228
-rw-r--r--kdirstat/kfeedback.cpp145
-rw-r--r--kdirstat/kfeedback.h101
-rw-r--r--kdirstat/kpacman.cpp56
-rw-r--r--kdirstat/kpacman.h57
-rw-r--r--kdirstat/kstdcleanup.cpp36
-rw-r--r--kdirstat/kstdcleanup.h14
-rw-r--r--kdirstat/ktreemaptile.cpp142
-rw-r--r--kdirstat/ktreemaptile.h82
-rw-r--r--kdirstat/ktreemapview.cpp266
-rw-r--r--kdirstat/ktreemapview.h75
29 files changed, 1505 insertions, 1506 deletions
diff --git a/kdirstat/kactivitytracker.cpp b/kdirstat/kactivitytracker.cpp
index a7a1826..e83868b 100644
--- a/kdirstat/kactivitytracker.cpp
+++ b/kdirstat/kactivitytracker.cpp
@@ -15,10 +15,10 @@
#include "kactivitytracker.h"
-KActivityTracker::KActivityTracker( QObject * parent,
- const QString & id,
+KActivityTracker::KActivityTracker( TQObject * tqparent,
+ const TQString & id,
long initialThreshold )
- : QObject( parent )
+ : TQObject( tqparent )
{
_id = id;
diff --git a/kdirstat/kactivitytracker.h b/kdirstat/kactivitytracker.h
index 081d1d8..dd0856e 100644
--- a/kdirstat/kactivitytracker.h
+++ b/kdirstat/kactivitytracker.h
@@ -15,7 +15,7 @@
#include <config.h>
#endif
-#include <qobject.h>
+#include <tqobject.h>
/**
@@ -29,9 +29,10 @@
*
* @short User activity tracker
**/
-class KActivityTracker: public QObject
+class KActivityTracker: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor. The ID is a name for the KConfig object to look in for
@@ -39,8 +40,8 @@ public:
* the application's @ref KConfig object doesn't contain a corresponding
* entry yet.
**/
- KActivityTracker( QObject * parent,
- const QString & id,
+ KActivityTracker( TQObject * tqparent,
+ const TQString & id,
long initialThreshold );
/**
@@ -100,7 +101,7 @@ protected:
long _sum;
long _threshold;
long _lastSignal;
- QString _id;
+ TQString _id;
};
#endif // KActivityTracker_h
diff --git a/kdirstat/kcleanup.cpp b/kdirstat/kcleanup.cpp
index 01251a2..6e20dd7 100644
--- a/kdirstat/kcleanup.cpp
+++ b/kdirstat/kcleanup.cpp
@@ -9,8 +9,8 @@
#include <stdlib.h>
-#include <qapplication.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
#include <kapp.h>
#include <kprocess.h>
@@ -28,14 +28,14 @@
using namespace KDirStat;
-KCleanup::KCleanup( QString id,
- QString command,
- QString title,
- KActionCollection * parent )
+KCleanup::KCleanup( TQString id,
+ TQString command,
+ TQString title,
+ KActionCollection * tqparent )
: KAction( title,
0, // accel
- parent,
+ tqparent,
id )
, _id ( id )
@@ -91,7 +91,7 @@ KCleanup::copy( const KCleanup &src )
void
-KCleanup::setTitle( const QString &title )
+KCleanup::setTitle( const TQString &title )
{
_title = title;
KAction::setText( _title );
@@ -162,18 +162,18 @@ KCleanup::executeWithSelection()
bool
KCleanup::confirmation( KFileInfo * item )
{
- QString msg;
+ TQString msg;
if ( item->isDir() || item->isDotEntry() )
{
- msg = i18n( "%1\nin directory %2" ).arg( cleanTitle() ).arg( item->url() );
+ msg = i18n( "%1\nin directory %2" ).tqarg( cleanTitle() ).tqarg( item->url() );
}
else
{
- msg = i18n( "%1\nfor file %2" ).arg( cleanTitle() ).arg( item->url() );
+ msg = i18n( "%1\nfor file %2" ).tqarg( cleanTitle() ).tqarg( item->url() );
}
- if ( KMessageBox::warningContinueCancel( 0, // parentWidget
+ if ( KMessageBox::warningContinueCancel( 0, // tqparentWidget
msg, // message
i18n( "Please Confirm" ), // caption
i18n( "Confirm" ) // confirmButtonLabel
@@ -209,7 +209,7 @@ KCleanup::execute( KFileInfo *item )
case refreshParent:
- tree->refresh( item->parent() );
+ tree->refresh( item->tqparent() );
break;
@@ -252,7 +252,7 @@ KCleanup::executeRecursive( KFileInfo *item )
{
/**
* Recursively execute in this subdirectory, but only if it
- * really is a directory: File children might have been
+ * really is a directory: File tqchildren might have been
* reparented to the directory (normally, they reside in
* the dot entry) if there are no real subdirectories on
* this directory level.
@@ -271,26 +271,26 @@ KCleanup::executeRecursive( KFileInfo *item )
}
-const QString
+const TQString
KCleanup::itemDir( const KFileInfo *item ) const
{
- QString dir = item->url();
+ TQString dir = item->url();
if ( ! item->isDir() && ! item->isDotEntry() )
{
- dir.replace ( QRegExp ( "/[^/]*$" ), "" );
+ dir.tqreplace ( TQRegExp ( "/[^/]*$" ), "" );
}
return dir;
}
-QString
+TQString
KCleanup::cleanTitle() const
{
// Use the cleanup action's title, if possible.
- QString title = _title;
+ TQString title = _title;
if ( title.isEmpty() )
{
@@ -299,45 +299,45 @@ KCleanup::cleanTitle() const
// Get rid of any "&" characters in the text that denote keyboard
// shortcuts in menus.
- title.replace( QRegExp( "&" ), "" );
+ title.tqreplace( TQRegExp( "&" ), "" );
return title;
}
-QString
+TQString
KCleanup::expandVariables( const KFileInfo * item,
- const QString & unexpanded ) const
+ const TQString & unexpanded ) const
{
- QString expanded = unexpanded;
+ TQString expanded = unexpanded;
- expanded.replace( QRegExp( "%p" ),
- "\"" + QString::fromLocal8Bit( item->url() ) + "\"" );
- expanded.replace( QRegExp( "%n" ),
- "\"" + QString::fromLocal8Bit( item->name() ) + "\"" );
+ expanded.tqreplace( TQRegExp( "%p" ),
+ "\"" + TQString::fromLocal8Bit( item->url() ) + "\"" );
+ expanded.tqreplace( TQRegExp( "%n" ),
+ "\"" + TQString::fromLocal8Bit( item->name() ) + "\"" );
if ( KDE::versionMajor() >= 3 && KDE::versionMinor() >= 4 )
- expanded.replace( QRegExp( "%t" ), "trash:/" );
+ expanded.tqreplace( TQRegExp( "%t" ), "trash:/" );
else
- expanded.replace( QRegExp( "%t" ), KGlobalSettings::trashPath() );
+ expanded.tqreplace( TQRegExp( "%t" ), KGlobalSettings::trashPath() );
return expanded;
}
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
void
KCleanup::runCommand ( const KFileInfo * item,
- const QString & command ) const
+ const TQString & command ) const
{
KProcess proc;
KDirSaver dir( itemDir( item ) );
- QString cmd( expandVariables( item, command ));
+ TQString cmd( expandVariables( item, command ));
#if VERBOSE_RUN_COMMAND
printf( "\ncd " );
fflush( stdout );
system( "pwd" );
- QTextCodec * codec = QTextCodec::codecForLocale();
+ TQTextCodec * codec = TQTextCodec::codecForLocale();
printf( "%s\n", (const char *) codec->fromUnicode( cmd ) );
fflush( stdout );
#endif
@@ -368,9 +368,9 @@ KCleanup::runCommand ( const KFileInfo * item,
// performing the update prematurely, so we are starting this
// process in blocking mode.
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
proc.start( KProcess::Block );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
break;
}
diff --git a/kdirstat/kcleanup.h b/kdirstat/kcleanup.h
index 0cb7f13..28952d9 100644
--- a/kdirstat/kcleanup.h
+++ b/kdirstat/kcleanup.h
@@ -17,9 +17,9 @@
#endif
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qintdict.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqintdict.h>
#include <kaction.h>
#include <kdebug.h>
#include "kdirtree.h"
@@ -36,6 +36,7 @@ namespace KDirStat
class KCleanup: public KAction
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -49,13 +50,13 @@ namespace KDirStat
* 'command' is the shell command to execute.
*
* Most applications will want to pass KMainWindow::actionCollection()
- * for 'parent' so the menus and toolbars can be created using the XML
+ * for 'tqparent' so the menus and toolbars can be created using the XML
* UI description ('kdirstatui.rc' for KDirStat).
**/
- KCleanup( QString id = "",
- QString command = "",
- QString title = "",
- KActionCollection * parent = 0 );
+ KCleanup( TQString id = "",
+ TQString command = "",
+ TQString title = "",
+ KActionCollection * tqparent = 0 );
/**
* Copy Constructor.
@@ -84,7 +85,7 @@ namespace KDirStat
* and the XML UI description. This ID should be unique within the
* application.
**/
- const QString & id() const { return _id; }
+ const TQString & id() const { return _id; }
/**
* Return the command line that will be executed upon calling @ref
@@ -92,20 +93,20 @@ namespace KDirStat
* complete path of the directory or file concerned or %n for the pure
* file or directory name without path.
**/
- const QString & command() const { return _command; }
+ const TQString & command() const { return _command; }
/**
* Return the user title of this command as displayed in menus.
* This may include '&' characters for keyboard shortcuts.
* See also @ref cleanTitle() .
**/
- const QString & title() const { return _title; }
+ const TQString & title() const { return _title; }
/**
* Returns the cleanup action's title without '&' keyboard shortcuts.
* Uses the ID as fallback if the name is empty.
**/
- QString cleanTitle() const;
+ TQString cleanTitle() const;
/**
* Return whether or not this cleanup action is generally enabled.
@@ -181,8 +182,8 @@ namespace KDirStat
* refreshThis: Refresh the KDirTree from the item on that was passed
* to KCleanup::execute().
*
- * refreshParent: Refresh the KDirTree from the parent of the item on
- * that was passed to KCleanup::execute(). If there is no such parent,
+ * refreshParent: Refresh the KDirTree from the tqparent of the item on
+ * that was passed to KCleanup::execute(). If there is no such tqparent,
* refresh the entire tree.
*
* assumeDeleted: Do not actually refresh the KDirTree. Instead,
@@ -200,9 +201,9 @@ namespace KDirStat
enum RefreshPolicy refreshPolicy() const { return _refreshPolicy; }
- void setTitle ( const QString &title );
- void setId ( const QString &id ) { _id = id; }
- void setCommand ( const QString &command) { _command = command; }
+ void setTitle ( const TQString &title );
+ void setId ( const TQString &id ) { _id = id; }
+ void setCommand ( const TQString &command) { _command = command; }
void setEnabled ( bool enabled ) { _enabled = enabled; }
void setWorksForDir ( bool canDo ) { _worksForDir = canDo; }
void setWorksForFile ( bool canDo ) { _worksForFile = canDo; }
@@ -282,7 +283,7 @@ namespace KDirStat
/**
* Retrieve the directory part of a KFileInfo's path.
**/
- const QString itemDir( const KFileInfo *item ) const;
+ const TQString itemDir( const KFileInfo *item ) const;
/**
* Expand some variables in string 'unexpanded' to information from
@@ -307,14 +308,14 @@ namespace KDirStat
* "kfmclient openURL %p"
* "tar czvf %{name}.tgz && rm -rf %{name}"
**/
- QString expandVariables ( const KFileInfo * item,
- const QString & unexpanded ) const;
+ TQString expandVariables ( const KFileInfo * item,
+ const TQString & unexpanded ) const;
/**
* Run a command with 'item' as base to expand variables.
**/
void runCommand ( const KFileInfo * item,
- const QString & command ) const;
+ const TQString & command ) const;
/**
* Internal implementation of the copy constructor and assignment
@@ -328,9 +329,9 @@ namespace KDirStat
//
KFileInfo * _selection;
- QString _id;
- QString _command;
- QString _title;
+ TQString _id;
+ TQString _command;
+ TQString _title;
bool _enabled;
bool _worksForDir;
bool _worksForFile;
diff --git a/kdirstat/kcleanupcollection.cpp b/kdirstat/kcleanupcollection.cpp
index fffa9b4..8b10505 100644
--- a/kdirstat/kcleanupcollection.cpp
+++ b/kdirstat/kcleanupcollection.cpp
@@ -18,14 +18,14 @@ using namespace KDirStat;
KCleanupCollection::KCleanupCollection( KActionCollection * actionCollection )
- : QObject()
+ : TQObject()
, _actionCollection( actionCollection )
{
/**
- * All cleanups beloningt to this collection are stored in two separate Qt
- * collections, a QList and a QDict. Make _one_ of them manage the cleanup
+ * All cleanups beloningt to this collection are stored in two separate TQt
+ * collections, a TQList and a TQDict. Make _one_ of them manage the cleanup
* objects, i.e. have them clear the KCleanup objects upon deleting. The
- * QList is the master collection, the QDict the slave.
+ * TQList is the master collection, the TQDict the slave.
**/
_cleanupList.setAutoDelete( true );
@@ -36,7 +36,7 @@ KCleanupCollection::KCleanupCollection( KActionCollection * actionCollection )
KCleanupCollection::KCleanupCollection( const KCleanupCollection &src )
- : QObject()
+ : TQObject()
{
deepCopy( src );
@@ -80,7 +80,7 @@ KCleanupCollection::operator= ( const KCleanupCollection &src )
* limitations of the KCleanup copy constructor: It doesn't make a
* truly identical copy of the entire KCleanup object. Rather, it
* copies only the KCleanup members and leaves most of the KAction
- * members (the parent class) untouched.
+ * members (the tqparent class) untouched.
*
* The behaviour implemented here comes handy in the most common
* situation where this assignment operator is used:
@@ -190,17 +190,17 @@ KCleanupCollection::add( KCleanup *newCleanup )
_cleanupList.append( newCleanup );
_cleanupDict.insert( newCleanup->id(), newCleanup );
- connect( this, SIGNAL( selectionChanged( KFileInfo * ) ),
- newCleanup, SLOT ( selectionChanged( KFileInfo * ) ) );
+ connect( this, TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
+ newCleanup, TQT_SLOT ( selectionChanged( KFileInfo * ) ) );
- connect( this, SIGNAL( readConfig() ),
- newCleanup, SLOT ( readConfig() ) );
+ connect( this, TQT_SIGNAL( readConfig() ),
+ newCleanup, TQT_SLOT ( readConfig() ) );
- connect( this, SIGNAL( saveConfig() ),
- newCleanup, SLOT ( saveConfig() ) );
+ connect( this, TQT_SIGNAL( saveConfig() ),
+ newCleanup, TQT_SLOT ( saveConfig() ) );
- connect( newCleanup, SIGNAL( executed() ),
- this, SLOT ( cleanupExecuted() ) );
+ connect( newCleanup, TQT_SIGNAL( executed() ),
+ this, TQT_SLOT ( cleanupExecuted() ) );
}
@@ -222,16 +222,16 @@ KCleanupCollection::addUserCleanups( int number )
{
for ( int i=0; i < number; i++ )
{
- QString id;
+ TQString id;
id.sprintf( "cleanup_user_defined_%d", _nextUserCleanupNo );
- QString title;
+ TQString title;
if ( _nextUserCleanupNo <= 9 )
// Provide a keyboard shortcut for cleanup #0..#9
- title=i18n( "User Defined Cleanup #&%1" ).arg(_nextUserCleanupNo);
+ title=i18n( "User Defined Cleanup #&%1" ).tqarg(_nextUserCleanupNo);
else
// No keyboard shortcuts for cleanups #10.. - they would be duplicates
- title=i18n( "User Defined Cleanup #%1" ).arg(_nextUserCleanupNo);
+ title=i18n( "User Defined Cleanup #%1" ).tqarg(_nextUserCleanupNo);
_nextUserCleanupNo++;
@@ -242,7 +242,7 @@ KCleanupCollection::addUserCleanups( int number )
if ( i <= 9 )
{
// Provide an application-wide keyboard accelerator for cleanup #0..#9
- cleanup->setShortcut( Qt::CTRL + Qt::Key_0 + i );
+ cleanup->setShortcut( TQt::CTRL + TQt::Key_0 + i );
}
add( cleanup );
@@ -251,7 +251,7 @@ KCleanupCollection::addUserCleanups( int number )
KCleanup *
-KCleanupCollection::cleanup( const QString & id )
+KCleanupCollection::cleanup( const TQString & id )
{
return _cleanupDict[ id ];
}
diff --git a/kdirstat/kcleanupcollection.h b/kdirstat/kcleanupcollection.h
index 74f0900..2ac4fb8 100644
--- a/kdirstat/kcleanupcollection.h
+++ b/kdirstat/kcleanupcollection.h
@@ -25,11 +25,11 @@ class KActionCollection;
namespace KDirStat
{
- typedef QDict<KCleanup> KCleanupDict;
- typedef QDictIterator<KCleanup> KCleanupDictIterator;
+ typedef TQDict<KCleanup> KCleanupDict;
+ typedef TQDictIterator<KCleanup> KCleanupDictIterator;
- typedef QPtrList<KCleanup> KCleanupList;
- typedef QPtrListIterator<KCleanup> KCleanupListIterator;
+ typedef TQPtrList<KCleanup> KCleanupList;
+ typedef TQPtrListIterator<KCleanup> KCleanupListIterator;
/**
@@ -43,9 +43,10 @@ namespace KDirStat
* @short KDirStat cleanup action collection
**/
- class KCleanupCollection: public QObject
+ class KCleanupCollection: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -57,7 +58,7 @@ namespace KDirStat
* using the XML UI description ('kdirstatui.rc' for KDirStat).
*
* All @ref KCleanup actions ever added to this collection will get
- * this as their parent.
+ * this as their tqparent.
**/
KCleanupCollection( KActionCollection * actionCollection = 0 );
@@ -110,13 +111,13 @@ namespace KDirStat
* Retrieve a cleanup by its ID (internal name).
* Returns 0 if there is no such cleanup.
**/
- KCleanup * cleanup( const QString & id );
+ KCleanup * cleanup( const TQString & id );
/**
* An alias to @ref cleanup() for convenience: Thus, you can use
* collection[ "cleanup_id" ] to access any particular cleanup.
**/
- KCleanup * operator[] ( const QString & id )
+ KCleanup * operator[] ( const TQString & id )
{ return cleanup( id ); }
/**
diff --git a/kdirstat/kdirsaver.cpp b/kdirstat/kdirsaver.cpp
index 2be9074..2f1b79d 100644
--- a/kdirstat/kdirsaver.cpp
+++ b/kdirstat/kdirsaver.cpp
@@ -13,11 +13,11 @@
#include "kdirsaver.h"
-KDirSaver::KDirSaver( const QString & newPath )
+KDirSaver::KDirSaver( const TQString & newPath )
{
/*
* No need to actually save the current working directory: This object
- * includes a QDir whose default constructor constructs a directory object
+ * includes a TQDir whose default constructor constructs a directory object
* that contains the current working directory. Just what is needed here.
*/
@@ -45,7 +45,7 @@ KDirSaver::~KDirSaver()
void
-KDirSaver::cd( const QString & newPath )
+KDirSaver::cd( const TQString & newPath )
{
if ( ! newPath.isEmpty() )
{
@@ -54,10 +54,10 @@ KDirSaver::cd( const QString & newPath )
}
-QString
+TQString
KDirSaver::currentDirPath() const
{
- return QDir::currentDirPath();
+ return TQDir::currentDirPath();
}
diff --git a/kdirstat/kdirsaver.h b/kdirstat/kdirsaver.h
index 4fbe6e2..b9bbb38 100644
--- a/kdirstat/kdirsaver.h
+++ b/kdirstat/kdirsaver.h
@@ -16,7 +16,7 @@
#endif
#include <kurl.h>
-#include <qdir.h>
+#include <tqdir.h>
/**
@@ -33,7 +33,7 @@ public:
* path supplied. The old working directory will be restored when this
* object is destroyed.
**/
- KDirSaver( const QString & newPath = "" );
+ KDirSaver( const TQString & newPath = "" );
/**
* Constructor from a KURL. Will issue error messages on stdout for
@@ -47,17 +47,17 @@ public:
virtual ~KDirSaver();
/**
- * Change directory. Unlike @ref QDir::cd(), this method really performs a
+ * Change directory. Unlike @ref TQDir::cd(), this method really performs a
* system chdir() so subsequent system calls will have the directory
* specified as the new current working directory.
**/
- void cd( const QString & newPath );
+ void cd( const TQString & newPath );
/**
* Obtain the current working directory's absolute path.
* This is useful for resolving/simplifying relative paths.
**/
- QString currentDirPath() const;
+ TQString currentDirPath() const;
/**
* (Prematurely) restore the working directory. Unnecessary when this
@@ -66,7 +66,7 @@ public:
void restore();
protected:
- QDir oldWorkingDir;
+ TQDir oldWorkingDir;
};
#endif // KDirSaver_h
diff --git a/kdirstat/kdirstatapp.cpp b/kdirstat/kdirstatapp.cpp
index 22726e9..81fce60 100644
--- a/kdirstat/kdirstatapp.cpp
+++ b/kdirstat/kdirstatapp.cpp
@@ -10,9 +10,9 @@
*/
-#include <qclipboard.h>
-#include <qpopupmenu.h>
-#include <qsplitter.h>
+#include <tqclipboard.h>
+#include <tqpopupmenu.h>
+#include <tqsplitter.h>
#include <kaccel.h>
#include <kaction.h>
@@ -54,7 +54,7 @@
using namespace KDirStat;
-KDirStatApp::KDirStatApp( QWidget* , const char* name )
+KDirStatApp::KDirStatApp( TQWidget* , const char* name )
: KMainWindow( 0, name )
{
// Simple inits
@@ -73,39 +73,39 @@ KDirStatApp::KDirStatApp( QWidget* , const char* name )
// Set up internal (mainWin -> mainWin) connections
- connect( this, SIGNAL( readConfig ( void ) ),
- this, SLOT ( readMainWinConfig( void ) ) );
+ connect( this, TQT_SIGNAL( readConfig ( void ) ),
+ this, TQT_SLOT ( readMainWinConfig( void ) ) );
- connect( this, SIGNAL( saveConfig ( void ) ),
- this, SLOT ( saveMainWinConfig( void ) ) );
+ connect( this, TQT_SIGNAL( saveConfig ( void ) ),
+ this, TQT_SLOT ( saveMainWinConfig( void ) ) );
// Create main window
- _splitter = new QSplitter( QSplitter::Vertical, this );
+ _splitter = new TQSplitter( Qt::Vertical, this );
setCentralWidget( _splitter );
_treeView = new KDirTreeView( _splitter );
- connect( _treeView, SIGNAL( progressInfo( const QString & ) ),
- this, SLOT ( statusMsg ( const QString & ) ) );
+ connect( _treeView, TQT_SIGNAL( progressInfo( const TQString & ) ),
+ this, TQT_SLOT ( statusMsg ( const TQString & ) ) );
- connect( _treeView, SIGNAL( selectionChanged( KFileInfo * ) ),
- this, SLOT ( selectionChanged( KFileInfo * ) ) );
+ connect( _treeView, TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
+ this, TQT_SLOT ( selectionChanged( KFileInfo * ) ) );
- connect( _treeView, SIGNAL( contextMenu( KDirTreeViewItem *, const QPoint & ) ),
- this, SLOT ( contextMenu( KDirTreeViewItem *, const QPoint & ) ) );
+ connect( _treeView, TQT_SIGNAL( contextMenu( KDirTreeViewItem *, const TQPoint & ) ),
+ this, TQT_SLOT ( contextMenu( KDirTreeViewItem *, const TQPoint & ) ) );
- connect( this, SIGNAL( readConfig() ), _treeView, SLOT ( readConfig() ) );
- connect( this, SIGNAL( saveConfig() ), _treeView, SLOT ( saveConfig() ) );
+ connect( this, TQT_SIGNAL( readConfig() ), _treeView, TQT_SLOT ( readConfig() ) );
+ connect( this, TQT_SIGNAL( saveConfig() ), _treeView, TQT_SLOT ( saveConfig() ) );
- connect( _treeView, SIGNAL( finished() ), this, SLOT( createTreemapView() ) );
- connect( _treeView, SIGNAL( aborted() ), this, SLOT( createTreemapView() ) );
- connect( _treeView, SIGNAL( startingReading() ), this, SLOT( deleteTreemapView() ) );
+ connect( _treeView, TQT_SIGNAL( finished() ), TQT_TQOBJECT(this), TQT_SLOT( createTreemapView() ) );
+ connect( _treeView, TQT_SIGNAL( aborted() ), TQT_TQOBJECT(this), TQT_SLOT( createTreemapView() ) );
+ connect( _treeView, TQT_SIGNAL( startingReading() ), TQT_TQOBJECT(this), TQT_SLOT( deleteTreemapView() ) );
- connect( _treeView, SIGNAL( startingReading() ), this, SLOT( updateActions() ) );
- connect( _treeView, SIGNAL( finished() ), this, SLOT( updateActions() ) );
- connect( _treeView, SIGNAL( aborted() ), this, SLOT( updateActions() ) );
+ connect( _treeView, TQT_SIGNAL( startingReading() ), TQT_TQOBJECT(this), TQT_SLOT( updateActions() ) );
+ connect( _treeView, TQT_SIGNAL( finished() ), TQT_TQOBJECT(this), TQT_SLOT( updateActions() ) );
+ connect( _treeView, TQT_SIGNAL( aborted() ), TQT_TQOBJECT(this), TQT_SLOT( updateActions() ) );
// Call inits to invoke all other construction parts
@@ -115,8 +115,8 @@ KDirStatApp::KDirStatApp( QWidget* , const char* name )
createGUI();
initActivityTracker();
- _treeViewContextMenu = (QPopupMenu *) factory()->container( "treeViewContextMenu", this );
- _treemapContextMenu = (QPopupMenu *) factory()->container( "treemapContextMenu", this );
+ _treeViewContextMenu = (TQPopupMenu *) factory()->container( "treeViewContextMenu", this );
+ _treemapContextMenu = (TQPopupMenu *) factory()->container( "treemapContextMenu", this );
readMainWinConfig();
@@ -141,72 +141,72 @@ KDirStatApp::~KDirStatApp()
void
KDirStatApp::initActions()
{
- _fileAskOpenDir = KStdAction::open ( this, SLOT( fileAskOpenDir() ), actionCollection() );
+ _fileAskOpenDir = KStdAction::open ( TQT_TQOBJECT(this), TQT_SLOT( fileAskOpenDir() ), actionCollection() );
_fileAskOpenUrl = new KAction( i18n( "Open &URL..." ), "konqueror", 0,
- this, SLOT( fileAskOpenUrl() ),
+ TQT_TQOBJECT(this), TQT_SLOT( fileAskOpenUrl() ),
actionCollection(), "file_open_url" );
- _fileOpenRecent = KStdAction::openRecent ( this, SLOT( fileOpenRecent( const KURL& ) ), actionCollection() );
- _fileCloseDir = KStdAction::close ( this, SLOT( fileCloseDir() ), actionCollection() );
+ _fileOpenRecent = KStdAction::openRecent ( TQT_TQOBJECT(this), TQT_SLOT( fileOpenRecent( const KURL& ) ), actionCollection() );
+ _fileCloseDir = KStdAction::close ( TQT_TQOBJECT(this), TQT_SLOT( fileCloseDir() ), actionCollection() );
_fileRefreshAll = new KAction( i18n( "Refresh &All" ), "reload", 0,
- this, SLOT( refreshAll() ),
+ TQT_TQOBJECT(this), TQT_SLOT( refreshAll() ),
actionCollection(), "file_refresh_all" );
_fileRefreshSelected = new KAction( i18n( "Refresh &Selected" ), 0,
- this, SLOT( refreshSelected() ),
+ TQT_TQOBJECT(this), TQT_SLOT( refreshSelected() ),
actionCollection(), "file_refresh_selected" );
_fileContinueReadingAtMountPoint = new KAction( i18n( "Continue Reading at &Mount Point" ), "hdd_mount", 0,
- this, SLOT( refreshSelected() ), actionCollection(),
+ TQT_TQOBJECT(this), TQT_SLOT( refreshSelected() ), actionCollection(),
"file_continue_reading_at_mount_point" );
_fileStopReading = new KAction( i18n( "Stop Rea&ding" ), "stop", 0,
- this, SLOT( stopReading() ), actionCollection(),
+ TQT_TQOBJECT(this), TQT_SLOT( stopReading() ), actionCollection(),
"file_stop_reading" );
- _fileQuit = KStdAction::quit ( kapp, SLOT( quit() ), actionCollection() );
- _editCopy = KStdAction::copy ( this, SLOT( editCopy() ), actionCollection() );
- _showToolBar = KStdAction::showToolbar ( this, SLOT( toggleToolBar() ), actionCollection() );
- _showStatusBar = KStdAction::showStatusbar ( this, SLOT( toggleStatusBar() ), actionCollection() );
+ _fileQuit = KStdAction::quit ( TQT_TQOBJECT(kapp), TQT_SLOT( quit() ), actionCollection() );
+ _editCopy = KStdAction::copy ( TQT_TQOBJECT(this), TQT_SLOT( editCopy() ), actionCollection() );
+ _showToolBar = KStdAction::showToolbar ( TQT_TQOBJECT(this), TQT_SLOT( toggleToolBar() ), actionCollection() );
+ _showStatusBar = KStdAction::showStatusbar ( TQT_TQOBJECT(this), TQT_SLOT( toggleStatusBar() ), actionCollection() );
_cleanupOpenWith = new KAction( i18n( "Open With" ), 0,
- this, SLOT( cleanupOpenWith() ),
+ TQT_TQOBJECT(this), TQT_SLOT( cleanupOpenWith() ),
actionCollection(), "cleanup_open_with" );
_treemapZoomIn = new KAction( i18n( "Zoom in" ), "viewmag+", Key_Plus,
- this, SLOT( treemapZoomIn() ),
+ TQT_TQOBJECT(this), TQT_SLOT( treemapZoomIn() ),
actionCollection(), "treemap_zoom_in" );
_treemapZoomOut = new KAction( i18n( "Zoom out" ), "viewmag-", Key_Minus,
- this, SLOT( treemapZoomOut() ),
+ TQT_TQOBJECT(this), TQT_SLOT( treemapZoomOut() ),
actionCollection(), "treemap_zoom_out" );
_treemapSelectParent= new KAction( i18n( "Select Parent" ), "up", Key_Asterisk,
- this, SLOT( treemapSelectParent() ),
+ TQT_TQOBJECT(this), TQT_SLOT( treemapSelectParent() ),
actionCollection(), "treemap_select_parent" );
_treemapRebuild = new KAction( i18n( "Rebuild Treemap" ), 0,
- this, SLOT( treemapRebuild() ),
+ TQT_TQOBJECT(this), TQT_SLOT( treemapRebuild() ),
actionCollection(), "treemap_rebuild" );
_showTreemapView = new KToggleAction( i18n( "Show Treemap" ), Key_F9,
- this, SLOT( toggleTreemapView() ),
+ TQT_TQOBJECT(this), TQT_SLOT( toggleTreemapView() ),
actionCollection(), "options_show_treemap" );
new KAction( i18n( "Help about Treemaps" ), "help", 0,
- this, SLOT( treemapHelp() ),
+ TQT_TQOBJECT(this), TQT_SLOT( treemapHelp() ),
actionCollection(), "treemap_help" );
- KAction * pref = KStdAction::preferences( this, SLOT( preferences() ), actionCollection() );
+ KAction * pref = KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT( preferences() ), actionCollection() );
_reportMailToOwner = new KAction( i18n( "Send &Mail to Owner" ), "mail_generic", 0,
- _treeView, SLOT( sendMailToOwner() ),
+ TQT_TQOBJECT(_treeView), TQT_SLOT( sendMailToOwner() ),
actionCollection(), "report_mail_to_owner" );
_helpSendFeedbackMail = new KAction( i18n( "Send &Feedback Mail..." ), 0,
- this, SLOT( sendFeedbackMail() ),
+ TQT_TQOBJECT(this), TQT_SLOT( sendFeedbackMail() ),
actionCollection(), "help_send_feedback_mail" );
@@ -226,7 +226,7 @@ KDirStatApp::initActions()
_showTreemapView->setStatusText ( i18n( "Enables/disables the treemap view" ) );
_treemapZoomIn->setStatusText ( i18n( "Zoom treemap in" ) );
_treemapZoomOut->setStatusText ( i18n( "Zoom treemap out" ) );
- _treemapSelectParent->setStatusText ( i18n( "Select parent" ) );
+ _treemapSelectParent->setStatusText ( i18n( "Select tqparent" ) );
_treemapRebuild->setStatusText ( i18n( "Rebuild treemap to fit into available space" ) );
pref->setStatusText ( i18n( "Opens the preferences dialog" ) );
_reportMailToOwner->setStatusText ( i18n( "Sends a mail to the owner of the selected subtree" ) );
@@ -242,14 +242,14 @@ KDirStatApp::initCleanups()
_cleanupCollection->addUserCleanups( USER_CLEANUPS );
_cleanupCollection->slotReadConfig();
- connect( _treeView, SIGNAL( selectionChanged( KFileInfo * ) ),
- _cleanupCollection, SIGNAL( selectionChanged( KFileInfo * ) ) );
+ connect( _treeView, TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
+ _cleanupCollection, TQT_SIGNAL( selectionChanged( KFileInfo * ) ) );
- connect( this, SIGNAL( readConfig( void ) ),
- _cleanupCollection, SIGNAL( readConfig( void ) ) );
+ connect( this, TQT_SIGNAL( readConfig( void ) ),
+ _cleanupCollection, TQT_SIGNAL( readConfig( void ) ) );
- connect( this, SIGNAL( saveConfig( void ) ),
- _cleanupCollection, SIGNAL( saveConfig( void ) ) );
+ connect( this, TQT_SIGNAL( saveConfig( void ) ),
+ _cleanupCollection, TQT_SIGNAL( saveConfig( void ) ) );
}
@@ -276,12 +276,12 @@ KDirStatApp::initPacMan( bool enablePacMan )
toolBar()->insertWidget( id, PACMAN_WIDTH, _pacMan );
toolBar()->setItemAutoSized( id, false );
- _pacManDelimiter = new QWidget( toolBar() );
+ _pacManDelimiter = new TQWidget( toolBar() );
toolBar()->insertWidget( ++id, 1, _pacManDelimiter );
- connect( _treeView, SIGNAL( startingReading() ), _pacMan, SLOT( start() ) );
- connect( _treeView, SIGNAL( finished() ), _pacMan, SLOT( stop () ) );
- connect( _treeView, SIGNAL( aborted() ), _pacMan, SLOT( stop () ) );
+ connect( _treeView, TQT_SIGNAL( startingReading() ), _pacMan, TQT_SLOT( start() ) );
+ connect( _treeView, TQT_SIGNAL( finished() ), _pacMan, TQT_SLOT( stop () ) );
+ connect( _treeView, TQT_SIGNAL( aborted() ), _pacMan, TQT_SLOT( stop () ) );
}
}
else
@@ -314,17 +314,17 @@ KDirStatApp::initActivityTracker()
if ( ! doFeedbackReminder() )
return;
- _activityTracker = new KActivityTracker( this, "Feedback",
+ _activityTracker = new KActivityTracker( TQT_TQOBJECT(this), "Feedback",
INITIAL_FEEDBACK_REMINDER );
- connect( _activityTracker, SIGNAL( thresholdReached() ),
- this, SLOT ( askForFeedback() ) );
+ connect( _activityTracker, TQT_SIGNAL( thresholdReached() ),
+ this, TQT_SLOT ( askForFeedback() ) );
- connect( _treeView, SIGNAL( userActivity( int ) ),
- _activityTracker, SLOT ( trackActivity( int ) ) );
+ connect( _treeView, TQT_SIGNAL( userActivity( int ) ),
+ _activityTracker, TQT_SLOT ( trackActivity( int ) ) );
- connect( _cleanupCollection, SIGNAL( userActivity( int ) ),
- _activityTracker, SLOT ( trackActivity( int ) ) );
+ connect( _cleanupCollection, TQT_SIGNAL( userActivity( int ) ),
+ _activityTracker, TQT_SLOT ( trackActivity( int ) ) );
}
@@ -348,7 +348,7 @@ void KDirStatApp::readMainWinConfig()
KConfig * config = kapp->config();
config->setGroup( "General Options" );
- // Status settings of the various bars and views
+ // tqStatus settings of the various bars and views
_showToolBar->setChecked( config->readBoolEntry( "Show Toolbar", true ) );
toggleToolBar();
@@ -371,7 +371,7 @@ void KDirStatApp::readMainWinConfig()
// initialize the recent file list
_fileOpenRecent->loadEntries( config,"Recent Files" );
- QSize size = config->readSizeEntry( "Geometry" );
+ TQSize size = config->readSizeEntry( "Geometry" );
if( ! size.isEmpty() )
resize( size );
@@ -443,7 +443,7 @@ KDirStatApp::fileAskOpenDir()
{
statusMsg( i18n( "Opening directory..." ) );
- KURL url = KFileDialog::getExistingDirectory( QString::null, this, i18n( "Open Directory..." ) );
+ KURL url = KFileDialog::getExistingDirectory( TQString(), this, i18n( "Open Directory..." ) );
if( ! url.isEmpty() )
openURL( fixedUrl( url.url() ) );
@@ -457,7 +457,7 @@ KDirStatApp::fileAskOpenUrl()
{
statusMsg( i18n( "Opening URL..." ) );
- KURL url = KURLRequesterDlg::getURL( QString::null, // startDir
+ KURL url = KURLRequesterDlg::getURL( TQString(), // startDir
this, i18n( "Open URL..." ) );
if( ! url.isEmpty() )
@@ -524,7 +524,7 @@ void
KDirStatApp::editCopy()
{
if ( _treeView->selection() )
- kapp->clipboard()->setText( QString::fromLocal8Bit(_treeView->selection()->orig()->url()) );
+ kapp->clipboard()->setText( TQString::fromLocal8Bit(_treeView->selection()->orig()->url()) );
#if 0
#warning debug
@@ -568,7 +568,7 @@ KDirStatApp::selectionChanged( KFileInfo *selection )
else
_fileContinueReadingAtMountPoint->setEnabled( false );
- statusMsg( QString::fromLocal8Bit(selection->url()) );
+ statusMsg( TQString::fromLocal8Bit(selection->url()) );
}
else
{
@@ -767,7 +767,7 @@ KDirStatApp::doFeedbackReminder()
void
-KDirStatApp::statusMsg( const QString &text )
+KDirStatApp::statusMsg( const TQString &text )
{
// Change status message permanently
@@ -777,7 +777,7 @@ KDirStatApp::statusMsg( const QString &text )
void
-KDirStatApp::contextMenu( KDirTreeViewItem * item, const QPoint &pos )
+KDirStatApp::contextMenu( KDirTreeViewItem * item, const TQPoint &pos )
{
NOT_USED( item );
@@ -787,7 +787,7 @@ KDirStatApp::contextMenu( KDirTreeViewItem * item, const QPoint &pos )
void
-KDirStatApp::contextMenu( KTreemapTile * tile, const QPoint &pos )
+KDirStatApp::contextMenu( KTreemapTile * tile, const TQPoint &pos )
{
NOT_USED( tile );
@@ -806,25 +806,25 @@ KDirStatApp::createTreemapView()
delete _treemapView;
_treemapView = new KTreemapView( _treeView->tree(), _splitter,
- QSize( _splitter->width(), _treemapViewHeight ) );
+ TQSize( _splitter->width(), _treemapViewHeight ) );
CHECK_PTR( _treemapView );
- connect( _treemapView, SIGNAL( contextMenu( KTreemapTile *, const QPoint & ) ),
- this, SLOT ( contextMenu( KTreemapTile *, const QPoint & ) ) );
+ connect( _treemapView, TQT_SIGNAL( contextMenu( KTreemapTile *, const TQPoint & ) ),
+ this, TQT_SLOT ( contextMenu( KTreemapTile *, const TQPoint & ) ) );
- connect( _treemapView, SIGNAL( treemapChanged() ),
- this, SLOT ( updateActions() ) );
+ connect( _treemapView, TQT_SIGNAL( treemapChanged() ),
+ this, TQT_SLOT ( updateActions() ) );
- connect( _treemapView, SIGNAL( selectionChanged( KFileInfo * ) ),
- this, SLOT ( selectionChanged( KFileInfo * ) ) );
+ connect( _treemapView, TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
+ this, TQT_SLOT ( selectionChanged( KFileInfo * ) ) );
if ( _activityTracker )
{
- connect( _treemapView, SIGNAL( userActivity ( int ) ),
- _activityTracker, SLOT ( trackActivity( int ) ) );
+ connect( _treemapView, TQT_SIGNAL( userActivity ( int ) ),
+ _activityTracker, TQT_SLOT ( trackActivity( int ) ) );
}
- _treemapView->show(); // QSplitter needs explicit show() for new children
+ _treemapView->show(); // TQSplitter needs explicit show() for new tqchildren
updateActions();
}
diff --git a/kdirstat/kdirstatapp.h b/kdirstat/kdirstatapp.h
index 0f8b875..ea883b7 100644
--- a/kdirstat/kdirstatapp.h
+++ b/kdirstat/kdirstatapp.h
@@ -24,8 +24,8 @@
// Forward declarations
-class QPopupMenu;
-class QSplitter;
+class TQPopupMenu;
+class TQSplitter;
class KAction;
class KActivityTracker;
@@ -71,6 +71,7 @@ using namespace KDirStat;
class KDirStatApp : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -78,7 +79,7 @@ public:
* Construtor of KDirStatApp, calls all init functions to create the
* application.
**/
- KDirStatApp( QWidget* parent=0, const char* name=0 );
+ KDirStatApp( TQWidget* tqparent=0, const char* name=0 );
/**
* Destructor.
@@ -184,7 +185,7 @@ public slots:
void treemapZoomOut();
/**
- * Select the parent of the currently selected treemap tile.
+ * Select the tqparent of the currently selected treemap tile.
**/
void treemapSelectParent();
@@ -209,17 +210,17 @@ public slots:
*
* @param text the text that is displayed in the statusbar
**/
- void statusMsg( const QString &text );
+ void statusMsg( const TQString &text );
/**
* Opens a context menu for tree view items.
**/
- void contextMenu( KDirTreeViewItem * item, const QPoint &pos );
+ void contextMenu( KDirTreeViewItem * item, const TQPoint &pos );
/**
* Opens a context menu for treemap tiles.
**/
- void contextMenu( KTreemapTile * tile, const QPoint &pos );
+ void contextMenu( KTreemapTile * tile, const TQPoint &pos );
/**
* Create a treemap view. This makes only sense after a directory tree is
@@ -373,13 +374,13 @@ protected:
// Widgets
- QSplitter * _splitter;
+ TQSplitter * _splitter;
KDirTreeView * _treeView;
KTreemapView * _treemapView;
KPacMan * _pacMan;
- QWidget * _pacManDelimiter;
- QPopupMenu * _treeViewContextMenu;
- QPopupMenu * _treemapContextMenu;
+ TQWidget * _pacManDelimiter;
+ TQPopupMenu * _treeViewContextMenu;
+ TQPopupMenu * _treemapContextMenu;
KDirStat::KSettingsDialog * _settingsDialog;
KFeedbackDialog * _feedbackDialog;
KActivityTracker * _activityTracker;
diff --git a/kdirstat/kdirstatfeedback.cpp b/kdirstat/kdirstatfeedback.cpp
index 0483499..3e2b2e1 100644
--- a/kdirstat/kdirstatfeedback.cpp
+++ b/kdirstat/kdirstatfeedback.cpp
@@ -24,8 +24,8 @@ KDirStatApp::sendFeedbackMail()
_feedbackDialog = new KFeedbackDialog( "[email protected]", "feedback_mail" );
CHECK_PTR( _feedbackDialog );
- connect( _feedbackDialog->form(), SIGNAL( mailSent() ),
- this, SLOT( feedbackMailSent() ) );
+ connect( _feedbackDialog->form(), TQT_SIGNAL( mailSent() ),
+ this, TQT_SLOT( feedbackMailSent() ) );
KFeedbackQuestionList * list = _feedbackDialog->form()->questionList();
diff --git a/kdirstat/kdirstatsettings.cpp b/kdirstat/kdirstatsettings.cpp
index c647178..46a1aae 100644
--- a/kdirstat/kdirstatsettings.cpp
+++ b/kdirstat/kdirstatsettings.cpp
@@ -8,17 +8,17 @@
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qslider.h>
-#include <qvbox.h>
-#include <qhgroupbox.h>
-#include <qvgroupbox.h>
-#include <qspinbox.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqslider.h>
+#include <tqvbox.h>
+#include <tqhgroupbox.h>
+#include <tqvgroupbox.h>
+#include <tqspinbox.h>
#include <kcolorbutton.h>
#include <klocale.h>
@@ -37,31 +37,31 @@ KSettingsDialog::KSettingsDialog( KDirStatApp *mainWin )
i18n( "Settings" ), // caption
Ok | Apply | Default | Cancel | Help, // buttonMask
Ok, // defaultButton
- 0, // parent
+ 0, // tqparent
0, // name
false ) // modal
, _mainWin( mainWin )
{
/**
* This may seem like overkill, but I didn't find any other way to get
- * geometry management right with KDialogBase, yet maintain a modular and
+ * tqgeometry management right with KDialogBase, yet maintain a modular and
* object-oriented design:
*
* Each individual settings page is added with 'addVBoxPage()' to get some
- * initial geometry management. Only then can some generic widget be added
+ * initial tqgeometry management. Only then can some generic widget be added
* into this - and I WANT my settings pages to be generic widgets. I want
* them to be self-sufficient - no monolithic mess of widget creation in my
- * code, intermixed with all kinds of layout objects.
+ * code, intermixed with all kinds of tqlayout objects.
*
- * The ordinary KDialogBase::addPage() just creates a QFrame which is too
- * dumb for any kind of geometry management - it cannot even handle one
+ * The ordinary KDialogBase::addPage() just creates a TQFrame which is too
+ * dumb for any kind of tqgeometry management - it cannot even handle one
* single child right. So, let's have KDialogBase create something more
- * intelligent: A QVBox (which is derived from QFrame anyway). This QVBox
+ * intelligent: A TQVBox (which is derived from TQFrame anyway). This TQVBox
* gets only one child - the KSettingsPage. This KSettingsPage handles its
- * own layout.
+ * own tqlayout.
**/
- QWidget * page;
+ TQWidget * page;
page = addVBoxPage( i18n( "&Cleanups" ) );
_cleanupsPageIndex = pageIndex( page );
@@ -79,7 +79,7 @@ KSettingsDialog::KSettingsDialog( KDirStatApp *mainWin )
_generalSettingsPageIndex = pageIndex( page );
new KGeneralSettingsPage( this, page, _mainWin );
- // resize( sizeHint() );
+ // resize( tqsizeHint() );
}
@@ -116,7 +116,7 @@ KSettingsDialog::slotDefault()
void
KSettingsDialog::slotHelp()
{
- QString helpTopic = "";
+ TQString helpTopic = "";
if ( activePageIndex() == _cleanupsPageIndex ) helpTopic = "configuring_cleanups";
else if ( activePageIndex() == _treeColorsPageIndex ) helpTopic = "tree_colors";
@@ -132,20 +132,20 @@ KSettingsDialog::slotHelp()
KSettingsPage::KSettingsPage( KSettingsDialog * dialog,
- QWidget * parent )
- : QWidget( parent )
+ TQWidget * tqparent )
+ : TQWidget( tqparent )
{
- connect( dialog, SIGNAL( aboutToShow ( void ) ),
- this, SLOT ( setup ( void ) ) );
+ connect( dialog, TQT_SIGNAL( aboutToShow ( void ) ),
+ this, TQT_SLOT ( setup ( void ) ) );
- connect( dialog, SIGNAL( okClicked ( void ) ),
- this, SLOT ( apply ( void ) ) );
+ connect( dialog, TQT_SIGNAL( okClicked ( void ) ),
+ this, TQT_SLOT ( apply ( void ) ) );
- connect( dialog, SIGNAL( applyClicked ( void ) ),
- this, SLOT ( apply ( void ) ) );
+ connect( dialog, TQT_SIGNAL( applyClicked ( void ) ),
+ this, TQT_SLOT ( apply ( void ) ) );
- connect( dialog, SIGNAL( defaultClicked ( void ) ),
- this, SLOT ( revertToDefaults( void ) ) );
+ connect( dialog, TQT_SIGNAL( defaultClicked ( void ) ),
+ this, TQT_SLOT ( revertToDefaults( void ) ) );
}
@@ -159,23 +159,23 @@ KSettingsPage::~KSettingsPage()
KTreeColorsPage::KTreeColorsPage( KSettingsDialog * dialog,
- QWidget * parent,
+ TQWidget * tqparent,
KDirStatApp * mainWin )
- : KSettingsPage( dialog, parent )
+ : KSettingsPage( dialog, tqparent )
, _mainWin( mainWin )
, _treeView( mainWin->treeView() )
, _maxButtons( KDirStatSettingsMaxColorButton )
{
- // Outer layout box
+ // Outer tqlayout box
- QHBoxLayout * outerBox = new QHBoxLayout( this,
+ TQHBoxLayout * outerBox = new TQHBoxLayout( this,
0, // border
dialog->spacingHint() );
- // Inner layout box with a column of color buttons
+ // Inner tqlayout box with a column of color buttons
- QGridLayout *grid = new QGridLayout( _maxButtons, // rows
+ TQGridLayout *grid = new TQGridLayout( _maxButtons, // rows
_maxButtons + 1, // cols
dialog->spacingHint() );
outerBox->addLayout( grid, 1 );
@@ -188,32 +188,32 @@ KTreeColorsPage::KTreeColorsPage( KSettingsDialog * dialog,
for ( int i=0; i < _maxButtons; i++ )
{
- QString labelText;
+ TQString labelText;
- labelText=i18n( "Tree Level %1" ).arg(i+1);
- _colorLabel[i] = new QLabel( labelText, this );
+ labelText=i18n( "Tree Level %1" ).tqarg(i+1);
+ _colorLabel[i] = new TQLabel( labelText, this );
grid->addWidget( _colorLabel [i], i, 0 );
_colorButton[i] = new KColorButton( this );
- _colorButton[i]->setMinimumSize( QSize( 80, 10 ) );
+ _colorButton[i]->setMinimumSize( TQSize( 80, 10 ) );
grid->addMultiCellWidget( _colorButton [i], i, i, i+1, _maxButtons );
grid->setRowStretch( i, 1 );
}
- // Vertical slider
+ //Qt::Vertical slider
- _slider = new QSlider( 1, // minValue
+ _slider = new TQSlider( 1, // minValue
_maxButtons, // maxValue
1, // pageStep
1, // value
- QSlider::Vertical,
+ Qt::Vertical,
this );
outerBox->addWidget( _slider, 0 );
outerBox->activate();
- connect( _slider, SIGNAL( valueChanged( int ) ),
- this, SLOT ( enableColors( int ) ) );
+ connect( _slider, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT ( enableColors( int ) ) );
}
@@ -274,9 +274,9 @@ KTreeColorsPage::enableColors( int maxColors )
KCleanupPage::KCleanupPage( KSettingsDialog * dialog,
- QWidget * parent,
+ TQWidget * tqparent,
KDirStatApp * mainWin )
- : KSettingsPage( dialog, parent )
+ : KSettingsPage( dialog, tqparent )
, _mainWin( mainWin )
, _currentCleanup( 0 )
{
@@ -284,9 +284,9 @@ KCleanupPage::KCleanupPage( KSettingsDialog * dialog,
_workCleanupCollection = *mainWin->cleanupCollection();
- // Create layout and widgets.
+ // Create tqlayout and widgets.
- QHBoxLayout * layout = new QHBoxLayout( this,
+ TQHBoxLayout * tqlayout = new TQHBoxLayout( this,
0, // border
dialog->spacingHint() ); // spacing
_listBox = new KCleanupListBox( this );
@@ -298,21 +298,21 @@ KCleanupPage::KCleanupPage( KSettingsDialog * dialog,
// clicks on a different cleanup in the list, the properties page
// will display that cleanup's values.
- connect( _listBox, SIGNAL( selectCleanup( KCleanup * ) ),
- this, SLOT ( changeCleanup( KCleanup * ) ) );
+ connect( _listBox, TQT_SIGNAL( selectCleanup( KCleanup * ) ),
+ this, TQT_SLOT ( changeCleanup( KCleanup * ) ) );
- // Fill list box so it can determine a reasonable startup geometry - that
+ // Fill list box so it can determine a reasonable startup tqgeometry - that
// doesn't work if it happens only later.
setup();
// Now that _listBox will (hopefully) have determined a reasonable
- // default geometry, add the widgets to the layout.
+ // default tqgeometry, add the widgets to the tqlayout.
- layout->addWidget( _listBox, 0 );
- layout->addWidget( _props , 1 );
- layout->activate();
+ tqlayout->addWidget( _listBox, 0 );
+ tqlayout->addWidget( _props , 1 );
+ tqlayout->activate();
}
@@ -370,7 +370,7 @@ KCleanupPage::setup()
// (Re-) Initialize list box.
- // _listBox->resize( _listBox->sizeHint() );
+ // _listBox->resize( _listBox->tqsizeHint() );
_listBox->setSelected( 0, true );
}
@@ -425,34 +425,34 @@ KCleanupPage::storeProps( KCleanup * cleanup )
/*--------------------------------------------------------------------------*/
-KCleanupListBox::KCleanupListBox( QWidget *parent )
- : QListBox( parent )
+KCleanupListBox::KCleanupListBox( TQWidget *tqparent )
+ : TQListBox( tqparent )
{
_selection = 0;
connect( this,
- SIGNAL( selectionChanged( QListBoxItem *) ),
- SLOT ( selectCleanup ( QListBoxItem *) ) );
+ TQT_SIGNAL( selectionChanged( TQListBoxItem *) ),
+ TQT_SLOT ( selectCleanup ( TQListBoxItem *) ) );
}
-QSize
-KCleanupListBox::sizeHint() const
+TQSize
+KCleanupListBox::tqsizeHint() const
{
- // FIXME: Is this still needed with Qt 2.x?
+ // FIXME: Is this still needed with TQt 2.x?
if ( count() < 1 )
{
- // As long as the list is empty, sizeHint() would default to
+ // As long as the list is empty, tqsizeHint() would default to
// (0,0) which is ALWAYS just a pain in the ass. We'd rather
// have an absolutely random value than this.
- return QSize( 100, 100 );
+ return TQSize( 100, 100 );
}
else
{
// Calculate the list contents and take 3D frames (2*2 pixels)
// into account.
- return QSize ( maxItemWidth() + 5,
+ return TQSize ( maxItemWidth() + 5,
count() * itemHeight( 0 ) + 4 );
}
}
@@ -470,7 +470,7 @@ KCleanupListBox::insert( KCleanup * cleanup )
void
-KCleanupListBox::selectCleanup( QListBoxItem * listBoxItem )
+KCleanupListBox::selectCleanup( TQListBoxItem * listBoxItem )
{
KCleanupListBoxItem * item = (KCleanupListBoxItem *) listBoxItem;
@@ -499,7 +499,7 @@ KCleanupListBox::updateTitle( KCleanup * cleanup )
KCleanupListBoxItem::KCleanupListBoxItem( KCleanupListBox * listBox,
KCleanup * cleanup )
- : QListBoxText( listBox )
+ : TQListBoxText( listBox )
, _cleanup( cleanup )
{
CHECK_PTR( cleanup );
@@ -517,37 +517,37 @@ KCleanupListBoxItem::updateTitle()
/*--------------------------------------------------------------------------*/
-KCleanupPropertiesPage::KCleanupPropertiesPage( QWidget * parent,
+KCleanupPropertiesPage::KCleanupPropertiesPage( TQWidget * tqparent,
KDirStatApp * mainWin )
- : QWidget( parent )
+ : TQWidget( tqparent )
, _mainWin( mainWin )
{
- QVBoxLayout *outerBox = new QVBoxLayout( this, 0, 0 ); // border, spacing
+ TQVBoxLayout *outerBox = new TQVBoxLayout( this, 0, 0 ); // border, spacing
// The topmost check box: "Enabled".
- _enabled = new QCheckBox( i18n( "&Enabled" ), this );
+ _enabled = new TQCheckBox( i18n( "&Enabled" ), this );
outerBox->addWidget( _enabled, 0 );
outerBox->addSpacing( 7 );
outerBox->addStretch();
- connect( _enabled, SIGNAL( toggled ( bool ) ),
- this, SLOT ( enableFields( bool ) ) );
+ connect( _enabled, TQT_SIGNAL( toggled ( bool ) ),
+ this, TQT_SLOT ( enableFields( bool ) ) );
// All other widgets of this page are grouped together in a
// separate subwidget so they can all be enabled / disabled
// together.
- _fields = new QWidget( this );
+ _fields = new TQWidget( this );
outerBox->addWidget( _fields, 1 );
- QVBoxLayout *fieldsBox = new QVBoxLayout( _fields );
+ TQVBoxLayout *fieldsBox = new TQVBoxLayout( _fields );
- // Grid layout for the edit fields, their labels, some
+ // Grid tqlayout for the edit fields, their labels, some
// explanatory text and the "recurse?" check box.
- QGridLayout *grid = new QGridLayout( 7, // rows
+ TQGridLayout *grid = new TQGridLayout( 7, // rows
2, // cols
4 ); // spacing
fieldsBox->addLayout( grid, 0 );
@@ -560,60 +560,60 @@ KCleanupPropertiesPage::KCleanupPropertiesPage( QWidget * parent,
// Edit fields for cleanup action title and command line.
- QLabel *label;
- _title = new QLineEdit( _fields ); grid->addWidget( _title, 0, 1 );
- _command = new QLineEdit( _fields ); grid->addWidget( _command, 1, 1 );
- label = new QLabel( _title, i18n( "&Title:" ), _fields ); grid->addWidget( label, 0, 0 );
- label = new QLabel( _command, i18n( "&Command Line:" ), _fields ); grid->addWidget( label, 1, 0 );
+ TQLabel *label;
+ _title = new TQLineEdit( _fields ); grid->addWidget( _title, 0, 1 );
+ _command = new TQLineEdit( _fields ); grid->addWidget( _command, 1, 1 );
+ label = new TQLabel( _title, i18n( "&Title:" ), _fields ); grid->addWidget( label, 0, 0 );
+ label = new TQLabel( _command, i18n( "&Command Line:" ), _fields ); grid->addWidget( label, 1, 0 );
- label = new QLabel( i18n( "%p Full Path" ), _fields );
+ label = new TQLabel( i18n( "%p Full Path" ), _fields );
grid->addWidget( label, 2, 1 );
- label = new QLabel( i18n( "%n File / Directory Name Without Path" ), _fields );
+ label = new TQLabel( i18n( "%n File / Directory Name Without Path" ), _fields );
grid->addWidget( label, 3, 1 );
- label = new QLabel( i18n( "%t KDE Trash Directory" ), _fields );
+ label = new TQLabel( i18n( "%t KDE Trash Directory" ), _fields );
grid->addWidget( label, 4, 1 );
// "Recurse into subdirs" check box
- _recurse = new QCheckBox( i18n( "&Recurse into Subdirectories" ), _fields );
+ _recurse = new TQCheckBox( i18n( "&Recurse into Subdirectories" ), _fields );
grid->addWidget( _recurse, 5, 1 );
// "Ask for confirmation" check box
- _askForConfirmation = new QCheckBox( i18n( "&Ask for Confirmation" ), _fields );
+ _askForConfirmation = new TQCheckBox( i18n( "&Ask for Confirmation" ), _fields );
grid->addWidget( _askForConfirmation, 6, 1 );
// The "Works for..." check boxes, grouped together in a button group.
- QButtonGroup *worksFor = new QButtonGroup( i18n( "Works for..." ), _fields );
- QVBoxLayout *worksForBox = new QVBoxLayout( worksFor, 15, 2 );
+ TQButtonGroup *worksFor = new TQButtonGroup( i18n( "Works for..." ), _fields );
+ TQVBoxLayout *worksForBox = new TQVBoxLayout( worksFor, 15, 2 );
fieldsBox->addWidget( worksFor, 0 );
fieldsBox->addSpacing( 5 );
fieldsBox->addStretch();
- _worksForDir = new QCheckBox( i18n( "&Directories" ), worksFor );
- _worksForFile = new QCheckBox( i18n( "&Files" ), worksFor );
- _worksForDotEntry = new QCheckBox( i18n( "<Files> P&seudo Entries"), worksFor );
+ _worksForDir = new TQCheckBox( i18n( "&Directories" ), worksFor );
+ _worksForFile = new TQCheckBox( i18n( "&Files" ), worksFor );
+ _worksForDotEntry = new TQCheckBox( i18n( "<Files> P&seudo Entries"), worksFor );
worksForBox->addWidget( _worksForDir , 1 );
worksForBox->addWidget( _worksForFile , 1 );
worksForBox->addWidget( _worksForDotEntry , 1 );
worksForBox->addSpacing( 5 );
- _worksForProtocols = new QComboBox( false, worksFor );
+ _worksForProtocols = new TQComboBox( false, worksFor );
worksForBox->addWidget( _worksForProtocols, 1 );
_worksForProtocols->insertItem( i18n( "On Local Machine Only ('file:/' Protocol)" ) );
_worksForProtocols->insertItem( i18n( "Network Transparent (ftp, smb, tar, ...)" ) );
- // Grid layout for combo boxes at the bottom
+ // Grid tqlayout for combo boxes at the bottom
- grid = new QGridLayout( 1, // rows
+ grid = new TQGridLayout( 1, // rows
2, // cols
4 ); // spacing
@@ -625,10 +625,10 @@ KCleanupPropertiesPage::KCleanupPropertiesPage( QWidget * parent,
// The "Refresh policy" combo box
- _refreshPolicy = new QComboBox( false, _fields );
+ _refreshPolicy = new TQComboBox( false, _fields );
grid->addWidget( _refreshPolicy, row, 1 );
- label = new QLabel( _refreshPolicy, i18n( "Refresh &Policy:" ), _fields );
+ label = new TQLabel( _refreshPolicy, i18n( "Refresh &Policy:" ), _fields );
grid->addWidget( label, row++, 0 );
@@ -646,7 +646,7 @@ KCleanupPropertiesPage::KCleanupPropertiesPage( QWidget * parent,
outerBox->activate();
- setMinimumSize( sizeHint() );
+ setMinimumSize( tqsizeHint() );
}
@@ -700,34 +700,34 @@ KCleanupPropertiesPage::fields() const
KGeneralSettingsPage::KGeneralSettingsPage( KSettingsDialog * dialog,
- QWidget * parent,
+ TQWidget * tqparent,
KDirStatApp * mainWin )
- : KSettingsPage( dialog, parent )
+ : KSettingsPage( dialog, tqparent )
, _mainWin( mainWin )
, _treeView( mainWin->treeView() )
{
- // Create layout and widgets.
+ // Create tqlayout and widgets.
- QVBoxLayout * layout = new QVBoxLayout( this, 5, // border
+ TQVBoxLayout * tqlayout = new TQVBoxLayout( this, 5, // border
dialog->spacingHint() ); // spacing
- QVGroupBox * gbox = new QVGroupBox( i18n( "Directory Reading" ), this );
- layout->addWidget( gbox );
+ TQVGroupBox * gbox = new TQVGroupBox( i18n( "Directory Reading" ), this );
+ tqlayout->addWidget( gbox );
- _crossFileSystems = new QCheckBox( i18n( "Cross &File System Boundaries" ), gbox );
- _enableLocalDirReader = new QCheckBox( i18n( "Use Optimized &Local Directory Read Methods" ), gbox );
+ _crossFileSystems = new TQCheckBox( i18n( "Cross &File System Boundaries" ), gbox );
+ _enableLocalDirReader = new TQCheckBox( i18n( "Use Optimized &Local Directory Read Methods" ), gbox );
- connect( _enableLocalDirReader, SIGNAL( stateChanged( int ) ),
- this, SLOT ( checkEnabledState() ) );
+ connect( _enableLocalDirReader, TQT_SIGNAL( stateChanged( int ) ),
+ this, TQT_SLOT ( checkEnabledState() ) );
- layout->addSpacing( 10 );
+ tqlayout->addSpacing( 10 );
- gbox = new QVGroupBox( i18n( "Animation" ), this );
- layout->addWidget( gbox );
+ gbox = new TQVGroupBox( i18n( "Animation" ), this );
+ tqlayout->addWidget( gbox );
- _enableToolBarAnimation = new QCheckBox( i18n( "P@cM@n Animation in Tool &Bar" ), gbox );
- _enableTreeViewAnimation = new QCheckBox( i18n( "P@cM@n Animation in Directory &Tree" ), gbox );
+ _enableToolBarAnimation = new TQCheckBox( i18n( "P@cM@n Animation in Tool &Bar" ), gbox );
+ _enableTreeViewAnimation = new TQCheckBox( i18n( "P@cM@n Animation in Directory &Tree" ), gbox );
}
@@ -793,95 +793,95 @@ KGeneralSettingsPage::checkEnabledState()
KTreemapPage::KTreemapPage( KSettingsDialog * dialog,
- QWidget * parent,
+ TQWidget * tqparent,
KDirStatApp * mainWin )
- : KSettingsPage( dialog, parent )
+ : KSettingsPage( dialog, tqparent )
, _mainWin( mainWin )
{
// kdDebug() << k_funcinfo << endl;
- QVBoxLayout * layout = new QVBoxLayout( this, 0, 0 ); // parent, border, spacing
+ TQVBoxLayout * tqlayout = new TQVBoxLayout( this, 0, 0 ); // tqparent, border, spacing
- QVBox * vbox = new QVBox( this );
+ TQVBox * vbox = new TQVBox( this );
vbox->setSpacing( dialog->spacingHint() );
- layout->addWidget( vbox );
+ tqlayout->addWidget( vbox );
- _squarify = new QCheckBox( i18n( "S&quarify Treemap" ), vbox );
- _doCushionShading = new QCheckBox( i18n( "Use C&ushion Shading" ), vbox );
+ _squarify = new TQCheckBox( i18n( "S&quarify Treemap" ), vbox );
+ _doCushionShading = new TQCheckBox( i18n( "Use C&ushion Shading" ), vbox );
// Cushion parameters
- QVGroupBox * gbox = new QVGroupBox( i18n( "Cushion Parameters" ), vbox );
+ TQVGroupBox * gbox = new TQVGroupBox( i18n( "Cushion Parameters" ), vbox );
_cushionParams = gbox;
gbox->addSpace( 7 );
- gbox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
+ gbox->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
- QLabel * label = new QLabel( i18n( "Ambient &Light" ), gbox );
- QHBox * hbox = new QHBox( gbox );
- _ambientLight = new QSlider ( MinAmbientLight, MaxAmbientLight, 10, // min, max, pageStep
- DefaultAmbientLight, Horizontal, hbox );
- _ambientLightSB = new QSpinBox( MinAmbientLight, MaxAmbientLight, 1, // min, max, step
+ TQLabel * label = new TQLabel( i18n( "Ambient &Light" ), gbox );
+ TQHBox * hbox = new TQHBox( gbox );
+ _ambientLight = new TQSlider ( MinAmbientLight, MaxAmbientLight, 10, // min, max, pageStep
+ DefaultAmbientLight,Qt::Horizontal, hbox );
+ _ambientLightSB = new TQSpinBox( MinAmbientLight, MaxAmbientLight, 1, // min, max, step
hbox );
- _ambientLightSB->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+ _ambientLightSB->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
label->setBuddy( _ambientLightSB );
gbox->addSpace( 7 );
- label = new QLabel( i18n( "&Height Scale" ), gbox );
- hbox = new QHBox( gbox );
- _heightScalePercent = new QSlider( MinHeightScalePercent, MaxHeightScalePercent, 10, // min, max, pageStep
- DefaultHeightScalePercent, Horizontal, hbox );
- _heightScalePercentSB = new QSpinBox( MinHeightScalePercent, MaxHeightScalePercent, 1, // min, max, step
+ label = new TQLabel( i18n( "&Height Scale" ), gbox );
+ hbox = new TQHBox( gbox );
+ _heightScalePercent = new TQSlider( MinHeightScalePercent, MaxHeightScalePercent, 10, // min, max, pageStep
+ DefaultHeightScalePercent,Qt::Horizontal, hbox );
+ _heightScalePercentSB = new TQSpinBox( MinHeightScalePercent, MaxHeightScalePercent, 1, // min, max, step
hbox );
- _heightScalePercentSB->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+ _heightScalePercentSB->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
label->setBuddy( _heightScalePercentSB );
gbox->addSpace( 10 );
- _ensureContrast = new QCheckBox( i18n( "Draw Lines if Lo&w Contrast" ), gbox );
+ _ensureContrast = new TQCheckBox( i18n( "Draw Lines if Lo&w Contrast" ), gbox );
- hbox = new QHBox( gbox );
- _forceCushionGrid = new QCheckBox( i18n( "Always Draw &Grid" ), hbox );
+ hbox = new TQHBox( gbox );
+ _forceCushionGrid = new TQCheckBox( i18n( "Always Draw &Grid" ), hbox );
addHStretch( hbox );
- _cushionGridColorL = new QLabel( " " + i18n( "Gr&id Color: " ), hbox );
+ _cushionGridColorL = new TQLabel( " " + i18n( "Gr&id Color: " ), hbox );
_cushionGridColor = new KColorButton( hbox );
_cushionGridColorL->setBuddy( _cushionGridColor );
- _cushionGridColorL->setAlignment( AlignRight | AlignVCenter );
+ _cushionGridColorL->tqsetAlignment( AlignRight | AlignVCenter );
// addVStretch( vbox );
// Plain treemaps parameters
- _plainTileParams = new QHGroupBox( i18n( "Colors for Plain Treemaps" ), vbox );
+ _plainTileParams = new TQHGroupBox( i18n( "Colors for Plain Treemaps" ), vbox );
_plainTileParams->addSpace( 7 );
- label = new QLabel( i18n( "&Files: " ), _plainTileParams );
+ label = new TQLabel( i18n( "&Files: " ), _plainTileParams );
_fileFillColor = new KColorButton( _plainTileParams );
label->setBuddy( _fileFillColor );
- label->setAlignment( AlignRight | AlignVCenter );
+ label->tqsetAlignment( AlignRight | AlignVCenter );
- label = new QLabel( " " + i18n( "&Directories: " ), _plainTileParams );
+ label = new TQLabel( " " + i18n( "&Directories: " ), _plainTileParams );
_dirFillColor = new KColorButton( _plainTileParams );
label->setBuddy( _dirFillColor );
- label->setAlignment( AlignRight | AlignVCenter );
+ label->tqsetAlignment( AlignRight | AlignVCenter );
- label = new QLabel( i18n( "Gr&id: " ), _plainTileParams );
+ label = new TQLabel( i18n( "Gr&id: " ), _plainTileParams );
_outlineColor = new KColorButton( _plainTileParams );
label->setBuddy( _outlineColor );
- label->setAlignment( AlignRight | AlignVCenter );
+ label->tqsetAlignment( AlignRight | AlignVCenter );
// Misc
- QWidget * gridBox = new QWidget( vbox );
- QGridLayout * grid = new QGridLayout( gridBox, 2, 3, dialog->spacingHint() ); // rows, cols, spacing
+ TQWidget * gridBox = new TQWidget( vbox );
+ TQGridLayout * grid = new TQGridLayout( gridBox, 2, 3, dialog->spacingHint() ); // rows, cols, spacing
grid->setColStretch( 0, 0 ); // (col, stretch) don't stretch this column
grid->setColStretch( 1, 0 ); // don't stretch
grid->setColStretch( 2, 1 ); // stretch this as you like
- label = new QLabel( i18n( "Hi&ghlight R&ectangle: " ), gridBox );
+ label = new TQLabel( i18n( "Hi&ghlight R&ectangle: " ), gridBox );
_highlightColor = new KColorButton( gridBox );
label->setBuddy( _highlightColor );
@@ -889,35 +889,35 @@ KTreemapPage::KTreemapPage( KSettingsDialog * dialog,
grid->addWidget( _highlightColor, 0, 1 );
- label = new QLabel( i18n( "Minim&um Treemap Tile Size: " ), gridBox );
- _minTileSize = new QSpinBox( 0, 30, 1, gridBox ); // min, max, step, parent
+ label = new TQLabel( i18n( "Minim&um Treemap Tile Size: " ), gridBox );
+ _minTileSize = new TQSpinBox( 0, 30, 1, gridBox ); // min, max, step, tqparent
label->setBuddy( _minTileSize );
grid->addWidget( label, 1, 0 );
grid->addWidget( _minTileSize, 1, 1 );
- _autoResize = new QCheckBox( i18n( "Auto-&Resize Treemap" ), vbox );
+ _autoResize = new TQCheckBox( i18n( "Auto-&Resize Treemap" ), vbox );
// Connections
- connect( _ambientLight, SIGNAL( valueChanged(int) ),
- _ambientLightSB, SLOT ( setValue (int) ) );
+ connect( _ambientLight, TQT_SIGNAL( valueChanged(int) ),
+ _ambientLightSB, TQT_SLOT ( setValue (int) ) );
- connect( _ambientLightSB, SIGNAL( valueChanged(int) ),
- _ambientLight, SLOT ( setValue (int) ) );
+ connect( _ambientLightSB, TQT_SIGNAL( valueChanged(int) ),
+ _ambientLight, TQT_SLOT ( setValue (int) ) );
- connect( _heightScalePercent, SIGNAL( valueChanged(int) ),
- _heightScalePercentSB, SLOT ( setValue (int) ) );
+ connect( _heightScalePercent, TQT_SIGNAL( valueChanged(int) ),
+ _heightScalePercentSB, TQT_SLOT ( setValue (int) ) );
- connect( _heightScalePercentSB, SIGNAL( valueChanged(int) ),
- _heightScalePercent, SLOT ( setValue (int) ) );
+ connect( _heightScalePercentSB, TQT_SIGNAL( valueChanged(int) ),
+ _heightScalePercent, TQT_SLOT ( setValue (int) ) );
- connect( _doCushionShading, SIGNAL( stateChanged( int ) ), this, SLOT( checkEnabledState() ) );
- connect( _forceCushionGrid, SIGNAL( stateChanged( int ) ), this, SLOT( checkEnabledState() ) );
+ connect( _doCushionShading, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( checkEnabledState() ) );
+ connect( _forceCushionGrid, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( checkEnabledState() ) );
checkEnabledState();
}
@@ -971,10 +971,10 @@ KTreemapPage::revertToDefaults()
_minTileSize->setValue( DefaultMinTileSize );
_autoResize->setChecked( true );
- _cushionGridColor->setColor ( QColor( 0x80, 0x80, 0x80 ) );
+ _cushionGridColor->setColor ( TQColor( 0x80, 0x80, 0x80 ) );
_outlineColor->setColor ( black );
- _fileFillColor->setColor ( QColor( 0xde, 0x8d, 0x53 ) );
- _dirFillColor->setColor ( QColor( 0x10, 0x7d, 0xb4 ) );
+ _fileFillColor->setColor ( TQColor( 0xde, 0x8d, 0x53 ) );
+ _dirFillColor->setColor ( TQColor( 0x10, 0x7d, 0xb4 ) );
_highlightColor->setColor ( red );
}
@@ -995,10 +995,10 @@ KTreemapPage::setup()
_minTileSize->setValue ( config->readNumEntry ( "MinTileSize" , DefaultMinTileSize ) );
_autoResize->setChecked ( config->readBoolEntry( "AutoResize" , true ) );
- _cushionGridColor->setColor ( readColorEntry( config, "CushionGridColor" , QColor( 0x80, 0x80, 0x80 ) ) );
+ _cushionGridColor->setColor ( readColorEntry( config, "CushionGridColor" , TQColor( 0x80, 0x80, 0x80 ) ) );
_outlineColor->setColor ( readColorEntry( config, "OutlineColor" , black ) );
- _fileFillColor->setColor ( readColorEntry( config, "FileFillColor" , QColor( 0xde, 0x8d, 0x53 ) ) );
- _dirFillColor->setColor ( readColorEntry( config, "DirFillColor" , QColor( 0x10, 0x7d, 0xb4 ) ) );
+ _fileFillColor->setColor ( readColorEntry( config, "FileFillColor" , TQColor( 0xde, 0x8d, 0x53 ) ) );
+ _dirFillColor->setColor ( readColorEntry( config, "DirFillColor" , TQColor( 0x10, 0x7d, 0xb4 ) ) );
_highlightColor->setColor ( readColorEntry( config, "HighlightColor" , red ) );
_ambientLightSB->setValue( _ambientLight->value() );
@@ -1023,8 +1023,8 @@ KTreemapPage::checkEnabledState()
}
-QColor
-KTreemapPage::readColorEntry( KConfig * config, const char * entryName, QColor defaultColor )
+TQColor
+KTreemapPage::readColorEntry( KConfig * config, const char * entryName, TQColor defaultColor )
{
return config->readColorEntry( entryName, &defaultColor );
}
@@ -1032,22 +1032,22 @@ KTreemapPage::readColorEntry( KConfig * config, const char * entryName, QColor d
void
-addHStretch( QWidget * parent )
+addHStretch( TQWidget * tqparent )
{
- QWidget * stretch = new QWidget( parent );
- stretch->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, // hor
- QSizePolicy::Minimum, // vert
+ TQWidget * stretch = new TQWidget( tqparent );
+ stretch->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, // hor
+ TQSizePolicy::Minimum, // vert
1, // hstretch
0 ) ); // vstretch
}
void
-addVStretch( QWidget * parent )
+addVStretch( TQWidget * tqparent )
{
- QWidget * stretch = new QWidget( parent );
- stretch->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, // hor
- QSizePolicy::Expanding, // vert
+ TQWidget * stretch = new TQWidget( tqparent );
+ stretch->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, // hor
+ TQSizePolicy::Expanding, // vert
0, // hstretch
1 ) ); // vstretch
}
diff --git a/kdirstat/kdirstatsettings.h b/kdirstat/kdirstatsettings.h
index 0091f09..078860a 100644
--- a/kdirstat/kdirstatsettings.h
+++ b/kdirstat/kdirstatsettings.h
@@ -16,23 +16,23 @@
# include <config.h>
#endif
-#include <qlistbox.h>
+#include <tqlistbox.h>
#include <kdialogbase.h>
#include "kcleanup.h"
#include "kcleanupcollection.h"
#include "kdirstatapp.h"
-class QCheckBox;
-class QComboBox;
-class QHGroupBox;
-class QLabel;
-class QLineEdit;
-class QRadioButton;
-class QSlider;
-class QSpinBox;
-class QVGroupBox;
-class QWidget;
+class TQCheckBox;
+class TQComboBox;
+class TQHGroupBox;
+class TQLabel;
+class TQLineEdit;
+class TQRadioButton;
+class TQSlider;
+class TQSpinBox;
+class TQVGroupBox;
+class TQWidget;
class KColorButton;
@@ -56,14 +56,15 @@ namespace KDirStat
class KSettingsDialog: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*
- * Notice there is no parent widget passed but the application's main
- * window so its functions can be accessed. The parent of this widget
+ * Notice there is no tqparent widget passed but the application's main
+ * window so its functions can be accessed. The tqparent of this widget
* is always 0 since this is a dialog.
**/
@@ -76,11 +77,11 @@ namespace KDirStat
/**
- * Overwritten from @ref QDialog() to get any chance to set up the
+ * Overwritten from @ref TQDialog() to get any chance to set up the
* dialog contents when the dialog gets shown - every time, not just at
* program startup when the settings dialog is created (!).
*
- * QTabDialog used to have 'aboutToShow()' for a good reason, but the
+ * TQTabDialog used to have 'aboutToShow()' for a good reason, but the
* creators of @ref KDialogBase in their infinite wisdom chose not to
* include anything similar. How is that supposed to work, anyway?
* Everything I saw in any other KDE sources looked to me like ugly
@@ -89,7 +90,7 @@ namespace KDirStat
* certainly not be the way to go.
*
* This overwritten show() method sends that @ref aboutToShow() signal
- * before calling the parent class show() method.
+ * before calling the tqparent class show() method.
**/
virtual void show();
@@ -138,9 +139,10 @@ namespace KDirStat
* Note: This class contains pure virtuals - it cannot be
* instantiated. Rather, derive your own classes from this one.
**/
- class KSettingsPage: public QWidget
+ class KSettingsPage: public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -151,7 +153,7 @@ namespace KDirStat
* e.g., apply(), setup(), revertToDefaults().
**/
KSettingsPage( KSettingsDialog * dialog,
- QWidget * parent );
+ TQWidget * tqparent );
/**
* Destructor.
@@ -217,6 +219,7 @@ namespace KDirStat
class KTreeColorsPage: public KSettingsPage
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -224,7 +227,7 @@ namespace KDirStat
* Constructor
**/
KTreeColorsPage( KSettingsDialog * dialog,
- QWidget * parent,
+ TQWidget * tqparent,
KDirStatApp * mainWin );
/**
@@ -270,9 +273,9 @@ namespace KDirStat
KDirStatApp * _mainWin;
KDirTreeView * _treeView;
- QSlider * _slider;
+ TQSlider * _slider;
KColorButton * _colorButton [ KDirStatSettingsMaxColorButton ];
- QLabel * _colorLabel [ KDirStatSettingsMaxColorButton ];
+ TQLabel * _colorLabel [ KDirStatSettingsMaxColorButton ];
int _maxButtons;
@@ -295,6 +298,7 @@ namespace KDirStat
class KCleanupPage: public KSettingsPage
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -302,7 +306,7 @@ namespace KDirStat
* Constructor
**/
KCleanupPage( KSettingsDialog * dialog,
- QWidget * parent,
+ TQWidget * tqparent,
KDirStatApp * mainWin );
/**
@@ -392,24 +396,25 @@ namespace KDirStat
*
* This is meant as a substitute for a tabbed dialog inside the tabbed
* dialog which would be much too wide and possibly confusing. Plus, this
- * list box is supposed to take care of its own geometry - the normal
+ * list box is supposed to take care of its own tqgeometry - the normal
* dumbass list box obviously cannot do that. It just uses some random
- * geometry, relying on scroll bars for everything else. But in this
+ * tqgeometry, relying on scroll bars for everything else. But in this
* special case we want all items to be visible at all times without scroll
* bars.
*
* @short cleanup list box
**/
- class KCleanupListBox: public QListBox
+ class KCleanupListBox: public TQListBox
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
**/
- KCleanupListBox( QWidget * parent = 0 );
+ KCleanupListBox( TQWidget * tqparent = 0 );
/**
* Destructor.
@@ -421,7 +426,7 @@ namespace KDirStat
* without scrolling. In fact, we never want to see a scroll bar with
* this kind of list box.
**/
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
/**
* Insert an entry for a cleanup action into the list box. Uses the
@@ -454,7 +459,7 @@ namespace KDirStat
/**
* Select an item.
**/
- void selectCleanup( QListBoxItem * item );
+ void selectCleanup( TQListBoxItem * item );
protected:
@@ -468,7 +473,7 @@ namespace KDirStat
/**
* List box item for a KCleanupListBox.
**/
- class KCleanupListBoxItem: public QListBoxText
+ class KCleanupListBoxItem: public TQListBoxText
{
public:
@@ -504,16 +509,17 @@ namespace KDirStat
/**
* Properties page for one cleanup action.
**/
- class KCleanupPropertiesPage: public QWidget
+ class KCleanupPropertiesPage: public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
**/
- KCleanupPropertiesPage( QWidget * parent,
+ KCleanupPropertiesPage( TQWidget * tqparent,
KDirStatApp * mainWin );
/**
@@ -540,18 +546,18 @@ namespace KDirStat
protected:
- QString _id;
- QCheckBox * _enabled;
- QWidget * _fields;
- QLineEdit * _title;
- QLineEdit * _command;
- QCheckBox * _recurse;
- QCheckBox * _askForConfirmation;
- QCheckBox * _worksForDir;
- QCheckBox * _worksForFile;
- QCheckBox * _worksForDotEntry;
- QComboBox * _worksForProtocols;
- QComboBox * _refreshPolicy;
+ TQString _id;
+ TQCheckBox * _enabled;
+ TQWidget * _fields;
+ TQLineEdit * _title;
+ TQLineEdit * _command;
+ TQCheckBox * _recurse;
+ TQCheckBox * _askForConfirmation;
+ TQCheckBox * _worksForDir;
+ TQCheckBox * _worksForFile;
+ TQCheckBox * _worksForDotEntry;
+ TQComboBox * _worksForProtocols;
+ TQComboBox * _refreshPolicy;
KDirStatApp * _mainWin;
@@ -565,6 +571,7 @@ namespace KDirStat
class KGeneralSettingsPage: public KSettingsPage
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -572,7 +579,7 @@ namespace KDirStat
* Constructor
**/
KGeneralSettingsPage( KSettingsDialog * dialog,
- QWidget * parent,
+ TQWidget * tqparent,
KDirStatApp * mainWin );
/**
@@ -618,11 +625,11 @@ namespace KDirStat
KDirStatApp * _mainWin;
KDirTreeView * _treeView;
- QCheckBox * _crossFileSystems;
- QCheckBox * _enableLocalDirReader;
+ TQCheckBox * _crossFileSystems;
+ TQCheckBox * _enableLocalDirReader;
- QCheckBox * _enableToolBarAnimation;
- QCheckBox * _enableTreeViewAnimation;
+ TQCheckBox * _enableToolBarAnimation;
+ TQCheckBox * _enableTreeViewAnimation;
}; // class KGeneralSettingsPage
@@ -634,6 +641,7 @@ namespace KDirStat
class KTreemapPage: public KSettingsPage
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -641,7 +649,7 @@ namespace KDirStat
* Constructor
**/
KTreemapPage( KSettingsDialog * dialog,
- QWidget * parent,
+ TQWidget * tqparent,
KDirStatApp * mainWin );
/**
@@ -691,9 +699,9 @@ namespace KDirStat
/**
* Convenience method to read a color from 'config'.
**/
- QColor readColorEntry( KConfig * config,
+ TQColor readColorEntry( KConfig * config,
const char * entryName,
- QColor defaultColor );
+ TQColor defaultColor );
// Data members
@@ -702,24 +710,24 @@ namespace KDirStat
// Widgets
- QCheckBox * _squarify;
- QCheckBox * _doCushionShading;
- QVGroupBox * _cushionParams;
- QSlider * _ambientLight;
- QSpinBox * _ambientLightSB;
- QSlider * _heightScalePercent;
- QSpinBox * _heightScalePercentSB;
- QCheckBox * _ensureContrast;
- QCheckBox * _forceCushionGrid;
+ TQCheckBox * _squarify;
+ TQCheckBox * _doCushionShading;
+ TQVGroupBox * _cushionParams;
+ TQSlider * _ambientLight;
+ TQSpinBox * _ambientLightSB;
+ TQSlider * _heightScalePercent;
+ TQSpinBox * _heightScalePercentSB;
+ TQCheckBox * _ensureContrast;
+ TQCheckBox * _forceCushionGrid;
KColorButton * _cushionGridColor;
- QLabel * _cushionGridColorL;
- QHGroupBox * _plainTileParams;
+ TQLabel * _cushionGridColorL;
+ TQHGroupBox * _plainTileParams;
KColorButton * _fileFillColor;
KColorButton * _dirFillColor;
KColorButton * _outlineColor;
KColorButton * _highlightColor;
- QSpinBox * _minTileSize;
- QCheckBox * _autoResize;
+ TQSpinBox * _minTileSize;
+ TQCheckBox * _autoResize;
}; // class KTreemapPage
@@ -729,12 +737,12 @@ namespace KDirStat
/**
* Add a horizontal stretch widget to take all excess space.
**/
-void addHStretch( QWidget * parent );
+void addHStretch( TQWidget * tqparent );
/**
* Add a vertical stretch widget to take all excess space.
**/
-void addVStretch( QWidget * parent );
+void addVStretch( TQWidget * tqparent );
diff --git a/kdirstat/kdirtree.cpp b/kdirstat/kdirtree.cpp
index 7bf972a..d05a5a5 100644
--- a/kdirstat/kdirtree.cpp
+++ b/kdirstat/kdirtree.cpp
@@ -11,7 +11,7 @@
#include "config.h"
#include <string.h>
#include <sys/errno.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kapp.h>
#include <klocale.h>
#include <kconfig.h>
@@ -29,9 +29,9 @@ using namespace KDirStat;
KFileInfo::KFileInfo( KDirTree * tree,
- KDirInfo * parent,
+ KDirInfo * tqparent,
const char * name )
- : _parent( parent )
+ : _parent( tqparent )
, _next( 0 )
, _tree( tree )
{
@@ -47,11 +47,11 @@ KFileInfo::KFileInfo( KDirTree * tree,
}
-KFileInfo::KFileInfo( const QString & filenameWithoutPath,
+KFileInfo::KFileInfo( const TQString & filenameWithoutPath,
struct stat * statInfo,
KDirTree * tree,
- KDirInfo * parent )
- : _parent( parent )
+ KDirInfo * tqparent )
+ : _parent( tqparent )
, _next( 0 )
, _tree( tree )
{
@@ -102,15 +102,15 @@ KFileInfo::KFileInfo( const QString & filenameWithoutPath,
KFileInfo::KFileInfo( const KFileItem * fileItem,
KDirTree * tree,
- KDirInfo * parent )
- : _parent( parent )
+ KDirInfo * tqparent )
+ : _parent( tqparent )
, _next( 0 )
, _tree( tree )
{
CHECK_PTR( fileItem );
_isLocalFile = fileItem->isLocalFile();
- _name = parent ? fileItem->name() : fileItem->url().url();
+ _name = tqparent ? fileItem->name() : fileItem->url().url();
_device = 0;
_mode = fileItem->mode();
_links = 1;
@@ -151,7 +151,7 @@ KFileInfo::~KFileInfo()
/**
* The destructor should also take care about unlinking this object from
- * its parent's children list, but regrettably that just doesn't work: At
+ * its tqparent's tqchildren list, but regrettably that just doesn't work: At
* this point (within the destructor) parts of the object are already
* destroyed, e.g., the virtual table - virtual methods don't work any
* more. Thus, somebody from outside must call deletingChild() just prior
@@ -181,34 +181,34 @@ KFileInfo::size() const
}
-QString
+TQString
KFileInfo::url() const
{
if ( _parent )
{
- QString parentUrl = _parent->url();
+ TQString tqparentUrl = _parent->url();
if ( isDotEntry() ) // don't append "/." for dot entries
- return parentUrl;
+ return tqparentUrl;
- if ( parentUrl == "/" ) // avoid duplicating slashes
- return parentUrl + _name;
+ if ( tqparentUrl == "/" ) // avoid duplicating slashes
+ return tqparentUrl + _name;
else
- return parentUrl + "/" + _name;
+ return tqparentUrl + "/" + _name;
}
else
return _name;
}
-QString
+TQString
KFileInfo::debugUrl() const
{
return url() + ( isDotEntry() ? "/<Files>" : "" );
}
-QString
+TQString
KFileInfo::urlPart( int targetLevel ) const
{
int level = treeLevel(); // Cache this - it's expensive!
@@ -225,7 +225,7 @@ KFileInfo::urlPart( int targetLevel ) const
while ( level > targetLevel )
{
level--;
- item = item->parent();
+ item = item->tqparent();
}
return item->name();
@@ -236,12 +236,12 @@ int
KFileInfo::treeLevel() const
{
int level = 0;
- KFileInfo * parent = _parent;
+ KFileInfo * tqparent = _parent;
- while ( parent )
+ while ( tqparent )
{
level++;
- parent = parent->parent();
+ tqparent = tqparent->tqparent();
}
return level;
@@ -271,7 +271,7 @@ KFileInfo::isInSubtree( const KFileInfo *subtree ) const
if ( ancestor == subtree )
return true;
- ancestor = ancestor->parent();
+ ancestor = ancestor->tqparent();
}
return false;
@@ -279,7 +279,7 @@ KFileInfo::isInSubtree( const KFileInfo *subtree ) const
KFileInfo *
-KFileInfo::locate( QString url, bool findDotEntries )
+KFileInfo::locate( TQString url, bool findDotEntries )
{
if ( ! url.startsWith( _name ) )
return 0;
@@ -296,11 +296,11 @@ KFileInfo::locate( QString url, bool findDotEntries )
{
if ( _name.right(1) != "/" && // and this is not the root directory
! isDotEntry() ) // or a dot entry:
- return 0; // This can't be any of our children.
+ return 0; // This can't be any of our tqchildren.
}
- // Search all children
+ // Search all tqchildren
KFileInfo *child = firstChild();
@@ -323,12 +323,12 @@ KFileInfo::locate( QString url, bool findDotEntries )
// Search the dot entry if there is one - but only if there is no more
// path delimiter left in the URL. The dot entry contains files only,
// and their names may not contain the path delimiter, nor can they
- // have children. This check is not strictly necessary, but it may
- // speed up things a bit if we don't search the non-directory children
+ // have tqchildren. This check is not strictly necessary, but it may
+ // speed up things a bit if we don't search the non-directory tqchildren
// if the rest of the URL consists of several pathname components.
if ( dotEntry() &&
- url.find ( "/" ) < 0 ) // No (more) "/" in this URL
+ url.tqfind ( "/" ) < 0 ) // No (more) "/" in this URL
{
return dotEntry()->locate( url, findDotEntries );
}
@@ -343,9 +343,9 @@ KFileInfo::locate( QString url, bool findDotEntries )
KDirInfo::KDirInfo( KDirTree * tree,
- KDirInfo * parent,
+ KDirInfo * tqparent,
bool asDotEntry )
- : KFileInfo( tree, parent )
+ : KFileInfo( tree, tqparent )
{
init();
@@ -363,14 +363,14 @@ KDirInfo::KDirInfo( KDirTree * tree,
}
-KDirInfo::KDirInfo( const QString & filenameWithoutPath,
+KDirInfo::KDirInfo( const TQString & filenameWithoutPath,
struct stat * statInfo,
KDirTree * tree,
- KDirInfo * parent )
+ KDirInfo * tqparent )
: KFileInfo( filenameWithoutPath,
statInfo,
tree,
- parent )
+ tqparent )
{
init();
_dotEntry = new KDirInfo( tree, this, true );
@@ -379,10 +379,10 @@ KDirInfo::KDirInfo( const QString & filenameWithoutPath,
KDirInfo::KDirInfo( const KFileItem * fileItem,
KDirTree * tree,
- KDirInfo * parent )
+ KDirInfo * tqparent )
: KFileInfo( fileItem,
tree,
- parent )
+ tqparent )
{
init();
_dotEntry = new KDirInfo( tree, this, true );
@@ -415,7 +415,7 @@ KDirInfo::~KDirInfo()
KFileInfo *child = _firstChild;
- // Recursively delete all children.
+ // Recursively delete all tqchildren.
while ( child )
{
@@ -585,7 +585,7 @@ KDirInfo::insertChild( KFileInfo *newChild )
* unless something went terribly wrong, e.g. there is no dot entry to use.
* If this is a dot entry, store everything it gets directly within it.
*
- * In any of those cases, insert the new child in the children list.
+ * In any of those cases, insert the new child in the tqchildren list.
*
* We don't bother with this list's order - it's explicitly declared to
* be unordered, so be warned! We simply insert this new child at the
@@ -597,7 +597,7 @@ KDirInfo::insertChild( KFileInfo *newChild )
**/
newChild->setNext( _firstChild );
_firstChild = newChild;
- newChild->setParent( this ); // make sure the parent pointer is correct
+ newChild->setParent( this ); // make sure the tqparent pointer is correct
childAdded( newChild ); // update summaries
}
@@ -652,7 +652,7 @@ void
KDirInfo::deletingChild( KFileInfo *deletedChild )
{
/**
- * When children are deleted, things go downhill: Marking the summary
+ * When tqchildren are deleted, things go downhill: Marking the summary
* fields as dirty (i.e. outdated) is the only thing that can be done here.
*
* The accumulated sizes could be updated (by subtracting this deleted
@@ -669,12 +669,12 @@ KDirInfo::deletingChild( KFileInfo *deletedChild )
if ( _parent )
_parent->deletingChild( deletedChild );
- if ( ! _beingDestroyed && deletedChild->parent() == this )
+ if ( ! _beingDestroyed && deletedChild->tqparent() == this )
{
/**
- * Unlink the child from the children's list - but only if this doesn't
+ * Unlink the child from the tqchildren's list - but only if this doesn't
* happen recursively in the destructor of this object: No use
- * bothering about the validity of the children's list if this will all
+ * bothering about the validity of the tqchildren's list if this will all
* be history anyway in a moment.
**/
@@ -686,10 +686,10 @@ KDirInfo::deletingChild( KFileInfo *deletedChild )
void
KDirInfo::unlinkChild( KFileInfo *deletedChild )
{
- if ( deletedChild->parent() != this )
+ if ( deletedChild->tqparent() != this )
{
kdError() << deletedChild << " is not a child of " << this
- << " - cannot unlink from children list!" << endl;
+ << " - cannot unlink from tqchildren list!" << endl;
return;
}
@@ -716,7 +716,7 @@ KDirInfo::unlinkChild( KFileInfo *deletedChild )
}
kdError() << "Couldn't unlink " << deletedChild << " from "
- << this << " children list" << endl;
+ << this << " tqchildren list" << endl;
}
@@ -773,14 +773,14 @@ KDirInfo::cleanupDotEntries()
if ( ! _dotEntry || _isDotEntry )
return;
- // Reparent dot entry children if there are no subdirectories on this level
+ // Retqparent dot entry tqchildren if there are no subdirectories on this level
if ( ! _firstChild )
{
// kdDebug() << "Removing solo dot entry " << this << " " << endl;
KFileInfo *child = _dotEntry->firstChild();
- _firstChild = child; // Move the entire children chain here.
+ _firstChild = child; // Move the entire tqchildren chain here.
_dotEntry->setFirstChild( 0 ); // _dotEntry will be deleted below.
while ( child )
@@ -791,7 +791,7 @@ KDirInfo::cleanupDotEntries()
}
- // Delete dot entries without any children
+ // Delete dot entries without any tqchildren
if ( ! _dotEntry->firstChild() )
{
@@ -857,7 +857,7 @@ KLocalDirReadJob::startReading()
{
struct dirent * entry;
struct stat statInfo;
- QString dirName = _dir->url();
+ TQString dirName = _dir->url();
if ( ( _diskDir = opendir( dirName ) ) )
{
@@ -866,12 +866,12 @@ KLocalDirReadJob::startReading()
while ( ( entry = readdir( _diskDir ) ) )
{
- QString entryName = entry->d_name;
+ TQString entryName = entry->d_name;
if ( entryName != "." &&
entryName != ".." )
{
- QString fullName = dirName + "/" + entryName;
+ TQString fullName = dirName + "/" + entryName;
if ( lstat( fullName, &statInfo ) == 0 ) // lstat() OK
{
@@ -953,25 +953,25 @@ KLocalDirReadJob::startReading()
KFileInfo *
KLocalDirReadJob::stat( const KURL & url,
KDirTree * tree,
- KDirInfo * parent )
+ KDirInfo * tqparent )
{
struct stat statInfo;
if ( lstat( url.path(), &statInfo ) == 0 ) // lstat() OK
{
- QString name = parent ? url.filename() : url.path();
+ TQString name = tqparent ? url.filename() : url.path();
if ( S_ISDIR( statInfo.st_mode ) ) // directory?
{
- KDirInfo * dir = new KDirInfo( name, &statInfo, tree, parent );
+ KDirInfo * dir = new KDirInfo( name, &statInfo, tree, tqparent );
- if ( dir && parent && dir->device() != parent->device() )
+ if ( dir && tqparent && dir->device() != tqparent->device() )
dir->setMountPoint();
return dir;
}
else // no directory
- return new KFileInfo( name, &statInfo, tree, parent );
+ return new KFileInfo( name, &statInfo, tree, tqparent );
}
else // lstat() failed
return 0;
@@ -984,7 +984,7 @@ KLocalDirReadJob::stat( const KURL & url,
KAnyDirReadJob::KAnyDirReadJob( KDirTree * tree,
KDirInfo * dir )
- : QObject()
+ : TQObject()
, KDirReadJob( tree, dir )
{
_job = 0;
@@ -1013,14 +1013,14 @@ KAnyDirReadJob::startReading()
_job = KIO::listDir( url,
false ); // showProgressInfo
- connect( _job, SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList& ) ),
- this, SLOT ( entries( KIO::Job *, const KIO::UDSEntryList& ) ) );
+ connect( _job, TQT_SIGNAL( entries( KIO::Job *, const KIO::UDSEntryList& ) ),
+ this, TQT_SLOT ( entries( KIO::Job *, const KIO::UDSEntryList& ) ) );
- connect( _job, SIGNAL( result ( KIO::Job * ) ),
- this, SLOT ( finished( KIO::Job * ) ) );
+ connect( _job, TQT_SIGNAL( result ( KIO::Job * ) ),
+ this, TQT_SLOT ( finished( KIO::Job * ) ) );
- connect( _job, SIGNAL( canceled( KIO::Job * ) ),
- this, SLOT ( finished( KIO::Job * ) ) );
+ connect( _job, TQT_SIGNAL( canceled( KIO::Job * ) ),
+ this, TQT_SLOT ( finished( KIO::Job * ) ) );
}
@@ -1043,7 +1043,7 @@ KAnyDirReadJob::entries ( KIO::Job * job,
KFileItem entry( *it,
url,
true, // determineMimeTypeOnDemand
- true ); // URL is parent directory
+ true ); // URL is tqparent directory
if ( entry.name() != "." &&
entry.name() != ".." )
@@ -1097,17 +1097,17 @@ KAnyDirReadJob::finished( KIO::Job * job )
KFileInfo *
KAnyDirReadJob::stat( const KURL & url,
KDirTree * tree,
- KDirInfo * parent )
+ KDirInfo * tqparent )
{
KIO::UDSEntry uds_entry;
- if ( KIO::NetAccess::stat( url, uds_entry, qApp->mainWidget() ) ) // remote stat() OK?
+ if ( KIO::NetAccess::stat( url, uds_entry, tqApp->mainWidget() ) ) // remote stat() OK?
{
KFileItem entry( uds_entry, url,
true, // determine MIME type on demand
- false ); // URL specifies parent directory
+ false ); // URL specifies tqparent directory
- return entry.isDir() ? new KDirInfo ( &entry, tree, parent ) : new KFileInfo( &entry, tree, parent );
+ return entry.isDir() ? new KDirInfo ( &entry, tree, tqparent ) : new KFileInfo( &entry, tree, tqparent );
}
else // remote stat() failed
return 0;
@@ -1125,21 +1125,21 @@ KAnyDirReadJob::stat( const KURL & url,
}
-QString
+TQString
KAnyDirReadJob::owner( KURL url )
{
KIO::UDSEntry uds_entry;
- if ( KIO::NetAccess::stat( url, uds_entry, qApp->mainWidget() ) ) // remote stat() OK?
+ if ( KIO::NetAccess::stat( url, uds_entry, tqApp->mainWidget() ) ) // remote stat() OK?
{
KFileItem entry( uds_entry, url,
true, // determine MIME type on demand
- false ); // URL specifies parent directory
+ false ); // URL specifies tqparent directory
return entry.user();
}
- return QString();
+ return TQString();
}
@@ -1148,7 +1148,7 @@ KAnyDirReadJob::owner( KURL url )
KDirTree::KDirTree()
- : QObject()
+ : TQObject()
{
_root = 0;
_selection = 0;
@@ -1266,7 +1266,7 @@ KDirTree::startReading( const KURL & url )
}
if ( ! _jobQueue.isEmpty() )
- QTimer::singleShot( 0, this, SLOT( timeSlicedRead() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( timeSlicedRead() ) );
}
@@ -1276,7 +1276,7 @@ KDirTree::refresh( KFileInfo *subtree )
if ( ! _root )
return;
- if ( ! subtree || ! subtree->parent() ) // Refresh all (from root)
+ if ( ! subtree || ! subtree->tqparent() ) // Refresh all (from root)
{
startReading( fixedUrl( _root->url() ) );
}
@@ -1285,7 +1285,7 @@ KDirTree::refresh( KFileInfo *subtree )
// Save some values from the old subtree.
KURL url = subtree->url();
- KDirInfo * parent = subtree->parent();
+ KDirInfo * tqparent = subtree->tqparent();
// Select nothing if the current selection is to be deleted
@@ -1300,15 +1300,15 @@ KDirTree::refresh( KFileInfo *subtree )
// kdDebug() << "Deleting subtree " << subtree << endl;
/**
- * This may sound stupid, but the parent must be told to unlink its
- * child from the children list. The child cannot simply do this by
+ * This may sound stupid, but the tqparent must be told to unlink its
+ * child from the tqchildren list. The child cannot simply do this by
* itself in its destructor since at this point important parts of the
* object may already be destroyed, e.g., the virtual table -
* i.e. virtual methods won't work any more.
*
* I just found that out the hard way by several hours of debugging. ;-}
**/
- parent->deletingChild( subtree );
+ tqparent->deletingChild( subtree );
delete subtree;
emit childDeleted();
@@ -1316,7 +1316,7 @@ KDirTree::refresh( KFileInfo *subtree )
// Create new subtree root.
subtree = ( _readMethod == KDirReadLocal ) ?
- KLocalDirReadJob::stat( url, this, parent ) : KAnyDirReadJob::stat( url, this, parent );
+ KLocalDirReadJob::stat( url, this, tqparent ) : KAnyDirReadJob::stat( url, this, tqparent );
// kdDebug() << "New subtree: " << subtree << endl;
@@ -1324,7 +1324,7 @@ KDirTree::refresh( KFileInfo *subtree )
{
// Insert new subtree root into the tree hierarchy.
- parent->insertChild( subtree );
+ tqparent->insertChild( subtree );
childAddedNotify( subtree );
if ( subtree->isDir() )
@@ -1348,7 +1348,7 @@ KDirTree::refresh( KFileInfo *subtree )
// Trigger reading as soon as the event loop continues.
if ( ! _jobQueue.isEmpty() )
- QTimer::singleShot( 0, this, SLOT( timeSlicedRead() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( timeSlicedRead() ) );
}
}
}
@@ -1402,7 +1402,7 @@ KDirTree::jobFinishedNotify( KDirReadJob *job )
{
// Set up zero-duration timer for the new job.
- QTimer::singleShot( 0, this, SLOT( timeSlicedRead() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( timeSlicedRead() ) );
}
}
@@ -1444,48 +1444,48 @@ void
KDirTree::deleteSubtree( KFileInfo *subtree )
{
// kdDebug() << "Deleting subtree " << subtree << endl;
- KDirInfo *parent = subtree->parent();
+ KDirInfo *tqparent = subtree->tqparent();
- if ( parent )
+ if ( tqparent )
{
- // Give the parent of the child to be deleted a chance to unlink the
- // child from its children list and take care of internal summary
+ // Give the tqparent of the child to be deleted a chance to unlink the
+ // child from its tqchildren list and take care of internal summary
// fields
- parent->deletingChild( subtree );
+ tqparent->deletingChild( subtree );
}
// Send notification to anybody interested (e.g., to attached views)
deletingChildNotify( subtree );
- if ( parent )
+ if ( tqparent )
{
- if ( parent->isDotEntry() && ! parent->hasChildren() )
+ if ( tqparent->isDotEntry() && ! tqparent->hasChildren() )
// This was the last child of a dot entry
{
// Get rid of that now empty and useless dot entry
- if ( parent->parent() )
+ if ( tqparent->tqparent() )
{
- if ( parent->parent()->isFinished() )
+ if ( tqparent->tqparent()->isFinished() )
{
- // kdDebug() << "Removing empty dot entry " << parent << endl;
+ // kdDebug() << "Removing empty dot entry " << tqparent << endl;
- deletingChildNotify( parent );
- parent->parent()->setDotEntry( 0 );
+ deletingChildNotify( tqparent );
+ tqparent->tqparent()->setDotEntry( 0 );
- delete parent;
+ delete tqparent;
}
}
- else // no parent - this should never happen (?)
+ else // no tqparent - this should never happen (?)
{
- kdError() << "Internal error: Killing dot entry without parent " << parent << endl;
+ kdError() << "Internal error: Killing dot entry without tqparent " << tqparent << endl;
// Better leave that dot entry alone - we shouldn't have come
// here in the first place. Who knows what will happen if this
// thing is deleted now?!
//
// Intentionally NOT calling:
- // delete parent;
+ // delete tqparent;
}
}
}
@@ -1505,7 +1505,7 @@ KDirTree::addJob( KDirReadJob * job )
void
-KDirTree::sendProgressInfo( const QString &infoLine )
+KDirTree::sendProgressInfo( const TQString &infoLine )
{
emit progressInfo( infoLine );
}
@@ -1541,7 +1541,7 @@ KDirTree::selectItem( KFileInfo *newSelection )
KURL
-KDirStat::fixedUrl( const QString & dirtyUrl )
+KDirStat::fixedUrl( const TQString & dirtyUrl )
{
KURL url = dirtyUrl;
@@ -1558,7 +1558,7 @@ KDirStat::fixedUrl( const QString & dirtyUrl )
// Strip off the rightmost slash - some kioslaves (e.g. 'tar') can't handle that.
- QString path = url.path();
+ TQString path = url.path();
if ( path.length() > 1 && path.right(1) == "/" )
{
@@ -1582,12 +1582,12 @@ KDirStat::fixedUrl( const QString & dirtyUrl )
-QString
+TQString
KDirStat::formatSize( KFileSize lSize )
{
- QString sizeString;
+ TQString sizeString;
double size;
- QString unit;
+ TQString unit;
if ( lSize < 1024 )
{
diff --git a/kdirstat/kdirtree.h b/kdirstat/kdirtree.h
index d4155a9..0de058f 100644
--- a/kdirstat/kdirtree.h
+++ b/kdirstat/kdirtree.h
@@ -19,7 +19,7 @@
#include <sys/types.h>
#include <limits.h>
#include <dirent.h>
-#include <qptrqueue.h>
+#include <tqptrqueue.h>
#include <kdebug.h>
#include <kfileitem.h>
#include <kio/jobclasses.h>
@@ -51,7 +51,7 @@ namespace KDirStat
/**
- * Status of a directory read job.
+ * tqStatus of a directory read job.
**/
typedef enum
{
@@ -93,8 +93,8 @@ namespace KDirStat
* easily has 150,000+ file system objects, and at least one entry of this
* sort is required for each of them.
*
- * This class provides stubs for children management, yet those stubs all
- * are default implementations that don't really deal with children.
+ * This class provides stubs for tqchildren management, yet those stubs all
+ * are default implementations that don't really deal with tqchildren.
* Derived classes need to take care of that.
*
* @short Basic file information (like obtained by the lstat() sys call)
@@ -106,23 +106,23 @@ namespace KDirStat
* Default constructor.
**/
KFileInfo( KDirTree * tree,
- KDirInfo * parent = 0,
+ KDirInfo * tqparent = 0,
const char * name = 0 );
/**
* Constructor from a stat buffer (i.e. based on an lstat() call).
**/
- KFileInfo( const QString & filenameWithoutPath,
+ KFileInfo( const TQString & filenameWithoutPath,
struct stat * statInfo,
KDirTree * tree,
- KDirInfo * parent = 0 );
+ KDirInfo * tqparent = 0 );
/**
* Constructor from a KFileItem, i.e. from a @ref KIO::StatJob
**/
KFileInfo( const KFileItem * fileItem,
KDirTree * tree,
- KDirInfo * parent = 0 );
+ KDirInfo * tqparent = 0 );
/**
* Destructor.
@@ -149,7 +149,7 @@ namespace KDirStat
* for "/usr/share/man". Notice, however, that the entry for
* "/usr/share/man/man1" will only return "man1" in this example.
**/
- QString name() const { return _name; }
+ TQString name() const { return _name; }
/**
* Returns the full URL of this object with full path and protocol
@@ -158,7 +158,7 @@ namespace KDirStat
* This is a (somewhat) expensive operation since it will recurse up
* to the top of the tree.
**/
- QString url() const;
+ TQString url() const;
/**
* Very much like @ref KFileInfo::url(), but with "/<Files>" appended
@@ -168,7 +168,7 @@ namespace KDirStat
*
* kdDebug() << "Found fileInfo " << info << endl;
**/
- QString debugUrl() const;
+ TQString debugUrl() const;
/**
* Returns part no. "level" of this object's URL, i.e. traverses up the
@@ -176,7 +176,7 @@ namespace KDirStat
* @ref name() . This is useful for tree searches in symmetrical trees
* to find an item's counterpart in the other tree.
**/
- QString urlPart( int level ) const;
+ TQString urlPart( int level ) const;
/**
* Returns the major and minor device numbers of the device this file
@@ -250,39 +250,39 @@ namespace KDirStat
/**
* Returns the total size in bytes of this subtree.
- * Derived classes that have children should overwrite this.
+ * Derived classes that have tqchildren should overwrite this.
**/
virtual KFileSize totalSize() { return size(); }
/**
* Returns the total size in blocks of this subtree.
- * Derived classes that have children should overwrite this.
+ * Derived classes that have tqchildren should overwrite this.
**/
virtual KFileSize totalBlocks() { return _blocks; }
/**
- * Returns the total number of children in this subtree, excluding this item.
- * Derived classes that have children should overwrite this.
+ * Returns the total number of tqchildren in this subtree, excluding this item.
+ * Derived classes that have tqchildren should overwrite this.
**/
virtual int totalItems() { return 0; }
/**
* Returns the total number of subdirectories in this subtree,
* excluding this item. Dot entries and "." or ".." are not counted.
- * Derived classes that have children should overwrite this.
+ * Derived classes that have tqchildren should overwrite this.
**/
virtual int totalSubDirs() { return 0; }
/**
- * Returns the total number of plain file children in this subtree,
+ * Returns the total number of plain file tqchildren in this subtree,
* excluding this item.
- * Derived classes that have children should overwrite this.
+ * Derived classes that have tqchildren should overwrite this.
**/
virtual int totalFiles() { return 0; }
/**
* Returns the latest modification time of this subtree.
- * Derived classes that have children should overwrite this.
+ * Derived classes that have tqchildren should overwrite this.
**/
virtual time_t latestMtime() { return _mtime; }
@@ -322,7 +322,7 @@ namespace KDirStat
/**
* Returns the number of pending read jobs in this subtree. When this
* number reaches zero, the entire subtree is done.
- * Derived classes that have children should overwrite this.
+ * Derived classes that have tqchildren should overwrite this.
**/
virtual int pendingReadJobs() { return 0; }
@@ -337,13 +337,13 @@ namespace KDirStat
KDirTree * tree() const { return _tree; }
/**
- * Returns a pointer to this entry's parent entry or 0 if there is
+ * Returns a pointer to this entry's tqparent entry or 0 if there is
* none.
**/
- KDirInfo * parent() const { return _parent; }
+ KDirInfo * tqparent() const { return _parent; }
/**
- * Set the "parent" pointer.
+ * Set the "tqparent" pointer.
**/
void setParent( KDirInfo *newParent ) { _parent = newParent; }
@@ -377,7 +377,7 @@ namespace KDirStat
{ NOT_USED( newFirstChild ); }
/**
- * Returns true if this entry has any children.
+ * Returns true if this entry has any tqchildren.
**/
virtual bool hasChildren() const;
@@ -396,17 +396,17 @@ namespace KDirStat
*
* Derived classes might or might not wish to overwrite this method;
* it's only advisable to do so if a derived class comes up with a
- * different method than brute-force search all children.
+ * different method than brute-force search all tqchildren.
*
* 'findDotEntries' specifies if locating "dot entries" (".../<Files>")
* is desired.
**/
- virtual KFileInfo * locate( QString url, bool findDotEntries = false );
+ virtual KFileInfo * locate( TQString url, bool findDotEntries = false );
/**
- * Insert a child into the children list.
+ * Insert a child into the tqchildren list.
*
- * The order of children in this list is absolutely undefined;
+ * The order of tqchildren in this list is absolutely undefined;
* don't rely on any implementation-specific order.
*
* This default implementation does nothing.
@@ -416,7 +416,7 @@ namespace KDirStat
/**
* Return the "Dot Entry" for this node if there is one (or 0
* otherwise): This is a pseudo entry that directory nodes use to store
- * non-directory children separately from directories. This way the end
+ * non-directory tqchildren separately from directories. This way the end
* user can easily tell which summary fields belong to the directory
* itself and which are the accumulated values of the entire subtree.
*
@@ -456,7 +456,7 @@ namespace KDirStat
virtual void childAdded( KFileInfo *newChild ) { NOT_USED( newChild ); }
/**
- * Remove a child from the children list.
+ * Remove a child from the tqchildren list.
*
* IMPORTANT: This MUST be called just prior to deleting an object of
* this class. Regrettably, this cannot simply be moved to the
@@ -464,7 +464,7 @@ namespace KDirStat
* (e.g., the virtual table - no more virtual methods).
*
* This default implementation does nothing.
- * Derived classes that can handle children should overwrite this.
+ * Derived classes that can handle tqchildren should overwrite this.
**/
virtual void unlinkChild( KFileInfo *deletedChild ) { NOT_USED( deletedChild ); }
@@ -562,7 +562,7 @@ namespace KDirStat
// Keep this short in order to use as little memory as possible -
// there will be a _lot_ of entries of this kind!
- QString _name; // the file name (without path!)
+ TQString _name; // the file name (without path!)
bool _isLocalFile :1; // flag: local or remote file?
bool _isSparseFile :1; // (cache) flag: sparse file (file with "holes")?
dev_t _device; // device this object resides on
@@ -572,15 +572,15 @@ namespace KDirStat
KFileSize _blocks; // 512 bytes blocks
time_t _mtime; // modification time
- KDirInfo * _parent; // pointer to the parent entry
+ KDirInfo * _parent; // pointer to the tqparent entry
KFileInfo * _next; // pointer to the next entry
- KDirTree * _tree; // pointer to the parent tree
+ KDirTree * _tree; // pointer to the tqparent tree
}; // class KFileInfo
/**
* A more specialized version of @ref KFileInfo: This class can actually
- * manage children. The base class (@ref KFileInfo) has only stubs for the
+ * manage tqchildren. The base class (@ref KFileInfo) has only stubs for the
* respective methods to integrate seamlessly with the abstraction of a
* file / directory tree; this class fills those stubs with life.
*
@@ -592,29 +592,29 @@ namespace KDirStat
/**
* Default constructor.
*
- * If "asDotEntry" is set, this will be used as the parent's
- * "dot entry", i.e. the pseudo directory that holds all the parent's
- * non-directory children. This is the only way to create a "dot
+ * If "asDotEntry" is set, this will be used as the tqparent's
+ * "dot entry", i.e. the pseudo directory that holds all the tqparent's
+ * non-directory tqchildren. This is the only way to create a "dot
* entry"!
**/
KDirInfo( KDirTree * tree,
- KDirInfo * parent = 0,
+ KDirInfo * tqparent = 0,
bool asDotEntry = false );
/**
* Constructor from a stat buffer (i.e. based on an lstat() call).
**/
- KDirInfo( const QString & filenameWithoutPath,
+ KDirInfo( const TQString & filenameWithoutPath,
struct stat * statInfo,
KDirTree * tree,
- KDirInfo * parent = 0 );
+ KDirInfo * tqparent = 0 );
/**
* Constructor from a KFileItem, i.e. from a @ref KIO::StatJob
**/
KDirInfo( const KFileItem * fileItem,
KDirTree * tree,
- KDirInfo * parent = 0 );
+ KDirInfo * tqparent = 0 );
/**
* Destructor.
@@ -637,7 +637,7 @@ namespace KDirStat
virtual KFileSize totalBlocks();
/**
- * Returns the total number of children in this subtree, excluding this item.
+ * Returns the total number of tqchildren in this subtree, excluding this item.
*
* Reimplemented - inherited from @ref KFileInfo.
**/
@@ -652,7 +652,7 @@ namespace KDirStat
virtual int totalSubDirs();
/**
- * Returns the total number of plain file children in this subtree,
+ * Returns the total number of plain file tqchildren in this subtree,
* excluding this item.
*
* Reimplemented - inherited from @ref KFileInfo.
@@ -723,9 +723,9 @@ namespace KDirStat
{ _firstChild = newfirstChild; }
/**
- * Insert a child into the children list.
+ * Insert a child into the tqchildren list.
*
- * The order of children in this list is absolutely undefined;
+ * The order of tqchildren in this list is absolutely undefined;
* don't rely on any implementation-specific order.
**/
virtual void insertChild( KFileInfo *newChild );
@@ -733,7 +733,7 @@ namespace KDirStat
/**
* Get the "Dot Entry" for this node if there is one (or 0 otherwise):
* This is a pseudo entry that directory nodes use to store
- * non-directory children separately from directories. This way the end
+ * non-directory tqchildren separately from directories. This way the end
* user can easily tell which summary fields belong to the directory
* itself and which are the accumulated values of the entire subtree.
**/
@@ -760,7 +760,7 @@ namespace KDirStat
virtual void childAdded( KFileInfo *newChild );
/**
- * Remove a child from the children list.
+ * Remove a child from the tqchildren list.
*
* IMPORTANT: This MUST be called just prior to deleting an object of
* this class. Regrettably, this cannot simply be moved to the
@@ -848,8 +848,8 @@ namespace KDirStat
/**
* Clean up unneeded / undesired dot entries:
- * Delete dot entries that don't have any children,
- * reparent dot entry children to the "real" (parent) directory if
+ * Delete dot entries that don't have any tqchildren,
+ * reparent dot entry tqchildren to the "real" (tqparent) directory if
* there are not subdirectory siblings at the level of the dot entry.
**/
void cleanupDotEntries();
@@ -862,7 +862,7 @@ namespace KDirStat
// Children management
KFileInfo * _firstChild; // pointer to the first child
- KFileInfo * _dotEntry; // pseudo entry to hold non-dir children
+ KFileInfo * _dotEntry; // pseudo entry to hold non-dir tqchildren
// Some cached values
@@ -897,7 +897,7 @@ namespace KDirStat
* KDirTree.
*
* For each entry automatically a @ref KFileInfo or @ref KDirInfo will be
- * created and added to the parent @ref KDirInfo. For each directory a new
+ * created and added to the tqparent @ref KDirInfo. For each directory a new
* @ref KDirReadJob will be created and added to the @ref KDirTree 's job
* queue.
*
@@ -1007,7 +1007,7 @@ namespace KDirStat
**/
static KFileInfo * stat( const KURL & url,
KDirTree * tree,
- KDirInfo * parent = 0 );
+ KDirInfo * tqparent = 0 );
protected:
DIR * _diskDir;
@@ -1026,9 +1026,10 @@ namespace KDirStat
*
* @short Generic directory reader that reads one directory, remote or local.
**/
- class KAnyDirReadJob: public QObject, public KDirReadJob
+ class KAnyDirReadJob: public TQObject, public KDirReadJob
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -1057,7 +1058,7 @@ namespace KDirStat
**/
static KFileInfo * stat( const KURL & url,
KDirTree * tree,
- KDirInfo * parent = 0 );
+ KDirInfo * tqparent = 0 );
/**
* Obtain the owner of the URL specified.
@@ -1065,7 +1066,7 @@ namespace KDirStat
* This is a moderately expensive operation since it involves a network
* transparent stat() call.
**/
- static QString owner( KURL url );
+ static TQString owner( KURL url );
protected slots:
@@ -1096,9 +1097,10 @@ namespace KDirStat
*
* @short Directory tree global data and infrastructure
**/
- class KDirTree: public QObject
+ class KDirTree: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -1122,7 +1124,7 @@ namespace KDirStat
*
* It's not very pretty this is required as an extra method, but this
* cannot simply be done in the constructor: We need to give the caller
- * a chance to set up Qt signal connections, and for this the
+ * a chance to set up TQt signal connections, and for this the
* constructor must return before any signals are sent, i.e. before
* anything is read.
**/
@@ -1183,7 +1185,7 @@ namespace KDirStat
* This is just a convenience method that maps to
* KDirTree::root()->locate( url, findDotEntries )
**/
- KFileInfo * locate( QString url, bool findDotEntries = false )
+ KFileInfo * locate( TQString url, bool findDotEntries = false )
{ return _root ? _root->locate( url, findDotEntries ) : 0; }
/**
@@ -1250,10 +1252,10 @@ namespace KDirStat
virtual void deletingChildNotify( KFileInfo *deletedChild );
/**
- * Notification that one or more children have been deleted.
+ * Notification that one or more tqchildren have been deleted.
*
* Directory read jobs are required to call this when one or more
- * children are deleted so the tree can emit the corresponding @ref
+ * tqchildren are deleted so the tree can emit the corresponding @ref
* deletingChild() signal. For multiple deletions (e.g. entire
* subtrees) this should only happen once at the end.
**/
@@ -1263,7 +1265,7 @@ namespace KDirStat
* Send a @ref progressInfo() signal to keep the user entertained while
* directories are being read.
**/
- void sendProgressInfo( const QString &infoLine );
+ void sendProgressInfo( const TQString &infoLine );
/**
* Send a @ref finalizeLocal() signal to give views a chance to
@@ -1347,7 +1349,7 @@ namespace KDirStat
* changes - typically when a new directory is being read. Connect to a
* status bar etc. to keep the user entertained.
**/
- void progressInfo( const QString &infoLine );
+ void progressInfo( const TQString &infoLine );
protected slots:
@@ -1373,7 +1375,7 @@ namespace KDirStat
KFileInfo * _root;
KFileInfo * _selection;
- QPtrQueue<KDirReadJob> _jobQueue;
+ TQPtrQueue<KDirReadJob> _jobQueue;
KDirReadMethod _readMethod;
bool _crossFileSystems;
bool _enableLocalDirReader;
@@ -1390,7 +1392,7 @@ namespace KDirStat
* Make a valid, fixed and cleaned URL from a (possibly dirty) URL or maybe
* a path.
**/
- KURL fixedUrl( const QString & dirtyUrl );
+ KURL fixedUrl( const TQString & dirtyUrl );
/**
@@ -1401,7 +1403,7 @@ namespace KDirStat
*
* kdDebug() << "Size: " << x->totalSize() << endl;
**/
- QString formatSize ( KFileSize lSize );
+ TQString formatSize ( KFileSize lSize );
/**
diff --git a/kdirstat/kdirtreeiterators.cpp b/kdirstat/kdirtreeiterators.cpp
index 6f42798..ff43bd3 100644
--- a/kdirstat/kdirtreeiterators.cpp
+++ b/kdirstat/kdirtreeiterators.cpp
@@ -15,29 +15,29 @@
using namespace KDirStat;
-KFileInfoIterator::KFileInfoIterator( KFileInfo * parent,
+KFileInfoIterator::KFileInfoIterator( KFileInfo * tqparent,
KDotEntryPolicy dotEntryPolicy )
{
- init( parent,
+ init( tqparent,
dotEntryPolicy,
true ); // callNext
}
-KFileInfoIterator::KFileInfoIterator( KFileInfo * parent,
+KFileInfoIterator::KFileInfoIterator( KFileInfo * tqparent,
KDotEntryPolicy dotEntryPolicy,
bool callNext )
{
- init( parent, dotEntryPolicy, callNext );
+ init( tqparent, dotEntryPolicy, callNext );
}
void
-KFileInfoIterator::init( KFileInfo * parent,
+KFileInfoIterator::init( KFileInfo * tqparent,
KDotEntryPolicy dotEntryPolicy,
bool callNext )
{
- _parent = parent;
+ _parent = tqparent;
_policy = dotEntryPolicy;
_current = 0;
@@ -60,7 +60,7 @@ void KFileInfoIterator::next()
{
if ( ! _directChildrenProcessed )
{
- // Process direct children
+ // Process direct tqchildren
_current = _current ? _current->next() : _parent->firstChild();
@@ -98,7 +98,7 @@ void KFileInfoIterator::next()
{
if ( _policy == KDotEntryTransparent )
{
- // Process dot entry children
+ // Process dot entry tqchildren
_current = _current ?
_current->next() :
@@ -129,7 +129,7 @@ KFileInfoIterator::count()
{
int cnt = 0;
- // Count direct children
+ // Count direct tqchildren
KFileInfo *child = _parent->firstChild();
@@ -144,7 +144,7 @@ KFileInfoIterator::count()
switch ( _policy )
{
- case KDotEntryTransparent: // Count the dot entry's children as well.
+ case KDotEntryTransparent: // Count the dot entry's tqchildren as well.
if ( _parent->dotEntry() )
{
child = _parent->dotEntry()->firstChild();
@@ -174,16 +174,16 @@ KFileInfoIterator::count()
-KFileInfoSortedIterator::KFileInfoSortedIterator( KFileInfo * parent,
+KFileInfoSortedIterator::KFileInfoSortedIterator( KFileInfo * tqparent,
KDotEntryPolicy dotEntryPolicy,
KFileInfoSortOrder sortOrder,
bool ascending )
- : KFileInfoIterator( parent, dotEntryPolicy, false )
+ : KFileInfoIterator( tqparent, dotEntryPolicy, false )
{
_sortOrder = sortOrder;
_ascending = ascending;
_initComplete = false;
- _childrenList = 0;
+ _tqchildrenList = 0;
_current = 0;
}
@@ -191,8 +191,8 @@ KFileInfoSortedIterator::KFileInfoSortedIterator( KFileInfo * parent,
void
KFileInfoSortedIterator::delayedInit()
{
- _childrenList = new KFileInfoList( _sortOrder, _ascending );
- CHECK_PTR( _childrenList );
+ _tqchildrenList = new KFileInfoList( _sortOrder, _ascending );
+ CHECK_PTR( _tqchildrenList );
if ( _sortOrder == KSortByName )
{
@@ -203,45 +203,45 @@ KFileInfoSortedIterator::delayedInit()
makeChildrenList();
}
- _current = _childrenList->first();
+ _current = _tqchildrenList->first();
_initComplete = true;
}
KFileInfoSortedIterator::~KFileInfoSortedIterator()
{
- if ( _childrenList )
- delete _childrenList;
+ if ( _tqchildrenList )
+ delete _tqchildrenList;
}
void KFileInfoSortedIterator::makeDefaultOrderChildrenList()
{
- // Fill children list with direct children
+ // Fill tqchildren list with direct tqchildren
KFileInfo *child = _parent->firstChild();
while ( child )
{
- _childrenList->append( child );
+ _tqchildrenList->append( child );
child = child->next();
}
- _childrenList->sort();
+ _tqchildrenList->sort();
if ( _policy == KDotEntryAsSubDir && _parent->dotEntry() )
{
- // Append dot entry to the children list
+ // Append dot entry to the tqchildren list
- _childrenList->append( _parent->dotEntry() );
+ _tqchildrenList->append( _parent->dotEntry() );
}
- // Append the dot entry's children to the children list
+ // Append the dot entry's tqchildren to the tqchildren list
if ( _policy == KDotEntryTransparent && _parent->dotEntry() )
{
- // Create a temporary list for the dot entry children
+ // Create a temporary list for the dot entry tqchildren
KFileInfoList dotEntryChildrenList( _sortOrder, _ascending );
child = _parent->dotEntry()->firstChild();
@@ -255,13 +255,13 @@ void KFileInfoSortedIterator::makeDefaultOrderChildrenList()
dotEntryChildrenList.sort();
- // Now append all of this dot entry children list to the children list
+ // Now append all of this dot entry tqchildren list to the tqchildren list
child = dotEntryChildrenList.first();
while ( child )
{
- _childrenList->append( child );
+ _tqchildrenList->append( child );
child = dotEntryChildrenList.next();
}
}
@@ -275,11 +275,11 @@ KFileInfoSortedIterator::makeChildrenList()
while ( *it )
{
- _childrenList->append( *it );
+ _tqchildrenList->append( *it );
++it;
}
- _childrenList->sort();
+ _tqchildrenList->sort();
}
@@ -298,7 +298,7 @@ void KFileInfoSortedIterator::next()
if ( ! _initComplete )
delayedInit();
- _current = _childrenList->next();
+ _current = _tqchildrenList->next();
}
@@ -316,11 +316,11 @@ KFileInfoSortedIterator::finished()
-KFileInfoSortedBySizeIterator::KFileInfoSortedBySizeIterator( KFileInfo * parent,
+KFileInfoSortedBySizeIterator::KFileInfoSortedBySizeIterator( KFileInfo * tqparent,
KFileSize minSize,
KDotEntryPolicy dotEntryPolicy,
bool ascending )
- : KFileInfoSortedIterator( parent, dotEntryPolicy, KSortByTotalSize, ascending )
+ : KFileInfoSortedIterator( tqparent, dotEntryPolicy, KSortByTotalSize, ascending )
, _minSize( minSize )
{
}
@@ -334,12 +334,12 @@ KFileInfoSortedBySizeIterator::makeChildrenList()
while ( *it )
{
if ( (*it)->totalSize() >= _minSize )
- _childrenList->append( *it );
+ _tqchildrenList->append( *it );
++it;
}
- _childrenList->sort();
+ _tqchildrenList->sort();
}
@@ -348,7 +348,7 @@ KFileInfoSortedBySizeIterator::makeChildrenList()
KFileInfoList::KFileInfoList( KFileInfoSortOrder sortOrder, bool ascending )
- : QPtrList<KFileInfo>()
+ : TQPtrList<KFileInfo>()
{
_sortOrder = sortOrder;
_ascending = ascending;
@@ -380,7 +380,7 @@ KFileInfoList::sumTotalSizes()
int
-KFileInfoList::compareItems( QCollection::Item it1, QCollection::Item it2 )
+KFileInfoList::compareItems( TQCollection::Item it1, TQCollection::Item it2 )
{
if ( it1 == it2 )
return 0;
@@ -396,7 +396,7 @@ KFileInfoList::compareItems( QCollection::Item it1, QCollection::Item it2 )
return 1;
case KSortByName:
- result = QString::compare( file1->name(), file2->name() );
+ result = TQString::compare( file1->name(), file2->name() );
break;
case KSortByTotalSize:
diff --git a/kdirstat/kdirtreeiterators.h b/kdirstat/kdirtreeiterators.h
index c3e2569..248960a 100644
--- a/kdirstat/kdirtreeiterators.h
+++ b/kdirstat/kdirtreeiterators.h
@@ -27,9 +27,9 @@ namespace KDirStat
**/
typedef enum
{
- KDotEntryTransparent, // Flatten hierarchy - move dot entry children up
+ KDotEntryTransparent, // Flatten hierarchy - move dot entry tqchildren up
KDotEntryAsSubDir, // Treat dot entry as ordinary subdirectory
- KDotEntryIgnore // Ignore dot entry and its children completely
+ KDotEntryIgnore // Ignore dot entry and its tqchildren completely
} KDotEntryPolicy;
@@ -47,8 +47,8 @@ namespace KDirStat
/**
- * Iterator class for children of a @ref KFileInfo object. For optimum
- * performance, this iterator class does NOT return children in any
+ * Iterator class for tqchildren of a @ref KFileInfo object. For optimum
+ * performance, this iterator class does NOT return tqchildren in any
* specific sort order. If you need that, use @ref KFileInfoSortedIterator
* instead.
*
@@ -66,40 +66,40 @@ namespace KDirStat
* subdirectory child and each (direct) file child of 'node'.
* Notice: This does not recurse into subdirectories!
*
- * @short (unsorted) iterator for @ref KFileInfo children.
+ * @short (unsorted) iterator for @ref KFileInfo tqchildren.
**/
class KFileInfoIterator
{
public:
/**
* Constructor: Initialize an iterator object to iterate over the
- * children of 'parent' (unsorted!), depending on 'dotEntryPolicy':
+ * tqchildren of 'tqparent' (unsorted!), depending on 'dotEntryPolicy':
*
* KDotEntryTransparent (default):
*
* Treat the dot entry as if it wasn't there - pretend to move all its
- * children up to the real parent. This makes a directory look very
+ * tqchildren up to the real tqparent. This makes a directory look very
* much like the directory on disk, without the dot entry. 'current()'
* or 'operator*()' will never return the dot entry, but all of its
- * children. Subdirectories will be processed before any file children.
+ * tqchildren. Subdirectories will be processed before any file tqchildren.
*
* KDotEntryIsSubDir:
*
* Treat the dot entry just like any other subdirectory. Don't iterate
- * over its children, too (unlike KDotEntryTransparent above).
+ * over its tqchildren, too (unlike KDotEntryTransparent above).
* 'current()' or 'operator*()' will return the dot entry, but none of
- * its children (unless, of course, you create an iterator with the dot
- * entry as the parent).
+ * its tqchildren (unless, of course, you create an iterator with the dot
+ * entry as the tqparent).
*
* KDotEntryIgnore:
*
- * Ignore the dot entry and its children completely. Useful if children
+ * Ignore the dot entry and its tqchildren completely. Useful if tqchildren
* other than subdirectories are not interesting anyway. 'current()'
* or 'operator*()' will never return the dot entry nor any of its
- * children.
+ * tqchildren.
*
**/
- KFileInfoIterator( KFileInfo * parent,
+ KFileInfoIterator( KFileInfo * tqparent,
KDotEntryPolicy dotEntryPolicy = KDotEntryTransparent );
protected:
@@ -107,7 +107,7 @@ namespace KDirStat
* Alternate constructor to be called from derived classes: Those can
* choose not to call next() in the constructor.
**/
- KFileInfoIterator ( KFileInfo * parent,
+ KFileInfoIterator ( KFileInfo * tqparent,
KDotEntryPolicy dotEntryPolicy,
bool callNext );
@@ -115,7 +115,7 @@ namespace KDirStat
/**
* Internal initialization called from any constructor.
**/
- void init ( KFileInfo * parent,
+ void init ( KFileInfo * tqparent,
KDotEntryPolicy dotEntryPolicy,
bool callNext );
@@ -187,13 +187,13 @@ namespace KDirStat
/**
- * Iterator class for children of a @ref KFileInfo object. This iterator
- * returns children sorted by name: Subdirectories first, then the dot
- * entry (if desired - depending on policy), then file children (if
+ * Iterator class for tqchildren of a @ref KFileInfo object. This iterator
+ * returns tqchildren sorted by name: Subdirectories first, then the dot
+ * entry (if desired - depending on policy), then file tqchildren (if
* desired). Note: If you don't need the sorting feature, you might want to
* use @ref KFileItemIterator instead which has better performance.
*
- * @short sorted iterator for @ref KFileInfo children.
+ * @short sorted iterator for @ref KFileInfo tqchildren.
**/
class KFileInfoSortedIterator: public KFileInfoIterator
{
@@ -202,7 +202,7 @@ namespace KDirStat
* Constructor. Specify the sorting order with 'sortOrder' and 'ascending'.
* See @ref KFileInfoIterator for more details.
**/
- KFileInfoSortedIterator( KFileInfo * parent,
+ KFileInfoSortedIterator( KFileInfo * tqparent,
KDotEntryPolicy dotEntryPolicy = KDotEntryTransparent,
KFileInfoSortOrder sortOrder = KSortByName,
bool ascending = true );
@@ -248,15 +248,15 @@ namespace KDirStat
void delayedInit();
/**
- * Make a 'default order' children list:
+ * Make a 'default order' tqchildren list:
* First all subdirectories sorted by name,
* then the dot entry (depending on policy),
- * then the dot entry's children (depending on policy).
+ * then the dot entry's tqchildren (depending on policy).
**/
virtual void makeDefaultOrderChildrenList();
/**
- * Make a sorted children list according to the current sort
+ * Make a sorted tqchildren list according to the current sort
* criteria - unless KSortByName is requested, in which case
* makeDefaultOrderChildrenList() above is used.
**/
@@ -265,7 +265,7 @@ namespace KDirStat
// Data members
- KFileInfoList * _childrenList;
+ KFileInfoList * _tqchildrenList;
KFileInfoSortOrder _sortOrder;
bool _ascending;
bool _initComplete;
@@ -276,8 +276,8 @@ namespace KDirStat
/**
* Specialized KFileInfo iterator that sorts by (total) size, yet
- * disregards children below a minimum size. This can considerably improve
- * performance if the number of children that need to be sorted decreases
+ * disregards tqchildren below a minimum size. This can considerably improve
+ * performance if the number of tqchildren that need to be sorted decreases
* dramatically.
*
* For example, treemaps can only display a limited portion of large
@@ -293,7 +293,7 @@ namespace KDirStat
/**
* Constructor. Children below 'minSize' will be ignored by this iterator.
**/
- KFileInfoSortedBySizeIterator( KFileInfo * parent,
+ KFileInfoSortedBySizeIterator( KFileInfo * tqparent,
KFileSize minSize = 0,
KDotEntryPolicy dotEntryPolicy = KDotEntryTransparent,
bool ascending = false );
@@ -307,7 +307,7 @@ namespace KDirStat
protected:
/**
- * Create the (sorted) children list. Disregard children below minSize.
+ * Create the (sorted) tqchildren list. Disregard tqchildren below minSize.
* Reimplemented from KFileInfoSortedIterator.
**/
virtual void makeChildrenList();
@@ -324,7 +324,7 @@ namespace KDirStat
/**
* Internal helper class for sorting iterators.
**/
- class KFileInfoList: public QPtrList<KFileInfo>
+ class KFileInfoList: public TQPtrList<KFileInfo>
{
public:
@@ -349,14 +349,14 @@ namespace KDirStat
/**
* Comparison function. This is why this class is needed at all.
**/
- virtual int compareItems( QCollection::Item it1, QCollection::Item it2 );
+ virtual int compareItems( TQCollection::Item it1, TQCollection::Item it2 );
KFileInfoSortOrder _sortOrder;
bool _ascending;
};
- typedef QPtrListIterator<KFileInfo> KFileInfoListIterator;
+ typedef TQPtrListIterator<KFileInfo> KFileInfoListIterator;
diff --git a/kdirstat/kdirtreeview.cpp b/kdirstat/kdirtreeview.cpp
index 3283efe..68b3d74 100644
--- a/kdirstat/kdirtreeview.cpp
+++ b/kdirstat/kdirtreeview.cpp
@@ -11,10 +11,10 @@
#include <time.h>
#include <stdlib.h>
-#include <qtimer.h>
-#include <qcolor.h>
-#include <qheader.h>
-#include <qpopupmenu.h>
+#include <tqtimer.h>
+#include <tqcolor.h>
+#include <tqheader.h>
+#include <tqpopupmenu.h>
#include <kapp.h>
#include <klocale.h>
@@ -33,8 +33,8 @@
using namespace KDirStat;
-KDirTreeView::KDirTreeView( QWidget * parent )
- : KDirTreeViewParentClass( parent )
+KDirTreeView::KDirTreeView( TQWidget * tqparent )
+ : KDirTreeViewParentClass( tqparent )
{
_tree = 0;
_updateTimer = 0;
@@ -102,7 +102,7 @@ KDirTreeView::KDirTreeView( QWidget * parent )
_charDevIcon = loadIcon( "chardevice" );
_fifoIcon = loadIcon( "socket" );
_stopIcon = loadIcon( "stop" );
- _readyIcon = QPixmap();
+ _readyIcon = TQPixmap();
#undef loadIcon
@@ -111,19 +111,19 @@ KDirTreeView::KDirTreeView( QWidget * parent )
ensureContrast();
- connect( kapp, SIGNAL( kdisplayPaletteChanged() ),
- this, SLOT ( paletteChanged() ) );
+ connect( kapp, TQT_SIGNAL( kdisplayPaletteChanged() ),
+ this, TQT_SLOT ( paletteChanged() ) );
- connect( this, SIGNAL( selectionChanged ( QListViewItem * ) ),
- this, SLOT ( selectItem ( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( selectionChanged ( TQListViewItem * ) ),
+ this, TQT_SLOT ( selectItem ( TQListViewItem * ) ) );
- connect( this, SIGNAL( rightButtonPressed ( QListViewItem *, const QPoint &, int ) ),
- this, SLOT ( popupContextMenu ( QListViewItem *, const QPoint &, int ) ) );
+ connect( this, TQT_SIGNAL( rightButtonPressed ( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT ( popupContextMenu ( TQListViewItem *, const TQPoint &, int ) ) );
- connect( header(), SIGNAL( sizeChange ( int, int, int ) ),
- this, SLOT ( columnResized( int, int, int ) ) );
+ connect( header(), TQT_SIGNAL( sizeChange ( int, int, int ) ),
+ this, TQT_SLOT ( columnResized( int, int, int ) ) );
- _contextInfo = new QPopupMenu;
+ _contextInfo = new TQPopupMenu;
_idContextInfo = _contextInfo->insertItem ( "dummy" );
}
@@ -134,14 +134,14 @@ KDirTreeView::~KDirTreeView()
delete _tree;
/*
- * Don't delete _updateTimer here, it's already automatically deleted by Qt!
- * (Since it's derived from QObject and has a QObject parent).
+ * Don't delete _updateTimer here, it's already automatically deleted by TQt!
+ * (Since it's derived from TQObject and has a TQObject tqparent).
*/
}
void
-KDirTreeView::setDebugFunc( int i, const QString & functionName )
+KDirTreeView::setDebugFunc( int i, const TQString & functionName )
{
if ( i > 0 && i < DEBUG_COUNTERS )
_debugFunc[i] = functionName;
@@ -187,8 +187,8 @@ KDirTreeView::idleDisplay()
// now that everything is read, the items are still in that sort order.
// Not only is that sort order now useless (since all read jobs are
// done), it is contrary to the (now changed) semantics of this
- // column. Calling QListView::sort() might do the trick, but we can
- // never know just how clever that QListView widget tries to be and
+ // column. Calling TQListView::sort() might do the trick, but we can
+ // never know just how clever that TQListView widget tries to be and
// maybe avoid another sorting by the same column - so let's use the
// easy way out and sort by another column that has the same sorting
// semantics like the percentage bar column (that had doubled as the
@@ -221,32 +221,32 @@ KDirTreeView::openURL( KURL url )
// Connect signals
- connect( _tree, SIGNAL( progressInfo ( const QString & ) ),
- this, SLOT ( sendProgressInfo( const QString & ) ) );
+ connect( _tree, TQT_SIGNAL( progressInfo ( const TQString & ) ),
+ this, TQT_SLOT ( sendProgressInfo( const TQString & ) ) );
- connect( _tree, SIGNAL( childAdded( KFileInfo * ) ),
- this, SLOT ( addChild ( KFileInfo * ) ) );
+ connect( _tree, TQT_SIGNAL( childAdded( KFileInfo * ) ),
+ this, TQT_SLOT ( addChild ( KFileInfo * ) ) );
- connect( _tree, SIGNAL( deletingChild( KFileInfo * ) ),
- this, SLOT ( deleteChild ( KFileInfo * ) ) );
+ connect( _tree, TQT_SIGNAL( deletingChild( KFileInfo * ) ),
+ this, TQT_SLOT ( deleteChild ( KFileInfo * ) ) );
- connect( _tree, SIGNAL( startingReading() ),
- this, SLOT ( prepareReading() ) );
+ connect( _tree, TQT_SIGNAL( startingReading() ),
+ this, TQT_SLOT ( prepareReading() ) );
- connect( _tree, SIGNAL( finished() ),
- this, SLOT ( slotFinished() ) );
+ connect( _tree, TQT_SIGNAL( finished() ),
+ this, TQT_SLOT ( slotFinished() ) );
- connect( _tree, SIGNAL( aborted() ),
- this, SLOT ( slotAborted() ) );
+ connect( _tree, TQT_SIGNAL( aborted() ),
+ this, TQT_SLOT ( slotAborted() ) );
- connect( _tree, SIGNAL( finalizeLocal( KDirInfo * ) ),
- this, SLOT ( finalizeLocal( KDirInfo * ) ) );
+ connect( _tree, TQT_SIGNAL( finalizeLocal( KDirInfo * ) ),
+ this, TQT_SLOT ( finalizeLocal( KDirInfo * ) ) );
- connect( this, SIGNAL( selectionChanged( KFileInfo * ) ),
- _tree, SLOT ( selectItem ( KFileInfo * ) ) );
+ connect( this, TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
+ _tree, TQT_SLOT ( selectItem ( KFileInfo * ) ) );
- connect( _tree, SIGNAL( selectionChanged( KFileInfo * ) ),
- this, SLOT ( selectItem ( KFileInfo * ) ) );
+ connect( _tree, TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
+ this, TQT_SLOT ( selectItem ( KFileInfo * ) ) );
// Implicitly calling prepareReading() via the tree's startingReading() signal
_tree->startReading( url );
@@ -264,16 +264,16 @@ KDirTreeView::prepareReading()
if ( _updateTimer )
delete _updateTimer;
- _updateTimer = new QTimer( this );
+ _updateTimer = new TQTimer( this );
if ( _updateTimer )
{
_updateTimer->changeInterval( _updateInterval );
- connect( _updateTimer, SIGNAL( timeout() ),
- this, SLOT ( updateSummary() ) );
+ connect( _updateTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT ( updateSummary() ) );
- connect( _updateTimer, SIGNAL( timeout() ),
- this, SLOT ( sendProgressInfo() ) );
+ connect( _updateTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT ( sendProgressInfo() ) );
}
@@ -337,9 +337,9 @@ KDirTreeView::clear()
void
KDirTreeView::addChild( KFileInfo *newChild )
{
- if ( newChild->parent() )
+ if ( newChild->tqparent() )
{
- KDirTreeViewItem *cloneParent = locate( newChild->parent(),
+ KDirTreeViewItem *cloneParent = locate( newChild->tqparent(),
_doLazyClone, // lazy
true ); // doClone
@@ -355,12 +355,12 @@ KDirTreeView::addChild( KFileInfo *newChild )
{
if ( ! _doLazyClone )
{
- kdError() << k_funcinfo << "Can't find parent view item for "
+ kdError() << k_funcinfo << "Can't find tqparent view item for "
<< newChild << endl;
}
}
}
- else // No parent - top level item
+ else // No tqparent - top level item
{
// kdDebug() << "Immediately top level cloning " << newChild << endl;
new KDirTreeViewItem( this, newChild );
@@ -383,7 +383,7 @@ KDirTreeView::deleteChild( KFileInfo *child )
/**
* The selected item is about to be deleted. Select some other item
* so there is still something selected: Preferably the next item
- * or the parent if there is no next. This cannot be done from
+ * or the tqparent if there is no next. This cannot be done from
* outside because the order of items is not known to the outside;
* it might appear very random if the next item in the KFileInfo
* list would be selected. The order of that list is definitely
@@ -397,17 +397,17 @@ KDirTreeView::deleteChild( KFileInfo *child )
* next item so he can clean up many items in a row.
**/
- nextSelection = clone->next() ? clone->next() : clone->parent();
+ nextSelection = clone->next() ? clone->next() : clone->tqparent();
// kdDebug() << k_funcinfo << " Next selection: " << nextSelection << endl;
}
- KDirTreeViewItem *parent = clone->parent();
+ KDirTreeViewItem *tqparent = clone->tqparent();
delete clone;
- while ( parent )
+ while ( tqparent )
{
- parent->updateSummary();
- parent = parent->parent();
+ tqparent->updateSummary();
+ tqparent = tqparent->tqparent();
}
if ( nextSelection )
@@ -433,7 +433,7 @@ void
KDirTreeView::slotFinished()
{
emit progressInfo( i18n( "Finished. Elapsed time: %1" )
- .arg( formatTime( _stopWatch.elapsed(), true ) ) );
+ .tqarg( formatTime( _stopWatch.elapsed(), true ) ) );
if ( _updateTimer )
{
@@ -463,7 +463,7 @@ void
KDirTreeView::slotAborted()
{
emit progressInfo( i18n( "Aborted. Elapsed time: %1" )
- .arg( formatTime( _stopWatch.elapsed(), true ) ) );
+ .tqarg( formatTime( _stopWatch.elapsed(), true ) ) );
if ( _updateTimer )
{
@@ -493,30 +493,21 @@ KDirTreeView::finalizeLocal( KDirInfo *dir )
void
-KDirTreeView::sendProgressInfo( const QString & newCurrentDir )
+KDirTreeView::sendProgressInfo( const TQString & newCurrentDir )
{
_currentDir = newCurrentDir;
#if VERBOSE_PROGRESS_INFO
emit progressInfo( i18n( "Elapsed time: %1 reading directory %2" )
- .arg( formatTime( _stopWatch.elapsed() ) )
- .arg( _currentDir ) );
+ .tqarg( formatTime( _stopWatch.elapsed() ) )
+ .tqarg( _currentDir ) );
#else
emit progressInfo( i18n( "Elapsed time: %1" )
- .arg( formatTime( _stopWatch.elapsed() ) ) );
+ .tqarg( formatTime( _stopWatch.elapsed() ) ) );
#endif
}
-#if QT_VERSION < 300
-void
-KDirTreeView::sendProgressInfo()
-{
- sendProgressInfo( _currentDir );
-}
-#endif
-
-
KDirTreeViewItem *
KDirTreeView::locate( KFileInfo *wanted, bool lazy, bool doClone )
{
@@ -554,7 +545,7 @@ KDirTreeView::openCount()
void
-KDirTreeView::selectItem( QListViewItem *listViewItem )
+KDirTreeView::selectItem( TQListViewItem *listViewItem )
{
_selection = dynamic_cast<KDirTreeViewItem *>( listViewItem );
@@ -610,7 +601,7 @@ KDirTreeView::clearSelection()
{
// kdDebug() << k_funcinfo << endl;
_selection = 0;
- QListView::clearSelection();
+ TQListView::clearSelection();
emit selectionChanged( (KDirTreeViewItem *) 0 );
emit selectionChanged( (KFileInfo *) 0 );
@@ -630,7 +621,7 @@ KDirTreeView::closeAllExcept( KDirTreeViewItem *except )
}
-const QColor &
+const TQColor &
KDirTreeView::fillColor( int level ) const
{
if ( level < 0 )
@@ -643,7 +634,7 @@ KDirTreeView::fillColor( int level ) const
}
-const QColor &
+const TQColor &
KDirTreeView::rawFillColor( int level ) const
{
if ( level < 0 || level > KDirTreeViewMaxFillColor )
@@ -658,7 +649,7 @@ KDirTreeView::rawFillColor( int level ) const
void
KDirTreeView::setFillColor( int level,
- const QColor & color )
+ const TQColor & color )
{
if ( level >= 0 && level < KDirTreeViewMaxFillColor )
_fillColor[ level ] = color;
@@ -698,29 +689,29 @@ KDirTreeView::setDefaultFillColors()
i = 0;
_usedFillColors = 4;
- setFillColor ( i++, QColor ( 0, 0, 255 ) );
- setFillColor ( i++, QColor ( 128, 0, 128 ) );
- setFillColor ( i++, QColor ( 231, 147, 43 ) );
- setFillColor ( i++, QColor ( 4, 113, 0 ) );
- setFillColor ( i++, QColor ( 176, 0, 0 ) );
- setFillColor ( i++, QColor ( 204, 187, 0 ) );
- setFillColor ( i++, QColor ( 162, 98, 30 ) );
- setFillColor ( i++, QColor ( 0, 148, 146 ) );
- setFillColor ( i++, QColor ( 217, 94, 0 ) );
- setFillColor ( i++, QColor ( 0, 194, 65 ) );
- setFillColor ( i++, QColor ( 194, 108, 187 ) );
- setFillColor ( i++, QColor ( 0, 179, 255 ) );
+ setFillColor ( i++, TQColor ( 0, 0, 255 ) );
+ setFillColor ( i++, TQColor ( 128, 0, 128 ) );
+ setFillColor ( i++, TQColor ( 231, 147, 43 ) );
+ setFillColor ( i++, TQColor ( 4, 113, 0 ) );
+ setFillColor ( i++, TQColor ( 176, 0, 0 ) );
+ setFillColor ( i++, TQColor ( 204, 187, 0 ) );
+ setFillColor ( i++, TQColor ( 162, 98, 30 ) );
+ setFillColor ( i++, TQColor ( 0, 148, 146 ) );
+ setFillColor ( i++, TQColor ( 217, 94, 0 ) );
+ setFillColor ( i++, TQColor ( 0, 194, 65 ) );
+ setFillColor ( i++, TQColor ( 194, 108, 187 ) );
+ setFillColor ( i++, TQColor ( 0, 179, 255 ) );
}
void
-KDirTreeView::setTreeBackground( const QColor &color )
+KDirTreeView::setTreeBackground( const TQColor &color )
{
_treeBackground = color;
_percentageBarBackground = _treeBackground.dark( 115 );
- QPalette pal = kapp->palette();
- pal.setBrush( QColorGroup::Base, _treeBackground );
+ TQPalette pal = kapp->palette();
+ pal.setBrush( TQColorGroup::Base, _treeBackground );
setPalette( pal );
}
@@ -728,14 +719,14 @@ KDirTreeView::setTreeBackground( const QColor &color )
void
KDirTreeView::ensureContrast()
{
- if ( colorGroup().base() == white ||
- colorGroup().base() == black )
+ if ( tqcolorGroup().base() == white ||
+ tqcolorGroup().base() == black )
{
- setTreeBackground( colorGroup().midlight() );
+ setTreeBackground( tqcolorGroup().midlight() );
}
else
{
- setTreeBackground( colorGroup().base() );
+ setTreeBackground( tqcolorGroup().base() );
}
}
@@ -749,8 +740,8 @@ KDirTreeView::paletteChanged()
void
-KDirTreeView::popupContextMenu( QListViewItem * listViewItem,
- const QPoint & pos,
+KDirTreeView::popupContextMenu( TQListViewItem * listViewItem,
+ const TQPoint & pos,
int column )
{
KDirTreeViewItem *item = (KDirTreeViewItem *) listViewItem;
@@ -782,24 +773,24 @@ KDirTreeView::popupContextMenu( QListViewItem * listViewItem,
if ( orig->isSparseFile() || ( orig->links() > 1 && orig->isFile() ) )
{
- QString text;
+ TQString text;
if ( orig->isSparseFile() )
{
text = i18n( "Sparse file: %1 (%2 Bytes) -- allocated: %3 (%4 Bytes)" )
- .arg( formatSize( orig->byteSize() ) )
- .arg( formatSizeLong( orig->byteSize() ) )
- .arg( formatSize( orig->allocatedSize() ) )
- .arg( formatSizeLong( orig->allocatedSize() ) );
+ .tqarg( formatSize( orig->byteSize() ) )
+ .tqarg( formatSizeLong( orig->byteSize() ) )
+ .tqarg( formatSize( orig->allocatedSize() ) )
+ .tqarg( formatSizeLong( orig->allocatedSize() ) );
}
else
{
text = i18n( "%1 (%2 Bytes) with %3 hard links => effective size: %4 (%5 Bytes)" )
- .arg( formatSize( orig->byteSize() ) )
- .arg( formatSizeLong( orig->byteSize() ) )
- .arg( orig->links() )
- .arg( formatSize( orig->size() ) )
- .arg( formatSizeLong( orig->size() ) );
+ .tqarg( formatSize( orig->byteSize() ) )
+ .tqarg( formatSizeLong( orig->byteSize() ) )
+ .tqarg( orig->links() )
+ .tqarg( formatSize( orig->size() ) )
+ .tqarg( formatSizeLong( orig->size() ) );
}
popupContextInfo( pos, text );
@@ -829,10 +820,10 @@ KDirTreeView::popupContextMenu( QListViewItem * listViewItem,
void
-KDirTreeView::popupContextSizeInfo( const QPoint & pos,
+KDirTreeView::popupContextSizeInfo( const TQPoint & pos,
KFileSize size )
{
- QString info;
+ TQString info;
if ( size < 1024 )
{
@@ -841,8 +832,8 @@ KDirTreeView::popupContextSizeInfo( const QPoint & pos,
else
{
info = i18n( "%1 (%2 Bytes)" )
- .arg( formatSize( size ) )
- .arg( formatSizeLong( size ) );
+ .tqarg( formatSize( size ) )
+ .tqarg( formatSizeLong( size ) );
}
popupContextInfo( pos, info );
@@ -850,8 +841,8 @@ KDirTreeView::popupContextSizeInfo( const QPoint & pos,
void
-KDirTreeView::popupContextInfo( const QPoint & pos,
- const QString & info )
+KDirTreeView::popupContextInfo( const TQPoint & pos,
+ const TQString & info )
{
_contextInfo->changeItem( info, _idContextInfo );
_contextInfo->popup( pos );
@@ -878,11 +869,11 @@ KDirTreeView::readConfig()
{
// Read the rest of the 'Tree Colors' section
- QColor defaultColor( blue );
+ TQColor defaultColor( blue );
for ( int i=0; i < KDirTreeViewMaxFillColor; i++ )
{
- QString name;
+ TQString name;
name.sprintf( "fillColor_%02d", i );
_fillColor [i] = config->readColorEntry( name, &defaultColor );
}
@@ -903,7 +894,7 @@ KDirTreeView::saveConfig() const
for ( int i=0; i < KDirTreeViewMaxFillColor; i++ )
{
- QString name;
+ TQString name;
name.sprintf( "fillColor_%02d", i );
config->writeEntry ( name, _fillColor [i] );
}
@@ -914,7 +905,7 @@ void
KDirTreeView::setSorting( int column, bool increasing )
{
_sortCol = column;
- QListView::setSorting( column, increasing );
+ TQListView::setSorting( column, increasing );
}
@@ -944,9 +935,9 @@ KDirTreeView::sendMailToOwner()
return;
}
- QString owner = KAnyDirReadJob::owner( fixedUrl( _selection->orig()->url() ) );
- QString subject = i18n( "Disk Usage" );
- QString body =
+ TQString owner = KAnyDirReadJob::owner( fixedUrl( _selection->orig()->url() ) );
+ TQString subject = i18n( "Disk Usage" );
+ TQString body =
i18n("Please check your disk usage and clean up if you can. Thank you." )
+ "\n\n"
+ _selection->asciiDump()
@@ -981,29 +972,29 @@ KDirTreeView::sendMailToOwner()
KDirTreeViewItem::KDirTreeViewItem( KDirTreeView * view,
KFileInfo * orig )
- : QListViewItem( view )
+ : TQListViewItem( view )
{
init( view, 0, orig );
}
KDirTreeViewItem::KDirTreeViewItem( KDirTreeView * view,
- KDirTreeViewItem * parent,
+ KDirTreeViewItem * tqparent,
KFileInfo * orig )
- : QListViewItem( parent )
+ : TQListViewItem( tqparent )
{
- CHECK_PTR( parent );
- init( view, parent, orig );
+ CHECK_PTR( tqparent );
+ init( view, tqparent, orig );
}
void
KDirTreeViewItem::init( KDirTreeView * view,
- KDirTreeViewItem * parent,
+ KDirTreeViewItem * tqparent,
KFileInfo * orig )
{
_view = view;
- _parent = parent;
+ _parent = tqparent;
_orig = orig;
_percent = 0.0;
_pacMan = 0;
@@ -1015,30 +1006,30 @@ KDirTreeViewItem::init( KDirTreeView * view,
if ( _orig->isDotEntry() )
{
setText( view->nameCol(), i18n( "<Files>" ) );
- QListViewItem::setOpen ( false );
+ TQListViewItem::setOpen ( false );
}
else
{
- setText( view->nameCol(), QString::fromLocal8Bit(_orig->name()) );
+ setText( view->nameCol(), TQString::fromLocal8Bit(_orig->name()) );
if ( ! _orig->isDevice() )
{
- QString text;
+ TQString text;
if ( _orig->isFile() && ( _orig->links() > 1 ) ) // Regular file with multiple links
{
if ( _orig->isSparseFile() )
{
text = i18n( "%1 / %2 Links (allocated: %3)" )
- .arg( formatSize( _orig->byteSize() ) )
- .arg( formatSize( _orig->links() ) )
- .arg( formatSize( _orig->allocatedSize() ) );
+ .tqarg( formatSize( _orig->byteSize() ) )
+ .tqarg( formatSize( _orig->links() ) )
+ .tqarg( formatSize( _orig->allocatedSize() ) );
}
else
{
text = i18n( "%1 / %2 Links" )
- .arg( formatSize( _orig->byteSize() ) )
- .arg( _orig->links() );
+ .tqarg( formatSize( _orig->byteSize() ) )
+ .tqarg( _orig->links() );
}
}
else // No multiple links or no regular file
@@ -1046,8 +1037,8 @@ KDirTreeViewItem::init( KDirTreeView * view,
if ( _orig->isSparseFile() )
{
text = i18n( "%1 (allocated: %2)" )
- .arg( formatSize( _orig->byteSize() ) )
- .arg( formatSize( _orig->allocatedSize() ) );
+ .tqarg( formatSize( _orig->byteSize() ) )
+ .tqarg( formatSize( _orig->allocatedSize() ) );
}
else
{
@@ -1058,7 +1049,7 @@ KDirTreeViewItem::init( KDirTreeView * view,
setText( view->ownSizeCol(), text );
}
- QListViewItem::setOpen ( _orig->treeLevel() < _view->openLevel() );
+ TQListViewItem::setOpen ( _orig->treeLevel() < _view->openLevel() );
/*
* Don't use KDirTreeViewItem::setOpen() here since this might call
* KDirTreeViewItem::deferredClone() which would confuse bookkeeping
@@ -1073,10 +1064,10 @@ KDirTreeViewItem::init( KDirTreeView * view,
/*
* Determine whether or not this item can be opened.
*
- * Normally, Qt handles this very well, but when lazy cloning is in
- * effect, Qt cannot know whether or not there are children - they may
+ * Normally, TQt handles this very well, but when lazy cloning is in
+ * effect, TQt cannot know whether or not there are tqchildren - they may
* only be in the original tree until the user tries to open this
- * item. So let's assume there may be children as long as the directory
+ * item. So let's assume there may be tqchildren as long as the directory
* is still being read.
*/
@@ -1091,7 +1082,7 @@ KDirTreeViewItem::init( KDirTreeView * view,
}
}
- if ( ! parent || parent->isOpen() )
+ if ( ! tqparent || tqparent->isOpen() )
{
setIcon();
}
@@ -1113,7 +1104,7 @@ KDirTreeViewItem::~KDirTreeViewItem()
void
KDirTreeViewItem::setIcon()
{
- QPixmap icon;
+ TQPixmap icon;
if ( _orig->isDotEntry() )
{
@@ -1161,7 +1152,7 @@ KDirTreeViewItem::updateSummary()
if ( _orig->isDir() || _orig->isDotEntry() )
{
- QString prefix = " ";
+ TQString prefix = " ";
if ( _orig->readState() == KDirAborted )
prefix = " >";
@@ -1176,10 +1167,10 @@ KDirTreeViewItem::updateSummary()
setText( _view->readJobsCol(), " " + formatCount( _orig->pendingReadJobs(), true ) );
#else
int jobs = _orig->pendingReadJobs();
- QString text = "";
+ TQString text = "";
if ( jobs > 0 )
- text = i18n( "[%1 Read Jobs]" ).arg( formatCount( _orig->pendingReadJobs(), true ) );
+ text = i18n( "[%1 Read Jobs]" ).tqarg( formatCount( _orig->pendingReadJobs(), true ) );
setText( _view->readJobsCol(), text );
#endif
}
@@ -1193,11 +1184,11 @@ KDirTreeViewItem::updateSummary()
// Calculate and display percentage
- if ( _orig->parent() && // only if there is a parent as calculation base
- _orig->parent()->pendingReadJobs() < 1 && // not before subtree is finished reading
- _orig->parent()->totalSize() > 0 ) // avoid division by zero
+ if ( _orig->tqparent() && // only if there is a tqparent as calculation base
+ _orig->tqparent()->pendingReadJobs() < 1 && // not before subtree is finished reading
+ _orig->tqparent()->totalSize() > 0 ) // avoid division by zero
{
- _percent = ( 100.0 * _orig->totalSize() ) / (float) _orig->parent()->totalSize();
+ _percent = ( 100.0 * _orig->totalSize() ) / (float) _orig->tqparent()->totalSize();
setText( _view->percentNumCol(), formatPercent ( _percent ) );
}
else
@@ -1211,15 +1202,15 @@ KDirTreeViewItem::updateSummary()
if ( ! _pacMan )
_pacMan = new KPacManAnimation( _view, height()-4, true );
- repaint();
+ tqrepaint();
}
- if ( ! isOpen() ) // Lazy update: Nobody can see the children
+ if ( ! isOpen() ) // Lazy update: Nobody can see the tqchildren
return; // -> don't update them.
- // Update all children
+ // Update all tqchildren
KDirTreeViewItem *child = firstChild();
@@ -1240,7 +1231,7 @@ KDirTreeViewItem::locate( KFileInfo * wanted,
if ( lazy && ! isOpen() )
{
/*
- * In "lazy" mode, we don't bother searching all the children of this
+ * In "lazy" mode, we don't bother searching all the tqchildren of this
* item if they are not visible (i.e. the branch is open) anyway. In
* this case, cloning that branch is deferred until the branch is
* actually opened - which in most cases will never happen anyway (most
@@ -1252,7 +1243,7 @@ KDirTreeViewItem::locate( KFileInfo * wanted,
*
* Note that this mode is _independent_ of lazy cloning in general: The
* caller explicitly specifies if he wants to locate an item at all
- * cost, even if that means deferred cloning children whose creation
+ * cost, even if that means deferred cloning tqchildren whose creation
* has been delayed until now.
*/
@@ -1270,13 +1261,13 @@ KDirTreeViewItem::locate( KFileInfo * wanted,
if ( wanted->urlPart( level ) == _orig->name() )
{
- // Search all children
+ // Search all tqchildren
KDirTreeViewItem *child = firstChild();
if ( ! child && _orig->hasChildren() && doClone )
{
- // kdDebug() << "Deferred cloning " << this << " for children search of " << wanted << endl;
+ // kdDebug() << "Deferred cloning " << this << " for tqchildren search of " << wanted << endl;
deferredClone();
child = firstChild();
}
@@ -1303,14 +1294,14 @@ KDirTreeViewItem::deferredClone()
if ( ! _orig->hasChildren() )
{
- // kdDebug() << k_funcinfo << "Oops, no children - sorry for bothering you!" << endl;
+ // kdDebug() << k_funcinfo << "Oops, no tqchildren - sorry for bothering you!" << endl;
setExpandable( false );
return;
}
- // Clone all normal children
+ // Clone all normal tqchildren
int level = _orig->treeLevel();
bool startingClean = ! firstChild();
@@ -1376,7 +1367,7 @@ KDirTreeViewItem::cleanupDotEntries()
return;
- // Reparent dot entry children if there are no subdirectories on this level
+ // Retqparent dot entry tqchildren if there are no subdirectories on this level
if ( ! _orig->firstChild() )
{
@@ -1388,9 +1379,9 @@ KDirTreeViewItem::cleanupDotEntries()
KDirTreeViewItem *nextChild = child->next();
- // Reparent this child
+ // Retqparent this child
- // kdDebug() << "Reparenting clone " << child << endl;
+ // kdDebug() << "Retqparenting clone " << child << endl;
dotEntry->removeItem( child );
insertItem( child );
@@ -1400,9 +1391,9 @@ KDirTreeViewItem::cleanupDotEntries()
/*
* Immediately delete the (now emptied) dot entry. The algorithm for
* the original tree doesn't quite fit here - there, the dot entry is
- * actually deleted in the step below. But the 'no children' check for
+ * actually deleted in the step below. But the 'no tqchildren' check for
* this fails here since the original dot entry still _has_ its
- * children - they will be deleted only after all clones have been
+ * tqchildren - they will be deleted only after all clones have been
* processed.
*
* This had been the cause for a core that took me quite some time to
@@ -1413,7 +1404,7 @@ KDirTreeViewItem::cleanupDotEntries()
}
- // Delete dot entries without any children
+ // Delete dot entries without any tqchildren
if ( ! _orig->dotEntry()->firstChild() && dotEntry )
{
@@ -1454,7 +1445,7 @@ KDirTreeViewItem::setOpen( bool open )
openNotify( open );
}
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
setIcon();
if ( open )
@@ -1482,8 +1473,8 @@ KDirTreeViewItem::openNotify( bool open )
void
KDirTreeViewItem::openSubtree()
{
- if ( parent() )
- parent()->setOpen( true );
+ if ( tqparent() )
+ tqparent()->setOpen( true );
setOpen( true );
}
@@ -1530,10 +1521,10 @@ KDirTreeViewItem::closeAllExceptThis()
}
-QString
+TQString
KDirTreeViewItem::asciiDump()
{
- QString dump;
+ TQString dump;
dump.sprintf( "%10s %s\n",
(const char *) formatSize( _orig->totalSize() ),
@@ -1562,7 +1553,7 @@ KDirTreeViewItem::asciiDump()
* +1 if this > other
**/
int
-KDirTreeViewItem::compare( QListViewItem * otherListViewItem,
+KDirTreeViewItem::compare( TQListViewItem * otherListViewItem,
int column,
bool ascending ) const
{
@@ -1596,22 +1587,22 @@ KDirTreeViewItem::compare( QListViewItem * otherListViewItem,
}
}
- return QListViewItem::compare( otherListViewItem, column, ascending );
+ return TQListViewItem::compare( otherListViewItem, column, ascending );
}
void
-KDirTreeViewItem::paintCell( QPainter * painter,
- const QColorGroup & colorGroup,
+KDirTreeViewItem::paintCell( TQPainter * painter,
+ const TQColorGroup & tqcolorGroup,
int column,
int width,
- int alignment )
+ int tqalignment )
{
// _view->incDebugCount(5);
if ( column == _view->percentBarCol() )
{
- painter->setBackgroundColor( colorGroup.base() );
+ painter->setBackgroundColor( tqcolorGroup.base() );
if ( _percent > 0.0 )
{
@@ -1635,18 +1626,18 @@ KDirTreeViewItem::paintCell( QPainter * painter,
{
// kdDebug() << "Animating PacMan for " << _orig << endl;
// painter->setBackgroundColor( _view->treeBackground() );
- _pacMan->animate( painter, QRect( 0, 0, width, height() ) );
+ _pacMan->animate( painter, TQRect( 0, 0, width, height() ) );
}
else
{
if ( _view->percentBarCol() == _view->readJobsCol()
&& ! _pacMan )
{
- QListViewItem::paintCell( painter,
- colorGroup,
+ TQListViewItem::paintCell( painter,
+ tqcolorGroup,
column,
width,
- alignment );
+ tqalignment );
}
else
{
@@ -1658,26 +1649,26 @@ KDirTreeViewItem::paintCell( QPainter * painter,
else
{
/*
- * Call the parent's paintCell() method. We don't want to do
+ * Call the tqparent's paintCell() method. We don't want to do
* all the hassle of drawing strings and pixmaps, regarding
- * alignments etc.
+ * tqalignments etc.
*/
- QListViewItem::paintCell( painter,
- colorGroup,
+ TQListViewItem::paintCell( painter,
+ tqcolorGroup,
column,
width,
- alignment );
+ tqalignment );
}
}
void
KDirTreeViewItem::paintPercentageBar( float percent,
- QPainter * painter,
+ TQPainter * painter,
int indent,
int width,
- const QColor & fillColor,
- const QColor & barBackground )
+ const TQColor & fillColor,
+ const TQColor & barBackground )
{
int penWidth = 2;
int extraMargin = 3;
@@ -1693,7 +1684,7 @@ KDirTreeViewItem::paintPercentageBar( float percent,
if ( w > 0 )
{
- QPen pen( painter->pen() );
+ TQPen pen( painter->pen() );
pen.setWidth( 0 );
painter->setPen( pen );
painter->setBrush( NoBrush );
@@ -1708,9 +1699,9 @@ KDirTreeViewItem::paintPercentageBar( float percent,
/*
* Notice: The Xlib XDrawRectangle() function always fills one
* pixel less than specified. Altough this is very likely just a
- * plain old bug, it is documented that way. Obviously, Qt just
+ * plain old bug, it is documented that way. Obviously, TQt just
* maps the fillRect() call directly to XDrawRectangle() so they
- * inherited that bug (although the Qt doc stays silent about
+ * inherited that bug (although the TQt doc stays silent about
* it). So it is really necessary to compensate for that missing
* pixel in each dimension.
*
@@ -1727,7 +1718,7 @@ KDirTreeViewItem::paintPercentageBar( float percent,
// Draw 3D shadows.
- pen.setColor( contrastingColor ( Qt::black,
+ pen.setColor( contrastingColor ( TQt::black,
painter->backgroundColor() ) );
painter->setPen( pen );
painter->drawLine( x, y, x+w, y );
@@ -1745,7 +1736,7 @@ KDirTreeViewItem::paintPercentageBar( float percent,
painter->drawLine( x+1, y+h, x+w, y+h );
painter->drawLine( x+w, y, x+w, y+h );
- pen.setColor( contrastingColor( Qt::white,
+ pen.setColor( contrastingColor( TQt::white,
painter->backgroundColor() ) );
painter->setPen( pen );
painter->drawLine( x+2, y+h-1, x+w-1, y+h-1 );
@@ -1760,10 +1751,10 @@ KDirTreeViewItem::paintPercentageBar( float percent,
-QString
+TQString
KDirStat::formatSizeLong( KFileSize size )
{
- QString sizeText;
+ TQString sizeText;
int count = 0;
while ( size > 0 )
@@ -1782,7 +1773,7 @@ KDirStat::formatSizeLong( KFileSize size )
}
-QString
+TQString
KDirStat::hexKey( KFileSize size )
{
/**
@@ -1804,14 +1795,14 @@ KDirStat::hexKey( KFileSize size )
size >>= 4; // same as size /= 16
}
- return QString( key );
+ return TQString( key );
}
-QString
+TQString
KDirStat::formatTime( long millisec, bool showMilliSeconds )
{
- QString formattedTime;
+ TQString formattedTime;
int hours;
int min;
int sec;
@@ -1839,23 +1830,23 @@ KDirStat::formatTime( long millisec, bool showMilliSeconds )
}
-QString
+TQString
KDirStat::formatCount( int count, bool suppressZero )
{
if ( suppressZero && count == 0 )
return "";
- QString countString;
+ TQString countString;
countString.setNum( count );
return countString;
}
-QString
+TQString
KDirStat::formatPercent( float percent )
{
- QString percentString;
+ TQString percentString;
percentString.sprintf( "%.1f%%", percent );
@@ -1863,10 +1854,10 @@ KDirStat::formatPercent( float percent )
}
-QString
+TQString
KDirStat::formatTimeDate( time_t rawTime )
{
- QString timeDateString;
+ TQString timeDateString;
struct tm *t = localtime( &rawTime );
/*
@@ -1915,12 +1906,12 @@ KDirStat::formatTimeDate( time_t rawTime )
}
-QString
+TQString
KDirStat::localeTimeDate( time_t rawTime )
{
- QDateTime timeDate;
+ TQDateTime timeDate;
timeDate.setTime_t( rawTime );
- QString timeDateString =
+ TQString timeDateString =
KGlobal::locale()->formatDate( timeDate.date(), true ) + " " + // short format
KGlobal::locale()->formatTime( timeDate.time(), true ); // include seconds
@@ -1928,9 +1919,9 @@ KDirStat::localeTimeDate( time_t rawTime )
}
-QColor
-KDirStat::contrastingColor( const QColor &desiredColor,
- const QColor &contrastColor )
+TQColor
+KDirStat::contrastingColor( const TQColor &desiredColor,
+ const TQColor &contrastColor )
{
if ( desiredColor != contrastColor )
{
diff --git a/kdirstat/kdirtreeview.h b/kdirstat/kdirtreeview.h
index baeae6b..8e12113 100644
--- a/kdirstat/kdirtreeview.h
+++ b/kdirstat/kdirtreeview.h
@@ -12,11 +12,11 @@
#define KDirTreeView_h
-// Alternative parent class for KDirTreeView.
+// Alternative tqparent class for KDirTreeView.
//
// If you change this, don't forget to change the KDirTreeView class
// declaration also. Unfortunately there this 'define' can't be used -
-// it seems to confuse the 'moc' preprocessor.
+// it seems to confuse the 'tqmoc' preprocessor.
#define USE_KLISTVIEW 0
#define DEBUG_COUNTERS 10
@@ -27,17 +27,17 @@
#endif
-#include <qdatetime.h>
-#include <qlistview.h>
-#include <qpixmap.h>
+#include <tqdatetime.h>
+#include <tqlistview.h>
+#include <tqpixmap.h>
#include <klistview.h>
#include "kdirtree.h"
// Forward declarations
-class QWidget;
-class QTimer;
-class QPopupMenu;
+class TQWidget;
+class TQTimer;
+class TQPopupMenu;
class KPacManAnimation;
@@ -53,24 +53,25 @@ namespace KDirStat
#if USE_KLISTVIEW
# define KDirTreeViewParentClass KListView
#else
-# define KDirTreeViewParentClass QListView
+# define KDirTreeViewParentClass TQListView
#endif
class KDirTreeViewItem;
- class KDirTreeView: public QListView
+ class KDirTreeView: public TQListView
// Using
// class KDirTreeView: public KDirTreeViewParentClass
- // or some other 'ifdef' ... construct seems to confuse "moc".
+ // or some other 'ifdef' ... construct seems to confuse "tqmoc".
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
**/
- KDirTreeView( QWidget * parent = 0 );
+ KDirTreeView( TQWidget * tqparent = 0 );
/**
* Destructor.
@@ -91,7 +92,7 @@ namespace KDirStat
/**
* Get the first child of this view or 0 if there is none.
* Use the child's next() method to get the next child.
- * Reimplemented from @ref QListView.
+ * Reimplemented from @ref TQListView.
**/
KDirTreeViewItem * firstChild() const
{ return (KDirTreeViewItem *) KDirTreeViewParentClass::firstChild(); }
@@ -135,22 +136,22 @@ namespace KDirStat
* Return the percentage bar fill color for the specified directory
* level (0..MaxInt). Wraps around every usedFillColors() colors.
**/
- const QColor & fillColor( int level ) const;
+ const TQColor & fillColor( int level ) const;
/**
* Very much like @ref fillColor(), but doesn't wrap around at @ref
* usedFillColors(), but at KDirTreeViewMaxFillColor.
**/
- const QColor & rawFillColor( int level ) const;
+ const TQColor & rawFillColor( int level ) const;
/**
* Set the fill color of percentage bars of the specified directory
* level (0..KDirTreeViewMaxFillColor-1).
*
- * Calling repaint() after setting all desired colors is the
+ * Calling tqrepaint() after setting all desired colors is the
* caller's responsibility.
**/
- void setFillColor( int level, const QColor &color );
+ void setFillColor( int level, const TQColor &color );
/**
* Set all tree colors to default values.
@@ -171,20 +172,20 @@ namespace KDirStat
/**
* Set the tree background color.
*
- * Calling repaint() after setting all desired colors is the
+ * Calling tqrepaint() after setting all desired colors is the
* caller's responsibility.
**/
- void setTreeBackground( const QColor &color );
+ void setTreeBackground( const TQColor &color );
/**
* Returns the tree background color.
**/
- const QColor & treeBackground() const { return _treeBackground; }
+ const TQColor & treeBackground() const { return _treeBackground; }
/**
* Returns the background color for percentage bars.
**/
- const QColor & percentageBarBackground() const { return _percentageBarBackground; }
+ const TQColor & percentageBarBackground() const { return _percentageBarBackground; }
/**
* (Try to) ensure good contrast between the tree background and the
@@ -192,7 +193,7 @@ namespace KDirStat
* inevitably be the case for a white background (which unfortunately
* is very common): The percentage bars use white and black for 3D
* borders - like any other widget. But other widgets normally can
- * assume their parent widget uses some more neutral color so white and
+ * assume their tqparent widget uses some more neutral color so white and
* black will result in at least some minimal contrast.
*
* This function automagically sets a reasonable default background
@@ -208,7 +209,7 @@ namespace KDirStat
/**
* Set the sort column.
*
- * Reimplemented from QListView so we can keep track of the sort column.
+ * Reimplemented from TQListView so we can keep track of the sort column.
**/
virtual void setSorting( int column, bool increasing = TRUE );
@@ -234,26 +235,26 @@ namespace KDirStat
int readJobsCol() const { return _readJobsCol; }
int sortCol() const { return _sortCol; }
- QPixmap openDirIcon() const { return _openDirIcon; }
- QPixmap closedDirIcon() const { return _closedDirIcon; }
- QPixmap openDotEntryIcon() const { return _openDotEntryIcon; }
- QPixmap closedDotEntryIcon() const { return _closedDotEntryIcon; }
- QPixmap unreadableDirIcon() const { return _unreadableDirIcon; }
- QPixmap mountPointIcon() const { return _mountPointIcon; }
- QPixmap fileIcon() const { return _fileIcon; }
- QPixmap symLinkIcon() const { return _symLinkIcon; }
- QPixmap blockDevIcon() const { return _blockDevIcon; }
- QPixmap charDevIcon() const { return _charDevIcon; }
- QPixmap fifoIcon() const { return _fifoIcon; }
- QPixmap stopIcon() const { return _stopIcon; }
- QPixmap workingIcon() const { return _workingIcon; }
- QPixmap readyIcon() const { return _readyIcon; }
+ TQPixmap openDirIcon() const { return _openDirIcon; }
+ TQPixmap closedDirIcon() const { return _closedDirIcon; }
+ TQPixmap openDotEntryIcon() const { return _openDotEntryIcon; }
+ TQPixmap closedDotEntryIcon() const { return _closedDotEntryIcon; }
+ TQPixmap unreadableDirIcon() const { return _unreadableDirIcon; }
+ TQPixmap mountPointIcon() const { return _mountPointIcon; }
+ TQPixmap fileIcon() const { return _fileIcon; }
+ TQPixmap symLinkIcon() const { return _symLinkIcon; }
+ TQPixmap blockDevIcon() const { return _blockDevIcon; }
+ TQPixmap charDevIcon() const { return _charDevIcon; }
+ TQPixmap fifoIcon() const { return _fifoIcon; }
+ TQPixmap stopIcon() const { return _stopIcon; }
+ TQPixmap workingIcon() const { return _workingIcon; }
+ TQPixmap readyIcon() const { return _readyIcon; }
/**
* Set function name of debug function #i
**/
- void setDebugFunc( int i, const QString & functionName );
+ void setDebugFunc( int i, const TQString & functionName );
/**
* Increase debug counter #i
@@ -289,15 +290,15 @@ namespace KDirStat
void clear();
/**
- * Select a (QListViewItem) item. Triggers selectionChanged() signals.
+ * Select a (TQListViewItem) item. Triggers selectionChanged() signals.
**/
- void selectItem( QListViewItem *item );
+ void selectItem( TQListViewItem *item );
/**
* Select an item. Triggers selectionChanged() signals.
* Overloaded for convenience.
**/
- void selectItem( KDirTreeViewItem *item ) { selectItem( (QListViewItem *) item ); }
+ void selectItem( KDirTreeViewItem *item ) { selectItem( (TQListViewItem *) item ); }
/**
* Select a KDirTree item. Used for connecting the @ref
@@ -349,9 +350,9 @@ namespace KDirStat
/**
* Returns the minimum recommended size for this widget.
- * Reimplemented from QWidget.
+ * Reimplemented from TQWidget.
**/
- virtual QSize minimumSizeHint() const { return QSize( 0, 0 ); }
+ virtual TQSize tqminimumSizeHint() const { return TQSize( 0, 0 ); }
protected slots:
@@ -396,16 +397,7 @@ namespace KDirStat
* Display progress information in the status bar. Automatically adds
* the elapsed time of a directory scan.
**/
- void sendProgressInfo( const QString & currentDir = "" );
-
-
-#if QT_VERSION < 300
- /**
- * "moc" doesnt't seem to handle default arguments well, so this is an
- * overloaded slot that uses the internally stored current directory.
- **/
- void sendProgressInfo();
-#endif
+ void sendProgressInfo( const TQString & currentDir = "" );
/**
* Set up everything prior to reading: Cyclic update timer, display
@@ -430,21 +422,21 @@ namespace KDirStat
* Pop up context menu (i.e. emit the contextMenu() signal) or open a
* small info popup with exact information, depending on 'column'.
**/
- void popupContextMenu ( QListViewItem * listViewItem,
- const QPoint & pos,
+ void popupContextMenu ( TQListViewItem * listViewItem,
+ const TQPoint & pos,
int column );
/**
* Pop up info window with exact byte size.
**/
- void popupContextSizeInfo ( const QPoint & pos,
+ void popupContextSizeInfo ( const TQPoint & pos,
KFileSize size );
/**
* Pop up info window with arbitrary one-line text.
**/
- void popupContextInfo ( const QPoint & pos,
- const QString & info );
+ void popupContextInfo ( const TQPoint & pos,
+ const TQString & info );
protected slots:
@@ -463,7 +455,7 @@ namespace KDirStat
* changes - typically when a new directory is being read. Connect to a
* status bar etc. to keep the user busy.
**/
- void progressInfo( const QString &infoLine );
+ void progressInfo( const TQString &infoLine );
/**
* Emitted when reading is started.
@@ -499,11 +491,11 @@ namespace KDirStat
*
* NOTE:
*
- * This is _not_ the same as @ref QListView::rightButtonClicked():
+ * This is _not_ the same as @ref TQListView::rightButtonClicked():
* The context menu may not open on a right click on every column,
* usually only in the nameCol().
**/
- void contextMenu( KDirTreeViewItem *item, const QPoint &pos );
+ void contextMenu( KDirTreeViewItem *item, const TQPoint &pos );
/**
* Emitted at user activity. Some interactive actions are assigned an
@@ -518,11 +510,11 @@ namespace KDirStat
protected:
KDirTree * _tree;
- QTimer * _updateTimer;
- QTime _stopWatch;
- QString _currentDir;
+ TQTimer * _updateTimer;
+ TQTime _stopWatch;
+ TQString _currentDir;
KDirTreeViewItem * _selection;
- QPopupMenu * _contextInfo;
+ TQPopupMenu * _contextInfo;
int _idContextInfo;
int _openLevel;
@@ -530,9 +522,9 @@ namespace KDirStat
bool _doPacManAnimation;
int _updateInterval; // millisec
int _usedFillColors;
- QColor _fillColor [ KDirTreeViewMaxFillColor ];
- QColor _treeBackground;
- QColor _percentageBarBackground;
+ TQColor _fillColor [ KDirTreeViewMaxFillColor ];
+ TQColor _treeBackground;
+ TQColor _percentageBarBackground;
// The various columns in which to display information
@@ -552,30 +544,30 @@ namespace KDirStat
int _sortCol;
int _debugCount[ DEBUG_COUNTERS ];
- QString _debugFunc [ DEBUG_COUNTERS ];
+ TQString _debugFunc [ DEBUG_COUNTERS ];
// The various icons
- QPixmap _openDirIcon;
- QPixmap _closedDirIcon;
- QPixmap _openDotEntryIcon;
- QPixmap _closedDotEntryIcon;
- QPixmap _unreadableDirIcon;
- QPixmap _mountPointIcon;
- QPixmap _fileIcon;
- QPixmap _symLinkIcon;
- QPixmap _blockDevIcon;
- QPixmap _charDevIcon;
- QPixmap _fifoIcon;
- QPixmap _stopIcon;
- QPixmap _workingIcon;
- QPixmap _readyIcon;
+ TQPixmap _openDirIcon;
+ TQPixmap _closedDirIcon;
+ TQPixmap _openDotEntryIcon;
+ TQPixmap _closedDotEntryIcon;
+ TQPixmap _unreadableDirIcon;
+ TQPixmap _mountPointIcon;
+ TQPixmap _fileIcon;
+ TQPixmap _symLinkIcon;
+ TQPixmap _blockDevIcon;
+ TQPixmap _charDevIcon;
+ TQPixmap _fifoIcon;
+ TQPixmap _stopIcon;
+ TQPixmap _workingIcon;
+ TQPixmap _readyIcon;
};
- class KDirTreeViewItem: public QListViewItem
+ class KDirTreeViewItem: public TQListViewItem
{
public:
/**
@@ -588,7 +580,7 @@ namespace KDirStat
* Constructor for all other items.
**/
KDirTreeViewItem ( KDirTreeView * view,
- KDirTreeViewItem * parent,
+ KDirTreeViewItem * tqparent,
KFileInfo * orig );
/**
@@ -638,9 +630,9 @@ namespace KDirStat
/**
- * Returns the parent view item or 0 if this is the root.
+ * Returns the tqparent view item or 0 if this is the root.
**/
- KDirTreeViewItem * parent() { return _parent; }
+ KDirTreeViewItem * tqparent() { return _parent; }
/**
* Returns the corresponding original item of the "real" (vs. view)
@@ -651,38 +643,38 @@ namespace KDirStat
/**
* Returns the first child of this item or 0 if there is none.
* Use the child's next() method to get the next child.
- * Reimplemented from @ref QListViewItem.
+ * Reimplemented from @ref TQListViewItem.
**/
KDirTreeViewItem * firstChild() const
- { return (KDirTreeViewItem *) QListViewItem::firstChild(); }
+ { return (KDirTreeViewItem *) TQListViewItem::firstChild(); }
/**
* Returns the next sibling of this item or 0 if there is none.
- * (Kind of) reimplemented from @ref QListViewItem.
+ * (Kind of) reimplemented from @ref TQListViewItem.
**/
KDirTreeViewItem * next() const
- { return (KDirTreeViewItem *) QListViewItem::nextSibling(); }
+ { return (KDirTreeViewItem *) TQListViewItem::nextSibling(); }
/**
* Comparison function used for sorting the list.
*
* Using this function is much more efficient than overwriting
- * QListViewItem::key() which operates on QStrings.
+ * TQListViewItem::key() which operates on TQStrings.
*
* Returns:
* -1 if this < other
* 0 if this == other
* +1 if this > other
*
- * Reimplemented from QListViewItem
+ * Reimplemented from TQListViewItem
**/
- virtual int compare( QListViewItem * other,
+ virtual int compare( TQListViewItem * other,
int col,
bool ascending ) const;
/**
* Perform any necessary pending updates when a branch is opened.
- * Reimplemented from @ref QListViewItem.
+ * Reimplemented from @ref TQListViewItem.
**/
virtual void setOpen( bool open );
@@ -716,7 +708,7 @@ namespace KDirStat
* Recursively return an ASCII representation of all open items from
* here on.
**/
- QString asciiDump();
+ TQString asciiDump();
protected:
@@ -728,8 +720,8 @@ namespace KDirStat
void setIcon();
/**
- * Remove dot entry if it doesn't have any children.
- * Reparent all of the dot entry's children if there are no
+ * Remove dot entry if it doesn't have any tqchildren.
+ * Retqparent all of the dot entry's tqchildren if there are no
* subdirectories on this level.
**/
void cleanupDotEntries();
@@ -747,28 +739,28 @@ namespace KDirStat
/**
- * Paint method. Reimplemented from @ref QListViewItem so different
+ * Paint method. Reimplemented from @ref TQListViewItem so different
* colors can be used - and of course for painting percentage bars.
*
- * Reimplemented from @ref QListViewItem.
+ * Reimplemented from @ref TQListViewItem.
**/
- virtual void paintCell ( QPainter * painter,
- const QColorGroup & colorGroup,
+ virtual void paintCell ( TQPainter * painter,
+ const TQColorGroup & tqcolorGroup,
int column,
int width,
- int alignment );
+ int tqalignment );
/**
- * Paint a percentage bar into a @ref QListViewItem cell.
+ * Paint a percentage bar into a @ref TQListViewItem cell.
* 'width' is the width of the entire cell.
* 'indent' is the number of pixels to indent the bar.
**/
void paintPercentageBar ( float percent,
- QPainter * painter,
+ TQPainter * painter,
int indent,
int width,
- const QColor & fillColor,
- const QColor & barBackground );
+ const TQColor & fillColor,
+ const TQColor & barBackground );
/**
* Generic comparison function.
@@ -787,7 +779,7 @@ namespace KDirStat
* Initializations common to all constructors.
**/
void init ( KDirTreeView * view,
- KDirTreeViewItem * parent,
+ KDirTreeViewItem * tqparent,
KFileInfo * orig );
protected:
@@ -833,19 +825,19 @@ namespace KDirStat
* Format a file size with all digits, yet human readable using the current
* locale's thousand separator, i.e. 12,345,678 rather than 12345678
**/
- QString formatSizeLong( KFileSize size );
+ TQString formatSizeLong( KFileSize size );
/**
- * Format a file size for use within a QListView::key() function:
+ * Format a file size for use within a TQListView::key() function:
* Right-justify and fill with leading zeroes.
**/
- QString hexKey( KFileSize size );
+ TQString hexKey( KFileSize size );
/**
* Format a millisecond granularity time human readable.
* Milliseconds will only be inluded if 'showMilliSeconds' is true.
**/
- QString formatTime ( long millisec,
+ TQString formatTime ( long millisec,
bool showMilliSeconds = false );
/**
@@ -854,31 +846,31 @@ namespace KDirStat
* Returns an empty string if 'suppressZero' is 'true' and the value of
* 'count' is 0.
**/
- QString formatCount( int count, bool suppressZero = false );
+ TQString formatCount( int count, bool suppressZero = false );
/**
* Format percentages.
**/
- QString formatPercent( float percent );
+ TQString formatPercent( float percent );
/**
* Format time and date human-readable as "yyyy-mm-dd hh:mm:ss"
* - unlike that ctime() crap that is really useless.
* See the source for more about why this format.
**/
- QString formatTimeDate( time_t rawTime );
+ TQString formatTimeDate( time_t rawTime );
/**
* Format time and date according to the current locale for those who
* really must have that brain-dead ctime() format.
**/
- QString localeTimeDate( time_t rawTime );
+ TQString localeTimeDate( time_t rawTime );
/**
* Return a color that contrasts to 'contrastColor'.
**/
- QColor contrastingColor ( const QColor &desiredColor,
- const QColor &contrastColor );
+ TQColor contrastingColor ( const TQColor &desiredColor,
+ const TQColor &contrastColor );
} // namespace KDirStat
diff --git a/kdirstat/kfeedback.cpp b/kdirstat/kfeedback.cpp
index 9730d89..0a8a2bf 100644
--- a/kdirstat/kfeedback.cpp
+++ b/kdirstat/kfeedback.cpp
@@ -9,11 +9,11 @@
*/
-#include <qheader.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qmultilineedit.h>
-#include <qhbox.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqmultilineedit.h>
+#include <tqhbox.h>
#include <kglobal.h>
#include <kapp.h>
@@ -26,15 +26,15 @@
#include "kfeedback.h"
-KFeedbackDialog::KFeedbackDialog( const QString & feedbackMailAddress,
- const QString & helpTopic )
+KFeedbackDialog::KFeedbackDialog( const TQString & feedbackMailAddress,
+ const TQString & helpTopic )
: KDialogBase( Plain, // dialogFace
i18n( "Feedback" ), // caption
Apply | Cancel
| ( helpTopic.isEmpty() ? 0 : (int) Help ), // buttonMask
Apply ) // defaultButton
{
- QVBoxLayout * layout = new QVBoxLayout( plainPage(), 0, spacingHint() );
+ TQVBoxLayout * tqlayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
setButtonApply( KGuiItem( i18n( "&Mail this..." ) ) );
if ( ! helpTopic.isEmpty() )
@@ -43,20 +43,20 @@ KFeedbackDialog::KFeedbackDialog( const QString & feedbackMailAddress,
_form = new KFeedbackForm( feedbackMailAddress, plainPage() );
CHECK_PTR( _form );
- layout->addWidget( _form );
+ tqlayout->addWidget( _form );
checkSendButton();
- connect( this, SIGNAL( applyClicked() ),
- _form, SLOT ( sendMail() ) );
+ connect( this, TQT_SIGNAL( applyClicked() ),
+ _form, TQT_SLOT ( sendMail() ) );
- connect( _form, SIGNAL( mailSent() ),
- this, SLOT ( hide() ) );
+ connect( _form, TQT_SIGNAL( mailSent() ),
+ this, TQT_SLOT ( hide() ) );
- connect( _form, SIGNAL( mailSent() ),
- this, SIGNAL( mailSent() ) );
+ connect( _form, TQT_SIGNAL( mailSent() ),
+ this, TQT_SIGNAL( mailSent() ) );
- connect( _form, SIGNAL( checkComplete() ),
- this, SLOT ( checkSendButton() ) );
+ connect( _form, TQT_SIGNAL( checkComplete() ),
+ this, TQT_SLOT ( checkSendButton() ) );
}
@@ -76,16 +76,16 @@ KFeedbackDialog::checkSendButton()
-KFeedbackForm::KFeedbackForm( const QString & feedbackMailAddress,
- QWidget * parent )
- : QVBox( parent )
+KFeedbackForm::KFeedbackForm( const TQString & feedbackMailAddress,
+ TQWidget * tqparent )
+ : TQVBox( tqparent )
, _feedbackMailAddress( feedbackMailAddress )
{
//
// Explanation above the question list
//
- QLabel * label = new QLabel( i18n( "<p><b>Please tell us your opinion about this program.</b></p>"
+ TQLabel * label = new TQLabel( i18n( "<p><b>Please tell us your opinion about this program.</b></p>"
"<p>You will be able to review everything in your mailer "
"before any mail is sent.<br>"
"Nothing will be sent behind your back.</p>"
@@ -97,47 +97,44 @@ KFeedbackForm::KFeedbackForm( const QString & feedbackMailAddress,
_questionList = new KFeedbackQuestionList( this );
CHECK_PTR( _questionList );
- connect( _questionList, SIGNAL( checkComplete() ),
- this, SLOT ( slotCheckComplete() ) );
+ connect( _questionList, TQT_SIGNAL( checkComplete() ),
+ this, TQT_SLOT ( slotCheckComplete() ) );
//
// Explanation below the question list
//
- QHBox * hbox = new QHBox( this );
+ TQHBox * hbox = new TQHBox( this );
CHECK_PTR( hbox );
- QSizePolicy pol( QSizePolicy::Fixed, QSizePolicy::Fixed ); // hor / vert
+ TQSizePolicy pol( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); // hor / vert
- label = new QLabel( i18n( "Questions marked with " ), hbox );
+ label = new TQLabel( i18n( "Questions marked with " ), hbox );
CHECK_PTR( label );
- label->setSizePolicy( pol );
+ label->tqsetSizePolicy( pol );
- label = new QLabel( hbox );
+ label = new TQLabel( hbox );
CHECK_PTR( label );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "edit", KIcon::Small ) );
- label->setSizePolicy( pol );
+ label->tqsetSizePolicy( pol );
- label = new QLabel( i18n( " must be answered before a mail can be sent.") , hbox );
+ label = new TQLabel( i18n( " must be answered before a mail can be sent.") , hbox );
CHECK_PTR( label );
- label->setSizePolicy( pol );
+ label->tqsetSizePolicy( pol );
- new QWidget( hbox ); // Fill any leftover space to the right.
+ new TQWidget( hbox ); // Fill any leftover space to the right.
//
// Free-text comment field
//
- label = new QLabel( "\n" + i18n( "&Additional Comments:" ), this ); CHECK_PTR( label );
- _comment = new QMultiLineEdit( this ); CHECK_PTR( _comment );
+ label = new TQLabel( "\n" + i18n( "&Additional Comments:" ), this ); CHECK_PTR( label );
+ _comment = new TQMultiLineEdit( this ); CHECK_PTR( _comment );
label->setBuddy( _comment );
-#if (QT_VERSION < 300)
- _comment->setFixedVisibleLines( 5 );
-#endif
- _comment->setWordWrap( QMultiLineEdit::FixedColumnWidth );
+ _comment->setWordWrap( TQMultiLineEdit::FixedColumnWidth );
_comment->setWrapColumnOrWidth( 70 );
}
@@ -155,7 +152,7 @@ KFeedbackForm::sendMail()
// Build mail subject
//
- QString subject;
+ TQString subject;
const KAboutData * aboutData = KGlobal::instance()->aboutData();
@@ -171,7 +168,7 @@ KFeedbackForm::sendMail()
// Build mail body
//
- QString body = subject + "\n\n"
+ TQString body = subject + "\n\n"
+ formatComment()
+ _questionList->result();
@@ -210,10 +207,10 @@ KFeedbackForm::slotCheckComplete()
}
-QString
+TQString
KFeedbackForm::formatComment()
{
- QString result = _comment->text();
+ TQString result = _comment->text();
if ( ! result.isEmpty() )
{
@@ -235,8 +232,8 @@ KFeedbackForm::readyToSend()
-KFeedbackQuestionList::KFeedbackQuestionList( QWidget *parent )
- : QListView( parent )
+KFeedbackQuestionList::KFeedbackQuestionList( TQWidget *tqparent )
+ : TQListView( tqparent )
{
addColumn( "" );
header()->hide();
@@ -266,10 +263,10 @@ KFeedbackQuestionList::isComplete()
}
-QString
+TQString
KFeedbackQuestionList::result()
{
- QString res;
+ TQString res;
KFeedbackQuestion * question = firstQuestion();
while ( question )
@@ -284,8 +281,8 @@ KFeedbackQuestionList::result()
KFeedbackQuestion *
-KFeedbackQuestionList::addQuestion( const QString & text,
- const QString & id,
+KFeedbackQuestionList::addQuestion( const TQString & text,
+ const TQString & id,
bool exclusiveAnswer,
bool required )
{
@@ -299,8 +296,8 @@ KFeedbackQuestionList::addQuestion( const QString & text,
void
-KFeedbackQuestionList::addYesNoQuestion( const QString & text,
- const QString & id,
+KFeedbackQuestionList::addYesNoQuestion( const TQString & text,
+ const TQString & id,
bool required )
{
@@ -332,13 +329,13 @@ KFeedbackQuestionList::questionAdded( KFeedbackQuestion * question)
static int nextNo = 0;
-KFeedbackQuestion::KFeedbackQuestion( KFeedbackQuestionList * parent,
- const QString & text,
- const QString & id,
+KFeedbackQuestion::KFeedbackQuestion( KFeedbackQuestionList * tqparent,
+ const TQString & text,
+ const TQString & id,
bool exclusiveAnswer,
bool required,
bool open )
- : QCheckListItem( parent, text )
+ : TQCheckListItem( tqparent, text )
, _id( id )
, _exclusiveAnswer( exclusiveAnswer )
, _required( required )
@@ -351,13 +348,13 @@ KFeedbackQuestion::KFeedbackQuestion( KFeedbackQuestionList * parent,
setOpen( open );
_no = nextNo++;
- parent->questionAdded( this );
+ tqparent->questionAdded( this );
}
void
-KFeedbackQuestion::addAnswer( const QString & text,
- const QString & id )
+KFeedbackQuestion::addAnswer( const TQString & text,
+ const TQString & id )
{
new KFeedbackAnswer( this, text, id, _exclusiveAnswer );
}
@@ -380,7 +377,7 @@ KFeedbackQuestion::isAnswered()
/**
* If this question requires an exclusive answer, exactly one of them
* should be checked. We don't need to bother about more than one being
- * checked here - QListView does that for us.
+ * checked here - TQListView does that for us.
**/
KFeedbackAnswer *answer = firstAnswer();
@@ -397,10 +394,10 @@ KFeedbackQuestion::isAnswered()
}
-QString
+TQString
KFeedbackQuestion::result()
{
- QString res;
+ TQString res;
int answers = 0;
KFeedbackAnswer *answer = firstAnswer();
@@ -425,17 +422,17 @@ KFeedbackQuestion::result()
}
-QString
+TQString
KFeedbackQuestion::text()
{
- return QCheckListItem::text(0);
+ return TQCheckListItem::text(0);
}
-QString
+TQString
KFeedbackQuestion::key( int, bool ) const
{
- QString no;
+ TQString no;
no.sprintf( "%08d", _no );
return no;
@@ -454,32 +451,32 @@ KFeedbackQuestion::questionList() const
-KFeedbackAnswer::KFeedbackAnswer( KFeedbackQuestion * parent,
- const QString & text,
- const QString & id,
+KFeedbackAnswer::KFeedbackAnswer( KFeedbackQuestion * tqparent,
+ const TQString & text,
+ const TQString & id,
bool exclusive )
- : QCheckListItem( parent,
+ : TQCheckListItem( tqparent,
text,
exclusive
- ? QCheckListItem::RadioButton
- : QCheckListItem::CheckBox )
+ ? TQCheckListItem::RadioButton
+ : TQCheckListItem::CheckBox )
, _id( id )
{
_no = nextNo++;
}
-QString
+TQString
KFeedbackAnswer::text()
{
- return QCheckListItem::text(0);
+ return TQCheckListItem::text(0);
}
-QString
+TQString
KFeedbackAnswer::key( int, bool ) const
{
- QString no;
+ TQString no;
no.sprintf( "%08d", _no );
return no;
diff --git a/kdirstat/kfeedback.h b/kdirstat/kfeedback.h
index 3d1978b..289273b 100644
--- a/kdirstat/kfeedback.h
+++ b/kdirstat/kfeedback.h
@@ -15,8 +15,8 @@
#include <config.h>
#endif
-#include <qlistview.h>
-#include <qvbox.h>
+#include <tqlistview.h>
+#include <tqvbox.h>
#include <kdialogbase.h>
@@ -29,7 +29,7 @@ class KFeedbackForm;
class KFeedbackQuestionList;
class KFeedbackQuestion;
class KFeedbackAnswer;
-class QMultiLineEdit;
+class TQMultiLineEdit;
/**
@@ -39,14 +39,15 @@ class QMultiLineEdit;
class KFeedbackDialog: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
**/
- KFeedbackDialog( const QString & feedbackMailAddress,
- const QString & helpTopic = QString::null );
+ KFeedbackDialog( const TQString & feedbackMailAddress,
+ const TQString & helpTopic = TQString() );
/**
@@ -92,16 +93,17 @@ protected:
* User is asked a list of questions, the answers of which will be sent via
* mail back to a feedback mail address.
**/
-class KFeedbackForm: public QVBox
+class KFeedbackForm: public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
**/
- KFeedbackForm( const QString & feedbackMailAddress,
- QWidget * parent );
+ KFeedbackForm( const TQString & feedbackMailAddress,
+ TQWidget * tqparent );
/**
* Destructor.
@@ -168,29 +170,30 @@ protected:
/**
* Format the "personal comments" field for sending mail.
**/
- QString formatComment();
+ TQString formatComment();
- QString _feedbackMailAddress;
+ TQString _feedbackMailAddress;
KFeedbackQuestionList * _questionList;
- QMultiLineEdit * _comment;
+ TQMultiLineEdit * _comment;
};
/**
- * List of feedback questions presented in a @ref QListView widget.
+ * List of feedback questions presented in a @ref TQListView widget.
**/
-class KFeedbackQuestionList: public QListView
+class KFeedbackQuestionList: public TQListView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
**/
- KFeedbackQuestionList( QWidget *parent );
+ KFeedbackQuestionList( TQWidget *tqparent );
/**
* Destructor.
@@ -206,7 +209,7 @@ public:
/**
* The result of all answered questions in ASCII.
**/
- QString result();
+ TQString result();
/**
* Add a yes/no question to the list.
@@ -225,16 +228,16 @@ public:
* Returns a pointer to this question so you can add answers.
**/
- KFeedbackQuestion * addQuestion( const QString & text,
- const QString & id,
+ KFeedbackQuestion * addQuestion( const TQString & text,
+ const TQString & id,
bool exclusiveAnswer = true,
bool required = false );
/**
* Add a yes/no question to the list.
**/
- void addYesNoQuestion( const QString & text,
- const QString & id,
+ void addYesNoQuestion( const TQString & text,
+ const TQString & id,
bool required = false );
/**
@@ -242,7 +245,7 @@ public:
* Use @ref KFeedbackQuestion::next() to get the next one.
**/
KFeedbackQuestion * firstQuestion() const
- { return (KFeedbackQuestion *) QListView::firstChild(); }
+ { return (KFeedbackQuestion *) TQListView::firstChild(); }
/**
* Notify the list that another question has been answered.
@@ -269,14 +272,14 @@ signals:
/**
* A user feedback question to be inserted into a @ref KFeedbackQuestionList.
**/
-class KFeedbackQuestion: public QCheckListItem
+class KFeedbackQuestion: public TQCheckListItem
{
public:
/**
* Constructor.
*
- * The parent @ref KFeedbackQuestionList assumes ownership of this object,
+ * The tqparent @ref KFeedbackQuestionList assumes ownership of this object,
* so don't delete it unless you want to delete it from the question list
* as well.
*
@@ -294,9 +297,9 @@ public:
* Set 'exclusiveAnswer' to 'true' if only one of all answers may be
* checked at any one time, to 'false' if multiple answers are allowed.
**/
- KFeedbackQuestion( KFeedbackQuestionList * parent,
- const QString & text,
- const QString & id,
+ KFeedbackQuestion( KFeedbackQuestionList * tqparent,
+ const TQString & text,
+ const TQString & id,
bool exclusiveAnswer = true,
bool required = false,
bool open = true );
@@ -307,8 +310,8 @@ public:
* the mail. The answer IDs need only be unique for that question; answers
* to other questions may have the same ID.
**/
- void addAnswer( const QString & text,
- const QString & id );
+ void addAnswer( const TQString & text,
+ const TQString & id );
/**
* Returns if answering this question is required.
@@ -328,17 +331,17 @@ public:
* features_i_like="pink_elephant"
* features_i_like="studlycapslyfier"
**/
- QString result();
+ TQString result();
/**
* Return this question's ID.
**/
- QString id() { return _id; }
+ TQString id() { return _id; }
/**
* Return this question's text.
**/
- QString text();
+ TQString text();
/**
* Returns whether or not this question requires an exclusive answer.
@@ -349,40 +352,40 @@ public:
/**
* Returns the sort key.
*
- * Reimplemented from @ref QListViewItem to maintain insertion order.
+ * Reimplemented from @ref TQListViewItem to maintain insertion order.
**/
- virtual QString key( int column, bool ascending ) const;
+ virtual TQString key( int column, bool ascending ) const;
/**
* Returns the next question or 0 if there is no more.
**/
KFeedbackQuestion * nextQuestion() const
- { return (KFeedbackQuestion *) QListViewItem::nextSibling(); }
+ { return (KFeedbackQuestion *) TQListViewItem::nextSibling(); }
/**
* Returns the first possible answer to this question.
* Use @ref KFeedbackAnswer::nextAnswer() to get the next one.
**/
KFeedbackAnswer * firstAnswer() const
- { return (KFeedbackAnswer *) QListViewItem::firstChild(); }
+ { return (KFeedbackAnswer *) TQListViewItem::firstChild(); }
/**
* Returns the @ref KFeedbackQuestionList this question belongs to or 0 if
- * the parent is no @ref KFeedbackQuestionList.
+ * the tqparent is no @ref KFeedbackQuestionList.
**/
KFeedbackQuestionList * questionList() const;
protected:
- QString _id;
+ TQString _id;
bool _exclusiveAnswer;
bool _required;
int _no;
};
-class KFeedbackAnswer: public QCheckListItem
+class KFeedbackAnswer: public TQCheckListItem
{
public:
/**
@@ -391,20 +394,20 @@ public:
* 'exclusive' tells the type of answer: One of many allowed or any number
* of many.
**/
- KFeedbackAnswer( KFeedbackQuestion * parent,
- const QString & text,
- const QString & id,
+ KFeedbackAnswer( KFeedbackQuestion * tqparent,
+ const TQString & text,
+ const TQString & id,
bool exclusive = true );
/**
* Return this answer's ID.
**/
- QString id() { return _id; }
+ TQString id() { return _id; }
/**
* Return this answer's text.
**/
- QString text();
+ TQString text();
/**
* Returns whether or not this is an exclusive answer.
@@ -414,32 +417,32 @@ public:
/**
* Returns whether or not this answer is checked.
**/
- bool isChecked() { return QCheckListItem::isOn(); }
+ bool isChecked() { return TQCheckListItem::isOn(); }
/**
* Returns the next possible answer or 0 if there is no more.
**/
KFeedbackAnswer * nextAnswer() const
- { return (KFeedbackAnswer *) QListViewItem::nextSibling(); }
+ { return (KFeedbackAnswer *) TQListViewItem::nextSibling(); }
/**
* Returns the question to this answer.
**/
KFeedbackQuestion * question() const
- { return (KFeedbackQuestion *) QListViewItem::parent(); }
+ { return (KFeedbackQuestion *) TQListViewItem::tqparent(); }
/**
* Returns the sort key.
*
- * Reimplemented from @ref QListViewItem to maintain insertion order.
+ * Reimplemented from @ref TQListViewItem to maintain insertion order.
**/
- virtual QString key( int column, bool ascending ) const;
+ virtual TQString key( int column, bool ascending ) const;
/**
* On/off change.
*
- * Reimplemented from @ref QCheckListItem to monitor answering required
+ * Reimplemented from @ref TQCheckListItem to monitor answering required
* questions. This method notifies the @ref KFeedbackQuestionList whenever
* a required question is being answered.
**/
@@ -447,7 +450,7 @@ public:
protected:
- QString _id;
+ TQString _id;
bool _exclusive;
int _no;
};
diff --git a/kdirstat/kpacman.cpp b/kdirstat/kpacman.cpp
index 55a61d4..d6cf99c 100644
--- a/kdirstat/kpacman.cpp
+++ b/kdirstat/kpacman.cpp
@@ -11,21 +11,21 @@
#include <unistd.h>
#include <stdlib.h>
-#include <qtimer.h>
-#include <qpixmap.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include "kpacman.h"
-KPacManAnimation::KPacManAnimation( QWidget * widget,
+KPacManAnimation::KPacManAnimation( TQWidget * widget,
int size,
bool randomStart )
{
_widget = widget;
_size = size;
_randomStart = randomStart;
- _brush = QBrush( Qt::yellow );
+ _brush = TQBrush( TQt::yellow );
_pos = 0;
_speed = 4;
_interval = 100;
@@ -34,7 +34,7 @@ KPacManAnimation::KPacManAnimation( QWidget * widget,
_maxMouth = 70;
_mouthInc = ( _maxMouth - _minMouth ) / 3;
_mouth = _minMouth;
- _pacManRect = QRect( 0, 0, 0, 0 );
+ _pacManRect = TQRect( 0, 0, 0, 0 );
restart();
}
@@ -69,8 +69,8 @@ KPacManAnimation::restart()
void
-KPacManAnimation::animate( QPainter * painter,
- QRect rect )
+KPacManAnimation::animate( TQPainter * painter,
+ TQRect rect )
{
if ( _time.elapsed() < _interval )
return;
@@ -137,10 +137,10 @@ KPacManAnimation::animate( QPainter * painter,
// Draw PacMan (double-buffered)
- _pacManRect = QRect( 0, 0, size, size );
- QPixmap pixmap( size, size );
+ _pacManRect = TQRect( 0, 0, size, size );
+ TQPixmap pixmap( size, size );
pixmap.fill( painter->backgroundColor() );
- QPainter p( &pixmap, _widget );
+ TQPainter p( &pixmap, _widget );
p.setBrush( _brush );
if ( _goingRight )
@@ -156,14 +156,14 @@ KPacManAnimation::animate( QPainter * painter,
( 360 - 2 * _mouth ) * 16 ); // arc lenght (1/16 degrees)
}
- _pacManRect = QRect( rect.x() + _pos, // x
+ _pacManRect = TQRect( rect.x() + _pos, // x
( rect.height() - size ) / 2, // y
size, size ); // width, height
// Transfer pixmap into widget
#if 0
- QPoint offset = painter->worldMatrix().map( _pacManRect.topLeft() );
+ TQPoint offset = painter->tqworldMatrix().map( _pacManRect.topLeft() );
// kdDebug() << "bitBlt() to " << offset.x() << ", " << offset.y() << endl;
bitBlt( _widget, offset, &pixmap );
#endif
@@ -200,18 +200,18 @@ KPacManAnimation::animate( QPainter * painter,
-KPacMan::KPacMan( QWidget * parent,
+KPacMan::KPacMan( TQWidget * tqparent,
int pacManSize,
bool randomStart,
const char * widgetName )
- : QWidget( parent, widgetName )
+ : TQWidget( tqparent, widgetName )
{
_pacManSize = pacManSize;
_pacMan = new KPacManAnimation( this, _pacManSize, randomStart );
_timer = 0;
_interval = 100; // millisec
_active = false;
- _painter = new QPainter( this );
+ _painter = new TQPainter( this );
_margin = 1;
}
@@ -231,7 +231,7 @@ KPacMan::start()
{
if ( ! _timer )
{
- _timer = new QTimer( this );
+ _timer = new TQTimer( this );
}
_pacMan->restart();
@@ -240,8 +240,8 @@ KPacMan::start()
{
_active = true;
_timer->start( _interval );
- connect( _timer, SIGNAL( timeout() ),
- this, SLOT ( animate() ) );
+ connect( _timer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT ( animate() ) );
}
}
@@ -254,14 +254,14 @@ KPacMan::stop()
if ( _timer )
_timer->stop();
- repaint();
+ tqrepaint();
}
void
KPacMan::animate()
{
- repaint( false );
+ tqrepaint( false );
}
@@ -277,32 +277,32 @@ KPacMan::setInterval( int intervalMilliSec )
void
-KPacMan::paintEvent( QPaintEvent *ev )
+KPacMan::paintEvent( TQPaintEvent *ev )
{
- QWidget::paintEvent( ev );
+ TQWidget::paintEvent( ev );
if ( _active )
{
- _pacMan->animate( _painter, QRect( _margin, 0, width() - _margin, height() ) );
+ _pacMan->animate( _painter, TQRect( _margin, 0, width() - _margin, height() ) );
}
}
void
-KPacMan::mouseReleaseEvent ( QMouseEvent *ev )
+KPacMan::mouseReleaseEvent ( TQMouseEvent *ev )
{
if ( _active )
{
- if ( _pacMan->lastPacMan().contains( ev->pos() ) )
+ if ( _pacMan->lastPacMan().tqcontains( ev->pos() ) )
stop();
}
}
-QSize
-KPacMan::sizeHint() const
+TQSize
+KPacMan::tqsizeHint() const
{
- return QSize( 16 * _pacManSize, // width - admittedly somewhat random
+ return TQSize( 16 * _pacManSize, // width - admittedly somewhat random
_pacManSize + 2 * _margin ); // height
}
diff --git a/kdirstat/kpacman.h b/kdirstat/kpacman.h
index 02d4ce1..e718f10 100644
--- a/kdirstat/kpacman.h
+++ b/kdirstat/kpacman.h
@@ -15,24 +15,24 @@
#include <config.h>
#endif
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qcolor.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
+#include <tqdatetime.h>
#ifndef NOT_USED
# define NOT_USED(PARAM) ( (void) (PARAM) )
#endif
-class QTimer;
+class TQTimer;
/**
* Helper class to display a PacMan animation inside a widget.
* Note that this is not a widget itself, it needs to be placed inside a widget
* - which fact makes it suitable for use inside non-widget objects such as
- * @ref QListViewItem.
+ * @ref TQListViewItem.
*
* If you are looking for a widget that can do all that self-contained, see
* @ref KPacMan.
@@ -48,7 +48,7 @@ public:
* Create a PacMan sprite in 'widget' of 'size' pixels diameter. Start at
* a random position and move in random direction if 'randomStart' is true.
**/
- KPacManAnimation( QWidget * widget,
+ KPacManAnimation( TQWidget * widget,
int size,
bool randomStart );
@@ -70,8 +70,8 @@ public:
*
* My, what is the sex of that thing? ;-)
**/
- void animate( QPainter * painter,
- QRect rect );
+ void animate( TQPainter * painter,
+ TQRect rect );
/**
* Restart - reset to initial position and direction.
@@ -81,7 +81,7 @@ public:
/**
* Return the rectangle where the last PacMan was painted.
**/
- QRect lastPacMan() { return _pacManRect; }
+ TQRect lastPacMan() { return _pacManRect; }
/**
* Set the animation interval in milliseconds.
@@ -98,8 +98,8 @@ public:
/**
* Brush to draw PacMan's inside. Bright yellow by default.
**/
- QBrush brush() const { return _brush; }
- void setBrush( const QBrush & brush ) { _brush = brush; }
+ TQBrush brush() const { return _brush; }
+ void setBrush( const TQBrush & brush ) { _brush = brush; }
/**
* Number of degrees PacMan's mouth opens or closes for each animation.
@@ -121,10 +121,10 @@ public:
protected:
- QWidget * _widget;
- QBrush _brush;
- QTime _time;
- QRect _pacManRect;
+ TQWidget * _widget;
+ TQBrush _brush;
+ TQTime _time;
+ TQRect _pacManRect;
int _size;
bool _randomStart;
int _speed;
@@ -150,9 +150,10 @@ protected:
*
* @short PacMan widget
**/
-class KPacMan: public QWidget
+class KPacMan: public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -162,7 +163,7 @@ public:
* @param pacManSize size of the PacMan sprite
* @param randomStart random start position and direction if true
**/
- KPacMan( QWidget * parent = 0,
+ KPacMan( TQWidget * tqparent = 0,
int pacManSize = 16,
bool randomStart = false,
const char * widgetName = 0 );
@@ -179,11 +180,11 @@ public:
KPacManAnimation * pacMan() { return _pacMan; }
/**
- * Access to the internal @ref QPainter to avoid duplicating all its
+ * Access to the internal @ref TQPainter to avoid duplicating all its
* methods. Change this painter in order to change the visual appearance of
* the PacMan sprite.
**/
- QPainter * painter() { return _painter; }
+ TQPainter * painter() { return _painter; }
/**
* Returns the animation interval in milliseconds.
@@ -208,9 +209,9 @@ public:
/**
* Returns the widget's preferred size.
*
- * Reimplemented from @ref QWidget.
+ * Reimplemented from @ref TQWidget.
**/
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
public slots:
@@ -236,23 +237,23 @@ protected:
/**
* Actually do the painting.
*
- * Reimplemented from @ref QWidget.
+ * Reimplemented from @ref TQWidget.
**/
- virtual void paintEvent( QPaintEvent *ev );
+ virtual void paintEvent( TQPaintEvent *ev );
/**
* Stop animation on mouse click.
*
- * Reimplemented from @ref QWidget.
+ * Reimplemented from @ref TQWidget.
**/
- virtual void mouseReleaseEvent ( QMouseEvent *ev );
+ virtual void mouseReleaseEvent ( TQMouseEvent *ev );
protected:
KPacManAnimation * _pacMan;
- QPainter * _painter;
- QTimer * _timer;
+ TQPainter * _painter;
+ TQTimer * _timer;
int _interval; // millisec
bool _active;
int _margin;
diff --git a/kdirstat/kstdcleanup.cpp b/kdirstat/kstdcleanup.cpp
index 8626dfc..903f637 100644
--- a/kdirstat/kstdcleanup.cpp
+++ b/kdirstat/kstdcleanup.cpp
@@ -16,12 +16,12 @@ using namespace KDirStat;
KCleanup *
-KStdCleanup::openInKonqueror( KActionCollection *parent )
+KStdCleanup::openInKonqueror( KActionCollection *tqparent )
{
KCleanup *cleanup = new KCleanup( "cleanup_open_in_konqueror",
"kfmclient openURL %p",
i18n( "Open in &Konqueror" ),
- parent );
+ tqparent );
CHECK_PTR( cleanup );
cleanup->setWorksForDir ( true );
cleanup->setWorksForFile ( true );
@@ -29,38 +29,38 @@ KStdCleanup::openInKonqueror( KActionCollection *parent )
cleanup->setWorksLocalOnly ( false );
cleanup->setRefreshPolicy( KCleanup::noRefresh );
cleanup->setIcon( "konqueror.png" );
- cleanup->setShortcut( Qt::CTRL + Qt::Key_K );
+ cleanup->setShortcut( TQt::CTRL + TQt::Key_K );
return cleanup;
}
KCleanup *
-KStdCleanup::openInTerminal( KActionCollection *parent )
+KStdCleanup::openInTerminal( KActionCollection *tqparent )
{
KCleanup *cleanup = new KCleanup( "cleanup_open_in_terminal",
"konsole",
i18n( "Open in &Terminal" ),
- parent );
+ tqparent );
CHECK_PTR( cleanup );
cleanup->setWorksForDir ( true );
cleanup->setWorksForFile ( true );
cleanup->setWorksForDotEntry( true );
cleanup->setRefreshPolicy( KCleanup::noRefresh );
cleanup->setIcon( "konsole.png" );
- cleanup->setShortcut( Qt::CTRL + Qt::Key_T );
+ cleanup->setShortcut( TQt::CTRL + TQt::Key_T );
return cleanup;
}
KCleanup *
-KStdCleanup::compressSubtree( KActionCollection *parent )
+KStdCleanup::compressSubtree( KActionCollection *tqparent )
{
KCleanup *cleanup = new KCleanup( "cleanup_compress_subtree",
"cd ..; tar cjvf %n.tar.bz2 %n && rm -rf %n",
i18n( "&Compress" ),
- parent );
+ tqparent );
CHECK_PTR( cleanup );
cleanup->setWorksForDir ( true );
cleanup->setWorksForFile ( false );
@@ -73,12 +73,12 @@ KStdCleanup::compressSubtree( KActionCollection *parent )
KCleanup *
-KStdCleanup::makeClean( KActionCollection *parent )
+KStdCleanup::makeClean( KActionCollection *tqparent )
{
KCleanup *cleanup = new KCleanup( "cleanup_make_clean",
"make clean",
i18n( "&make clean" ),
- parent );
+ tqparent );
CHECK_PTR( cleanup );
cleanup->setWorksForDir ( true );
cleanup->setWorksForFile ( false );
@@ -90,12 +90,12 @@ KStdCleanup::makeClean( KActionCollection *parent )
KCleanup *
-KStdCleanup::deleteTrash( KActionCollection *parent )
+KStdCleanup::deleteTrash( KActionCollection *tqparent )
{
KCleanup *cleanup = new KCleanup( "cleanup_delete_trash",
"rm -f *.o *~ *.bak *.auto core",
i18n( "Delete T&rash Files" ),
- parent );
+ tqparent );
CHECK_PTR( cleanup );
cleanup->setWorksForDir ( true );
cleanup->setWorksForFile ( false );
@@ -108,31 +108,31 @@ KStdCleanup::deleteTrash( KActionCollection *parent )
KCleanup *
-KStdCleanup::moveToTrashBin( KActionCollection *parent )
+KStdCleanup::moveToTrashBin( KActionCollection *tqparent )
{
KCleanup *cleanup = new KCleanup( "cleanup_move_to_trash_bin",
"kfmclient move %p %t",
i18n( "Delete (to Trash &Bin)" ),
- parent );
+ tqparent );
CHECK_PTR( cleanup );
cleanup->setWorksForDir ( true );
cleanup->setWorksForFile ( true );
cleanup->setWorksForDotEntry( false );
cleanup->setRefreshPolicy( KCleanup::assumeDeleted );
cleanup->setIcon( "edittrash.png" );
- cleanup->setShortcut( Qt::CTRL + Qt::Key_X );
+ cleanup->setShortcut( TQt::CTRL + TQt::Key_X );
return cleanup;
}
KCleanup *
-KStdCleanup::hardDelete( KActionCollection *parent )
+KStdCleanup::hardDelete( KActionCollection *tqparent )
{
KCleanup *cleanup = new KCleanup( "cleanup_hard_delete",
"rm -rf %p",
i18n( "&Delete (no way to undelete!)" ),
- parent );
+ tqparent );
CHECK_PTR( cleanup );
cleanup->setWorksForDir ( true );
cleanup->setWorksForFile ( true );
@@ -140,7 +140,7 @@ KStdCleanup::hardDelete( KActionCollection *parent )
cleanup->setAskForConfirmation( true );
cleanup->setRefreshPolicy( KCleanup::assumeDeleted );
cleanup->setIcon( "editdelete.png" );
- cleanup->setShortcut( Qt::CTRL + Qt::Key_Delete );
+ cleanup->setShortcut( TQt::CTRL + TQt::Key_Delete );
return cleanup;
}
diff --git a/kdirstat/kstdcleanup.h b/kdirstat/kstdcleanup.h
index 110cd2b..a26b1a7 100644
--- a/kdirstat/kstdcleanup.h
+++ b/kdirstat/kstdcleanup.h
@@ -40,13 +40,13 @@ namespace KDirStat
class KStdCleanup
{
public:
- static KCleanup *openInKonqueror ( KActionCollection *parent = 0 );
- static KCleanup *openInTerminal ( KActionCollection *parent = 0 );
- static KCleanup *compressSubtree ( KActionCollection *parent = 0 );
- static KCleanup *makeClean ( KActionCollection *parent = 0 );
- static KCleanup *deleteTrash ( KActionCollection *parent = 0 );
- static KCleanup *moveToTrashBin ( KActionCollection *parent = 0 );
- static KCleanup *hardDelete ( KActionCollection *parent = 0 );
+ static KCleanup *openInKonqueror ( KActionCollection *tqparent = 0 );
+ static KCleanup *openInTerminal ( KActionCollection *tqparent = 0 );
+ static KCleanup *compressSubtree ( KActionCollection *tqparent = 0 );
+ static KCleanup *makeClean ( KActionCollection *tqparent = 0 );
+ static KCleanup *deleteTrash ( KActionCollection *tqparent = 0 );
+ static KCleanup *moveToTrashBin ( KActionCollection *tqparent = 0 );
+ static KCleanup *hardDelete ( KActionCollection *tqparent = 0 );
private:
/**
diff --git a/kdirstat/ktreemaptile.cpp b/kdirstat/ktreemaptile.cpp
index c55b38c..3c2d04a 100644
--- a/kdirstat/ktreemaptile.cpp
+++ b/kdirstat/ktreemaptile.cpp
@@ -14,8 +14,8 @@
#include <kapp.h>
#include <klocale.h>
#include <kglobal.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include "ktreemaptile.h"
#include "ktreemapview.h"
@@ -28,40 +28,40 @@ using std::max;
using std::min;
-KTreemapTile::KTreemapTile( KTreemapView * parentView,
- KTreemapTile * parentTile,
+KTreemapTile::KTreemapTile( KTreemapView * tqparentView,
+ KTreemapTile * tqparentTile,
KFileInfo * orig,
- const QRect & rect,
+ const TQRect & rect,
KOrientation orientation )
- : QCanvasRectangle( rect, parentView->canvas() )
- , _parentView( parentView )
- , _parentTile( parentTile )
+ : TQCanvasRectangle( rect, tqparentView->canvas() )
+ , _parentView( tqparentView )
+ , _parentTile( tqparentTile )
, _orig( orig )
{
init();
- if ( parentTile )
- _cushionSurface = parentTile->cushionSurface();
+ if ( tqparentTile )
+ _cushionSurface = tqparentTile->cushionSurface();
createChildren( rect, orientation );
}
-KTreemapTile::KTreemapTile( KTreemapView * parentView,
- KTreemapTile * parentTile,
+KTreemapTile::KTreemapTile( KTreemapView * tqparentView,
+ KTreemapTile * tqparentTile,
KFileInfo * orig,
- const QRect & rect,
+ const TQRect & rect,
const KCushionSurface & cushionSurface,
KOrientation orientation )
- : QCanvasRectangle( rect, parentView->canvas() )
- , _parentView( parentView )
- , _parentTile( parentTile )
+ : TQCanvasRectangle( rect, tqparentView->canvas() )
+ , _parentView( tqparentView )
+ , _parentTile( tqparentTile )
, _orig( orig )
, _cushionSurface( cushionSurface )
{
init();
- // Intentionally not copying the parent's cushion surface!
+ // Intentionally not copying the tqparent's cushion surface!
createChildren( rect, orientation );
}
@@ -76,25 +76,25 @@ KTreemapTile::~KTreemapTile()
void
KTreemapTile::init()
{
- // Set up height (z coordinate) - one level higher than the parent so this
+ // Set up height (z coordinate) - one level higher than the tqparent so this
// will be closer to the foreground.
//
- // Note that this must happen before any children are created.
+ // Note that this must happen before any tqchildren are created.
// I found that out the hard way. ;-)
setZ( _parentTile ? ( _parentTile->z() + 1.0 ) : 0.0 );
- setBrush( QColor( 0x60, 0x60, 0x60 ) );
- setPen( NoPen );
+ setBrush( TQColor( 0x60, 0x60, 0x60 ) );
+ setPen( Qt::NoPen );
- show(); // QCanvasItems are invisible by default!
+ show(); // TQCanvasItems are invisible by default!
// kdDebug() << "Creating treemap tile for " << orig << " " << rect << " size " << orig->totalSize() << endl;
}
void
-KTreemapTile::createChildren( const QRect & rect,
+KTreemapTile::createChildren( const TQRect & rect,
KOrientation orientation )
{
if ( _orig->totalSize() == 0 ) // Prevent division by zero
@@ -108,7 +108,7 @@ KTreemapTile::createChildren( const QRect & rect,
void
-KTreemapTile::createChildrenSimple( const QRect & rect,
+KTreemapTile::createChildrenSimple( const TQRect & rect,
KOrientation orientation )
{
@@ -140,12 +140,12 @@ KTreemapTile::createChildrenSimple( const QRect & rect,
if ( childSize >= _parentView->minTileSize() )
{
- QRect childRect;
+ TQRect childRect;
if ( dir == KTreemapHorizontal )
- childRect = QRect( rect.x() + offset, rect.y(), childSize, rect.height() );
+ childRect = TQRect( rect.x() + offset, rect.y(), childSize, rect.height() );
else
- childRect = QRect( rect.x(), rect.y() + offset, rect.width(), childSize );
+ childRect = TQRect( rect.x(), rect.y() + offset, rect.width(), childSize );
KTreemapTile * tile = new KTreemapTile( _parentView, this, *it, childRect, childDir );
CHECK_PTR( tile );
@@ -164,7 +164,7 @@ KTreemapTile::createChildrenSimple( const QRect & rect,
void
-KTreemapTile::createSquarifiedChildren( const QRect & rect )
+KTreemapTile::createSquarifiedChildren( const TQRect & rect )
{
if ( _orig->totalSize() == 0 )
{
@@ -184,18 +184,18 @@ KTreemapTile::createSquarifiedChildren( const QRect & rect )
#endif
KFileInfoSortedBySizeIterator it( _orig, minSize, KDotEntryAsSubDir );
- QRect childrenRect = rect;
+ TQRect tqchildrenRect = rect;
while ( *it )
{
- KFileInfoList row = squarify( childrenRect, scale, it );
- childrenRect = layoutRow( childrenRect, scale, row );
+ KFileInfoList row = squarify( tqchildrenRect, scale, it );
+ tqchildrenRect = tqlayoutRow( tqchildrenRect, scale, row );
}
}
KFileInfoList
-KTreemapTile::squarify( const QRect & rect,
+KTreemapTile::squarify( const TQRect & rect,
double scale,
KFileInfoSortedBySizeIterator & it )
{
@@ -260,8 +260,8 @@ KTreemapTile::squarify( const QRect & rect,
-QRect
-KTreemapTile::layoutRow( const QRect & rect,
+TQRect
+KTreemapTile::tqlayoutRow( const TQRect & rect,
double scale,
KFileInfoList & row )
{
@@ -287,7 +287,7 @@ KTreemapTile::layoutRow( const QRect & rect,
return rect;
- // Set up a cushion surface for this layout row:
+ // Set up a cushion surface for this tqlayout row:
// Add another ridge perpendicular to the row's direction
// that optically groups this row's tiles together.
@@ -312,12 +312,12 @@ KTreemapTile::layoutRow( const QRect & rect,
if ( childSize >= _parentView->minTileSize() )
{
- QRect childRect;
+ TQRect childRect;
if ( dir == KTreemapHorizontal )
- childRect = QRect( rect.x() + offset, rect.y(), childSize, secondary );
+ childRect = TQRect( rect.x() + offset, rect.y(), childSize, secondary );
else
- childRect = QRect( rect.x(), rect.y() + offset, secondary, childSize );
+ childRect = TQRect( rect.x(), rect.y() + offset, secondary, childSize );
KTreemapTile * tile = new KTreemapTile( _parentView, this, *it, childRect, rowCushionSurface );
CHECK_PTR( tile );
@@ -332,14 +332,14 @@ KTreemapTile::layoutRow( const QRect & rect,
}
- // Subtract the layouted area from the rectangle.
+ // Subtract the tqlayouted area from the rectangle.
- QRect newRect;
+ TQRect newRect;
if ( dir == KTreemapHorizontal )
- newRect = QRect( rect.x(), rect.y() + secondary, rect.width(), rect.height() - secondary );
+ newRect = TQRect( rect.x(), rect.y() + secondary, rect.width(), rect.height() - secondary );
else
- newRect = QRect( rect.x() + secondary, rect.y(), rect.width() - secondary, rect.height() );
+ newRect = TQRect( rect.x() + secondary, rect.y(), rect.width() - secondary, rect.height() );
// kdDebug() << "Left over:" << " " << newRect << " " << _orig << endl;
@@ -348,11 +348,11 @@ KTreemapTile::layoutRow( const QRect & rect,
void
-KTreemapTile::drawShape( QPainter & painter )
+KTreemapTile::drawShape( TQPainter & painter )
{
// kdDebug() << k_funcinfo << endl;
- QSize size = rect().size();
+ TQSize size = rect().size();
if ( size.height() < 1 || size.width() < 1 )
return;
@@ -362,14 +362,14 @@ KTreemapTile::drawShape( QPainter & painter )
{
if ( _orig->isDir() || _orig->isDotEntry() )
{
- QCanvasRectangle::drawShape( painter );
+ TQCanvasRectangle::drawShape( painter );
}
else
{
if ( _cushion.isNull() )
_cushion = renderCushion();
- QRect rect = QCanvasRectangle::rect();
+ TQRect rect = TQCanvasRectangle::rect();
if ( ! _cushion.isNull() )
painter.drawPixmap( rect, _cushion );
@@ -378,19 +378,19 @@ KTreemapTile::drawShape( QPainter & painter )
{
// Draw a clearly visible boundary
- painter.setPen( QPen( _parentView->cushionGridColor(), 1 ) );
+ painter.setPen( TQPen( _parentView->cushionGridColor(), 1 ) );
if ( rect.x() > 0 )
- painter.drawLine( rect.topLeft(), rect.bottomLeft() + QPoint( 0, 1 ) );
+ painter.drawLine( rect.topLeft(), rect.bottomLeft() + TQPoint( 0, 1 ) );
if ( rect.y() > 0 )
- painter.drawLine( rect.topLeft(), rect.topRight() + QPoint( 1, 0 ) );
+ painter.drawLine( rect.topLeft(), rect.topRight() + TQPoint( 1, 0 ) );
}
}
}
else // No cushion shading, use plain tiles
{
- painter.setPen( QPen( _parentView->outlineColor(), 1 ) );
+ painter.setPen( TQPen( _parentView->outlineColor(), 1 ) );
if ( _orig->isDir() || _orig->isDotEntry() )
painter.setBrush( _parentView->dirFillColor() );
@@ -402,18 +402,18 @@ KTreemapTile::drawShape( QPainter & painter )
#endif
}
- QCanvasRectangle::drawShape( painter );
+ TQCanvasRectangle::drawShape( painter );
}
}
-QPixmap
+TQPixmap
KTreemapTile::renderCushion()
{
- QRect rect = QCanvasRectangle::rect();
+ TQRect rect = TQCanvasRectangle::rect();
if ( rect.width() < 1 || rect.height() < 1 )
- return QPixmap();
+ return TQPixmap();
// kdDebug() << k_funcinfo << endl;
@@ -427,10 +427,10 @@ KTreemapTile::renderCushion()
// Cache some values. They are used for each loop iteration, so let's try
// to keep multiple indirect references down.
- int ambientLight = parentView()->ambientLight();
- double lightX = parentView()->lightX();
- double lightY = parentView()->lightY();
- double lightZ = parentView()->lightZ();
+ int ambientLight = tqparentView()->ambientLight();
+ double lightX = tqparentView()->lightX();
+ double lightY = tqparentView()->lightY();
+ double lightZ = tqparentView()->lightZ();
double xx2 = cushionSurface().xx2();
double xx1 = cushionSurface().xx1();
@@ -440,12 +440,12 @@ KTreemapTile::renderCushion()
int x0 = rect.x();
int y0 = rect.y();
- QColor color = parentView()->tileColor( _orig );
+ TQColor color = tqparentView()->tileColor( _orig );
int maxRed = max( 0, color.red() - ambientLight );
int maxGreen = max( 0, color.green() - ambientLight );
int maxBlue = max( 0, color.blue() - ambientLight );
- QImage image( rect.width(), rect.height(), 32 );
+ TQImage image( rect.width(), rect.height(), 32 );
for ( y = 0; y < rect.height(); y++ )
{
@@ -467,19 +467,19 @@ KTreemapTile::renderCushion()
green += ambientLight;
blue += ambientLight;
- image.setPixel( x, y, qRgb( red, green, blue) );
+ image.setPixel( x, y, tqRgb( red, green, blue) );
}
}
if ( _parentView->ensureContrast() )
ensureContrast( image );
- return QPixmap( image );
+ return TQPixmap( image );
}
void
-KTreemapTile::ensureContrast( QImage & image )
+KTreemapTile::ensureContrast( TQImage & image )
{
if ( image.width() > 5 )
{
@@ -507,7 +507,7 @@ KTreemapTile::ensureContrast( QImage & image )
{
// Add a line at the right boundary
- QRgb val = contrastingColor( image.pixel( x2, image.height() / 2 ) );
+ TQRgb val = contrastingColor( image.pixel( x2, image.height() / 2 ) );
for ( int y = 0; y < image.height(); y++ )
image.setPixel( x2, y, val );
@@ -534,7 +534,7 @@ KTreemapTile::ensureContrast( QImage & image )
{
// Add a grey line at the bottom boundary
- QRgb val = contrastingColor( image.pixel( image.width() / 2, y2 ) );
+ TQRgb val = contrastingColor( image.pixel( image.width() / 2, y2 ) );
for ( int x = 0; x < image.width(); x++ )
image.setPixel( x, y2, val );
@@ -543,13 +543,13 @@ KTreemapTile::ensureContrast( QImage & image )
}
-QRgb
-KTreemapTile::contrastingColor( QRgb col )
+TQRgb
+KTreemapTile::contrastingColor( TQRgb col )
{
- if ( qGray( col ) < 128 )
- return qRgb( qRed( col ) * 2, qGreen( col ) * 2, qBlue( col ) * 2 );
+ if ( tqGray( col ) < 128 )
+ return tqRgb( tqRed( col ) * 2, tqGreen( col ) * 2, tqBlue( col ) * 2 );
else
- return qRgb( qRed( col ) / 2, qGreen( col ) / 2, qBlue( col ) / 2 );
+ return tqRgb( tqRed( col ) / 2, tqGreen( col ) / 2, tqBlue( col ) / 2 );
}
@@ -566,7 +566,7 @@ KCushionSurface::KCushionSurface()
void
-KCushionSurface::addRidge( KOrientation dim, double height, const QRect & rect )
+KCushionSurface::addRidge( KOrientation dim, double height, const TQRect & rect )
{
_height = height;
diff --git a/kdirstat/ktreemaptile.h b/kdirstat/ktreemaptile.h
index 93b1ce3..d97f805 100644
--- a/kdirstat/ktreemaptile.h
+++ b/kdirstat/ktreemaptile.h
@@ -16,8 +16,8 @@
# include <config.h>
#endif
-#include <qcanvas.h>
-#include <qrect.h>
+#include <tqcanvas.h>
+#include <tqrect.h>
#include "kdirtreeiterators.h"
@@ -64,7 +64,7 @@ namespace KDirStat
* If you don't want to get all that involved: The coefficients are
* changed in some way.
**/
- void addRidge( KOrientation dim, double height, const QRect & rect );
+ void addRidge( KOrientation dim, double height, const TQRect & rect );
/**
* Set the cushion's height.
@@ -125,38 +125,38 @@ namespace KDirStat
/**
* This is the basic building block of a treemap view: One single tile of a
* treemap. If it corresponds to a leaf in the tree, it will be visible as
- * one tile (one rectangle) of the treemap. If it has children, it will be
+ * one tile (one rectangle) of the treemap. If it has tqchildren, it will be
* subdivided again.
*
* @short Basic building block of a treemap
**/
- class KTreemapTile: public QCanvasRectangle
+ class KTreemapTile: public TQCanvasRectangle
{
public:
/**
* Constructor: Create a treemap tile from 'fileinfo' that fits into a
- * rectangle 'rect' inside 'parent'.
+ * rectangle 'rect' inside 'tqparent'.
*
* 'orientation' is the direction for further subdivision. 'Auto'
* selects the wider direction inside 'rect'.
**/
- KTreemapTile( KTreemapView * parentView,
- KTreemapTile * parentTile,
+ KTreemapTile( KTreemapView * tqparentView,
+ KTreemapTile * tqparentTile,
KFileInfo * orig,
- const QRect & rect,
+ const TQRect & rect,
KOrientation orientation = KTreemapAuto );
protected:
/**
* Alternate constructor: Like the above, but explicitly specify a
- * cushion surface rather than using the parent's.
+ * cushion surface rather than using the tqparent's.
**/
- KTreemapTile( KTreemapView * parentView,
- KTreemapTile * parentTile,
+ KTreemapTile( KTreemapView * tqparentView,
+ KTreemapTile * tqparentTile,
KFileInfo * orig,
- const QRect & rect,
+ const TQRect & rect,
const KCushionSurface & cushionSurface,
KOrientation orientation = KTreemapAuto );
@@ -174,14 +174,14 @@ namespace KDirStat
KFileInfo * orig() const { return _orig; }
/**
- * Returns the parent @ref KTreemapView.
+ * Returns the tqparent @ref KTreemapView.
**/
- KTreemapView * parentView() const { return _parentView; }
+ KTreemapView * tqparentView() const { return _parentView; }
/**
- * Returns the parent @ref KTreemapTile or 0 if there is none.
+ * Returns the tqparent @ref KTreemapTile or 0 if there is none.
**/
- KTreemapTile * parentTile() const { return _parentTile; }
+ KTreemapTile * tqparentTile() const { return _parentTile; }
/**
* Returns this tile's cushion surface parameters.
@@ -192,95 +192,95 @@ namespace KDirStat
protected:
/**
- * Create children (sub-tiles) of this tile.
+ * Create tqchildren (sub-tiles) of this tile.
**/
- void createChildren ( const QRect & rect,
+ void createChildren ( const TQRect & rect,
KOrientation orientation );
/**
- * Create children (sub-tiles) using the simple treemap algorithm:
+ * Create tqchildren (sub-tiles) using the simple treemap algorithm:
* Alternate between horizontal and vertical subdivision in each
* level. Each child will get the entire height or width, respectively,
* of the specified rectangle. This algorithm is very fast, but often
* results in very thin, elongated tiles.
**/
- void createChildrenSimple( const QRect & rect,
+ void createChildrenSimple( const TQRect & rect,
KOrientation orientation );
/**
- * Create children using the "squarified treemaps" algorithm as
+ * Create tqchildren using the "squarified treemaps" algorithm as
* described by Mark Bruls, Kees Huizing, and Jarke J. van Wijk of the
* TU Eindhoven, NL.
*
* This algorithm is not quite so simple and involves more expensive
- * operations, e.g., sorting the children of each node by size first,
- * try some variations of the layout and maybe backtrack to the
+ * operations, e.g., sorting the tqchildren of each node by size first,
+ * try some variations of the tqlayout and maybe backtrack to the
* previous attempt. But it results in tiles that are much more
* square-like, i.e. have more reasonable width-to-height ratios. It is
* very much less likely to get thin, elongated tiles that are hard to
* point at and even harder to compare visually against each other.
*
* This implementation includes some improvements to that basic
- * algorithm. For example, children below a certain size are
+ * algorithm. For example, tqchildren below a certain size are
* disregarded completely since they will not get an adequate visual
* representation anyway (it would be way too small). They are
- * summarized in some kind of 'misc stuff' area in the parent treemap
- * tile - in fact, part of the parent directory's tile can be "seen
+ * summarized in some kind of 'misc stuff' area in the tqparent treemap
+ * tile - in fact, part of the tqparent directory's tile can be "seen
* through".
*
- * In short, a lot of small children that don't have any useful effect
+ * In short, a lot of small tqchildren that don't have any useful effect
* for the user in finding wasted disk space are omitted from handling
* and, most important, don't need to be sorted by size (which has a
* cost of O(n*ln(n)) in the best case, so reducing n helps a lot).
**/
- void createSquarifiedChildren( const QRect & rect );
+ void createSquarifiedChildren( const TQRect & rect );
/**
- * Squarify as many children as possible: Try to squeeze members
+ * Squarify as many tqchildren as possible: Try to squeeze members
* referred to by 'it' into 'rect' until the aspect ratio doesn't get
- * better any more. Returns a list of children that should be laid out
+ * better any more. Returns a list of tqchildren that should be laid out
* in 'rect'. Moves 'it' until there is no more improvement or 'it'
* runs out of items.
*
* 'scale' is the scaling factor between file sizes and pixels.
**/
- KFileInfoList squarify( const QRect & rect,
+ KFileInfoList squarify( const TQRect & rect,
double scale,
KFileInfoSortedBySizeIterator & it );
/**
* Lay out all members of 'row' within 'rect' along its longer side.
- * Returns the new rectangle with the layouted area subtracted.
+ * Returns the new rectangle with the tqlayouted area subtracted.
**/
- QRect layoutRow( const QRect & rect,
+ TQRect tqlayoutRow( const TQRect & rect,
double scale,
KFileInfoList & row );
/**
* Draw the tile.
*
- * Reimplemented from QCanvasRectangle.
+ * Reimplemented from TQCanvasRectangle.
**/
- virtual void drawShape( QPainter & painter );
+ virtual void drawShape( TQPainter & painter );
/**
* Render a cushion as described in "cushioned treemaps" by Jarke
* J. van Wijk and Huub van de Wetering of the TU Eindhoven, NL.
**/
- QPixmap renderCushion();
+ TQPixmap renderCushion();
/**
* Check if the contrast of the specified image is sufficient to
* visually distinguish an outline at the right and bottom borders
* and add a grey line there, if necessary.
**/
- void ensureContrast( QImage & image );
+ void ensureContrast( TQImage & image );
/**
* Returns a color that gives a reasonable contrast to 'col': Lighter
* if 'col' is dark, darker if 'col' is light.
**/
- QRgb contrastingColor( QRgb col );
+ TQRgb contrastingColor( TQRgb col );
private:
@@ -298,7 +298,7 @@ namespace KDirStat
KTreemapTile * _parentTile;
KFileInfo * _orig;
KCushionSurface _cushionSurface;
- QPixmap _cushion;
+ TQPixmap _cushion;
}; // class KTreemapTile
@@ -306,7 +306,7 @@ namespace KDirStat
-inline kdbgstream & operator<< ( kdbgstream & stream, const QRect & rect )
+inline kdbgstream & operator<< ( kdbgstream & stream, const TQRect & rect )
{
stream << "("
<< rect.width() << "x" << rect.height()
diff --git a/kdirstat/ktreemapview.cpp b/kdirstat/ktreemapview.cpp
index 2a8bf20..e719a60 100644
--- a/kdirstat/ktreemapview.cpp
+++ b/kdirstat/ktreemapview.cpp
@@ -10,8 +10,8 @@
#include <sys/stat.h>
-#include <qevent.h>
-#include <qregexp.h>
+#include <tqevent.h>
+#include <tqregexp.h>
#include <kapp.h>
#include <kconfig.h>
@@ -29,8 +29,8 @@ using namespace KDirStat;
-KTreemapView::KTreemapView( KDirTree * tree, QWidget * parent, const QSize & initialSize )
- : QCanvasView( parent )
+KTreemapView::KTreemapView( KDirTree * tree, TQWidget * tqparent, const TQSize & initialSize )
+ : TQCanvasView( tqparent )
, _tree( tree )
, _rootTile( 0 )
, _selectedTile( 0 )
@@ -68,17 +68,17 @@ KTreemapView::KTreemapView( KDirTree * tree, QWidget * parent, const QSize & ini
}
}
- connect( this, SIGNAL( selectionChanged( KFileInfo * ) ),
- tree, SLOT ( selectItem ( KFileInfo * ) ) );
+ connect( this, TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
+ tree, TQT_SLOT ( selectItem ( KFileInfo * ) ) );
- connect( tree, SIGNAL( selectionChanged( KFileInfo * ) ),
- this, SLOT ( selectTile ( KFileInfo * ) ) );
+ connect( tree, TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
+ this, TQT_SLOT ( selectTile ( KFileInfo * ) ) );
- connect( tree, SIGNAL( deletingChild ( KFileInfo * ) ),
- this, SLOT ( deleteNotify ( KFileInfo * ) ) );
+ connect( tree, TQT_SIGNAL( deletingChild ( KFileInfo * ) ),
+ this, TQT_SLOT ( deleteNotify ( KFileInfo * ) ) );
- connect( tree, SIGNAL( childDeleted() ),
- this, SLOT ( rebuildTreemap() ) );
+ connect( tree, TQT_SIGNAL( childDeleted() ),
+ this, TQT_SLOT ( rebuildTreemap() ) );
}
@@ -100,14 +100,14 @@ KTreemapView::clear()
void
-KTreemapView::deleteAllItems( QCanvas * canvas )
+KTreemapView::deleteAllItems( TQCanvas * canvas )
{
if ( ! canvas )
return;
- QCanvasItemList all = canvas->allItems();
+ TQCanvasItemList all = canvas->allItems();
- for ( QCanvasItemList::Iterator it = all.begin(); it != all.end(); ++it )
+ for ( TQCanvasItemList::Iterator it = all.begin(); it != all.end(); ++it )
delete *it;
}
@@ -129,10 +129,10 @@ KTreemapView::readConfig()
_minTileSize = config->readNumEntry ( "MinTileSize" , DefaultMinTileSize );
_highlightColor = readColorEntry( config, "HighlightColor" , red );
- _cushionGridColor = readColorEntry( config, "CushionGridColor" , QColor( 0x80, 0x80, 0x80 ) );
+ _cushionGridColor = readColorEntry( config, "CushionGridColor" , TQColor( 0x80, 0x80, 0x80 ) );
_outlineColor = readColorEntry( config, "OutlineColor" , black );
- _fileFillColor = readColorEntry( config, "FileFillColor" , QColor( 0xde, 0x8d, 0x53 ) );
- _dirFillColor = readColorEntry( config, "DirFillColor" , QColor( 0x10, 0x7d, 0xb4 ) );
+ _fileFillColor = readColorEntry( config, "FileFillColor" , TQColor( 0xde, 0x8d, 0x53 ) );
+ _dirFillColor = readColorEntry( config, "DirFillColor" , TQColor( 0x10, 0x7d, 0xb4 ) );
if ( _autoResize )
{
@@ -141,26 +141,26 @@ KTreemapView::readConfig()
}
else
{
- setHScrollBarMode( QScrollView::Auto );
- setVScrollBarMode( QScrollView::Auto );
+ setHScrollBarMode( TQScrollView::Auto );
+ setVScrollBarMode( TQScrollView::Auto );
}
}
-QColor
-KTreemapView::readColorEntry( KConfig * config, const char * entryName, QColor defaultColor )
+TQColor
+KTreemapView::readColorEntry( KConfig * config, const char * entryName, TQColor defaultColor )
{
return config->readColorEntry( entryName, &defaultColor );
}
KTreemapTile *
-KTreemapView::tileAt( QPoint pos )
+KTreemapView::tileAt( TQPoint pos )
{
KTreemapTile * tile = 0;
- QCanvasItemList coll = canvas()->collisions( pos );
- QCanvasItemList::Iterator it = coll.begin();
+ TQCanvasItemList coll = canvas()->collisions( pos );
+ TQCanvasItemList::Iterator it = coll.begin();
while ( it != coll.end() && tile == 0 )
{
@@ -173,7 +173,7 @@ KTreemapView::tileAt( QPoint pos )
void
-KTreemapView::contentsMousePressEvent( QMouseEvent * event )
+KTreemapView::contentsMousePressEvent( TQMouseEvent * event )
{
// kdDebug() << k_funcinfo << endl;
@@ -181,19 +181,19 @@ KTreemapView::contentsMousePressEvent( QMouseEvent * event )
switch ( event->button() )
{
- case LeftButton:
+ case Qt::LeftButton:
selectTile( tile );
emit userActivity( 1 );
break;
- case MidButton:
- // Select clicked tile's parent, if available
+ case Qt::MidButton:
+ // Select clicked tile's tqparent, if available
if ( _selectedTile &&
- _selectedTile->rect().contains( event->pos() ) )
+ _selectedTile->rect().tqcontains( event->pos() ) )
{
- if ( _selectedTile->parentTile() )
- tile = _selectedTile->parentTile();
+ if ( _selectedTile->tqparentTile() )
+ tile = _selectedTile->tqparentTile();
}
// Intentionally handling the middle button like the left button if
@@ -208,12 +208,12 @@ KTreemapView::contentsMousePressEvent( QMouseEvent * event )
emit userActivity( 1 );
break;
- case RightButton:
+ case Qt::RightButton:
if ( tile )
{
if ( _selectedTile &&
- _selectedTile->rect().contains( event->pos() ) )
+ _selectedTile->rect().tqcontains( event->pos() ) )
{
// If a directory (non-leaf tile) is already selected,
// don't override this by
@@ -239,7 +239,7 @@ KTreemapView::contentsMousePressEvent( QMouseEvent * event )
void
-KTreemapView::contentsMouseDoubleClickEvent( QMouseEvent * event )
+KTreemapView::contentsMouseDoubleClickEvent( TQMouseEvent * event )
{
// kdDebug() << k_funcinfo << endl;
@@ -247,7 +247,7 @@ KTreemapView::contentsMouseDoubleClickEvent( QMouseEvent * event )
switch ( event->button() )
{
- case LeftButton:
+ case Qt::LeftButton:
if ( tile )
{
selectTile( tile );
@@ -256,12 +256,12 @@ KTreemapView::contentsMouseDoubleClickEvent( QMouseEvent * event )
}
break;
- case MidButton:
+ case Qt::MidButton:
zoomOut();
emit userActivity( 5 );
break;
- case RightButton:
+ case Qt::RightButton:
// Double-clicking the right mouse button is pretty useless - the
// first click opens the context menu: Single clicks are always
// delivered first. Even if that would be caught by using timers,
@@ -285,10 +285,10 @@ KTreemapView::zoomIn()
KTreemapTile * newRootTile = _selectedTile;
- while ( newRootTile->parentTile() != _rootTile &&
- newRootTile->parentTile() ) // This should never happen, but who knows?
+ while ( newRootTile->tqparentTile() != _rootTile &&
+ newRootTile->tqparentTile() ) // This should never happen, but who knows?
{
- newRootTile = newRootTile->parentTile();
+ newRootTile = newRootTile->tqparentTile();
}
if ( newRootTile )
@@ -308,8 +308,8 @@ KTreemapView::zoomOut()
{
KFileInfo * root = _rootTile->orig();
- if ( root->parent() )
- root = root->parent();
+ if ( root->tqparent() )
+ root = root->tqparent();
rebuildTreemap( root );
}
@@ -319,8 +319,8 @@ KTreemapView::zoomOut()
void
KTreemapView::selectParent()
{
- if ( _selectedTile && _selectedTile->parentTile() )
- selectTile( _selectedTile->parentTile() );
+ if ( _selectedTile && _selectedTile->tqparentTile() )
+ selectTile( _selectedTile->tqparentTile() );
}
@@ -335,10 +335,10 @@ KTreemapView::canZoomIn() const
KTreemapTile * newRootTile = _selectedTile;
- while ( newRootTile->parentTile() != _rootTile &&
- newRootTile->parentTile() ) // This should never happen, but who knows?
+ while ( newRootTile->tqparentTile() != _rootTile &&
+ newRootTile->tqparentTile() ) // This should never happen, but who knows?
{
- newRootTile = newRootTile->parentTile();
+ newRootTile = newRootTile->tqparentTile();
}
if ( newRootTile )
@@ -366,7 +366,7 @@ KTreemapView::canZoomOut() const
bool
KTreemapView::canSelectParent() const
{
- return _selectedTile && _selectedTile->parentTile();
+ return _selectedTile && _selectedTile->tqparentTile();
}
@@ -392,11 +392,11 @@ KTreemapView::rebuildTreemap()
void
KTreemapView::rebuildTreemap( KFileInfo * newRoot,
- const QSize & newSz )
+ const TQSize & newSz )
{
// kdDebug() << k_funcinfo << endl;
- QSize newSize = newSz;
+ TQSize newSize = newSz;
if ( newSz.isEmpty() )
newSize = visibleSize();
@@ -409,7 +409,7 @@ KTreemapView::rebuildTreemap( KFileInfo * newRoot,
if ( ! canvas() )
{
- QCanvas * canv = new QCanvas( this );
+ TQCanvas * canv = new TQCanvas( TQT_TQOBJECT(this) );
CHECK_PTR( canv );
setCanvas( canv );
}
@@ -427,10 +427,10 @@ KTreemapView::rebuildTreemap( KFileInfo * newRoot,
if ( newRoot )
{
- _rootTile = new KTreemapTile( this, // parentView
- 0, // parentTile
+ _rootTile = new KTreemapTile( this, // tqparentView
+ 0, // tqparentTile
newRoot, // orig
- QRect( QPoint( 0, 0), newSize ),
+ TQRect( TQPoint( 0, 0), newSize ),
KTreemapAuto );
}
@@ -488,9 +488,9 @@ KTreemapView::deleteNotify( KFileInfo * )
void
-KTreemapView::resizeEvent( QResizeEvent * event )
+KTreemapView::resizeEvent( TQResizeEvent * event )
{
- QCanvasView::resizeEvent( event );
+ TQCanvasView::resizeEvent( event );
if ( _autoResize )
{
@@ -563,8 +563,8 @@ KTreemapView::findTile( KFileInfo * node )
if ( ! node )
return 0;
- QCanvasItemList itemList = canvas()->allItems();
- QCanvasItemList::Iterator it = itemList.begin();
+ TQCanvasItemList itemList = canvas()->allItems();
+ TQCanvasItemList::Iterator it = itemList.begin();
while ( it != itemList.end() )
{
@@ -580,7 +580,7 @@ KTreemapView::findTile( KFileInfo * node )
}
-QSize
+TQSize
KTreemapView::visibleSize()
{
ScrollBarMode oldHMode = hScrollBarMode();
@@ -589,8 +589,8 @@ KTreemapView::visibleSize()
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOff );
- QSize size = QSize( QCanvasView::visibleWidth(),
- QCanvasView::visibleHeight() );
+ TQSize size = TQSize( TQCanvasView::visibleWidth(),
+ TQCanvasView::visibleHeight() );
setHScrollBarMode( oldHMode );
setVScrollBarMode( oldVMode );
@@ -599,7 +599,7 @@ KTreemapView::visibleSize()
}
-QColor
+TQColor
KTreemapView::tileColor( KFileInfo * file )
{
if ( file )
@@ -607,76 +607,76 @@ KTreemapView::tileColor( KFileInfo * file )
if ( file->isFile() )
{
// Find the filename extension: Everything after the first '.'
- QString ext = file->name().section( '.', 1 );
+ TQString ext = file->name().section( '.', 1 );
while ( ! ext.isEmpty() )
{
- QString lowerExt = ext.lower();
+ TQString lowerExt = ext.lower();
// Try case sensitive comparisions first
- if ( ext == "~" ) return Qt::red;
- if ( ext == "bak" ) return Qt::red;
-
- if ( ext == "c" ) return Qt::blue;
- if ( ext == "cpp" ) return Qt::blue;
- if ( ext == "cc" ) return Qt::blue;
- if ( ext == "h" ) return Qt::blue;
- if ( ext == "hpp" ) return Qt::blue;
- if ( ext == "el" ) return Qt::blue;
-
- if ( ext == "o" ) return QColor( 0xff, 0xa0, 0x00 );
- if ( ext == "lo" ) return QColor( 0xff, 0xa0, 0x00 );
- if ( ext == "Po" ) return QColor( 0xff, 0xa0, 0x00 );
- if ( ext == "al" ) return QColor( 0xff, 0xa0, 0x00 );
- if ( ext == "moc.cpp" ) return QColor( 0xff, 0xa0, 0x00 );
- if ( ext == "moc.cc" ) return QColor( 0xff, 0xa0, 0x00 );
- if ( ext == "elc" ) return QColor( 0xff, 0xa0, 0x00 );
- if ( ext == "la" ) return QColor( 0xff, 0xa0, 0x00 );
- if ( ext == "a" ) return QColor( 0xff, 0xa0, 0x00 );
- if ( ext == "rpm" ) return QColor( 0xff, 0xa0, 0x00 );
-
- if ( lowerExt == "tar.bz2" ) return Qt::green;
- if ( lowerExt == "tar.gz" ) return Qt::green;
- if ( lowerExt == "tgz" ) return Qt::green;
- if ( lowerExt == "bz2" ) return Qt::green;
- if ( lowerExt == "bz" ) return Qt::green;
- if ( lowerExt == "gz" ) return Qt::green;
-
- if ( lowerExt == "html" ) return Qt::blue;
- if ( lowerExt == "htm" ) return Qt::blue;
- if ( lowerExt == "txt" ) return Qt::blue;
- if ( lowerExt == "doc" ) return Qt::blue;
-
- if ( lowerExt == "png" ) return Qt::cyan;
- if ( lowerExt == "jpg" ) return Qt::cyan;
- if ( lowerExt == "jpeg" ) return Qt::cyan;
- if ( lowerExt == "gif" ) return Qt::cyan;
- if ( lowerExt == "tif" ) return Qt::cyan;
- if ( lowerExt == "tiff" ) return Qt::cyan;
- if ( lowerExt == "bmp" ) return Qt::cyan;
- if ( lowerExt == "xpm" ) return Qt::cyan;
- if ( lowerExt == "tga" ) return Qt::cyan;
-
- if ( lowerExt == "wav" ) return Qt::yellow;
- if ( lowerExt == "mp3" ) return Qt::yellow;
-
- if ( lowerExt == "avi" ) return QColor( 0xa0, 0xff, 0x00 );
- if ( lowerExt == "mov" ) return QColor( 0xa0, 0xff, 0x00 );
- if ( lowerExt == "mpg" ) return QColor( 0xa0, 0xff, 0x00 );
- if ( lowerExt == "mpeg" ) return QColor( 0xa0, 0xff, 0x00 );
-
- if ( lowerExt == "pdf" ) return Qt::blue;
- if ( lowerExt == "ps" ) return Qt::cyan;
+ if ( ext == "~" ) return TQt::red;
+ if ( ext == "bak" ) return TQt::red;
+
+ if ( ext == "c" ) return TQt::blue;
+ if ( ext == "cpp" ) return TQt::blue;
+ if ( ext == "cc" ) return TQt::blue;
+ if ( ext == "h" ) return TQt::blue;
+ if ( ext == "hpp" ) return TQt::blue;
+ if ( ext == "el" ) return TQt::blue;
+
+ if ( ext == "o" ) return TQColor( 0xff, 0xa0, 0x00 );
+ if ( ext == "lo" ) return TQColor( 0xff, 0xa0, 0x00 );
+ if ( ext == "Po" ) return TQColor( 0xff, 0xa0, 0x00 );
+ if ( ext == "al" ) return TQColor( 0xff, 0xa0, 0x00 );
+ if ( ext == "tqmoc.cpp" ) return TQColor( 0xff, 0xa0, 0x00 );
+ if ( ext == "tqmoc.cc" ) return TQColor( 0xff, 0xa0, 0x00 );
+ if ( ext == "elc" ) return TQColor( 0xff, 0xa0, 0x00 );
+ if ( ext == "la" ) return TQColor( 0xff, 0xa0, 0x00 );
+ if ( ext == "a" ) return TQColor( 0xff, 0xa0, 0x00 );
+ if ( ext == "rpm" ) return TQColor( 0xff, 0xa0, 0x00 );
+
+ if ( lowerExt == "tar.bz2" ) return TQt::green;
+ if ( lowerExt == "tar.gz" ) return TQt::green;
+ if ( lowerExt == "tgz" ) return TQt::green;
+ if ( lowerExt == "bz2" ) return TQt::green;
+ if ( lowerExt == "bz" ) return TQt::green;
+ if ( lowerExt == "gz" ) return TQt::green;
+
+ if ( lowerExt == "html" ) return TQt::blue;
+ if ( lowerExt == "htm" ) return TQt::blue;
+ if ( lowerExt == "txt" ) return TQt::blue;
+ if ( lowerExt == "doc" ) return TQt::blue;
+
+ if ( lowerExt == "png" ) return TQt::cyan;
+ if ( lowerExt == "jpg" ) return TQt::cyan;
+ if ( lowerExt == "jpeg" ) return TQt::cyan;
+ if ( lowerExt == "gif" ) return TQt::cyan;
+ if ( lowerExt == "tif" ) return TQt::cyan;
+ if ( lowerExt == "tiff" ) return TQt::cyan;
+ if ( lowerExt == "bmp" ) return TQt::cyan;
+ if ( lowerExt == "xpm" ) return TQt::cyan;
+ if ( lowerExt == "tga" ) return TQt::cyan;
+
+ if ( lowerExt == "wav" ) return TQt::yellow;
+ if ( lowerExt == "mp3" ) return TQt::yellow;
+
+ if ( lowerExt == "avi" ) return TQColor( 0xa0, 0xff, 0x00 );
+ if ( lowerExt == "mov" ) return TQColor( 0xa0, 0xff, 0x00 );
+ if ( lowerExt == "mpg" ) return TQColor( 0xa0, 0xff, 0x00 );
+ if ( lowerExt == "mpeg" ) return TQColor( 0xa0, 0xff, 0x00 );
+
+ if ( lowerExt == "pdf" ) return TQt::blue;
+ if ( lowerExt == "ps" ) return TQt::cyan;
// Some DOS/Windows types
- if ( lowerExt == "exe" ) return Qt::magenta;
- if ( lowerExt == "com" ) return Qt::magenta;
- if ( lowerExt == "dll" ) return QColor( 0xff, 0xa0, 0x00 );
- if ( lowerExt == "zip" ) return Qt::green;
- if ( lowerExt == "arj" ) return Qt::green;
+ if ( lowerExt == "exe" ) return TQt::magenta;
+ if ( lowerExt == "com" ) return TQt::magenta;
+ if ( lowerExt == "dll" ) return TQColor( 0xff, 0xa0, 0x00 );
+ if ( lowerExt == "zip" ) return TQt::green;
+ if ( lowerExt == "arj" ) return TQt::green;
// No match so far? Try the next extension. Some files might have
@@ -687,23 +687,23 @@ KTreemapView::tileColor( KFileInfo * file )
}
// Shared libs
- if ( QRegExp( "lib.*\\.so.*" ).exactMatch( file->name() ) )
- return QColor( 0xff, 0xa0, 0x00 );
+ if ( TQRegExp( "lib.*\\.so.*" ).exactMatch( file->name() ) )
+ return TQColor( 0xff, 0xa0, 0x00 );
// Very special, but common: Core dumps
- if ( file->name() == "core" ) return Qt::red;
+ if ( file->name() == "core" ) return TQt::red;
// Special case: Executables
- if ( ( file->mode() & S_IXUSR ) == S_IXUSR ) return Qt::magenta;
+ if ( ( file->mode() & S_IXUSR ) == S_IXUSR ) return TQt::magenta;
}
else // Directories
{
// TO DO
- return Qt::blue;
+ return TQt::blue;
}
}
- return Qt::white;
+ return TQt::white;
}
@@ -711,10 +711,10 @@ KTreemapView::tileColor( KFileInfo * file )
-KTreemapSelectionRect::KTreemapSelectionRect( QCanvas * canvas, const QColor & color )
- : QCanvasRectangle( canvas )
+KTreemapSelectionRect::KTreemapSelectionRect( TQCanvas * canvas, const TQColor & color )
+ : TQCanvasRectangle( canvas )
{
- setPen( QPen( color, 2 ) );
+ setPen( TQPen( color, 2 ) );
setZ( 1e10 ); // Higher than everything else
}
@@ -725,7 +725,7 @@ KTreemapSelectionRect::highlight( KTreemapTile * tile )
{
if ( tile )
{
- QRect tileRect = tile->rect();
+ TQRect tileRect = tile->rect();
move( tileRect.x(), tileRect.y() );
setSize( tileRect.width(), tileRect.height() );
diff --git a/kdirstat/ktreemapview.h b/kdirstat/ktreemapview.h
index 86edd97..5ff3188 100644
--- a/kdirstat/ktreemapview.h
+++ b/kdirstat/ktreemapview.h
@@ -11,7 +11,7 @@
#ifndef KTreemapView_h
#define KTreemapView_h
-#include <qcanvas.h>
+#include <tqcanvas.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -31,7 +31,7 @@
#define CushionHeight 1.0
-class QMouseEvent;
+class TQMouseEvent;
class KConfig;
namespace KDirStat
@@ -41,17 +41,18 @@ namespace KDirStat
class KDirTree;
class KFileInfo;
- class KTreemapView: public QCanvasView
+ class KTreemapView: public TQCanvasView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
**/
KTreemapView( KDirTree * tree,
- QWidget * parent = 0,
- const QSize & initialSize = QSize() );
+ TQWidget * tqparent = 0,
+ const TQSize & initialSize = TQSize() );
/**
* Destructor.
@@ -62,13 +63,13 @@ namespace KDirStat
* Returns the (topmost) treemap tile at the specified position
* or 0 if there is none.
**/
- KTreemapTile * tileAt( QPoint pos );
+ KTreemapTile * tileAt( TQPoint pos );
/**
* Returns the minimum recommended size for this widget.
- * Reimplemented from QWidget.
+ * Reimplemented from TQWidget.
**/
- virtual QSize minimumSizeHint() const { return QSize( 0, 0 ); }
+ virtual TQSize tqminimumSizeHint() const { return TQSize( 0, 0 ); }
/**
* Returns this treemap view's currently selected treemap tile or 0 if
@@ -100,7 +101,7 @@ namespace KDirStat
* Returns a suitable color for 'file' based on a set of internal rules
* (according to filename extension, MIME type or permissions).
**/
- QColor tileColor( KFileInfo * file );
+ TQColor tileColor( KFileInfo * file );
public slots:
@@ -127,18 +128,18 @@ namespace KDirStat
void zoomIn();
/**
- * Zoom out one level: The parent (if there is any) KFileInfo node of
+ * Zoom out one level: The tqparent (if there is any) KFileInfo node of
* the current treemap root becomes the new root. This usually works
* only after zoomIn().
**/
void zoomOut();
/**
- * Select the parent of the currently selected tile (if possible).
+ * Select the tqparent of the currently selected tile (if possible).
*
* This is very much the same as clicking with the middle mouse button,
* but not quite: The middle mouse button cycles back to the tile
- * clicked at if there is no more parent. This method does not (because
+ * clicked at if there is no more tqparent. This method does not (because
* there is no known mouse position).
**/
void selectParent();
@@ -155,11 +156,11 @@ namespace KDirStat
void clear();
/**
- * Delete all items of a QCanvas.
+ * Delete all items of a TQCanvas.
*
- * Strangely enough, QCanvas itself does not provide such a function.
+ * Strangely enough, TQCanvas itself does not provide such a function.
**/
- static void deleteAllItems( QCanvas * canvas );
+ static void deleteAllItems( TQCanvas * canvas );
/**
* Notification that a dir tree node has been deleted.
@@ -178,14 +179,14 @@ namespace KDirStat
* size. If 'newSize' is (0, 0), visibleSize() is used.
**/
void rebuildTreemap( KFileInfo * newRoot,
- const QSize & newSize = QSize() );
+ const TQSize & newSize = TQSize() );
/**
* Returns the visible size of the viewport presuming no scrollbars are
* needed - which makes a lot more sense than fiddling with scrollbars
* since treemaps can be scaled to make scrollbars unnecessary.
**/
- QSize visibleSize();
+ TQSize visibleSize();
/**
* Returns the visible width of the viewport presuming no scrollbars
@@ -220,7 +221,7 @@ namespace KDirStat
bool canZoomOut() const;
/**
- * Returns true if it is possible to select the parent of the currently
+ * Returns true if it is possible to select the tqparent of the currently
* selected tile, false if not.
**/
bool canSelectParent() const;
@@ -263,24 +264,24 @@ namespace KDirStat
/**
* Returns the cushion grid color.
**/
- const QColor & cushionGridColor() const { return _cushionGridColor; }
+ const TQColor & cushionGridColor() const { return _cushionGridColor; }
/**
* Returns the outline color to use if cushion shading is not used.
**/
- const QColor & outlineColor() const { return _outlineColor; }
+ const TQColor & outlineColor() const { return _outlineColor; }
/**
* Returns the fill color for non-directory treemap tiles when cushion
* shading is not used.
**/
- const QColor & fileFillColor() const { return _fileFillColor; }
+ const TQColor & fileFillColor() const { return _fileFillColor; }
/**
* Returns the fill color for directory (or "dotentry") treemap tiles
* when cushion shading is not used.
**/
- const QColor & dirFillColor() const { return _dirFillColor; }
+ const TQColor & dirFillColor() const { return _dirFillColor; }
/**
* Returns the intensity of ambient light for cushion shading
@@ -333,7 +334,7 @@ namespace KDirStat
* (usually on right click). 'pos' contains the click's mouse
* coordinates.
**/
- void contextMenu( KTreemapTile * tile, const QPoint & pos );
+ void contextMenu( KTreemapTile * tile, const TQPoint & pos );
/**
* Emitted at user activity. Some interactive actions are assigned an
@@ -350,7 +351,7 @@ namespace KDirStat
/**
* Catch mouse click - emits a selectionChanged() signal.
**/
- virtual void contentsMousePressEvent( QMouseEvent * event );
+ virtual void contentsMousePressEvent( TQMouseEvent * event );
/**
* Catch mouse double click:
@@ -358,23 +359,23 @@ namespace KDirStat
* right button double-click zooms out,
* middle button double-click rebuilds treemap.
**/
- virtual void contentsMouseDoubleClickEvent( QMouseEvent * event );
+ virtual void contentsMouseDoubleClickEvent( TQMouseEvent * event );
/**
* Resize the treemap view. Suppress the treemap contents if the size
* falls below a minimum size, redisplay it if it grows above that
* minimum size.
*
- * Reimplemented from QFrame.
+ * Reimplemented from TQFrame.
**/
- virtual void resizeEvent( QResizeEvent * event );
+ virtual void resizeEvent( TQResizeEvent * event );
/**
* Convenience method to read a color from 'config'.
**/
- QColor readColorEntry( KConfig * config,
+ TQColor readColorEntry( KConfig * config,
const char * entryName,
- QColor defaultColor );
+ TQColor defaultColor );
// Data members
@@ -382,7 +383,7 @@ namespace KDirStat
KTreemapTile * _rootTile;
KTreemapTile * _selectedTile;
KTreemapSelectionRect * _selectionRect;
- QString _savedRootUrl;
+ TQString _savedRootUrl;
bool _autoResize;
bool _squarify;
@@ -391,11 +392,11 @@ namespace KDirStat
bool _ensureContrast;
int _minTileSize;
- QColor _highlightColor;
- QColor _cushionGridColor;
- QColor _outlineColor;
- QColor _fileFillColor;
- QColor _dirFillColor;
+ TQColor _highlightColor;
+ TQColor _cushionGridColor;
+ TQColor _outlineColor;
+ TQColor _fileFillColor;
+ TQColor _dirFillColor;
int _ambientLight;
@@ -418,14 +419,14 @@ namespace KDirStat
* on top (i.e., great z-height) of everything else. The rectangle is
* transparent, so the treemap tile contents remain visible.
**/
- class KTreemapSelectionRect: public QCanvasRectangle
+ class KTreemapSelectionRect: public TQCanvasRectangle
{
public:
/**
* Constructor.
**/
- KTreemapSelectionRect( QCanvas * canvas, const QColor & color );
+ KTreemapSelectionRect( TQCanvas * canvas, const TQColor & color );
/**
* Highlight the specified treemap tile: Resize this selection