Browse Source

TQt4 port krename

This enables compilation under both Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/krename@1238984 283d02a7-25f6-0310-bc7c-ecb5cbfe19
tags/v3.5.13
tpearson 8 years ago
parent
commit
ce0c60d7b9
68 changed files with 1997 additions and 2052 deletions
  1. 47
    55
      krename/ProgressDialog.cpp
  2. 20
    19
      krename/ProgressDialog.h
  3. 128
    178
      krename/batchrenamer.cpp
  4. 55
    55
      krename/batchrenamer.h
  5. 25
    34
      krename/commandplugin.cpp
  6. 9
    8
      krename/commandplugin.h
  7. 32
    32
      krename/confdialog.cpp
  8. 9
    8
      krename/confdialog.h
  9. 33
    33
      krename/coorddialog.cpp
  10. 15
    13
      krename/coorddialog.h
  11. 20
    20
      krename/dateplugin.cpp
  12. 5
    5
      krename/dateplugin.h
  13. 37
    37
      krename/datetime.cpp
  14. 23
    22
      krename/datetime.h
  15. 24
    24
      krename/dsdirselectdialog.cpp
  16. 10
    9
      krename/dsdirselectdialog.h
  17. 29
    29
      krename/encodingplugin.cpp
  18. 12
    11
      krename/encodingplugin.h
  19. 9
    21
      krename/fileoperation.cpp
  20. 9
    8
      krename/fileoperation.h
  21. 30
    30
      krename/fileplugin.cpp
  22. 15
    14
      krename/fileplugin.h
  23. 2
    2
      krename/firststartdlg.cpp
  24. 3
    2
      krename/firststartdlg.h
  25. 17
    17
      krename/guimodeselector.cpp
  26. 7
    7
      krename/guimodeselector.h
  27. 32
    40
      krename/helpdialog.cpp
  28. 30
    28
      krename/helpdialog.h
  29. 19
    19
      krename/kmyhistorycombo.cpp
  30. 11
    10
      krename/kmyhistorycombo.h
  31. 73
    73
      krename/kmylistbox.cpp
  32. 37
    36
      krename/kmylistbox.h
  33. 45
    45
      krename/kmylistview.cpp
  34. 38
    37
      krename/kmylistview.h
  35. 5
    5
      krename/krecursivelister.cpp
  36. 10
    9
      krename/krecursivelister.h
  37. 9
    9
      krename/krenamedcop.h
  38. 311
    311
      krename/krenameimpl.cpp
  39. 91
    90
      krename/krenameimpl.h
  40. 5
    5
      krename/main.cpp
  41. 41
    41
      krename/mydirplugin.cpp
  42. 26
    25
      krename/mydirplugin.h
  43. 15
    15
      krename/myinputdialog.cpp
  44. 16
    15
      krename/myinputdialog.h
  45. 41
    41
      krename/numberdialog.cpp
  46. 11
    9
      krename/numberdialog.h
  47. 63
    63
      krename/permission.cpp
  48. 26
    25
      krename/permission.h
  49. 18
    18
      krename/pictureplugin.cpp
  50. 9
    8
      krename/pictureplugin.h
  51. 7
    7
      krename/plugin.cpp
  52. 15
    14
      krename/plugin.h
  53. 10
    10
      krename/pluginloader.cpp
  54. 11
    11
      krename/pluginloader.h
  55. 113
    113
      krename/profiledlg.cpp
  56. 11
    10
      krename/profiledlg.h
  57. 46
    46
      krename/replacedialog.cpp
  58. 19
    18
      krename/replacedialog.h
  59. 22
    22
      krename/tabs.cpp
  60. 12
    11
      krename/tabs.h
  61. 11
    11
      krename/threadedlister.cpp
  62. 17
    16
      krename/threadedlister.h
  63. 20
    20
      krename/translitplugin.cpp
  64. 15
    14
      krename/translitplugin.h
  65. 19
    19
      krename/undodialog.cpp
  66. 10
    9
      krename/undodialog.h
  67. 22
    22
      krename/wizard.cpp
  68. 10
    9
      krename/wizard.h

+ 47
- 55
krename/ProgressDialog.cpp View File

@@ -16,14 +16,10 @@
16 16
  ***************************************************************************/
17 17
 
18 18
 // QT Includes
19
-#include <qlayout.h>
20
-#include <qprogressbar.h>
21
-#include <qtimer.h>
22
-#include <qtooltip.h>
23
-
24
-#if QT_VERSION < 0x030100
25
-    #include <qregexp.h>
26
-#endif
19
+#include <tqlayout.h>
20
+#include <tqprogressbar.h>
21
+#include <tqtimer.h>
22
+#include <tqtooltip.h>
27 23
 
28 24
 // KDE includes
29 25
 #include <kapplication.h>
@@ -34,7 +30,7 @@
34 30
 #include <kpushbutton.h>
35 31
 #include <krun.h>
36 32
 
37
-#include <qfile.h>
33
+#include <tqfile.h>
38 34
 
39 35
 // Own includes
40 36
 #include "ProgressDialog.h"
@@ -48,8 +44,8 @@
48 44
 // update user interface every 1/2 second
49 45
 #define TIMER_INTERVAL 500
50 46
 
51
-ProgressDialog::ProgressDialog( QWidget* parent, const char* name, WFlags fl )
52
-    : QWidget( parent, name, fl )
47
+ProgressDialog::ProgressDialog( TQWidget* tqparent, const char* name, WFlags fl )
48
+    : TQWidget( tqparent, name, fl )
53 49
 {
54 50
     renamedFiles = NULL;
55 51
 
@@ -57,11 +53,11 @@ ProgressDialog::ProgressDialog( QWidget* parent, const char* name, WFlags fl )
57 53
     setCaption( i18n("Progress") );
58 54
     setIcon( BarIcon( "krename" ) );
59 55
 
60
-    ProgressDialogLayout = new QVBoxLayout( this, 11, 6 );
61
-    Layout1 = new QHBoxLayout( 0, 0, 6 );
62
-    QHBoxLayout* Layout2 = new QHBoxLayout( 0, 6, 6 );
56
+    ProgressDialogLayout = new TQVBoxLayout( this, 11, 6 );
57
+    Layout1 = new TQHBoxLayout( 0, 0, 6 );
58
+    TQHBoxLayout* Layout2 = new TQHBoxLayout( 0, 6, 6 );
63 59
 
64
-    bar = new QProgressBar( this );
60
+    bar = new TQProgressBar( this );
65 61
     bar->setProgress( 0 );
66 62
 
67 63
     buttonCancel = new KPushButton( i18n("&Cancel"), this );
@@ -69,24 +65,24 @@ ProgressDialog::ProgressDialog( QWidget* parent, const char* name, WFlags fl )
69 65
     display = new KListView( this );
70 66
     display->addColumn( i18n("Messages") );
71 67
     display->addColumn( "sort" );
72
-    display->setColumnWidthMode( 0, QListView::Maximum );
73
-    display->setColumnWidthMode( 1, QListView::Manual );
68
+    display->setColumnWidthMode( 0, TQListView::Maximum );
69
+    display->setColumnWidthMode( 1, TQListView::Manual );
74 70
     display->setColumnWidth( 1, 0 );
75 71
     display->setSorting( -1 );
76 72
     display->setUpdatesEnabled( false );
77 73
     
78
-    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
74
+    TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
79 75
 
80 76
     buttonUndo = new KPushButton( this );
81 77
     buttonUndo->setText( i18n("&Undo") );
82 78
     buttonUndo->setEnabled( false );
83 79
     
84 80
     mnuButton = new KPopupMenu( this );
85
-    mnuButton->insertItem( i18n("Restart KRename..."), this, SLOT( restart() ));
81
+    mnuButton->insertItem( i18n("Restart KRename..."), this, TQT_SLOT( restart() ));
86 82
     mnuButton->insertSeparator();
87
-    mnuButton->insertItem( i18n("Rename Processed Files &Again..."), this, SLOT( again() ), 0, MNU_DONE_ID );
88
-    mnuButton->insertItem( i18n("Rename Unprocessed Files &Again..."), this, SLOT( unAgain() ), 0, MNU_ERROR_ID );
89
-    mnuButton->insertItem( i18n("Rename All Files &Again..."), this, SLOT( allAgain() ));
83
+    mnuButton->insertItem( i18n("Rename Processed Files &Again..."), this, TQT_SLOT( again() ), 0, MNU_DONE_ID );
84
+    mnuButton->insertItem( i18n("Rename Unprocessed Files &Again..."), this, TQT_SLOT( unAgain() ), 0, MNU_ERROR_ID );
85
+    mnuButton->insertItem( i18n("Rename All Files &Again..."), this, TQT_SLOT( allAgain() ));
90 86
     buttonRestart = new KPushButton( this );
91 87
     buttonRestart->setText( i18n( "&Rename More..." ) );
92 88
     buttonRestart->setPopup( mnuButton );
@@ -114,15 +110,15 @@ ProgressDialog::ProgressDialog( QWidget* parent, const char* name, WFlags fl )
114 110
     ProgressDialogLayout->addWidget( display );
115 111
     ProgressDialogLayout->addLayout( Layout1 );
116 112
 
117
-    connect( buttonClose, SIGNAL(clicked()), this, SLOT(quitAll()));
118
-    connect( buttonOpenDest, SIGNAL(clicked()), this, SLOT(openDest()));
119
-    connect( buttonCancel, SIGNAL( clicked()), this, SLOT(canceled() ));
120
-    connect( buttonUndo, SIGNAL( clicked() ), this, SLOT( undo() ) );
113
+    connect( buttonClose, TQT_SIGNAL(clicked()), this, TQT_SLOT(quitAll()));
114
+    connect( buttonOpenDest, TQT_SIGNAL(clicked()), this, TQT_SLOT(openDest()));
115
+    connect( buttonCancel, TQT_SIGNAL( clicked()), this, TQT_SLOT(canceled() ));
116
+    connect( buttonUndo, TQT_SIGNAL( clicked() ), this, TQT_SLOT( undo() ) );
121 117
     
122 118
     m_count = 0;
123 119
     m_canceled = false;
124
-    m_timer = new QTimer( this, "m_timer" );
125
-    connect( m_timer, SIGNAL( timeout() ), this, SLOT( slotTimer() ) );
120
+    m_timer = new TQTimer( this, "m_timer" );
121
+    connect( m_timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimer() ) );
126 122
     
127 123
     hide();
128 124
 }
@@ -135,11 +131,11 @@ ProgressDialog::~ProgressDialog()
135 131
         delete [] renamedFiles;
136 132
 }
137 133
 
138
-void ProgressDialog::print( QString text, QString pixmap )
134
+void ProgressDialog::print( TQString text, TQString pixmap )
139 135
 {
140 136
     if( !m_timer->isActive() )
141 137
     {
142
-        KApplication::setOverrideCursor( Qt::waitCursor );
138
+        KApplication::setOverrideCursor( TQt::waitCursor );
143 139
         m_timer->start( TIMER_INTERVAL );
144 140
     }
145 141
     
@@ -152,29 +148,29 @@ void ProgressDialog::print( QString text, QString pixmap )
152 148
     display->insertItem( item );
153 149
 }
154 150
 
155
-void ProgressDialog::error( QString text )
151
+void ProgressDialog::error( TQString text )
156 152
 {
157 153
     if( !m_timer->isActive() )
158 154
     {
159
-        KApplication::setOverrideCursor( Qt::waitCursor );
155
+        KApplication::setOverrideCursor( TQt::waitCursor );
160 156
         m_timer->start( TIMER_INTERVAL );
161 157
     }
162 158
     
163 159
     //TODO: simplify this (breaks i18n)
164
-    KListViewItem* item = new KListViewItem( display, QString( i18n("Error: %1") ).arg( QString::null ) + simplify( text ), count() );
160
+    KListViewItem* item = new KListViewItem( display, TQString( i18n("Error: %1") ).tqarg( TQString() ) + simplify( text ), count() );
165 161
     item->setPixmap( 0, SmallIcon("cancel") );
166 162
     display->insertItem( item );
167 163
 }
168 164
 
169
-void ProgressDialog::warning( QString text )
165
+void ProgressDialog::warning( TQString text )
170 166
 {
171 167
     if( !m_timer->isActive() )
172 168
     {
173
-        KApplication::setOverrideCursor( Qt::waitCursor );
169
+        KApplication::setOverrideCursor( TQt::waitCursor );
174 170
         m_timer->start( TIMER_INTERVAL );
175 171
     }
176 172
     
177
-    KListViewItem* item = new KListViewItem( display, QString( i18n("Warning: %1") ).arg( QString::null ) + simplify( text ), count() );
173
+    KListViewItem* item = new KListViewItem( display, TQString( i18n("Warning: %1") ).tqarg( TQString() ) + simplify( text ), count() );
178 174
     item->setPixmap( 0, SmallIcon("idea") );
179 175
     display->insertItem( item );    
180 176
 }
@@ -211,7 +207,7 @@ void ProgressDialog::done( int errors, int successfull, bool allowundo )
211 207
 
212 208
 void ProgressDialog::show()
213 209
 {
214
-    QWidget::show();
210
+    TQWidget::show();
215 211
 
216 212
     int w = kapp->desktop()->width();
217 213
     int h = kapp->desktop()->height();
@@ -220,7 +216,7 @@ void ProgressDialog::show()
220 216
 
221 217
 void ProgressDialog::restart()
222 218
 {
223
-    QWidget* krename = KRenameImpl::launch( QRect( 0, 0, 0, 0 ), KURL::List() );
219
+    TQWidget* krename = KRenameImpl::launch( TQRect( 0, 0, 0, 0 ), KURL::List() );
224 220
     krename->show();
225 221
     close();
226 222
 }
@@ -232,7 +228,7 @@ void ProgressDialog::again()
232 228
         if( !renamedFiles[i].error )
233 229
             list.append( renamedFiles[i].dst );
234 230
 
235
-    QWidget* krename = KRenameImpl::launch( QRect( 0, 0, 0, 0 ), list );
231
+    TQWidget* krename = KRenameImpl::launch( TQRect( 0, 0, 0, 0 ), list );
236 232
     krename->show();
237 233
     close();
238 234
 }
@@ -244,7 +240,7 @@ void ProgressDialog::unAgain()
244 240
         if( renamedFiles[i].error )
245 241
             list.append( renamedFiles[i].src );
246 242
     
