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-ecb5cbfe19
tpearson 7 years ago
parent
commit
e8d62395de

+ 3
- 3
kdirstat/kactivitytracker.cpp View File

@@ -15,10 +15,10 @@
15 15
 #include "kactivitytracker.h"
16 16
 
17 17
 
18
-KActivityTracker::KActivityTracker( QObject *		parent,
19
-				    const QString &	id,
18
+KActivityTracker::KActivityTracker( TQObject *		tqparent,
19
+				    const TQString &	id,
20 20
 				    long		initialThreshold )
21
-    : QObject( parent )
21
+    : TQObject( tqparent )
22 22
 {
23 23
     _id		= id;
24 24
     

+ 6
- 5
kdirstat/kactivitytracker.h View File

@@ -15,7 +15,7 @@
15 15
 #include <config.h>
16 16
 #endif
17 17
 
18
-#include <qobject.h>
18
+#include <tqobject.h>
19 19
 
20 20
 
21 21
 /**
@@ -29,9 +29,10 @@
29 29
  *
30 30
  * @short User activity tracker
31 31
  **/
32
-class KActivityTracker: public QObject
32
+class KActivityTracker: public TQObject
33 33
 {
34 34
     Q_OBJECT
35
+  TQ_OBJECT
35 36
 public:
36 37
     /**
37 38
      * Constructor. The ID is a name for the KConfig object to look in for
@@ -39,8 +40,8 @@ public:
39 40
      * the application's @ref KConfig object doesn't contain a corresponding
40 41
      * entry yet.
41 42
      **/
42
-    KActivityTracker( QObject * 	parent,
43
-		      const QString &	id,
43
+    KActivityTracker( TQObject * 	tqparent,
44
+		      const TQString &	id,
44 45
 		      long		initialThreshold );
45 46
 
46 47
     /**
@@ -100,7 +101,7 @@ protected:
100 101
     long	_sum;
101 102
     long	_threshold;
102 103
     long	_lastSignal;
103
-    QString 	_id;
104
+    TQString 	_id;
104 105
 };
105 106
 
106 107
 #endif // KActivityTracker_h

+ 35
- 35
kdirstat/kcleanup.cpp View File

@@ -9,8 +9,8 @@
9 9
 
10 10
 
11 11
 #include <stdlib.h>
12
-#include <qapplication.h>
13
-#include <qregexp.h>
12
+#include <tqapplication.h>
13
+#include <tqregexp.h>
14 14
 
15 15
 #include <kapp.h>
16 16
 #include <kprocess.h>
@@ -28,14 +28,14 @@
28 28
 using namespace KDirStat;
29 29
 
30 30
 
31
-KCleanup::KCleanup( QString		id,
32
-		    QString		command,
33
-		    QString		title,
34
-		    KActionCollection *	parent	)
31
+KCleanup::KCleanup( TQString		id,
32
+		    TQString		command,
33
+		    TQString		title,
34
+		    KActionCollection *	tqparent	)
35 35
     
36 36
     : KAction( title,
37 37
 	       0,	// accel
38
-	       parent,
38
+	       tqparent,
39 39
 	       id )
40 40
     
41 41
     , _id	( id	  )
@@ -91,7 +91,7 @@ KCleanup::copy( const KCleanup &src )
91 91
 
92 92
 
93 93
 void
94
-KCleanup::setTitle( const QString &title )
94
+KCleanup::setTitle( const TQString &title )
95 95
 {
96 96
     _title = title;
97 97
     KAction::setText( _title );
@@ -162,18 +162,18 @@ KCleanup::executeWithSelection()
162 162
 bool
163 163
 KCleanup::confirmation( KFileInfo * item )
164 164
 {
165
-    QString msg;
165
+    TQString msg;
166 166
 
167 167
     if ( item->isDir() || item->isDotEntry() )
168 168
     {
169
-	msg = i18n( "%1\nin directory %2" ).arg( cleanTitle() ).arg( item->url() );
169
+	msg = i18n( "%1\nin directory %2" ).tqarg( cleanTitle() ).tqarg( item->url() );
170 170
     }
171 171
     else
172 172
     {
173
-	msg = i18n( "%1\nfor file %2" ).arg( cleanTitle() ).arg( item->url() );
173
+	msg = i18n( "%1\nfor file %2" ).tqarg( cleanTitle() ).tqarg( item->url() );
174 174
     }
175 175
 
176
-    if ( KMessageBox::warningContinueCancel( 0,				// parentWidget
176
+    if ( KMessageBox::warningContinueCancel( 0,				// tqparentWidget
177 177
 					     msg,			// message
178 178
 					     i18n( "Please Confirm" ),	// caption
179 179
 					     i18n( "Confirm" )		// confirmButtonLabel
@@ -209,7 +209,7 @@ KCleanup::execute( KFileInfo *item )
209 209
 
210 210
 
211 211
 	    case refreshParent:
212
-		tree->refresh( item->parent() );
212
+		tree->refresh( item->tqparent() );
213 213
 		break;
214 214
 
215 215
 
@@ -252,7 +252,7 @@ KCleanup::executeRecursive( KFileInfo *item )
252 252
 		{
253 253
 		    /**
254 254
 		     * Recursively execute in this subdirectory, but only if it
255
-		     * really is a directory: File children might have been
255
+		     * really is a directory: File tqchildren might have been
256 256
 		     * reparented to the directory (normally, they reside in
257 257
 		     * the dot entry) if there are no real subdirectories on
258 258
 		     * this directory level.
@@ -271,26 +271,26 @@ KCleanup::executeRecursive( KFileInfo *item )
271 271
 }
272 272
 
273 273
 
274
-const QString
274
+const TQString
275 275
 KCleanup::itemDir( const KFileInfo *item ) const
276 276
 {
277
-    QString dir = item->url();
277
+    TQString dir = item->url();
278 278
 
279 279
     if ( ! item->isDir() && ! item->isDotEntry() )
280 280
     {
281
-	dir.replace ( QRegExp ( "/[^/]*$" ), "" );
281
+	dir.tqreplace ( TQRegExp ( "/[^/]*$" ), "" );
282 282
     }
283 283
 
284 284
     return dir;
285 285
 }
286 286
 
287 287
 
288
-QString
288
+TQString
289 289
 KCleanup::cleanTitle() const
290 290
 {
291 291
     // Use the cleanup action's title, if possible.
292 292
    
293
-    QString title = _title;
293
+    TQString title = _title;
294 294
 
295 295
     if ( title.isEmpty() )
296 296
     {
@@ -299,45 +299,45 @@ KCleanup::cleanTitle() const
299 299
 
300 300
     // Get rid of any "&" characters in the text that denote keyboard
301 301
     // shortcuts in menus.
302
-    title.replace( QRegExp( "&" ), "" );
302
+    title.tqreplace( TQRegExp( "&" ), "" );
303 303
 
304 304
     return title;
305 305
 }
306 306
 
307 307
 
308
-QString
308
+TQString
309 309
 KCleanup::expandVariables( const KFileInfo *	item,
310
-			   const QString &	unexpanded ) const
310
+			   const TQString &	unexpanded ) const
311 311
 {
312
-    QString expanded = unexpanded;
312
+    TQString expanded = unexpanded;
313 313
 
314
-    expanded.replace( QRegExp( "%p" ),
315
-		      "\"" + QString::fromLocal8Bit( item->url() )  + "\"" );
316
-    expanded.replace( QRegExp( "%n" ),
317
-		      "\"" + QString::fromLocal8Bit( item->name() ) + "\"" );
314
+    expanded.tqreplace( TQRegExp( "%p" ),
315
+		      "\"" + TQString::fromLocal8Bit( item->url() )  + "\"" );
316
+    expanded.tqreplace( TQRegExp( "%n" ),
317
+		      "\"" + TQString::fromLocal8Bit( item->name() ) + "\"" );
318 318
 
319 319
     if ( KDE::versionMajor() >= 3 && KDE::versionMinor() >= 4 )
320
-	expanded.replace( QRegExp( "%t" ), "trash:/" );
320
+	expanded.tqreplace( TQRegExp( "%t" ), "trash:/" );
321 321
     else
322
-	expanded.replace( QRegExp( "%t" ), KGlobalSettings::trashPath() );
322
+	expanded.tqreplace( TQRegExp( "%t" ), KGlobalSettings::trashPath() );
323 323
 
324 324
     return expanded;
325 325
 }
326 326
 
327
-#include <qtextcodec.h>
327
+#include <tqtextcodec.h>
328 328
 void
329 329
 KCleanup::runCommand ( const KFileInfo *	item,
330
-		       const QString &		command ) const
330
+		       const TQString &		command ) const
331 331
 {
332 332
     KProcess	proc;
333 333
     KDirSaver	dir( itemDir( item ) );
334
-    QString	cmd( expandVariables( item, command ));
334
+    TQString	cmd( expandVariables( item, command ));
335 335
 
336 336
 #if VERBOSE_RUN_COMMAND
337 337
     printf( "\ncd " );
338 338
     fflush( stdout );
339 339
     system( "pwd" );
340
-    QTextCodec * codec = QTextCodec::codecForLocale();
340
+    TQTextCodec * codec = TQTextCodec::codecForLocale();
341 341
     printf( "%s\n", (const char *) codec->fromUnicode( cmd ) );
342 342
     fflush( stdout );
343 343
 #endif
@@ -368,9 +368,9 @@ KCleanup::runCommand ( const KFileInfo *	item,
368 368
 	    // performing the update prematurely, so we are starting this
369 369
 	    // process in blocking mode.
370 370
 
371
-	    QApplication::setOverrideCursor( waitCursor );
371
+	    TQApplication::setOverrideCursor( waitCursor );
372 372
 	    proc.start( KProcess::Block );
373
-	    QApplication::restoreOverrideCursor();
373
+	    TQApplication::restoreOverrideCursor();
374 374
 	    break;
375 375
     }
376 376
 

+ 25
- 24
kdirstat/kcleanup.h View File

@@ -17,9 +17,9 @@
17 17
 #endif
18 18
 
19 19
 
20
-#include <qdict.h>
21
-#include <qptrlist.h>
22
-#include <qintdict.h>
20
+#include <tqdict.h>
21
+#include <tqptrlist.h>
22
+#include <tqintdict.h>
23 23
 #include <kaction.h>
24 24
 #include <kdebug.h>
25 25
 #include "kdirtree.h"
@@ -36,6 +36,7 @@ namespace KDirStat
36 36
     class KCleanup: public KAction
37 37
     {
38 38
 	Q_OBJECT
39
+  TQ_OBJECT
39 40
 
40 41
     public:
41 42
 
@@ -49,13 +50,13 @@ namespace KDirStat
49 50
 	 * 'command' is the shell command to execute.
50 51
 	 *
51 52
 	 * Most applications will want to pass KMainWindow::actionCollection()
52
-	 * for 'parent' so the menus and toolbars can be created using the XML
53
+	 * for 'tqparent' so the menus and toolbars can be created using the XML
53 54
 	 * UI description ('kdirstatui.rc' for KDirStat).
54 55
 	 **/
55
-	KCleanup( QString		id		= "",
56
-		  QString		command 	= "",
57
-		  QString		title 		= "",
58
-		  KActionCollection *	parent		= 0 );
56
+	KCleanup( TQString		id		= "",
57
+		  TQString		command 	= "",
58
+		  TQString		title 		= "",
59
+		  KActionCollection *	tqparent		= 0 );
59 60
 
60 61
 	/**
61 62
 	 * Copy Constructor.
@@ -84,7 +85,7 @@ namespace KDirStat
84 85
 	 * and the XML UI description. This ID should be unique within the
85 86
 	 * application.
86 87
 	 **/
87
-	const QString &	id()		const { return _id; }
88
+	const TQString &	id()		const { return _id; }
88 89
    
89 90
 	/**
90 91
 	 * Return the command line that will be executed upon calling @ref
@@ -92,20 +93,20 @@ namespace KDirStat
92 93
 	 * complete path of the directory or file concerned or %n for the pure
93 94
 	 * file or directory name without path.
94 95
 	 **/
95
-	const QString &	command()	const { return _command; }
96
+	const TQString &	command()	const { return _command; }
96 97
 
97 98
 	/**
98 99
 	 * Return the user title of this command as displayed in menus.
99 100
 	 * This may include '&' characters for keyboard shortcuts.
100 101
 	 * See also @ref cleanTitle() .
101 102
 	 **/
102
-	const QString &	title()		const { return _title; }
103
+	const TQString &	title()		const { return _title; }
103 104
 
104 105
 	/**
105 106
 	 * Returns the cleanup action's title without '&' keyboard shortcuts.
106 107
 	 * Uses the ID as fallback if the name is empty.
107 108
 	 **/
108
-	QString cleanTitle() const;
109
+	TQString cleanTitle() const;
109 110
 
110 111
 	/**
111 112
 	 * Return whether or not this cleanup action is generally enabled.
@@ -181,8 +182,8 @@ namespace KDirStat
181 182
 	 * refreshThis: Refresh the KDirTree from the item on that was passed
182 183
 	 * to KCleanup::execute().
183 184
 	 *
184
-	 * refreshParent: Refresh the KDirTree from the parent of the item on
185
-	 * that was passed to KCleanup::execute(). If there is no such parent,
185
+	 * refreshParent: Refresh the KDirTree from the tqparent of the item on
186
+	 * that was passed to KCleanup::execute(). If there is no such tqparent,
186 187
 	 * refresh the entire tree.
187 188
 	 *
188 189
 	 * assumeDeleted: Do not actually refresh the KDirTree.  Instead,
@@ -200,9 +201,9 @@ namespace KDirStat
200 201
 	enum RefreshPolicy refreshPolicy()	const { return _refreshPolicy; }
201 202
 
202 203
 
203
-	void setTitle			( const QString &title	);
204
-	void setId			( const QString &id	) 	{ _id			= id;		}
205
-	void setCommand			( const QString &command) 	{ _command 		= command;	}
204
+	void setTitle			( const TQString &title	);
205
+	void setId			( const TQString &id	) 	{ _id			= id;		}
206
+	void setCommand			( const TQString &command) 	{ _command 		= command;	}
206 207
 	void setEnabled			( bool enabled	)		{ _enabled		= enabled;	}
207 208
 	void setWorksForDir		( bool canDo 	)		{ _worksForDir		= canDo; 	}
208 209
 	void setWorksForFile		( bool canDo 	)		{ _worksForFile		= canDo; 	}
@@ -282,7 +283,7 @@ namespace KDirStat
282 283
 	/**
283 284
 	 * Retrieve the directory part of a KFileInfo's path.
284 285
 	 **/
285
-	const QString itemDir( const KFileInfo *item ) const;
286
+	const TQString itemDir( const KFileInfo *item ) const;
286 287
 
287 288
 	/**
288 289
 	 * Expand some variables in string 'unexpanded' to information from
@@ -307,14 +308,14 @@ namespace KDirStat
307 308
 	 * "kfmclient openURL %p"
308 309
 	 * "tar czvf %{name}.tgz && rm -rf %{name}"
309 310
 	 **/
310
-	QString	expandVariables ( const KFileInfo *	item,
311
-				  const QString &	unexpanded ) const;
311
+	TQString	expandVariables ( const KFileInfo *	item,
312
+				  const TQString &	unexpanded ) const;
312 313
 
313 314
 	/**
314 315
 	 * Run a command with 'item' as base to expand variables.
315 316
 	 **/
316 317
 	void	runCommand	( const KFileInfo *	item,
317
-				  const QString &	command ) const;
318
+				  const TQString &	command ) const;
318 319
 
319 320
 	/**
320 321
 	 * Internal implementation of the copy constructor and assignment
@@ -328,9 +329,9 @@ namespace KDirStat
328 329
 	//
329 330
 	
330 331
 	KFileInfo *		_selection;
331
-	QString			_id;
332
-	QString			_command;
333
-	QString			_title;
332
+	TQString			_id;
333
+	TQString			_command;
334
+	TQString			_title;
334 335
 	bool			_enabled;
335 336
 	bool			_worksForDir;
336 337
 	bool			_worksForFile;

+ 20
- 20
kdirstat/kcleanupcollection.cpp View File

@@ -18,14 +18,14 @@ using namespace KDirStat;
18 18
 
19 19
 
20 20
 KCleanupCollection::KCleanupCollection( KActionCollection * actionCollection )
21
-    : QObject()
21
+    : TQObject()
22 22
     , _actionCollection( actionCollection )
23 23
 {
24 24
     /**
25
-     * All cleanups beloningt to this collection are stored in two separate Qt
26
-     * collections, a QList and a QDict. Make _one_ of them manage the cleanup
25
+     * All cleanups beloningt to this collection are stored in two separate TQt
26
+     * collections, a TQList and a TQDict. Make _one_ of them manage the cleanup
27 27
      * objects, i.e. have them clear the KCleanup objects upon deleting. The
28
-     * QList is the master collection, the QDict the slave.
28
+     * TQList is the master collection, the TQDict the slave.
29 29
      **/
30 30
     
31 31
     _cleanupList.setAutoDelete( true  );
@@ -36,7 +36,7 @@ KCleanupCollection::KCleanupCollection( KActionCollection * actionCollection )
36 36
 
37 37
 
38 38
 KCleanupCollection::KCleanupCollection( const KCleanupCollection &src )
39
-    : QObject()
39
+    : TQObject()
40 40
 {
41 41
     deepCopy( src );
42 42
     
@@ -80,7 +80,7 @@ KCleanupCollection::operator= ( const KCleanupCollection &src )
80 80
 	 * limitations of the KCleanup copy constructor: It doesn't make a
81 81
 	 * truly identical copy of the entire KCleanup object. Rather, it
82 82
 	 * copies only the KCleanup members and leaves most of the KAction
83
-	 * members (the parent class) untouched.
83
+	 * members (the tqparent class) untouched.
84 84
 	 *
85 85
 	 * The behaviour implemented here comes handy in the most common
86 86
 	 * situation where this assignment operator is used:
@@ -190,17 +190,17 @@ KCleanupCollection::add( KCleanup *newCleanup )
190 190
     _cleanupList.append( newCleanup );
191 191
     _cleanupDict.insert( newCleanup->id(), newCleanup );
192 192
 
193
-    connect( this,       SIGNAL( selectionChanged( KFileInfo * ) ),
194
-	     newCleanup, SLOT  ( selectionChanged( KFileInfo * ) ) );
193
+    connect( this,       TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
194
+	     newCleanup, TQT_SLOT  ( selectionChanged( KFileInfo * ) ) );
195 195
     
196
-    connect( this,       SIGNAL( readConfig() ),
197
-	     newCleanup, SLOT  ( readConfig() ) );
196
+    connect( this,       TQT_SIGNAL( readConfig() ),
197
+	     newCleanup, TQT_SLOT  ( readConfig() ) );
198 198
     
199
-    connect( this,       SIGNAL( saveConfig() ),
200
-	     newCleanup, SLOT  ( saveConfig() ) );
199
+    connect( this,       TQT_SIGNAL( saveConfig() ),
200
+	     newCleanup, TQT_SLOT  ( saveConfig() ) );
201 201
     
202
-    connect( newCleanup, SIGNAL( executed() ),
203
-	     this, 	 SLOT  ( cleanupExecuted() ) );
202
+    connect( newCleanup, TQT_SIGNAL( executed() ),
203
+	     this, 	 TQT_SLOT  ( cleanupExecuted() ) );
204 204
 }
205 205
 
206 206
 
@@ -222,16 +222,16 @@ KCleanupCollection::addUserCleanups( int number )
222 222
 {
223 223
     for ( int i=0; i < number; i++ )
224 224
     {
225
-	QString id;
225
+	TQString id;
226 226
 	id.sprintf( "cleanup_user_defined_%d", _nextUserCleanupNo );
227
-	QString title;
227
+	TQString title;
228 228
 
229 229
 	if ( _nextUserCleanupNo <= 9 )
230 230
 	    // Provide a keyboard shortcut for cleanup #0..#9
231
-	    title=i18n( "User Defined Cleanup #&%1" ).arg(_nextUserCleanupNo);
231
+	    title=i18n( "User Defined Cleanup #&%1" ).tqarg(_nextUserCleanupNo);
232 232
 	else
233 233
 	    // No keyboard shortcuts for cleanups #10.. - they would be duplicates
234
-	    title=i18n( "User Defined Cleanup #%1" ).arg(_nextUserCleanupNo);
234
+	    title=i18n( "User Defined Cleanup #%1" ).tqarg(_nextUserCleanupNo);
235 235
 
236 236
 	_nextUserCleanupNo++;
237 237
 	
@@ -242,7 +242,7 @@ KCleanupCollection::addUserCleanups( int number )
242 242
 	if ( i <= 9 )
243 243
 	{
244 244
 	    // Provide an application-wide keyboard accelerator for cleanup #0..#9
245
-	    cleanup->setShortcut( Qt::CTRL + Qt::Key_0 + i );
245
+	    cleanup->setShortcut( TQt::CTRL + TQt::Key_0 + i );
246 246
 	}
247 247
 	
248 248
 	add( cleanup );
@@ -251,7 +251,7 @@ KCleanupCollection::addUserCleanups( int number )
251 251
 
252 252
 
253 253
 KCleanup *
254
-KCleanupCollection::cleanup( const QString & id )
254
+KCleanupCollection::cleanup( const TQString & id )
255 255
 {
256 256
     return _cleanupDict[ id ];
257 257
 }

+ 9
- 8
kdirstat/kcleanupcollection.h View File

@@ -25,11 +25,11 @@ class KActionCollection;
25 25
 
26 26
 namespace KDirStat
27 27
 {
28
-    typedef QDict<KCleanup>		KCleanupDict;
29
-    typedef QDictIterator<KCleanup>	KCleanupDictIterator;
28
+    typedef TQDict<KCleanup>		KCleanupDict;
29
+    typedef TQDictIterator<KCleanup>	KCleanupDictIterator;
30 30
 
31
-    typedef QPtrList<KCleanup>		KCleanupList;
32
-    typedef QPtrListIterator<KCleanup>	KCleanupListIterator;
31
+    typedef TQPtrList<KCleanup>		KCleanupList;
32
+    typedef TQPtrListIterator<KCleanup>	KCleanupListIterator;
33 33
 
34 34
     
35 35
     /**
@@ -43,9 +43,10 @@ namespace KDirStat
43 43
      * @short KDirStat cleanup action collection
44 44
      **/
45 45
 
46
-    class KCleanupCollection: public QObject
46
+    class KCleanupCollection: public TQObject
47 47
     {
48 48
 	Q_OBJECT
49
+  TQ_OBJECT
49 50
 
50 51
     public:
51 52
 
@@ -57,7 +58,7 @@ namespace KDirStat
57 58
 	 * using the XML UI description ('kdirstatui.rc' for KDirStat).
58 59
 	 *
59 60
 	 * All @ref KCleanup actions ever added to this collection will get
60
-	 * this as their parent.
61
+	 * this as their tqparent.
61 62
 	 **/
62 63
 	KCleanupCollection( KActionCollection *	actionCollection = 0 );
63 64
 
@@ -110,13 +111,13 @@ namespace KDirStat
110 111
 	 * Retrieve a cleanup by its ID (internal name).
111 112
 	 * Returns 0 if there is no such cleanup.
112 113
 	 **/
113
-	KCleanup * cleanup( const QString & id );
114
+	KCleanup * cleanup( const TQString & id );
114 115
 
115 116
 	/**
116 117
 	 * An alias to @ref cleanup() for convenience: Thus, you can use
117 118
 	 * collection[ "cleanup_id" ] to access any particular cleanup.
118 119
 	 **/
119
-	KCleanup * operator[] ( const QString & id )
120
+	KCleanup * operator[] ( const TQString & id )
120 121
 	    { return cleanup( id ); }
121 122
 	
122 123
 	/**

+ 5
- 5
kdirstat/kdirsaver.cpp View File

@@ -13,11 +13,11 @@
13 13
 #include "kdirsaver.h"
14 14
 
15 15
 
16
-KDirSaver::KDirSaver( const QString & newPath )
16
+KDirSaver::KDirSaver( const TQString & newPath )
17 17
 {
18 18
     /*
19 19
      * No need to actually save the current working directory: This object
20
-     * includes a QDir whose default constructor constructs a directory object
20
+     * includes a TQDir whose default constructor constructs a directory object
21 21
      * that contains the current working directory. Just what is needed here.
22 22
      */
23 23
 
@@ -45,7 +45,7 @@ KDirSaver::~KDirSaver()
45 45
 
46 46
 
47 47
 void
48
-KDirSaver::cd( const QString & newPath )
48
+KDirSaver::cd( const TQString & newPath )
49 49
 {
50 50
     if ( ! newPath.isEmpty() )
51 51
     {
@@ -54,10 +54,10 @@ KDirSaver::cd( const QString & newPath )
54 54
 }
55 55
 
56 56
 
57
-QString
57
+TQString
58 58
 KDirSaver::currentDirPath() const
59 59
 {
60
-    return QDir::currentDirPath();
60
+    return TQDir::currentDirPath();
61 61
 }
62 62
 
63 63
 

+ 6
- 6
kdirstat/kdirsaver.h View File

@@ -16,7 +16,7 @@
16 16
 #endif
17 17
 
18 18
 #include <kurl.h>
19
-#include <qdir.h>
19
+#include <tqdir.h>
20 20
 
21 21
 
22 22
 /**
@@ -33,7 +33,7 @@ public:
33 33
      * path supplied. The old working directory will be restored when this
34 34
      * object is destroyed.
35 35
      **/
36
-    KDirSaver( const QString & newPath = "" );
36
+    KDirSaver( const TQString & newPath = "" );
37 37
 
38 38
     /**
39 39
      * Constructor from a KURL. Will issue error messages on stdout for
@@ -47,17 +47,17 @@ public:
47 47
     virtual ~KDirSaver();
48 48
 
49 49
     /**
50
-     * Change directory. Unlike @ref QDir::cd(), this method really performs a
50
+     * Change directory. Unlike @ref TQDir::cd(), this method really performs a
51 51
      * system chdir() so subsequent system calls will have the directory
52 52
      * specified as the new current working directory.
53 53
      **/
54
-    void cd( const QString & newPath );
54
+    void cd( const TQString & newPath );
55 55
 
56 56
     /**
57 57
      * Obtain the current working directory's absolute path.
58 58
      * This is useful for resolving/simplifying relative paths.
59 59
      **/
60
-    QString currentDirPath() const;
60
+    TQString currentDirPath() const;
61 61
     
62 62
     /**
63 63
      * (Prematurely) restore the working directory. Unnecessary when this
@@ -66,7 +66,7 @@ public:
66 66
     void restore();
67 67
 
68 68
 protected:
69
-    QDir oldWorkingDir;
69
+    TQDir oldWorkingDir;
70 70
 };
71 71
 
72 72
 #endif // KDirSaver_h

+ 84
- 84
kdirstat/kdirstatapp.cpp View File

@@ -10,9 +10,9 @@
10 10
  */
11 11
 
12 12
 
13
-#include <qclipboard.h>
14
-#include <qpopupmenu.h>
15
-#include <qsplitter.h>
13
+#include <tqclipboard.h>
14
+#include <tqpopupmenu.h>
15
+#include <tqsplitter.h>
16 16
 
17 17
 #include <kaccel.h>
18 18
 #include <kaction.h>
@@ -54,7 +54,7 @@
54 54
 using namespace KDirStat;
55 55
 
56 56
 
57
-KDirStatApp::KDirStatApp( QWidget* , const char* name )
57
+KDirStatApp::KDirStatApp( TQWidget* , const char* name )
58 58
     : KMainWindow( 0, name )
59 59
 {
60 60
     // Simple inits
@@ -73,39 +73,39 @@ KDirStatApp::KDirStatApp( QWidget* , const char* name )
73 73
 
74 74
     // Set up internal (mainWin -> mainWin) connections
75 75
 
76
-    connect( this,	SIGNAL( readConfig       ( void ) ),
77
-	     this,	SLOT  ( readMainWinConfig( void ) ) );
76
+    connect( this,	TQT_SIGNAL( readConfig       ( void ) ),
77
+	     this,	TQT_SLOT  ( readMainWinConfig( void ) ) );
78 78
 
79
-    connect( this,	SIGNAL( saveConfig       ( void ) ),
80
-	     this,	SLOT  ( saveMainWinConfig( void ) ) );
79
+    connect( this,	TQT_SIGNAL( saveConfig       ( void ) ),
80
+	     this,	TQT_SLOT  ( saveMainWinConfig( void ) ) );
81 81
 
82 82
 
83 83
     // Create main window
84 84
 
85
-    _splitter = new QSplitter( QSplitter::Vertical, this );
85
+    _splitter = new TQSplitter( Qt::Vertical, this );
86 86
     setCentralWidget( _splitter );
87 87
 
88 88
     _treeView = new KDirTreeView( _splitter );
89 89
 
90
-    connect( _treeView, SIGNAL( progressInfo( const QString & ) ),
91
-	     this,      SLOT  ( statusMsg   ( const QString & ) ) );
90
+    connect( _treeView, TQT_SIGNAL( progressInfo( const TQString & ) ),
91
+	     this,      TQT_SLOT  ( statusMsg   ( const TQString & ) ) );
92 92
 
93
-    connect( _treeView, SIGNAL( selectionChanged( KFileInfo * ) ),
94
-	     this,      SLOT  ( selectionChanged( KFileInfo * ) ) );
93
+    connect( _treeView, TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
94
+	     this,      TQT_SLOT  ( selectionChanged( KFileInfo * ) ) );
95 95
 
96
-    connect( _treeView, SIGNAL( contextMenu( KDirTreeViewItem *, const QPoint & ) ),
97
-	     this,      SLOT  ( contextMenu( KDirTreeViewItem *, const QPoint & ) ) );
96
+    connect( _treeView, TQT_SIGNAL( contextMenu( KDirTreeViewItem *, const TQPoint & ) ),
97
+	     this,      TQT_SLOT  ( contextMenu( KDirTreeViewItem *, const TQPoint & ) ) );
98 98
 
99
-    connect( this,	SIGNAL( readConfig() 		), _treeView,	SLOT  ( readConfig() ) );
100
-    connect( this,	SIGNAL( saveConfig() 		), _treeView,	SLOT  ( saveConfig() ) );
99
+    connect( this,	TQT_SIGNAL( readConfig() 		), _treeView,	TQT_SLOT  ( readConfig() ) );
100
+    connect( this,	TQT_SIGNAL( saveConfig() 		), _treeView,	TQT_SLOT  ( saveConfig() ) );
101 101
 
102
-    connect( _treeView, SIGNAL( finished()		), this, SLOT( createTreemapView() ) );
103
-    connect( _treeView, SIGNAL( aborted()		), this, SLOT( createTreemapView() ) );
104
-    connect( _treeView, SIGNAL( startingReading()	), this, SLOT( deleteTreemapView() ) );
102
+    connect( _treeView, TQT_SIGNAL( finished()		), TQT_TQOBJECT(this), TQT_SLOT( createTreemapView() ) );
103
+    connect( _treeView, TQT_SIGNAL( aborted()		), TQT_TQOBJECT(this), TQT_SLOT( createTreemapView() ) );
104
+    connect( _treeView, TQT_SIGNAL( startingReading()	), TQT_TQOBJECT(this), TQT_SLOT( deleteTreemapView() ) );
105 105
 
106
-    connect( _treeView, SIGNAL( startingReading()	), this, SLOT( updateActions() ) );
107
-    connect( _treeView, SIGNAL( finished()        	), this, SLOT( updateActions() ) );
108
-    connect( _treeView, SIGNAL( aborted()         	), this, SLOT( updateActions() ) );
106
+    connect( _treeView, TQT_SIGNAL( startingReading()	), TQT_TQOBJECT(this), TQT_SLOT( updateActions() ) );
107
+    connect( _treeView, TQT_SIGNAL( finished()        	), TQT_TQOBJECT(this), TQT_SLOT( updateActions() ) );
108
+    connect( _treeView, TQT_SIGNAL( aborted()         	), TQT_TQOBJECT(this), TQT_SLOT( updateActions() ) );
109 109
 
110 110
     // Call inits to invoke all other construction parts
111 111
 
@@ -115,8 +115,8 @@ KDirStatApp::KDirStatApp( QWidget* , const char* name )
115 115
     createGUI();
116 116
     initActivityTracker();
117 117
 
118
-    _treeViewContextMenu = (QPopupMenu *) factory()->container( "treeViewContextMenu", this );
119
-    _treemapContextMenu	 = (QPopupMenu *) factory()->container( "treemapContextMenu",  this );
118
+    _treeViewContextMenu = (TQPopupMenu *) factory()->container( "treeViewContextMenu", this );
119
+    _treemapContextMenu	 = (TQPopupMenu *) factory()->container( "treemapContextMenu",  this );
120 120
 
121 121
     readMainWinConfig();
122 122
 
@@ -141,72 +141,72 @@ KDirStatApp::~KDirStatApp()
141 141
 void
142 142
 KDirStatApp::initActions()
143 143
 {
144
-    _fileAskOpenDir	= KStdAction::open		( this, SLOT( fileAskOpenDir() ), 		actionCollection() );
144
+    _fileAskOpenDir	= KStdAction::open		( TQT_TQOBJECT(this), TQT_SLOT( fileAskOpenDir() ), 		actionCollection() );
145 145
 
146 146
     _fileAskOpenUrl	= new KAction( i18n( "Open &URL..." ), "konqueror", 0,
147
-				       this, SLOT( fileAskOpenUrl() ),
147
+				       TQT_TQOBJECT(this), TQT_SLOT( fileAskOpenUrl() ),
148 148
 				       actionCollection(), "file_open_url" );
149 149
 
150
-    _fileOpenRecent	= KStdAction::openRecent	( this, SLOT( fileOpenRecent( const KURL& ) ),	actionCollection() );
151
-    _fileCloseDir	= KStdAction::close		( this, SLOT( fileCloseDir() ), 		actionCollection() );
150
+    _fileOpenRecent	= KStdAction::openRecent	( TQT_TQOBJECT(this), TQT_SLOT( fileOpenRecent( const KURL& ) ),	actionCollection() );
151
+    _fileCloseDir	= KStdAction::close		( TQT_TQOBJECT(this), TQT_SLOT( fileCloseDir() ), 		actionCollection() );
152 152
 
153 153
     _fileRefreshAll		= new KAction( i18n( "Refresh &All" ), "reload", 0,
154
-					       this, SLOT( refreshAll() ),
154
+					       TQT_TQOBJECT(this), TQT_SLOT( refreshAll() ),
155 155
 					       actionCollection(), "file_refresh_all" );
156 156
 
157 157
     _fileRefreshSelected	= new KAction( i18n( "Refresh &Selected" ), 0,
158
-					       this, SLOT( refreshSelected() ),
158
+					       TQT_TQOBJECT(this), TQT_SLOT( refreshSelected() ),
159 159
 					       actionCollection(), "file_refresh_selected" );
160 160
 
161 161
     _fileContinueReadingAtMountPoint = new KAction( i18n( "Continue Reading at &Mount Point" ), "hdd_mount", 0,
162
-						    this, SLOT( refreshSelected() ), actionCollection(),
162
+						    TQT_TQOBJECT(this), TQT_SLOT( refreshSelected() ), actionCollection(),
163 163
 						    "file_continue_reading_at_mount_point" );
164 164
 
165 165
     _fileStopReading	= new KAction( i18n( "Stop Rea&ding" ), "stop", 0,
166
-				       this, SLOT( stopReading() ), actionCollection(),
166
+				       TQT_TQOBJECT(this), TQT_SLOT( stopReading() ), actionCollection(),
167 167
 				       "file_stop_reading" );
168 168
 
169
-    _fileQuit		= KStdAction::quit		( kapp, SLOT( quit()  		), actionCollection() );
170
-    _editCopy		= KStdAction::copy		( this, SLOT( editCopy() 	), actionCollection() );
171
-    _showToolBar	= KStdAction::showToolbar	( this, SLOT( toggleToolBar()	), actionCollection() );
172
-    _showStatusBar	= KStdAction::showStatusbar	( this, SLOT( toggleStatusBar() ), actionCollection() );
169
+    _fileQuit		= KStdAction::quit		( TQT_TQOBJECT(kapp), TQT_SLOT( quit()  		), actionCollection() );
170
+    _editCopy		= KStdAction::copy		( TQT_TQOBJECT(this), TQT_SLOT( editCopy() 		), actionCollection() );
171
+    _showToolBar	= KStdAction::showToolbar	( TQT_TQOBJECT(this), TQT_SLOT( toggleToolBar()		), actionCollection() );
172
+    _showStatusBar	= KStdAction::showStatusbar	( TQT_TQOBJECT(this), TQT_SLOT( toggleStatusBar()	), actionCollection() );
173 173
 
174 174
     _cleanupOpenWith	= new KAction( i18n( "Open With" ), 0,
175
-				       this, SLOT( cleanupOpenWith() ),
175
+				       TQT_TQOBJECT(this), TQT_SLOT( cleanupOpenWith() ),
176 176
 				       actionCollection(), "cleanup_open_with" );
177 177
 
178 178
     _treemapZoomIn 	= new KAction( i18n( "Zoom in" ), "viewmag+", Key_Plus,
179
-				       this, SLOT( treemapZoomIn() ),
179
+				       TQT_TQOBJECT(this), TQT_SLOT( treemapZoomIn() ),
180 180
 				       actionCollection(), "treemap_zoom_in" );
181 181
 
182 182
     _treemapZoomOut 	= new KAction( i18n( "Zoom out" ), "viewmag-", Key_Minus,
183
-				       this, SLOT( treemapZoomOut() ),
183
+				       TQT_TQOBJECT(this), TQT_SLOT( treemapZoomOut() ),
184 184
 				       actionCollection(), "treemap_zoom_out" );
185 185
 
186 186
     _treemapSelectParent= new KAction( i18n( "Select Parent" ), "up", Key_Asterisk,
187
-				       this, SLOT( treemapSelectParent() ),
187
+				       TQT_TQOBJECT(this), TQT_SLOT( treemapSelectParent() ),
188 188
 				       actionCollection(), "treemap_select_parent" );
189 189
 
190 190
     _treemapRebuild 	= new KAction( i18n( "Rebuild Treemap" ), 0,
191
-				       this, SLOT( treemapRebuild() ),
191
+				       TQT_TQOBJECT(this), TQT_SLOT( treemapRebuild() ),
192 192
 				       actionCollection(), "treemap_rebuild" );
193 193
 
194 194
     _showTreemapView	= new KToggleAction( i18n( "Show Treemap" ), Key_F9,
195
-					     this, SLOT( toggleTreemapView() ),
195
+					     TQT_TQOBJECT(this), TQT_SLOT( toggleTreemapView() ),
196 196
 					     actionCollection(), "options_show_treemap" );
197 197
 
198 198
     new KAction( i18n( "Help about Treemaps" ), "help", 0,
199
-		 this, SLOT( treemapHelp() ),
199
+		 TQT_TQOBJECT(this), TQT_SLOT( treemapHelp() ),
200 200
 		 actionCollection(), "treemap_help" );
201 201
 
202
-    KAction * pref	= KStdAction::preferences( this, SLOT( preferences()	), actionCollection() );
202
+    KAction * pref	= KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT( preferences()	), actionCollection() );
203 203
 
204 204
     _reportMailToOwner	= new KAction( i18n( "Send &Mail to Owner" ), "mail_generic", 0,
205
-				       _treeView, SLOT( sendMailToOwner() ),
205
+				       TQT_TQOBJECT(_treeView), TQT_SLOT( sendMailToOwner() ),
206 206
 				       actionCollection(), "report_mail_to_owner" );
207 207
 
208 208
     _helpSendFeedbackMail = new KAction( i18n( "Send &Feedback Mail..." ), 0,
209
-					 this, SLOT( sendFeedbackMail() ),
209
+					 TQT_TQOBJECT(this), TQT_SLOT( sendFeedbackMail() ),
210 210
 					 actionCollection(), "help_send_feedback_mail" );
211 211
 
212 212
 
@@ -226,7 +226,7 @@ KDirStatApp::initActions()
226 226
     _showTreemapView->setStatusText	( i18n( "Enables/disables the treemap view" 	) );
227 227
     _treemapZoomIn->setStatusText	( i18n( "Zoom treemap in"		 	) );
228 228
     _treemapZoomOut->setStatusText	( i18n( "Zoom treemap out"		 	) );
229
-    _treemapSelectParent->setStatusText	( i18n( "Select parent"			 	) );
229
+    _treemapSelectParent->setStatusText	( i18n( "Select tqparent"			 	) );
230 230
     _treemapRebuild->setStatusText	( i18n( "Rebuild treemap to fit into available space" ) );
231 231
     pref->setStatusText			( i18n( "Opens the preferences dialog"		) );
232 232
     _reportMailToOwner->setStatusText	( i18n( "Sends a mail to the owner of the selected subtree" ) );
@@ -242,14 +242,14 @@ KDirStatApp::initCleanups()
242 242
     _cleanupCollection->addUserCleanups( USER_CLEANUPS );
243 243
     _cleanupCollection->slotReadConfig();
244 244
 
245
-    connect( _treeView,          SIGNAL( selectionChanged( KFileInfo * ) ),
246
-	     _cleanupCollection, SIGNAL( selectionChanged( KFileInfo * ) ) );
245
+    connect( _treeView,          TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
246
+	     _cleanupCollection, TQT_SIGNAL( selectionChanged( KFileInfo * ) ) );
247 247
 
248
-    connect( this,               SIGNAL( readConfig( void ) ),
249
-	     _cleanupCollection, SIGNAL( readConfig( void ) ) );
248
+    connect( this,               TQT_SIGNAL( readConfig( void ) ),
249
+	     _cleanupCollection, TQT_SIGNAL( readConfig( void ) ) );
250 250
 
251
-    connect( this,               SIGNAL( saveConfig( void ) ),
252
-	     _cleanupCollection, SIGNAL( saveConfig( void ) ) );
251
+    connect( this,               TQT_SIGNAL( saveConfig( void ) ),
252
+	     _cleanupCollection, TQT_SIGNAL( saveConfig( void ) ) );
253 253
 }
254 254
 
255 255
 
@@ -276,12 +276,12 @@ KDirStatApp::initPacMan( bool enablePacMan )
276 276
 	    toolBar()->insertWidget( id, PACMAN_WIDTH, _pacMan );
277 277
 	    toolBar()->setItemAutoSized( id, false );
278 278
 
279
-	    _pacManDelimiter = new QWidget( toolBar() );
279
+	    _pacManDelimiter = new TQWidget( toolBar() );
280 280
 	    toolBar()->insertWidget( ++id, 1, _pacManDelimiter );
281 281
 
282
-	    connect( _treeView, SIGNAL( startingReading() ), _pacMan, SLOT( start() ) );
283
-	    connect( _treeView, SIGNAL( finished()        ), _pacMan, SLOT( stop () ) );
284
-	    connect( _treeView, SIGNAL( aborted()         ), _pacMan, SLOT( stop () ) );
282
+	    connect( _treeView, TQT_SIGNAL( startingReading() ), _pacMan, TQT_SLOT( start() ) );
283
+	    connect( _treeView, TQT_SIGNAL( finished()        ), _pacMan, TQT_SLOT( stop () ) );
284
+	    connect( _treeView, TQT_SIGNAL( aborted()         ), _pacMan, TQT_SLOT( stop () ) );
285 285
 	}
286 286
     }
287 287
     else
@@ -314,17 +314,17 @@ KDirStatApp::initActivityTracker()
314 314
     if ( ! doFeedbackReminder() )
315 315
 	return;
316 316
 
317
-    _activityTracker = new KActivityTracker( this, "Feedback",
317
+    _activityTracker = new KActivityTracker( TQT_TQOBJECT(this), "Feedback",
318 318
 					     INITIAL_FEEDBACK_REMINDER );
319 319
 
320
-    connect( _activityTracker,  SIGNAL( thresholdReached() ),
321
-	     this,		SLOT  ( askForFeedback() ) );
320
+    connect( _activityTracker,  TQT_SIGNAL( thresholdReached() ),
321
+	     this,		TQT_SLOT  ( askForFeedback() ) );
322 322
 
323
-    connect( _treeView,		SIGNAL( userActivity( int ) ),
324
-	     _activityTracker,	SLOT  ( trackActivity( int ) ) );
323
+    connect( _treeView,		TQT_SIGNAL( userActivity( int ) ),
324
+	     _activityTracker,	TQT_SLOT  ( trackActivity( int ) ) );
325 325
 
326
-    connect( _cleanupCollection, SIGNAL( userActivity( int ) ),
327
-	     _activityTracker,   SLOT  ( trackActivity( int ) ) );
326
+    connect( _cleanupCollection, TQT_SIGNAL( userActivity( int ) ),
327
+	     _activityTracker,   TQT_SLOT  ( trackActivity( int ) ) );
328 328
 }
329 329
 
330 330
 
@@ -348,7 +348,7 @@ void KDirStatApp::readMainWinConfig()
348 348
     KConfig * config = kapp->config();
349 349
     config->setGroup( "General Options" );
350 350
 
351
-    // Status settings of the various bars and views
351
+    // tqStatus settings of the various bars and views
352 352
 
353 353
     _showToolBar->setChecked( config->readBoolEntry( "Show Toolbar", true ) );
354 354
     toggleToolBar();
@@ -371,7 +371,7 @@ void KDirStatApp::readMainWinConfig()
371 371
     // initialize the recent file list
372 372
     _fileOpenRecent->loadEntries( config,"Recent Files" );
373 373
 
374
-    QSize size = config->readSizeEntry( "Geometry" );
374
+    TQSize size = config->readSizeEntry( "Geometry" );
375 375
 
376 376
     if( ! size.isEmpty() )
377 377
 	resize( size );
@@ -443,7 +443,7 @@ KDirStatApp::fileAskOpenDir()
443 443
 {
444 444
     statusMsg( i18n( "Opening directory..." ) );
445 445
 
446
-    KURL url = KFileDialog::getExistingDirectory( QString::null, this, i18n( "Open Directory..." ) );
446
+    KURL url = KFileDialog::getExistingDirectory( TQString(), this, i18n( "Open Directory..." ) );
447 447
 
448 448
     if( ! url.isEmpty() )
449 449
 	openURL( fixedUrl( url.url() ) );
@@ -457,7 +457,7 @@ KDirStatApp::fileAskOpenUrl()
457 457
 {
458 458
     statusMsg( i18n( "Opening URL..." ) );
459 459
 
460
-    KURL url = KURLRequesterDlg::getURL( QString::null,	// startDir
460
+    KURL url = KURLRequesterDlg::getURL( TQString(),	// startDir
461 461
 					 this, i18n( "Open URL..." ) );
462 462
 
463 463
     if( ! url.isEmpty() )
@@ -524,7 +524,7 @@ void
524 524
 KDirStatApp::editCopy()
525 525
 {
526 526
     if ( _treeView->selection() )
527
-	kapp->clipboard()->setText( QString::fromLocal8Bit(_treeView->selection()->orig()->url()) );
527
+	kapp->clipboard()->setText( TQString::fromLocal8Bit(_treeView->selection()->orig()->url()) );
528 528
 
529 529
 #if 0
530 530
 #warning debug
@@ -568,7 +568,7 @@ KDirStatApp::selectionChanged( KFileInfo *selection )
568 568
 	else
569 569
 	    _fileContinueReadingAtMountPoint->setEnabled( false );
570 570
 
571
-	statusMsg( QString::fromLocal8Bit(selection->url()) );
571
+	statusMsg( TQString::fromLocal8Bit(selection->url()) );
572 572
     }
573 573
     else
574 574
     {
@@ -767,7 +767,7 @@ KDirStatApp::doFeedbackReminder()
767 767
 
768 768
 
769 769
 void
770
-KDirStatApp::statusMsg( const QString &text )
770
+KDirStatApp::statusMsg( const TQString &text )
771 771
 {
772 772
     // Change status message permanently
773 773
 
@@ -777,7 +777,7 @@ KDirStatApp::statusMsg( const QString &text )
777 777
 
778 778
 
779 779
 void
780
-KDirStatApp::contextMenu( KDirTreeViewItem * item, const QPoint &pos )
780
+KDirStatApp::contextMenu( KDirTreeViewItem * item, const TQPoint &pos )
781 781
 {
782 782
     NOT_USED( item );
783 783
 
@@ -787,7 +787,7 @@ KDirStatApp::contextMenu( KDirTreeViewItem * item, const QPoint &pos )
787 787
 
788 788
 
789 789
 void
790
-KDirStatApp::contextMenu( KTreemapTile * tile, const QPoint &pos )
790
+KDirStatApp::contextMenu( KTreemapTile * tile, const TQPoint &pos )
791 791
 {
792 792
     NOT_USED( tile );
793 793
 
@@ -806,25 +806,25 @@ KDirStatApp::createTreemapView()
806 806
 	delete _treemapView;
807 807
 
808 808
     _treemapView = new KTreemapView( _treeView->tree(), _splitter,
809
-				     QSize( _splitter->width(), _treemapViewHeight ) );
809
+				     TQSize( _splitter->width(), _treemapViewHeight ) );
810 810
     CHECK_PTR( _treemapView );
811 811
 
812
-    connect( _treemapView,	SIGNAL( contextMenu( KTreemapTile *, const QPoint & ) ),
813
-	     this,		SLOT  ( contextMenu( KTreemapTile *, const QPoint & ) ) );
812
+    connect( _treemapView,	TQT_SIGNAL( contextMenu( KTreemapTile *, const TQPoint & ) ),
813
+	     this,		TQT_SLOT  ( contextMenu( KTreemapTile *, const TQPoint & ) ) );
814 814
 
815
-    connect( _treemapView,	SIGNAL( treemapChanged()	),
816
-	     this,		SLOT  ( updateActions()	) 	);
815
+    connect( _treemapView,	TQT_SIGNAL( treemapChanged()	),
816
+	     this,		TQT_SLOT  ( updateActions()	) 	);
817 817
 
818
-    connect( _treemapView,	SIGNAL( selectionChanged( KFileInfo * ) ),
819
-	     this,      	SLOT  ( selectionChanged( KFileInfo * ) ) );
818
+    connect( _treemapView,	TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
819
+	     this,      	TQT_SLOT  ( selectionChanged( KFileInfo * ) ) );
820 820
 
821 821
     if ( _activityTracker )
822 822
     {
823
-	connect( _treemapView,		SIGNAL( userActivity ( int )	),
824
-		 _activityTracker,	SLOT  ( trackActivity( int ) 	) );
823
+	connect( _treemapView,		TQT_SIGNAL( userActivity ( int )	),
824
+		 _activityTracker,	TQT_SLOT  ( trackActivity( int ) 	) );
825 825
     }
826 826
 
827
-    _treemapView->show(); // QSplitter needs explicit show() for new children
827
+    _treemapView->show(); // TQSplitter needs explicit show() for new tqchildren
828 828
     updateActions();
829 829
 }
830 830
 

+ 12
- 11
kdirstat/kdirstatapp.h View File

@@ -24,8 +24,8 @@
24 24
 
25 25
 
26 26
 // Forward declarations
27
-class QPopupMenu;
28
-class QSplitter;
27
+class TQPopupMenu;
28
+class TQSplitter;
29 29
 
30 30
 class KAction;
31 31
 class KActivityTracker;
@@ -71,6 +71,7 @@ using namespace KDirStat;
71 71
 class KDirStatApp : public KMainWindow
72 72
 {
73 73
     Q_OBJECT
74
+  TQ_OBJECT
74 75
 
75 76
 public:
76 77
 
@@ -78,7 +79,7 @@ public:
78 79
      * Construtor of KDirStatApp, calls all init functions to create the
79 80
      * application.
80 81
      **/
81
-    KDirStatApp( QWidget* parent=0, const char* name=0 );
82
+    KDirStatApp( TQWidget* tqparent=0, const char* name=0 );
82 83
 
83 84
     /**
84 85
      * Destructor.
@@ -184,7 +185,7 @@ public slots:
184 185
     void treemapZoomOut();
185 186
 
186 187
     /**
187
-     * Select the parent of the currently selected treemap tile.
188
+     * Select the tqparent of the currently selected treemap tile.
188 189
      **/
189 190
     void treemapSelectParent();
190 191
 
@@ -209,17 +210,17 @@ public slots:
209 210
      *
210 211
      * @param text the text that is displayed in the statusbar
211 212
      **/
212
-    void statusMsg( const QString &text );
213
+    void statusMsg( const TQString &text );
213 214
 
214 215
     /**
215 216
      * Opens a context menu for tree view items.
216 217
      **/
217
-    void contextMenu( KDirTreeViewItem * item, const QPoint &pos );
218
+    void contextMenu( KDirTreeViewItem * item, const TQPoint &pos );
218 219
 
219 220
     /**
220 221
      * Opens a context menu for treemap tiles.
221 222
      **/
222
-    void contextMenu( KTreemapTile * tile, const QPoint &pos );
223
+    void contextMenu( KTreemapTile * tile, const TQPoint &pos );
223 224
 
224 225
     /**
225 226
      * Create a treemap view. This makes only sense after a directory tree is
@@ -373,13 +374,13 @@ protected:
373 374
 
374 375
     // Widgets
375 376
 
376
-    QSplitter *			_splitter;
377
+    TQSplitter *			_splitter;
377 378
     KDirTreeView *		    _treeView;
378 379
     KTreemapView *		    _treemapView;
379 380
     KPacMan *			_pacMan;
380
-    QWidget *			_pacManDelimiter;
381
-    QPopupMenu *		_treeViewContextMenu;
382
-    QPopupMenu *		_treemapContextMenu;
381
+    TQWidget *			_pacManDelimiter;
382
+    TQPopupMenu *		_treeViewContextMenu;
383
+    TQPopupMenu *		_treemapContextMenu;
383 384
     KDirStat::KSettingsDialog *	_settingsDialog;
384 385
     KFeedbackDialog *		_feedbackDialog;
385 386
     KActivityTracker *		_activityTracker;

+ 2
- 2
kdirstat/kdirstatfeedback.cpp View File

@@ -24,8 +24,8 @@ KDirStatApp::sendFeedbackMail()
24 24
 	_feedbackDialog = new KFeedbackDialog( "sh@suse.de", "feedback_mail" );
25 25
 	CHECK_PTR( _feedbackDialog );
26 26
 
27
-	connect( _feedbackDialog->form(), SIGNAL( mailSent() ),
28
-		 this, SLOT( feedbackMailSent() ) );
27
+	connect( _feedbackDialog->form(), TQT_SIGNAL( mailSent() ),
28
+		 this, TQT_SLOT( feedbackMailSent() ) );
29 29
 
30 30
 	KFeedbackQuestionList * list = _feedbackDialog->form()->questionList();
31 31
 

+ 182
- 182
kdirstat/kdirstatsettings.cpp View File

@@ -8,17 +8,17 @@
8 8
  */
9 9
 
10 10
 
11
-#include <qbuttongroup.h>
12
-#include <qcheckbox.h>
13
-#include <qcombobox.h>
14
-#include <qlabel.h>
15
-#include <qlayout.h>
16
-#include <qlineedit.h>
17
-#include <qslider.h>
18
-#include <qvbox.h>
19
-#include <qhgroupbox.h>
20
-#include <qvgroupbox.h>
21
-#include <qspinbox.h>
11
+#include <tqbuttongroup.h>
12
+#include <tqcheckbox.h>
13
+#include <tqcombobox.h>
14
+#include <tqlabel.h>
15
+#include <tqlayout.h>
16
+#include <tqlineedit.h>
17
+#include <tqslider.h>
18
+#include <tqvbox.h>
19
+#include <tqhgroupbox.h>
20
+#include <tqvgroupbox.h>
21
+#include <tqspinbox.h>
22 22
 
23 23
 #include <kcolorbutton.h>
24 24
 #include <klocale.h>
@@ -37,31 +37,31 @@ KSettingsDialog::KSettingsDialog( KDirStatApp *mainWin )
37 37
 		   i18n( "Settings" ),				// caption
38 38
 		   Ok | Apply | Default | Cancel | Help,	// buttonMask
39 39
 		   Ok,						// defaultButton
40
-		   0,						// parent
40
+		   0,						// tqparent
41 41
 		   0,						// name
42 42
 		   false )					// modal
43 43
     , _mainWin( mainWin )
44 44
 {
45 45
     /**
46 46
      * This may seem like overkill, but I didn't find any other way to get
47
-     * geometry management right with KDialogBase, yet maintain a modular and
47
+     * tqgeometry management right with KDialogBase, yet maintain a modular and
48 48
      * object-oriented design:
49 49
      *
50 50
      * Each individual settings page is added with 'addVBoxPage()' to get some
51
-     * initial geometry management. Only then can some generic widget be added
51
+     * initial tqgeometry management. Only then can some generic widget be added
52 52
      * into this - and I WANT my settings pages to be generic widgets. I want
53 53
      * them to be self-sufficient - no monolithic mess of widget creation in my
54
-     * code, intermixed with all kinds of layout objects.
54
+     * code, intermixed with all kinds of tqlayout objects.
55 55
      *
56
-     * The ordinary KDialogBase::addPage() just creates a QFrame which is too
57
-     * dumb for any kind of geometry management - it cannot even handle one
56
+     * The ordinary KDialogBase::addPage() just creates a TQFrame which is too
57
+     * dumb for any kind of tqgeometry management - it cannot even handle one
58 58
      * single child right. So, let's have KDialogBase create something more
59
-     * intelligent: A QVBox (which is derived from QFrame anyway). This QVBox
59
+     * intelligent: A TQVBox (which is derived from TQFrame anyway). This TQVBox
60 60
      * gets only one child - the KSettingsPage. This KSettingsPage handles its
61
-     * own layout.
61
+     * own tqlayout.
62 62
      **/
63 63
 
64
-    QWidget * page;
64
+    TQWidget * page;
65 65
 
66 66
     page = addVBoxPage( i18n( "&Cleanups" ) );
67 67
     _cleanupsPageIndex = pageIndex( page );
@@ -79,7 +79,7 @@ KSettingsDialog::KSettingsDialog( KDirStatApp *mainWin )
79 79
     _generalSettingsPageIndex = pageIndex( page );
80 80
     new KGeneralSettingsPage( this, page, _mainWin );
81 81
 
82
-    // resize( sizeHint() );
82
+    // resize( tqsizeHint() );
83 83
 }
84 84
 
85 85
 
@@ -116,7 +116,7 @@ KSettingsDialog::slotDefault()
116 116
 void
117 117
 KSettingsDialog::slotHelp()
118 118
 {
119
-    QString helpTopic = "";
119
+    TQString helpTopic = "";
120 120
 
121 121
     if	    ( activePageIndex() == _cleanupsPageIndex	)	helpTopic = "configuring_cleanups";
122 122
     else if ( activePageIndex() == _treeColorsPageIndex )	helpTopic = "tree_colors";
@@ -132,20 +132,20 @@ KSettingsDialog::slotHelp()
132 132
 
133 133
 
134 134
 KSettingsPage::KSettingsPage( KSettingsDialog * dialog,
135
-			      QWidget *		parent )
136
-    : QWidget( parent )
135
+			      TQWidget *		tqparent )
136
+    : TQWidget( tqparent )
137 137
 {
138
-    connect( dialog,	SIGNAL( aboutToShow	( void ) ),
139
-	     this,	SLOT  ( setup		( void ) ) );
138
+    connect( dialog,	TQT_SIGNAL( aboutToShow	( void ) ),
139
+	     this,	TQT_SLOT  ( setup		( void ) ) );
140 140
 
141
-    connect( dialog,	SIGNAL( okClicked	( void ) ),
142
-	     this,	SLOT  ( apply		( void ) ) );
141
+    connect( dialog,	TQT_SIGNAL( okClicked	( void ) ),
142
+	     this,	TQT_SLOT  ( apply		( void ) ) );
143 143
 
144
-    connect( dialog,	SIGNAL( applyClicked	( void ) ),
145
-	     this,	SLOT  ( apply		( void ) ) );
144
+    connect( dialog,	TQT_SIGNAL( applyClicked	( void ) ),
145
+	     this,	TQT_SLOT  ( apply		( void ) ) );
146 146
 
147
-    connect( dialog,	SIGNAL( defaultClicked	( void ) ),
148
-	     this,	SLOT  ( revertToDefaults( void ) ) );
147
+    connect( dialog,	TQT_SIGNAL( defaultClicked	( void ) ),
148
+	     this,	TQT_SLOT  ( revertToDefaults( void ) ) );
149 149
 }
150 150
 
151 151
 
@@ -159,23 +159,23 @@ KSettingsPage::~KSettingsPage()
159 159
 
160 160
 
161 161
 KTreeColorsPage::KTreeColorsPage( KSettingsDialog *	dialog,
162
-				  QWidget *		parent,
162
+				  TQWidget *		tqparent,
163 163
 				  KDirStatApp *		mainWin )
164
-    : KSettingsPage( dialog, parent )
164
+    : KSettingsPage( dialog, tqparent )
165 165
     , _mainWin( mainWin )
166 166
     , _treeView( mainWin->treeView() )
167 167
     , _maxButtons( KDirStatSettingsMaxColorButton )
168 168
 {
169
-    // Outer layout box
169
+    // Outer tqlayout box
170 170
 
171
-    QHBoxLayout * outerBox = new QHBoxLayout( this,
171
+    TQHBoxLayout * outerBox = new TQHBoxLayout( this,
172 172
 					      0,	// border
173 173
 					      dialog->spacingHint() );
174 174
 
175 175
 
176
-    // Inner layout box with a column of color buttons
176
+    // Inner tqlayout box with a column of color buttons
177 177
 
178
-    QGridLayout *grid = new QGridLayout( _maxButtons,		// rows
178
+    TQGridLayout *grid = new TQGridLayout( _maxButtons,		// rows
179 179
 					 _maxButtons + 1,	// cols
180 180
 					 dialog->spacingHint() );
181 181
     outerBox->addLayout( grid, 1 );
@@ -188,32 +188,32 @@ KTreeColorsPage::KTreeColorsPage( KSettingsDialog *	dialog,
188 188
 
189 189
     for ( int i=0; i < _maxButtons; i++ )
190 190
     {
191
-	QString labelText;
191
+	TQString labelText;
192 192
 
193
-	labelText=i18n( "Tree Level %1" ).arg(i+1);
194
-	_colorLabel[i] = new QLabel( labelText, this );
193
+	labelText=i18n( "Tree Level %1" ).tqarg(i+1);
194
+	_colorLabel[i] = new TQLabel( labelText, this );
195 195
 	grid->addWidget( _colorLabel [i], i, 0 );
196 196
 
197 197
 	_colorButton[i] = new KColorButton( this );
198
-	_colorButton[i]->setMinimumSize( QSize( 80, 10 ) );
198
+	_colorButton[i]->setMinimumSize( TQSize( 80, 10 ) );
199 199
 	grid->addMultiCellWidget( _colorButton [i], i, i, i+1, _maxButtons );
200 200
 	grid->setRowStretch( i, 1 );
201 201
     }
202 202
 
203 203
 
204
-    // Vertical slider
204
+    //Qt::Vertical slider
205 205
 
206
-    _slider = new QSlider( 1,			// minValue
206
+    _slider = new TQSlider( 1,			// minValue
207 207
 			   _maxButtons,		// maxValue
208 208
 			   1,			// pageStep
209 209
 			   1,			// value
210
-			   QSlider::Vertical,
210
+			   Qt::Vertical,
211 211
 			   this );
212 212
     outerBox->addWidget( _slider, 0 );
213 213
     outerBox->activate();
214 214
 
215
-    connect( _slider,	SIGNAL( valueChanged( int ) ),
216
-	     this,	SLOT  ( enableColors( int ) ) );
215
+    connect( _slider,	TQT_SIGNAL( valueChanged( int ) ),
216
+	     this,	TQT_SLOT  ( enableColors( int ) ) );
217 217
 }
218 218
 
219 219
 
@@ -274,9 +274,9 @@ KTreeColorsPage::enableColors( int maxColors )
274 274
 
275 275
 
276 276
 KCleanupPage::KCleanupPage( KSettingsDialog *	dialog,
277
-			    QWidget *		parent,
277
+			    TQWidget *		tqparent,
278 278
 			    KDirStatApp *	mainWin )
279
-    : KSettingsPage( dialog, parent )
279
+    : KSettingsPage( dialog, tqparent )
280 280
     , _mainWin( mainWin )
281 281
     , _currentCleanup( 0 )
282 282
 {
@@ -284,9 +284,9 @@ KCleanupPage::KCleanupPage( KSettingsDialog *	dialog,
284 284
 
285 285
     _workCleanupCollection = *mainWin->cleanupCollection();
286 286
 
287
-    // Create layout and widgets.
287
+    // Create tqlayout and widgets.
288 288
 
289
-    QHBoxLayout * layout = new QHBoxLayout( this,
289
+    TQHBoxLayout * tqlayout = new TQHBoxLayout( this,
290 290
 					    0,				// border
291 291
 					    dialog->spacingHint() );	// spacing
292 292
     _listBox	= new KCleanupListBox( this );
@@ -298,21 +298,21 @@ KCleanupPage::KCleanupPage( KSettingsDialog *	dialog,
298 298
     // clicks on a different cleanup in the list, the properties page
299 299
     // will display that cleanup's values.
300 300
 
301
-    connect( _listBox, SIGNAL( selectCleanup( KCleanup * ) ),
302
-	     this,     SLOT  ( changeCleanup( KCleanup * ) ) );
301
+    connect( _listBox, TQT_SIGNAL( selectCleanup( KCleanup * ) ),
302
+	     this,     TQT_SLOT  ( changeCleanup( KCleanup * ) ) );
303 303
 
304 304
 
305
-    // Fill list box so it can determine a reasonable startup geometry - that
305
+    // Fill list box so it can determine a reasonable startup tqgeometry - that
306 306
     // doesn't work if it happens only later.
307 307
 
308 308
     setup();
309 309
 
310 310
     // Now that _listBox will (hopefully) have determined a reasonable
311
-    // default geometry, add the widgets to the layout.
311
+    // default tqgeometry, add the widgets to the tqlayout.
312 312
 
313
-    layout->addWidget( _listBox, 0 );
314
-    layout->addWidget( _props  , 1 );
315
-    layout->activate();
313
+    tqlayout->addWidget( _listBox, 0 );
314
+    tqlayout->addWidget( _props  , 1 );
315
+    tqlayout->activate();
316 316
 }
317 317
 
318 318
 
@@ -370,7 +370,7 @@ KCleanupPage::setup()
370 370
 
371 371
     // (Re-) Initialize list box.
372 372
 
373
-    // _listBox->resize( _listBox->sizeHint() );
373
+    // _listBox->resize( _listBox->tqsizeHint() );
374 374
     _listBox->setSelected( 0, true );
375 375
 }
376 376
 
@@ -425,34 +425,34 @@ KCleanupPage::storeProps( KCleanup * cleanup )
425 425
 /*--------------------------------------------------------------------------*/
426 426
 
427 427
 
428
-KCleanupListBox::KCleanupListBox( QWidget *parent )
429
-   : QListBox( parent )
428
+KCleanupListBox::KCleanupListBox( TQWidget *tqparent )
429
+   : TQListBox( tqparent )
430 430
 {
431 431
     _selection = 0;
432 432
 
433 433
     connect( this,
434
-	     SIGNAL( selectionChanged( QListBoxItem *) ),
435
-	     SLOT  ( selectCleanup   ( QListBoxItem *) ) );
434
+	     TQT_SIGNAL( selectionChanged( TQListBoxItem *) ),
435
+	     TQT_SLOT  ( selectCleanup   ( TQListBoxItem *) ) );
436 436
 }
437 437
 
438 438
 
439
-QSize
440
-KCleanupListBox::sizeHint() const
439
+TQSize
440
+KCleanupListBox::tqsizeHint() const
441 441
 {
442
-    // FIXME: Is this still needed with Qt 2.x?
442
+    // FIXME: Is this still needed with TQt 2.x?
443 443
 
444 444
     if ( count() < 1 )
445 445
     {
446
-	// As long as the list is empty, sizeHint() would default to
446
+	// As long as the list is empty, tqsizeHint() would default to
447 447
 	// (0,0) which is ALWAYS just a pain in the ass. We'd rather
448 448
 	// have an absolutely random value than this.
449
-	return QSize( 100, 100 );
449
+	return TQSize( 100, 100 );
450 450
     }
451 451
     else
452 452
     {
453 453
 	// Calculate the list contents and take 3D frames (2*2 pixels)
454 454
 	// into account.
455
-	return QSize ( maxItemWidth() + 5,
455
+	return TQSize ( maxItemWidth() + 5,
456 456
 		       count() * itemHeight( 0 ) + 4 );
457 457
     }
458 458
 }
@@ -470,7 +470,7 @@ KCleanupListBox::insert( KCleanup * cleanup )
470 470
 
471 471
 
472 472
 void
473
-KCleanupListBox::selectCleanup( QListBoxItem * listBoxItem )
473
+KCleanupListBox::selectCleanup( TQListBoxItem * listBoxItem )
474 474
 {
475 475
     KCleanupListBoxItem * item = (KCleanupListBoxItem *) listBoxItem;
476 476
 
@@ -499,7 +499,7 @@ KCleanupListBox::updateTitle( KCleanup * cleanup )
499 499
 
500 500
 KCleanupListBoxItem::KCleanupListBoxItem( KCleanupListBox *	listBox,
501 501
 					  KCleanup *		cleanup )
502
-    : QListBoxText( listBox )
502
+    : TQListBoxText( listBox )
503 503
     , _cleanup( cleanup )
504 504
 {
505 505
     CHECK_PTR( cleanup );
@@ -517,37 +517,37 @@ KCleanupListBoxItem::updateTitle()
517 517
 /*--------------------------------------------------------------------------*/
518 518
 
519 519
 
520
-KCleanupPropertiesPage::KCleanupPropertiesPage( QWidget *	parent,
520
+KCleanupPropertiesPage::KCleanupPropertiesPage( TQWidget *	tqparent,
521 521
 						KDirStatApp *	mainWin )
522
-   : QWidget( parent )
522
+   : TQWidget( tqparent )
523 523
    , _mainWin( mainWin )
524 524
 {
525
-    QVBoxLayout *outerBox = new QVBoxLayout( this, 0, 0 );	// border, spacing
525
+    TQVBoxLayout *outerBox = new TQVBoxLayout( this, 0, 0 );	// border, spacing
526 526
 
527 527
     // The topmost check box: "Enabled".
528 528
 
529
-    _enabled = new QCheckBox( i18n( "&Enabled" ), this );
529
+    _enabled = new TQCheckBox( i18n( "&Enabled" ), this );
530 530
     outerBox->addWidget( _enabled, 0 );
531 531
     outerBox->addSpacing( 7 );
532 532
     outerBox->addStretch();
533 533
 
534
-    connect( _enabled,	SIGNAL( toggled	    ( bool ) ),
535
-	     this,	SLOT  ( enableFields( bool ) ) );
534
+    connect( _enabled,	TQT_SIGNAL( toggled	    ( bool ) ),
535
+	     this,	TQT_SLOT  ( enableFields( bool ) ) );
536 536
 
537 537
 
538 538
     // All other widgets of this page are grouped together in a
539 539
     // separate subwidget so they can all be enabled / disabled
540 540
     // together.
541
-    _fields  = new QWidget( this );
541
+    _fields  = new TQWidget( this );
542 542
     outerBox->addWidget( _fields, 1 );
543 543
 
544
-    QVBoxLayout *fieldsBox = new QVBoxLayout( _fields );
544
+    TQVBoxLayout *fieldsBox = new TQVBoxLayout( _fields );
545 545
 
546 546
 
547
-    // Grid layout for the edit fields, their labels, some
547
+    // Grid tqlayout for the edit fields, their labels, some
548 548
     // explanatory text and the "recurse?" check box.
549 549
 
550
-    QGridLayout *grid = new QGridLayout( 7,	// rows
550
+    TQGridLayout *grid = new TQGridLayout( 7,	// rows
551 551
 					 2,	// cols
552 552
 					 4 );	// spacing
553 553
     fieldsBox->addLayout( grid, 0 );
@@ -560,60 +560,60 @@ KCleanupPropertiesPage::KCleanupPropertiesPage( QWidget *	parent,
560 560
 
561 561
     // Edit fields for cleanup action title and command line.
562 562
 
563
-    QLabel *label;
564
-    _title	= new QLineEdit( _fields );					grid->addWidget( _title,   0, 1 );
565
-    _command	= new QLineEdit( _fields );					grid->addWidget( _command, 1, 1 );
566
-    label	= new QLabel( _title,	i18n( "&Title:"		), _fields );	grid->addWidget( label,	   0, 0 );
567
-    label	= new QLabel( _command, i18n( "&Command Line:"	), _fields );	grid->addWidget( label,	   1, 0 );
563
+    TQLabel *label;
564
+    _title	= new TQLineEdit( _fields );					grid->addWidget( _title,   0, 1 );
565
+    _command	= new TQLineEdit( _fields );					grid->addWidget( _command, 1, 1 );
566
+    label	= new TQLabel( _title,	i18n( "&Title:"		), _fields );	grid->addWidget( label,	   0, 0 );
567
+    label	= new TQLabel( _command, i18n( "&Command Line:"	), _fields );	grid->addWidget( label,	   1, 0 );
568 568
 
569
-    label = new QLabel( i18n( "%p Full Path" ), _fields );
569
+    label = new TQLabel( i18n( "%p Full Path" ), _fields );
570 570
     grid->addWidget( label, 2, 1 );
571 571
 
572
-    label = new QLabel( i18n( "%n File / Directory Name Without Path" ), _fields );
572
+    label = new TQLabel( i18n( "%n File / Directory Name Without Path" ), _fields );
573 573
     grid->addWidget( label, 3, 1 );
574 574
 
575
-    label = new QLabel( i18n( "%t KDE Trash Directory" ), _fields );
575
+    label = new TQLabel( i18n( "%t KDE Trash Directory" ), _fields );
576 576
     grid->addWidget( label, 4, 1 );
577 577
 
578 578
 
579 579
     // "Recurse into subdirs" check box
580 580
 
581
-    _recurse = new QCheckBox( i18n( "&Recurse into Subdirectories" ), _fields );
581
+    _recurse = new TQCheckBox( i18n( "&Recurse into Subdirectories" ), _fields );
582 582
     grid->addWidget( _recurse, 5, 1 );
583 583
 
584 584
     // "Ask for confirmation" check box
585 585
 
586
-    _askForConfirmation = new QCheckBox( i18n( "&Ask for Confirmation" ), _fields );
586
+    _askForConfirmation = new TQCheckBox( i18n( "&Ask for Confirmation" ), _fields );
587 587
     grid->addWidget( _askForConfirmation, 6, 1 );
588 588
 
589 589
 
590 590
     // The "Works for..." check boxes, grouped together in a button group.
591 591
 
592
-    QButtonGroup *worksFor = new QButtonGroup( i18n( "Works for..." ), _fields );
593
-    QVBoxLayout *worksForBox = new QVBoxLayout( worksFor, 15, 2 );
592
+    TQButtonGroup *worksFor = new TQButtonGroup( i18n( "Works for..." ), _fields );
593
+    TQVBoxLayout *worksForBox = new TQVBoxLayout( worksFor, 15, 2 );
594 594
     fieldsBox->addWidget( worksFor, 0 );
595 595
     fieldsBox->addSpacing( 5 );
596 596
     fieldsBox->addStretch();
597 597
 
598
-    _worksForDir	= new QCheckBox( i18n( "&Directories"		), worksFor );
599
-    _worksForFile	= new QCheckBox( i18n( "&Files"			), worksFor );
600
-    _worksForDotEntry	= new QCheckBox( i18n( "<Files> P&seudo Entries"), worksFor );
598
+    _worksForDir	= new TQCheckBox( i18n( "&Directories"		), worksFor );
599
+    _worksForFile	= new TQCheckBox( i18n( "&Files"			), worksFor );
600
+    _worksForDotEntry	= new TQCheckBox( i18n( "<Files> P&seudo Entries"), worksFor );
601 601
 
602 602
     worksForBox->addWidget( _worksForDir	, 1 );
603 603
     worksForBox->addWidget( _worksForFile	, 1 );
604 604
     worksForBox->addWidget( _worksForDotEntry	, 1 );
605 605
 
606 606
     worksForBox->addSpacing( 5 );
607
-    _worksForProtocols = new QComboBox( false, worksFor );
607
+    _worksForProtocols = new TQComboBox( false, worksFor );
608 608
     worksForBox->addWidget( _worksForProtocols, 1 );
609 609
 
610 610
     _worksForProtocols->insertItem( i18n( "On Local Machine Only ('file:/' Protocol)" ) );
611 611
     _worksForProtocols->insertItem( i18n( "Network Transparent (ftp, smb, tar, ...)" ) );
612 612
 
613 613
 
614
-    // Grid layout for combo boxes at the bottom
614
+    // Grid tqlayout for combo boxes at the bottom
615 615
 
616
-    grid = new QGridLayout( 1,		// rows
616
+    grid = new TQGridLayout( 1,		// rows
617 617
 			    2,		// cols
618 618
 			    4 );	// spacing
619 619
 
@@ -625,10 +625,10 @@ KCleanupPropertiesPage::KCleanupPropertiesPage( QWidget *	parent,
625 625
 
626 626
     // The "Refresh policy" combo box
627 627
 
628
-    _refreshPolicy = new QComboBox( false, _fields );
628
+    _refreshPolicy = new TQComboBox( false, _fields );
629 629
     grid->addWidget( _refreshPolicy, row, 1 );
630 630
 
631
-    label = new QLabel( _refreshPolicy, i18n( "Refresh &Policy:" ), _fields );
631
+    label = new TQLabel( _refreshPolicy, i18n( "Refresh &Policy:" ), _fields );
632 632
     grid->addWidget( label, row++, 0 );
633 633
 
634 634
 
@@ -646,7 +646,7 @@ KCleanupPropertiesPage::KCleanupPropertiesPage( QWidget *	parent,
646 646
 
647 647
 
648 648
     outerBox->activate();
649
-    setMinimumSize( sizeHint() );
649
+    setMinimumSize( tqsizeHint() );
650 650
 }
651 651
 
652 652
 
@@ -700,34 +700,34 @@ KCleanupPropertiesPage::fields() const
700 700
 
701 701
 
702 702
 KGeneralSettingsPage::KGeneralSettingsPage( KSettingsDialog *	dialog,
703
-					    QWidget *		parent,
703
+					    TQWidget *		tqparent,
704 704
 					    KDirStatApp *	mainWin )
705
-    : KSettingsPage( dialog, parent )
705
+    : KSettingsPage( dialog, tqparent )
706 706
     , _mainWin( mainWin )
707 707
     , _treeView( mainWin->treeView() )
708 708
 {
709 709
 
710
-    // Create layout and widgets.
710
+    // Create tqlayout and widgets.
711 711
 
712
-    QVBoxLayout * layout	= new QVBoxLayout( this, 5,			// border
712
+    TQVBoxLayout * tqlayout	= new TQVBoxLayout( this, 5,			// border
713 713
 						   dialog->spacingHint() );	// spacing
714 714
 
715
-    QVGroupBox * gbox		= new QVGroupBox( i18n( "Directory Reading" ), this );
716
-    layout->addWidget( gbox );
715
+    TQVGroupBox * gbox		= new TQVGroupBox( i18n( "Directory Reading" ), this );
716
+    tqlayout->addWidget( gbox );
717 717
 
718
-    _crossFileSystems		= new QCheckBox( i18n( "Cross &File System Boundaries" ), gbox );
719
-    _enableLocalDirReader	= new QCheckBox( i18n( "Use Optimized &Local Directory Read Methods" ), gbox );
718
+    _crossFileSystems		= new TQCheckBox( i18n( "Cross &File System Boundaries" ), gbox );
719
+    _enableLocalDirReader	= new TQCheckBox( i18n( "Use Optimized &Local Directory Read Methods" ), gbox );
720 720
 
721
-    connect( _enableLocalDirReader,	SIGNAL( stateChanged( int ) ),
722
-	     this,			SLOT  ( checkEnabledState() ) );
721
+    connect( _enableLocalDirReader,	TQT_SIGNAL( stateChanged( int ) ),
722
+	     this,			TQT_SLOT  ( checkEnabledState() ) );
723 723
 
724
-    layout->addSpacing( 10 );
724
+    tqlayout->addSpacing( 10 );
725 725
 
726
-    gbox			= new QVGroupBox( i18n( "Animation" ), this );
727
-    layout->addWidget( gbox );
726
+    gbox			= new TQVGroupBox( i18n( "Animation" ), this );
727
+    tqlayout->addWidget( gbox );
728 728
 
729
-    _enableToolBarAnimation	= new QCheckBox( i18n( "P@cM@n Animation in Tool &Bar" ), gbox );
730
-    _enableTreeViewAnimation	= new QCheckBox( i18n( "P@cM@n Animation in Directory &Tree" ), gbox );
729
+    _enableToolBarAnimation	= new TQCheckBox( i18n( "P@cM@n Animation in Tool &Bar" ), gbox );
730
+    _enableTreeViewAnimation	= new TQCheckBox( i18n( "P@cM@n Animation in Directory &Tree" ), gbox );
731 731
 }
732 732
 
733 733
 
@@ -793,95 +793,95 @@ KGeneralSettingsPage::checkEnabledState()
793 793
 
794 794
 
795 795
 KTreemapPage::KTreemapPage( KSettingsDialog *	dialog,
796
-					    QWidget *		parent,
796
+					    TQWidget *		tqparent,
797 797
 					    KDirStatApp *	mainWin )
798
-    : KSettingsPage( dialog, parent )
798
+    : KSettingsPage( dialog, tqparent )
799 799
     , _mainWin( mainWin )
800 800
 {
801 801
     // kdDebug() << k_funcinfo << endl;
802 802
 
803
-    QVBoxLayout * layout = new QVBoxLayout( this, 0, 0 ); // parent, border, spacing
803
+    TQVBoxLayout * tqlayout = new TQVBoxLayout( this, 0, 0 ); // tqparent, border, spacing
804 804
 
805
-    QVBox * vbox	= new QVBox( this );
805
+    TQVBox * vbox	= new TQVBox( this );
806 806
     vbox->setSpacing( dialog->spacingHint() );
807
-    layout->addWidget( vbox );
807
+    tqlayout->addWidget( vbox );
808 808
 
809
-    _squarify		= new QCheckBox( i18n( "S&quarify Treemap"	), vbox );
810
-    _doCushionShading	= new QCheckBox( i18n( "Use C&ushion Shading"	), vbox );
809
+    _squarify		= new TQCheckBox( i18n( "S&quarify Treemap"	), vbox );
810
+    _doCushionShading	= new TQCheckBox( i18n( "Use C&ushion Shading"	), vbox );
811 811
 
812 812
 
813 813
     // Cushion parameters
814 814
 
815
-    QVGroupBox * gbox	= new QVGroupBox( i18n( "Cushion Parameters" ), vbox );
815
+    TQVGroupBox * gbox	= new TQVGroupBox( i18n( "Cushion Parameters" ), vbox );
816 816
     _cushionParams	= gbox;
817 817
     gbox->addSpace( 7 );
818
-    gbox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
818
+    gbox->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
819 819
 
820
-    QLabel * label	= new QLabel( i18n( "Ambient &Light" ), gbox );
821
-    QHBox * hbox	= new QHBox( gbox );
822
-    _ambientLight	= new QSlider ( MinAmbientLight, MaxAmbientLight, 10,	// min, max, pageStep
823
-					DefaultAmbientLight, Horizontal, hbox );
824
-    _ambientLightSB	= new QSpinBox( MinAmbientLight, MaxAmbientLight, 1,	// min, max, step
820
+    TQLabel * label	= new TQLabel( i18n( "Ambient &Light" ), gbox );
821
+    TQHBox * hbox	= new TQHBox( gbox );
822
+    _ambientLight	= new TQSlider ( MinAmbientLight, MaxAmbientLight, 10,	// min, max, pageStep
823
+					DefaultAmbientLight,Qt::Horizontal, hbox );
824
+    _ambientLightSB	= new TQSpinBox( MinAmbientLight, MaxAmbientLight, 1,	// min, max, step
825 825
 					hbox );
826
-    _ambientLightSB->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
826
+    _ambientLightSB->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
827 827
     label->setBuddy( _ambientLightSB );
828 828
 
829 829
     gbox->addSpace( 7 );
830
-    label		= new QLabel( i18n( "&Height Scale" ), gbox );
831
-    hbox		= new QHBox( gbox );
832
-    _heightScalePercent = new QSlider( MinHeightScalePercent, MaxHeightScalePercent, 10,   // min, max, pageStep
833
-				       DefaultHeightScalePercent, Horizontal, hbox );
834
-    _heightScalePercentSB = new QSpinBox( MinHeightScalePercent, MaxHeightScalePercent, 1, // min, max, step
830
+    label		= new TQLabel( i18n( "&Height Scale" ), gbox );
831
+    hbox		= new TQHBox( gbox );
832
+    _heightScalePercent = new TQSlider( MinHeightScalePercent, MaxHeightScalePercent, 10,   // min, max, pageStep
833
+				       DefaultHeightScalePercent,Qt::Horizontal, hbox );
834
+    _heightScalePercentSB = new TQSpinBox( MinHeightScalePercent, MaxHeightScalePercent, 1, // min, max, step
835 835
 					  hbox );
836
-    _heightScalePercentSB->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
836
+    _heightScalePercentSB->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
837 837
     label->setBuddy( _heightScalePercentSB );
838 838
 
839 839
     gbox->addSpace( 10 );
840
-    _ensureContrast	= new QCheckBox( i18n( "Draw Lines if Lo&w Contrast"	), gbox );
840
+    _ensureContrast	= new TQCheckBox( i18n( "Draw Lines if Lo&w Contrast"	), gbox );
841 841
 
842 842
 
843
-    hbox		= new QHBox( gbox );
844
-    _forceCushionGrid	= new QCheckBox( i18n( "Always Draw &Grid"		), hbox );
843
+    hbox		= new TQHBox( gbox );
844
+    _forceCushionGrid	= new TQCheckBox( i18n( "Always Draw &Grid"		), hbox );
845 845
     addHStretch( hbox );
846 846
 
847
-    _cushionGridColorL	= new QLabel( "	   " + i18n( "Gr&id Color: " ), hbox );
847
+    _cushionGridColorL	= new TQLabel( "	   " + i18n( "Gr&id Color: " ), hbox );
848 848
     _cushionGridColor	= new KColorButton( hbox );
849 849
     _cushionGridColorL->setBuddy( _cushionGridColor );
850
-    _cushionGridColorL->setAlignment( AlignRight | AlignVCenter );
850
+    _cushionGridColorL->tqsetAlignment( AlignRight | AlignVCenter );
851 851
 
852 852
     // addVStretch( vbox );
853 853
 
854 854
 
855 855
     // Plain treemaps parameters
856 856
 
857
-    _plainTileParams	= new QHGroupBox( i18n( "Colors for Plain Treemaps" ), vbox );
857
+    _plainTileParams	= new TQHGroupBox( i18n( "Colors for Plain Treemaps" ), vbox );
858 858
 
859 859
     _plainTileParams->addSpace( 7 );
860
-    label		= new QLabel( i18n( "&Files: " ), _plainTileParams );
860
+    label		= new TQLabel( i18n( "&Files: " ), _plainTileParams );
861 861
     _fileFillColor	= new KColorButton( _plainTileParams );
862 862
     label->setBuddy( _fileFillColor );
863
-    label->setAlignment( AlignRight | AlignVCenter );
863
+    label->tqsetAlignment( AlignRight | AlignVCenter );
864 864
 
865
-    label		= new QLabel( "	   " + i18n( "&Directories: " ), _plainTileParams );
865
+    label		= new TQLabel( "	   " + i18n( "&Directories: " ), _plainTileParams );
866 866
     _dirFillColor	= new KColorButton( _plainTileParams );
867 867
     label->setBuddy( _dirFillColor );
868
-    label->setAlignment( AlignRight | AlignVCenter );
868
+    label->tqsetAlignment( AlignRight | AlignVCenter );
869 869
 
870
-    label		= new QLabel( i18n( "Gr&id: " ), _plainTileParams );
870
+    label		= new TQLabel( i18n( "Gr&id: " ), _plainTileParams );
871 871
     _outlineColor	= new KColorButton( _plainTileParams );
872 872
     label->setBuddy( _outlineColor );
873
-    label->setAlignment( AlignRight | AlignVCenter );
873
+    label->tqsetAlignment( AlignRight | AlignVCenter );
874 874
 
875 875
 
876 876
     // Misc
877 877
 
878
-    QWidget * gridBox	= new QWidget( vbox );
879
-    QGridLayout * grid	= new QGridLayout( gridBox, 2, 3, dialog->spacingHint() ); // rows, cols, spacing
878
+    TQWidget * gridBox	= new TQWidget( vbox );
879
+    TQGridLayout * grid	= new TQGridLayout( gridBox, 2, 3, dialog->spacingHint() ); // rows, cols, spacing
880 880
     grid->setColStretch( 0, 0 ); // (col, stretch) don't stretch this column
881 881
     grid->setColStretch( 1, 0 ); // don't stretch
882 882
     grid->setColStretch( 2, 1 ); // stretch this as you like
883 883
 
884
-    label		= new QLabel( i18n( "Hi&ghlight R&ectangle: " ), gridBox );
884
+    label		= new TQLabel( i18n( "Hi&ghlight R&ectangle: " ), gridBox );
885 885
     _highlightColor	= new KColorButton( gridBox );
886 886
     label->setBuddy( _highlightColor );
887 887
 
@@ -889,35 +889,35 @@ KTreemapPage::KTreemapPage( KSettingsDialog *	dialog,
889 889
     grid->addWidget( _highlightColor,	0, 1 );
890 890
 
891 891
 
892
-    label		= new QLabel( i18n( "Minim&um Treemap Tile Size: " ), gridBox );
893
-    _minTileSize	= new QSpinBox( 0, 30, 1, gridBox ); // min, max, step, parent
892
+    label		= new TQLabel( i18n( "Minim&um Treemap Tile Size: " ), gridBox );
893
+    _minTileSize	= new TQSpinBox( 0, 30, 1, gridBox ); // min, max, step, tqparent
894 894
     label->setBuddy( _minTileSize );
895 895
 
896 896
     grid->addWidget( label,		1, 0 );
897 897
     grid->addWidget( _minTileSize,	1, 1 );
898 898
 
899
-    _autoResize		= new QCheckBox( i18n( "Auto-&Resize Treemap" ), vbox );
899
+    _autoResize		= new TQCheckBox( i18n( "Auto-&Resize Treemap" ), vbox );
900 900
 
901 901
 
902 902
     // Connections
903 903
 
904 904
 
905
-    connect( _ambientLight,		SIGNAL( valueChanged(int) ),
906
-	     _ambientLightSB,		SLOT  ( setValue    (int) ) );
905
+    connect( _ambientLight,		TQT_SIGNAL( valueChanged(int) ),
906
+	     _ambientLightSB,		TQT_SLOT  ( setValue    (int) ) );
907 907
 
908
-    connect( _ambientLightSB,		SIGNAL( valueChanged(int) ),
909
-	     _ambientLight,		SLOT  ( setValue    (int) ) );
908
+    connect( _ambientLightSB,		TQT_SIGNAL( valueChanged(int) ),
909
+	     _ambientLight,		TQT_SLOT  ( setValue    (int) ) );
910 910
 
911 911
 
912
-    connect( _heightScalePercent,	SIGNAL( valueChanged(int) ),
913
-	     _heightScalePercentSB,	SLOT  ( setValue    (int) ) );
912
+    connect( _heightScalePercent,	TQT_SIGNAL( valueChanged(int) ),
913
+	     _heightScalePercentSB,	TQT_SLOT  ( setValue    (int) ) );
914 914
 
915
-    connect( _heightScalePercentSB,	SIGNAL( valueChanged(int) ),
916
-	     _heightScalePercent,	SLOT  ( setValue    (int) ) );
915
+    connect( _heightScalePercentSB,	TQT_SIGNAL( valueChanged(int) ),
916
+	     _heightScalePercent,	TQT_SLOT  ( setValue    (int) ) );
917 917
 
918 918
 
919
-    connect( _doCushionShading, SIGNAL( stateChanged( int ) ), this, SLOT( checkEnabledState() ) );
920
-    connect( _forceCushionGrid, SIGNAL( stateChanged( int ) ), this, SLOT( checkEnabledState() ) );
919
+    connect( _doCushionShading, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( checkEnabledState() ) );
920
+    connect( _forceCushionGrid, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( checkEnabledState() ) );
921 921
 
922 922
     checkEnabledState();
923 923
 }
@@ -971,10 +971,10 @@ KTreemapPage::revertToDefaults()
971 971
     _minTileSize->setValue( DefaultMinTileSize );
972 972
     _autoResize->setChecked( true );
973 973
 
974
-    _cushionGridColor->setColor ( QColor( 0x80, 0x80, 0x80 ) );
974
+    _cushionGridColor->setColor ( TQColor( 0x80, 0x80, 0x80 ) );
975 975
     _outlineColor->setColor	( black			     );
976
-    _fileFillColor->setColor	( QColor( 0xde, 0x8d, 0x53 ) );
977
-    _dirFillColor->setColor	( QColor( 0x10, 0x7d, 0xb4 ) );
976
+    _fileFillColor->setColor	( TQColor( 0xde, 0x8d, 0x53 ) );
977
+    _dirFillColor->setColor	( TQColor( 0x10, 0x7d, 0xb4 ) );
978 978
     _highlightColor->setColor	( red			     );
979 979
 }
980 980
 
@@ -995,10 +995,10 @@ KTreemapPage::setup()
995 995
     _minTileSize->setValue		( config->readNumEntry ( "MinTileSize"		, DefaultMinTileSize ) );
996 996
     _autoResize->setChecked		( config->readBoolEntry( "AutoResize"		, true	) );
997 997
 
998
-    _cushionGridColor->setColor ( readColorEntry( config, "CushionGridColor"	, QColor( 0x80, 0x80, 0x80 ) ) );
998
+    _cushionGridColor->setColor ( readColorEntry( config, "CushionGridColor"	, TQColor( 0x80, 0x80, 0x80 ) ) );
999 999
     _outlineColor->setColor	( readColorEntry( config, "OutlineColor"	, black			     ) );
1000
-    _fileFillColor->setColor	( readColorEntry( config, "FileFillColor"	, QColor( 0xde, 0x8d, 0x53 ) ) );
1001
-    _dirFillColor->setColor	( readColorEntry( config, "DirFillColor"	, QColor( 0x10, 0x7d, 0xb4 ) ) );
1000
+    _fileFillColor->setColor	( readColorEntry( config, "FileFillColor"	, TQColor( 0xde, 0x8d, 0x53 ) ) );
1001
+    _dirFillColor->setColor	( readColorEntry( config, "DirFillColor"	, TQColor( 0x10, 0x7d, 0xb4 ) ) );
1002 1002
     _highlightColor->setColor	( readColorEntry( config, "HighlightColor"	, red			     ) );
1003 1003
 
1004 1004
     _ambientLightSB->setValue( _ambientLight->value() );
@@ -1023,8 +1023,8 @@ KTreemapPage::checkEnabledState()
1023 1023
 }
1024 1024
 
1025 1025
 
1026
-QColor
1027
-KTreemapPage::readColorEntry( KConfig * config, const char * entryName, QColor defaultColor )
1026
+TQColor
1027
+KTreemapPage::readColorEntry( KConfig * config, const char * entryName, TQColor defaultColor )
1028 1028
 {
1029 1029
     return config->readColorEntry( entryName, &defaultColor );
1030 1030
 }
@@ -1032,22 +1032,22 @@ KTreemapPage::readColorEntry( KConfig * config, const char * entryName, QColor d
1032 1032
 
1033 1033
 
1034 1034
 void
1035
-addHStretch( QWidget * parent )
1035
+addHStretch( TQWidget * tqparent )
1036 1036
 {
1037
-    QWidget * stretch = new QWidget( parent );
1038
-    stretch->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,	// hor
1039
-					 QSizePolicy::Minimum,		// vert
1037
+    TQWidget * stretch = new TQWidget( tqparent );
1038
+    stretch->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding,	// hor
1039
+					 TQSizePolicy::Minimum,		// vert
1040 1040
 					 1,				// hstretch
1041 1041
 					 0 ) );				// vstretch
1042 1042
 }
1043 1043
 
1044 1044
 
1045 1045
 void
1046
-addVStretch( QWidget * parent )
1046
+addVStretch( TQWidget * tqparent )
1047 1047
 {
1048
-    QWidget * stretch = new QWidget( parent );
1049
-    stretch->setSizePolicy( QSizePolicy( QSizePolicy::Minimum,		// hor
1050
-					 QSizePolicy::Expanding,	// vert
1048
+    TQWidget * stretch = new TQWidget( tqparent );
1049
+    stretch->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum,		// hor
1050
+					 TQSizePolicy::Expanding,	// vert
1051 1051
 					 0,				// hstretch
1052 1052
 					 1 ) );				// vstretch
1053 1053
 }

+ 74
- 66
kdirstat/kdirstatsettings.h View File

@@ -16,23 +16,23 @@
16 16
 #   include <config.h>
17 17
 #endif
18 18
 
19
-#include <qlistbox.h>
19
+#include <tqlistbox.h>
20 20
 #include <kdialogbase.h>
21 21
 #include "kcleanup.h"
22 22
 #include "kcleanupcollection.h"
23 23
 #include "kdirstatapp.h"
24 24
 
25 25
 
26
-class QCheckBox;
27
-class QComboBox;
28
-class QHGroupBox;
29
-class QLabel;
30
-class QLineEdit;
31
-class QRadioButton;
32
-class QSlider;
33
-class QSpinBox;
34
-class QVGroupBox;
35
-class QWidget;
26
+class TQCheckBox;
27
+class TQComboBox;
28
+class TQHGroupBox;
29
+class TQLabel;
30
+class TQLineEdit;
31
+class TQRadioButton;
32
+class TQSlider;
33
+class TQSpinBox;
34
+class TQVGroupBox;
35
+class TQWidget;
36 36
 
37 37
 class KColorButton;
38 38
 
@@ -56,14 +56,15 @@ namespace KDirStat
56 56
     class KSettingsDialog: public KDialogBase
57 57
     {
58 58
 	Q_OBJECT
59
+  TQ_OBJECT
59 60
 
60 61
     public:
61 62
 
62 63
 	/**
63 64
 	 * Constructor.
64 65
 	 *
65
-	 * Notice there is no parent widget passed but the application's main
66
-	 * window so its functions can be accessed. The parent of this widget
66
+	 * Notice there is no tqparent widget passed but the application's main
67
+	 * window so its functions can be accessed. The tqparent of this widget
67 68
 	 * is always 0 since this is a dialog.
68 69
 	 **/
69 70
 
@@ -76,11 +77,11 @@ namespace KDirStat
76 77
 
77 78
 
78 79
 	/**
79
-	 * Overwritten from @ref QDialog() to get any chance to set up the
80
+	 * Overwritten from @ref TQDialog() to get any chance to set up the
80 81
 	 * dialog contents when the dialog gets shown - every time, not just at
81 82
 	 * program startup when the settings dialog is created (!).
82 83
 	 *
83
-	 * QTabDialog used to have 'aboutToShow()' for a good reason, but the
84
+	 * TQTabDialog used to have 'aboutToShow()' for a good reason, but the
84 85
 	 * creators of @ref KDialogBase in their infinite wisdom chose not to
85 86
 	 * include anything similar. How is that supposed to work, anyway?
86 87
 	 * Everything I saw in any other KDE sources looked to me like ugly
@@ -89,7 +90,7 @@ namespace KDirStat
89 90
 	 * certainly not be the way to go.
90 91
 	 *
91 92
 	 * This overwritten show() method sends that @ref aboutToShow() signal
92
-	 * before calling the parent class show() method.
93
+	 * before calling the tqparent class show() method.
93 94
 	 **/
94 95
 	virtual void show();
95 96
 
@@ -138,9 +139,10 @@ namespace KDirStat
138 139
      * Note: This class contains pure virtuals - it cannot be
139 140
      * instantiated. Rather, derive your own classes from this one.
140 141
      **/
141
-    class KSettingsPage: public QWidget
142
+    class KSettingsPage: public TQWidget
142 143
     {
143 144
 	Q_OBJECT
145
+  TQ_OBJECT
144 146
 
145 147
     public:
146 148
 
@@ -151,7 +153,7 @@ namespace KDirStat
151 153
 	 * e.g., apply(), setup(), revertToDefaults().
152 154
 	 **/
153 155
 	KSettingsPage( KSettingsDialog *	dialog,
154
-		       QWidget *		parent );
156
+		       TQWidget *		tqparent );
155 157
 
156 158
 	/**
157 159
 	 * Destructor.
@@ -217,6 +219,7 @@ namespace KDirStat
217 219
     class KTreeColorsPage: public KSettingsPage
218 220
     {
219 221
 	Q_OBJECT
222
+  TQ_OBJECT
220 223
 
221 224
     public:
222 225
 
@@ -224,7 +227,7 @@ namespace KDirStat
224 227
 	 * Constructor
225 228
 	 **/
226 229
 	KTreeColorsPage( KSettingsDialog *	dialog,
227
-			 QWidget *		parent,
230
+			 TQWidget *		tqparent,
228 231
 			 KDirStatApp *		mainWin );
229 232
 
230 233
 	/**
@@ -270,9 +273,9 @@ namespace KDirStat
270 273
 
271 274
 	KDirStatApp *		_mainWin;
272 275
 	KDirTreeView *		_treeView;
273
-	QSlider *		_slider;
276
+	TQSlider *		_slider;
274 277
 	KColorButton *		_colorButton [ KDirStatSettingsMaxColorButton ];
275
-	QLabel *		_colorLabel  [ KDirStatSettingsMaxColorButton ];
278
+	TQLabel *		_colorLabel  [ KDirStatSettingsMaxColorButton ];
276 279
 
277 280
 	int			_maxButtons;
278 281
 
@@ -295,6 +298,7 @@ namespace KDirStat
295 298
     class KCleanupPage: public KSettingsPage
296 299
     {
297 300
 	Q_OBJECT
301
+  TQ_OBJECT
298 302
 
299 303
     public:
300 304
 
@@ -302,7 +306,7 @@ namespace KDirStat
302 306
 	 * Constructor
303 307
 	 **/
304 308
 	KCleanupPage( KSettingsDialog *	dialog,
305
-		      QWidget *		parent,
309
+		      TQWidget *		tqparent,
306 310
 		      KDirStatApp *	mainWin );
307 311
 
308 312
 	/**
@@ -392,24 +396,25 @@ namespace KDirStat
392 396
      *
393 397
      * This is meant as a substitute for a tabbed dialog inside the tabbed
394 398
      * dialog which would be much too wide and possibly confusing. Plus, this
395
-     * list box is supposed to take care of its own geometry - the normal
399
+     * list box is supposed to take care of its own tqgeometry - the normal
396 400
      * dumbass list box obviously cannot do that. It just uses some random
397
-     * geometry, relying on scroll bars for everything else. But in this
401
+     * tqgeometry, relying on scroll bars for everything else. But in this
398 402
      * special case we want all items to be visible at all times without scroll
399 403
      * bars.
400 404
      *
401 405
      * @short cleanup list box
402 406
      **/
403
-    class KCleanupListBox: public QListBox
407
+    class KCleanupListBox: public TQListBox
404 408
     {
405 409
 	Q_OBJECT
410
+  TQ_OBJECT
406 411
 
407 412
     public:
408 413
 
409 414
 	/**
410 415
 	 * Constructor.
411 416
 	 **/
412
-	KCleanupListBox( QWidget * parent = 0 );
417
+	KCleanupListBox( TQWidget * tqparent = 0 );
413 418
 
414 419
 	/**
415 420
 	 * Destructor.
@@ -421,7 +426,7 @@ namespace KDirStat
421 426
 	 * without scrolling. In fact, we never want to see a scroll bar with
422 427
 	 * this kind of list box.
423 428
 	 **/
424
-	virtual QSize sizeHint() const;
429
+	virtual TQSize tqsizeHint() const;
425 430
 
426 431
 	/**
427 432
 	 * Insert an entry for a cleanup action into the list box. Uses the
@@ -454,7 +459,7 @@ namespace KDirStat
454 459
 	/**
455 460
 	 * Select an item.
456 461
 	 **/
457
-	void selectCleanup( QListBoxItem * item );
462
+	void selectCleanup( TQListBoxItem * item );
458 463
 
459 464
 
460 465
     protected:
@@ -468,7 +473,7 @@ namespace KDirStat
468 473
     /**
469 474
      * List box item for a KCleanupListBox.
470 475
      **/
471
-    class KCleanupListBoxItem: public QListBoxText
476
+    class KCleanupListBoxItem: public TQListBoxText
472 477
     {
473 478
     public:
474 479
 
@@ -504,16 +509,17 @@ namespace KDirStat
504 509
     /**
505 510
      * Properties page for one cleanup action.
506 511
      **/
507
-    class KCleanupPropertiesPage: public QWidget
512
+    class KCleanupPropertiesPage: public TQWidget
508 513
     {
509 514
 	Q_OBJECT
515
+  TQ_OBJECT
510 516
 
511 517
     public:
512 518
 
513 519
 	/**
514 520
 	 * Constructor
515 521
 	 **/
516
-	KCleanupPropertiesPage( QWidget *	parent,
522
+	KCleanupPropertiesPage( TQWidget *	tqparent,
517 523
 				KDirStatApp *	mainWin );
518 524
 
519 525
 	/**
@@ -540,18 +546,18 @@ namespace KDirStat
540 546
 
541 547
     protected:
542 548
 
543
-	QString			_id;
544
-	QCheckBox *		_enabled;
545
-	QWidget *		_fields;
546
-	QLineEdit *		_title;
547
-	QLineEdit *		_command;
548
-	QCheckBox *		_recurse;
549
-	QCheckBox *		_askForConfirmation;
550
-	QCheckBox *		_worksForDir;
551
-	QCheckBox *		_worksForFile;
552
-	QCheckBox *		_worksForDotEntry;
553
-	QComboBox *		_worksForProtocols;
554
-	QComboBox *		_refreshPolicy;
549
+	TQString			_id;
550
+	TQCheckBox *		_enabled;
551
+	TQWidget *		_fields;
552
+	TQLineEdit *		_title;
553
+	TQLineEdit *		_command;
554
+	TQCheckBox *		_recurse;
555
+	TQCheckBox *		_askForConfirmation;
556
+	TQCheckBox *		_worksForDir;
557
+	TQCheckBox *		_worksForFile;
558
+	TQCheckBox *		_worksForDotEntry;
559
+	TQComboBox *		_worksForProtocols;
560
+	TQComboBox *		_refreshPolicy;
555 561
 
556 562
 	KDirStatApp *		_mainWin;
557 563
 
@@ -565,6 +571,7 @@ namespace KDirStat
565 571
     class KGeneralSettingsPage: public KSettingsPage
566 572
     {
567 573
 	Q_OBJECT
574
+  TQ_OBJECT
568 575
 
569 576
     public:
570 577
 
@@ -572,7 +579,7 @@ namespace KDirStat
572 579
 	 * Constructor
573 580
 	 **/
574 581
 	KGeneralSettingsPage( KSettingsDialog *	dialog,
575
-			      QWidget *		parent,
582
+			      TQWidget *		tqparent,
576 583
 			      KDirStatApp *	mainWin );
577 584
 
578 585
 	/**
@@ -618,11 +625,11 @@ namespace KDirStat
618 625
 	KDirStatApp *	_mainWin;
619 626
 	KDirTreeView *	_treeView;
620 627
 
621
-	QCheckBox *	_crossFileSystems;
622
-	QCheckBox *	_enableLocalDirReader;
628
+	TQCheckBox *	_crossFileSystems;
629
+	TQCheckBox *	_enableLocalDirReader;
623 630
 
624
-	QCheckBox *	_enableToolBarAnimation;
625
-	QCheckBox *	_enableTreeViewAnimation;
631
+	TQCheckBox *	_enableToolBarAnimation;
632
+	TQCheckBox *	_enableTreeViewAnimation;
626 633
 
627 634
     }; // class KGeneralSettingsPage
628 635
 
@@ -634,6 +641,7 @@ namespace KDirStat
634 641
     class KTreemapPage: public KSettingsPage
635 642
     {
636 643
 	Q_OBJECT
644
+  TQ_OBJECT
637 645
 
638 646
     public:
639 647
 
@@ -641,7 +649,7 @@ namespace KDirStat
641 649
 	 * Constructor
642 650
 	 **/
643 651
 	KTreemapPage( KSettingsDialog *	dialog,
644
-		      QWidget *		parent,
652
+		      TQWidget *		tqparent,
645 653
 		      KDirStatApp *	mainWin );
646 654
 
647 655
 	/**
@@ -691,9 +699,9 @@ namespace KDirStat
691 699
 	/**
692 700
 	 * Convenience method to read a color from 'config'.
693 701
 	 **/
694
-	QColor readColorEntry( KConfig * 	config,
702
+	TQColor readColorEntry( KConfig * 	config,
695 703
 			       const char * 	entryName,
696
-			       QColor 		defaultColor );
704
+			       TQColor 		defaultColor );
697 705
 
698 706
 	// Data members
699 707
 
@@ -702,24 +710,24 @@ namespace KDirStat
702 710
 	
703 711
 	// Widgets
704 712
 	
705
-	QCheckBox *		_squarify;
706
-	QCheckBox *		_doCushionShading;
707
-	QVGroupBox *		_cushionParams;
708
-	QSlider *		    _ambientLight;
709
-	QSpinBox *		    _ambientLightSB;
710
-	QSlider *		    _heightScalePercent;
711
-	QSpinBox *		    _heightScalePercentSB;
712
-	QCheckBox *		    _ensureContrast;
713
-	QCheckBox *		    _forceCushionGrid;
713
+	TQCheckBox *		_squarify;
714
+	TQCheckBox *		_doCushionShading;
715
+	TQVGroupBox *		_cushionParams;
716
+	TQSlider *		    _ambientLight;
717
+	TQSpinBox *		    _ambientLightSB;
718
+	TQSlider *		    _heightScalePercent;
719
+	TQSpinBox *		    _heightScalePercentSB;
720
+	TQCheckBox *		    _ensureContrast;
721
+	TQCheckBox *		    _forceCushionGrid;
714 722
 	KColorButton *		    _cushionGridColor;
715
-	QLabel *		    _cushionGridColorL;
716
-	QHGroupBox *		_plainTileParams;
723
+	TQLabel *		    _cushionGridColorL;
724
+	TQHGroupBox *		_plainTileParams;
717 725
 	KColorButton *		    _fileFillColor;
718 726
 	KColorButton *		    _dirFillColor;
719 727
 	KColorButton *		    _outlineColor;
720 728
 	KColorButton *		_highlightColor;
721
-	QSpinBox *		_minTileSize;
722
-	QCheckBox *		_autoResize;
729
+	TQSpinBox *		_minTileSize;
730
+	TQCheckBox *		_autoResize;
723 731
 	
724 732
     }; // class KTreemapPage
725 733
 
@@ -729,12 +737,12 @@ namespace KDirStat
729 737
 /**
730 738
  * Add a horizontal stretch widget to take all excess space.
731 739
  **/
732
-void addHStretch( QWidget * parent );
740
+void addHStretch( TQWidget * tqparent );
733 741
 
734 742
 /**
735 743
  * Add a vertical stretch widget to take all excess space.
736 744
  **/
737
-void addVStretch( QWidget * parent );
745
+void addVStretch( TQWidget * tqparent );
738 746
 
739 747
 
740 748
 

+ 106
- 106
kdirstat/kdirtree.cpp View File

@@ -11,7 +11,7 @@
11 11
 #include "config.h"
12 12
 #include <string.h>
13 13
 #include <sys/errno.h>
14
-#include <qtimer.h>
14
+#include <tqtimer.h>
15 15
 #include <kapp.h>
16 16
 #include <klocale.h>
17 17
 #include <kconfig.h>
@@ -29,9 +29,9 @@ using namespace KDirStat;
29 29
 
30 30
 
31 31
 KFileInfo::KFileInfo( KDirTree   *	tree,
32
-		      KDirInfo  *	parent,
32
+		      KDirInfo  *	tqparent,
33 33
 		      const char *	name )
34
-    : _parent( parent )
34
+    : _parent( tqparent )
35 35
     , _next( 0 )
36 36
     , _tree( tree )
37 37
 {
@@ -47,11 +47,11 @@ KFileInfo::KFileInfo( KDirTree   *	tree,
47 47
 }
48 48
 
49 49
 
50
-KFileInfo::KFileInfo( const QString &	filenameWithoutPath,
50
+KFileInfo::KFileInfo( const TQString &	filenameWithoutPath,
51 51
 		      struct stat *	statInfo,
52 52
 		      KDirTree    *	tree,
53
-		      KDirInfo	  *	parent )
54
-    : _parent( parent )
53
+		      KDirInfo	  *	tqparent )
54
+    : _parent( tqparent )
55 55
     , _next( 0 )
56 56
     , _tree( tree )
57 57
 {
@@ -102,15 +102,15 @@ KFileInfo::KFileInfo( const QString &	filenameWithoutPath,
102 102
 
103 103
 KFileInfo::KFileInfo(  const KFileItem	* fileItem,
104 104
 		       KDirTree    	* tree,
105
-		       KDirInfo		* parent )
106
-    : _parent( parent )
105
+		       KDirInfo		* tqparent )
106
+    : _parent( tqparent )
107 107
     , _next( 0 )
108 108
     , _tree( tree )
109 109
 {
110 110
     CHECK_PTR( fileItem );
111 111
 
112 112
     _isLocalFile = fileItem->isLocalFile();
113
-    _name	 = parent ? fileItem->name() : fileItem->url().url();
113
+    _name	 = tqparent ? fileItem->name() : fileItem->url().url();
114 114
     _device	 = 0;
115 115
     _mode	 = fileItem->mode();
116 116
     _links	 = 1;
@@ -151,7 +151,7 @@ KFileInfo::~KFileInfo()
151 151
 
152 152
     /**
153 153
      * The destructor should also take care about unlinking this object from
154
-     * its parent's children list, but regrettably that just doesn't work: At
154
+     * its tqparent's tqchildren list, but regrettably that just doesn't work: At
155 155
      * this point (within the destructor) parts of the object are already
156 156
      * destroyed, e.g., the virtual table - virtual methods don't work any
157 157
      * more. Thus, somebody from outside must call deletingChild() just prior
@@ -181,34 +181,34 @@ KFileInfo::size() const
181 181
 }
182 182
 
183 183
 
184
-QString
184
+TQString
185 185
 KFileInfo::url() const
186 186
 {
187 187
     if ( _parent )
188 188
     {
189
-	QString parentUrl = _parent->url();
189
+	TQString tqparentUrl = _parent->url();
190 190
 
191 191
 	if ( isDotEntry() )	// don't append "/." for dot entries
192
-	    return parentUrl;
192
+	    return tqparentUrl;
193 193
 
194
-	if ( parentUrl == "/" ) // avoid duplicating slashes
195
-	    return parentUrl + _name;
194
+	if ( tqparentUrl == "/" ) // avoid duplicating slashes
195
+	    return tqparentUrl + _name;
196 196
 	else
197
-	    return parentUrl + "/" + _name;
197
+	    return tqparentUrl + "/" + _name;
198 198
     }
199 199
     else
200 200
 	return _name;
201 201
 }
202 202
 
203 203
 
204
-QString
204
+TQString
205 205
 KFileInfo::debugUrl() const
206 206
 {
207 207
     return url() + ( isDotEntry() ? "/<Files>" : "" );
208 208
 }
209 209
 
210 210
 
211
-QString
211
+TQString
212 212
 KFileInfo::urlPart( int targetLevel ) const
213 213
 {
214 214
     int level = treeLevel();	// Cache this - it's expensive!
@@ -225,7 +225,7 @@ KFileInfo::urlPart( int targetLevel ) const
225 225
     while ( level > targetLevel )
226 226
     {
227 227
 	level--;
228
-	item = item->parent();
228
+	item = item->tqparent();
229 229
     }
230 230
 
231 231
     return item->name();
@@ -236,12 +236,12 @@ int
236 236
 KFileInfo::treeLevel() const
237 237
 {
238 238
     int		level	= 0;
239
-    KFileInfo *	parent	= _parent;
239
+    KFileInfo *	tqparent	= _parent;
240 240
 
241
-    while ( parent )
241
+    while ( tqparent )
242 242
     {
243 243
 	level++;
244
-	parent = parent->parent();
244
+	tqparent = tqparent->tqparent();
245 245
     }
246 246
 
247 247
     return level;
@@ -271,7 +271,7 @@ KFileInfo::isInSubtree( const KFileInfo *subtree ) const
271 271
 	if ( ancestor == subtree )
272 272
 	    return true;
273 273
 
274
-	ancestor = ancestor->parent();
274
+	ancestor = ancestor->tqparent();
275 275
     }
276 276
 
277 277
     return false;
@@ -279,7 +279,7 @@ KFileInfo::isInSubtree( const KFileInfo *subtree ) const
279 279
 
280 280
 
281 281
 KFileInfo *
282
-KFileInfo::locate( QString url, bool findDotEntries )
282
+KFileInfo::locate( TQString url, bool findDotEntries )
283 283
 {
284 284
     if ( ! url.startsWith( _name ) )
285 285
 	return 0;
@@ -296,11 +296,11 @@ KFileInfo::locate( QString url, bool findDotEntries )
296 296
 	{
297 297
 	    if ( _name.right(1) != "/" &&	// and this is not the root directory
298 298
 		 ! isDotEntry() )		// or a dot entry:
299
-		return 0;			// This can't be any of our children.
299
+		return 0;			// This can't be any of our tqchildren.
300 300
 	}
301 301
 
302 302
 
303
-	// Search all children
303
+	// Search all tqchildren
304 304
 
305 305
 	KFileInfo *child = firstChild();
306 306
 
@@ -323,12 +323,12 @@ KFileInfo::locate( QString url, bool findDotEntries )
323 323
 	// Search the dot entry if there is one - but only if there is no more
324 324
 	// path delimiter left in the URL. The dot entry contains files only,
325 325
 	// and their names may not contain the path delimiter, nor can they
326
-	// have children. This check is not strictly necessary, but it may
327
-	// speed up things a bit if we don't search the non-directory children
326
+	// have tqchildren. This check is not strictly necessary, but it may
327
+	// speed up things a bit if we don't search the non-directory tqchildren
328 328
 	// if the rest of the URL consists of several pathname components.
329 329
 
330 330
 	if ( dotEntry() &&
331
-	     url.find ( "/" ) < 0 )	// No (more) "/" in this URL
331
+	     url.tqfind ( "/" ) < 0 )	// No (more) "/" in this URL
332 332
 	{
333 333
 	    return dotEntry()->locate( url, findDotEntries );
334 334
 	}
@@ -343,9 +343,9 @@ KFileInfo::locate( QString url, bool findDotEntries )
343 343
 
344 344
 
345 345
 KDirInfo::KDirInfo( KDirTree *	tree,
346
-		    KDirInfo *	parent,
346
+		    KDirInfo *	tqparent,
347 347
 		    bool	asDotEntry )
348
-    : KFileInfo( tree, parent )