Browse Source

TQt4 port kdirstat

This enables compilation under both Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdirstat@1239296 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
tags/v3.5.13
tpearson 8 years ago
parent
commit
e8d62395de
29 changed files with 1505 additions and 1506 deletions
  1. +3
    -3
      kdirstat/kactivitytracker.cpp
  2. +6
    -5
      kdirstat/kactivitytracker.h
  3. +35
    -35
      kdirstat/kcleanup.cpp
  4. +25
    -24
      kdirstat/kcleanup.h
  5. +20
    -20
      kdirstat/kcleanupcollection.cpp
  6. +9
    -8
      kdirstat/kcleanupcollection.h
  7. +5
    -5
      kdirstat/kdirsaver.cpp
  8. +6
    -6
      kdirstat/kdirsaver.h
  9. +84
    -84
      kdirstat/kdirstatapp.cpp
  10. +12
    -11
      kdirstat/kdirstatapp.h
  11. +2
    -2
      kdirstat/kdirstatfeedback.cpp
  12. +182
    -182
      kdirstat/kdirstatsettings.cpp
  13. +74
    -66
      kdirstat/kdirstatsettings.h
  14. +106
    -106
      kdirstat/kdirtree.cpp
  15. +69
    -67
      kdirstat/kdirtree.h
  16. +37
    -37
      kdirstat/kdirtreeiterators.cpp
  17. +32
    -32
      kdirstat/kdirtreeiterators.h
  18. +200
    -209
      kdirstat/kdirtreeview.cpp
  19. +110
    -118
      kdirstat/kdirtreeview.h
  20. +71
    -74
      kdirstat/kfeedback.cpp
  21. +52
    -49
      kdirstat/kfeedback.h
  22. +28
    -28
      kdirstat/kpacman.cpp
  23. +29
    -28
      kdirstat/kpacman.h
  24. +18
    -18
      kdirstat/kstdcleanup.cpp
  25. +7
    -7
      kdirstat/kstdcleanup.h
  26. +71
    -71
      kdirstat/ktreemaptile.cpp
  27. +41
    -41
      kdirstat/ktreemaptile.h
  28. +133
    -133
      kdirstat/ktreemapview.cpp
  29. +38
    -37
      kdirstat/ktreemapview.h

+ 3
- 3
kdirstat/kactivitytracker.cpp View File

@@ -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;

+ 6
- 5
kdirstat/kactivitytracker.h View File

@@ -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

+ 35
- 35
kdirstat/kcleanup.cpp View File

@@ -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;
}


+ 25
- 24
kdirstat/kcleanup.h View File

@@ -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;

+ 20
- 20
kdirstat/kcleanupcollection.cpp View File

@@ -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 ];
}

+ 9
- 8
kdirstat/kcleanupcollection.h View File

@@ -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 ); }
/**

+ 5
- 5
kdirstat/kdirsaver.cpp View File

@@ -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();
}



+ 6
- 6
kdirstat/kdirsaver.h View File

@@ -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

+ 84
- 84
kdirstat/kdirstatapp.cpp View File

@@ -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();
}


+ 12
- 11
kdirstat/kdirstatapp.h View File

@@ -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;

+ 2
- 2
kdirstat/kdirstatfeedback.cpp View File

@@ -24,8 +24,8 @@ KDirStatApp::sendFeedbackMail()
_feedbackDialog = new KFeedbackDialog( "sh@suse.de", "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();


+ 182
- 182
kdirstat/kdirstatsettings.cpp View File

@@ -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
}

+ 74
- 66
kdirstat/kdirstatsettings.h View File

@@ -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
**/