247
-    QWidget* krename = KRenameImpl::launch( QRect( 0, 0, 0, 0 ), list );
243
+    TQWidget* krename = KRenameImpl::launch( TQRect( 0, 0, 0, 0 ), list );
248 244
     krename->show();
249 245
     close();
250 246
 }
@@ -255,7 +251,7 @@ void ProgressDialog::allAgain()
255 251
     for( unsigned int i = 0; i < m_size; i++ )
256 252
         list.append( renamedFiles[i].error ? renamedFiles[i].src : renamedFiles[i].dst );
257 253
     
258
-    QWidget* krename = KRenameImpl::launch( QRect( 0, 0, 0, 0 ), list );
254
+    TQWidget* krename = KRenameImpl::launch( TQRect( 0, 0, 0, 0 ), list );
259 255
     krename->show();
260 256
     close();
261 257
 }
@@ -265,9 +261,9 @@ void ProgressDialog::openDest()
265 261
     new KRun( m_dest );
266 262
 }
267 263
 
268
-QString ProgressDialog::count()
264
+TQString ProgressDialog::count()
269 265
 {
270
-    QString s;
266
+    TQString s;
271 267
     return s.sprintf( "%0*i", 7, ++m_count );
272 268
 }
273 269
 
@@ -290,15 +286,11 @@ void ProgressDialog::canceled()
290 286
     m_canceled = true;
291 287
 }
292 288
 
293
-const QString ProgressDialog::simplify( const QString & text )
289
+const TQString ProgressDialog::simplify( const TQString & text )
294 290
 {
295 291
     // make error messages fit in one line!
296
-    QString t( text );
297
-#if QT_VERSION >= 0x030100
292
+    TQString t( text );
298 293
     t.remove( '\n' );
299
-#else
300
-    t.replace( QRegExp("\n"), "" );
301
-#endif    
302 294
 
303 295
     return t;
304 296
 }
@@ -309,7 +301,7 @@ void ProgressDialog::undo()
309 301
     FileOperation fop;
310 302
     
311 303
     m_timer->start( TIMER_INTERVAL );
312
-    KApplication::setOverrideCursor( Qt::waitCursor );
304
+    KApplication::setOverrideCursor( TQt::waitCursor );
313 305
     for( unsigned int i = 0; i < m_size; i++ )
314 306
     {
315 307
         setProgress( i );
@@ -319,11 +311,11 @@ void ProgressDialog::undo()
319 311
             if( renamedFiles[i].dir ) { 
320 312
                 /** handle renamed directories and their contents
321 313
                   */
322
-                QString ddir = renamedFiles[i].dst.path();
323
-                QString sdir = renamedFiles[i].src.path();
314
+                TQString ddir = renamedFiles[i].dst.path();
315
+                TQString sdir = renamedFiles[i].src.path();
324 316
                 for( unsigned int c = i+1; c < m_size; c++ ) {
325
-                    QString dpath = renamedFiles[c].dst.path();
326
-                    QString spath = renamedFiles[c].src.path();
317
+                    TQString dpath = renamedFiles[c].dst.path();
318
+                    TQString spath = renamedFiles[c].src.path();
327 319
 
328 320
                     if( spath.startsWith( ddir ) )
329 321
                     {
@@ -349,7 +341,7 @@ void ProgressDialog::undo()
349 341
     m_timer->stop();
350 342
     KApplication::restoreOverrideCursor();
351 343
         
352
-    QWidget* krename = KRenameImpl::launch( QRect( 0, 0, 0, 0 ), list );
344
+    TQWidget* krename = KRenameImpl::launch( TQRect( 0, 0, 0, 0 ), list );
353 345
     krename->show();
354 346
     close();
355 347
 }

+ 20
- 19
krename/ProgressDialog.h View File

@@ -18,7 +18,7 @@
18 18
 #ifndef PROGRESSDIALOG_H
19 19
 #define PROGRESSDIALOG_H
20 20
 
21
-#include <qwidget.h>
21
+#include <tqwidget.h>
22 22
 #include <kurl.h>
23 23
 
24 24
 typedef struct RenamedList
@@ -34,18 +34,19 @@ class KRenameImpl;
34 34
 class KListView;
35 35
 class KPopupMenu;
36 36
 class KPushButton;
37
-class QProgressBar;
38
-class QStringList;
39
-class QStrList;
40
-class QString;
41
-class QTimer;
42
-class QHBoxLayout;
43
-class QVBoxLayout;
44
-class ProgressDialog : public QWidget
37
+class TQProgressBar;
38
+class TQStringList;
39
+class TQStrList;
40
+class TQString;
41
+class TQTimer;
42
+class TQHBoxLayout;
43
+class TQVBoxLayout;
44
+class ProgressDialog : public TQWidget
45 45
 { 
46 46
     Q_OBJECT
47
+  TQ_OBJECT
47 48
     public:
48
-        ProgressDialog( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
49
+        ProgressDialog( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
49 50
         ~ProgressDialog();
50 51
 
51 52
         void setProgressTotalSteps( int t );
@@ -57,9 +58,9 @@ class ProgressDialog : public QWidget
57 58
         inline void setCreatedDirectories( const KURL::List & list );
58 59
 
59 60
         void done( int errors, int successfull, bool allowundo );
60
-        void print( QString text, QString pixmap = 0 );
61
-        void error( QString text );
62
-        void warning( QString text );
61
+        void print( TQString text, TQString pixmap = 0 );
62
+        void error( TQString text );
63
+        void warning( TQString text );
63 64
         
64 65
     public slots:
65 66
         void show();
@@ -76,8 +77,8 @@ class ProgressDialog : public QWidget
76 77
         void slotTimer();
77 78
         
78 79
     private:
79
-        QString count();
80
-        const QString simplify( const QString & text );
80
+        TQString count();
81
+        const TQString simplify( const TQString & text );
81 82
         
82 83
     protected:
83 84
         RenamedList* renamedFiles;
@@ -88,7 +89,7 @@ class ProgressDialog : public QWidget
88 89
         bool m_canceled;
89 90
         KURL::List m_created;
90 91
         
91
-        QTimer* m_timer;
92
+        TQTimer* m_timer;
92 93
         
93 94
         KListView* display;
94 95
         KPushButton* buttonClose;
@@ -98,10 +99,10 @@ class ProgressDialog : public QWidget
98 99
         KPushButton* buttonCancel;
99 100
         KPopupMenu* mnuButton;
100 101
 
101
-        QProgressBar* bar;
102
+        TQProgressBar* bar;
102 103
 
103
-        QVBoxLayout* ProgressDialogLayout;
104
-        QHBoxLayout* Layout1;
104
+        TQVBoxLayout* ProgressDialogLayout;
105
+        TQHBoxLayout* Layout1;
105 106
 };
106 107
 
107 108
 

+ 128
- 178
krename/batchrenamer.cpp View File

@@ -33,8 +33,8 @@
33 33
 #include <sys/stat.h>
34 34
 
35 35
 // QT includes
36
-#include <qdir.h>
37
-#include <qregexp.h>
36
+#include <tqdir.h>
37
+#include <tqregexp.h>
38 38
 
39 39
 // KDE includes
40 40
 #include <kapplication.h>
@@ -62,7 +62,7 @@ BatchRenamer::~BatchRenamer()
62 62
 {
63 63
 }
64 64
 
65
-void BatchRenamer::processFiles( ProgressDialog* p, QObject* object )
65
+void BatchRenamer::processFiles( ProgressDialog* p, TQObject* object )
66 66
 {
67 67
     delete object;
68 68
     t.start();
@@ -76,7 +76,7 @@ void BatchRenamer::processFiles( ProgressDialog* p, QObject* object )
76 76
         if( m_mode == RENAME ) {// final Path = source Path
77 77
             m_files[i].dst.directory = m_files[i].src.directory;
78 78
             m_files[i].dst.url = m_files[i].src.url;
79
-            m_files[i].dst.url.setFileName( QString::null );
79
+            m_files[i].dst.url.setFileName( TQString() );
80 80
         } else {
81 81
             m_files[i].dst.directory = dirname.path();
82 82
             m_files[i].dst.url = dirname;
@@ -118,19 +118,19 @@ void BatchRenamer::processFiles( ProgressDialog* p, QObject* object )
118 118
                 if( m_files[c].src.directory.left( m_files[i].src.name.length() + 1 )
119 119
                     == ( m_files[i].src.name + "/" ) ) {
120 120
 
121
-                    m_files[c].src.directory.replace( 0, m_files[i].src.name.length(), m_files[i].dst.name );
121
+                    m_files[c].src.directory.tqreplace( 0, m_files[i].src.name.length(), m_files[i].dst.name );
122 122
                     m_files[c].src.url.setPath( BatchRenamer::buildFilename( &m_files[c].src, true ) );
123 123
                 }
124 124
             }
125 125
         }
126 126
     }
127 127
 
128
-    p->print( QString( i18n("Filenames Processed after %1 seconds.")).arg(t.elapsed()/1000) );
128
+    p->print( TQString( i18n("Filenames Processed after %1 seconds.")).tqarg(t.elapsed()/1000) );
129 129
 
130 130
     work( p );
131 131
 }
132 132
 
133
-QString BatchRenamer::processString( QString text, QString oldname, int i )
133
+TQString BatchRenamer::processString( TQString text, TQString oldname, int i )
134 134
 {
135 135
     /*
136 136
      * Come on! Grep for this text and help me!
@@ -140,7 +140,7 @@ QString BatchRenamer::processString( QString text, QString oldname, int i )
140 140
      *
141 141
      * Krename will have problems with files
142 142
      * which contain one of the following
143
-     * unicode characters: 60000, 60001, 60002
143
+     * tqunicode characters: 60000, 60001, 60002
144 144
      * 60003, 60004, 60005, 60006.
145 145
      *
146 146
      * This is not a good solution, if you have a
@@ -180,10 +180,10 @@ QString BatchRenamer::processString( QString text, QString oldname, int i )
180 180
     return text;
181 181
 }
182 182
 
183
-QString BatchRenamer::parsePlugins( int i, const QString& text, int type )
183
+TQString BatchRenamer::parsePlugins( int i, const TQString& text, int type )
184 184
 {
185
-    QPtrListIterator<PluginLoader::PluginLibrary> it( plug->libs );
186
-    QString ret = text;
185
+    TQPtrListIterator<PluginLoader::PluginLibrary> it( plug->libs );
186
+    TQString ret = text;
187 187
 
188 188
     if( type == TYPE_FINAL_FILE )
189 189
         ret = "";
@@ -198,10 +198,10 @@ QString BatchRenamer::parsePlugins( int i, const QString& text, int type )
198 198
     return ret;
199 199
 }
200 200
 
201
-void BatchRenamer::createPreview( QListView* list )
201
+void BatchRenamer::createPreview( TQListView* list )
202 202
 {
203 203
     KMyListViewItem* item1 = NULL;
204
-    QString tmp;
204
+    TQString tmp;
205 205
 
206 206
     m_counters.clear();
207 207
     for( unsigned int i = 0; i < m_files.count(); i++) 
@@ -218,12 +218,12 @@ void BatchRenamer::createPreview( QListView* list )
218 218
         bool modified = applyManualChanges( i );
219 219
 
220 220
 
221
-        QString sname = BatchRenamer::buildFilename( &m_files[i].src, false );
221
+        TQString sname = BatchRenamer::buildFilename( &m_files[i].src, false );
222 222
 
223 223
         // Let's run the plugins that change the final filename,
224 224
         // i.e the encodingsplugin
225 225
         m_files[i].dst.name = parsePlugins( i, m_files[i].dst.name, TYPE_FINAL_FILENAME );
226
-        QString dname = BatchRenamer::buildFilename( &m_files[i].dst, false );
226
+        TQString dname = BatchRenamer::buildFilename( &m_files[i].dst, false );
227 227
         
228 228
         item1 = new KMyListViewItem( modified, list, item1, sname, dname );
229 229
     }
@@ -234,14 +234,14 @@ void BatchRenamer::work( ProgressDialog* p )
234 234
     // TODO: use CopyJob here
235 235
 
236 236
     FileOperation fop;
237
-    QFile* fundo ( NULL );
238
-    QTextStream* tundo ( NULL );
237
+    TQFile* fundo ( NULL );
238
+    TQTextStream* tundo ( NULL );
239 239
 
240 240
     if( undo ) {
241 241
         // Create header for undo script
242
-        fundo = new QFile( m_undoScript );
242
+        fundo = new TQFile( m_undoScript );
243 243
         if( fundo->open( IO_WriteOnly ) ) {
244
-            tundo = new QTextStream( fundo );
244
+            tundo = new TQTextStream( fundo );
245 245
             writeUndoScript( tundo );
246 246
         } else {
247 247
             undo = false;
@@ -258,11 +258,11 @@ void BatchRenamer::work( ProgressDialog* p )
258 258
      * Give the user some information...
259 259
      */
260 260
     if( m_mode == COPY)
261
-        p->print( QString( i18n("Files will be copied to: %1") ).arg(m_files[0].dst.directory) );
261
+        p->print( TQString( i18n("Files will be copied to: %1") ).tqarg(m_files[0].dst.directory) );
262 262
     else if( m_mode == MOVE )
263
-        p->print( QString( i18n("Files will be moved to: %1") ).arg(m_files[0].dst.directory) );
263
+        p->print( TQString( i18n("Files will be moved to: %1") ).tqarg(m_files[0].dst.directory) );
264 264
     else if( m_mode == LINK )
265
-        p->print( QString( i18n("Symbolic links will be created in: %1") ).arg(m_files[0].dst.directory) );
265
+        p->print( TQString( i18n("Symbolic links will be created in: %1") ).tqarg(m_files[0].dst.directory) );
266 266
     else if( m_mode == RENAME )
267 267
         p->print( i18n("Input files will be renamed.") );
268 268
     
@@ -302,7 +302,7 @@ void BatchRenamer::work( ProgressDialog* p )
302 302
          * The plugin should return an error message in this case!
303 303
          */
304 304
 
305
-        QString eplug = parsePlugins( i, QString::null, TYPE_FINAL_FILE );
305
+        TQString eplug = parsePlugins( i, TQString(), TYPE_FINAL_FILE );
306 306
         if( !eplug.isEmpty() ) {
307 307
             p->error( eplug );
308 308
             error++;
@@ -317,25 +317,25 @@ void BatchRenamer::work( ProgressDialog* p )
317 317
                 (*tundo) << "mv --force -b --suffix=.krename_ \"" << m_files[i].dst.name
318 318
                          << "\" \"" << m_files[i].src.name << "\"" << endl;
319 319
             } else
320
-                p->warning( QString( i18n("Undo is not possible for remote file: %1") ).arg( dst.prettyURL() ) );
320
+                p->warning( TQString( i18n("Undo is not possible for remote file: %1") ).tqarg( dst.prettyURL() ) );
321 321
 
322 322
     }
323 323
 
324 324
     if( !p->wasCancelled() ) {
325
-        QPtrListIterator<PluginLoader::PluginLibrary> it( plug->libs );
325
+        TQPtrListIterator<PluginLoader::PluginLibrary> it( plug->libs );
326 326
         for( ; it.current(); ++it ) {
327 327
             if( (*it)->usePlugin )
328 328
                 (*it)->plugin->finished();
329 329
         }
330 330
     }
331 331
 
332
-    const QString m = QString( i18n("Renamed %1 files successfully.") ).arg(i-error);
332
+    const TQString m = TQString( i18n("Renamed %1 files successfully.") ).tqarg(i-error);
333 333
     ( i - error ) ? p->print( m ) : p->warning( m );
334 334
 
335 335
     if( error > 0 ) 
336
-        p->warning( QString( i18n("%2 errors occurred!") ).arg(error));
336
+        p->warning( TQString( i18n("%2 errors occurred!") ).tqarg(error));
337 337
 
338
-    p->print( QString( i18n("Elapsed time: %1 seconds") ).arg( t.elapsed()/1000 ), "kalarm" );
338
+    p->print( TQString( i18n("Elapsed time: %1 seconds") ).tqarg( t.elapsed()/1000 ), "kalarm" );
339 339
     p->print( i18n("KRename finished the renaming process."), "krename" );
340 340
     p->print( i18n("Press close to quit!") );
341 341
     p->setRenamedFiles( renamedFiles, m_files.count() );
@@ -356,105 +356,81 @@ void BatchRenamer::work( ProgressDialog* p )
356 356
     delete this;
357 357
 }
358 358
 
359
-void BatchRenamer::escape( QString & text, const QString & token, const QString & sequence )
359
+void BatchRenamer::escape( TQString & text, const TQString & token, const TQString & sequence )
360 360
 {
361
-    /*
362
-     * NEVER, ABSOLUTELY NEVER change pos = 0
363
-     * to pos = -1, it won't work !
364
-     * This bug took hours to find and was
365
-     * a serious bug in 1.7.
366
-     */
367
-#if QT_VERSION >= 0x030100
368
-    text.replace( token, sequence );
369
-#else
370
-    int pos = 0;
371
-    do {
372
-       pos = text.find( token, pos );
373
-       if( pos >= 0 )
374
-           text.replace( pos, token.length(), sequence );
375
-    } while ( pos >= 0 );
376
-#endif
361
+    text.tqreplace( token, sequence );
377 362
 }
378 363
 
379
-QString & BatchRenamer::doEscape( QString & text, bool filename )
364
+TQString & BatchRenamer::doEscape( TQString text, bool filename )
380 365
 {
381 366
     if( filename ) {
382
-        BatchRenamer::escape( text, "&", QChar( 60000 ) );
383
-        BatchRenamer::escape( text, "$", QChar( 60001 ) );
384
-        BatchRenamer::escape( text, "%", QChar( 60002 ) );
385
-        BatchRenamer::escape( text, "#", QChar( 60004 ) );
386
-        BatchRenamer::escape( text, "[", QChar( 60005 ) );
387
-        BatchRenamer::escape( text, "]", QChar( 60006 ) );
388
-        BatchRenamer::escape( text, "\\", QChar( 60007 ) );
389
-        BatchRenamer::escape( text, "/", QChar( 60008 ) );
390
-        BatchRenamer::escape( text, "{", QChar( 60009 ) );        
391
-        BatchRenamer::escape( text, "}", QChar( 60010 ) );        
392
-        BatchRenamer::escape( text, "*", QChar( 60011 ) );        
367
+        BatchRenamer::escape( text, "&", TQChar( 60000 ) );
368
+        BatchRenamer::escape( text, "$", TQChar( 60001 ) );
369
+        BatchRenamer::escape( text, "%", TQChar( 60002 ) );
370
+        BatchRenamer::escape( text, "#", TQChar( 60004 ) );
371
+        BatchRenamer::escape( text, "[", TQChar( 60005 ) );
372
+        BatchRenamer::escape( text, "]", TQChar( 60006 ) );
373
+        BatchRenamer::escape( text, "\\", TQChar( 60007 ) );
374
+        BatchRenamer::escape( text, "/", TQChar( 60008 ) );
375
+        BatchRenamer::escape( text, "{", TQChar( 60009 ) );        
376
+        BatchRenamer::escape( text, "}", TQChar( 60010 ) );        
377
+        BatchRenamer::escape( text, "*", TQChar( 60011 ) );        
393 378
     } else {
394
-        BatchRenamer::escape( text, "\\&", QChar( 60000 ) );
395
-        BatchRenamer::escape( text, "\\$", QChar( 60001 ) );
396
-        BatchRenamer::escape( text, "\\%", QChar( 60002 ) );
397
-        BatchRenamer::escape( text, "\\#", QChar( 60004 ) );
398
-        BatchRenamer::escape( text, "\\[", QChar( 60005 ) );
399
-        BatchRenamer::escape( text, "\\]", QChar( 60006 ) );
400
-        BatchRenamer::escape( text, "\\\\", QChar( 60007 ) ); 
401
-        BatchRenamer::escape( text, "\\/", QChar( 60008 ) );
402
-        BatchRenamer::escape( text, "\\{", QChar( 60009 ) );        
403
-        BatchRenamer::escape( text, "\\}", QChar( 60010 ) );      
404
-        BatchRenamer::escape( text, "\\*", QChar( 60011 ) );          
379
+        BatchRenamer::escape( text, "\\&", TQChar( 60000 ) );
380
+        BatchRenamer::escape( text, "\\$", TQChar( 60001 ) );
381
+        BatchRenamer::escape( text, "\\%", TQChar( 60002 ) );
382
+        BatchRenamer::escape( text, "\\#", TQChar( 60004 ) );
383
+        BatchRenamer::escape( text, "\\[", TQChar( 60005 ) );
384
+        BatchRenamer::escape( text, "\\]", TQChar( 60006 ) );
385
+        BatchRenamer::escape( text, "\\\\", TQChar( 60007 ) ); 
386
+        BatchRenamer::escape( text, "\\/", TQChar( 60008 ) );
387
+        BatchRenamer::escape( text, "\\{", TQChar( 60009 ) );        
388
+        BatchRenamer::escape( text, "\\}", TQChar( 60010 ) );      
389
+        BatchRenamer::escape( text, "\\*", TQChar( 60011 ) );          
405 390
     }
406 391
 
407 392
     return text;
408 393
 }
409 394
 
410
-QString & BatchRenamer::unEscape( QString & text )
395
+TQString & BatchRenamer::unEscape( TQString & text )
411 396
 { 
412
-    BatchRenamer::escape( text, QChar( 60000 ), "&" );
413
-    BatchRenamer::escape( text, QChar( 60001 ), "$" );
414
-    BatchRenamer::escape( text, QChar( 60002 ), "%" );
415
-    BatchRenamer::escape( text, QChar( 60004 ), "#" );
416
-    BatchRenamer::escape( text, QChar( 60005 ), "[" );
417
-    BatchRenamer::escape( text, QChar( 60006 ), "]" );
418
-    BatchRenamer::escape( text, QChar( 60007 ), "\\" );
397
+    BatchRenamer::escape( text, TQChar( 60000 ), "&" );
398
+    BatchRenamer::escape( text, TQChar( 60001 ), "$" );
399
+    BatchRenamer::escape( text, TQChar( 60002 ), "%" );
400
+    BatchRenamer::escape( text, TQChar( 60004 ), "#" );
401
+    BatchRenamer::escape( text, TQChar( 60005 ), "[" );
402
+    BatchRenamer::escape( text, TQChar( 60006 ), "]" );
403
+    BatchRenamer::escape( text, TQChar( 60007 ), "\\" );
419 404
     // %252f == /, it seems that filenames on unix cannot contain
420 405
     // a /. So I use %252f, at least konqui displays it correctly
421 406
     // this was needed, so that plugins that return a slash do not cause errors
422
-    BatchRenamer::escape( text, QChar( 60008 ), "%2f" );
423
-    BatchRenamer::escape( text, QChar( 60009 ), "{" );        
424
-    BatchRenamer::escape( text, QChar( 60010 ), "}" );        
425
-    BatchRenamer::escape( text, QChar( 60011 ), "*" );
407
+    BatchRenamer::escape( text, TQChar( 60008 ), "%2f" );
408
+    BatchRenamer::escape( text, TQChar( 60009 ), "{" );        
409
+    BatchRenamer::escape( text, TQChar( 60010 ), "}" );        
410
+    BatchRenamer::escape( text, TQChar( 60011 ), "*" );
426 411
 
427 412
     return text;
428 413
 }
429 414
 
430 415
 int BatchRenamer::getCharacters( int n )
431 416
 {
432
-    QString s;
417
+    TQString s;
433 418
     s.sprintf( "%i", n );
434 419
     return s.length();
435 420
 }
436 421
 
437
-QString BatchRenamer::findAndProcess( const QString & token, QString text, const QString & replace )
422
+TQString BatchRenamer::findAndProcess( const TQString & token, TQString text, const TQString & tqreplace )
438 423
 {
439 424
     /*
440 425
      * pos can here be -1 because
441
-     * findRev is called with it as a
426
+     * tqfindRev is called with it as a
442 427
      * value !
443 428
      */
444
-#if QT_VERSION >= 0x030100
445
-    text.replace( token, replace );
446
-#else
447
-    int pos = -1;
448
-    do {
449
-        pos = text.findRev( token, pos );
450
-        if( pos >= 0 )
451
-            text.replace( pos, token.length(), replace );
452
-    } while( pos >= 0 );
453
-#endif
429
+    text.tqreplace( token, tqreplace );
454 430
     return text;
455 431
 }
456 432
 
457
-QString BatchRenamer::findNumbers( QString text, int count, int i )
433
+TQString BatchRenamer::findNumbers( TQString text, int count, int i )
458 434
 {
459 435
     // Rewritten in Version 0.8
460 436
     // Added numbers skipping in 1.3
@@ -464,10 +440,10 @@ QString BatchRenamer::findNumbers( QString text, int count, int i )
464 440
     countervalues.start = m_index;
465 441
     countervalues.step = m_step;
466 442
 
467
-    if( text.contains( "#", FALSE ) <= 0 )
443
+    if( text.tqcontains( "#", FALSE ) <= 0 )
468 444
         return text;
469 445
 
470
-    pos = text.find("#", pos);
446
+    pos = text.tqfind("#", pos);
471 447
     pos++;
472 448
     while( text[pos] == '#' ) {
473 449
         text.remove(pos, 1);
@@ -476,7 +452,7 @@ QString BatchRenamer::findNumbers( QString text, int count, int i )
476 452
 
477 453
     findNumberAppendix( text, pos, &countervalues.start, &countervalues.step );
478 454
 
479
-    pos = text.find("#", 0);
455
+    pos = text.tqfind("#", 0);
480 456
 
481 457
     if( (signed int)m_counters.count() <= m_counter_index )
482 458
     {
@@ -488,7 +464,7 @@ QString BatchRenamer::findNumbers( QString text, int count, int i )
488 464
 
489 465
     do {
490 466
 	m_counters[m_counter_index].value += m_counters[m_counter_index].step;
491
-    } while( m_skip.contains( m_counters[m_counter_index].value ) );
467
+    } while( m_skip.tqcontains( m_counters[m_counter_index].value ) );
492 468
     
493 469
     /*
494 470
     int v = start + (i*step) + m_skip_add[m_counter_index];
@@ -500,22 +476,22 @@ QString BatchRenamer::findNumbers( QString text, int count, int i )
500 476
     }
501 477
     */
502 478
 
503
-    QString temp;
479
+    TQString temp;
504 480
     temp.sprintf("%0*i", counter, m_counters[m_counter_index].value );
505
-    text.replace( pos, 1, temp);
481
+    text.tqreplace( pos, 1, temp);
506 482
 
507 483
     ++m_counter_index;
508 484
     return findNumbers( text, count, i );
509 485
 }
510 486
 
511
-void BatchRenamer::findNumberAppendix( QString & text, int pos, int* start, int* step )
487
+void BatchRenamer::findNumberAppendix( TQString & text, int pos, int* start, int* step )
512 488
 {
513
-    QString appendix = QString::null;
489
+    TQString appendix = TQString();
514 490
     int tmp = 0;
515 491
     int end = 0;
516 492
     bool ok = false;
517 493
     
518
-    if( text[pos] == '{' && (end = text.find( "}", pos )) > -1)
494
+    if( text[pos] == '{' && (end = text.tqfind( "}", pos )) > -1)
519 495
     {
520 496
         //qDebug("Found an appendix:" + appendix );
521 497
         appendix = text.mid( pos + 1, end - pos - 1);
@@ -531,13 +507,13 @@ void BatchRenamer::findNumberAppendix( QString & text, int pos, int* start, int*
531 507
     }
532 508
 }
533 509
 
534
-QString BatchRenamer::findStar( const QString & oldname, QString text )
510
+TQString BatchRenamer::findStar( const TQString & oldname, TQString text )
535 511
 {
536 512
     int pos = -1;
537 513
     do {
538
-        pos = text.findRev("*", pos);
514
+        pos = text.tqfindRev("*", pos);
539 515
         if( pos >= 0 ) {
540
-            QString tmp = oldname.lower();
516
+            TQString tmp = oldname.lower();
541 517
             if( tmp[0].isLetter() )
542 518
                 tmp[0] = tmp[0].upper();
543 519
 
@@ -546,13 +522,13 @@ QString BatchRenamer::findStar( const QString & oldname, QString text )
546 522
                     tmp[i] != '\'' && tmp[i] != '?' && tmp[i] != '`' )
547 523
                     tmp[i+1] = tmp[i+1].upper();
548 524
 
549
-            text.replace( pos, 1, tmp);
525
+            text.tqreplace( pos, 1, tmp);
550 526
         }
551 527
     } while( pos >= 0 );
552 528
     return text;
553 529
 }
554 530
 
555
-QString BatchRenamer::findBrackets( QString oldname, QString text, int i )
531
+TQString BatchRenamer::findBrackets( TQString oldname, TQString text, int i )
556 532
 {
557 533
     /*
558 534
      * looks for a statement in brackets [ ]
@@ -560,17 +536,17 @@ QString BatchRenamer::findBrackets( QString oldname, QString text, int i )
560 536
      */
561 537
 
562 538
     int num, pos = -1, a;
563
-    QString token;
539
+    TQString token;
564 540
 
565
-    if( text.contains("]", FALSE) <= 0 || text.isEmpty() )
541
+    if( text.tqcontains("]", FALSE) <= 0 || text.isEmpty() )
566 542
         return text;
567 543
 
568
-    num = text.contains("[", FALSE);
544
+    num = text.tqcontains("[", FALSE);
569 545
     if(num <= 0 )
570 546
         return text;
571 547
 
572
-    pos = text.findRev("[", pos);
573
-    a = text.find("]", pos );
548
+    pos = text.tqfindRev("[", pos);
549
+    a = text.tqfind("]", pos );
574 550
     if( a < 0 && pos >= 0 )
575 551
         return text;
576 552
 
@@ -589,9 +565,9 @@ QString BatchRenamer::findBrackets( QString oldname, QString text, int i )
589 565
     return findBrackets( oldname, text, i );
590 566
 }
591 567
 
592
-QString BatchRenamer::processToken( QString token, QString oldname, int i )
568
+TQString BatchRenamer::processToken( TQString token, TQString oldname, int i )
593 569
 {
594
-    QString tmp;
570
+    TQString tmp;
595 571
 
596 572
     /*
597 573
      * Call here all functions that handle
@@ -625,10 +601,10 @@ QString BatchRenamer::processToken( QString token, QString oldname, int i )
625 601
      * Krename simply ignores unknown tokens!
626 602
      * Usefull for the MP3 Plugin!
627 603
      */
628
-    return QString::null;
604
+    return TQString();
629 605
 }
630 606
 
631
-QString BatchRenamer::findToken( QString oldname, QString token, int i )
607
+TQString BatchRenamer::findToken( TQString oldname, TQString token, int i )
632 608
 {
633 609
     enum conversion { LOWER, UPPER, MIXED, STAR, STRIP, NONE, EMPTY, NUMBER };
634 610
     unsigned int numwidth = 0;
@@ -658,7 +634,7 @@ QString BatchRenamer::findToken( QString oldname, QString token, int i )
658 634
     if( c != EMPTY && c != NUMBER )
659 635
         token.remove( 0, 1 );
660 636
     
661
-    QString save = token;
637
+    TQString save = token;
662 638
     token = processToken( token, oldname, i );
663 639
 
664 640
     switch( c ) {
@@ -670,7 +646,7 @@ QString BatchRenamer::findToken( QString oldname, QString token, int i )
670 646
             break;
671 647
         case MIXED:
672 648
             token = token.lower();
673
-            token.replace( 0, 1, token[0].upper());
649
+            token.tqreplace( 0, 1, token[0].upper());
674 650
             break;
675 651
         case STAR:
676 652
             token = findStar( token, "*" );
@@ -694,20 +670,20 @@ QString BatchRenamer::findToken( QString oldname, QString token, int i )
694 670
     return token;
695 671
 }
696 672
 
697
-QString BatchRenamer::findPartStrings( QString oldname, QString token )
673
+TQString BatchRenamer::findPartStrings( TQString oldname, TQString token )
698 674
 {
699
-    QString first, second;
675
+    TQString first, second;
700 676
     int pos = -1;
701 677
     
702 678
     // parse things like [2;4{[dirname]}]
703
-    if( token.contains( "{" ) >= 1 && token.contains( "}" ) >= 1 ) {
704
-        int pos = token.find( "{" );
705
-        oldname = token.mid( pos + 1, token.findRev( "}" ) - pos - 1 );
679
+    if( token.tqcontains( "{" ) >= 1 && token.tqcontains( "}" ) >= 1 ) {
680
+        int pos = token.tqfind( "{" );
681
+        oldname = token.mid( pos + 1, token.tqfindRev( "}" ) - pos - 1 );
706 682
         token = token.left( pos );
707 683
     }
708 684
 
709
-    if( token.contains("-") ) {
710
-        pos = token.find( "-", 0 );
685
+    if( token.tqcontains("-") ) {
686
+        pos = token.tqfind( "-", 0 );
711 687
         first = token.left( pos );
712 688
         // ------- Code OK ^ !
713 689
 
@@ -741,8 +717,8 @@ QString BatchRenamer::findPartStrings( QString oldname, QString token )
741 717
             x++;
742 718
 
743 719
         return oldname.mid( first.toInt()-1, x );
744
-    } else if( token.contains(";") ) {
745
-        pos = token.find( ";", 0 );
720
+    } else if( token.tqcontains(";") ) {
721
+        pos = token.tqfind( ";", 0 );
746 722
 
747 723
         first = token.left( pos );
748 724
         second = token.mid( pos+1, token.length() );
@@ -753,13 +729,13 @@ QString BatchRenamer::findPartStrings( QString oldname, QString token )
753 729
         int number = token.toInt( &ok );
754 730
 
755 731
         if( ok && (number <= (signed int)oldname.length() && number > 0 ) )
756
-            return QString(oldname[ number -1 ]);
732
+            return TQString(oldname[ number -1 ]);
757 733
         else
758
-            return QString::null;
734
+            return TQString();
759 735
     }
760 736
 }
761 737
 
762
-QString BatchRenamer::findDirName( QString token, QString path )
738
+TQString BatchRenamer::findDirName( TQString token, TQString path )
763 739
 {
764 740
     if( token.left( 7 ).lower() == "dirname" ) {
765 741
         if( path.right( 1 ) == "/" )
@@ -768,9 +744,9 @@ QString BatchRenamer::findDirName( QString token, QString path )
768 744
         int recursion = 1;
769 745
         if( token.length() > 7 ) {
770 746
             token = token.right( token.length() - 7 );
771
-            recursion = token.contains( "." );
747
+            recursion = token.tqcontains( "." );
772 748
             if(  recursion != (signed int)token.length() )
773
-                return QString::null;
749
+                return TQString();
774 750
 
775 751
             recursion++;
776 752
         }
@@ -778,10 +754,10 @@ QString BatchRenamer::findDirName( QString token, QString path )
778 754
         return path.section( "/", recursion * -1, recursion * -1);
779 755
     }
780 756
     
781
-    return QString::null;
757
+    return TQString();
782 758
 }
783 759
 
784
-QString BatchRenamer::findLength( const QString & token, const QString & name )
760
+TQString BatchRenamer::findLength( const TQString & token, const TQString & name )
785 761
 {
786 762
     if( token.lower().startsWith( "length" ) ) {
787 763
         int minus = 0;
@@ -792,67 +768,41 @@ QString BatchRenamer::findLength( const QString & token, const QString & name )
792 768
                 minus = 0;
793 769
         }
794 770
         
795
-        return QString::number( name.length() - minus );
771
+        return TQString::number( name.length() - minus );
796 772
     }
797 773
    
798
-    return QString::null;
774
+    return TQString();
799 775
 }
800 776
 
801
-QString BatchRenamer::findReplace( QString text )
777
+TQString BatchRenamer::findReplace( TQString text )
802 778
 {
803 779
     // Call for each element in replace strings doReplace with correct values
804
-    for( unsigned int i = 0; i < m_replace.count(); i++ ) {
805
-        replacestrings s = m_replace[i];
806
-        text = doReplace( text, unEscape( s.find ), s.replace, s.reg );
780
+    for( unsigned int i = 0; i < m_tqreplace.count(); i++ ) {
781
+        replacestrings s = m_tqreplace[i];
782
+        text = doReplace( text, unEscape( s.tqfind ), s.tqreplace, s.reg );
807 783
     }
808 784
 
809 785
     return text;
810 786
 }
811 787
 
812
-QString BatchRenamer::doReplace( QString text, QString find, QString replace, bool reg )
788
+TQString BatchRenamer::doReplace( TQString text, TQString tqfind, TQString tqreplace, bool reg )
813 789
 {
814 790
     if( !reg ) 
815 791
     {
816
-#if QT_VERSION >= 0x030100
817 792
         // we use the escaped text here because the user might want 
818 793
         // to find a "&" and replace it
819
-        text.replace( doEscape( find ), replace );
820
-#else
821
-        int pos = 0;
822
-        QString f = doEscape( find );
823
-        do {
824
-            
825
-            pos = text.find( f, pos );
826
-            if( pos >= 0 ) {
827
-                text.replace( pos, f.length(), replace );
828
-                pos += replace.length();
829
-            }
830
-        } while( pos >= 0 );
831
-#endif
794
+        text.tqreplace( doEscape( tqfind ), tqreplace );
832 795
     } 
833 796
     else
834 797
     {
835
-#if QT_VERSION >= 0x030100    
836 798
         // no doEscape() here for the regexp, because it would destroy our regular expression
837 799
         // other wise we will not find stuff like $, [ in the text 
838
-        text = doEscape( unEscape( text ).replace( QRegExp( find ), replace ) );
839
-#else
840
-        // Test this code more!
841
-        pos = 0;
842
-        do {
843
-            QRegExp exp( find );
844
-            pos = exp.search( text, pos );
845
-            if( pos >= 0 ) {
846
-                text = doEscape( unEscape( text ).replace( pos, exp.matchedLength(), replace ) );
847
-                pos += replace.length();
848
-            }
849
-        } while( pos >= 0 );
850
-#endif
800
+        text = doEscape( unEscape( text ).tqreplace( TQRegExp( tqfind ), tqreplace ) );
851 801
     }
852 802
     return text;
853 803
 }
854 804
 
855
-void BatchRenamer::writeUndoScript( QTextStream* t )
805
+void BatchRenamer::writeUndoScript( TQTextStream* t )
856 806
 {
857 807
     // write header comments
858 808
     (*t) << "#!/bin/bash" << endl
@@ -882,15 +832,15 @@ void BatchRenamer::writeUndoScript( QTextStream* t )
882 832
 void BatchRenamer::parseSubdirs( data* f )
883 833
 {
884 834
     int pos = 0;
885
-    if( (pos = f->dst.name.findRev( "/", -1 ) ) > 0 ) {
886
-        QString dirs = f->dst.name.left( pos );
835
+    if( (pos = f->dst.name.tqfindRev( "/", -1 ) ) > 0 ) {
836
+        TQString dirs = f->dst.name.left( pos );
887 837
         f->dst.name = f->dst.name.right( f->dst.name.length() - pos - 1 );
888 838
         f->dst.directory += ( f->dst.directory.right( 1 ) == "/" ) ? "" : "/";
889 839
 
890 840
         // create the missing subdir now
891 841
         int i = 0;
892
-        QString d = "";
893
-        while( (d = dirs.section( "/", i, i, QString::SectionSkipEmpty )) && ! d.isEmpty() ) { // asignment here!
842
+        TQString d = "";
843
+        while( (d = dirs.section( "/", i, i, TQString::SectionSkipEmpty )) && ! d.isEmpty() ) { // asignment here!
894 844
             KURL url = f->dst.url;
895 845
             // it is important to unescape here
896 846
             // to support dirnames containing "&" or 
@@ -907,9 +857,9 @@ void BatchRenamer::parseSubdirs( data* f )
907 857
     }
908 858
 }
909 859
 
910
-QString BatchRenamer::buildFilename( fileentry* entry, bool dir )
860
+TQString BatchRenamer::buildFilename( fileentry* entry, bool dir )
911 861
 {
912
-    QString filename = ( dir ? entry->directory : QString::null ) + entry->name + ( entry->extension.isEmpty() ? QString::null : QString(".") ) + entry->extension;
862
+    TQString filename = ( dir ? entry->directory : TQString() ) + entry->name + ( entry->extension.isEmpty() ? TQString() : TQString(".") ) + entry->extension;
913 863
     // unescape here as filename is still escaped
914 864
     unEscape( filename );
915 865
     return filename;
@@ -929,7 +879,7 @@ bool BatchRenamer::applyManualChanges( int i )
929 879
                 m_files[i].dst.name = m_changes[z].user;
930 880
                 // the file extension is already included
931 881
                 // in the users name
932
-                m_files[i].dst.extension = QString::null;
882
+                m_files[i].dst.extension = TQString();
933 883
                 return true;
934 884
             }
935 885
         }

+ 55
- 55
krename/batchrenamer.h View File

@@ -18,13 +18,13 @@
18 18
 #ifndef BATCHRENAMER_H
19 19
 #define BATCHRENAMER_H
20 20
 
21
-#include <qdatetime.h>
22
-#include <qvaluelist.h>
21
+#include <tqdatetime.h>
22
+#include <tqvaluelist.h>
23 23
 #include <kurl.h>
24 24
 
25
-class QFile;
26
-class QProgressDialog;
27
-class QString;
25
+class TQFile;
26
+class TQProgressDialog;
27
+class TQString;
28 28
 
29 29
 /* How many diferrent users and groups
30 30
  * KRename supports. Values over 1000
@@ -45,9 +45,9 @@ enum {
45 45
 };
46 46
 
47 47
 typedef struct fileentry {
48
-    QString name;       // filename
49
-    QString directory;  // directory
50
-    QString extension;  // extension
48
+    TQString name;       // filename
49
+    TQString directory;  // directory
50
+    TQString extension;  // extension
51 51
 
52 52
     KURL url;
53 53
 };
@@ -66,12 +66,12 @@ typedef struct data {
66 66
  */
67 67
 typedef struct manualchanges {
68 68
     KURL url;      // input filename
69
-    QString user;  // name the user wants
69
+    TQString user;  // name the user wants
70 70
 };
71 71
 
72 72
 typedef struct replacestrings {
73
-    QString find;      // Text to replace
74
-    QString replace;   // Replace with
73
+    TQString tqfind;      // Text to tqreplace
74
+    TQString tqreplace;   // Replace with
75 75
     bool reg;          // is it a reg expression ?
76 76
 };
77 77
 
@@ -85,57 +85,57 @@ typedef struct tCounterValues {
85 85
   *@author Dominik Seichter
86 86
   */
87 87
 
88
-class QObject;
89
-class QListView;
88
+class TQObject;
89
+class TQListView;
90 90
 class ProgressDialog;
91 91
 class PluginLoader;
92 92
 class BatchRenamer {
93 93
     public:
94 94
         BatchRenamer();
95 95
         ~BatchRenamer();
96
-        void processFiles( ProgressDialog* p, QObject* object );
97
-        void createPreview( QListView* list );
96
+        void processFiles( ProgressDialog* p, TQObject* object );
97
+        void createPreview( TQListView* list );
98 98
 
99
-        inline void setText( const QString & t ) { text = t; doEscape( text, false ); }
100
-        inline void setExText( const QString & t ) { extext = t; }
99
+        inline void setText( const TQString & t ) { text = t; doEscape( text, false ); }
100
+        inline void setExText( const TQString & t ) { extext = t; }
101 101
         inline void setDirname( const KURL & url ) { dirname = url; }
102
-        inline void setUndoScript( const QString & t ) { m_undoScript = t; }
102
+        inline void setUndoScript( const TQString & t ) { m_undoScript = t; }
103 103
         inline void setUndo( bool b ) { undo = b; }
104 104
         inline void setOverwrite( bool b ) { overwrite = b; }
105 105
         inline void setIndex( int i ) { m_index = i; }
106 106
         inline void setStep( int s ) { m_step = s; }
107 107
 	inline void setResetCounter( bool r ) { m_reset = r; }
108
-        inline void setSkipList( const QValueList<int> & s ) { m_skip = s; }
109
-        inline void setReplaceList( const QValueList<replacestrings> & r ) { m_replace = r; }
108
+        inline void setSkipList( const TQValueList<int> & s ) { m_skip = s; }
109
+        inline void setReplaceList( const TQValueList<replacestrings> & r ) { m_tqreplace = r; }
110 110
         
111
-        inline void setFiles( const QValueList<data> & f ) { m_files = f; } //TODO: use a pointer for more speed
112
-        inline QValueList<data> files() const { return m_files; }
113
-        inline void setChanges( const QValueList<manualchanges> & m ) { m_changes = m; }
111
+        inline void setFiles( const TQValueList<data> & f ) { m_files = f; } //TODO: use a pointer for more speed
112
+        inline TQValueList<data> files() const { return m_files; }
113
+        inline void setChanges( const TQValueList<manualchanges> & m ) { m_changes = m; }
114 114
 
115 115
         inline void setMode( int m) { m_mode = m; }
116 116
         inline int mode() const { return m_mode; }
117 117
 
118 118
         // Since 2.1 public, because plugins may want to access them to:
119
-        QString findAndProcess( const QString & token, QString text, const QString & replace );
120
-
121
-        QString findNumbers( QString text, int count, int i );
122
-        QString findStar( const QString & oldname, QString text );
123
-        QString findBrackets( QString oldname, QString text, int i );
124
-        QString findToken( QString oldname, QString token, int i );
125
-        QString processToken( QString token, QString oldname, int i );
126
-        QString findPartStrings( QString oldname, QString token );
127
-        static QString findDirName( QString token, QString path );
128
-        QString findLength( const QString & token, const QString & name );
129
-        QString findReplace( QString text );  // text is here already the new filename !
130
-        QString doReplace( QString text, QString find, QString replace, bool reg ); // text is here already the new filename !
131
-
132
-        QString processString( QString text, QString oldname, int i );
119
+        TQString findAndProcess( const TQString & token, TQString text, const TQString & tqreplace );
120
+
121
+        TQString findNumbers( TQString text, int count, int i );
122
+        TQString findStar( const TQString & oldname, TQString text );
123
+        TQString findBrackets( TQString oldname, TQString text, int i );
124
+        TQString findToken( TQString oldname, TQString token, int i );
125
+        TQString processToken( TQString token, TQString oldname, int i );
126
+        TQString findPartStrings( TQString oldname, TQString token );
127
+        static TQString findDirName( TQString token, TQString path );
128
+        TQString findLength( const TQString & token, const TQString & name );
129
+        TQString findReplace( TQString text );  // text is here already the new filename !
130
+        TQString doReplace( TQString text, TQString tqfind, TQString tqreplace, bool reg ); // text is here already the new filename !
131
+
132
+        TQString processString( TQString text, TQString oldname, int i );
133 133
         
134
-        static QString & doEscape( QString & text, bool filename = true );
135
-        static QString & unEscape( QString & text );
136
-        static void escape( QString & text, const QString & token, const QString & sequence );
134
+        static TQString & doEscape( TQString text, bool filename = true );
135
+        static TQString & unEscape( TQString & text );
136
+        static void escape( TQString & text, const TQString & token, const TQString & sequence );
137 137
 
138
-        static QString buildFilename( fileentry* entry, bool dir = true );
138
+        static TQString buildFilename( fileentry* entry, bool dir = true );
139 139
 
140 140
     private:
141 141
         /** 
@@ -147,42 +147,42 @@ class BatchRenamer {
147 147
         int getCharacters( int n ) ;
148 148
 
149 149
         void work( ProgressDialog* p );
150
-        void writeUndoScript( QTextStream* t );
150
+        void writeUndoScript( TQTextStream* t );
151 151
         void parseSubdirs( data* f );
152
-        void findNumberAppendix( QString & text, int pos, int* start, int* step );
152
+        void findNumberAppendix( TQString & text, int pos, int* start, int* step );
153 153
 	/** resets all counters to there start value if the directory name at @p i
154 154
 	 *  in m_files changes.
155 155
 	 *  The caller has to check m_reset before calling this function.
156 156
 	 */
157 157
         void findCounterReset( int i );
158
-        QString parsePlugins( int i, const QString & text, int type );
158
+        TQString parsePlugins( int i, const TQString & text, int type );
159 159
         bool applyManualChanges( int i );
160 160
 
161
-        QString text;           // template
161
+        TQString text;           // template
162 162
         KURL dirname;           // destination dir
163
-        QString extext;         // Extension template
164
-        QString m_undoScript;     // Filename of undoscript
163
+        TQString extext;         // Extension template
164
+        TQString m_undoScript;     // Filename of undoscript
165 165
         bool undo;              // create an undo script
166 166
         int m_index;              // index for numbers
167 167
         int m_step;               // step for numbers
168 168
 	bool m_reset;             // reset counter on new directories
169 169
         bool overwrite;         // overwrite existing files
170 170
         int m_mode;             // renaming mode
171
-        QValueList<int> m_skip; // Numbers to skip
172
-        QValueList<replacestrings> m_replace; // Replace strings
173
-        QValueList<data> m_files;
174
-        QValueList<manualchanges> m_changes;  // User made changes
171
+        TQValueList<int> m_skip; // Numbers to skip
172
+        TQValueList<replacestrings> m_tqreplace; // Replace strings
173
+        TQValueList<data> m_files;
174
+        TQValueList<manualchanges> m_changes;  // User made changes
175 175
         PluginLoader* plug;
176 176
 
177 177
         // a is used in find number and
178 178
         // required for skipping.
179 179
         int m_counter_index;
180
-	QValueList<tCounterValues> m_counters;
180
+	TQValueList<tCounterValues> m_counters;
181 181
         
182 182
     protected:
183
-        QFile* f;
184
-        QTime t;
185
-        QProgressDialog* progress;
183
+        TQFile* f;
184
+        TQTime t;
185
+        TQProgressDialog* progress;
186 186
 };
187 187
 
188 188
 #endif

+ 25
- 34
krename/commandplugin.cpp View File

@@ -18,9 +18,9 @@
18 18
 #include "commandplugin.h"
19 19
 
20 20
 // QT includes
21
-#include <qcheckbox.h>
22
-#include <qlabel.h>
23
-#include <qlayout.h>
21
+#include <tqcheckbox.h>
22
+#include <tqlabel.h>
23
+#include <tqlayout.h>
24 24
 
25 25
 // KDE includes
26 26
 #include <kapplication.h>
@@ -33,12 +33,12 @@
33 33
 #include <kpushbutton.h>
34 34
 #include <kprocess.h>
35 35
 
36
-const QString CommandPlugin::getName() const
36
+const TQString CommandPlugin::getName() const
37 37
 {
38 38
     return i18n("Command Plugin");
39 39
 }
40 40
 
41
-const QString CommandPlugin::getAccelName() const
41
+const TQString CommandPlugin::getAccelName() const
42 42
 {
43 43
     return i18n("&Command Plugin");
44 44
 }
@@ -58,27 +58,27 @@ bool CommandPlugin::checkError()
58 58
     return true;
59 59
 }
60 60
 
61
-void CommandPlugin::drawInterface( QWidget* w, QVBoxLayout* l )
61
+void CommandPlugin::drawInterface( TQWidget* w, TQVBoxLayout* l )
62 62
 {
63 63
     m_widget = w;
64 64
 
65
-    QHBoxLayout* hb = new QHBoxLayout( 0, 0, 6 );
66
-    QVBoxLayout* vb = new QVBoxLayout( 0, 0, 6 );
65
+    TQHBoxLayout* hb = new TQHBoxLayout( 0, 0, 6 );
66
+    TQVBoxLayout* vb = new TQVBoxLayout( 0, 0, 6 );
67 67
 
68
-    QLabel* la = new QLabel( w );
68
+    TQLabel* la = new TQLabel( w );
69 69
     la->setText( i18n("<b>Command Plugin</b>") );
70 70
     l->addWidget( la );
71 71
 
72
-    la = new QLabel( w );
72
+    la = new TQLabel( w );
73 73
     la->setText( i18n( "<qt>Executes a shell command on every file after it has been renamed. "
74 74
                        "Add %1 to the command line arguments to get the filename of the renamed file.</qt>") );
75 75
     l->addWidget( la );
76
-    l->addWidget( new QLabel( i18n("Command:"), w ) );
76
+    l->addWidget( new TQLabel( i18n("Command:"), w ) );
77 77
 
78 78
     commandline = new KLineEdit( w );
79 79
     l->addWidget( commandline );
80 80
 
81
-    checkNoBlock = new QCheckBox( i18n("&Execute without blocking (not recommended)"), w );
81
+    checkNoBlock = new TQCheckBox( i18n("&Execute without blocking (not recommended)"), w );
82 82
     l->addWidget( checkNoBlock );
83 83
 
84 84
     buttonAdd = new KPushButton( i18n("&Add"), w );
@@ -93,21 +93,21 @@ void CommandPlugin::drawInterface( QWidget* w, QVBoxLayout* l )
93 93
     vb->setStretchFactor( list, 2 );
94 94
     l->addLayout( vb );
95 95
 
96
-    connect( buttonAdd, SIGNAL( clicked() ), this, SLOT( add() ) );
97
-    connect( buttonRemove, SIGNAL( clicked() ), this, SLOT( remove() ) );
98
-    connect( list, SIGNAL( executed( QListBoxItem* ) ), this, SLOT( exec() ) );
96
+    connect( buttonAdd, TQT_SIGNAL( clicked() ), this, TQT_SLOT( add() ) );
97
+    connect( buttonRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( remove() ) );
98
+    connect( list, TQT_SIGNAL( executed( TQListBoxItem* ) ), this, TQT_SLOT( exec() ) );
99 99
 
100 100
     KConfig* conf = kapp->config();
101 101
     conf->setGroup("CommandPlugin");
102 102
     list->insertStringList( conf->readListEntry("commandlines" ) );
103 103
     
104
-    QStringList examples;
104
+    TQStringList examples;
105 105
     examples.append( "chmod 0444 %1" );
106 106
     examples.append( "convert %1 %1.png" );
107 107
     examples.append( "echo %1 >> $HOME/file.list" );
108 108
 //    examples.append( ")    
109 109
     for( unsigned int i = 0; i < examples.count(); i++ )
110
-        if( !list->findItem( examples[i] ) )
110
+        if( !list->tqfindItem( examples[i] ) )
111 111
             list->insertItem( examples[i] );
112 112
 }
113 113
 
@@ -117,24 +117,15 @@ void CommandPlugin::fillStructure()
117 117
     noblock = checkNoBlock->isChecked();
118 118
 }
119 119
 
120
-QString CommandPlugin::processFile( BatchRenamer* b, int i, QString, int )
120
+TQString CommandPlugin::processFile( BatchRenamer* b, int i, TQString, int )
121 121
 {
122
-    QString filename = b->files()[i].dst.name;
122
+    TQString filename = b->files()[i].dst.name;
123 123
     
124 124
 
125
-    QString c = command;
125
+    TQString c = command;
126 126
        
127 127
     KShellProcess proc;
128
-#if QT_VERSION >= 0x030100
129
-    c = c.replace( "%1", KShellProcess::quote( filename ) );
130
-#else
131
-    int pos = 0;
132
-    do {
133
-       pos = c.find( "%1", pos );
134
-       if( pos >= 0 )
135
-           c.replace( pos, 2, KShellProcess::quote( filename ) );
136
-    } while ( pos >= 0 );
137
-#endif
128
+    c = c.tqreplace( "%1", KShellProcess::quote( filename ) );
138 129
 
139 130
     proc << c;
140 131
     
@@ -146,16 +137,16 @@ QString CommandPlugin::processFile( BatchRenamer* b, int i, QString, int )
146 137
     proc.resume();
147 138
 
148 139
     if( !noblock && proc.exitStatus() )
149
-        return command.arg( filename ) + QString( i18n(" exited with error: %1") ).arg( proc.exitStatus() );
140
+        return command.tqarg( filename ) + TQString( i18n(" exited with error: %1") ).tqarg( proc.exitStatus() );
150 141
 
151
-    return QString::null;
142
+    return TQString();
152 143
 }
153 144
 
154 145
 void CommandPlugin::finished()
155 146
 {
156 147
     KConfig* conf = kapp->config();
157 148
     conf->setGroup("CommandPlugin");
158
-    QStringList slist;
149
+    TQStringList slist;
159 150
     for( unsigned int i = 0; i < list->count(); i++ )
160 151
         slist.append( list->text( i ) );
161 152
 
@@ -193,7 +184,7 @@ void CommandPlugin::exec()
193 184
             commandline->setText( list->text( i ) );
194 185
 }
195 186
 
196
-const QPixmap CommandPlugin::getIcon() const
187
+const TQPixmap CommandPlugin::getIcon() const
197 188
 {
198 189
     return kapp->iconLoader()->loadIcon( "konsole", KIcon::Small );
199 190
 }

+ 9
- 8
krename/commandplugin.h View File

@@ -23,25 +23,26 @@
23 23
 #include "plugin.h"
24 24
 #include "helpdialog.h"
25 25
 
26
-class QCheckBox;
26
+class TQCheckBox;
27 27
 class KLineEdit;
28 28
 class KListBox;
29 29
 class KPushButton;
30 30
 class CommandPlugin : public Plugin  {
31 31
     Q_OBJECT
32
+  TQ_OBJECT
32 33
     public:
33
-        const QString getName() const;
34
-        const QString getAccelName() const;
34
+        const TQString getName() const;
35
+        const TQString getAccelName() const;
35 36
         const int type() const;
36 37
 
37 38
         bool checkError();
38
-        void drawInterface( QWidget* w, QVBoxLayout* l );
39
+        void drawInterface( TQWidget* w, TQVBoxLayout* l );
39 40
         void fillStructure();
40
-        QString processFile( BatchRenamer*, int, QString token, int );
41
+        TQString processFile( BatchRenamer*, int, TQString token, int );
41 42
         void finished();
42 43
 
43 44
         bool alwaysUsed() const { return false; }
44
-        const QPixmap getIcon() const;
45
+        const TQPixmap getIcon() const;
45 46
         
46 47
     private slots:
47 48
         void add();
@@ -50,12 +51,12 @@ class CommandPlugin : public Plugin  {
50 51
 
51 52
     private:
52 53
         KLineEdit* commandline;
53
-        QCheckBox* checkNoBlock;
54
+        TQCheckBox* checkNoBlock;
54 55
         KListBox* list;
55 56
         KPushButton* buttonAdd;
56 57
         KPushButton* buttonRemove;
57 58
 
58
-        QString command;
59
+        TQString command;
59 60
         bool noblock;
60 61
 };
61 62
 

+ 32
- 32
krename/confdialog.cpp View File

@@ -19,25 +19,25 @@
19 19
 #include "confdialog.h"
20 20
 
21 21
 // QT includes
22
-#include <qbuttongroup.h>
23
-#include <qlabel.h>
24
-#include <qlayout.h>
25
-#include <qradiobutton.h>
26
-#include <qtooltip.h>
22
+#include <tqbuttongroup.h>
23
+#include <tqlabel.h>
24
+#include <tqlayout.h>
25
+#include <tqradiobutton.h>
26
+#include <tqtooltip.h>
27 27
 
28 28
 // KDE includes
29 29
 #include <kiconloader.h>
30 30
 #include <klocale.h>
31 31
 
32
-ConfDialog::ConfDialog( QWidget* parent, const char* name )
32
+ConfDialog::ConfDialog( TQWidget* tqparent, const char* name )
33 33
     :  KDialogBase( KDialogBase::IconList, "KRename",
34
-       KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Default, KDialogBase::Ok, parent, name, true, true ),
34
+       KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Default, KDialogBase::Ok, tqparent, name, true, true ),
35 35
        GUIModeSelector()
36 36
 {
37 37
     setupTab1();
38 38
     setupTab2();
39 39
 
40
-    connect( this, SIGNAL( defaultClicked() ), this, SLOT( defaults() ) );
40
+    connect( this, TQT_SIGNAL( defaultClicked() ), this, TQT_SLOT( defaults() ) );
41 41
 }
42 42
 
43 43
 ConfDialog::~ConfDialog()
@@ -46,38 +46,38 @@ ConfDialog::~ConfDialog()
46 46
 
47 47
 void ConfDialog::setupTab1()
48 48
 {
49
-    const QString caption = i18n("Look and Feel");
50
-    QFrame* box = addPage( caption, caption, BarIcon("looknfeel") );
51
-    QVBoxLayout* layout = new QVBoxLayout( box );
52
-    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
49
+    const TQString caption = i18n("Look and Feel");
50
+    TQFrame* box = addPage( caption, caption, BarIcon("looknfeel") );
51
+    TQVBoxLayout* tqlayout = new TQVBoxLayout( box );
52
+    TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
53 53
 
54
-    QButtonGroup* group = new QButtonGroup( box );
54
+    TQButtonGroup* group = new TQButtonGroup( box );
55 55
     group->setColumnLayout(0, Qt::Vertical );
56
-    QVBoxLayout* lgroup = new QVBoxLayout( group->layout() );
56
+    TQVBoxLayout* lgroup = new TQVBoxLayout( group->tqlayout() );
57 57
 
58
-    optionWizard = new QRadioButton( group );
58
+    optionWizard = new TQRadioButton( group );
59 59
     optionWizard->setText( i18n("Use &wizard style GUI (beginners)") );
60
-    optionTabs = new QRadioButton( group );
60
+    optionTabs = new TQRadioButton( group );
61 61
     optionTabs->setText( i18n("Use &tabbed GUI (advanced users)") );
62 62
 
63
-    lgroup->addWidget( new QLabel( i18n("Configure the look and feel of the KRename GUI:<br>"), group ) );
63
+    lgroup->addWidget( new TQLabel( i18n("Configure the look and feel of the KRename GUI:<br>"), group ) );
64 64
     lgroup->addWidget( optionWizard );
65 65
     lgroup->addWidget( optionTabs );
66 66
     lgroup->addItem( spacer );
67 67
         
68
-    layout->addWidget( group );
69
-    layout->addItem( spacer );
68
+    tqlayout->addWidget( group );
69
+    tqlayout->addItem( spacer );
70 70
 }
71 71
 
72 72
 void ConfDialog::setupTab2()
73 73
 {
74
-    const QString caption = i18n("KRename");
75
-    QFrame* box = addPage( caption, caption, BarIcon("krename") );
76
-    QVBoxLayout* layout = new QVBoxLayout( box );
77
-    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
74
+    const TQString caption = i18n("KRename");
75
+    TQFrame* box = addPage( caption, caption, BarIcon("krename") );
76
+    TQVBoxLayout* tqlayout = new TQVBoxLayout( box );
77
+    TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
78 78
 
79
-    checkPlugins = new QCheckBox( i18n("&Load file plugins on start"), box );
80
-    checkAutosize = new QCheckBox( i18n("Auto &resize columns in preview"), box );
79
+    checkPlugins = new TQCheckBox( i18n("&Load file plugins on start"), box );
80
+    checkAutosize = new TQCheckBox( i18n("Auto &resize columns in preview"), box );
81 81
 
82 82
     spinSize = new KIntNumInput( box );
83 83
     spinSize->setRange( 20, 500, 1, false );
@@ -87,14 +87,14 @@ void ConfDialog::setupTab2()
87 87
     spinHistory->setRange( 2, 500, 1, false );
88 88
     spinHistory->setLabel( i18n( "&Number of template history items:" ), AlignLeft | AlignVCenter );
89 89
 
90
-    layout->addWidget( checkPlugins );
91
-    layout->addWidget( checkAutosize );
92
-    layout->addItem( spacer );
93
-    layout->addWidget( spinSize );
94
-    layout->addWidget( spinHistory );
95
-    layout->addItem( spacer );
90
+    tqlayout->addWidget( checkPlugins );
91
+    tqlayout->addWidget( checkAutosize );
92
+    tqlayout->addItem( spacer );
93
+    tqlayout->addWidget( spinSize );
94
+    tqlayout->addWidget( spinHistory );
95
+    tqlayout->addItem( spacer );
96 96
 
97
-    QToolTip::add( checkPlugins, i18n("Disabling this option decreases KRename's startup time, because no KFilePlugins are loaded.") );
97
+    TQToolTip::add( checkPlugins, i18n("Disabling this option decreases KRename's startup time, because no KFilePlugins are loaded.") );
98 98
 }
99 99
 
100 100
 void ConfDialog::defaults()

+ 9
- 8
krename/confdialog.h View File

@@ -19,7 +19,7 @@
19 19
 #define CONFDIALOG_H
20 20
 
21 21
 // QT includes
22
-#include <qcheckbox.h>
22
+#include <tqcheckbox.h>
23 23
 
24 24
 // KDE includes
25 25
 #include <kdialogbase.h>
@@ -27,14 +27,15 @@
27 27
 
28 28
 #include "guimodeselector.h"
29 29
 
30
-class QHBoxLayout;
31
-class QVBoxLayout;
32
-class QWidget;
30
+class TQHBoxLayout;
31
+class TQVBoxLayout;
32
+class TQWidget;
33 33
 class KIntNumInput;
34 34
 class ConfDialog : public KDialogBase, public GUIModeSelector {
35 35
     Q_OBJECT
36
+  TQ_OBJECT
36 37
     public:
37
-        ConfDialog( QWidget* parent = 0, const char* name = 0 );
38
+        ConfDialog( TQWidget* tqparent = 0, const char* name = 0 );
38 39
         ~ConfDialog();
39 40
 
40 41
         inline bool loadplugins() const { return checkPlugins->isChecked(); }
@@ -55,9 +56,9 @@ class ConfDialog : public KDialogBase, public GUIModeSelector {
55 56
         void setupTab2();
56 57
         
57 58
     protected:
58
-        QCheckBox* checkAsk;
59
-        QCheckBox* checkPlugins;
60
-        QCheckBox* checkAutosize;
59
+        TQCheckBox* checkAsk;
60
+        TQCheckBox* checkPlugins;
61
+        TQCheckBox* checkAutosize;
61 62
 
62 63
         KIntNumInput* spinSize;
63 64
         KIntNumInput* spinHistory;

+ 33
- 33
krename/coorddialog.cpp View File

@@ -17,29 +17,29 @@
17 17
 
18 18
 #include "coorddialog.h"
19 19
 
20
-// Qt includes
21
-#include <qcheckbox.h>
22
-#include <qfontmetrics.h>
23
-#include <qlabel.h>
24
-#include <qlayout.h>
25
-#include <qvalidator.h>
20
+// TQt includes
21
+#include <tqcheckbox.h>
22
+#include <tqfontmetrics.h>
23
+#include <tqlabel.h>
24
+#include <tqlayout.h>
25
+#include <tqvalidator.h>
26 26
 
27 27
 // KDE includes
28 28
 #include <kapplication.h>                                                                  
29 29
 #include <klocale.h>
30 30
 
31
-DSLineEdit::DSLineEdit( QWidget* parent, const char* name )
32
-    : KLineEdit( parent, name )
31
+DSLineEdit::DSLineEdit( TQWidget* tqparent, const char* name )
32
+    : KLineEdit( tqparent, name )
33 33
 {
34 34
 }
35 35
 
36
-void DSLineEdit::keyPressEvent( QKeyEvent* e )
36
+void DSLineEdit::keyPressEvent( TQKeyEvent* e )
37 37
 {
38 38
     KLineEdit::keyPressEvent( e );
39 39
     emit changed();
40 40
 }
41 41
 
42
-void DSLineEdit::mousePressEvent( QMouseEvent* e )
42
+void DSLineEdit::mousePressEvent( TQMouseEvent* e )
43 43
 {
44 44
     KLineEdit::mousePressEvent( e );
45 45
     emit changed();
@@ -47,36 +47,36 @@ void DSLineEdit::mousePressEvent( QMouseEvent* e )
47 47
 
48 48
 bool CoordDialog::m_inversion = false;
49 49
 
50
-CoordDialog::CoordDialog( const QString & file, QWidget *_parent, const char *name )
50
+CoordDialog::CoordDialog( const TQString & file, TQWidget *_parent, const char *name )
51 51
     : KDialogBase( KDialogBase::Plain, "KRename",
52 52
       KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, _parent, name, true, true ), m_file( file )
53 53
 {
54
-    QFrame* parent = plainPage();
55
-    QVBoxLayout* layout = new QVBoxLayout( parent );
54
+    TQFrame* tqparent = plainPage();
55
+    TQVBoxLayout* tqlayout = new TQVBoxLayout( tqparent );
56 56
 
57
-    filename = new DSLineEdit( parent );
57
+    filename = new DSLineEdit( tqparent );
58 58
     filename->setText( file );
59
-    filename->setValidator( new QRegExpValidator( QRegExp( file ), this ) );
59
+    filename->setValidator( new TQRegExpValidator( TQRegExp( file ), TQT_TQOBJECT(this) ) );
60 60
     
61
-    preview = new QLabel( parent );
61
+    preview = new TQLabel( tqparent );
62 62
 
63
-    checkInvert = new QCheckBox( i18n("&Invert selection"), plainPage() );
63
+    checkInvert = new TQCheckBox( i18n("&Invert selection"), plainPage() );
64 64
     checkInvert->setChecked( m_inversion );
65 65
     
66
-    layout->addWidget( new QLabel( i18n("Please select the text you want to insert:"), plainPage() ) );
67
-    layout->addWidget( filename );
68
-    layout->addWidget( checkInvert );
69
-    layout->addWidget( preview );
66
+    tqlayout->addWidget( new TQLabel( i18n("Please select the text you want to insert:"), plainPage() ) );
67
+    tqlayout->addWidget( filename );
68
+    tqlayout->addWidget( checkInvert );
69
+    tqlayout->addWidget( preview );
70 70
 
71 71
     updateCommand();
72
-    connect( filename, SIGNAL( selectionChanged() ), this, SLOT( updateCommand() ) );
73
-    connect( checkInvert, SIGNAL( clicked() ), this, SLOT( updateCommand() ) );
74
-    connect( filename, SIGNAL( textChanged( const QString & ) ), this, SLOT( resetText() ) );
75
-    connect( filename, SIGNAL( changed() ), this, SLOT( updateCommand() ) );
72
+    connect( filename, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( updateCommand() ) );
73
+    connect( checkInvert, TQT_SIGNAL( clicked() ), this, TQT_SLOT( updateCommand() ) );
74
+    connect( filename, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( resetText() ) );
75
+    connect( filename, TQT_SIGNAL( changed() ), this, TQT_SLOT( updateCommand() ) );
76 76
 
77 77
     show();
78 78
     
79
-    QFontMetrics fm( filename->font() );
79
+    TQFontMetrics fm( filename->font() );
80 80
     int w = fm.width( file );
81 81
     if( w > width() )
82 82
         resize(
@@ -102,26 +102,26 @@ void CoordDialog::updateCommand()
102 102
                 start++;
103 103
                 end++;
104 104
                 if( start > 1 )
105
-                    m_command = QString("[$1;%1]").arg(start-1);
105
+                    m_command = TQString("[$1;%1]").tqarg(start-1);
106 106
 
107 107
                 if( end <= (signed int)filename->text().length() )
108
-                    m_command.append( QString("[$%1-[length]]").arg(end) );
108
+                    m_command.append( TQString("[$%1-[length]]").tqarg(end) );
109 109
             } 
110 110
         } else if( checkInvert->isChecked() && !filename->hasSelectedText() ) {
111 111
             int p = filename->cursorPosition();
112
-            m_command = QString("[$1;%1][$%2-[length]]").arg(p).arg(p+1);            
112
+            m_command = TQString("[$1;%1][$%2-[length]]").tqarg(p).tqarg(p+1);            
113 113
         } else if( !checkInvert->isChecked() && filename->hasSelectedText() ){
114 114
             if( end ) {
115 115
                 start++;
116 116
                 end++;
117 117
                 if( end <= (signed int)filename->text().length() )
118
-                    m_command = QString("[$%1;%2]").arg(start).arg(end-start);
118
+                    m_command = TQString("[$%1;%2]").tqarg(start).tqarg(end-start);
119 119
                 else
120
-                    m_command = QString("[$%1-[length]]").arg(start);
120
+                    m_command = TQString("[$%1-[length]]").tqarg(start);
121 121
             }
122 122
         } else if( !checkInvert->isChecked() && !filename->hasSelectedText() ) {
123 123
             int p = filename->cursorPosition();
124
-            m_command = QString("[$%1-[length]]").arg( p );
124
+            m_command = TQString("[$%1-[length]]").tqarg( p );
125 125
         }
126 126
 
127 127
     }
@@ -135,7 +135,7 @@ void CoordDialog::resetText()
135 135
     updateCommand();
136 136
 }
137 137
 
138
-QString CoordDialog::coords()
138
+TQString CoordDialog::coords()
139 139
 {
140 140
     m_inversion = checkInvert->isChecked();
141 141
     return m_command;

+ 15
- 13
krename/coorddialog.h View File

@@ -21,23 +21,24 @@
21 21
 #include <kdialogbase.h>
22 22
 #include <klineedit.h>
23 23
 
24
-class QKeyEvent;
24
+class TQKeyEvent;
25 25
 class DSLineEdit : public KLineEdit {
26 26
     Q_OBJECT
27
+  TQ_OBJECT
27 28
     public:
28
-        DSLineEdit( QWidget* parent = 0, const char* name = 0 );
29
+        DSLineEdit( TQWidget* tqparent = 0, const char* name = 0 );
29 30
 
30 31
     signals:
31 32
         void changed();
32 33
         
33 34
     protected:
34
-        void keyPressEvent( QKeyEvent* e );
35
-        void mousePressEvent( QMouseEvent* e );
35
+        void keyPressEvent( TQKeyEvent* e );
36
+        void mousePressEvent( TQMouseEvent* e );
36 37
 };
37 38
 
38
-class QCheckBox;
39
-class QLabel;
40
-class QString;
39
+class TQCheckBox;
40
+class TQLabel;
41
+class TQString;
41 42
 
42 43
 /* The name of this class was a very bad choice.
43 44
  * CoordDialog is an abreviation vor Coordinate Dialog,
@@ -46,11 +47,12 @@ class QString;
46 47
  */
47 48
 class CoordDialog : public KDialogBase  {
48 49
     Q_OBJECT
50
+  TQ_OBJECT
49 51
     public: 
50
-        CoordDialog( const QString & file, QWidget *_parent=0, const char *name=0);
52
+        CoordDialog( const TQString & file, TQWidget *_parent=0, const char *name=0);
51 53
         ~CoordDialog();
52 54
 
53
-        QString coords();
55
+        TQString coords();
54 56
 
55 57
         static bool m_inversion;
56 58
                 
@@ -59,12 +61,12 @@ class CoordDialog : public KDialogBase  {
59 61
         void resetText();
60 62
         
61 63
     private:
62
-        QString m_file;
63
-        QString m_command;
64
+        TQString m_file;
65
+        TQString m_command;
64 66
 
65 67
         DSLineEdit* filename;
66
-        QCheckBox* checkInvert;
67
-        QLabel* preview;
68
+        TQCheckBox* checkInvert;
69
+        TQLabel* preview;
68 70
 };
69 71
 
70 72
 #endif

+ 20
- 20
krename/dateplugin.cpp View File

@@ -16,8 +16,8 @@
16 16
  ***************************************************************************/
17 17
 #include "dateplugin.h"
18 18
 
19
-// Qt includes
20
-#include <qdatetime.h>
19
+// TQt includes
20
+#include <tqdatetime.h>
21 21
 
22 22
 // KDE includes
23 23
 #include <kfileitem.h>
@@ -50,20 +50,20 @@ DatePlugin::DatePlugin()
50 50
 }
51 51
 
52 52
 
53
-QString DatePlugin::processFile(BatchRenamer* b, int i, QString token, int )
53
+TQString DatePlugin::processFile(BatchRenamer* b, int i, TQString token, int )
54 54
 {
55 55
     if( !supports( token ) )
56
-        return QString::null;
56
+        return TQString();
57 57
     
58 58
     if( token.lower().startsWith( getPattern() ) )
59 59
         token = token.mid( getPattern().length(), token.length() - getPattern().length() );
60 60
       
61 61
     
62
-    QDate d = QDate::currentDate();
63
-    QTime t = QTime::currentTime();
64
-    QString tmp, text;
65
-    QString format = "dd-MM-yyyy";
66
-    if( token.contains( ";" ) )
62
+    TQDate d = TQDate::tqcurrentDate();
63
+    TQTime t = TQTime::currentTime();
64
+    TQString tmp, text;
65
+    TQString format = "dd-MM-yyyy";
66
+    if( token.tqcontains( ";" ) )
67 67
     {
68 68
         format = token.section( ';', 1, 1 );
69 69
         token = token.section( ';', 0, 0 ).lower();
@@ -71,15 +71,15 @@ QString DatePlugin::processFile(BatchRenamer* b, int i, QString token, int )
71 71
         token = token.lower();
72 72
 
73 73
     if( token == "date" ) {
74
-        return QDateTime::currentDateTime().toString( format );
74
+        return TQDateTime::tqcurrentDateTime().toString( format );
75 75
     } else if( token == "year" )
76
-        return QString( "%1" ).arg( d.year() );
76
+        return TQString( "%1" ).tqarg( d.year() );
77 77
     else if( token == "month" )
78 78
         return tmp.sprintf("%0*i", 2, d.month() );
79 79
     else if( token == "day" )
80 80
         return tmp.sprintf("%0*i", 2, d.day() );
81 81
     else if( token == "time" )
82
-        return QString( "%1-%2-%3" ).arg( t.hour() ).arg( QString().sprintf("%0*i", 2, t.minute() ) ).arg( QString().sprintf("%0*i", 2, t.second() ) );
82
+        return TQString( "%1-%2-%3" ).tqarg( t.hour() ).tqarg( TQString().sprintf("%0*i", 2, t.minute() ) ).tqarg( TQString().sprintf("%0*i", 2, t.second() ) );
83 83
     else if( token == "hour" )
84 84
         return tmp.sprintf("%0*i", 2, t.hour() );
85 85
     else if( token == "minute" )
@@ -103,34 +103,34 @@ QString DatePlugin::processFile(BatchRenamer* b, int i, QString token, int )
103 103
         
104 104
     }
105 105
     
106
-    return QString::null;    
106
+    return TQString();    
107 107
 }
108 108
 
109
-const QString DatePlugin::getAccelName() const
109
+const TQString DatePlugin::getAccelName() const
110 110
 {
111 111
     return i18n("&System Functions");
112 112
 }
113 113
 
114
-const QString DatePlugin::getName() const
114
+const TQString DatePlugin::getName() const
115 115
 {
116 116
     return i18n("System Functions");
117 117
 }
118 118
 
119
-const QString DatePlugin::getPattern() const
119
+const TQString DatePlugin::getPattern() const
120 120
 {
121
-    return QString::null;
121
+    return TQString();
122 122
 }
123 123
 
124
-const QString DatePlugin::time( time_t time, const QString & format )
124
+const TQString DatePlugin::time( time_t time, const TQString & format )
125 125
 {
126
-    QDateTime dt;
126
+    TQDateTime dt;
127 127
     dt.setTime_t( time );
128 128
     return dt.toString( format );
129 129
 }
130 130
 
131 131
 void DatePlugin::addHelp( HelpDialogData* data )
132 132
 {
133
-    QStringList list;
133
+    TQStringList list;
134 134
     list.append( "[date];;" + i18n("Insert the current date") );
135 135
     list.append( "[date;yyyy-MM-dd];;" + i18n("Insert the current date using the formatting string yyyy-MM-dd") );
136 136
     list.append( "[year];;" + i18n("Insert the current year") );

+ 5
- 5
krename/dateplugin.h View File

@@ -29,15 +29,15 @@ class DatePlugin : public FilePlugin
29 29
     public:
30 30
         DatePlugin();
31 31
 
32
-        QString processFile(BatchRenamer* b, int i, QString token, int mode);
33
-        const QString getAccelName() const;
34
-        const QString getName() const;
35
-        const QString getPattern() const;
32
+        TQString processFile(BatchRenamer* b, int i, TQString token, int mode);
33
+        const TQString getAccelName() const;
34
+        const TQString getName() const;
35
+        const TQString getPattern() const;
36 36
         
37 37
         void addHelp( HelpDialogData* data );
38 38
         
39 39
     private:
40
-        const QString time( time_t time, const QString & format );
40
+        const TQString time( time_t time, const TQString & format );
41 41
 
42 42
 };
43 43
 

+ 37
- 37
krename/datetime.cpp View File

@@ -18,11 +18,11 @@
18 18
 #include "datetime.h"
19 19
 
20 20
 // QT includes
21
-#include <qcheckbox.h>
22
-#include <qfileinfo.h>
23
-#include <qlabel.h>
24
-#include <qlayout.h>
25
-#include <qpushbutton.h>
21
+#include <tqcheckbox.h>
22
+#include <tqfileinfo.h>
23
+#include <tqlabel.h>
24
+#include <tqlayout.h>
25
+#include <tqpushbutton.h>
26 26
 
27 27
 // KDE includes
28 28
 #include <kapplication.h>
@@ -39,12 +39,12 @@
39 39
 #include <sys/types.h>
40 40
 #include <sys/stat.h>
41 41
 
42
-const QString MyDatePlugin::getName() const
42
+const TQString MyDatePlugin::getName() const
43 43
 {
44 44
     return i18n("Date & Time");
45 45
 }
46 46
 
47
-const QString MyDatePlugin::getAccelName() const
47
+const TQString MyDatePlugin::getAccelName() const
48 48
 {
49 49
     return i18n("Date && &Time");
50 50
 }
@@ -59,31 +59,31 @@ bool MyDatePlugin::checkError()
59 59
     return true;
60 60
 }
61 61
 
62
-const QPixmap MyDatePlugin::getIcon() const
62
+const TQPixmap MyDatePlugin::getIcon() const
63 63
 {
64 64
     return kapp->iconLoader()->loadIcon( "kalarm", KIcon::Small );
65 65
 }
66 66
 
67
-void MyDatePlugin::drawInterface( QWidget* w, QVBoxLayout* l )
67
+void MyDatePlugin::drawInterface( TQWidget* w, TQVBoxLayout* l )
68 68
 {
69 69
     m_widget = w;
70 70
 
71 71
 #ifdef BENNY
72
-    l->addWidget( new QLabel("Setze Modifiaction Time um eine Stunde zurück", w) );
72
+    l->addWidget( new TQLabel("Setze Modifiaction Time um eine Stunde zurück", w) );
73 73
 #else
74
-    Layout0 = new QHBoxLayout( 0, 0, 6, "Layout0");
75
-    Layout1 = new QVBoxLayout( 0, 0, 6, "Layout1");
76
-    Layout2 = new QHBoxLayout( 0, 0, 6, "Layout2");
74
+    Layout0 = new TQHBoxLayout( 0, 0, 6, "Layout0");
75
+    Layout1 = new TQVBoxLayout( 0, 0, 6, "Layout1");
76
+    Layout2 = new TQHBoxLayout( 0, 0, 6, "Layout2");
77 77
 
78 78
     kDate = new KDatePicker( w );
79 79
 
80
-    checkAccess = new QCheckBox( w, "checkAccess" );
80
+    checkAccess = new TQCheckBox( w, "checkAccess" );
81 81
     checkAccess->setText( i18n( "Change &access date && time" ) );
82 82
 
83
-    checkModification = new QCheckBox( w, "checkModification" );
83
+    checkModification = new TQCheckBox( w, "checkModification" );
84 84
     checkModification->setText( i18n( "Change &modification date && time" ) );
85 85
 
86
-    labelTime = new QLabel( w, "labelTime" );
86
+    labelTime = new TQLabel( w, "labelTime" );
87 87
     labelTime->setText( i18n( "Time:" ) );
88 88
 
89 89
     spinHour = new KIntSpinBox( w, "spinHour" );
@@ -98,7 +98,7 @@ void MyDatePlugin::drawInterface( QWidget* w, QVBoxLayout* l )
98 98
     spinSecond->setSuffix( i18n( "s" ) );
99 99
     spinSecond->setMaxValue( 59 );
100 100
 
101
-    buttonCurrentDT = new QPushButton( w, "buttonCurrentDT" );
101
+    buttonCurrentDT = new TQPushButton( w, "buttonCurrentDT" );
102 102
     buttonCurrentDT->setText( i18n( "&Get Current Date && Time" ) );
103 103
 
104 104
     Layout2->addWidget( labelTime );
@@ -114,12 +114,12 @@ void MyDatePlugin::drawInterface( QWidget* w, QVBoxLayout* l )
114 114
 
115 115
 
116 116
     Layout0->addLayout( Layout1 );
117
-    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
117
+    TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
118 118
     Layout0->addItem( spacer );
119 119
 
120 120
     l->addLayout( Layout0 );
121 121
 
122
-    connect( buttonCurrentDT, SIGNAL(clicked()), this, SLOT(changeDT()));
122
+    connect( buttonCurrentDT, TQT_SIGNAL(clicked()), this, TQT_SLOT(changeDT()));
123 123
 #endif
124 124
 }
125 125
 
@@ -135,10 +135,10 @@ void MyDatePlugin::fillStructure()
135 135
 #endif
136 136
 }
137 137
 
138
-QString MyDatePlugin::processFile( BatchRenamer* b, int i, QString, int )
138
+TQString MyDatePlugin::processFile( BatchRenamer* b, int i, TQString, int )
139 139
 {
140 140
 #ifdef BENNY
141
-    QString filename = b->files()[i].dst.name;
141
+    TQString filename = b->files()[i].dst.name;
142 142
 
143 143
     FILE * f;
144 144
     struct utimbuf * t = new utimbuf();
@@ -149,11 +149,11 @@ QString MyDatePlugin::processFile( BatchRenamer* b, int i, QString, int )
149 149
 
150 150
     f = fopen((const char *)filename, "r");
151 151
     if( f == NULL )
152
-        return QString( i18n("Can't change date of file %1.") ).arg(filename);
152
+        return TQString( i18n("Can't change date of file %1.") ).tqarg(filename);
153 153
 
154 154
     fclose( f );
155 155
 
156
-    QFileInfo info( filename );
156
+    TQFileInfo info( filename );
157 157
     tmp.tm_mday = info.lastModified().date().day();
158 158
     tmp.tm_mon = info.lastModified().date().month() - 1;
159 159
     tmp.tm_year = info.lastModified().date().year() - 1900;
@@ -165,20 +165,20 @@ QString MyDatePlugin::processFile( BatchRenamer* b, int i, QString, int )
165 165
 
166 166
     ti = mktime( &tmp );
167 167
     if( ti == -1 )
168
-        return QString( i18n("Can't change date of file %1.") ).arg(filename);
168
+        return TQString( i18n("Can't change date of file %1.") ).tqarg(filename);
169 169
 
170 170
     if( stat( (const char *)filename, &st ) == -1 )
171
-        return QString( i18n("Can't change date of file %1.") ).arg(filename);
171
+        return TQString( i18n("Can't change date of file %1.") ).tqarg(filename);
172 172
 
173 173
     t->actime = st.st_atime;
174 174
     t->modtime = ti;
175 175
 
176 176
     if(utime( (const char *)filename, t ) != 0)
177
-        return QString( i18n("Can't change date of file %1.") ).arg(filename);
177
+        return TQString( i18n("Can't change date of file %1.") ).tqarg(filename);
178 178
 
179
-    return QString::null;
179
+    return TQString();
180 180
 #else
181
-    QString filename = b->files()[i].dst.name;
181
+    TQString filename = b->files()[i].dst.name;
182 182
 
183 183
     FILE * f;
184 184
     struct utimbuf * t = new utimbuf();
@@ -189,7 +189,7 @@ QString MyDatePlugin::processFile( BatchRenamer* b, int i, QString, int )
189 189
 
190 190
     f = fopen((const char *)filename, "r");
191 191
     if( f == NULL )
192
-        return QString( i18n("Can't change date of file %1.") ).arg(filename);
192
+        return TQString( i18n("Can't change date of file %1.") ).tqarg(filename);
193 193
 
194 194
     fclose( f );
195 195
 
@@ -204,10 +204,10 @@ QString MyDatePlugin::processFile( BatchRenamer* b, int i, QString, int )
204 204
 
205 205
     ti = mktime( &tmp );
206 206
     if( ti == -1 )
207
-        return QString( i18n("Can't change date of file %1.") ).arg(filename);
207
+        return TQString( i18n("Can't change date of file %1.") ).tqarg(filename);
208 208
 
209 209
     if( stat( (const char *)filename, &st ) == -1 )
210
-        return QString( i18n("Can't change date of file %1.") ).arg(filename);
210
+        return TQString( i18n("Can't change date of file %1.") ).tqarg(filename);
211 211
 
212 212
     if(dvals.changeAccess)
213 213
         t->actime = ti;
@@ -220,18 +220,18 @@ QString MyDatePlugin::processFile( BatchRenamer* b, int i, QString, int )
220 220
         t->modtime = st.st_mtime;
221 221
 
222 222
     if(utime( (const char *)filename, t ) != 0)
223
-        return QString( i18n("Can't change date of file %1.") ).arg(filename);
223
+        return TQString( i18n("Can't change date of file %1.") ).tqarg(filename);
224 224
 
225
-    return QString::null;
225
+    return TQString();
226 226
 #endif
227 227
 }
228 228
 
229 229
 void MyDatePlugin::changeDT()
230 230
 {
231
-    spinHour->setValue( QTime::currentTime().hour());
232
-    spinMinute->setValue( QTime::currentTime().minute());
233
-    spinSecond->setValue( QTime::currentTime().second());
234
-    kDate->setDate( QDate::currentDate() );
231
+    spinHour->setValue( TQTime::currentTime().hour());
232
+    spinMinute->setValue( TQTime::currentTime().minute());
233
+    spinSecond->setValue( TQTime::currentTime().second());
234
+    kDate->setDate( TQDate::tqcurrentDate() );
235 235
 }
236 236
 
237 237
 

+ 23
- 22
krename/datetime.h View File

@@ -31,49 +31,50 @@
31 31
 
32 32
 class KDatePicker;
33 33
 class KIntSpinBox;
34
-class QCheckBox;
35
-class QButtonGroup;
36
-class QGroupBox;
37
-class QLabel;
38
-class QVBoxLayout;
39
-class QHBoxLayout;
40
-class QPushButton;
41
-class QString;
42
-class QWidget;
34
+class TQCheckBox;
35
+class TQButtonGroup;
36
+class TQGroupBox;
37
+class TQLabel;
38
+class TQVBoxLayout;
39
+class TQHBoxLayout;
40
+class TQPushButton;
41
+class TQString;
42
+class TQWidget;
43 43
 
44 44
 class MyDatePlugin: public Plugin {
45 45
     Q_OBJECT
46
+  TQ_OBJECT
46 47
     public:
47
-        const QString getName() const;
48
-        const QString getAccelName() const;
48
+        const TQString getName() const;
49
+        const TQString getAccelName() const;
49 50
         const int type() const;
50 51
 
51 52
         bool checkError();
52
-        void drawInterface( QWidget* w, QVBoxLayout* l );
53
+        void drawInterface( TQWidget* w, TQVBoxLayout* l );
53 54
         void fillStructure();
54
-        QString processFile( BatchRenamer*, int, QString token, int );
55
+        TQString processFile( BatchRenamer*, int, TQString token, int );
55 56
 
56
-        const QPixmap getIcon() const;
57
+        const TQPixmap getIcon() const;
57 58
                         
58 59
     private slots:
59 60
         void changeDT();
60 61
 
61 62
     protected:
62
-        QCheckBox* checkAccess;
63
-        QCheckBox* checkModification;
63
+        TQCheckBox* checkAccess;
64
+        TQCheckBox* checkModification;
64 65
         KDatePicker* kDate;
65
-        QLabel* labelTime;
66
+        TQLabel* labelTime;
66 67
         KIntSpinBox* spinHour;
67 68
         KIntSpinBox* spinMinute;
68 69
         KIntSpinBox* spinSecond;
69
-        QPushButton* buttonCurrentDT;
70
+        TQPushButton* buttonCurrentDT;
70 71
 
71
-        QHBoxLayout* Layout0;
72
-        QVBoxLayout* Layout1;
73
-        QHBoxLayout* Layout2;
72
+        TQHBoxLayout* Layout0;
73
+        TQVBoxLayout* Layout1;
74
+        TQHBoxLayout* Layout2;
74 75
 
75 76
         struct datevals {
76
-            QDate date;                 // Date
77
+            TQDate date;                 // Date
77 78
 
78 79
             bool changeModification;    // Change modification date
79 80
             bool changeAccess;          // Change access date

+ 24
- 24
krename/dsdirselectdialog.cpp View File

@@ -17,46 +17,46 @@
17 17
 
18 18
 #include "dsdirselectdialog.h"
19 19
 
20
-// Qt includes
21
-#include <qcheckbox.h>
22
-#include <qhbox.h>
23
-#include <qlabel.h>
24
-#include <qlayout.h>
25
-#include <qtooltip.h>
26
-#include <qvbox.h>
20
+// TQt includes
21
+#include <tqcheckbox.h>
22
+#include <tqhbox.h>
23
+#include <tqlabel.h>
24
+#include <tqlayout.h>
25
+#include <tqtooltip.h>
26
+#include <tqvbox.h>
27 27
 
28 28
 // KDE includes
29 29
 #include <kdiroperator.h> 
30 30
 #include <klocale.h>
31 31
 #include <kurlcombobox.h> 
32 32
 
33
-DSDirSelectDialog::DSDirSelectDialog( QWidget* parent )
34
-        : KFileDialog( ":KRename", "*", parent, 0, false ) 
33
+DSDirSelectDialog::DSDirSelectDialog( TQWidget* tqparent )
34
+        : KFileDialog( ":KRename", "*", tqparent, 0, false ) 
35 35
 {
36 36
     setOperationMode( KFileDialog::Opening );
37 37
     setMode( KFile::Files | KFile::ExistingOnly );
38 38
     
39
-    QVBox* vbox = new QVBox( this );
39
+    TQVBox* vbox = new TQVBox( this );
40 40
 
41
-    if( layout() )
42
-        layout()->add( vbox );
41
+    if( tqlayout() )
42
+        tqlayout()->add( vbox );
43 43
     else
44
-        qDebug("KFileDialog does not have a layout!!!");
44
+        qDebug("KFileDialog does not have a tqlayout!!!");
45 45
 
46
-    checkDir = new QCheckBox( i18n("Add directory names &with filenames"), vbox );
47
-    check = new QCheckBox( i18n("Add subdirectories &recursively"), vbox );
48
-    QHBox* hbox = new QHBox( vbox );
49
-    QWidget* spacer = new QWidget( hbox );
46
+    checkDir = new TQCheckBox( i18n("Add directory names &with filenames"), vbox );
47
+    check = new TQCheckBox( i18n("Add subdirectories &recursively"), vbox );
48
+    TQHBox* hbox = new TQHBox( vbox );
49
+    TQWidget* spacer = new TQWidget( hbox );
50 50
     spacer->setMinimumWidth( 20 );
51
-    checkHidden = new QCheckBox( i18n("Add &hidden directories"), hbox );
51
+    checkHidden = new TQCheckBox( i18n("Add &hidden directories"), hbox );
52 52
     hbox->setStretchFactor( checkHidden, 4 );
53
-    checkOnlyDir = new QCheckBox( i18n("Add directory names only"), vbox );    
54
-    connect( check, SIGNAL( clicked() ), this, SLOT( enableControls() ));
53
+    checkOnlyDir = new TQCheckBox( i18n("Add directory names only"), vbox );    
54
+    connect( check, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableControls() ));
55 55
 
56
-    QToolTip::add( check, i18n("Walk recursively through the directory tree and add also the content of all subdirectories to the list of files to rename.") );
57
-    QToolTip::add( checkHidden, i18n("If not checked, KRename will ignore directories starting with a dot during recursive adding.") );
58
-    QToolTip::add( checkOnlyDir, i18n("Add only the directory names and not the names of the files in the directory to KRename.") );
59
-    QToolTip::add( checkDir, i18n("This option causes KRename to add also the name of the base directory of the selected files to its list.") );
56
+    TQToolTip::add( check, i18n("Walk recursively through the directory tree and add also the content of all subdirectories to the list of files to rename.") );
57
+    TQToolTip::add( checkHidden, i18n("If not checked, KRename will ignore directories starting with a dot during recursive adding.") );
58
+    TQToolTip::add( checkOnlyDir, i18n("Add only the directory names and not the names of the files in the directory to KRename.") );
59
+    TQToolTip::add( checkDir, i18n("This option causes KRename to add also the name of the base directory of the selected files to its list.") );
60 60
     
61 61
     enableControls();
62 62
 }

+ 10
- 9
krename/dsdirselectdialog.h View File

@@ -20,16 +20,17 @@
20 20
 
21 21
 #include <kfiledialog.h>
22 22
 
23
-class QCheckBox;
24
-class QLabel;
23
+class TQCheckBox;
24
+class TQLabel;
25 25
 class KComboBox;
26 26
 
27
-/* A small helper class to allow layout changes in KDirSelectDialog */
27
+/* A small helper class to allow tqlayout changes in KDirSelectDialog */
28 28
 class DSDirSelectDialog : public KFileDialog {
29 29
     Q_OBJECT
30
+  TQ_OBJECT
30 31
 
31 32
     public:
32
-        DSDirSelectDialog( QWidget* parent );
33
+        DSDirSelectDialog( TQWidget* tqparent );
33 34
 
34 35
         bool recursively() const;
35 36
         bool hidden() const;
@@ -44,11 +45,11 @@ class DSDirSelectDialog : public KFileDialog {
44 45
         void slotOk();
45 46
         
46 47
     private:
47
-        QCheckBox* check;
48
-        QCheckBox* checkHidden;
49
-        QCheckBox* checkDir;
50
-        QCheckBox* checkOnlyDir;
51
-        QLabel* label;
48
+        TQCheckBox* check;
49
+        TQCheckBox* checkHidden;
50
+        TQCheckBox* checkDir;
51
+        TQCheckBox* checkOnlyDir;
52
+        TQLabel* label;
52 53
 };
53 54
 
54 55
 #endif

+ 29
- 29
krename/encodingplugin.cpp View File

@@ -18,11 +18,11 @@
18 18
 #include "encodingplugin.h"
19 19
 
20 20
 // QT includes
21
-#include <qcheckbox.h>
22
-#include <qlabel.h>
23
-#include <qlayout.h>
24
-#include <qtextcodec.h>
25
-#include <qvgroupbox.h>
21
+#include <tqcheckbox.h>
22
+#include <tqlabel.h>
23
+#include <tqlayout.h>
24
+#include <tqtextcodec.h>
25
+#include <tqvgroupbox.h>
26 26
 
27 27
 
28 28
 // KDE includes
@@ -32,12 +32,12 @@
32 32
 #include <klocale.h>
33 33
 #include <kmessagebox.h>
34 34
 
35
-const QString EncodingPlugin::getName() const
35
+const TQString EncodingPlugin::getName() const
36 36
 {
37 37
     return i18n("Encoding Conversion Plugin");
38 38
 }
39 39
 
40
-const QString EncodingPlugin::getAccelName() const
40
+const TQString EncodingPlugin::getAccelName() const
41 41
 {
42 42
     return i18n("&Encoding Conversion Plugin");
43 43
 }
@@ -47,32 +47,32 @@ const int EncodingPlugin::type() const
47 47
     return TYPE_FINAL_FILENAME;
48 48
 }
49 49
 
50
-void EncodingPlugin::drawInterface( QWidget* w, QVBoxLayout* l )
50
+void EncodingPlugin::drawInterface( TQWidget* w, TQVBoxLayout* l )
51 51
 {
52 52
     // build a list of all available TextCodecs
53
-    QStringList codecs;
54
-    QTextCodec *codec;
55
-    for( int i=0; (codec = QTextCodec::codecForIndex(i));i++)
53
+    TQStringList codecs;
54
+    TQTextCodec *codec;
55
+    for( int i=0; (codec = TQTextCodec::codecForIndex(i));i++)
56 56
         codecs.append( codec->name() );
57 57
 
58 58