summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-03 02:49:54 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-03 02:49:54 +0000
commit6ffad5a006df848f5e9a80ca31e5faec8ed65e62 (patch)
tree3757770dc3586efff30fdfe30f7e36b64ab883f1
parent1359f43e963c10d08c6c78f4806da291ca216bfe (diff)
downloadkrusader-6ffad5a0.tar.gz
krusader-6ffad5a0.zip
TQt4 port krusader
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/krusader@1239136 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--iso/iso.cpp46
-rw-r--r--iso/iso.h6
-rw-r--r--iso/kiso.cpp70
-rw-r--r--iso/kiso.h28
-rw-r--r--iso/kisodirectory.cpp6
-rw-r--r--iso/kisodirectory.h8
-rw-r--r--iso/kisofile.cpp10
-rw-r--r--iso/kisofile.h10
-rw-r--r--iso/libisofs/iso_fs.h4
-rw-r--r--iso/libisofs/isofs.h4
-rw-r--r--iso/qfilehack.cpp12
-rw-r--r--iso/qfilehack.h18
-rw-r--r--krArc/krarc.cpp480
-rw-r--r--krArc/krarc.h88
-rw-r--r--krusader/ActionMan/actionman.cpp8
-rw-r--r--krusader/ActionMan/actionman.h3
-rw-r--r--krusader/ActionMan/actionproperty.cpp114
-rw-r--r--krusader/ActionMan/actionproperty.h5
-rw-r--r--krusader/ActionMan/actionpropertybase.cpp374
-rw-r--r--krusader/ActionMan/actionpropertybase.ui166
-rw-r--r--krusader/ActionMan/addplaceholderpopup.cpp286
-rw-r--r--krusader/ActionMan/addplaceholderpopup.h116
-rw-r--r--krusader/ActionMan/useractionlistview.cpp58
-rw-r--r--krusader/ActionMan/useractionlistview.h20
-rw-r--r--krusader/ActionMan/useractionpage.cpp98
-rw-r--r--krusader/ActionMan/useractionpage.h15
-rw-r--r--krusader/BookMan/kraddbookmarkdlg.cpp58
-rw-r--r--krusader/BookMan/kraddbookmarkdlg.h19
-rw-r--r--krusader/BookMan/krbookmark.cpp14
-rw-r--r--krusader/BookMan/krbookmark.h15
-rw-r--r--krusader/BookMan/krbookmarkbutton.cpp10
-rw-r--r--krusader/BookMan/krbookmarkbutton.h7
-rw-r--r--krusader/BookMan/krbookmarkhandler.cpp178
-rw-r--r--krusader/BookMan/krbookmarkhandler.h39
-rw-r--r--krusader/Dialogs/checksumdlg.cpp320
-rw-r--r--krusader/Dialogs/checksumdlg.h24
-rw-r--r--krusader/Dialogs/krdialogs.cpp94
-rw-r--r--krusader/Dialogs/krdialogs.h48
-rw-r--r--krusader/Dialogs/krkeydialog.cpp50
-rw-r--r--krusader/Dialogs/krkeydialog.h5
-rw-r--r--krusader/Dialogs/krmaskchoice.cpp122
-rw-r--r--krusader/Dialogs/krmaskchoice.h57
-rw-r--r--krusader/Dialogs/krpleasewait.cpp32
-rw-r--r--krusader/Dialogs/krpleasewait.h22
-rw-r--r--krusader/Dialogs/krprogress.cpp110
-rw-r--r--krusader/Dialogs/krprogress.h19
-rw-r--r--krusader/Dialogs/krspecialwidgets.cpp70
-rw-r--r--krusader/Dialogs/krspecialwidgets.h71
-rw-r--r--krusader/Dialogs/krspwidgets.cpp94
-rw-r--r--krusader/Dialogs/krspwidgets.h24
-rw-r--r--krusader/Dialogs/krsqueezedtextlabel.cpp38
-rw-r--r--krusader/Dialogs/krsqueezedtextlabel.h25
-rw-r--r--krusader/Dialogs/kurllistrequester.cpp58
-rw-r--r--krusader/Dialogs/kurllistrequester.h27
-rw-r--r--krusader/Dialogs/newftpgui.cpp125
-rw-r--r--krusader/Dialogs/newftpgui.h55
-rw-r--r--krusader/Dialogs/packgui.cpp40
-rw-r--r--krusader/Dialogs/packgui.h7
-rw-r--r--krusader/Dialogs/packguibase.cpp200
-rw-r--r--krusader/Dialogs/packguibase.h103
-rw-r--r--krusader/Dialogs/percentalsplitter.cpp64
-rw-r--r--krusader/Dialogs/percentalsplitter.h15
-rw-r--r--krusader/Dialogs/popularurls.cpp62
-rw-r--r--krusader/Dialogs/popularurls.h16
-rw-r--r--krusader/DiskUsage/diskusage.cpp260
-rw-r--r--krusader/DiskUsage/diskusage.h82
-rw-r--r--krusader/DiskUsage/diskusagegui.cpp100
-rw-r--r--krusader/DiskUsage/diskusagegui.h27
-rw-r--r--krusader/DiskUsage/dufilelight.cpp54
-rw-r--r--krusader/DiskUsage/dufilelight.h5
-rw-r--r--krusader/DiskUsage/dulines.cpp166
-rw-r--r--krusader/DiskUsage/dulines.h17
-rw-r--r--krusader/DiskUsage/dulistview.cpp106
-rw-r--r--krusader/DiskUsage/dulistview.h63
-rw-r--r--krusader/DiskUsage/filelightParts/Config.cpp2
-rw-r--r--krusader/DiskUsage/filelightParts/Config.h2
-rw-r--r--krusader/DiskUsage/filelightParts/fileTree.cpp18
-rw-r--r--krusader/DiskUsage/filelightParts/fileTree.h80
-rw-r--r--krusader/DiskUsage/radialMap/builder.cpp4
-rw-r--r--krusader/DiskUsage/radialMap/labels.cpp36
-rw-r--r--krusader/DiskUsage/radialMap/map.cpp62
-rw-r--r--krusader/DiskUsage/radialMap/radialMap.h10
-rw-r--r--krusader/DiskUsage/radialMap/segmentTip.cpp70
-rw-r--r--krusader/DiskUsage/radialMap/segmentTip.h12
-rw-r--r--krusader/DiskUsage/radialMap/widget.cpp44
-rw-r--r--krusader/DiskUsage/radialMap/widget.h39
-rw-r--r--krusader/DiskUsage/radialMap/widgetEvents.cpp54
-rw-r--r--krusader/Filter/advancedfilter.cpp252
-rw-r--r--krusader/Filter/advancedfilter.h103
-rw-r--r--krusader/Filter/filterbase.h8
-rw-r--r--krusader/Filter/filterdialog.cpp10
-rw-r--r--krusader/Filter/filterdialog.h3
-rw-r--r--krusader/Filter/filtertabs.cpp18
-rw-r--r--krusader/Filter/filtertabs.h25
-rw-r--r--krusader/Filter/generalfilter.cpp174
-rw-r--r--krusader/Filter/generalfilter.h51
-rw-r--r--krusader/GUI/dirhistorybutton.cpp18
-rw-r--r--krusader/GUI/dirhistorybutton.h13
-rw-r--r--krusader/GUI/dirhistoryqueue.cpp16
-rw-r--r--krusader/GUI/dirhistoryqueue.h13
-rw-r--r--krusader/GUI/kcmdline.cpp96
-rw-r--r--krusader/GUI/kcmdline.h36
-rw-r--r--krusader/GUI/kcmdmodebutton.cpp10
-rw-r--r--krusader/GUI/kcmdmodebutton.h9
-rw-r--r--krusader/GUI/kfnkeys.cpp86
-rw-r--r--krusader/GUI/kfnkeys.h15
-rw-r--r--krusader/GUI/krremoteencodingmenu.cpp48
-rw-r--r--krusader/GUI/krremoteencodingmenu.h9
-rw-r--r--krusader/GUI/krusaderstatus.cpp10
-rw-r--r--krusader/GUI/krusaderstatus.h15
-rw-r--r--krusader/GUI/mediabutton.cpp210
-rw-r--r--krusader/GUI/mediabutton.h37
-rw-r--r--krusader/GUI/profilemanager.cpp46
-rw-r--r--krusader/GUI/profilemanager.h29
-rw-r--r--krusader/GUI/syncbrowsebutton.cpp4
-rw-r--r--krusader/GUI/syncbrowsebutton.h11
-rw-r--r--krusader/KViewer/diskusageviewer.cpp22
-rw-r--r--krusader/KViewer/diskusageviewer.h19
-rw-r--r--krusader/KViewer/kimagefilepreview.cpp54
-rw-r--r--krusader/KViewer/kimagefilepreview.h25
-rw-r--r--krusader/KViewer/krviewer.cpp162
-rw-r--r--krusader/KViewer/krviewer.h48
-rw-r--r--krusader/KViewer/panelviewer.cpp84
-rw-r--r--krusader/KViewer/panelviewer.h29
-rw-r--r--krusader/Konfigurator/kgadvanced.cpp38
-rw-r--r--krusader/Konfigurator/kgadvanced.h3
-rw-r--r--krusader/Konfigurator/kgarchives.cpp52
-rw-r--r--krusader/Konfigurator/kgarchives.h3
-rw-r--r--krusader/Konfigurator/kgcolors.cpp230
-rw-r--r--krusader/Konfigurator/kgcolors.h79
-rw-r--r--krusader/Konfigurator/kgdependencies.cpp52
-rw-r--r--krusader/Konfigurator/kgdependencies.h11
-rw-r--r--krusader/Konfigurator/kggeneral.cpp84
-rw-r--r--krusader/Konfigurator/kggeneral.h5
-rw-r--r--krusader/Konfigurator/kglookfeel.cpp132
-rw-r--r--krusader/Konfigurator/kglookfeel.h9
-rw-r--r--krusader/Konfigurator/kgprotocols.cpp178
-rw-r--r--krusader/Konfigurator/kgprotocols.h41
-rw-r--r--krusader/Konfigurator/kgstartup.cpp36
-rw-r--r--krusader/Konfigurator/kgstartup.h3
-rw-r--r--krusader/Konfigurator/kguseractions.cpp36
-rw-r--r--krusader/Konfigurator/kguseractions.h3
-rw-r--r--krusader/Konfigurator/kgwelcome.cpp12
-rw-r--r--krusader/Konfigurator/kgwelcome.h3
-rw-r--r--krusader/Konfigurator/konfigurator.cpp34
-rw-r--r--krusader/Konfigurator/konfigurator.h13
-rw-r--r--krusader/Konfigurator/konfiguratoritems.cpp314
-rw-r--r--krusader/Konfigurator/konfiguratoritems.h244
-rw-r--r--krusader/Konfigurator/konfiguratorpage.cpp154
-rw-r--r--krusader/Konfigurator/konfiguratorpage.h181
-rw-r--r--krusader/Konfigurator/krresulttable.cpp94
-rw-r--r--krusader/Konfigurator/krresulttable.h64
-rw-r--r--krusader/Konfigurator/krresulttabledialog.cpp38
-rw-r--r--krusader/Konfigurator/krresulttabledialog.h38
-rw-r--r--krusader/Konfigurator/searchobject.cpp10
-rw-r--r--krusader/Konfigurator/searchobject.h48
-rw-r--r--krusader/KrJS/krjs.cpp16
-rw-r--r--krusader/KrJS/krjs.h2
-rwxr-xr-xkrusader/Locate/locate.cpp162
-rwxr-xr-xkrusader/Locate/locate.h27
-rw-r--r--krusader/MountMan/kdiskfreesp.cpp60
-rw-r--r--krusader/MountMan/kdiskfreesp.h23
-rw-r--r--krusader/MountMan/kmountman.cpp76
-rw-r--r--krusader/MountMan/kmountman.h39
-rw-r--r--krusader/MountMan/kmountmangui.cpp140
-rw-r--r--krusader/MountMan/kmountmangui.h61
-rw-r--r--krusader/Panel/krbriefview.cpp404
-rw-r--r--krusader/Panel/krbriefview.h119
-rw-r--r--krusader/Panel/krbriefviewitem.cpp54
-rw-r--r--krusader/Panel/krbriefviewitem.h24
-rw-r--r--krusader/Panel/krcalcspacedialog.cpp36
-rw-r--r--krusader/Panel/krcalcspacedialog.h21
-rw-r--r--krusader/Panel/krcolorcache.cpp266
-rw-r--r--krusader/Panel/krcolorcache.h43
-rw-r--r--krusader/Panel/krdetailedview.cpp410
-rw-r--r--krusader/Panel/krdetailedview.h101
-rw-r--r--krusader/Panel/krdetailedviewitem.cpp68
-rw-r--r--krusader/Panel/krdetailedviewitem.h16
-rw-r--r--krusader/Panel/krdrag.cpp28
-rw-r--r--krusader/Panel/krdrag.h15
-rw-r--r--krusader/Panel/krpopupmenu.cpp56
-rw-r--r--krusader/Panel/krpopupmenu.h15
-rw-r--r--krusader/Panel/krpreviewpopup.cpp10
-rw-r--r--krusader/Panel/krpreviewpopup.h9
-rw-r--r--krusader/Panel/krselectionmode.cpp4
-rw-r--r--krusader/Panel/krselectionmode.h10
-rw-r--r--krusader/Panel/krview.cpp70
-rw-r--r--krusader/Panel/krview.h99
-rw-r--r--krusader/Panel/krviewitem.cpp40
-rw-r--r--krusader/Panel/krviewitem.h18
-rw-r--r--krusader/Panel/listpanel.cpp360
-rw-r--r--krusader/Panel/listpanel.h99
-rwxr-xr-xkrusader/Panel/panelfunc.cpp246
-rw-r--r--krusader/Panel/panelfunc.h29
-rw-r--r--krusader/Panel/panelpopup.cpp152
-rw-r--r--krusader/Panel/panelpopup.h43
-rw-r--r--krusader/Queue/queue.cpp2
-rw-r--r--krusader/Queue/queue.h21
-rw-r--r--krusader/Queue/queue_mgr.cpp12
-rw-r--r--krusader/Queue/queue_mgr.h16
-rw-r--r--krusader/Queue/queuewidget.h7
-rw-r--r--krusader/RemoteMan/remoteman.cpp148
-rw-r--r--krusader/RemoteMan/remoteman.h19
-rw-r--r--krusader/RemoteMan/remotemanbase.cpp184
-rw-r--r--krusader/RemoteMan/remotemanbase.h103
-rw-r--r--krusader/Search/krsearchdialog.cpp198
-rw-r--r--krusader/Search/krsearchdialog.h77
-rw-r--r--krusader/Search/krsearchmod.cpp44
-rw-r--r--krusader/Search/krsearchmod.h23
-rw-r--r--krusader/Splitter/combiner.cpp84
-rw-r--r--krusader/Splitter/combiner.h25
-rw-r--r--krusader/Splitter/splitter.cpp70
-rw-r--r--krusader/Splitter/splitter.h19
-rw-r--r--krusader/Splitter/splittergui.cpp54
-rw-r--r--krusader/Splitter/splittergui.h100
-rw-r--r--krusader/Synchronizer/feedtolistboxdialog.cpp72
-rw-r--r--krusader/Synchronizer/feedtolistboxdialog.h19
-rwxr-xr-xkrusader/Synchronizer/synchronizedialog.cpp96
-rwxr-xr-xkrusader/Synchronizer/synchronizedialog.h35
-rwxr-xr-xkrusader/Synchronizer/synchronizer.cpp330
-rwxr-xr-xkrusader/Synchronizer/synchronizer.h99
-rw-r--r--krusader/Synchronizer/synchronizerdirlist.cpp56
-rw-r--r--krusader/Synchronizer/synchronizerdirlist.h21
-rw-r--r--krusader/Synchronizer/synchronizerfileitem.h88
-rwxr-xr-xkrusader/Synchronizer/synchronizergui.cpp436
-rwxr-xr-xkrusader/Synchronizer/synchronizergui.h155
-rw-r--r--krusader/Synchronizer/synchronizertask.cpp72
-rw-r--r--krusader/Synchronizer/synchronizertask.h69
-rw-r--r--krusader/UserAction/expander.cpp296
-rw-r--r--krusader/UserAction/expander.h72
-rw-r--r--krusader/UserAction/kraction.cpp170
-rw-r--r--krusader/UserAction/kraction.h91
-rw-r--r--krusader/UserAction/kractionbase.cpp10
-rw-r--r--krusader/UserAction/kractionbase.h10
-rw-r--r--krusader/UserAction/tstring.h22
-rw-r--r--krusader/UserAction/useraction.cpp60
-rw-r--r--krusader/UserAction/useraction.h28
-rw-r--r--krusader/UserAction/useractionpopupmenu.cpp2
-rw-r--r--krusader/UserAction/useractionpopupmenu.h2
-rw-r--r--krusader/UserMenu/usermenu.cpp4
-rw-r--r--krusader/UserMenu/usermenu.h8
-rwxr-xr-xkrusader/VFS/arc_vfs.cpp240
-rw-r--r--krusader/VFS/arc_vfs.h79
-rw-r--r--krusader/VFS/ftp_vfs.cpp82
-rw-r--r--krusader/VFS/ftp_vfs.h17
-rw-r--r--krusader/VFS/krarchandler.cpp192
-rw-r--r--krusader/VFS/krarchandler.h71
-rw-r--r--krusader/VFS/krdirwatch.cpp20
-rw-r--r--krusader/VFS/krdirwatch.h31
-rw-r--r--krusader/VFS/krpermhandler.cpp120
-rw-r--r--krusader/VFS/krpermhandler.h58
-rw-r--r--krusader/VFS/krquery.cpp168
-rw-r--r--krusader/VFS/krquery.h79
-rw-r--r--krusader/VFS/krvfshandler.cpp16
-rw-r--r--krusader/VFS/krvfshandler.h6
-rw-r--r--krusader/VFS/normal_vfs.cpp112
-rw-r--r--krusader/VFS/normal_vfs.h35
-rw-r--r--krusader/VFS/preservingcopyjob.cpp52
-rw-r--r--krusader/VFS/preservingcopyjob.h21
-rw-r--r--krusader/VFS/temp_vfs.cpp26
-rw-r--r--krusader/VFS/temp_vfs.h12
-rw-r--r--krusader/VFS/vfile.cpp50
-rw-r--r--krusader/VFS/vfile.h79
-rw-r--r--krusader/VFS/vfs.cpp76
-rw-r--r--krusader/VFS/vfs.h51
-rw-r--r--krusader/VFS/virt_vfs.cpp68
-rw-r--r--krusader/VFS/virt_vfs.h25
-rw-r--r--krusader/VFS/virtualcopyjob.cpp74
-rw-r--r--krusader/VFS/virtualcopyjob.h29
-rw-r--r--krusader/calc.ui46
-rw-r--r--krusader/defaults.h16
-rw-r--r--krusader/kicons.cpp6
-rw-r--r--krusader/kicons.h8
-rw-r--r--krusader/krservices.cpp82
-rw-r--r--krusader/krservices.h35
-rw-r--r--krusader/krslots.cpp130
-rw-r--r--krusader/krslots.h15
-rw-r--r--krusader/krusader.cpp392
-rw-r--r--krusader/krusader.h37
-rw-r--r--krusader/krusaderapp.h1
-rw-r--r--krusader/krusaderview.cpp94
-rw-r--r--krusader/krusaderview.h41
-rw-r--r--krusader/main.cpp20
-rw-r--r--krusader/mount.ui20
-rw-r--r--krusader/panelmanager.cpp68
-rw-r--r--krusader/panelmanager.h31
-rw-r--r--krusader/paneltabbar.cpp68
-rw-r--r--krusader/paneltabbar.h31
-rw-r--r--krusader/recode.ui32
-rw-r--r--tar/ktartest.cpp28
-rw-r--r--tar/tar.cc70
-rw-r--r--tar/tar.h10
-rw-r--r--virt/virt.cc44
-rw-r--r--virt/virt.h8
294 files changed, 10059 insertions, 9926 deletions
diff --git a/iso/iso.cpp b/iso/iso.cpp
index 8b7ebe6..b1c7fe3 100644
--- a/iso/iso.cpp
+++ b/iso/iso.cpp
@@ -27,7 +27,7 @@
#include <unistd.h>
#include <klargefile.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kurl.h>
#include <kdebug.h>
#include <kinstance.h>
@@ -78,7 +78,7 @@ int kdemain( int argc, char **argv )
}
-kio_isoProtocol::kio_isoProtocol( const QCString &pool, const QCString &app ) : SlaveBase( "iso", pool, app )
+kio_isoProtocol::kio_isoProtocol( const TQCString &pool, const TQCString &app ) : SlaveBase( "iso", pool, app )
{
kdDebug() << "kio_isoProtocol::kio_isoProtocol" << endl;
m_isoFile = 0L;
@@ -89,7 +89,7 @@ kio_isoProtocol::~kio_isoProtocol()
delete m_isoFile;
}
-bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int startsec )
+bool kio_isoProtocol::checkNewFile( TQString fullPath, TQString & path, int startsec )
{
kdDebug() << "kio_isoProtocol::checkNewFile " << fullPath << " startsec: " <<
startsec << endl;
@@ -100,7 +100,7 @@ bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int starts
{
// Has it changed ?
struct stat statbuf;
- if ( ::stat( QFile::encodeName( m_isoFile->fileName() ), &statbuf ) == 0 )
+ if ( ::stat( TQFile::encodeName( m_isoFile->fileName() ), &statbuf ) == 0 )
{
if ( m_mtime == statbuf.st_mtime )
{
@@ -122,21 +122,21 @@ bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int starts
// Find where the iso file is in the full path
int pos = 0;
- QString isoFile;
- path = QString::null;
+ TQString isoFile;
+ path = TQString();
int len = fullPath.length();
if ( len != 0 && fullPath[ len - 1 ] != '/' )
fullPath += '/';
kdDebug() << "the full path is " << fullPath << endl;
- while ( (pos=fullPath.find( '/', pos+1 )) != -1 )
+ while ( (pos=fullPath.tqfind( '/', pos+1 )) != -1 )
{
- QString tryPath = fullPath.left( pos );
+ TQString tryPath = fullPath.left( pos );
kdDebug() << fullPath << " trying " << tryPath << endl;
KDE_struct_stat statbuf;
- if ( KDE_lstat( QFile::encodeName(tryPath), &statbuf ) == 0 && !S_ISDIR(statbuf.st_mode) )
+ if ( KDE_lstat( TQFile::encodeName(tryPath), &statbuf ) == 0 && !S_ISDIR(statbuf.st_mode) )
{
isoFile = tryPath;
m_mtime = statbuf.st_mtime;
@@ -150,7 +150,7 @@ bool kio_isoProtocol::checkNewFile( QString fullPath, QString & path, int starts
path.truncate( len - 1 );
}
else
- path = QString::fromLatin1("/");
+ path = TQString::tqfromLatin1("/");
kdDebug() << "Found. isoFile=" << isoFile << " path=" << path << endl;
break;
}
@@ -234,10 +234,10 @@ void kio_isoProtocol::listDir( const KURL & url )
{
kdDebug() << "kio_isoProtocol::listDir " << url.url() << endl;
- QString path;
+ TQString path;
if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) )
{
- QCString _path( QFile::encodeName(url.path()));
+ TQCString _path( TQFile::encodeName(url.path()));
kdDebug() << "Checking (stat) on " << _path << endl;
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
@@ -259,10 +259,10 @@ void kio_isoProtocol::listDir( const KURL & url )
if ( path.isEmpty() )
{
- KURL redir( QString::fromLatin1( "iso:/") );
+ KURL redir( TQString::tqfromLatin1( "iso:/") );
kdDebug() << "url.path()==" << url.path() << endl;
if (url.hasRef()) redir.setRef(url.htmlRef());
- redir.setPath( url.path() + QString::fromLatin1("/") );
+ redir.setPath( url.path() + TQString::tqfromLatin1("/") );
kdDebug() << "kio_isoProtocol::listDir: redirection " << redir.url() << endl;
redirection( redir );
finished();
@@ -274,7 +274,7 @@ void kio_isoProtocol::listDir( const KURL & url )
const KArchiveDirectory* dir;
if (!path.isEmpty() && path != "/")
{
- kdDebug() << QString("Looking for entry %1").arg(path) << endl;
+ kdDebug() << TQString("Looking for entry %1").tqarg(path) << endl;
const KArchiveEntry* e = root->entry( path );
if ( !e )
{
@@ -291,11 +291,11 @@ void kio_isoProtocol::listDir( const KURL & url )
dir = root;
}
- QStringList l = dir->entries();
+ TQStringList l = dir->entries();
totalSize( l.count() );
UDSEntry entry;
- QStringList::Iterator it = l.begin();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
kdDebug() << (*it) << endl;
@@ -315,7 +315,7 @@ void kio_isoProtocol::listDir( const KURL & url )
void kio_isoProtocol::stat( const KURL & url )
{
- QString path;
+ TQString path;
UDSEntry entry;
kdDebug() << "kio_isoProtocol::stat " << url.url() << endl;
@@ -323,7 +323,7 @@ void kio_isoProtocol::stat( const KURL & url )
{
// We may be looking at a real directory - this happens
// when pressing up after being in the root of an archive
- QCString _path( QFile::encodeName(url.path()));
+ TQCString _path( TQFile::encodeName(url.path()));
kdDebug() << "kio_isoProtocol::stat (stat) on " << _path << endl;
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
@@ -356,7 +356,7 @@ void kio_isoProtocol::stat( const KURL & url )
const KArchiveEntry* isoEntry;
if ( path.isEmpty() )
{
- path = QString::fromLatin1( "/" );
+ path = TQString::tqfromLatin1( "/" );
isoEntry = root;
} else {
isoEntry = root->entry( path );
@@ -371,11 +371,11 @@ void kio_isoProtocol::stat( const KURL & url )
finished();
}
-void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const QString &path )
+void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &path )
{
unsigned long long size, pos = 0;
bool mime=false,zlib=false;
- QByteArray fileData, pointer_block, inbuf, outbuf;
+ TQByteArray fileData, pointer_block, inbuf, outbuf;
char *pptr = 0;
compressed_file_header *hdr;
int block_shift;
@@ -489,7 +489,7 @@ void kio_isoProtocol::get( const KURL & url )
{
kdDebug() << "kio_isoProtocol::get" << url.url() << endl;
- QString path;
+ TQString path;
if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) )
{
error( KIO::ERR_DOES_NOT_EXIST, url.path() );
diff --git a/iso/iso.h b/iso/iso.h
index 079f68e..6b16b63 100644
--- a/iso/iso.h
+++ b/iso/iso.h
@@ -31,7 +31,7 @@ class KIso;
class kio_isoProtocol : public KIO::SlaveBase
{
public:
- kio_isoProtocol( const QCString &pool, const QCString &app );
+ kio_isoProtocol( const TQCString &pool, const TQCString &app );
virtual ~kio_isoProtocol();
virtual void listDir( const KURL & url );
@@ -39,9 +39,9 @@ public:
virtual void get( const KURL & url );
protected:
- void getFile( const KIsoFile *isoFileEntry, const QString &path );
+ void getFile( const KIsoFile *isoFileEntry, const TQString &path );
void createUDSEntry( const KArchiveEntry * isoEntry, KIO::UDSEntry & entry );
- bool checkNewFile( QString fullPath, QString & path, int startsec );
+ bool checkNewFile( TQString fullPath, TQString & path, int startsec );
KIso * m_isoFile;
time_t m_mtime;
diff --git a/iso/kiso.cpp b/iso/kiso.cpp
index 6bc4241..61baaf4 100644
--- a/iso/kiso.cpp
+++ b/iso/kiso.cpp
@@ -27,9 +27,9 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <qcstring.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqcstring.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kurl.h>
#include <kmimetype.h>
@@ -39,7 +39,7 @@
#include "kiso.h"
#include "libisofs/isofs.h"
-#include "qfilehack.h"
+#include "tqfilehack.h"
#ifdef __linux__
@@ -55,7 +55,7 @@
////////////////////////////////////////////////////////////////////////
/**
- * puts the track layout of the device 'fname' into 'tracks'
+ * puts the track tqlayout of the device 'fname' into 'tracks'
* tracks structure: start sector, track number, ...
* tracks should be 100*2 entry long (this is the maximum in the CD-ROM standard)
* currently it's linux only, porters are welcome
@@ -102,16 +102,16 @@ class KIso::KIsoPrivate
{
public:
KIsoPrivate() {}
- QStringList dirList;
+ TQStringList dirList;
};
-KIso::KIso( const QString& filename, const QString & _mimetype )
+KIso::KIso( const TQString& filename, const TQString & _mimetype )
: KArchive( 0L )
{
m_startsec = -1;
m_filename = filename;
d = new KIsoPrivate;
- QString mimetype( _mimetype );
+ TQString mimetype( _mimetype );
bool forced = true;
if ( mimetype.isEmpty() )
{
@@ -128,7 +128,7 @@ KIso::KIso( const QString& filename, const QString & _mimetype )
else
{
// Something else. Check if it's not really gzip though (e.g. for KOffice docs)
- QFile file( filename );
+ TQFile file( filename );
if ( file.open( IO_ReadOnly ) )
{
unsigned char firstByte = file.getch();
@@ -152,26 +152,26 @@ KIso::KIso( const QString& filename, const QString & _mimetype )
prepareDevice( filename, mimetype, forced );
}
-void KIso::prepareDevice( const QString & filename,
- const QString & mimetype, bool forced )
+void KIso::prepareDevice( const TQString & filename,
+ const TQString & mimetype, bool forced )
{
- /* 'hack' for Qt's false assumption that only S_ISREG is seekable */
+ /* 'hack' for TQt's false assumption that only S_ISREG is seekable */
if( "inode/blockdevice" == mimetype )
- setDevice( new QFileHack( filename ) );
+ setDevice( new TQFileHack( filename ) );
else
{
if( "application/x-gzip" == mimetype
|| "application/x-bzip2" == mimetype)
forced = true;
- QIODevice *dev = KFilterDev::deviceForFile( filename, mimetype, forced );
+ TQIODevice *dev = KFilterDev::deviceForFile( filename, mimetype, forced );
if( dev )
setDevice( dev );
}
}
-KIso::KIso( QIODevice * dev )
+KIso::KIso( TQIODevice * dev )
: KArchive( dev )
{
d = new KIsoPrivate;
@@ -190,7 +190,7 @@ KIso::~KIso()
/* callback function for libisofs */
static int readf(char *buf, int start, int len,void *udata) {
- QIODevice* dev = ( static_cast<KIso*> (udata) )->device();
+ TQIODevice* dev = ( static_cast<KIso*> (udata) )->device();
if (dev->at(start<<11)) {
if ((dev->readBlock(buf, len<<11)) != -1) return (len);
@@ -204,7 +204,7 @@ static int readf(char *buf, int start, int len,void *udata) {
static int mycallb(struct iso_directory_record *idr,void *udata) {
KIso *iso = static_cast<KIso*> (udata);
- QString path,user,group,symlink;
+ TQString path,user,group,symlink;
int i;
int access;
int time,cdate,adate;
@@ -249,7 +249,7 @@ static int mycallb(struct iso_directory_record *idr,void *udata) {
if (!special) {
if (iso->joliet) {
for (i=0;i<(isonum_711(idr->name_len)-1);i+=2) {
- QChar ch( be2me_16(*((ushort*)&(idr->name[i]))) );
+ TQChar ch( be2me_16(*((ushort*)&(idr->name[i]))) );
if (ch==';') break;
path+=ch;
}
@@ -292,12 +292,12 @@ void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) {
int i,size;
boot_head boot;
boot_entry *be;
- QString path;
+ TQString path;
KIsoFile *entry;
entry=new KIsoFile( this, "Catalog", dirent->permissions() & ~S_IFDIR,
dirent->date(), dirent->adate(), dirent->cdate(),
- dirent->user(), dirent->group(), QString::null,
+ dirent->user(), dirent->group(), TQString(),
isonum_731(bootdesc->boot_catalog)<<11, 2048 );
dirent->addEntry(entry);
if (!ReadBootTable(&readf,isonum_731(bootdesc->boot_catalog),&boot,this)) {
@@ -307,10 +307,10 @@ void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) {
size=BootImageSize( isonum_711(((struct default_entry*) be->data)->media),
isonum_721(((struct default_entry*) be->data)->seccount));
path="Default Image";
- if (i>1) path += " (" + QString::number(i) + ")";
+ if (i>1) path += " (" + TQString::number(i) + ")";
entry=new KIsoFile( this, path, dirent->permissions() & ~S_IFDIR,
dirent->date(), dirent->adate(), dirent->cdate(),
- dirent->user(), dirent->group(), QString::null,
+ dirent->user(), dirent->group(), TQString(),
isonum_731(((struct default_entry*) be->data)->start)<<11, size<<9 );
dirent->addEntry(entry);
be=be->next;
@@ -335,7 +335,7 @@ void KIso::readParams()
bool KIso::openArchive( int mode )
{
iso_vol_desc *desc;
- QString path,tmp,uid,gid;
+ TQString path,tmp,uid,gid;
struct stat buf;
int tracks[2*100],trackno=0,i,access,c_b,c_i,c_j;
KArchiveDirectory *root;
@@ -359,7 +359,7 @@ bool KIso::openArchive( int mode )
memset(&buf,0,sizeof(struct stat));
buf.st_mode=0777;
} else {
- /* If it's a block device, try to query the track layout (for multisession) */
+ /* If it's a block device, try to query the track tqlayout (for multisession) */
if (m_startsec == -1 && S_ISBLK(buf.st_mode))
trackno=getTracks(m_filename.latin1(),(int*) &tracks);
}
@@ -375,10 +375,10 @@ bool KIso::openArchive( int mode )
c_b=1;c_i=1;c_j=1;
root=rootDir();
if (trackno>1) {
- path=QString::null;
- QTextOStream(&path) << "Track " << tracks[(i<<1)+1];
+ path=TQString();
+ TQTextOStream(&path) << "Track " << tracks[(i<<1)+1];
root = new KIsoDirectory( this, path, access | S_IFDIR,
- buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, QString::null );
+ buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, TQString() );
rootDir()->addEntry(root);
}
@@ -395,10 +395,10 @@ bool KIso::openArchive( int mode )
bootdesc=(struct el_torito_boot_descriptor*) &(desc->data);
if ( !memcmp(EL_TORITO_ID,bootdesc->system_id,ISODCL(8,39)) ) {
path="El Torito Boot";
- if (c_b>1) path += " (" + QString::number(c_b) + ")";
+ if (c_b>1) path += " (" + TQString::number(c_b) + ")";
dirent = new KIsoDirectory( this, path, access | S_IFDIR,
- buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, QString::null );
+ buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, TQString() );
root->addEntry(dirent);
addBoot(bootdesc);
@@ -411,14 +411,14 @@ bool KIso::openArchive( int mode )
idr=(struct iso_directory_record*) &( ((struct iso_primary_descriptor*) &desc->data)->root_directory_record);
joliet = JolietLevel(&desc->data);
if (joliet) {
- QTextOStream(&path) << "Joliet level " << joliet;
- if (c_j>1) path += " (" + QString::number(c_j) + ")";
+ TQTextOStream(&path) << "Joliet level " << joliet;
+ if (c_j>1) path += " (" + TQString::number(c_j) + ")";
} else {
path = "ISO9660";
- if (c_i>1) path += " (" + QString::number(c_i) + ")";
+ if (c_i>1) path += " (" + TQString::number(c_i) + ")";
}
dirent = new KIsoDirectory( this, path, access | S_IFDIR,
- buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, QString::null );
+ buf.st_mtime, buf.st_atime, buf.st_ctime, uid, gid, TQString() );
root->addEntry(dirent);
level=0;
mycallb(idr, this );
@@ -439,12 +439,12 @@ bool KIso::closeArchive()
return true;
}
-bool KIso::writeDir( const QString&, const QString&, const QString& )
+bool KIso::writeDir( const TQString&, const TQString&, const TQString& )
{
return false;
}
-bool KIso::prepareWriting( const QString&, const QString&, const QString&, uint)
+bool KIso::prepareWriting( const TQString&, const TQString&, const TQString&, uint)
{
return false;
}
diff --git a/iso/kiso.h b/iso/kiso.h
index ceddb4a..546b09a 100644
--- a/iso/kiso.h
+++ b/iso/kiso.h
@@ -25,10 +25,10 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
#include "kisofile.h"
#include "kisodirectory.h"
@@ -50,15 +50,15 @@ public:
* Do not use application/x-tgz or so. Only the compression layer !
* If the mimetype is ommitted, it will be determined from the filename.
*/
- KIso( const QString& filename, const QString & mimetype = QString::null );
+ KIso( const TQString& filename, const TQString & mimetype = TQString() );
/**
* Creates an instance that operates on the given device.
- * The device can be compressed (KFilterDev) or not (QFile, etc.).
- * WARNING: don't assume that giving a QFile here will decompress the file,
+ * The device can be compressed (KFilterDev) or not (TQFile, etc.).
+ * WARNING: don't assume that giving a TQFile here will decompress the file,
* in case it's compressed!
*/
- KIso( QIODevice * dev );
+ KIso( TQIODevice * dev );
/**
* If the .iso is still opened, then it will be
@@ -68,12 +68,12 @@ public:
/**
* The name of the os file, as passed to the constructor
- * Null if you used the QIODevice constructor.
+ * Null if you used the TQIODevice constructor.
*/
- QString fileName() { return m_filename; }
+ TQString fileName() { return m_filename; }
- bool writeDir( const QString& , const QString& , const QString& );
- bool prepareWriting( const QString& , const QString& , const QString& , uint );
+ bool writeDir( const TQString& , const TQString& , const TQString& );
+ bool prepareWriting( const TQString& , const TQString& , const TQString& , uint );
bool doneWriting( uint );
void setStartSec(int startsec) { m_startsec = startsec; }
@@ -98,10 +98,10 @@ private:
* @internal
*/
void addBoot(struct el_torito_boot_descriptor* bootdesc);
- void prepareDevice( const QString & filename, const QString & mimetype, bool forced = false );
+ void prepareDevice( const TQString & filename, const TQString & mimetype, bool forced = false );
int m_startsec;
- QString m_filename;
+ TQString m_filename;
protected:
virtual void virtual_hook( int id, void* data );
private:
diff --git a/iso/kisodirectory.cpp b/iso/kisodirectory.cpp
index f354383..74987a2 100644
--- a/iso/kisodirectory.cpp
+++ b/iso/kisodirectory.cpp
@@ -17,9 +17,9 @@
#include "kisodirectory.h"
-KIsoDirectory::KIsoDirectory( KArchive* archive, const QString& name, int access,
- int date, int adate, int cdate, const QString& user, const QString& group,
- const QString& symlink) :
+KIsoDirectory::KIsoDirectory( KArchive* archive, const TQString& name, int access,
+ int date, int adate, int cdate, const TQString& user, const TQString& group,
+ const TQString& symlink) :
KArchiveDirectory(archive, name, access, date, user, group, symlink) {
diff --git a/iso/kisodirectory.h b/iso/kisodirectory.h
index 0b59719..74045ac 100644
--- a/iso/kisodirectory.h
+++ b/iso/kisodirectory.h
@@ -18,7 +18,7 @@
#ifndef KISODIRECTORY_H
#define KISODIRECTORY_H
-#include <qstring.h>
+#include <tqstring.h>
#include <karchive.h>
/**
@@ -27,9 +27,9 @@
class KIsoDirectory : public KArchiveDirectory {
public:
- KIsoDirectory( KArchive* archive, const QString& name, int access, int date,
- int adate,int cdate, const QString& user, const QString& group,
- const QString& symlink);
+ KIsoDirectory( KArchive* archive, const TQString& name, int access, int date,
+ int adate,int cdate, const TQString& user, const TQString& group,
+ const TQString& symlink);
~KIsoDirectory();
int adate() const { return m_adate; }
int cdate() const { return m_cdate; }
diff --git a/iso/kisofile.cpp b/iso/kisofile.cpp
index 1d23b9c..afac16b 100644
--- a/iso/kisofile.cpp
+++ b/iso/kisofile.cpp
@@ -18,9 +18,9 @@
#include "kisofile.h"
#include <kdebug.h>
-KIsoFile::KIsoFile( KArchive* archive, const QString& name, int access,
- int date, int adate,int cdate, const QString& user, const QString& group,
- const QString& symlink,int pos, int size) :
+KIsoFile::KIsoFile( KArchive* archive, const TQString& name, int access,
+ int date, int adate,int cdate, const TQString& user, const TQString& group,
+ const TQString& symlink,int pos, int size) :
KArchiveFile(archive, name, access, date, user, group, symlink, pos, size) {
@@ -38,8 +38,8 @@ void KIsoFile::setZF(char algo[2],char parms[2],int realsize) {
m_realsize=realsize;
}
-QByteArray KIsoFile::data(long long pos, int count) const {
- QByteArray r;
+TQByteArray KIsoFile::data(long long pos, int count) const {
+ TQByteArray r;
int rlen;
if ( archive()->device()->at(position()+pos) &&
diff --git a/iso/kisofile.h b/iso/kisofile.h
index a30fc75..193509c 100644
--- a/iso/kisofile.h
+++ b/iso/kisofile.h
@@ -18,7 +18,7 @@
#ifndef KISOFILE_H
#define KISOFILE_H
-#include <qstring.h>
+#include <tqstring.h>
#include <karchive.h>
/**
@@ -27,16 +27,16 @@
class KIsoFile : public KArchiveFile {
public:
- KIsoFile( KArchive* archive, const QString& name, int access, int date,
- int adate,int cdate, const QString& user, const QString& group,
- const QString& symlink, int pos, int size);
+ KIsoFile( KArchive* archive, const TQString& name, int access, int date,
+ int adate,int cdate, const TQString& user, const TQString& group,
+ const TQString& symlink, int pos, int size);
~KIsoFile();
void setZF(char algo[2],char parms[2],int realsize);
int adate() const { return m_adate; }
int cdate() const { return m_cdate; }
long long realsize() const { return m_realsize; }
- virtual QByteArray data(long long pos, int count) const;
+ virtual TQByteArray data(long long pos, int count) const;
private:
/* hide this member function, it's broken by design, because the full
data often requires too much memory */
diff --git a/iso/libisofs/iso_fs.h b/iso/libisofs/iso_fs.h
index 43353b0..b726b9f 100644
--- a/iso/libisofs/iso_fs.h
+++ b/iso/libisofs/iso_fs.h
@@ -131,13 +131,13 @@ struct hs_primary_descriptor {
char root_directory_record [ISODCL (181, 214)]; /* 9.1 */
};
-/* We use this to help us look up the parent inode numbers. */
+/* We use this to help us look up the tqparent inode numbers. */
struct iso_path_table{
char name_len[1]; /* 711 */
char ext_attr_length[1]; /* 711 */
char extent[4]; /* 731 */
- char parent[2]; /* 721 */
+ char tqparent[2]; /* 721 */
char name[1];
};
diff --git a/iso/libisofs/isofs.h b/iso/libisofs/isofs.h
index 52190e6..30c18db 100644
--- a/iso/libisofs/isofs.h
+++ b/iso/libisofs/isofs.h
@@ -45,7 +45,7 @@ typedef struct _rr_entry {
int serno;
int dev_major;
int dev_minor;
- int pl; /* parent location */
+ int pl; /* tqparent location */
int cl; /* child location */
int re; /* relocated */
char z_algo[2]; /* zizofs algorithm */
@@ -62,7 +62,7 @@ typedef struct _iso_vol_desc {
typedef struct _boot_entry {
struct _boot_entry *next;
struct _boot_entry *prev;
- struct _boot_entry *parent;
+ struct _boot_entry *tqparent;
struct _boot_entry *child;
char data[32];
}
diff --git a/iso/qfilehack.cpp b/iso/qfilehack.cpp
index 6f0b99d..234f404 100644
--- a/iso/qfilehack.cpp
+++ b/iso/qfilehack.cpp
@@ -15,24 +15,24 @@
* *
***************************************************************************/
-#include "qfilehack.h"
+#include "tqfilehack.h"
-QFileHack::QFileHack(){
+TQFileHack::TQFileHack(){
}
-QFileHack::QFileHack( const QString & name ) : QFile(name) {
+TQFileHack::TQFileHack( const TQString & name ) : TQFile(name) {
}
-QFileHack::~QFileHack(){
+TQFileHack::~TQFileHack(){
}
-bool QFileHack::open ( int m ) {
+bool TQFileHack::open ( int m ) {
bool ret;
#ifdef __linux__
m |= IO_Async; //On linux, set O_NONBLOCK, opens CD-ROMs faster
#endif
- ret=QFile::open(m);
+ ret=TQFile::open(m);
if (ret && isSequentialAccess() ) {
setType(IO_Direct);
}
diff --git a/iso/qfilehack.h b/iso/qfilehack.h
index 5e9e247..ba3b57f 100644
--- a/iso/qfilehack.h
+++ b/iso/qfilehack.h
@@ -15,23 +15,23 @@
* *
***************************************************************************/
-#ifndef QFILEHACK_H
-#define QFILEHACK_H
+#ifndef TQFILEHACK_H
+#define TQFILEHACK_H
-#include <qfile.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqstring.h>
/**
*@author Szombathelyi György
- * Qt thinks if a file is not S_IFREG, you cannot seek in it. It's false (what about
+ * TQt thinks if a file is not S_IFREG, you cannot seek in it. It's false (what about
* block devices for example?
*/
-class QFileHack : public QFile {
+class TQFileHack : public TQFile {
public:
- QFileHack();
- QFileHack( const QString & name );
- ~QFileHack();
+ TQFileHack();
+ TQFileHack( const TQString & name );
+ ~TQFileHack();
virtual bool open ( int m );
};
diff --git a/krArc/krarc.cpp b/krArc/krarc.cpp
index 663236a..f4d621e 100644
--- a/krArc/krarc.cpp
+++ b/krArc/krarc.cpp
@@ -20,11 +20,11 @@
#include <time.h>
#include <stdlib.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qdir.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqdir.h>
#include <kfileitem.h>
#include <kdebug.h>
@@ -46,9 +46,9 @@
#if 0
#define KRDEBUG(X...) do{ \
- QFile f("/tmp/debug"); \
+ TQFile f("/tmp/debug"); \
f.open(IO_WriteOnly | IO_Append); \
- QTextStream stream( &f ); \
+ TQTextStream stream( &f ); \
stream << "Pid:" << (int)getpid() << " " <<__FUNCTION__<<"(" <<__LINE__<<"): "; \
stream << X << endl; \
f.close(); \
@@ -76,19 +76,19 @@ int kdemain( int argc, char **argv ){
} // extern "C"
-kio_krarcProtocol::kio_krarcProtocol(const QCString &pool_socket, const QCString &app_socket)
+kio_krarcProtocol::kio_krarcProtocol(const TQCString &pool_socket, const TQCString &app_socket)
: SlaveBase("kio_krarc", pool_socket, app_socket), archiveChanged(true), arcFile(0L),extArcReady(false),
- password(QString::null) {
+ password(TQString()) {
krConfig = new KConfig( "krusaderrc" );
krConfig->setGroup( "Dependencies" );
dirDict.setAutoDelete(true);
- arcTempDir = locateLocal("tmp",QString::null);
- QString dirName = "krArc"+QDateTime::currentDateTime().toString(Qt::ISODate);
- dirName.replace(QRegExp(":"),"_");
- QDir(arcTempDir).mkdir(dirName);
+ arcTempDir = locateLocal("tmp",TQString());
+ TQString dirName = "krArc"+TQDateTime::tqcurrentDateTime().toString(Qt::ISODate);
+ dirName.tqreplace(TQRegExp(":"),"_");
+ TQDir(arcTempDir).mkdir(dirName);
arcTempDir = arcTempDir+dirName+"/";
}
@@ -102,7 +102,7 @@ kio_krarcProtocol::~kio_krarcProtocol(){
/* ---------------------------------------------------------------------------------- */
void kio_krarcProtocol::receivedData(KProcess*,char* buf,int len){
- QByteArray d(len);
+ TQByteArray d(len);
d.setRawData(buf,len);
data(d);
d.resetRawData(buf,len);
@@ -124,27 +124,27 @@ void kio_krarcProtocol::mkdir(const KURL& url,int permissions){
if( putCmd.isEmpty() ){
error(ERR_UNSUPPORTED_ACTION,
- i18n("Creating directories is not supported with %1 archives").arg(arcType) );
+ i18n("Creating directories is not supported with %1 archives").tqarg(arcType) );
return;
}
if( arcType == "arj" || arcType == "lha" ) {
- QString arcDir = url.path().mid(arcFile->url().path().length());
+ TQString arcDir = url.path().mid(arcFile->url().path().length());
if( arcDir.right(1) != "/") arcDir = arcDir+"/";
- if( dirDict.find( arcDir ) == 0 )
+ if( dirDict.tqfind( arcDir ) == 0 )
addNewDir( arcDir );
finished();
return;
}
- //QString tmpDir = arcTempDir+url.path();
- QString arcDir = findArcDirectory(url);
- QString tmpDir = arcTempDir + arcDir.mid(1) + url.path().mid(url.path().findRev("/")+1);
+ //TQString tmpDir = arcTempDir+url.path();
+ TQString arcDir = findArcDirectory(url);
+ TQString tmpDir = arcTempDir + arcDir.mid(1) + url.path().mid(url.path().tqfindRev("/")+1);
if( tmpDir.right(1) != "/" ) tmpDir = tmpDir+"/";
if( permissions == -1 ) permissions = 0777; //set default permissions
- for( unsigned int i=arcTempDir.length();i<tmpDir.length(); i=tmpDir.find("/",i+1)){
+ for( unsigned int i=arcTempDir.length();i<tmpDir.length(); i=tmpDir.tqfind("/",i+1)){
::mkdir(tmpDir.left(i).local8Bit(),permissions);
}
@@ -154,14 +154,14 @@ void kio_krarcProtocol::mkdir(const KURL& url,int permissions){
// pack the directory
KrShellProcess proc;
proc << putCmd << convertName( arcFile->url().path() ) + " " << convertFileName( tmpDir.mid(arcTempDir.length()) );
- infoMessage(i18n("Creating %1 ...").arg( url.fileName() ) );
- QDir::setCurrent(arcTempDir);
+ infoMessage(i18n("Creating %1 ...").tqarg( url.fileName() ) );
+ TQDir::setCurrent(arcTempDir);
proc.start(KProcess::Block,KProcess::AllOutput);
// delete the temp directory
- QDir().rmdir(arcTempDir);
+ TQDir().rmdir(arcTempDir);
- if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) {
+ if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) ) {
error(ERR_COULD_NOT_WRITE,url.path() + "\n\n" + proc.getErrorMsg() );
return;
}
@@ -184,7 +184,7 @@ void kio_krarcProtocol::put(const KURL& url,int permissions,bool overwrite,bool
if( putCmd.isEmpty() ){
error(ERR_UNSUPPORTED_ACTION,
- i18n("Writing to %1 archives is not supported").arg(arcType) );
+ i18n("Writing to %1 archives is not supported").tqarg(arcType) );
return;
}
if( !overwrite && findFileEntry(url) ){
@@ -192,12 +192,12 @@ void kio_krarcProtocol::put(const KURL& url,int permissions,bool overwrite,bool
return;
}
- QString arcDir = findArcDirectory(url);
- QString tmpFile = arcTempDir + arcDir.mid(1) + url.path().mid(url.path().findRev("/")+1);
+ TQString arcDir = findArcDirectory(url);
+ TQString tmpFile = arcTempDir + arcDir.mid(1) + url.path().mid(url.path().tqfindRev("/")+1);
- QString tmpDir = arcTempDir+arcDir.mid(1)+"/";
- for( unsigned int i=arcTempDir.length();i<tmpDir.length(); i=tmpDir.find("/",i+1)){
- QDir("/").mkdir(tmpDir.left(i));
+ TQString tmpDir = arcTempDir+arcDir.mid(1)+"/";
+ for( unsigned int i=arcTempDir.length();i<tmpDir.length(); i=tmpDir.tqfind("/",i+1)){
+ TQDir("/").mkdir(tmpDir.left(i));
}
int fd;
if ( resume ) {
@@ -214,7 +214,7 @@ void kio_krarcProtocol::put(const KURL& url,int permissions,bool overwrite,bool
fd = KDE_open(tmpFile.local8Bit(), O_CREAT | O_TRUNC | O_WRONLY, initialMode);
}
- QByteArray buffer;
+ TQByteArray buffer;
int readResult;
do{
dataReq();
@@ -225,13 +225,13 @@ void kio_krarcProtocol::put(const KURL& url,int permissions,bool overwrite,bool
// pack the file
KrShellProcess proc;
proc << putCmd << convertName( arcFile->url().path() )+ " " <<convertFileName( tmpFile.mid(arcTempDir.length()) );
- infoMessage(i18n("Packing %1 ...").arg( url.fileName() ) );
- QDir::setCurrent(arcTempDir);
+ infoMessage(i18n("Packing %1 ...").tqarg( url.fileName() ) );
+ TQDir::setCurrent(arcTempDir);
proc.start(KProcess::Block,KProcess::AllOutput);
// remove the file
- QFile::remove(tmpFile);
+ TQFile::remove(tmpFile);
- if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) {
+ if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) ) {
error(ERR_COULD_NOT_WRITE,url.path() + "\n\n" + proc.getErrorMsg() );
return;
}
@@ -259,7 +259,7 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
if( getCmd.isEmpty() ){
error(ERR_UNSUPPORTED_ACTION,
- i18n("Retrieving data from %1 archives is not supported").arg(arcType) );
+ i18n("Retrieving data from %1 archives is not supported").tqarg(arcType) );
return;
}
UDSEntry* entry = findFileEntry(url);
@@ -296,13 +296,13 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
}
// Use the external unpacker to unpack the file
- QString file = url.path().mid(arcFile->url().path().length()+1);
+ TQString file = url.path().mid(arcFile->url().path().length()+1);
KrShellProcess proc;
if( extArcReady ){
proc << getCmd << arcTempDir+"contents.cpio " << convertName( "*"+file );
} else if( arcType == "arj" || arcType == "ace" || arcType == "7z" ) {
proc << getCmd << convertName( arcFile->url().path(-1) )+ " " << convertFileName( file );
- if( arcType == "ace" && QFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
+ if( arcType == "ace" && TQFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
proc << "<" << "/dev/ptmx";
file = url.fileName();
decompressToFile = true;
@@ -314,18 +314,18 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
emit mimeType( mt->name() );
proc << getCmd << convertName( arcFile->url().path() )+" ";
if( arcType != "gzip" && arcType != "bzip2" ) proc << convertFileName( file );
- connect(&proc,SIGNAL(receivedStdout(KProcess*,char*,int)),
- this,SLOT(receivedData(KProcess*,char*,int)) );
+ connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this,TQT_SLOT(receivedData(KProcess*,char*,int)) );
}
- infoMessage(i18n("Unpacking %1 ...").arg( url.fileName() ) );
+ infoMessage(i18n("Unpacking %1 ...").tqarg( url.fileName() ) );
// change the working directory to our arcTempDir
- QDir::setCurrent(arcTempDir);
+ TQDir::setCurrent(arcTempDir);
proc.start(KProcess::Block,KProcess::AllOutput);
if( !extArcReady && !decompressToFile ) {
- if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) || ( arcType != "bzip2" && expectedSize != decompressedLen ) ) {
+ if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) || ( arcType != "bzip2" && expectedSize != decompressedLen ) ) {
if( encrypted && tries ) {
- invalidatePassword();
+ tqinvalidatePassword();
get( url, tries - 1 );
return;
}
@@ -334,11 +334,11 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
}
}
else{
- if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) || !QFileInfo( arcTempDir+file ).exists() ) {
+ if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) || !TQFileInfo( arcTempDir+file ).exists() ) {
if( decompressToFile )
- QFile(arcTempDir+file).remove();
+ TQFile(arcTempDir+file).remove();
if( encrypted && tries ) {
- invalidatePassword();
+ tqinvalidatePassword();
get( url, tries - 1 );
return;
}
@@ -347,7 +347,7 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
}
// the follwing block is ripped from KDE file KIO::Slave
// $Id: krarc.cpp,v 1.43 2007/01/13 13:39:51 ckarai Exp $
- QCString _path( QFile::encodeName(arcTempDir+file) );
+ TQCString _path( TQFile::encodeName(arcTempDir+file) );
KDE_struct_stat buff;
if( KDE_lstat( _path.data(), &buff ) == -1 ) {
if ( errno == EACCES )
@@ -376,14 +376,10 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
KIO::filesize_t processed_size = 0;
- QString resumeOffset = metaData("resume");
+ TQString resumeOffset = metaData("resume");
if ( !resumeOffset.isEmpty() ){
bool ok;
-#if QT_VERSION >= 0x030200
KIO::fileoffset_t offset = resumeOffset.toLongLong(&ok);
-#else
- KIO::fileoffset_t offset = resumeOffset.toULong(&ok);
-#endif
if (ok && (offset > 0) && (offset < buff.st_size)){
if (KDE_lseek(fd, offset, SEEK_SET) == offset){
canResume ();
@@ -395,7 +391,7 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
totalSize( buff.st_size );
char buffer[ MAX_IPC_SIZE ];
- QByteArray array;
+ TQByteArray array;
while( 1 ){
int n = ::read( fd, buffer, MAX_IPC_SIZE );
if (n == -1){
@@ -415,17 +411,17 @@ void kio_krarcProtocol::get(const KURL& url, int tries ){
processed_size += n;
}
- data( QByteArray() );
+ data( TQByteArray() );
close( fd );
processedSize( buff.st_size );
finished();
if( decompressToFile )
- QFile(arcTempDir+file).remove();
+ TQFile(arcTempDir+file).remove();
return;
}
// send empty buffer to mark EOF
- data(QByteArray());
+ data(TQByteArray());
finished();
}
@@ -443,7 +439,7 @@ void kio_krarcProtocol::del(KURL const & url, bool isFile){
if( delCmd.isEmpty() ){
error(ERR_UNSUPPORTED_ACTION,
- i18n("Deleting files from %1 archives is not supported").arg(arcType) );
+ i18n("Deleting files from %1 archives is not supported").tqarg(arcType) );
return;
}
if( !findFileEntry(url) ){
@@ -453,15 +449,15 @@ void kio_krarcProtocol::del(KURL const & url, bool isFile){
}
}
- QString file = url.path().mid(arcFile->url().path().length()+1);
+ TQString file = url.path().mid(arcFile->url().path().length()+1);
if( !isFile && file.right(1) != "/" ) {
if(arcType == "zip") file = file + "/";
}
KrShellProcess proc;
proc << delCmd << convertName( arcFile->url().path() )+" " << convertFileName( file );
- infoMessage(i18n("Deleting %1 ...").arg( url.fileName() ) );
+ infoMessage(i18n("Deleting %1 ...").tqarg( url.fileName() ) );
proc.start(KProcess::Block, KProcess::AllOutput);
- if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) {
+ if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) ) {
error(ERR_COULD_NOT_WRITE,url.path() + "\n\n" + proc.getErrorMsg() );
return;
}
@@ -483,10 +479,10 @@ void kio_krarcProtocol::stat( const KURL & url ){
if( listCmd.isEmpty() ){
error(ERR_UNSUPPORTED_ACTION,
- i18n("Accessing files is not supported with the %1 archives").arg(arcType) );
+ i18n("Accessing files is not supported with the %1 archives").tqarg(arcType) );
return;
}
- QString path = url.path(-1);
+ TQString path = url.path(-1);
KURL newUrl = url;
// but treat the archive itself as the archive root
@@ -495,10 +491,10 @@ void kio_krarcProtocol::stat( const KURL & url ){
path = newUrl.path();
}
// we might be stating a real file
- if( QFileInfo(path).exists() ){
+ if( TQFileInfo(path).exists() ){
KDE_struct_stat buff;
KDE_stat( path.local8Bit(), &buff );
- QString mime = KMimeType::findByPath(path,buff.st_mode)->name();
+ TQString mime = KMimeType::findByPath(path,buff.st_mode)->name();
statEntry(KFileItem(path,mime,buff.st_mode).entry());
finished();
return;
@@ -521,8 +517,8 @@ void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool overw
break;
//the file exists and we don't want to overwrite
- if ((!overwrite) && ( QFile( dest.path() ).exists() ) ) {
- error(ERR_FILE_ALREADY_EXIST, QFile::encodeName(dest.path()) );
+ if ((!overwrite) && ( TQFile( dest.path() ).exists() ) ) {
+ error(ERR_FILE_ALREADY_EXIST, TQFile::encodeName(dest.path()) );
return;
};
@@ -539,36 +535,36 @@ void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool overw
if( copyCmd.isEmpty() || !entry )
break;
- QString file = url.path().mid(arcFile->url().path().length()+1);
+ TQString file = url.path().mid(arcFile->url().path().length()+1);
- QString destDir = dest.path( -1 );
- if( !QDir( destDir ).exists() ) {
- int ndx = destDir.findRev( '/' );
+ TQString destDir = dest.path( -1 );
+ if( !TQDir( destDir ).exists() ) {
+ int ndx = destDir.tqfindRev( '/' );
if( ndx != -1 )
destDir.truncate( ndx+1 );
}
- QDir::setCurrent( destDir.local8Bit() );
+ TQDir::setCurrent( destDir.local8Bit() );
KrShellProcess proc;
proc << copyCmd << convertName( arcFile->url().path(-1) )+" " << convertFileName( file );
- if( arcType == "ace" && QFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
+ if( arcType == "ace" && TQFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
proc << "<" << "/dev/ptmx";
- infoMessage(i18n("Unpacking %1 ...").arg( url.fileName() ) );
+ infoMessage(i18n("Unpacking %1 ...").tqarg( url.fileName() ) );
proc.start(KProcess::Block, KProcess::AllOutput);
- if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) {
+ if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) ) {
error(KIO::ERR_COULD_NOT_WRITE, dest.path(-1) + "\n\n" + proc.getErrorMsg() );
return;
}
- if( !QFileInfo( dest.path(-1) ).exists() ) {
+ if( !TQFileInfo( dest.path(-1) ).exists() ) {
error( KIO::ERR_COULD_NOT_WRITE, dest.path(-1) );
return;
}
processedSize( KFileItem(*entry,url).size() );
finished();
- QDir::setCurrent( "/" ); /* for being able to umount devices after copying*/
+ TQDir::setCurrent( "/" ); /* for being able to umount devices after copying*/
return;
}while( 0 );
@@ -583,15 +579,15 @@ void kio_krarcProtocol::listDir(const KURL& url){
}
if( listCmd.isEmpty() ){
error(ERR_UNSUPPORTED_ACTION,
- i18n("Listing directories is not supported for %1 archives").arg(arcType) );
+ i18n("Listing directories is not supported for %1 archives").tqarg(arcType) );
return;
}
- QString path = url.path();
+ TQString path = url.path();
if( path.right(1) != "/" ) path = path+"/";
// it might be a real dir !
- if( QFileInfo(path).exists() ){
- if( QFileInfo(path).isDir() ){
+ if( TQFileInfo(path).exists() ){
+ if( TQFileInfo(path).isDir() ){
KURL redir;
redir.setPath( url.path() );
redirection(redir);
@@ -605,11 +601,11 @@ void kio_krarcProtocol::listDir(const KURL& url){
error( ERR_CANNOT_ENTER_DIRECTORY, url.path());
return;
}
- QString arcDir = path.mid(arcFile->url().path().length());
- arcDir.truncate(arcDir.findRev("/"));
+ TQString arcDir = path.mid(arcFile->url().path().length());
+ arcDir.truncate(arcDir.tqfindRev("/"));
if(arcDir.right(1) != "/") arcDir = arcDir+"/";
- UDSEntryList* dirList = dirDict.find(arcDir);
+ UDSEntryList* dirList = dirDict.tqfind(arcDir);
if( dirList == 0 ){
error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
return;
@@ -620,7 +616,7 @@ void kio_krarcProtocol::listDir(const KURL& url){
}
bool kio_krarcProtocol::setArcFile(const KURL& url){
- QString path = url.path();
+ TQString path = url.path();
time_t currTime = time( 0 );
archiveChanged = true;
newArchiveURL = true;
@@ -628,10 +624,10 @@ bool kio_krarcProtocol::setArcFile(const KURL& url){
if( arcFile && arcFile->url().path(-1) == path.left(arcFile->url().path(-1).length()) ){
newArchiveURL = false;
// Has it changed ?
- KFileItem* newArcFile = new KFileItem(arcFile->url(),QString::null,arcFile->mode());
+ KFileItem* newArcFile = new KFileItem(arcFile->url(),TQString(),arcFile->mode());
if( !newArcFile->cmp( *arcFile ) ){
delete arcFile;
- password = QString::null;
+ password = TQString();
extArcReady = false;
arcFile = newArcFile;
} else { // same old file
@@ -644,17 +640,17 @@ bool kio_krarcProtocol::setArcFile(const KURL& url){
extArcReady = false;
if( arcFile ){
delete arcFile;
- password = QString::null;
+ password = TQString();
arcFile = 0L;
}
- QString newPath = path;
+ TQString newPath = path;
if(newPath.right(1) != "/") newPath = newPath+"/";
- for(int pos=0; pos >= 0; pos = newPath.find("/",pos+1)){
- QFileInfo qfi(newPath.left(pos));
+ for(int pos=0; pos >= 0; pos = newPath.tqfind("/",pos+1)){
+ TQFileInfo qfi(newPath.left(pos));
if( qfi.exists() && !qfi.isDir() ){
KDE_struct_stat stat_p;
KDE_lstat(newPath.left(pos).local8Bit(),&stat_p);
- arcFile = new KFileItem(KURL::fromPathOrURL( newPath.left(pos) ),QString::null,stat_p.st_mode);
+ arcFile = new KFileItem(KURL::fromPathOrURL( newPath.left(pos) ),TQString(),stat_p.st_mode);
break;
}
}
@@ -685,7 +681,7 @@ bool kio_krarcProtocol::setArcFile(const KURL& url){
if( arcType.isEmpty() ) {
arcType = arcFile->mimetype();
- arcType = arcType.mid(arcType.findRev("-")+1);
+ arcType = arcType.mid(arcType.tqfindRev("-")+1);
if( arcType == "jar" )
arcType = "zip";
@@ -706,17 +702,17 @@ bool kio_krarcProtocol::initDirDict(const KURL&url, bool forced){
// write the temp file
KrShellProcess proc;
- KTempFile temp( QString::null, "tmp" );
+ KTempFile temp( TQString(), "tmp" );
temp.setAutoDelete(true);
if( arcType != "bzip2" ){
if( arcType == "rpm" )
proc << listCmd << convertName( arcPath ) <<" > " << temp.name();
else
proc << listCmd << convertName( arcFile->url().path(-1) ) <<" > " << temp.name();
- if( arcType == "ace" && QFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
+ if( arcType == "ace" && TQFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
proc << "<" << "/dev/ptmx";
proc.start(KProcess::Block,KProcess::AllOutput);
- if( !proc.normalExit() || !checkStatus( proc.exitStatus() ) ) return false;
+ if( !proc.normalExit() || !checktqStatus( proc.exitStatus() ) ) return false;
}
// clear the dir dictionary
dirDict.clear();
@@ -749,19 +745,19 @@ bool kio_krarcProtocol::initDirDict(const KURL&url, bool forced){
// parse the temp file
temp.file()->open(IO_ReadOnly);
char buf[1000];
- QString line;
+ TQString line;
int lineNo = 0;
bool invalidLine = false;
// the rar list is started with a ------ line.
if(arcType == "rar" || arcType == "arj" || arcType == "lha" || arcType == "7z" ){
while(temp.file()->readLine(buf,1000) != -1){
- line = QString::fromLocal8Bit(buf);
+ line = TQString::fromLocal8Bit(buf);
if( line.startsWith("----------") ) break;
}
}
while(temp.file()->readLine(buf,1000) != -1) {
- line = QString::fromLocal8Bit(buf);
+ line = TQString::fromLocal8Bit(buf);
if( arcType == "rar" ) {
// the rar list is ended with a ------ line.
if( line.startsWith("----------") ) {
@@ -772,7 +768,7 @@ bool kio_krarcProtocol::initDirDict(const KURL&url, bool forced){
continue;
else{
temp.file()->readLine(buf,1000);
- line = line+QString::fromLocal8Bit(buf);
+ line = line+TQString::fromLocal8Bit(buf);
if( line[0]=='*' ) // encrypted archives starts with '*'
line[0]=' ';
}
@@ -791,11 +787,11 @@ bool kio_krarcProtocol::initDirDict(const KURL&url, bool forced){
continue;
else {
temp.file()->readLine(buf,1000);
- line = line+QString::fromLocal8Bit(buf);
+ line = line+TQString::fromLocal8Bit(buf);
temp.file()->readLine(buf,1000);
- line = line+QString::fromLocal8Bit(buf);
+ line = line+TQString::fromLocal8Bit(buf);
temp.file()->readLine(buf,1000);
- line = line+QString::fromLocal8Bit(buf);
+ line = line+TQString::fromLocal8Bit(buf);
}
}
if( arcType == "lha" || arcType == "7z" ) {
@@ -811,33 +807,33 @@ bool kio_krarcProtocol::initDirDict(const KURL&url, bool forced){
return true;
}
-QString kio_krarcProtocol::findArcDirectory(const KURL& url){
- QString path = url.path();
+TQString kio_krarcProtocol::findArcDirectory(const KURL& url){
+ TQString path = url.path();
if( path.right(1) == "/" ) path.truncate(path.length()-1);
if( !initDirDict(url) ){
- return QString::null;
+ return TQString();
}
- QString arcDir = path.mid(arcFile->url().path().length());
- arcDir.truncate(arcDir.findRev("/"));
+ TQString arcDir = path.mid(arcFile->url().path().length());
+ arcDir.truncate(arcDir.tqfindRev("/"));
if(arcDir.right(1) != "/") arcDir = arcDir+"/";
return arcDir;
}
UDSEntry* kio_krarcProtocol::findFileEntry(const KURL& url){
- QString arcDir = findArcDirectory(url);
+ TQString arcDir = findArcDirectory(url);
if( arcDir.isEmpty() ) return 0;
- UDSEntryList* dirList = dirDict.find(arcDir);
+ UDSEntryList* dirList = dirDict.tqfind(arcDir);
if( !dirList ){
return 0;
}
- QString name = url.path();
+ TQString name = url.path();
if( arcFile->url().path(-1) == url.path(-1) ) name = "."; // the "/" case
else{
if( name.right(1) == "/" ) name.truncate(name.length()-1);
- name = name.mid(name.findRev("/")+1);
+ name = name.mid(name.tqfindRev("/")+1);
}
UDSEntryList::iterator entry;
@@ -855,15 +851,15 @@ UDSEntry* kio_krarcProtocol::findFileEntry(const KURL& url){
return 0;
}
-QString kio_krarcProtocol::nextWord(QString &s,char d) {
+TQString kio_krarcProtocol::nextWord(TQString &s,char d) {
s=s.stripWhiteSpace();
- int j=s.find(d,0);
- QString temp=s.left(j); // find the leftmost word.
+ int j=s.tqfind(d,0);
+ TQString temp=s.left(j); // find the leftmost word.
s.remove(0,j);
return temp;
}
-mode_t kio_krarcProtocol::parsePermString(QString perm){
+mode_t kio_krarcProtocol::parsePermString(TQString perm){
mode_t mode=0;
// file type
if(perm[0] == 'd') mode |= S_IFDIR;
@@ -885,18 +881,18 @@ mode_t kio_krarcProtocol::parsePermString(QString perm){
return mode;
}
-UDSEntryList* kio_krarcProtocol::addNewDir(QString path){
+UDSEntryList* kio_krarcProtocol::addNewDir(TQString path){
UDSEntryList* dir;
// check if the current dir exists
- dir = dirDict.find(path);
+ dir = dirDict.tqfind(path);
if(dir != 0) return dir; // dir exists- return it !
- // set dir to the parent dir
- dir = addNewDir(path.left(path.findRev("/",-2)+1));
+ // set dir to the tqparent dir
+ dir = addNewDir(path.left(path.tqfindRev("/",-2)+1));
- // add a new entry in the parent dir
- QString name = path.mid(path.findRev("/",-2)+1);
+ // add a new entry in the tqparent dir
+ TQString name = path.mid(path.tqfindRev("/",-2)+1);
name = name.left(name.length()-1);
UDSEntry entry;
@@ -932,19 +928,19 @@ UDSEntryList* kio_krarcProtocol::addNewDir(QString path){
return dir;
}
-void kio_krarcProtocol::parseLine(int lineNo, QString line, QFile*) {
+void kio_krarcProtocol::parseLine(int lineNo, TQString line, TQFile*) {
UDSEntryList* dir;
UDSEntry entry;
UDSAtom atom;
- QString owner = QString::null;
- QString group = QString::null;
- QString symlinkDest = QString::null;
- QString perm = QString::null;
+ TQString owner = TQString();
+ TQString group = TQString();
+ TQString symlinkDest = TQString();
+ TQString perm = TQString();
mode_t mode = 0666;
size_t size = 0;
time_t time = ::time(0);
- QString fullName = QString::null;
+ TQString fullName = TQString();
if(arcType == "zip"){
// permissions
@@ -956,10 +952,10 @@ void kio_krarcProtocol::parseLine(int lineNo, QString line, QFile*) {
// ignore the next 2 fields
nextWord(line);nextWord(line);
// date & time
- QString d = nextWord(line);
- QDate qdate(d.mid(0,4).toInt(),d.mid(4,2).toInt(),d.mid(6,2).toInt());
- QTime qtime(d.mid(9,2).toInt(),d.mid(11,2).toInt(),d.mid(13,2).toInt());
- time = QDateTime(qdate,qtime).toTime_t();
+ TQString d = nextWord(line);
+ TQDate qdate(d.mid(0,4).toInt(),d.mid(4,2).toInt(),d.mid(6,2).toInt());
+ TQTime qtime(d.mid(9,2).toInt(),d.mid(11,2).toInt(),d.mid(13,2).toInt());
+ time = TQDateTime(qdate,qtime).toTime_t();
// full name
fullName = nextWord(line,'\n');
@@ -975,25 +971,25 @@ void kio_krarcProtocol::parseLine(int lineNo, QString line, QFile*) {
// ignore the next 2 fields
nextWord(line); nextWord(line);
// date & time
- QString d = nextWord(line);
+ TQString d = nextWord(line);
int year = 1900 + d.mid(6,2).toInt();
if( year < 1930 ) year+=100;
- QDate qdate( year, d.mid(3,2).toInt(), d.mid(0,2).toInt() );
- QString t = nextWord(line);
- QTime qtime(t.mid(0,2).toInt(),t.mid(3,2).toInt(),0);
- time = QDateTime(qdate,qtime).toTime_t();
+ TQDate qdate( year, d.mid(3,2).toInt(), d.mid(0,2).toInt() );
+ TQString t = nextWord(line);
+ TQTime qtime(t.mid(0,2).toInt(),t.mid(3,2).toInt(),0);
+ time = TQDateTime(qdate,qtime).toTime_t();
// permissions
perm = nextWord(line);
if( perm.length() == 7 ) // windows rar permission format
{
- bool isDir = ( perm.at(1).lower() == 'd' );
- bool isReadOnly = ( perm.at(2).lower() == 'r' );
+ bool isDir = ( perm.tqat(1).lower() == 'd' );
+ bool isReadOnly = ( perm.tqat(2).lower() == 'r' );
perm = isDir ? "drwxr-xr-x" : "-rw-r--r--";
if( isReadOnly )
- perm.at( 2 ) = '-';
+ perm.tqat( 2 ) = '-';
}
if(perm.length() != 10) perm = (perm.at(0)=='d')? "drwxr-xr-x" : "-rw-r--r--" ;
@@ -1010,13 +1006,13 @@ void kio_krarcProtocol::parseLine(int lineNo, QString line, QFile*) {
// ignore the next 2 fields
nextWord(line); nextWord(line);
// date & time
- QString d = nextWord(line);
+ TQString d = nextWord(line);
int year = 1900 + d.mid(0,2).toInt();
if( year < 1930 ) year+=100;
- QDate qdate( year, d.mid(3,2).toInt(), d.mid(6,2).toInt() );
- QString t = nextWord(line);
- QTime qtime(t.mid(0,2).toInt(),t.mid(3,2).toInt(),0);
- time = QDateTime(qdate,qtime).toTime_t();
+ TQDate qdate( year, d.mid(3,2).toInt(), d.mid(6,2).toInt() );
+ TQString t = nextWord(line);
+ TQTime qtime(t.mid(0,2).toInt(),t.mid(3,2).toInt(),0);
+ time = TQDateTime(qdate,qtime).toTime_t();
// permissions
perm = nextWord(line);
if(perm.length() != 10) perm = (perm.at(0)=='d')? "drwxr-xr-x" : "-rw-r--r--" ;
@@ -1053,7 +1049,7 @@ void kio_krarcProtocol::parseLine(int lineNo, QString line, QFile*) {
nextWord(line);
// full name
fullName = nextWord(line);
- fullName = fullName.mid(fullName.findRev("/")+1);
+ fullName = fullName.mid(fullName.tqfindRev("/")+1);
}
if( arcType == "bzip2" ){
// There is no way to list bzip2 files, so we take our information from
@@ -1075,32 +1071,32 @@ void kio_krarcProtocol::parseLine(int lineNo, QString line, QFile*) {
// ignore the next field
nextWord(line);
// date & time
- int month = (QStringList::split(',', "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")).findIndex( nextWord(line) ) + 1;
+ int month = (TQStringList::split(',', "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")).tqfindIndex( nextWord(line) ) + 1;
int day = nextWord(line).toInt();
- int year = QDate::currentDate().year();
- QString third = nextWord(line);
- QTime qtime;
+ int year = TQDate::tqcurrentDate().year();
+ TQString third = nextWord(line);
+ TQTime qtime;
- if( third.contains(":" ) )
- qtime = QTime::fromString( third );
+ if( third.tqcontains(":" ) )
+ qtime = TQTime::fromString( third );
else
year = third.toInt();
- QDate qdate(year, month, day );
+ TQDate qdate(year, month, day );
- time = QDateTime(qdate, qtime).toTime_t();
+ time = TQDateTime(qdate, qtime).toTime_t();
// full name
fullName = nextWord(line,'\n');
}
if(arcType == "ace"){
// date & time
- QString d = nextWord(line);
+ TQString d = nextWord(line);
int year = 1900 + d.mid(6,2).toInt();
if( year < 1930 ) year+=100;
- QDate qdate( year, d.mid(3,2).toInt(), d.mid(0,2).toInt() );
- QString t = nextWord(line);
- QTime qtime(t.mid(0,2).toInt(),t.mid(3,2).toInt(),0);
- time = QDateTime(qdate,qtime).toTime_t();
+ TQDate qdate( year, d.mid(3,2).toInt(), d.mid(0,2).toInt() );
+ TQString t = nextWord(line);
+ TQTime qtime(t.mid(0,2).toInt(),t.mid(3,2).toInt(),0);
+ time = TQDateTime(qdate,qtime).toTime_t();
// ignore the next field
nextWord(line);
// size
@@ -1122,34 +1118,34 @@ void kio_krarcProtocol::parseLine(int lineNo, QString line, QFile*) {
// size
size = nextWord( line ).toLong();
// date & time
- QString d = nextWord( line );
- QDate qdate( d.mid( 0, 4 ).toInt(), d.mid( 5, 2 ).toInt(), d.mid( 8, 2 ).toInt() );
- QString t = nextWord( line );
- QTime qtime( t.mid( 0, 2 ).toInt(), t.mid( 3, 2 ).toInt(), 0 );
- time = QDateTime( qdate, qtime ).toTime_t();
+ TQString d = nextWord( line );
+ TQDate qdate( d.mid( 0, 4 ).toInt(), d.mid( 5, 2 ).toInt(), d.mid( 8, 2 ).toInt() );
+ TQString t = nextWord( line );
+ TQTime qtime( t.mid( 0, 2 ).toInt(), t.mid( 3, 2 ).toInt(), 0 );
+ time = TQDateTime( qdate, qtime ).toTime_t();
// full name
fullName = nextWord( line, '\n' ).mid( 1 );
//if ( fullName.right( 1 ) == "/" ) return;
- if( fullName.contains("->") ){
- symlinkDest = fullName.mid(fullName.find("->")+2);
- fullName = fullName.left(fullName.find("->")-1);
+ if( fullName.tqcontains("->") ){
+ symlinkDest = fullName.mid(fullName.tqfind("->")+2);
+ fullName = fullName.left(fullName.tqfind("->")-1);
}
}
if(arcType == "7z"){
// date & time
- QString d = nextWord(line);
- QDate qdate( d.mid(0,4).toInt(), d.mid(5,2).toInt(), d.mid(8,2).toInt() );
- QString t = nextWord(line);
- QTime qtime(t.mid(0,2).toInt(),t.mid(3,2).toInt(),t.mid(6,2).toInt() );
- time = QDateTime(qdate,qtime).toTime_t();
+ TQString d = nextWord(line);
+ TQDate qdate( d.mid(0,4).toInt(), d.mid(5,2).toInt(), d.mid(8,2).toInt() );
+ TQString t = nextWord(line);
+ TQTime qtime(t.mid(0,2).toInt(),t.mid(3,2).toInt(),t.mid(6,2).toInt() );
+ time = TQDateTime(qdate,qtime).toTime_t();
// permissions
perm = nextWord(line);
- bool isDir = ( perm.at(0).lower() == 'd' );
- bool isReadOnly = ( perm.at(1).lower() == 'r' );
+ bool isDir = ( perm.tqat(0).lower() == 'd' );
+ bool isReadOnly = ( perm.tqat(1).lower() == 'r' );
perm = isDir ? "drwxr-xr-x" : "-rw-r--r--";
if( isReadOnly )
- perm.at( 2 ) = '-';
+ perm.tqat( 2 ) = '-';
mode = parsePermString(perm);
@@ -1165,11 +1161,11 @@ void kio_krarcProtocol::parseLine(int lineNo, QString line, QFile*) {
if( fullName.right(1) == "/" ) fullName = fullName.left(fullName.length()-1);
if( !fullName.startsWith("/") ) fullName = "/"+fullName;
- QString path = fullName.left(fullName.findRev("/")+1);
+ TQString path = fullName.left(fullName.tqfindRev("/")+1);
// set/create the directory UDSEntryList
- dir = dirDict.find(path);
+ dir = dirDict.tqfind(path);
if(dir == 0) dir = addNewDir(path);
- QString name = fullName.mid(fullName.findRev("/")+1);
+ TQString name = fullName.mid(fullName.tqfindRev("/")+1);
// file name
atom.m_uds = UDS_NAME;
atom.m_str = name;
@@ -1198,7 +1194,7 @@ void kio_krarcProtocol::parseLine(int lineNo, QString line, QFile*) {
}
if( S_ISDIR(mode) ){
fullName=fullName+"/";
- if(dirDict.find(fullName) == 0)
+ if(dirDict.tqfind(fullName) == 0)
dirDict.insert(fullName,new UDSEntryList());
else {
// try to overwrite an existing entry
@@ -1246,8 +1242,8 @@ bool kio_krarcProtocol::initArcParameters() {
copyCmd = fullPathName( "unzip" ) + " -jo ";
if( KStandardDirs::findExe( "zip" ).isEmpty() ) {
- delCmd = QString::null;
- putCmd = QString::null;
+ delCmd = TQString();
+ putCmd = TQString();
} else {
delCmd = fullPathName( "zip" ) + " -d ";
putCmd = fullPathName( "zip" ) + " -ry ";
@@ -1264,8 +1260,8 @@ bool kio_krarcProtocol::initArcParameters() {
listCmd = fullPathName( "unrar" ) + " -c- -v v ";
getCmd = fullPathName( "unrar" ) + " p -ierr -idp -c- -y ";
copyCmd = fullPathName( "unrar" ) + " e -y ";
- delCmd = QString::null;
- putCmd = QString::null;
+ delCmd = TQString();
+ putCmd = TQString();
} else {
cmd = fullPathName( "rar" );
listCmd = fullPathName( "rar" ) + " -c- -v v ";
@@ -1287,23 +1283,23 @@ bool kio_krarcProtocol::initArcParameters() {
cmd = fullPathName( "rpm" );
listCmd = fullPathName( "rpm" ) + " --dump -lpq ";
getCmd = fullPathName( "cpio" ) + " --force-local --no-absolute-filenames -iuvdF";
- delCmd = QString::null;
- putCmd = QString::null;
- copyCmd = QString::null;
+ delCmd = TQString();
+ putCmd = TQString();
+ copyCmd = TQString();
} else if(arcType == "gzip") {
cmd = fullPathName( "gzip" );
listCmd = fullPathName( "gzip" ) + " -l";
getCmd = fullPathName( "gzip" ) + " -dc";
- copyCmd = QString::null;
- delCmd = QString::null;
- putCmd = QString::null;
+ copyCmd = TQString();
+ delCmd = TQString();
+ putCmd = TQString();
} else if(arcType == "bzip2") {
cmd = fullPathName( "bzip2" );
listCmd = fullPathName( "bzip2" );
getCmd = fullPathName( "bzip2" ) + " -dc";
- copyCmd = QString::null;
- delCmd = QString::null;
- putCmd = QString::null;
+ copyCmd = TQString();
+ delCmd = TQString();
+ putCmd = TQString();
} else if(arcType == "arj"){
cmd = fullPathName( "arj" );
listCmd = fullPathName( "arj" ) + " v -y -v ";
@@ -1328,8 +1324,8 @@ bool kio_krarcProtocol::initArcParameters() {
listCmd = fullPathName( "unace" ) + " v";
getCmd = fullPathName( "unace" ) + " e -o ";
copyCmd = fullPathName( "unace" ) + " e -o ";
- delCmd = QString::null;
- putCmd = QString::null;
+ delCmd = TQString();
+ putCmd = TQString();
if( !getPassword().isEmpty() ) {
getCmd += "-p'"+password+"' ";
copyCmd += "-p'"+password+"' ";
@@ -1338,9 +1334,9 @@ bool kio_krarcProtocol::initArcParameters() {
cmd = fullPathName("dpkg");
listCmd = fullPathName("dpkg")+" -c";
getCmd = fullPathName("tar")+" xvf ";
- copyCmd = QString::null;
- delCmd = QString::null;
- putCmd = QString::null;
+ copyCmd = TQString();
+ delCmd = TQString();
+ putCmd = TQString();
} else if (arcType == "7z") {
cmd = fullPathName( "7z" );
if( KStandardDirs::findExe(cmd).isEmpty() )
@@ -1362,25 +1358,25 @@ bool kio_krarcProtocol::initArcParameters() {
}
}
else {
- cmd = QString::null;
- listCmd = QString::null;
- getCmd = QString::null;
- copyCmd = QString::null;
- delCmd = QString::null;
- putCmd = QString::null;
+ cmd = TQString();
+ listCmd = TQString();
+ getCmd = TQString();
+ copyCmd = TQString();
+ delCmd = TQString();
+ putCmd = TQString();
}
if( KStandardDirs::findExe(cmd).isEmpty() ){
error( KIO::ERR_CANNOT_LAUNCH_PROCESS,
cmd+
- i18n("\nMake sure that the %1 binary are installed properly on your system.").arg(cmd));
+ i18n("\nMake sure that the %1 binary are installed properly on your system.").tqarg(cmd));
KRDEBUG("Failed to find cmd: " << cmd);
return false;
}
return true;
}
-bool kio_krarcProtocol::checkStatus( int exitCode ) {
+bool kio_krarcProtocol::checktqStatus( int exitCode ) {
KRDEBUG( exitCode );
if( arcType == "zip" || arcType == "rar" || arcType == "7z" )
@@ -1394,12 +1390,12 @@ bool kio_krarcProtocol::checkStatus( int exitCode ) {
}
struct AutoDetectParams {
- QString type;
+ TQString type;
int location;
- QString detectionString;
+ TQString detectionString;
};
-QString kio_krarcProtocol::detectArchive( bool &encrypted, QString fileName ) {
+TQString kio_krarcProtocol::detectArchive( bool &encrypted, TQString fileName ) {
static AutoDetectParams autoDetectParams[] = {{"zip", 0, "PK\x03\x04"},
{"rar", 0, "Rar!\x1a" },
{"arj", 0, "\x60\xea" },
@@ -1413,14 +1409,14 @@ QString kio_krarcProtocol::detectArchive( bool &encrypted, QString fileName ) {
encrypted = false;
- QFile arcFile( fileName );
+ TQFile arcFile( fileName );
if ( arcFile.open( IO_ReadOnly ) ) {
char buffer[ 1024 ];
long sizeMax = arcFile.readBlock( buffer, sizeof( buffer ) );
arcFile.close();
for( int i=0; i < autoDetectElems; i++ ) {
- QString detectionString = autoDetectParams[ i ].detectionString;
+ TQString detectionString = autoDetectParams[ i ].detectionString;
int location = autoDetectParams[ i ].location;
int endPtr = detectionString.length() + location;
@@ -1436,7 +1432,7 @@ QString kio_krarcProtocol::detectArchive( bool &encrypted, QString fileName ) {
}
if( j == detectionString.length() ) {
- QString type = autoDetectParams[ i ].type;
+ TQString type = autoDetectParams[ i ].type;
if( type == "bzip2" || type == "gzip" ) {
KTar tapeArchive( fileName );
if( tapeArchive.open( IO_ReadOnly ) ) {
@@ -1504,7 +1500,7 @@ QString kio_krarcProtocol::detectArchive( bool &encrypted, QString fileName ) {
encrypted = true;
else { // we try to find whether the 7z archive is encrypted
// this is hard as the headers are also compresseds
- QString tester = fullPathName( "7z" );
+ TQString tester = fullPathName( "7z" );
if( KStandardDirs::findExe( tester ).isEmpty() ) {
tester = fullPathName( "7za" );
if( KStandardDirs::findExe( tester ).isEmpty() ) {
@@ -1512,13 +1508,13 @@ QString kio_krarcProtocol::detectArchive( bool &encrypted, QString fileName ) {
}
}
- QString testCmd = tester + " t -y ";
+ TQString testCmd = tester + " t -y ";
lastData = encryptedArchPath = "";
KrShellProcess proc;
proc << testCmd << convertName( fileName );
- connect( &proc, SIGNAL( receivedStdout(KProcess*,char*,int) ),
- this, SLOT( checkOutputForPassword( KProcess*,char*,int ) ) );
+ connect( &proc, TQT_SIGNAL( receivedStdout(KProcess*,char*,int) ),
+ this, TQT_SLOT( checkOutputForPassword( KProcess*,char*,int ) ) );
proc.start(KProcess::Block,KProcess::AllOutput);
encrypted = this->encrypted;
@@ -1549,28 +1545,28 @@ QString kio_krarcProtocol::detectArchive( bool &encrypted, QString fileName ) {
}
}
}
- return QString::null;
+ return TQString();
}
void kio_krarcProtocol::checkOutputForPassword( KProcess *proc,char *buf,int len ) {
- QByteArray d(len);
+ TQByteArray d(len);
d.setRawData(buf,len);
- QString data = QString( d );
+ TQString data = TQString( d );
d.resetRawData(buf,len);
- QString checkable = lastData + data;
+ TQString checkable = lastData + data;
- QStringList lines = QStringList::split( '\n', checkable );
+ TQStringList lines = TQStringList::split( '\n', checkable );
lastData = lines[ lines.count() - 1 ];
for( unsigned i=0; i != lines.count(); i++ ) {
- QString line = lines[ i ].stripWhiteSpace().lower();
- int ndx = line.find( "testing" );
+ TQString line = lines[ i ].stripWhiteSpace().lower();
+ int ndx = line.tqfind( "testing" );
if( ndx >=0 )
line.truncate( ndx );
if( line.isEmpty() )
continue;
- if( line.contains( "password" ) && line.contains( "enter" ) ) {
+ if( line.tqcontains( "password" ) && line.tqcontains( "enter" ) ) {
KRDEBUG( "Encrypted 7z archive found!" );
encrypted = true;
proc->kill();
@@ -1578,7 +1574,7 @@ void kio_krarcProtocol::checkOutputForPassword( KProcess *proc,char *buf,int len
}
}
-void kio_krarcProtocol::invalidatePassword() {
+void kio_krarcProtocol::tqinvalidatePassword() {
KRDEBUG( arcFile->url().path(-1) + "/" );
if( !encrypted )
@@ -1590,17 +1586,17 @@ void kio_krarcProtocol::invalidatePassword() {
authInfo.readOnly = true;
authInfo.keepPassword = true;
authInfo.verifyPath = true;
- QString fileName = arcFile->url().path(-1);
+ TQString fileName = arcFile->url().path(-1);
authInfo.url = KURL::fromPathOrURL( "/" );
- authInfo.url.setHost( fileName /*.replace('/','_')*/ );
+ authInfo.url.setHost( fileName /*.tqreplace('/','_')*/ );
authInfo.url.setProtocol( "krarc" );
- password = QString::null;
+ password = TQString();
cacheAuthentication( authInfo );
}
-QString kio_krarcProtocol::getPassword() {
+TQString kio_krarcProtocol::getPassword() {
KRDEBUG( encrypted );
if( !password.isNull() )
@@ -1614,9 +1610,9 @@ QString kio_krarcProtocol::getPassword() {
authInfo.readOnly = true;
authInfo.keepPassword = true;
authInfo.verifyPath = true;
- QString fileName = arcFile->url().path(-1);
+ TQString fileName = arcFile->url().path(-1);
authInfo.url = KURL::fromPathOrURL( "/" );
- authInfo.url.setHost( fileName /*.replace('/','_')*/ );
+ authInfo.url.setHost( fileName /*.tqreplace('/','_')*/ );
authInfo.url.setProtocol( "krarc" );
if( checkCachedAuthentication( authInfo ) && !authInfo.password.isNull() ) {
@@ -1624,7 +1620,7 @@ QString kio_krarcProtocol::getPassword() {
return ( password = authInfo.password );
}
- authInfo.password = QString::null;
+ authInfo.password = TQString();
if ( openPassDlg( authInfo, i18n("Accessing the file requires password.") ) && !authInfo.password.isNull() ) {
KRDEBUG( authInfo.password );
@@ -1635,32 +1631,32 @@ QString kio_krarcProtocol::getPassword() {
return password;
}
-QString kio_krarcProtocol::fullPathName( QString name ) {
- QString supposedName = krConfig->readEntry( name, name );
+TQString kio_krarcProtocol::fullPathName( TQString name ) {
+ TQString supposedName = krConfig->readEntry( name, name );
if( supposedName.isEmpty() )
supposedName = name;
return escape( supposedName );
}
-QString kio_krarcProtocol::convertFileName( QString name ) {
+TQString kio_krarcProtocol::convertFileName( TQString name ) {
if( arcType == "zip" )
- name = name.replace( "[", "[[]" );
+ name = name.tqreplace( "[", "[[]" );
return convertName( name );
}
-QString kio_krarcProtocol::convertName( QString name ) {
- if( !name.contains( '\'' ) )
+TQString kio_krarcProtocol::convertName( TQString name ) {
+ if( !name.tqcontains( '\'' ) )
return "'" + name + "'";
- if( !name.contains( '"' ) && !name.contains( '$' ) )
+ if( !name.tqcontains( '"' ) && !name.tqcontains( '$' ) )
return "\"" + name + "\"";
return escape( name );
}
-QString kio_krarcProtocol::escape( QString name ) {
- const QString evilstuff = "\\\"'`()[]{}!?;$&<>| "; // stuff that should get escaped
+TQString kio_krarcProtocol::escape( TQString name ) {
+ const TQString evilstuff = "\\\"'`()[]{}!?;$&<>| "; // stuff that should get escaped
for ( unsigned int i = 0; i < evilstuff.length(); ++i )
- name.replace( evilstuff[ i ], ('\\' + evilstuff[ i ]) );
+ name.tqreplace( evilstuff[ i ], (TQString('\\') + evilstuff[ i ]) );
return name;
}
diff --git a/krArc/krarc.h b/krArc/krarc.h
index 9c6078c..88a205c 100644
--- a/krArc/krarc.h
+++ b/krArc/krarc.h
@@ -17,10 +17,10 @@
#ifndef __krarc_h__
#define __krarc_h__
-#include <qstring.h>
-#include <qcstring.h>
-#include <qdict.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqdict.h>
+#include <tqfile.h>
#include <sys/types.h>
#include <kurl.h>
@@ -30,12 +30,13 @@
class KProcess;
class KFileItem;
-class QCString;
+class TQCString;
-class kio_krarcProtocol : public QObject, public KIO::SlaveBase {
+class kio_krarcProtocol : public TQObject, public KIO::SlaveBase {
Q_OBJECT
+ TQ_OBJECT
public:
- kio_krarcProtocol(const QCString &pool_socket, const QCString &app_socket);
+ kio_krarcProtocol(const TQCString &pool_socket, const TQCString &app_socket);
virtual ~kio_krarcProtocol();
virtual void stat( const KURL & url );
virtual void get(const KURL& url);
@@ -52,68 +53,69 @@ public slots:
protected:
virtual bool initDirDict(const KURL& url,bool forced = false);
virtual bool initArcParameters();
- QString detectArchive( bool &encrypted, QString fileName );
- virtual void parseLine(int lineNo, QString line, QFile* temp);
+ TQString detectArchive( bool &encrypted, TQString fileName );
+ virtual void parseLine(int lineNo, TQString line, TQFile* temp);
virtual bool setArcFile(const KURL& url);
- virtual QString getPassword();
- virtual void invalidatePassword();
+ virtual TQString getPassword();
+ virtual void tqinvalidatePassword();
// archive specific commands
- QString cmd; ///< the archiver name.
- QString listCmd; ///< list files.
- QString getCmd; ///< unpack files command.
- QString delCmd; ///< delete files command.
- QString putCmd; ///< add file command.
- QString copyCmd; ///< copy to file command.
+ TQString cmd; ///< the archiver name.
+ TQString listCmd; ///< list files.
+ TQString getCmd; ///< unpack files command.
+ TQString delCmd; ///< delete files command.
+ TQString putCmd; ///< add file command.
+ TQString copyCmd; ///< copy to file command.
private:
void get(const KURL& url, int tries);
/** checks if the exit code is OK. */
- bool checkStatus( int exitCode );
+ bool checktqStatus( int exitCode );
/** service function for parseLine. */
- QString nextWord(QString &s,char d=' ');
+ TQString nextWord(TQString &s,char d=' ');
/** translate permittion string to mode_t. */
- mode_t parsePermString(QString perm);
+ mode_t parsePermString(TQString perm);
/** return the name of the directory inside the archive. */
- QString findArcDirectory(const KURL& url);
+ TQString findArcDirectory(const KURL& url);
/** find the UDSEntry of a file in a directory. */
KIO::UDSEntry* findFileEntry(const KURL& url);
/** add a new directory (file list container). */
- KIO::UDSEntryList* addNewDir(QString path);
- QString fullPathName( QString name );
- QString convertFileName( QString name );
- static QString convertName( QString name );
- static QString escape( QString name );
+ KIO::UDSEntryList* addNewDir(TQString path);
+ TQString fullPathName( TQString name );
+ TQString convertFileName( TQString name );
+ static TQString convertName( TQString name );
+ static TQString escape( TQString name );
- QDict<KIO::UDSEntryList> dirDict; //< the directoris data structure.
+ TQDict<KIO::UDSEntryList> dirDict; //< the directoris data structure.
bool encrypted; //< tells whether the archive is encrypted
bool archiveChanged; //< true if the archive was changed.
bool archiveChanging; //< true if the archive is currently changing.
bool newArchiveURL; //< true if new archive was entered for the protocol
KIO::filesize_t decompressedLen; //< the number of the decompressed bytes
KFileItem* arcFile; //< the archive file item.
- QString arcPath; //< the archive location
- QString arcTempDir; //< the currently used temp directory.
- QString arcType; //< the archive type.
+ TQString arcPath; //< the archive location
+ TQString arcTempDir; //< the currently used temp directory.
+ TQString arcType; //< the archive type.
bool extArcReady; //< Used for RPM & DEB files.
- QString password; //< Password for the archives
+ TQString password; //< Password for the archives
KConfig *krConfig; //< The configuration file for krusader
- QString lastData;
- QString encryptedArchPath;
+ TQString lastData;
+ TQString encryptedArchPath;
};
class KrShellProcess : public KShellProcess {
Q_OBJECT
+ TQ_OBJECT
public:
- KrShellProcess() : KShellProcess(), errorMsg( QString::null ), outputMsg( QString::null ) {
- connect(this,SIGNAL(receivedStderr(KProcess*,char*,int)),
- this,SLOT(receivedErrorMsg(KProcess*,char*,int)) );
- connect(this,SIGNAL(receivedStdout(KProcess*,char*,int)),
- this,SLOT(receivedOutputMsg(KProcess*,char*,int)) );
+ KrShellProcess() : KShellProcess(), errorMsg( TQString() ), outputMsg( TQString() ) {
+ connect(this,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ this,TQT_SLOT(receivedErrorMsg(KProcess*,char*,int)) );
+ connect(this,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this,TQT_SLOT(receivedOutputMsg(KProcess*,char*,int)) );
}
- QString getErrorMsg() {
+ TQString getErrorMsg() {
if( errorMsg.stripWhiteSpace().isEmpty() )
return outputMsg.right( 500 );
else
@@ -122,21 +124,21 @@ public:
public slots:
void receivedErrorMsg(KProcess*, char *buf, int len) {
- errorMsg += QString::fromLocal8Bit( buf, len );
+ errorMsg += TQString::fromLocal8Bit( buf, len );
if( errorMsg.length() > 500 )
errorMsg = errorMsg.right( 500 );
receivedOutputMsg( 0, buf, len );
}
void receivedOutputMsg(KProcess*, char *buf, int len) {
- outputMsg += QString::fromLocal8Bit( buf, len );
+ outputMsg += TQString::fromLocal8Bit( buf, len );
if( outputMsg.length() > 500 )
outputMsg = outputMsg.right( 500 );
}
private:
- QString errorMsg;
- QString outputMsg;
+ TQString errorMsg;
+ TQString outputMsg;
};
#endif
diff --git a/krusader/ActionMan/actionman.cpp b/krusader/ActionMan/actionman.cpp
index 10b604b..560c68c 100644
--- a/krusader/ActionMan/actionman.cpp
+++ b/krusader/ActionMan/actionman.cpp
@@ -20,16 +20,16 @@
#include "../UserAction/useraction.h"
-ActionMan::ActionMan( QWidget * parent )
- : KDialogBase( parent, "ActionMan", true /*modal*/, "ActionMan - Manage your useractions", KDialogBase::Apply | KDialogBase::Close )
+ActionMan::ActionMan( TQWidget * tqparent )
+ : KDialogBase( tqparent, "ActionMan", true /*modal*/, "ActionMan - Manage your useractions", KDialogBase::Apply | KDialogBase::Close )
{
setPlainCaption(i18n("ActionMan - Manage Your Useractions"));
userActionPage = new UserActionPage( this );
setMainWidget( userActionPage );
- connect( userActionPage, SIGNAL( changed() ), SLOT( slotEnableApplyButton() ) );
- connect( userActionPage, SIGNAL( applied() ), SLOT( slotDisableApplyButton() ) );
+ connect( userActionPage, TQT_SIGNAL( changed() ), TQT_SLOT( slotEnableApplyButton() ) );
+ connect( userActionPage, TQT_SIGNAL( applied() ), TQT_SLOT( slotDisableApplyButton() ) );
enableButtonApply( false );
exec();
diff --git a/krusader/ActionMan/actionman.h b/krusader/ActionMan/actionman.h
index bbfe33f..d78b9a4 100644
--- a/krusader/ActionMan/actionman.h
+++ b/krusader/ActionMan/actionman.h
@@ -19,8 +19,9 @@ class UserActionPage;
class ActionMan : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- ActionMan( QWidget* parent=0 );
+ ActionMan( TQWidget* tqparent=0 );
~ActionMan();
protected slots:
diff --git a/krusader/ActionMan/actionproperty.cpp b/krusader/ActionMan/actionproperty.cpp
index 077b035..a17f5d1 100644
--- a/krusader/ActionMan/actionproperty.cpp
+++ b/krusader/ActionMan/actionproperty.cpp
@@ -17,10 +17,10 @@
#include "../UserAction/kraction.h"
#include "../krusader.h"
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <klineedit.h>
@@ -35,8 +35,8 @@
#define ICON(N) KGlobal::iconLoader()->loadIcon(N, KIcon::Small)
-ActionProperty::ActionProperty( QWidget *parent, const char *name, KrAction *action )
- : ActionPropertyBase( parent, name ), _modified(false)
+ActionProperty::ActionProperty( TQWidget *tqparent, const char *name, KrAction *action )
+ : ActionPropertyBase( tqparent, name ), _modified(false)
{
if ( action ) {
_action = action;
@@ -49,37 +49,37 @@ ActionProperty::ActionProperty( QWidget *parent, const char *name, KrAction *act
// fill with all existing categories
cbCategory->insertStringList( krUserAction->allCategories() );
- connect( ButtonAddPlaceholder, SIGNAL( clicked() ), this, SLOT( addPlaceholder() ) );
- connect( ButtonAddStartpath, SIGNAL( clicked() ), this, SLOT( addStartpath() ) );
- connect( ButtonNewProtocol, SIGNAL( clicked() ), this, SLOT( newProtocol() ) );
- connect( ButtonEditProtocol, SIGNAL( clicked() ), this, SLOT( editProtocol() ) );
- connect( ButtonRemoveProtocol, SIGNAL( clicked() ), this, SLOT( removeProtocol() ) );
- connect( ButtonAddPath, SIGNAL( clicked() ), this, SLOT( addPath() ) );
- connect( ButtonEditPath, SIGNAL( clicked() ), this, SLOT( editPath() ) );
- connect( ButtonRemovePath, SIGNAL( clicked() ), this, SLOT( removePath() ) );
- connect( ButtonAddMime, SIGNAL( clicked() ), this, SLOT( addMime() ) );
- connect( ButtonEditMime, SIGNAL( clicked() ), this, SLOT( editMime() ) );
- connect( ButtonRemoveMime, SIGNAL( clicked() ), this, SLOT( removeMime() ) );
- connect( ButtonNewFile, SIGNAL( clicked() ), this, SLOT( newFile() ) );
- connect( ButtonEditFile, SIGNAL( clicked() ), this, SLOT( editFile() ) );
- connect( ButtonRemoveFile, SIGNAL( clicked() ), this, SLOT( removeFile() ) );
- connect( KeyButtonShortcut, SIGNAL( capturedShortcut(const KShortcut&) ), this, SLOT( changedShortcut(const KShortcut&) ) );
+ connect( ButtonAddPlaceholder, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addPlaceholder() ) );
+ connect( ButtonAddStartpath, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addStartpath() ) );
+ connect( ButtonNewProtocol, TQT_SIGNAL( clicked() ), this, TQT_SLOT( newProtocol() ) );
+ connect( ButtonEditProtocol, TQT_SIGNAL( clicked() ), this, TQT_SLOT( editProtocol() ) );
+ connect( ButtonRemoveProtocol, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeProtocol() ) );
+ connect( ButtonAddPath, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addPath() ) );
+ connect( ButtonEditPath, TQT_SIGNAL( clicked() ), this, TQT_SLOT( editPath() ) );
+ connect( ButtonRemovePath, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removePath() ) );
+ connect( ButtonAddMime, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addMime() ) );
+ connect( ButtonEditMime, TQT_SIGNAL( clicked() ), this, TQT_SLOT( editMime() ) );
+ connect( ButtonRemoveMime, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeMime() ) );
+ connect( ButtonNewFile, TQT_SIGNAL( clicked() ), this, TQT_SLOT( newFile() ) );
+ connect( ButtonEditFile, TQT_SIGNAL( clicked() ), this, TQT_SLOT( editFile() ) );
+ connect( ButtonRemoveFile, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeFile() ) );
+ connect( KeyButtonShortcut, TQT_SIGNAL( capturedShortcut(const KShortcut&) ), this, TQT_SLOT( changedShortcut(const KShortcut&) ) );
// track modifications:
- connect( leDistinctName, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) );
- connect( leTitle, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) );
- connect( ButtonIcon, SIGNAL( iconChanged(QString) ), SLOT( setModified() ) );
- connect( cbCategory, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) );
- connect( leTooltip, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) );
- connect( textDescription, SIGNAL( textChanged() ), SLOT( setModified() ) );
- connect( leDistinctName, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) );
- connect( leCommandline, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) );
- connect( leStartpath, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) );
- connect( bgExecType, SIGNAL( clicked(int) ), SLOT( setModified() ) );
- connect( bgAccept, SIGNAL( clicked(int) ), SLOT( setModified() ) );
- connect( KeyButtonShortcut, SIGNAL( capturedShortcut(const KShortcut&) ), SLOT( setModified() ) );
- connect( leDifferentUser, SIGNAL( textChanged(const QString&) ), SLOT( setModified() ) );
- connect( chkDifferentUser, SIGNAL( clicked() ), SLOT( setModified() ) );
- connect( chkConfirmExecution, SIGNAL( clicked() ), SLOT( setModified() ) );
+ connect( leDistinctName, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( setModified() ) );
+ connect( leTitle, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( setModified() ) );
+ connect( ButtonIcon, TQT_SIGNAL( iconChanged(TQString) ), TQT_SLOT( setModified() ) );
+ connect( cbCategory, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( setModified() ) );
+ connect( leTooltip, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( setModified() ) );
+ connect( textDescription, TQT_SIGNAL( textChanged() ), TQT_SLOT( setModified() ) );
+ connect( leDistinctName, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( setModified() ) );
+ connect( leCommandline, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( setModified() ) );
+ connect( leStartpath, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( setModified() ) );
+ connect( bgExecType, TQT_SIGNAL( clicked(int) ), TQT_SLOT( setModified() ) );
+ connect( bgAccept, TQT_SIGNAL( clicked(int) ), TQT_SLOT( setModified() ) );
+ connect( KeyButtonShortcut, TQT_SIGNAL( capturedShortcut(const KShortcut&) ), TQT_SLOT( setModified() ) );
+ connect( leDifferentUser, TQT_SIGNAL( textChanged(const TQString&) ), TQT_SLOT( setModified() ) );
+ connect( chkDifferentUser, TQT_SIGNAL( clicked() ), TQT_SLOT( setModified() ) );
+ connect( chkConfirmExecution, TQT_SIGNAL( clicked() ), TQT_SLOT( setModified() ) );
// The modified-state of the ShowOnly-lists is tracked in the access-functions below
}
@@ -214,8 +214,8 @@ void ActionProperty::updateAction( KrAction *action ) {
_action->setStartpath( leStartpath->text() );
_action->setShortcut( KeyButtonShortcut->shortcut() );
- QListBoxItem* lbi = lbShowonlyProtocol->firstItem();
- QStringList list;
+ TQListBoxItem* lbi = lbShowonlyProtocol->firstItem();
+ TQStringList list;
while ( lbi ) {
list << lbi->text();
lbi = lbi->next();
@@ -223,7 +223,7 @@ void ActionProperty::updateAction( KrAction *action ) {
_action->setShowonlyProtocol( list );
lbi = lbShowonlyPath->firstItem();
- list = QStringList();
+ list = TQStringList();
while ( lbi ) {
list << lbi->text();
lbi = lbi->next();
@@ -231,7 +231,7 @@ void ActionProperty::updateAction( KrAction *action ) {
_action->setShowonlyPath( list );
lbi = lbShowonlyMime->firstItem();
- list = QStringList();
+ list = TQStringList();
while ( lbi ) {
list << lbi->text();
lbi = lbi->next();
@@ -239,7 +239,7 @@ void ActionProperty::updateAction( KrAction *action ) {
_action->setShowonlyMime( list );
lbi = lbShowonlyFile->firstItem();
- list = QStringList();
+ list = TQStringList();
while ( lbi ) {
list << lbi->text();
lbi = lbi->next();
@@ -271,8 +271,8 @@ void ActionProperty::updateAction( KrAction *action ) {
void ActionProperty::addPlaceholder() {
AddPlaceholderPopup popup( this );
- QString exp = popup.getPlaceholder( mapToGlobal(
- QPoint(
+ TQString exp = popup.getPlaceholder( mapToGlobal(
+ TQPoint(
ButtonAddPlaceholder->pos().x() + ButtonAddPlaceholder->width()+6, // 6 is the default margin
ButtonAddPlaceholder->pos().y()
)
@@ -282,8 +282,8 @@ void ActionProperty::addPlaceholder() {
void ActionProperty::addStartpath() {
- QString folder = KFileDialog::getExistingDirectory(QString::null, this);
- if (folder != QString::null) {
+ TQString folder = KFileDialog::getExistingDirectory(TQString(), this);
+ if (folder != TQString()) {
leStartpath->setText( folder );
}
}
@@ -291,13 +291,13 @@ void ActionProperty::addStartpath() {
void ActionProperty::newProtocol() {
bool ok;
- QString text = KInputDialog::getText(
+ TQString text = KInputDialog::getText(
i18n( "New protocol" ),
i18n( "Set a protocol:" ),
lbShowonlyProtocol->currentText(),
&ok, this );
if ( ok && !text.isEmpty() ) {
- lbShowonlyProtocol->insertStringList( QStringList::split( ";", text ) );
+ lbShowonlyProtocol->insertStringList( TQStringList::split( ";", text ) );
setModified();
}
}
@@ -307,7 +307,7 @@ void ActionProperty::editProtocol() {
return;
bool ok;
- QString text = KInputDialog::getText(
+ TQString text = KInputDialog::getText(
i18n( "Edit protocol" ),
i18n( "Set another protocol:" ),
lbShowonlyProtocol->currentText(),
@@ -326,8 +326,8 @@ void ActionProperty::removeProtocol() {
}
void ActionProperty::addPath() {
- QString folder = KFileDialog::getExistingDirectory(QString::null, this);
- if (folder != QString::null) {
+ TQString folder = KFileDialog::getExistingDirectory(TQString(), this);
+ if (folder != TQString()) {
lbShowonlyPath->insertItem( folder );
setModified();
}
@@ -338,7 +338,7 @@ void ActionProperty::editPath() {
return;
bool ok;
- QString text = KInputDialog::getText(
+ TQString text = KInputDialog::getText(
i18n( "Edit path" ),
i18n( "Set another path:" ),
lbShowonlyPath->currentText(),
@@ -358,13 +358,13 @@ void ActionProperty::removePath() {
void ActionProperty::addMime() {
bool ok;
- QString text = KInputDialog::getText(
+ TQString text = KInputDialog::getText(
i18n( "New mime-type" ),
i18n( "Set a mime-type:" ),
lbShowonlyMime->currentText(),
&ok, this );
if ( ok && !text.isEmpty() ) {
- lbShowonlyMime->insertStringList( QStringList::split( ";", text ) );
+ lbShowonlyMime->insertStringList( TQStringList::split( ";", text ) );
setModified();
}
}
@@ -374,7 +374,7 @@ void ActionProperty::editMime() {
return;
bool ok;
- QString text = KInputDialog::getText(
+ TQString text = KInputDialog::getText(
i18n( "Edit mime-type" ),
i18n( "Set another mime-type:" ),
lbShowonlyMime->currentText(),
@@ -394,13 +394,13 @@ void ActionProperty::removeMime() {
void ActionProperty::newFile() {
bool ok;
- QString text = KInputDialog::getText(
+ TQString text = KInputDialog::getText(
i18n( "New filename" ),
i18n( "Set a filename:" ),
lbShowonlyFile->currentText(),
&ok, this );
if ( ok && !text.isEmpty() ) {
- lbShowonlyFile->insertStringList( QStringList::split( ";", text ) );
+ lbShowonlyFile->insertStringList( TQStringList::split( ";", text ) );
setModified();
}
}
@@ -410,7 +410,7 @@ void ActionProperty::editFile() {
return;
bool ok;
- QString text = KInputDialog::getText(
+ TQString text = KInputDialog::getText(
i18n( "Edit filename" ),
i18n( "Set another filename:" ),
lbShowonlyFile->currentText(),
diff --git a/krusader/ActionMan/actionproperty.h b/krusader/ActionMan/actionproperty.h
index 41cc564..7c3d695 100644
--- a/krusader/ActionMan/actionproperty.h
+++ b/krusader/ActionMan/actionproperty.h
@@ -23,9 +23,10 @@ class KShortcut;
* @author Jonas Bähr (http://www.jonas-baehr.de)
*/
class ActionProperty : public ActionPropertyBase {
- Q_OBJECT
+ Q_OBJECT
+ TQ_OBJECT
public:
- ActionProperty( QWidget *parent=0, const char *name=0, KrAction *action=0 );
+ ActionProperty( TQWidget *tqparent=0, const char *name=0, KrAction *action=0 );
~ActionProperty();
/**
diff --git a/krusader/ActionMan/actionpropertybase.cpp b/krusader/ActionMan/actionpropertybase.cpp
index 639f6fd..114370a 100644
--- a/krusader/ActionMan/actionpropertybase.cpp
+++ b/krusader/ActionMan/actionpropertybase.cpp
@@ -11,24 +11,24 @@
#include "actionpropertybase.h"
-#include <qvariant.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
-#include <qtoolbutton.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqvariant.h>
+#include <tqpushbutton.h>
+#include <tqtabwidget.h>
+#include <tqtoolbutton.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <klineedit.h>
#include <kcombobox.h>
#include <kicondialog.h>
#include <ktextedit.h>
#include <kkeybutton.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
#include <klistbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include "klineedit.h"
#include "kcombobox.h"
#include "kicondialog.h"
@@ -37,44 +37,44 @@
#include "klistbox.h"
/*
- * Constructs a ActionPropertyBase as a child of 'parent', with the
+ * Constructs a ActionPropertyBase as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
-ActionPropertyBase::ActionPropertyBase( QWidget* parent, const char* name, WFlags fl )
- : QWidget( parent, name, fl )
+ActionPropertyBase::ActionPropertyBase( TQWidget* tqparent, const char* name, WFlags fl )
+ : TQWidget( tqparent, name, fl )
{
if ( !name )
setName( "ActionPropertyBase" );
- ActionPropertyBaseLayout = new QGridLayout( this, 1, 1, 0, 0, "ActionPropertyBaseLayout");
+ ActionPropertyBaseLayout = new TQGridLayout( this, 1, 1, 0, 0, "ActionPropertyBaseLayout");
- tabWidget3 = new QTabWidget( this, "tabWidget3" );
+ tabWidget3 = new TQTabWidget( this, "tabWidget3" );
- tab = new QWidget( tabWidget3, "tab" );
- tabLayout = new QGridLayout( tab, 1, 1, 11, 6, "tabLayout");
+ tab = new TQWidget( tabWidget3, "tab" );
+ tabLayout = new TQGridLayout( tab, 1, 1, 11, 6, "tabLayout");
- ButtonAddStartpath = new QToolButton( tab, "ButtonAddStartpath" );
+ ButtonAddStartpath = new TQToolButton( tab, "ButtonAddStartpath" );
tabLayout->addWidget( ButtonAddStartpath, 8, 3 );
- LabelDescription = new QLabel( tab, "LabelDescription" );
- LabelDescription->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, LabelDescription->sizePolicy().hasHeightForWidth() ) );
+ LabelDescription = new TQLabel( tab, "LabelDescription" );
+ LabelDescription->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, LabelDescription->sizePolicy().hasHeightForWidth() ) );
tabLayout->addWidget( LabelDescription, 4, 0 );
- bgAccept = new QButtonGroup( tab, "bgAccept" );
- bgAccept->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, bgAccept->sizePolicy().hasHeightForWidth() ) );
+ bgAccept = new TQButtonGroup( tab, "bgAccept" );
+ bgAccept->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, bgAccept->sizePolicy().hasHeightForWidth() ) );
bgAccept->setColumnLayout(0, Qt::Vertical );
- bgAccept->layout()->setSpacing( 6 );
- bgAccept->layout()->setMargin( 11 );
- bgAcceptLayout = new QGridLayout( bgAccept->layout() );
- bgAcceptLayout->setAlignment( Qt::AlignTop );
+ bgAccept->tqlayout()->setSpacing( 6 );
+ bgAccept->tqlayout()->setMargin( 11 );
+ bgAcceptLayout = new TQGridLayout( bgAccept->tqlayout() );
+ bgAcceptLayout->tqsetAlignment( TQt::AlignTop );
- radioLocal = new QRadioButton( bgAccept, "radioLocal" );
+ radioLocal = new TQRadioButton( bgAccept, "radioLocal" );
radioLocal->setChecked( TRUE );
bgAcceptLayout->addWidget( radioLocal, 0, 0 );
- radioUrl = new QRadioButton( bgAccept, "radioUrl" );
+ radioUrl = new TQRadioButton( bgAccept, "radioUrl" );
bgAcceptLayout->addWidget( radioUrl, 1, 0 );
@@ -84,38 +84,38 @@ ActionPropertyBase::ActionPropertyBase( QWidget* parent, const char* name, WFlag
tabLayout->addMultiCellWidget( leTitle, 2, 2, 1, 3 );
- LabelTitle = new QLabel( tab, "LabelTitle" );
- LabelTitle->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, LabelTitle->sizePolicy().hasHeightForWidth() ) );
+ LabelTitle = new TQLabel( tab, "LabelTitle" );
+ LabelTitle->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, LabelTitle->sizePolicy().hasHeightForWidth() ) );
tabLayout->addWidget( LabelTitle, 2, 0 );
- layout3 = new QHBoxLayout( 0, 0, 6, "layout3");
+ tqlayout3 = new TQHBoxLayout( 0, 0, 6, "tqlayout3");
- layout2 = new QVBoxLayout( 0, 0, 6, "layout2");
+ tqlayout2 = new TQVBoxLayout( 0, 0, 6, "tqlayout2");
leDistinctName = new KLineEdit( tab, "leDistinctName" );
- layout2->addWidget( leDistinctName );
+ tqlayout2->addWidget( leDistinctName );
cbCategory = new KComboBox( FALSE, tab, "cbCategory" );
cbCategory->setEditable( TRUE );
- layout2->addWidget( cbCategory );
- layout3->addLayout( layout2 );
+ tqlayout2->addWidget( cbCategory );
+ tqlayout3->addLayout( tqlayout2 );
ButtonIcon = new KIconButton( tab, "ButtonIcon" );
- ButtonIcon->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, ButtonIcon->sizePolicy().hasHeightForWidth() ) );
- ButtonIcon->setMinimumSize( QSize( 50, 50 ) );
- ButtonIcon->setMaximumSize( QSize( 50, 50 ) );
- layout3->addWidget( ButtonIcon );
+ ButtonIcon->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, ButtonIcon->sizePolicy().hasHeightForWidth() ) );
+ ButtonIcon->setMinimumSize( TQSize( 50, 50 ) );
+ ButtonIcon->setMaximumSize( TQSize( 50, 50 ) );
+ tqlayout3->addWidget( ButtonIcon );
- tabLayout->addMultiCellLayout( layout3, 0, 1, 1, 3 );
+ tabLayout->addMultiCellLayout( tqlayout3, 0, 1, 1, 3 );
- LabelDistinctName = new QLabel( tab, "LabelDistinctName" );
- LabelDistinctName->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, LabelDistinctName->sizePolicy().hasHeightForWidth() ) );
+ LabelDistinctName = new TQLabel( tab, "LabelDistinctName" );
+ LabelDistinctName->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, LabelDistinctName->sizePolicy().hasHeightForWidth() ) );
tabLayout->addWidget( LabelDistinctName, 0, 0 );
- LabelCommandline = new QLabel( tab, "LabelCommandline" );
- LabelCommandline->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, LabelCommandline->sizePolicy().hasHeightForWidth() ) );
+ LabelCommandline = new TQLabel( tab, "LabelCommandline" );
+ LabelCommandline->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, LabelCommandline->sizePolicy().hasHeightForWidth() ) );
tabLayout->addWidget( LabelCommandline, 7, 0 );
@@ -127,8 +127,8 @@ ActionPropertyBase::ActionPropertyBase( QWidget* parent, const char* name, WFlag
tabLayout->addMultiCellWidget( leStartpath, 8, 8, 1, 2 );
- LabelTooltip = new QLabel( tab, "LabelTooltip" );
- LabelTooltip->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, LabelTooltip->sizePolicy().hasHeightForWidth() ) );
+ LabelTooltip = new TQLabel( tab, "LabelTooltip" );
+ LabelTooltip->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, LabelTooltip->sizePolicy().hasHeightForWidth() ) );
tabLayout->addWidget( LabelTooltip, 3, 0 );
@@ -136,14 +136,14 @@ ActionPropertyBase::ActionPropertyBase( QWidget* parent, const char* name, WFlag
tabLayout->addMultiCellWidget( leCommandline, 7, 7, 1, 2 );
- LabelCategory = new QLabel( tab, "LabelCategory" );
- LabelCategory->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, LabelCategory->sizePolicy().hasHeightForWidth() ) );
+ LabelCategory = new TQLabel( tab, "LabelCategory" );
+ LabelCategory->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, LabelCategory->sizePolicy().hasHeightForWidth() ) );
tabLayout->addWidget( LabelCategory, 1, 0 );
- ButtonAddPlaceholder = new QToolButton( tab, "ButtonAddPlaceholder" );
- ButtonAddPlaceholder->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, ButtonAddPlaceholder->sizePolicy().hasHeightForWidth() ) );
- ButtonAddPlaceholder->setMinimumSize( QSize( 0, 0 ) );
+ ButtonAddPlaceholder = new TQToolButton( tab, "ButtonAddPlaceholder" );
+ ButtonAddPlaceholder->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, ButtonAddPlaceholder->sizePolicy().hasHeightForWidth() ) );
+ ButtonAddPlaceholder->setMinimumSize( TQSize( 0, 0 ) );
tabLayout->addWidget( ButtonAddPlaceholder, 7, 3 );
@@ -152,202 +152,202 @@ ActionPropertyBase::ActionPropertyBase( QWidget* parent, const char* name, WFlag
tabLayout->addMultiCellWidget( textDescription, 4, 6, 1, 3 );
- LabelStartpath = new QLabel( tab, "LabelStartpath" );
- LabelStartpath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, LabelStartpath->sizePolicy().hasHeightForWidth() ) );
+ LabelStartpath = new TQLabel( tab, "LabelStartpath" );
+ LabelStartpath->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, LabelStartpath->sizePolicy().hasHeightForWidth() ) );
tabLayout->addWidget( LabelStartpath, 8, 0 );
- spacer = new QSpacerItem( 80, 19, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ spacer = new TQSpacerItem( 80, 19, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
tabLayout->addItem( spacer, 6, 0 );
- layout4 = new QHBoxLayout( 0, 0, 6, "layout4");
+ tqlayout4 = new TQHBoxLayout( 0, 0, 6, "tqlayout4");
- LabelShortcut = new QLabel( tab, "LabelShortcut" );
- layout4->addWidget( LabelShortcut );
- spacer6_2 = new QSpacerItem( 161, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
- layout4->addItem( spacer6_2 );
+ LabelShortcut = new TQLabel( tab, "LabelShortcut" );
+ tqlayout4->addWidget( LabelShortcut );
+ spacer6_2 = new TQSpacerItem( 161, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ tqlayout4->addItem( spacer6_2 );
KeyButtonShortcut = new KKeyButton( tab, "KeyButtonShortcut" );
- layout4->addWidget( KeyButtonShortcut );
+ tqlayout4->addWidget( KeyButtonShortcut );
- tabLayout->addMultiCellLayout( layout4, 10, 10, 2, 3 );
+ tabLayout->addMultiCellLayout( tqlayout4, 10, 10, 2, 3 );
- bgExecType = new QButtonGroup( tab, "bgExecType" );
- bgExecType->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, bgExecType->sizePolicy().hasHeightForWidth() ) );
+ bgExecType = new TQButtonGroup( tab, "bgExecType" );
+ bgExecType->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, bgExecType->sizePolicy().hasHeightForWidth() ) );
bgExecType->setColumnLayout(0, Qt::Vertical );
- bgExecType->layout()->setSpacing( 6 );
- bgExecType->layout()->setMargin( 11 );
- bgExecTypeLayout = new QGridLayout( bgExecType->layout() );
- bgExecTypeLayout->setAlignment( Qt::AlignTop );
+ bgExecType->tqlayout()->setSpacing( 6 );
+ bgExecType->tqlayout()->setMargin( 11 );
+ bgExecTypeLayout = new TQGridLayout( bgExecType->tqlayout() );
+ bgExecTypeLayout->tqsetAlignment( TQt::AlignTop );
- radioCollectOutput = new QRadioButton( bgExecType, "radioCollectOutput" );
+ radioCollectOutput = new TQRadioButton( bgExecType, "radioCollectOutput" );
bgExecTypeLayout->addWidget( radioCollectOutput, 2, 0 );
- chkSeparateStdError = new QCheckBox( bgExecType, "chkSeparateStdError" );
+ chkSeparateStdError = new TQCheckBox( bgExecType, "chkSeparateStdError" );
chkSeparateStdError->setEnabled( FALSE );
bgExecTypeLayout->addWidget( chkSeparateStdError, 3, 0 );
- radioNormal = new QRadioButton( bgExecType, "radioNormal" );
+ radioNormal = new TQRadioButton( bgExecType, "radioNormal" );
radioNormal->setChecked( TRUE );
bgExecTypeLayout->addWidget( radioNormal, 0, 0 );
- radioTerminal = new QRadioButton( bgExecType, "radioTerminal" );
+ radioTerminal = new TQRadioButton( bgExecType, "radioTerminal" );
bgExecTypeLayout->addWidget( radioTerminal, 1, 0 );
tabLayout->addMultiCellWidget( bgExecType, 9, 10, 0, 1 );
- tabWidget3->insertTab( tab, QString::fromLatin1("") );
+ tabWidget3->insertTab( tab, TQString::tqfromLatin1("") );
- tab_2 = new QWidget( tabWidget3, "tab_2" );
- tabLayout_2 = new QGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2");
+ tab_2 = new TQWidget( tabWidget3, "tab_2" );
+ tabLayout_2 = new TQGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2");
- gbShowonly = new QGroupBox( tab_2, "gbShowonly" );
- gbShowonly->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, gbShowonly->sizePolicy().hasHeightForWidth() ) );
+ gbShowonly = new TQGroupBox( tab_2, "gbShowonly" );
+ gbShowonly->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, gbShowonly->sizePolicy().hasHeightForWidth() ) );
gbShowonly->setColumnLayout(0, Qt::Vertical );
- gbShowonly->layout()->setSpacing( 6 );
- gbShowonly->layout()->setMargin( 11 );
- gbShowonlyLayout = new QGridLayout( gbShowonly->layout() );
- gbShowonlyLayout->setAlignment( Qt::AlignTop );
+ gbShowonly->tqlayout()->setSpacing( 6 );
+ gbShowonly->tqlayout()->setMargin( 11 );
+ gbShowonlyLayout = new TQGridLayout( gbShowonly->tqlayout() );
+ gbShowonlyLayout->tqsetAlignment( TQt::AlignTop );
- tabShowonly = new QTabWidget( gbShowonly, "tabShowonly" );
- tabShowonly->setTabPosition( QTabWidget::Top );
- tabShowonly->setTabShape( QTabWidget::Triangular );
+ tabShowonly = new TQTabWidget( gbShowonly, "tabShowonly" );
+ tabShowonly->setTabPosition( TQTabWidget::Top );
+ tabShowonly->setTabShape( TQTabWidget::Triangular );
- TabPage = new QWidget( tabShowonly, "TabPage" );
- TabPageLayout = new QGridLayout( TabPage, 1, 1, 11, 6, "TabPageLayout");
+ TabPage = new TQWidget( tabShowonly, "TabPage" );
+ TabPageLayout = new TQGridLayout( TabPage, 1, 1, 11, 6, "TabPageLayout");
- ButtonNewProtocol = new QToolButton( TabPage, "ButtonNewProtocol" );
- ButtonNewProtocol->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonNewProtocol->sizePolicy().hasHeightForWidth() ) );
- ButtonNewProtocol->setMinimumSize( QSize( 0, 0 ) );
- ButtonNewProtocol->setMaximumSize( QSize( 32767, 32767 ) );
+ ButtonNewProtocol = new TQToolButton( TabPage, "ButtonNewProtocol" );
+ ButtonNewProtocol->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ButtonNewProtocol->sizePolicy().hasHeightForWidth() ) );
+ ButtonNewProtocol->setMinimumSize( TQSize( 0, 0 ) );
+ ButtonNewProtocol->setMaximumSize( TQSize( 32767, 32767 ) );
TabPageLayout->addWidget( ButtonNewProtocol, 0, 1 );
- ButtonEditProtocol = new QToolButton( TabPage, "ButtonEditProtocol" );
- ButtonEditProtocol->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonEditProtocol->sizePolicy().hasHeightForWidth() ) );
- ButtonEditProtocol->setMinimumSize( QSize( 0, 0 ) );
- ButtonEditProtocol->setMaximumSize( QSize( 32767, 32767 ) );
+ ButtonEditProtocol = new TQToolButton( TabPage, "ButtonEditProtocol" );
+ ButtonEditProtocol->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ButtonEditProtocol->sizePolicy().hasHeightForWidth() ) );
+ ButtonEditProtocol->setMinimumSize( TQSize( 0, 0 ) );
+ ButtonEditProtocol->setMaximumSize( TQSize( 32767, 32767 ) );
TabPageLayout->addWidget( ButtonEditProtocol, 1, 1 );
- spacer6_3 = new QSpacerItem( 21, 58, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ spacer6_3 = new TQSpacerItem( 21, 58, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
TabPageLayout->addItem( spacer6_3, 3, 1 );
- ButtonRemoveProtocol = new QToolButton( TabPage, "ButtonRemoveProtocol" );
- ButtonRemoveProtocol->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonRemoveProtocol->sizePolicy().hasHeightForWidth() ) );
- ButtonRemoveProtocol->setMinimumSize( QSize( 0, 0 ) );
- ButtonRemoveProtocol->setMaximumSize( QSize( 32767, 32767 ) );
+ ButtonRemoveProtocol = new TQToolButton( TabPage, "ButtonRemoveProtocol" );
+ ButtonRemoveProtocol->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ButtonRemoveProtocol->sizePolicy().hasHeightForWidth() ) );
+ ButtonRemoveProtocol->setMinimumSize( TQSize( 0, 0 ) );
+ ButtonRemoveProtocol->setMaximumSize( TQSize( 32767, 32767 ) );
TabPageLayout->addWidget( ButtonRemoveProtocol, 2, 1 );
lbShowonlyProtocol = new KListBox( TabPage, "lbShowonlyProtocol" );
TabPageLayout->addMultiCellWidget( lbShowonlyProtocol, 0, 3, 0, 0 );
- tabShowonly->insertTab( TabPage, QString::fromLatin1("") );
+ tabShowonly->insertTab( TabPage, TQString::tqfromLatin1("") );
- tab_3 = new QWidget( tabShowonly, "tab_3" );
- tabLayout_3 = new QGridLayout( tab_3, 1, 1, 11, 6, "tabLayout_3");
+ tab_3 = new TQWidget( tabShowonly, "tab_3" );
+ tabLayout_3 = new TQGridLayout( tab_3, 1, 1, 11, 6, "tabLayout_3");
lbShowonlyPath = new KListBox( tab_3, "lbShowonlyPath" );
tabLayout_3->addMultiCellWidget( lbShowonlyPath, 0, 3, 0, 0 );
- ButtonAddPath = new QToolButton( tab_3, "ButtonAddPath" );
- ButtonAddPath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonAddPath->sizePolicy().hasHeightForWidth() ) );
- ButtonAddPath->setMinimumSize( QSize( 0, 0 ) );
- ButtonAddPath->setMaximumSize( QSize( 32767, 32767 ) );
+ ButtonAddPath = new TQToolButton( tab_3, "ButtonAddPath" );
+ ButtonAddPath->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ButtonAddPath->sizePolicy().hasHeightForWidth() ) );
+ ButtonAddPath->setMinimumSize( TQSize( 0, 0 ) );
+ ButtonAddPath->setMaximumSize( TQSize( 32767, 32767 ) );
tabLayout_3->addWidget( ButtonAddPath, 0, 1 );
- ButtonEditPath = new QToolButton( tab_3, "ButtonEditPath" );
- ButtonEditPath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonEditPath->sizePolicy().hasHeightForWidth() ) );
- ButtonEditPath->setMinimumSize( QSize( 0, 0 ) );
- ButtonEditPath->setMaximumSize( QSize( 32767, 32767 ) );
+ ButtonEditPath = new TQToolButton( tab_3, "ButtonEditPath" );
+ ButtonEditPath->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ButtonEditPath->sizePolicy().hasHeightForWidth() ) );
+ ButtonEditPath->setMinimumSize( TQSize( 0, 0 ) );
+ ButtonEditPath->setMaximumSize( TQSize( 32767, 32767 ) );
tabLayout_3->addWidget( ButtonEditPath, 1, 1 );
- ButtonRemovePath = new QToolButton( tab_3, "ButtonRemovePath" );
- ButtonRemovePath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonRemovePath->sizePolicy().hasHeightForWidth() ) );
- ButtonRemovePath->setMinimumSize( QSize( 0, 0 ) );
- ButtonRemovePath->setMaximumSize( QSize( 32767, 32767 ) );
+ ButtonRemovePath = new TQToolButton( tab_3, "ButtonRemovePath" );
+ ButtonRemovePath->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ButtonRemovePath->sizePolicy().hasHeightForWidth() ) );
+ ButtonRemovePath->setMinimumSize( TQSize( 0, 0 ) );
+ ButtonRemovePath->setMaximumSize( TQSize( 32767, 32767 ) );
tabLayout_3->addWidget( ButtonRemovePath, 2, 1 );
- spacer4 = new QSpacerItem( 21, 61, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ spacer4 = new TQSpacerItem( 21, 61, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
tabLayout_3->addItem( spacer4, 3, 1 );
- tabShowonly->insertTab( tab_3, QString::fromLatin1("") );
+ tabShowonly->insertTab( tab_3, TQString::tqfromLatin1("") );
- tab_4 = new QWidget( tabShowonly, "tab_4" );
- tabLayout_4 = new QGridLayout( tab_4, 1, 1, 11, 6, "tabLayout_4");
+ tab_4 = new TQWidget( tabShowonly, "tab_4" );
+ tabLayout_4 = new TQGridLayout( tab_4, 1, 1, 11, 6, "tabLayout_4");
lbShowonlyMime = new KListBox( tab_4, "lbShowonlyMime" );
tabLayout_4->addMultiCellWidget( lbShowonlyMime, 0, 3, 0, 0 );
- ButtonAddMime = new QToolButton( tab_4, "ButtonAddMime" );
- ButtonAddMime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonAddMime->sizePolicy().hasHeightForWidth() ) );
- ButtonAddMime->setMinimumSize( QSize( 0, 0 ) );
- ButtonAddMime->setMaximumSize( QSize( 32767, 32767 ) );
+ ButtonAddMime = new TQToolButton( tab_4, "ButtonAddMime" );
+ ButtonAddMime->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ButtonAddMime->sizePolicy().hasHeightForWidth() ) );
+ ButtonAddMime->setMinimumSize( TQSize( 0, 0 ) );
+ ButtonAddMime->setMaximumSize( TQSize( 32767, 32767 ) );
tabLayout_4->addWidget( ButtonAddMime, 0, 1 );
- ButtonEditMime = new QToolButton( tab_4, "ButtonEditMime" );
- ButtonEditMime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonEditMime->sizePolicy().hasHeightForWidth() ) );
- ButtonEditMime->setMinimumSize( QSize( 0, 0 ) );
- ButtonEditMime->setMaximumSize( QSize( 32767, 32767 ) );
+ ButtonEditMime = new TQToolButton( tab_4, "ButtonEditMime" );
+ ButtonEditMime->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ButtonEditMime->sizePolicy().hasHeightForWidth() ) );
+ ButtonEditMime->setMinimumSize( TQSize( 0, 0 ) );
+ ButtonEditMime->setMaximumSize( TQSize( 32767, 32767 ) );
tabLayout_4->addWidget( ButtonEditMime, 1, 1 );
- ButtonRemoveMime = new QToolButton( tab_4, "ButtonRemoveMime" );
- ButtonRemoveMime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonRemoveMime->sizePolicy().hasHeightForWidth() ) );
- ButtonRemoveMime->setMinimumSize( QSize( 0, 0 ) );
- ButtonRemoveMime->setMaximumSize( QSize( 32767, 32767 ) );
+ ButtonRemoveMime = new TQToolButton( tab_4, "ButtonRemoveMime" );
+ ButtonRemoveMime->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ButtonRemoveMime->sizePolicy().hasHeightForWidth() ) );
+ ButtonRemoveMime->setMinimumSize( TQSize( 0, 0 ) );
+ ButtonRemoveMime->setMaximumSize( TQSize( 32767, 32767 ) );
tabLayout_4->addWidget( ButtonRemoveMime, 2, 1 );
- spacer5 = new QSpacerItem( 21, 41, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ spacer5 = new TQSpacerItem( 21, 41, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
tabLayout_4->addItem( spacer5, 3, 1 );
- tabShowonly->insertTab( tab_4, QString::fromLatin1("") );
+ tabShowonly->insertTab( tab_4, TQString::tqfromLatin1("") );
- TabPage_2 = new QWidget( tabShowonly, "TabPage_2" );
- TabPageLayout_2 = new QGridLayout( TabPage_2, 1, 1, 11, 6, "TabPageLayout_2");
+ TabPage_2 = new TQWidget( tabShowonly, "TabPage_2" );
+ TabPageLayout_2 = new TQGridLayout( TabPage_2, 1, 1, 11, 6, "TabPageLayout_2");
lbShowonlyFile = new KListBox( TabPage_2, "lbShowonlyFile" );
TabPageLayout_2->addMultiCellWidget( lbShowonlyFile, 0, 3, 0, 0 );
- ButtonNewFile = new QToolButton( TabPage_2, "ButtonNewFile" );
- ButtonNewFile->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonNewFile->sizePolicy().hasHeightForWidth() ) );
- ButtonNewFile->setMinimumSize( QSize( 0, 0 ) );
- ButtonNewFile->setMaximumSize( QSize( 32767, 32767 ) );
+ ButtonNewFile = new TQToolButton( TabPage_2, "ButtonNewFile" );
+ ButtonNewFile->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ButtonNewFile->sizePolicy().hasHeightForWidth() ) );
+ ButtonNewFile->setMinimumSize( TQSize( 0, 0 ) );
+ ButtonNewFile->setMaximumSize( TQSize( 32767, 32767 ) );
TabPageLayout_2->addWidget( ButtonNewFile, 0, 1 );
- ButtonEditFile = new QToolButton( TabPage_2, "ButtonEditFile" );
- ButtonEditFile->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonEditFile->sizePolicy().hasHeightForWidth() ) );
- ButtonEditFile->setMinimumSize( QSize( 0, 0 ) );
- ButtonEditFile->setMaximumSize( QSize( 32767, 32767 ) );
+ ButtonEditFile = new TQToolButton( TabPage_2, "ButtonEditFile" );
+ ButtonEditFile->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ButtonEditFile->sizePolicy().hasHeightForWidth() ) );
+ ButtonEditFile->setMinimumSize( TQSize( 0, 0 ) );
+ ButtonEditFile->setMaximumSize( TQSize( 32767, 32767 ) );
TabPageLayout_2->addWidget( ButtonEditFile, 1, 1 );
- ButtonRemoveFile = new QToolButton( TabPage_2, "ButtonRemoveFile" );
- ButtonRemoveFile->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, ButtonRemoveFile->sizePolicy().hasHeightForWidth() ) );
- ButtonRemoveFile->setMinimumSize( QSize( 0, 0 ) );
- ButtonRemoveFile->setMaximumSize( QSize( 32767, 32767 ) );
+ ButtonRemoveFile = new TQToolButton( TabPage_2, "ButtonRemoveFile" );
+ ButtonRemoveFile->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, ButtonRemoveFile->sizePolicy().hasHeightForWidth() ) );
+ ButtonRemoveFile->setMinimumSize( TQSize( 0, 0 ) );
+ ButtonRemoveFile->setMaximumSize( TQSize( 32767, 32767 ) );
TabPageLayout_2->addWidget( ButtonRemoveFile, 2, 1 );
- spacer6 = new QSpacerItem( 21, 41, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ spacer6 = new TQSpacerItem( 21, 41, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
TabPageLayout_2->addItem( spacer6, 3, 1 );
- tabShowonly->insertTab( TabPage_2, QString::fromLatin1("") );
+ tabShowonly->insertTab( TabPage_2, TQString::tqfromLatin1("") );
gbShowonlyLayout->addWidget( tabShowonly, 0, 0 );
tabLayout_2->addMultiCellWidget( gbShowonly, 0, 0, 0, 1 );
- chkConfirmExecution = new QCheckBox( tab_2, "chkConfirmExecution" );
+ chkConfirmExecution = new TQCheckBox( tab_2, "chkConfirmExecution" );
tabLayout_2->addMultiCellWidget( chkConfirmExecution, 1, 1, 0, 1 );
- chkDifferentUser = new QCheckBox( tab_2, "chkDifferentUser" );
+ chkDifferentUser = new TQCheckBox( tab_2, "chkDifferentUser" );
tabLayout_2->addWidget( chkDifferentUser, 2, 0 );
@@ -355,18 +355,18 @@ ActionPropertyBase::ActionPropertyBase( QWidget* parent, const char* name, WFlag
leDifferentUser->setEnabled( FALSE );
tabLayout_2->addWidget( leDifferentUser, 2, 1 );
- spacer3 = new QSpacerItem( 161, 102, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ spacer3 = new TQSpacerItem( 161, 102, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
tabLayout_2->addMultiCell( spacer3, 3, 3, 0, 1 );
- tabWidget3->insertTab( tab_2, QString::fromLatin1("") );
+ tabWidget3->insertTab( tab_2, TQString::tqfromLatin1("") );
ActionPropertyBaseLayout->addWidget( tabWidget3, 0, 0 );
languageChange();
- resize( QSize(485, 470).expandedTo(minimumSizeHint()) );
+ resize( TQSize(485, 470).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
- connect( radioCollectOutput, SIGNAL( toggled(bool) ), chkSeparateStdError, SLOT( setEnabled(bool) ) );
- connect( chkDifferentUser, SIGNAL( toggled(bool) ), leDifferentUser, SLOT( setEnabled(bool) ) );
+ connect( radioCollectOutput, TQT_SIGNAL( toggled(bool) ), chkSeparateStdError, TQT_SLOT( setEnabled(bool) ) );
+ connect( chkDifferentUser, TQT_SIGNAL( toggled(bool) ), leDifferentUser, TQT_SLOT( setEnabled(bool) ) );
}
/*
@@ -374,7 +374,7 @@ ActionPropertyBase::ActionPropertyBase( QWidget* parent, const char* name, WFlag
*/
ActionPropertyBase::~ActionPropertyBase()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
/*
@@ -386,77 +386,77 @@ void ActionPropertyBase::languageChange()
setCaption( tr2i18n( "Action Property" ) );
ButtonAddStartpath->setText( tr2i18n( "..." ) );
LabelDescription->setText( tr2i18n( "Description:" ) );
- QWhatsThis::add( LabelDescription, tr2i18n( "A detailed description of the <b>Useraction</b>. It is only displayed in the <i>Konfigurator</i> and via <code>Shift-F1</code>." ) );
+ TQWhatsThis::add( LabelDescription, tr2i18n( "A detailed description of the <b>Useraction</b>. It is only displayed in the <i>Konfigurator</i> and via <code>Shift-F1</code>." ) );
bgAccept->setTitle( tr2i18n( "Command accepts" ) );
radioLocal->setText( tr2i18n( "Local files only (no URL's)" ) );
- QWhatsThis::add( radioLocal, tr2i18n( "Substitute the <b>Placeholders</b> with local filenames." ) );
+ TQWhatsThis::add( radioLocal, tr2i18n( "Substitute the <b>Placeholders</b> with local filenames." ) );
radioUrl->setText( tr2i18n( "URL's (remote and local)" ) );
- QWhatsThis::add( radioUrl, tr2i18n( "Substitute the <b>Placeholders</b> with valid URL's." ) );
- QWhatsThis::add( leTitle, tr2i18n( "The title displayed in the <b>Usermenu</b>." ) );
+ TQWhatsThis::add( radioUrl, tr2i18n( "Substitute the <b>Placeholders</b> with valid URL's." ) );
+ TQWhatsThis::add( leTitle, tr2i18n( "The title displayed in the <b>Usermenu</b>." ) );
LabelTitle->setText( tr2i18n( "Title:" ) );
- QWhatsThis::add( LabelTitle, tr2i18n( "The title displayed in the <b>Usermenu</b>." ) );
- QWhatsThis::add( leDistinctName, tr2i18n( "Unique name of the <b>Useraction</b>. It is only used in the <i>Konfigurator</i> and doesn't appear in any other menu.<p><b>Note</b>: The <i>Title</i> shown in the <b>Usermenu</b> can be set below." ) );
- QWhatsThis::add( cbCategory, tr2i18n( "<b>Useractions</b> can be grouped in categories for better distinction. Choose a existing <i>Category</i> or create a new one by entering a name." ) );
+ TQWhatsThis::add( LabelTitle, tr2i18n( "The title displayed in the <b>Usermenu</b>." ) );
+ TQWhatsThis::add( leDistinctName, tr2i18n( "Unique name of the <b>Useraction</b>. It is only used in the <i>Konfigurator</i> and doesn't appear in any other menu.<p><b>Note</b>: The <i>Title</i> shown in the <b>Usermenu</b> can be set below." ) );
+ TQWhatsThis::add( cbCategory, tr2i18n( "<b>Useractions</b> can be grouped in categories for better distinction. Choose a existing <i>Category</i> or create a new one by entering a name." ) );
ButtonIcon->setText( tr2i18n( "Icon" ) );
- QWhatsThis::add( ButtonIcon, tr2i18n( "Each <b>Useraction</b> can have its own icon. It will appear in front of the title in the <b>Usermenu</b>." ) );
+ TQWhatsThis::add( ButtonIcon, tr2i18n( "Each <b>Useraction</b> can have its own icon. It will appear in front of the title in the <b>Usermenu</b>." ) );
LabelDistinctName->setText( tr2i18n( "Identifier:" ) );
- QWhatsThis::add( LabelDistinctName, tr2i18n( "<p>Unique name of the <b>Useraction</b>. It is only used in the <i>Konfigurator</i> and doesn't appear in any other menu.</p><p><b>Note</b>: The <i>Title</i> shown in the <b>Usermenu</b> can be set below.</p>" ) );
+ TQWhatsThis::add( LabelDistinctName, tr2i18n( "<p>Unique name of the <b>Useraction</b>. It is only used in the <i>Konfigurator</i> and doesn't appear in any other menu.</p><p><b>Note</b>: The <i>Title</i> shown in the <b>Usermenu</b> can be set below.</p>" ) );
LabelCommandline->setText( tr2i18n( "Command:" ) );
- QWhatsThis::add( LabelCommandline, tr2i18n( "<p>The <i>Command</i> defines the command that will be executed when the <b>Useraction</b> is used. It can be a simple shell command or a complex sequence of multiple commands with <b>Placeholders</b>.</p><p>Examples:<ul><code><li>eject /mnt/cdrom</li><li>amarok --append %aList(\"Selected\")%</li></code></ul>\n"
+ TQWhatsThis::add( LabelCommandline, tr2i18n( "<p>The <i>Command</i> defines the command that will be executed when the <b>Useraction</b> is used. It can be a simple shell command or a complex sequence of multiple commands with <b>Placeholders</b>.</p><p>Examples:<ul><code><li>eject /mnt/cdrom</li><li>amarok --append %aList(\"Selected\")%</li></code></ul>\n"
"Please consult the handbook to learn more about the syntax.</p>" ) );
- QWhatsThis::add( leTooltip, tr2i18n( "The <i>Tooltip</i> is shown when the mouse cursor is hold over an entry of the <b>Useraction Toolbar</b>." ) );
- QWhatsThis::add( leStartpath, tr2i18n( "The <i>Workdir</i> defines in which directory the <i>Command</i> will be executed." ) );
+ TQWhatsThis::add( leTooltip, tr2i18n( "The <i>Tooltip</i> is shown when the mouse cursor is hold over an entry of the <b>Useraction Toolbar</b>." ) );
+ TQWhatsThis::add( leStartpath, tr2i18n( "The <i>Workdir</i> defines in which directory the <i>Command</i> will be executed." ) );
LabelTooltip->setText( tr2i18n( "Tooltip:" ) );
- QWhatsThis::add( LabelTooltip, tr2i18n( "The <i>Tooltip</i> is shown when the mouse cursor is hold over an entry of the <b>Useraction Toolbar</b>." ) );
- leCommandline->setText( QString::null );
- QWhatsThis::add( leCommandline, tr2i18n( "The <i>Command</i> defines the command that will be executed when the <b>Useraction</b> is used. It can be a simple shell command or a complex sequence of multiple commands with <b>Placeholders</b>.<p>\n"
+ TQWhatsThis::add( LabelTooltip, tr2i18n( "The <i>Tooltip</i> is shown when the mouse cursor is hold over an entry of the <b>Useraction Toolbar</b>." ) );
+ leCommandline->setText( TQString() );
+ TQWhatsThis::add( leCommandline, tr2i18n( "The <i>Command</i> defines the command that will be executed when the <b>Useraction</b> is used. It can be a simple shell command or a complex sequence of multiple commands with <b>Placeholders</b>.<p>\n"
"Examples:<ul><code><li>eject /mnt/cdrom</li><li>amarok --append %aList(\"Selected\")%</li></code></ul>\n"
"Please consult the handbook to learn more about the syntax." ) );
LabelCategory->setText( tr2i18n( "Category:" ) );
- QWhatsThis::add( LabelCategory, tr2i18n( "<b>Useractions</b> can be grouped in categories for better distinction. Choose a existing <i>Category</i> or create a new one by entering a name." ) );
+ TQWhatsThis::add( LabelCategory, tr2i18n( "<b>Useractions</b> can be grouped in categories for better distinction. Choose a existing <i>Category</i> or create a new one by entering a name." ) );
ButtonAddPlaceholder->setText( tr2i18n( "&Add" ) );
- QWhatsThis::add( ButtonAddPlaceholder, tr2i18n( "Add <b>Placeholders</b> for the selected files in the panel." ) );
- QWhatsThis::add( textDescription, tr2i18n( "A detailed description of the <b>Useraction</b>. It is only displayed in the <i>Konfigurator</i> and via <code>Shift-F1</code>." ) );
+ TQWhatsThis::add( ButtonAddPlaceholder, tr2i18n( "Add <b>Placeholders</b> for the selected files in the panel." ) );
+ TQWhatsThis::add( textDescription, tr2i18n( "A detailed description of the <b>Useraction</b>. It is only displayed in the <i>Konfigurator</i> and via <code>Shift-F1</code>." ) );
LabelStartpath->setText( tr2i18n( "Workdir:" ) );
- QWhatsThis::add( LabelStartpath, tr2i18n( "The <i>Workdir</i> defines in which directory the <i>Command</i> will be executed." ) );
+ TQWhatsThis::add( LabelStartpath, tr2i18n( "The <i>Workdir</i> defines in which directory the <i>Command</i> will be executed." ) );
LabelShortcut->setText( tr2i18n( "Default shortcut:" ) );
KeyButtonShortcut->setText( tr2i18n( "None" ) );
- QWhatsThis::add( KeyButtonShortcut, tr2i18n( "Set a default keyboard shortcut." ) );
+ TQWhatsThis::add( KeyButtonShortcut, tr2i18n( "Set a default keyboard shortcut." ) );
bgExecType->setTitle( tr2i18n( "Execution mode" ) );
radioCollectOutput->setText( tr2i18n( "Collect output" ) );
- QWhatsThis::add( radioCollectOutput, tr2i18n( "Collect the output of the executed program." ) );
+ TQWhatsThis::add( radioCollectOutput, tr2i18n( "Collect the output of the executed program." ) );
chkSeparateStdError->setText( tr2i18n( "Separate standard error" ) );
- QWhatsThis::add( chkSeparateStdError, tr2i18n( "Separate standard out and standard error in the output collection." ) );
+ TQWhatsThis::add( chkSeparateStdError, tr2i18n( "Separate standard out and standard error in the output collection." ) );
radioNormal->setText( tr2i18n( "Normal" ) );
radioTerminal->setText( tr2i18n( "Run in terminal" ) );
- QWhatsThis::add( radioTerminal, tr2i18n( "Run the command in a terminal." ) );
+ TQWhatsThis::add( radioTerminal, tr2i18n( "Run the command in a terminal." ) );
tabWidget3->changeTab( tab, tr2i18n( "Basic Properties" ) );
gbShowonly->setTitle( tr2i18n( "The Useraction is only available for" ) );
ButtonNewProtocol->setText( tr2i18n( "&New..." ) );
ButtonEditProtocol->setText( tr2i18n( "Chan&ge..." ) );
ButtonRemoveProtocol->setText( tr2i18n( "De&lete" ) );
- QWhatsThis::add( lbShowonlyProtocol, tr2i18n( "Show the <b>Useraction</b> only for the values defined here." ) );
+ TQWhatsThis::add( lbShowonlyProtocol, tr2i18n( "Show the <b>Useraction</b> only for the values defined here." ) );
tabShowonly->changeTab( TabPage, tr2i18n( "Protocol" ) );
- QWhatsThis::add( lbShowonlyPath, tr2i18n( "Show the <b>Useraction</b> only for the values defined here." ) );
+ TQWhatsThis::add( lbShowonlyPath, tr2i18n( "Show the <b>Useraction</b> only for the values defined here." ) );
ButtonAddPath->setText( tr2i18n( "&New..." ) );
ButtonEditPath->setText( tr2i18n( "Chan&ge..." ) );
ButtonRemovePath->setText( tr2i18n( "De&lete" ) );
tabShowonly->changeTab( tab_3, tr2i18n( "Path" ) );
- QWhatsThis::add( lbShowonlyMime, tr2i18n( "Show the <b>Useraction</b> only for the values defined here." ) );
+ TQWhatsThis::add( lbShowonlyMime, tr2i18n( "Show the <b>Useraction</b> only for the values defined here." ) );
ButtonAddMime->setText( tr2i18n( "&New..." ) );
ButtonEditMime->setText( tr2i18n( "Chan&ge..." ) );
ButtonRemoveMime->setText( tr2i18n( "De&lete" ) );
tabShowonly->changeTab( tab_4, tr2i18n( "Mime-type" ) );
- QWhatsThis::add( lbShowonlyFile, tr2i18n( "Show the <b>Useraction</b> only for the filenames defined here. The wildcards '<code>?</code>' and '<code>*</code>' can be used." ) );
+ TQWhatsThis::add( lbShowonlyFile, tr2i18n( "Show the <b>Useraction</b> only for the filenames defined here. The wildcards '<code>?</code>' and '<code>*</code>' can be used." ) );
ButtonNewFile->setText( tr2i18n( "&New..." ) );
ButtonEditFile->setText( tr2i18n( "Chan&ge..." ) );
ButtonRemoveFile->setText( tr2i18n( "De&lete" ) );
tabShowonly->changeTab( TabPage_2, tr2i18n( "Filename" ) );
chkConfirmExecution->setText( tr2i18n( "Confirm each program call separately" ) );
- QWhatsThis::add( chkConfirmExecution, tr2i18n( "Allows to tweak the <i>Command</i> before it is executed." ) );
+ TQWhatsThis::add( chkConfirmExecution, tr2i18n( "Allows to tweak the <i>Command</i> before it is executed." ) );
chkDifferentUser->setText( tr2i18n( "Run as different user:" ) );
- QWhatsThis::add( chkDifferentUser, tr2i18n( "Execute the <i>Command</i> under a different user-id." ) );
- QWhatsThis::add( leDifferentUser, tr2i18n( "Execute the <i>Command</i> under a different user-id." ) );
+ TQWhatsThis::add( chkDifferentUser, tr2i18n( "Execute the <i>Command</i> under a different user-id." ) );
+ TQWhatsThis::add( leDifferentUser, tr2i18n( "Execute the <i>Command</i> under a different user-id." ) );
tabWidget3->changeTab( tab_2, tr2i18n( "Advanced Properties" ) );
}
diff --git a/krusader/ActionMan/actionpropertybase.ui b/krusader/ActionMan/actionpropertybase.ui
index 9079e85..7224dc2 100644
--- a/krusader/ActionMan/actionpropertybase.ui
+++ b/krusader/ActionMan/actionpropertybase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ActionPropertyBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ActionPropertyBase</cstring>
</property>
@@ -25,11 +25,11 @@
<property name="spacing">
<number>0</number>
</property>
- <widget class="QTabWidget" row="0" column="0">
+ <widget class="TQTabWidget" row="0" column="0">
<property name="name">
<cstring>tabWidget3</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -40,7 +40,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QToolButton" row="8" column="3">
+ <widget class="TQToolButton" row="8" column="3">
<property name="name">
<cstring>ButtonAddStartpath</cstring>
</property>
@@ -48,7 +48,7 @@
<string>...</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>LabelDescription</cstring>
</property>
@@ -67,7 +67,7 @@
<string>A detailed description of the &lt;b&gt;Useraction&lt;/b&gt;. It is only displayed in the &lt;i&gt;Konfigurator&lt;/i&gt; and via &lt;code&gt;Shift-F1&lt;/code&gt;.</string>
</property>
</widget>
- <widget class="QButtonGroup" row="9" column="2" rowspan="1" colspan="2">
+ <widget class="TQButtonGroup" row="9" column="2" rowspan="1" colspan="2">
<property name="name">
<cstring>bgAccept</cstring>
</property>
@@ -86,7 +86,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="0" column="0">
+ <widget class="TQRadioButton" row="0" column="0">
<property name="name">
<cstring>radioLocal</cstring>
</property>
@@ -100,7 +100,7 @@
<string>Substitute the &lt;b&gt;Placeholders&lt;/b&gt; with local filenames.</string>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="0">
+ <widget class="TQRadioButton" row="1" column="0">
<property name="name">
<cstring>radioUrl</cstring>
</property>
@@ -121,7 +121,7 @@
<string>The title displayed in the &lt;b&gt;Usermenu&lt;/b&gt;.</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>LabelTitle</cstring>
</property>
@@ -140,17 +140,17 @@
<string>The title displayed in the &lt;b&gt;Usermenu&lt;/b&gt;.</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="0" column="1" rowspan="2" colspan="3">
+ <widget class="TQLayoutWidget" row="0" column="1" rowspan="2" colspan="3">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<vbox>
<property name="name">
@@ -189,13 +189,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>50</width>
<height>50</height>
@@ -210,7 +210,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>LabelDistinctName</cstring>
</property>
@@ -229,7 +229,7 @@
<string>&lt;p&gt;Unique name of the &lt;b&gt;Useraction&lt;/b&gt;. It is only used in the &lt;i&gt;Konfigurator&lt;/i&gt; and doesn't appear in any other menu.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Note&lt;/b&gt;: The &lt;i&gt;Title&lt;/i&gt; shown in the &lt;b&gt;Usermenu&lt;/b&gt; can be set below.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QLabel" row="7" column="0">
+ <widget class="TQLabel" row="7" column="0">
<property name="name">
<cstring>LabelCommandline</cstring>
</property>
@@ -265,7 +265,7 @@ Please consult the handbook to learn more about the syntax.&lt;/p&gt;</string>
<string>The &lt;i&gt;Workdir&lt;/i&gt; defines in which directory the &lt;i&gt;Command&lt;/i&gt; will be executed.</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>LabelTooltip</cstring>
</property>
@@ -297,7 +297,7 @@ Examples:&lt;ul&gt;&lt;code&gt;&lt;li&gt;eject /mnt/cdrom&lt;/li&gt;&lt;li&gt;am
Please consult the handbook to learn more about the syntax.</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>LabelCategory</cstring>
</property>
@@ -316,7 +316,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>&lt;b&gt;Useractions&lt;/b&gt; can be grouped in categories for better distinction. Choose a existing &lt;i&gt;Category&lt;/i&gt; or create a new one by entering a name.</string>
</property>
</widget>
- <widget class="QToolButton" row="7" column="3">
+ <widget class="TQToolButton" row="7" column="3">
<property name="name">
<cstring>ButtonAddPlaceholder</cstring>
</property>
@@ -328,7 +328,7 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -352,7 +352,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>A detailed description of the &lt;b&gt;Useraction&lt;/b&gt;. It is only displayed in the &lt;i&gt;Konfigurator&lt;/i&gt; and via &lt;code&gt;Shift-F1&lt;/code&gt;.</string>
</property>
</widget>
- <widget class="QLabel" row="8" column="0">
+ <widget class="TQLabel" row="8" column="0">
<property name="name">
<cstring>LabelStartpath</cstring>
</property>
@@ -381,22 +381,22 @@ Please consult the handbook to learn more about the syntax.</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>80</width>
<height>19</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget" row="10" column="2" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="10" column="2" rowspan="1" colspan="2">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>LabelShortcut</cstring>
</property>
@@ -414,7 +414,7 @@ Please consult the handbook to learn more about the syntax.</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>161</width>
<height>21</height>
@@ -434,7 +434,7 @@ Please consult the handbook to learn more about the syntax.</string>
</widget>
</hbox>
</widget>
- <widget class="QButtonGroup" row="9" column="0" rowspan="2" colspan="2">
+ <widget class="TQButtonGroup" row="9" column="0" rowspan="2" colspan="2">
<property name="name">
<cstring>bgExecType</cstring>
</property>
@@ -453,7 +453,7 @@ Please consult the handbook to learn more about the syntax.</string>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="2" column="0">
+ <widget class="TQRadioButton" row="2" column="0">
<property name="name">
<cstring>radioCollectOutput</cstring>
</property>
@@ -464,7 +464,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>Collect the output of the executed program.</string>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="0">
+ <widget class="TQCheckBox" row="3" column="0">
<property name="name">
<cstring>chkSeparateStdError</cstring>
</property>
@@ -478,7 +478,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>Separate standard out and standard error in the output collection.</string>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="0">
+ <widget class="TQRadioButton" row="0" column="0">
<property name="name">
<cstring>radioNormal</cstring>
</property>
@@ -489,7 +489,7 @@ Please consult the handbook to learn more about the syntax.</string>
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="0">
+ <widget class="TQRadioButton" row="1" column="0">
<property name="name">
<cstring>radioTerminal</cstring>
</property>
@@ -504,7 +504,7 @@ Please consult the handbook to learn more about the syntax.</string>
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -515,7 +515,7 @@ Please consult the handbook to learn more about the syntax.</string>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>gbShowonly</cstring>
</property>
@@ -534,7 +534,7 @@ Please consult the handbook to learn more about the syntax.</string>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTabWidget" row="0" column="0">
+ <widget class="TQTabWidget" row="0" column="0">
<property name="name">
<cstring>tabShowonly</cstring>
</property>
@@ -544,7 +544,7 @@ Please consult the handbook to learn more about the syntax.</string>
<property name="tabShape">
<enum>Triangular</enum>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -555,7 +555,7 @@ Please consult the handbook to learn more about the syntax.</string>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QToolButton" row="0" column="1">
+ <widget class="TQToolButton" row="0" column="1">
<property name="name">
<cstring>ButtonNewProtocol</cstring>
</property>
@@ -567,13 +567,13 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -583,7 +583,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>&amp;New...</string>
</property>
</widget>
- <widget class="QToolButton" row="1" column="1">
+ <widget class="TQToolButton" row="1" column="1">
<property name="name">
<cstring>ButtonEditProtocol</cstring>
</property>
@@ -595,13 +595,13 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -621,14 +621,14 @@ Please consult the handbook to learn more about the syntax.</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>58</height>
</size>
</property>
</spacer>
- <widget class="QToolButton" row="2" column="1">
+ <widget class="TQToolButton" row="2" column="1">
<property name="name">
<cstring>ButtonRemoveProtocol</cstring>
</property>
@@ -640,13 +640,13 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -666,7 +666,7 @@ Please consult the handbook to learn more about the syntax.</string>
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -685,7 +685,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>Show the &lt;b&gt;Useraction&lt;/b&gt; only for the values defined here.</string>
</property>
</widget>
- <widget class="QToolButton" row="0" column="1">
+ <widget class="TQToolButton" row="0" column="1">
<property name="name">
<cstring>ButtonAddPath</cstring>
</property>
@@ -697,13 +697,13 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -713,7 +713,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>&amp;New...</string>
</property>
</widget>
- <widget class="QToolButton" row="1" column="1">
+ <widget class="TQToolButton" row="1" column="1">
<property name="name">
<cstring>ButtonEditPath</cstring>
</property>
@@ -725,13 +725,13 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -741,7 +741,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>Chan&amp;ge...</string>
</property>
</widget>
- <widget class="QToolButton" row="2" column="1">
+ <widget class="TQToolButton" row="2" column="1">
<property name="name">
<cstring>ButtonRemovePath</cstring>
</property>
@@ -753,13 +753,13 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -779,7 +779,7 @@ Please consult the handbook to learn more about the syntax.</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>61</height>
@@ -788,7 +788,7 @@ Please consult the handbook to learn more about the syntax.</string>
</spacer>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -807,7 +807,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>Show the &lt;b&gt;Useraction&lt;/b&gt; only for the values defined here.</string>
</property>
</widget>
- <widget class="QToolButton" row="0" column="1">
+ <widget class="TQToolButton" row="0" column="1">
<property name="name">
<cstring>ButtonAddMime</cstring>
</property>
@@ -819,13 +819,13 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -835,7 +835,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>&amp;New...</string>
</property>
</widget>
- <widget class="QToolButton" row="1" column="1">
+ <widget class="TQToolButton" row="1" column="1">
<property name="name">
<cstring>ButtonEditMime</cstring>
</property>
@@ -847,13 +847,13 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -863,7 +863,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>Chan&amp;ge...</string>
</property>
</widget>
- <widget class="QToolButton" row="2" column="1">
+ <widget class="TQToolButton" row="2" column="1">
<property name="name">
<cstring>ButtonRemoveMime</cstring>
</property>
@@ -875,13 +875,13 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -901,7 +901,7 @@ Please consult the handbook to learn more about the syntax.</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>41</height>
@@ -910,7 +910,7 @@ Please consult the handbook to learn more about the syntax.</string>
</spacer>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -929,7 +929,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>Show the &lt;b&gt;Useraction&lt;/b&gt; only for the filenames defined here. The wildcards '&lt;code&gt;?&lt;/code&gt;' and '&lt;code&gt;*&lt;/code&gt;' can be used.</string>
</property>
</widget>
- <widget class="QToolButton" row="0" column="1">
+ <widget class="TQToolButton" row="0" column="1">
<property name="name">
<cstring>ButtonNewFile</cstring>
</property>
@@ -941,13 +941,13 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -957,7 +957,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>&amp;New...</string>
</property>
</widget>
- <widget class="QToolButton" row="1" column="1">
+ <widget class="TQToolButton" row="1" column="1">
<property name="name">
<cstring>ButtonEditFile</cstring>
</property>
@@ -969,13 +969,13 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -985,7 +985,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>Chan&amp;ge...</string>
</property>
</widget>
- <widget class="QToolButton" row="2" column="1">
+ <widget class="TQToolButton" row="2" column="1">
<property name="name">
<cstring>ButtonRemoveFile</cstring>
</property>
@@ -997,13 +997,13 @@ Please consult the handbook to learn more about the syntax.</string>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32767</height>
@@ -1023,7 +1023,7 @@ Please consult the handbook to learn more about the syntax.</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>41</height>
@@ -1035,7 +1035,7 @@ Please consult the handbook to learn more about the syntax.</string>
</widget>
</grid>
</widget>
- <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>chkConfirmExecution</cstring>
</property>
@@ -1046,7 +1046,7 @@ Please consult the handbook to learn more about the syntax.</string>
<string>Allows to tweak the &lt;i&gt;Command&lt;/i&gt; before it is executed.</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0">
+ <widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>chkDifferentUser</cstring>
</property>
@@ -1078,7 +1078,7 @@ Please consult the handbook to learn more about the syntax.</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>161</width>
<height>102</height>
@@ -1104,7 +1104,7 @@ Please consult the handbook to learn more about the syntax.</string>
<slot>setEnabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/krusader/ActionMan/addplaceholderpopup.cpp b/krusader/ActionMan/addplaceholderpopup.cpp
index 1dc2ef1..f7eb251 100644
--- a/krusader/ActionMan/addplaceholderpopup.cpp
+++ b/krusader/ActionMan/addplaceholderpopup.cpp
@@ -23,12 +23,12 @@
#include "../BookMan/krbookmarkbutton.h"
#include "../GUI/profilemanager.h"
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
#include <klineedit.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kiconloader.h>
#include <kcombobox.h>
#include <kurlcompletion.h>
@@ -44,7 +44,7 @@
#define EXECUTABLE_ID 0xFFFF
-AddPlaceholderPopup::AddPlaceholderPopup( QWidget *parent ) : KPopupMenu( parent ) {
+AddPlaceholderPopup::AddPlaceholderPopup( TQWidget *tqparent ) : KPopupMenu( tqparent ) {
_activeSub = new KPopupMenu( this );
_otherSub = new KPopupMenu( this );
@@ -88,16 +88,16 @@ AddPlaceholderPopup::AddPlaceholderPopup( QWidget *parent ) : KPopupMenu( parent
}
-QString AddPlaceholderPopup::getPlaceholder( const QPoint& pos ) {
+TQString AddPlaceholderPopup::getPlaceholder( const TQPoint& pos ) {
int res = exec( pos );
if ( res == -1 )
- return QString::null;
+ return TQString();
// add the selected flag to the command line
if ( res == EXECUTABLE_ID ) { // did the user need an executable ?
// select an executable
- QString filename = KFileDialog::getOpenFileName(QString::null, QString::null, this);
- if (filename != QString::null)
+ TQString filename = KFileDialog::getOpenFileName(TQString(), TQString(), this);
+ if (filename != TQString())
return filename + " "; // with extra space
//return filename; // without extra space
} else { // user selected something from the menus
@@ -105,10 +105,10 @@ QString AddPlaceholderPopup::getPlaceholder( const QPoint& pos ) {
const exp_placeholder* currentPlaceholder = expander.placeholder( res & ~( ACTIVE_MASK | OTHER_MASK | LEFT_MASK | RIGHT_MASK | INDEPENDENT_MASK ) );
// if ( &currentPlaceholder->expFunc == 0 ) {
// KMessageBox::sorry( this, "BOFH Excuse #93:\nFeature not yet implemented" );
-// return QString::null;
+// return TQString();
// }
ParameterDialog* parameterDialog = new ParameterDialog( currentPlaceholder, this );
- QString panel, parameter = parameterDialog->getParameter();
+ TQString panel, parameter = parameterDialog->getParameter();
delete parameterDialog;
// indicate the panel with 'a' 'o', 'l', 'r' or '_'.
if ( res & ACTIVE_MASK )
@@ -124,7 +124,7 @@ QString AddPlaceholderPopup::getPlaceholder( const QPoint& pos ) {
//return "%" + panel + currentPlaceholder->expression() + parameter + "% "; // with extra space
return "%" + panel + currentPlaceholder->expression() + parameter + "%"; // without extra space
}
- return QString::null;
+ return TQString();
}
@@ -132,15 +132,15 @@ QString AddPlaceholderPopup::getPlaceholder( const QPoint& pos ) {
/////////////////////////////// ParameterDialog ////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
-ParameterDialog::ParameterDialog( const exp_placeholder* currentPlaceholder, QWidget *parent ) : KDialogBase( Plain, i18n("User Action Parameter Dialog"), Default | Ok, Ok, parent ) {
+ParameterDialog::ParameterDialog( const exp_placeholder* currentPlaceholder, TQWidget *tqparent ) : KDialogBase( Plain, i18n("User Action Parameter Dialog"), Default | Ok, Ok, tqparent ) {
_parameter.clear();
_parameterCount = currentPlaceholder->parameterCount();
- QVBoxLayout* layout = new QVBoxLayout( plainPage() );
- layout->setAutoAdd( true );
- layout->setSpacing( 11 );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( plainPage() );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 11 );
- new QLabel( i18n("This placeholder allows some parameter:"), plainPage(), "intro" );
+ new TQLabel( i18n("This placeholder allows some parameter:"), plainPage(), "intro" );
for (int i = 0; i < _parameterCount; ++i ) {
if ( currentPlaceholder->parameter( i ).preset() == "__placeholder" )
@@ -151,7 +151,7 @@ ParameterDialog::ParameterDialog( const exp_placeholder* currentPlaceholder, QWi
_parameter.append( new ParameterNo( currentPlaceholder->parameter( i ), plainPage() ) );
else if ( currentPlaceholder->parameter( i ).preset() == "__file" )
_parameter.append( new ParameterFile( currentPlaceholder->parameter( i ), plainPage() ) );
- else if ( currentPlaceholder->parameter( i ).preset().find( "__choose" ) != -1 )
+ else if ( currentPlaceholder->parameter( i ).preset().tqfind( "__choose" ) != -1 )
_parameter.append( new ParameterChoose( currentPlaceholder->parameter( i ), plainPage() ) );
else if ( currentPlaceholder->parameter( i ).preset() == "__select" )
_parameter.append( new ParameterSelect( currentPlaceholder->parameter( i ), plainPage() ) );
@@ -163,25 +163,25 @@ ParameterDialog::ParameterDialog( const exp_placeholder* currentPlaceholder, QWi
_parameter.append( new ParameterSearch( currentPlaceholder->parameter( i ), plainPage() ) );
else if ( currentPlaceholder->parameter( i ).preset() == "__panelprofile" )
_parameter.append( new ParameterPanelprofile( currentPlaceholder->parameter( i ), plainPage() ) );
- else if ( currentPlaceholder->parameter( i ).preset().find( "__int" ) != -1 )
+ else if ( currentPlaceholder->parameter( i ).preset().tqfind( "__int" ) != -1 )
_parameter.append( new ParameterInt( currentPlaceholder->parameter( i ), plainPage() ) );
else
_parameter.append( new ParameterText( currentPlaceholder->parameter( i ), plainPage() ) );
}
- QFrame * line = new QFrame( plainPage() );
- line->setFrameShape( QFrame::HLine );
- line->setFrameShadow( QFrame::Sunken );
+ TQFrame * line = new TQFrame( plainPage() );
+ line->setFrameShape( TQFrame::HLine );
+ line->setFrameShadow( TQFrame::Sunken );
- connect( this, SIGNAL(defaultClicked()), this, SLOT(reset()) );
+ connect( this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(reset()) );
}
-QString ParameterDialog::getParameter() {
+TQString ParameterDialog::getParameter() {
if ( _parameterCount == 0 ) // meaning no parameters
- return QString::null;
+ return TQString();
if ( exec() == -1 )
- return QString::null;
+ return TQString();
int lastParameter = _parameterCount;
while ( --lastParameter > -1 ) {
@@ -190,13 +190,13 @@ QString ParameterDialog::getParameter() {
}
if ( lastParameter < 0) // all parameters have default-values
- return QString::null;
+ return TQString();
- QString parameter = "(";
+ TQString parameter = "(";
for ( int i = 0; i <= lastParameter; ++i ) {
if ( i > 0 )
parameter += ", ";
- parameter += "\"" + _parameter[ i ]->text().replace( "\"", "\\\"" ) + "\"";
+ parameter += "\"" + _parameter[ i ]->text().tqreplace( "\"", "\\\"" ) + "\"";
}
parameter += ")";
return parameter;
@@ -219,20 +219,20 @@ void ParameterDialog::slotOk() {
}
///////////// ParameterText
-ParameterText::ParameterText( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) {
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setAutoAdd( true );
- layout->setSpacing( 6 );
+ParameterText::ParameterText( const exp_parameter& parameter, TQWidget* tqparent ) : ParameterBase( parameter, tqparent ) {
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 6 );
- new QLabel( i18n( parameter.description().utf8() ), this );
+ new TQLabel( i18n( parameter.description().utf8() ), this );
_lineEdit = new KLineEdit( parameter.preset(), this );
_preset = parameter.preset();
}
-QString ParameterText::text() {
+TQString ParameterText::text() {
return _lineEdit->text();
}
-QString ParameterText::preset() {
+TQString ParameterText::preset() {
return _preset;
}
void ParameterText::reset() {
@@ -246,28 +246,28 @@ bool ParameterText::valid() {
}
///////////// ParameterPlaceholder
-ParameterPlaceholder::ParameterPlaceholder( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) {
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setAutoAdd( true );
- layout->setSpacing( 6 );
+ParameterPlaceholder::ParameterPlaceholder( const exp_parameter& parameter, TQWidget* tqparent ) : ParameterBase( parameter, tqparent ) {
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 6 );
- new QLabel( i18n( parameter.description().utf8() ), this );
- QHBox * hbox = new QHBox( this );
+ new TQLabel( i18n( parameter.description().utf8() ), this );
+ TQHBox * hbox = new TQHBox( this );
hbox->setSpacing( 6 );
_lineEdit = new KLineEdit( hbox );
- _button = new QToolButton( hbox);
+ _button = new TQToolButton( hbox);
_button->setText( i18n("add") );
- connect( _button, SIGNAL(clicked()), this, SLOT(addPlaceholder()) );
+ connect( _button, TQT_SIGNAL(clicked()), this, TQT_SLOT(addPlaceholder()) );
}
-QString ParameterPlaceholder::text() {
+TQString ParameterPlaceholder::text() {
return _lineEdit->text();
}
-QString ParameterPlaceholder::preset() {
- return QString::null;
+TQString ParameterPlaceholder::preset() {
+ return TQString();
}
void ParameterPlaceholder::reset() {
- _lineEdit->setText( QString::null );
+ _lineEdit->setText( TQString() );
}
bool ParameterPlaceholder::valid() {
if ( _lineEdit->text().isEmpty() )
@@ -277,29 +277,29 @@ bool ParameterPlaceholder::valid() {
}
void ParameterPlaceholder::addPlaceholder() {
AddPlaceholderPopup* popup = new AddPlaceholderPopup( this );
- QString exp = popup->getPlaceholder( mapToGlobal( QPoint( _button->pos().x() + _button->width() + 6, _button->pos().y() + _button->height() / 2 ) ) );
+ TQString exp = popup->getPlaceholder( mapToGlobal( TQPoint( _button->pos().x() + _button->width() + 6, _button->pos().y() + _button->height() / 2 ) ) );
_lineEdit->insert( exp );
delete popup;
}
///////////// ParameterYes
-ParameterYes::ParameterYes( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) {
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setAutoAdd( true );
- layout->setSpacing( 6 );
+ParameterYes::ParameterYes( const exp_parameter& parameter, TQWidget* tqparent ) : ParameterBase( parameter, tqparent ) {
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 6 );
- _checkBox = new QCheckBox( i18n( parameter.description().utf8() ), this );
+ _checkBox = new TQCheckBox( i18n( parameter.description().utf8() ), this );
_checkBox->setChecked( true );
}
-QString ParameterYes::text() {
+TQString ParameterYes::text() {
if ( _checkBox->isChecked() )
- return QString::null;
+ return TQString();
else
return "No";
}
-QString ParameterYes::preset() {
- return QString::null;
+TQString ParameterYes::preset() {
+ return TQString();
}
void ParameterYes::reset() {
_checkBox->setChecked( true );
@@ -309,23 +309,23 @@ bool ParameterYes::valid() {
}
///////////// ParameterNo
-ParameterNo::ParameterNo( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) {
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setAutoAdd( true );
- layout->setSpacing( 6 );
+ParameterNo::ParameterNo( const exp_parameter& parameter, TQWidget* tqparent ) : ParameterBase( parameter, tqparent ) {
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 6 );
- _checkBox = new QCheckBox( i18n( parameter.description().utf8() ), this );
+ _checkBox = new TQCheckBox( i18n( parameter.description().utf8() ), this );
_checkBox->setChecked( false );
}
-QString ParameterNo::text() {
+TQString ParameterNo::text() {
if ( _checkBox->isChecked() )
return "Yes";
else
- return QString::null;
+ return TQString();
}
-QString ParameterNo::preset() {
- return QString::null;
+TQString ParameterNo::preset() {
+ return TQString();
}
void ParameterNo::reset() {
_checkBox->setChecked( false );
@@ -335,29 +335,29 @@ bool ParameterNo::valid() {
}
///////////// ParameterFile
-ParameterFile::ParameterFile( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) {
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setAutoAdd( true );
- layout->setSpacing( 6 );
+ParameterFile::ParameterFile( const exp_parameter& parameter, TQWidget* tqparent ) : ParameterBase( parameter, tqparent ) {
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 6 );
- new QLabel( i18n( parameter.description().utf8() ), this );
- QHBox * hbox = new QHBox( this );
+ new TQLabel( i18n( parameter.description().utf8() ), this );
+ TQHBox * hbox = new TQHBox( this );
hbox->setSpacing( 6 );
_lineEdit = new KLineEdit( hbox );
- _button = new QToolButton( hbox);
+ _button = new TQToolButton( hbox);
KIconLoader *iconLoader = new KIconLoader();
_button->setPixmap( iconLoader->loadIcon( "fileopen", KIcon::Toolbar, 16 ) );
- connect( _button, SIGNAL(clicked()), this, SLOT(addFile()) );
+ connect( _button, TQT_SIGNAL(clicked()), this, TQT_SLOT(addFile()) );
}
-QString ParameterFile::text() {
+TQString ParameterFile::text() {
return _lineEdit->text();
}
-QString ParameterFile::preset() {
- return QString::null;
+TQString ParameterFile::preset() {
+ return TQString();
}
void ParameterFile::reset() {
- _lineEdit->setText( QString::null );
+ _lineEdit->setText( TQString() );
}
bool ParameterFile::valid() {
if ( _lineEdit->text().isEmpty() )
@@ -366,25 +366,25 @@ bool ParameterFile::valid() {
return true;
}
void ParameterFile::addFile() {
- QString filename = KFileDialog::getOpenFileName(QString::null, QString::null, this);
+ TQString filename = KFileDialog::getOpenFileName(TQString(), TQString(), this);
_lineEdit->insert( filename );
}
///////////// ParameterChoose
-ParameterChoose::ParameterChoose( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) {
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setAutoAdd( true );
- layout->setSpacing( 6 );
+ParameterChoose::ParameterChoose( const exp_parameter& parameter, TQWidget* tqparent ) : ParameterBase( parameter, tqparent ) {
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 6 );
- new QLabel( i18n( parameter.description().utf8() ), this );
+ new TQLabel( i18n( parameter.description().utf8() ), this );
_combobox = new KComboBox( this );
- _combobox->insertStringList( QStringList::split( ";", parameter.preset().section(":", 1) ) );
+ _combobox->insertStringList( TQStringList::split( ";", parameter.preset().section(":", 1) ) );
}
-QString ParameterChoose::text() {
+TQString ParameterChoose::text() {
return _combobox->currentText();
}
-QString ParameterChoose::preset() {
+TQString ParameterChoose::preset() {
return _combobox->text( 0 );
}
void ParameterChoose::reset() {
@@ -395,17 +395,17 @@ bool ParameterChoose::valid() {
}
///////////// ParameterSelect
-ParameterSelect::ParameterSelect( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) {
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setAutoAdd( true );
- layout->setSpacing( 6 );
+ParameterSelect::ParameterSelect( const exp_parameter& parameter, TQWidget* tqparent ) : ParameterBase( parameter, tqparent ) {
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 6 );
- new QLabel( i18n( parameter.description().utf8() ), this );
+ new TQLabel( i18n( parameter.description().utf8() ), this );
_combobox = new KComboBox( this );
_combobox->setEditable( true );
krConfig->setGroup( "Private" );
- QStrList lst;
+ TQStrList lst;
int i = krConfig->readListEntry( "Predefined Selections", lst );
if ( i > 0 )
_combobox->insertStrList( lst );
@@ -413,10 +413,10 @@ ParameterSelect::ParameterSelect( const exp_parameter& parameter, QWidget* paren
_combobox->setCurrentText( "*" );
}
-QString ParameterSelect::text() {
+TQString ParameterSelect::text() {
return _combobox->currentText();
}
-QString ParameterSelect::preset() {
+TQString ParameterSelect::preset() {
return "*";
}
void ParameterSelect::reset() {
@@ -427,33 +427,33 @@ bool ParameterSelect::valid() {
}
///////////// ParameterGoto
-ParameterGoto::ParameterGoto( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) {
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setAutoAdd( true );
- layout->setSpacing( 6 );
+ParameterGoto::ParameterGoto( const exp_parameter& parameter, TQWidget* tqparent ) : ParameterBase( parameter, tqparent ) {
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 6 );
- new QLabel( i18n( parameter.description().utf8() ), this );
- QHBox * hbox = new QHBox( this );
+ new TQLabel( i18n( parameter.description().utf8() ), this );
+ TQHBox * hbox = new TQHBox( this );
hbox->setSpacing( 6 );
_lineEdit = new KLineEdit( hbox );
_lineEdit->setCompletionObject( new KURLCompletion( KURLCompletion::DirCompletion ) );
- _dirButton = new QToolButton( hbox );
+ _dirButton = new TQToolButton( hbox );
KIconLoader *iconLoader = new KIconLoader();
_dirButton->setPixmap( iconLoader->loadIcon( "fileopen", KIcon::Toolbar, 16 ) );
- connect( _dirButton, SIGNAL(clicked()), this, SLOT(setDir()) );
- _placeholderButton = new QToolButton( hbox);
+ connect( _dirButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(setDir()) );
+ _placeholderButton = new TQToolButton( hbox);
_placeholderButton->setText( i18n("add") );
- connect( _placeholderButton, SIGNAL(clicked()), this, SLOT(addPlaceholder()) );
+ connect( _placeholderButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(addPlaceholder()) );
}
-QString ParameterGoto::text() {
+TQString ParameterGoto::text() {
return _lineEdit->text();
}
-QString ParameterGoto::preset() {
- return QString::null;
+TQString ParameterGoto::preset() {
+ return TQString();
}
void ParameterGoto::reset() {
- _lineEdit->setText( QString::null );
+ _lineEdit->setText( TQString() );
}
bool ParameterGoto::valid() {
if ( _lineEdit->text().isEmpty() )
@@ -462,32 +462,32 @@ bool ParameterGoto::valid() {
return true;
}
void ParameterGoto::setDir() {
- QString folder = KFileDialog::getExistingDirectory(QString::null, this);
+ TQString folder = KFileDialog::getExistingDirectory(TQString(), this);
_lineEdit->setText( folder );
}
void ParameterGoto::addPlaceholder() {
AddPlaceholderPopup* popup = new AddPlaceholderPopup( this );
- QString exp = popup->getPlaceholder( mapToGlobal( QPoint( _placeholderButton->pos().x() + _placeholderButton->width() + 6, _placeholderButton->pos().y() + _placeholderButton->height() / 2 ) ) );
+ TQString exp = popup->getPlaceholder( mapToGlobal( TQPoint( _placeholderButton->pos().x() + _placeholderButton->width() + 6, _placeholderButton->pos().y() + _placeholderButton->height() / 2 ) ) );
_lineEdit->insert( exp );
delete popup;
}
///////////// ParameterSyncprofile
-ParameterSyncprofile::ParameterSyncprofile( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) {
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setAutoAdd( true );
- layout->setSpacing( 6 );
+ParameterSyncprofile::ParameterSyncprofile( const exp_parameter& parameter, TQWidget* tqparent ) : ParameterBase( parameter, tqparent ) {
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 6 );
- new QLabel( i18n( parameter.description().utf8() ), this );
+ new TQLabel( i18n( parameter.description().utf8() ), this );
_combobox = new KComboBox( this );
_combobox->insertStringList( ProfileManager::availableProfiles("SynchronizerProfile") );
}
-QString ParameterSyncprofile::text() {
+TQString ParameterSyncprofile::text() {
return _combobox->currentText();
}
-QString ParameterSyncprofile::preset() {
+TQString ParameterSyncprofile::preset() {
return _combobox->text( 0 );
}
void ParameterSyncprofile::reset() {
@@ -498,21 +498,21 @@ bool ParameterSyncprofile::valid() {
}
///////////// ParameterSearch
-ParameterSearch::ParameterSearch( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) {
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setAutoAdd( true );
- layout->setSpacing( 6 );
+ParameterSearch::ParameterSearch( const exp_parameter& parameter, TQWidget* tqparent ) : ParameterBase( parameter, tqparent ) {
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 6 );
- new QLabel( i18n( parameter.description().utf8() ), this );
+ new TQLabel( i18n( parameter.description().utf8() ), this );
_combobox = new KComboBox( this );
_combobox->insertStringList( ProfileManager::availableProfiles("SearcherProfile") );
}
-QString ParameterSearch::text() {
+TQString ParameterSearch::text() {
return _combobox->currentText();
}
-QString ParameterSearch::preset() {
+TQString ParameterSearch::preset() {
return _combobox->text( 0 );
}
void ParameterSearch::reset() {
@@ -523,21 +523,21 @@ bool ParameterSearch::valid() {
}
///////////// ParameterPanelprofile
-ParameterPanelprofile::ParameterPanelprofile( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) {
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setAutoAdd( true );
- layout->setSpacing( 6 );
+ParameterPanelprofile::ParameterPanelprofile( const exp_parameter& parameter, TQWidget* tqparent ) : ParameterBase( parameter, tqparent ) {
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 6 );
- new QLabel( i18n( parameter.description().utf8() ), this );
+ new TQLabel( i18n( parameter.description().utf8() ), this );
_combobox = new KComboBox( this );
_combobox->insertStringList( ProfileManager::availableProfiles("Panel") );
}
-QString ParameterPanelprofile::text() {
+TQString ParameterPanelprofile::text() {
return _combobox->currentText();
}
-QString ParameterPanelprofile::preset() {
+TQString ParameterPanelprofile::preset() {
return _combobox->text( 0 );
}
void ParameterPanelprofile::reset() {
@@ -548,14 +548,14 @@ bool ParameterPanelprofile::valid() {
}
///////////// ParameterInt
-ParameterInt::ParameterInt( const exp_parameter& parameter, QWidget* parent ) : ParameterBase( parameter, parent ) {
- QHBoxLayout* layout = new QHBoxLayout( this );
- layout->setAutoAdd( true );
- layout->setSpacing( 6 );
+ParameterInt::ParameterInt( const exp_parameter& parameter, TQWidget* tqparent ) : ParameterBase( parameter, tqparent ) {
+ TQHBoxLayout* tqlayout = new TQHBoxLayout( this );
+ tqlayout->setAutoAdd( true );
+ tqlayout->setSpacing( 6 );
- new QLabel( i18n( parameter.description().utf8() ), this );
+ new TQLabel( i18n( parameter.description().utf8() ), this );
_spinbox = new KIntSpinBox( this );
- QStringList para = QStringList::split( ";", parameter.preset().section(":", 1) );
+ TQStringList para = TQStringList::split( ";", parameter.preset().section(":", 1) );
_spinbox->setMinValue( para[0].toInt() );
_spinbox->setMaxValue( para[1].toInt() );
@@ -565,11 +565,11 @@ ParameterInt::ParameterInt( const exp_parameter& parameter, QWidget* parent ) :
_default = _spinbox->value();
}
-QString ParameterInt::text() {
+TQString ParameterInt::text() {
return _spinbox->text();
}
-QString ParameterInt::preset() {
- return QString( "%1" ).arg( _default );
+TQString ParameterInt::preset() {
+ return TQString( "%1" ).tqarg( _default );
}
void ParameterInt::reset() {
return _spinbox->setValue( _default );
diff --git a/krusader/ActionMan/addplaceholderpopup.h b/krusader/ActionMan/addplaceholderpopup.h
index 285d6a4..5120294 100644
--- a/krusader/ActionMan/addplaceholderpopup.h
+++ b/krusader/ActionMan/addplaceholderpopup.h
@@ -17,10 +17,10 @@
#include <kdialogbase.h>
#include "../UserAction/expander.h"
-class QString;
+class TQString;
class KLineEdit;
-class QToolButton;
-class QCheckBox;
+class TQToolButton;
+class TQCheckBox;
class KComboBox;
class KrBookmarkButton;
class KURL;
@@ -34,14 +34,14 @@ class KIntSpinBox;
class AddPlaceholderPopup : public KPopupMenu {
public:
- AddPlaceholderPopup( QWidget *parent );
+ AddPlaceholderPopup( TQWidget *tqparent );
/**
* Use this to exec the popup.
* @param pos Position where the popup should appear
* @return the expression which can be placed in the UserAction commandline
*/
- QString getPlaceholder( const QPoint& pos );
+ TQString getPlaceholder( const TQPoint& pos );
protected:
/**
@@ -49,7 +49,7 @@ protected:
* @param currentPlaceholder A pointer to the Placeholder the user has choosen
* @return a parameter-string
*/
- QString getParameter( exp_placeholder* currentPlaceholder );
+ TQString getParameter( exp_placeholder* currentPlaceholder );
private:
KPopupMenu *_activeSub, *_otherSub, *_leftSub, *_rightSub, *_independentSub;
@@ -64,17 +64,17 @@ private:
* abstract baseclass for all Parameter widgets
* @author Jonas Bähr (http://www.jonas-baehr.de)
*/
-class ParameterBase : public QWidget {
+class ParameterBase : public TQWidget {
public:
- inline ParameterBase( const exp_parameter& parameter, QWidget* parent ) : QWidget( parent ) { _nessesary = parameter.nessesary(); }
+ inline ParameterBase( const exp_parameter& parameter, TQWidget* tqparent ) : TQWidget( tqparent ) { _nessesary = parameter.nessesary(); }
/**
* @return the text for the parameter
*/
- virtual QString text() = 0;
+ virtual TQString text() = 0;
/**
* @return the default of the parameter
*/
- virtual QString preset() = 0;
+ virtual TQString preset() = 0;
/**
* re-init the parameter with the default
*/
@@ -97,14 +97,14 @@ private:
*/
class ParameterText : public ParameterBase {
public:
- ParameterText( const exp_parameter& parameter, QWidget* parent );
- QString text();
- QString preset();
+ ParameterText( const exp_parameter& parameter, TQWidget* tqparent );
+ TQString text();
+ TQString preset();
void reset();
bool valid();
private:
KLineEdit * _lineEdit;
- QString _preset;
+ TQString _preset;
};
/**
@@ -113,15 +113,16 @@ private:
*/
class ParameterPlaceholder : public ParameterBase {
Q_OBJECT
+ TQ_OBJECT
public:
- ParameterPlaceholder( const exp_parameter& parameter, QWidget* parent );
- QString text();
- QString preset();
+ ParameterPlaceholder( const exp_parameter& parameter, TQWidget* tqparent );
+ TQString text();
+ TQString preset();
void reset();
bool valid();
private:
KLineEdit * _lineEdit;
- QToolButton* _button;
+ TQToolButton* _button;
private slots:
void addPlaceholder();
};
@@ -132,13 +133,13 @@ private slots:
*/
class ParameterYes : public ParameterBase {
public:
- ParameterYes( const exp_parameter& parameter, QWidget* parent );
- QString text();
- QString preset();
+ ParameterYes( const exp_parameter& parameter, TQWidget* tqparent );
+ TQString text();
+ TQString preset();
void reset();
bool valid();
private:
- QCheckBox* _checkBox;
+ TQCheckBox* _checkBox;
};
/**
@@ -147,13 +148,13 @@ private:
*/
class ParameterNo : public ParameterBase {
public:
- ParameterNo( const exp_parameter& parameter, QWidget* parent );
- QString text();
- QString preset();
+ ParameterNo( const exp_parameter& parameter, TQWidget* tqparent );
+ TQString text();
+ TQString preset();
void reset();
bool valid();
private:
- QCheckBox* _checkBox;
+ TQCheckBox* _checkBox;
};
/**
@@ -162,15 +163,16 @@ private:
*/
class ParameterFile : public ParameterBase {
Q_OBJECT
+ TQ_OBJECT
public:
- ParameterFile( const exp_parameter& parameter, QWidget* parent );
- QString text();
- QString preset();
+ ParameterFile( const exp_parameter& parameter, TQWidget* tqparent );
+ TQString text();
+ TQString preset();
void reset();
bool valid();
private:
KLineEdit * _lineEdit;
- QToolButton* _button;
+ TQToolButton* _button;
private slots:
void addFile();
};
@@ -181,9 +183,9 @@ private slots:
*/
class ParameterChoose : public ParameterBase {
public:
- ParameterChoose( const exp_parameter& parameter, QWidget* parent );
- QString text();
- QString preset();
+ ParameterChoose( const exp_parameter& parameter, TQWidget* tqparent );
+ TQString text();
+ TQString preset();
void reset();
bool valid();
private:
@@ -196,9 +198,9 @@ private:
*/
class ParameterSelect : public ParameterBase {
public:
- ParameterSelect( const exp_parameter& parameter, QWidget* parent );
- QString text();
- QString preset();
+ ParameterSelect( const exp_parameter& parameter, TQWidget* tqparent );
+ TQString text();
+ TQString preset();
void reset();
bool valid();
private:
@@ -211,15 +213,16 @@ private:
*/
class ParameterGoto : public ParameterBase {
Q_OBJECT
+ TQ_OBJECT
public:
- ParameterGoto( const exp_parameter& parameter, QWidget* parent );
- QString text();
- QString preset();
+ ParameterGoto( const exp_parameter& parameter, TQWidget* tqparent );
+ TQString text();
+ TQString preset();
void reset();
bool valid();
private:
KLineEdit * _lineEdit;
- QToolButton* _dirButton, *_placeholderButton;
+ TQToolButton* _dirButton, *_placeholderButton;
private slots:
void setDir();
void addPlaceholder();
@@ -231,9 +234,9 @@ private slots:
*/
class ParameterSyncprofile : public ParameterBase {
public:
- ParameterSyncprofile( const exp_parameter& parameter, QWidget* parent );
- QString text();
- QString preset();
+ ParameterSyncprofile( const exp_parameter& parameter, TQWidget* tqparent );
+ TQString text();
+ TQString preset();
void reset();
bool valid();
private:
@@ -246,9 +249,9 @@ private:
*/
class ParameterPanelprofile : public ParameterBase {
public:
- ParameterPanelprofile( const exp_parameter& parameter, QWidget* parent );
- QString text();
- QString preset();
+ ParameterPanelprofile( const exp_parameter& parameter, TQWidget* tqparent );
+ TQString text();
+ TQString preset();
void reset();
bool valid();
private:
@@ -261,9 +264,9 @@ private:
*/
class ParameterSearch : public ParameterBase {
public:
- ParameterSearch( const exp_parameter& parameter, QWidget* parent );
- QString text();
- QString preset();
+ ParameterSearch( const exp_parameter& parameter, TQWidget* tqparent );
+ TQString text();
+ TQString preset();
void reset();
bool valid();
private:
@@ -276,9 +279,9 @@ private:
*/
class ParameterInt : public ParameterBase {
public:
- ParameterInt( const exp_parameter& parameter, QWidget* parent );
- QString text();
- QString preset();
+ ParameterInt( const exp_parameter& parameter, TQWidget* tqparent );
+ TQString text();
+ TQString preset();
void reset();
bool valid();
private:
@@ -296,17 +299,18 @@ private:
*/
class ParameterDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- ParameterDialog( const exp_placeholder* currentPlaceholder, QWidget *parent );
+ ParameterDialog( const exp_placeholder* currentPlaceholder, TQWidget *tqparent );
/**
* Use this to execute the dialog.
- * @return a QString with all paremeters; ommiting the optional ones if they have the default-value.
+ * @return a TQString with all paremeters; ommiting the optional ones if they have the default-value.
*/
- QString getParameter();
+ TQString getParameter();
private:
- typedef QValueList<ParameterBase*> ParameterList;
+ typedef TQValueList<ParameterBase*> ParameterList;
ParameterList _parameter;
int _parameterCount;
private slots:
diff --git a/krusader/ActionMan/useractionlistview.cpp b/krusader/ActionMan/useractionlistview.cpp
index 0534027..a0366d9 100644
--- a/krusader/ActionMan/useractionlistview.cpp
+++ b/krusader/ActionMan/useractionlistview.cpp
@@ -13,8 +13,8 @@
#include <klocale.h>
#include <kiconloader.h>
-#include <qptrlist.h>
-#include <qdom.h>
+#include <tqptrlist.h>
+#include <tqdom.h>
#include "../krusader.h"
#include "../UserAction/kraction.h"
@@ -28,15 +28,15 @@
///////////////////////////// UserActionListView /////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
-UserActionListView::UserActionListView( QWidget * parent, const char * name )
- : KListView( parent, name )
+UserActionListView::UserActionListView( TQWidget * tqparent, const char * name )
+ : KListView( tqparent, name )
{
addColumn( i18n("Title") );
//addColumn( i18n("Identifier") );
- setResizeMode( QListView::AllColumns );
+ setResizeMode( TQListView::AllColumns );
setRootIsDecorated( true );
- setSelectionMode( QListView::Extended ); // normaly select single items but one may use Ctrl or Shift to select multiple
+ setSelectionMode( TQListView::Extended ); // normaly select single items but one may use Ctrl or Shift to select multiple
setSorting( COL_TITLE );
update();
@@ -46,8 +46,8 @@ UserActionListView::~UserActionListView()
{
}
-QSize UserActionListView::sizeHint() const {
- return QSize(200, 400);
+TQSize UserActionListView::tqsizeHint() const {
+ return TQSize(200, 400);
}
@@ -83,7 +83,7 @@ UserActionListViewItem* UserActionListView::insertAction( KrAction* action ) {
if ( action->category().isEmpty() )
item = new UserActionListViewItem( this, action );
else {
- QListViewItem* categoryItem = findCategoryItem( action->category() );
+ TQListViewItem* categoryItem = findCategoryItem( action->category() );
if ( ! categoryItem ) {
categoryItem = new KListViewItem( this, action->category() ); // create the new category item it not already present
categoryItem->setSelectable( false );
@@ -95,8 +95,8 @@ UserActionListViewItem* UserActionListView::insertAction( KrAction* action ) {
return item;
}
-QListViewItem* UserActionListView::findCategoryItem( const QString& category ) {
- for ( QListViewItem* item = firstChild(); item; item = item->nextSibling() )
+TQListViewItem* UserActionListView::findCategoryItem( const TQString& category ) {
+ for ( TQListViewItem* item = firstChild(); item; item = item->nextSibling() )
if ( item->text( COL_TITLE ) == category && item->text( COL_NAME ).isEmpty() ) // because actions must have a name, items without name haveto be categories
return item;
@@ -104,7 +104,7 @@ QListViewItem* UserActionListView::findCategoryItem( const QString& category ) {
}
UserActionListViewItem* UserActionListView::findActionItem( const KrAction* action ) {
- for ( QListViewItemIterator it( this ); it.current(); ++it ) {
+ for ( TQListViewItemIterator it( this ); it.current(); ++it ) {
if ( UserActionListViewItem* item = dynamic_cast<UserActionListViewItem*>( it.current() ) ) {
if ( item->action() == action )
return item;
@@ -125,12 +125,12 @@ void UserActionListView::setCurrentAction( const KrAction* action) {
if ( item ) {
setCurrentItem( item );
// setSelected( item, true );
-// repaintItem( item );
+// tqrepaintItem( item );
}
}
void UserActionListView::setFirstActionCurrent() {
- for ( QListViewItemIterator it( this ); it.current(); ++it ) {
+ for ( TQListViewItemIterator it( this ); it.current(); ++it ) {
if ( UserActionListViewItem* item = dynamic_cast<UserActionListViewItem*>( it.current() ) ) {
setCurrentItem( item );
break;
@@ -138,23 +138,23 @@ void UserActionListView::setFirstActionCurrent() {
} //for
}
-void UserActionListView::setCurrentItem( QListViewItem* item ) {
+void UserActionListView::setCurrentItem( TQListViewItem* item ) {
if ( ! item )
return;
ensureItemVisible( item );
- QListView::setCurrentItem( item );
+ TQListView::setCurrentItem( item );
}
-QDomDocument UserActionListView::dumpSelectedActions( QDomDocument* mergeDoc ) const {
- QPtrList<QListViewItem> list = selectedItems();
- QDomDocument doc;
+TQDomDocument UserActionListView::dumpSelectedActions( TQDomDocument* mergeDoc ) const {
+ TQPtrList<TQListViewItem> list = selectedItems();
+ TQDomDocument doc;
if ( mergeDoc )
doc = *mergeDoc;
else
doc = UserAction::createEmptyDoc();
- QDomElement root = doc.documentElement();
+ TQDomElement root = doc.documentElement();
- for ( QListViewItem* item = list.first(); item; item = list.next() )
+ for ( TQListViewItem* item = list.first(); item; item = list.next() )
if ( UserActionListViewItem* actionItem = dynamic_cast<UserActionListViewItem*>( item ) )
root.appendChild( actionItem->action()->xmlDump( doc ) );
@@ -162,9 +162,9 @@ QDomDocument UserActionListView::dumpSelectedActions( QDomDocument* mergeDoc ) c
}
void UserActionListView::removeSelectedActions() {
- QPtrList<QListViewItem> list = selectedItems();
+ TQPtrList<TQListViewItem> list = selectedItems();
- for ( QListViewItem* item = list.first(); item; item = list.next() )
+ for ( TQListViewItem* item = list.first(); item; item = list.next() )
if ( UserActionListViewItem* actionItem = dynamic_cast<UserActionListViewItem*>( item ) ) {
delete actionItem->action(); // remove the action itself
delete actionItem; // remove the action from the list
@@ -176,13 +176,13 @@ void UserActionListView::removeSelectedActions() {
//////////////////////////// UserActionListViewItem ////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
-UserActionListViewItem::UserActionListViewItem( QListView* view, KrAction* action )
+UserActionListViewItem::UserActionListViewItem( TQListView* view, KrAction* action )
: KListViewItem( view )
{
setAction( action );
}
-UserActionListViewItem::UserActionListViewItem( QListViewItem* item, KrAction * action )
+UserActionListViewItem::UserActionListViewItem( TQListViewItem* item, KrAction * action )
: KListViewItem( item )
{
setAction( action );
@@ -190,9 +190,9 @@ UserActionListViewItem::UserActionListViewItem( QListViewItem* item, KrAction *
UserActionListViewItem::~UserActionListViewItem() {
/* // remove category-item if the last member ofthiscategory disappears
- if ( QListViewItem* item = dynamic_cast<QListViewItem*>( parent() ) ) {
+ if ( TQListViewItem* item = dynamic_cast<TQListViewItem*>( tqparent() ) ) {
if ( item->childCount() <= 1 )
- item->deleteLater(); // not possible since not inherited from QObject
+ item->deleteLater(); // not possible since not inherited from TQObject
}*/
}
@@ -219,14 +219,14 @@ void UserActionListViewItem::update() {
setText( COL_NAME, _action->name() );
}
-int UserActionListViewItem::compare( QListViewItem* i, int col, bool ascending ) const {
+int UserActionListViewItem::compare( TQListViewItem* i, int col, bool ascending ) const {
// FIXME some how this only produces bullshit :-/
// if ( i->text( COL_NAME ).isEmpty() ) { // categories only have titles
// //kdDebug() << "this->title: " << text(COL_TITLE) << " |=| i->title: " << i->text(COL_TITLE) << endl;
// return ( ascending ? -1 : 1 ); // <0 means this is smaller then i
// }
// else
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
}
diff --git a/krusader/ActionMan/useractionlistview.h b/krusader/ActionMan/useractionlistview.h
index e0a57f6..924fb58 100644
--- a/krusader/ActionMan/useractionlistview.h
+++ b/krusader/ActionMan/useractionlistview.h
@@ -15,18 +15,18 @@
#include <klistview.h>
class KrAction;
-class QString;
+class TQString;
class UserActionListViewItem;
-class QDomDocument;
+class TQDomDocument;
/**
* @author Jonas Bähr
*/
class UserActionListView : public KListView {
public:
- UserActionListView( QWidget* parent = 0, const char* name = 0 );
+ UserActionListView( TQWidget* tqparent = 0, const char* name = 0 );
~UserActionListView();
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
void update();
void update( KrAction* action );
@@ -35,7 +35,7 @@ public:
KrAction* currentAction() const;
void setCurrentAction( const KrAction* );
- QDomDocument dumpSelectedActions( QDomDocument* mergeDoc = 0 ) const;
+ TQDomDocument dumpSelectedActions( TQDomDocument* mergeDoc = 0 ) const;
void removeSelectedActions();
@@ -47,10 +47,10 @@ public:
/**
* makes @e item current and ensures its visibility
*/
- virtual void setCurrentItem( QListViewItem* item );
+ virtual void setCurrentItem( TQListViewItem* item );
protected:
- QListViewItem* findCategoryItem( const QString& category );
+ TQListViewItem* findCategoryItem( const TQString& category );
UserActionListViewItem* findActionItem( const KrAction* action );
};
@@ -60,8 +60,8 @@ protected:
*/
class UserActionListViewItem : public KListViewItem {
public:
- UserActionListViewItem( QListView* view, KrAction* action );
- UserActionListViewItem( QListViewItem* item, KrAction* action );
+ UserActionListViewItem( TQListView* view, KrAction* action );
+ UserActionListViewItem( TQListViewItem* item, KrAction* action );
~UserActionListViewItem();
void setAction( KrAction* action );
@@ -71,7 +71,7 @@ public:
/**
* This reimplements qt's compare-function in order to have categories on the top of the list
*/
- int compare ( QListViewItem * i, int col, bool ascending ) const;
+ int compare ( TQListViewItem * i, int col, bool ascending ) const;
private:
KrAction* _action;
diff --git a/krusader/ActionMan/useractionpage.cpp b/krusader/ActionMan/useractionpage.cpp
index c4c91e7..95b38c4 100644
--- a/krusader/ActionMan/useractionpage.cpp
+++ b/krusader/ActionMan/useractionpage.cpp
@@ -11,10 +11,10 @@
//
#include "useractionpage.h"
-#include <qsplitter.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
#include <klineedit.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
@@ -34,43 +34,43 @@
static const char* FILE_FILTER = I18N_NOOP("*.xml|xml-files\n*|all files");
-UserActionPage::UserActionPage( QWidget* parent )
- : QWidget( parent, "UserActionPage" )
+UserActionPage::UserActionPage( TQWidget* tqparent )
+ : TQWidget( tqparent, "UserActionPage" )
{
- QVBoxLayout* layout = new QVBoxLayout( this, 0, 6, "UserActionPageLayout" ); // 0px margin, 6px item-spacing
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 0, 6, "UserActionPageLayout" ); // 0px margin, 6px item-spacing
// ======== pseudo-toolbar start ========
- QHBoxLayout* toolbarLayout = new QHBoxLayout( layout, 0, 0 ); // neither margin nor spacing for the toolbar with autoRaise
+ TQHBoxLayout* toolbarLayout = new TQHBoxLayout( tqlayout, 0, 0 ); // neither margin nor spacing for the toolbar with autoRaise
- newButton = new QToolButton( this, "newButton" );
+ newButton = new TQToolButton( this, "newButton" );
newButton->setPixmap( ICON("filenew") );
newButton->setAutoRaise(true);
- QToolTip::add( newButton, i18n("Create new useraction") );
+ TQToolTip::add( newButton, i18n("Create new useraction") );
- importButton = new QToolButton( this, "importButton" );
+ importButton = new TQToolButton( this, "importButton" );
importButton->setPixmap( ICON("fileimport") );
importButton->setAutoRaise(true);
- QToolTip::add( importButton, i18n("Import useractions") );
+ TQToolTip::add( importButton, i18n("Import useractions") );
- exportButton = new QToolButton( this, "exportButton" );
+ exportButton = new TQToolButton( this, "exportButton" );
exportButton->setPixmap( ICON("fileexport") );
exportButton->setAutoRaise(true);
- QToolTip::add( exportButton, i18n("Export useractions") );
+ TQToolTip::add( exportButton, i18n("Export useractions") );
- copyButton = new QToolButton( this, "copyButton" );
+ copyButton = new TQToolButton( this, "copyButton" );
copyButton->setPixmap( ICON("editcopy") );
copyButton->setAutoRaise(true);
- QToolTip::add( copyButton, i18n("Copy useractions to clipboard") );
+ TQToolTip::add( copyButton, i18n("Copy useractions to clipboard") );
- pasteButton = new QToolButton( this, "pasteButton" );
+ pasteButton = new TQToolButton( this, "pasteButton" );
pasteButton->setPixmap( ICON("editpaste") );
pasteButton->setAutoRaise(true);
- QToolTip::add( pasteButton, i18n("Paste useractions from clipboard") );
+ TQToolTip::add( pasteButton, i18n("Paste useractions from clipboard") );
- removeButton = new QToolButton( this, "removeButton" );
+ removeButton = new TQToolButton( this, "removeButton" );
removeButton->setPixmap( ICON("editdelete") );
removeButton->setAutoRaise(true);
- QToolTip::add( removeButton, i18n("Delete selected useractions") );
+ TQToolTip::add( removeButton, i18n("Delete selected useractions") );
toolbarLayout->addWidget( newButton );
toolbarLayout->addWidget( importButton );
@@ -83,32 +83,32 @@ UserActionPage::UserActionPage( QWidget* parent )
// ======== pseudo-toolbar end ========
/* This seems obsolete now!
// Display some help
- KMessageBox::information( this, // parent
+ KMessageBox::information( this, // tqparent
i18n( "When you apply changes to an action, the modifications "
"become available in the current session immediately.\n"
"When closing ActionMan, you will be asked to save the changes permanently."
),
- QString::null, // caption
+ TQString(), // caption
"show UserAction help" //dontShowAgainName for the config
);
*/
- QSplitter *split = new QSplitter( this, "useractionpage splitter");
- layout->addWidget( split, 1000 ); // again a very large stretch-factor to fix the height of the toolbar
+ TQSplitter *split = new TQSplitter( this, "useractionpage splitter");
+ tqlayout->addWidget( split, 1000 ); // again a very large stretch-factor to fix the height of the toolbar
actionTree = new UserActionListView( split, "actionTree" );
actionProperties = new ActionProperty( split, "actionProperties" );
actionProperties->setEnabled( false ); // if there are any actions in the list, the first is displayed and this widget is enabled
- connect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), SLOT( slotChangeCurrent() ) );
- connect( newButton, SIGNAL( clicked() ), SLOT( slotNewAction() ) );
- connect( removeButton, SIGNAL( clicked() ), SLOT( slotRemoveAction() ) );
- connect( importButton, SIGNAL( clicked() ), SLOT( slotImport() ) );
- connect( exportButton, SIGNAL( clicked() ), SLOT( slotExport() ) );
- connect( copyButton, SIGNAL( clicked() ), SLOT( slotToClip() ) );
- connect( pasteButton, SIGNAL( clicked() ), SLOT( slotFromClip() ) );
+ connect( actionTree, TQT_SIGNAL( currentChanged(TQListViewItem*) ), TQT_SLOT( slotChangeCurrent() ) );
+ connect( newButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotNewAction() ) );
+ connect( removeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemoveAction() ) );
+ connect( importButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotImport() ) );
+ connect( exportButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotExport() ) );
+ connect( copyButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotToClip() ) );
+ connect( pasteButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotFromClip() ) );
// forwards the changed signal of the properties
- connect ( actionProperties, SIGNAL( changed() ), SIGNAL( changed() ) );
+ connect ( actionProperties, TQT_SIGNAL( changed() ), TQT_SIGNAL( changed() ) );
actionTree->setFirstActionCurrent();
actionTree->setFocus();
@@ -126,16 +126,16 @@ bool UserActionPage::continueInSpiteOfChanges() {
i18n("The current action has been modified. Do you want to apply these changes?")
);
if ( answer == KMessageBox::Cancel ) {
- disconnect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( slotChangeCurrent() ) );
+ disconnect( actionTree, TQT_SIGNAL( currentChanged(TQListViewItem*) ), this, TQT_SLOT( slotChangeCurrent() ) );
actionTree->setCurrentAction( actionProperties->action() );
- connect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), SLOT( slotChangeCurrent() ) );
+ connect( actionTree, TQT_SIGNAL( currentChanged(TQListViewItem*) ), TQT_SLOT( slotChangeCurrent() ) );
return false;
}
if ( answer == KMessageBox::Yes ) {
if ( ! actionProperties->validProperties() ) {
- disconnect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( slotChangeCurrent() ) );
+ disconnect( actionTree, TQT_SIGNAL( currentChanged(TQListViewItem*) ), this, TQT_SLOT( slotChangeCurrent() ) );
actionTree->setCurrentAction( actionProperties->action() );
- connect( actionTree, SIGNAL( currentChanged(QListViewItem*) ), SLOT( slotChangeCurrent() ) );
+ connect( actionTree, TQT_SIGNAL( currentChanged(TQListViewItem*) ), TQT_SLOT( slotChangeCurrent() ) );
return false;
}
slotUpdateAction();
@@ -199,7 +199,7 @@ void UserActionPage::slotRemoveAction() {
if ( ! dynamic_cast<UserActionListViewItem*>( actionTree->currentItem() ) )
return;
- int messageDelete = KMessageBox::warningContinueCancel ( this, //parent
+ int messageDelete = KMessageBox::warningContinueCancel ( this, //tqparent
i18n("Are you sure that you want to remove all selected actions?"), //text
i18n("Remove selected actions?"), //caption
i18n("Remove"), //Label for the continue-button
@@ -215,7 +215,7 @@ void UserActionPage::slotRemoveAction() {
}
void UserActionPage::slotImport() {
- QString filename = KFileDialog::getOpenFileName(QString::null, i18n(FILE_FILTER), this);
+ TQString filename = KFileDialog::getOpenFileName(TQString(), i18n(FILE_FILTER), this);
if ( filename.isEmpty() )
return;
@@ -233,16 +233,16 @@ void UserActionPage::slotExport() {
if ( ! dynamic_cast<UserActionListViewItem*>( actionTree->currentItem() ) )
return;
- QString filename = KFileDialog::getSaveFileName(QString::null, i18n(FILE_FILTER), this);
+ TQString filename = KFileDialog::getSaveFileName(TQString(), i18n(FILE_FILTER), this);
if ( filename.isEmpty() )
return;
- QDomDocument doc = QDomDocument( ACTION_DOCTYPE );
- QFile file( filename );
+ TQDomDocument doc = TQDomDocument( ACTION_DOCTYPE );
+ TQFile file( filename );
int answer = 0;
if( file.open( IO_ReadOnly ) ) { // getting here, means the file already exists an can be read
if( doc.setContent( &file ) ) // getting here means the file exists and already contains an UserAction-XML-tree
- answer = KMessageBox::warningYesNoCancel( this, //parent
+ answer = KMessageBox::warningYesNoCancel( this, //tqparent
i18n("This file already contains some useractions.\nDo you want to overwrite it or should it be merged with the selected actions?"), //text
i18n("Overwrite or merge?"), //caption
i18n("Overwrite"), //label for Yes-Button
@@ -251,7 +251,7 @@ void UserActionPage::slotExport() {
file.close();
}
if ( answer == 0 && file.exists() )
- answer = KMessageBox::warningContinueCancel( this, //parent
+ answer = KMessageBox::warningContinueCancel( this, //tqparent
i18n("This file already exists. Do you want to overwrite it?"), //text
i18n("Overwrite existing file?"), //caption
i18n("Overwrite") //label for Continue-Button
@@ -268,7 +268,7 @@ void UserActionPage::slotExport() {
bool success = UserAction::writeToFile( doc, filename );
if ( ! success )
KMessageBox::error( this,
- i18n("Can't open %1 for writing!\nNothing exported.").arg(filename),
+ i18n("Can't open %1 for writing!\nNothing exported.").tqarg(filename),
i18n("Export failed!")
);
}
@@ -277,14 +277,14 @@ void UserActionPage::slotToClip() {
if ( ! dynamic_cast<UserActionListViewItem*>( actionTree->currentItem() ) )
return;
- QDomDocument doc = actionTree->dumpSelectedActions();
- KApplication::clipboard()->setText( doc.toString() );
+ TQDomDocument doc = actionTree->dumpSelectedActions();
+ KApplication::tqclipboard()->setText( doc.toString() );
}
void UserActionPage::slotFromClip() {
- QDomDocument doc( ACTION_DOCTYPE );
- if ( doc.setContent( KApplication::clipboard()->text() ) ) {
- QDomElement root = doc.documentElement();
+ TQDomDocument doc( ACTION_DOCTYPE );
+ if ( doc.setContent( KApplication::tqclipboard()->text() ) ) {
+ TQDomElement root = doc.documentElement();
UserAction::KrActionList newActions;
krUserAction->readFromElement( root, UserAction::renameDoublicated, &newActions );
for ( KrAction* action = newActions.first(); action; action = newActions.next() )
diff --git a/krusader/ActionMan/useractionpage.h b/krusader/ActionMan/useractionpage.h
index cda2dfc..a26a641 100644
--- a/krusader/ActionMan/useractionpage.h
+++ b/krusader/ActionMan/useractionpage.h
@@ -12,19 +12,20 @@
#ifndef USERACTIONPAGE_H
#define USERACTIONPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
class UserActionListView;
class ActionProperty;
-class QToolButton;
+class TQToolButton;
/**
* @author Jonas Bähr
*/
-class UserActionPage : public QWidget {
+class UserActionPage : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- UserActionPage( QWidget* parent );
+ UserActionPage( TQWidget* tqparent );
~UserActionPage();
/**
@@ -55,9 +56,9 @@ private:
//bool _modified; ///< true if the action-tree was changed (= changes were applied to an action)
UserActionListView *actionTree;
ActionProperty *actionProperties;
- QToolButton *importButton, *exportButton;
- QToolButton *copyButton, *pasteButton;
- QToolButton *removeButton, *newButton;
+ TQToolButton *importButton, *exportButton;
+ TQToolButton *copyButton, *pasteButton;
+ TQToolButton *removeButton, *newButton;
private slots:
void slotChangeCurrent(); //loads a new action into the detail-view
diff --git a/krusader/BookMan/kraddbookmarkdlg.cpp b/krusader/BookMan/kraddbookmarkdlg.cpp
index c5ecfd4..a84fecf 100644
--- a/krusader/BookMan/kraddbookmarkdlg.cpp
+++ b/krusader/BookMan/kraddbookmarkdlg.cpp
@@ -2,52 +2,52 @@
#include "../krusader.h"
#include "krbookmarkhandler.h"
#include <klocale.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kinputdialog.h>
#include <kiconloader.h>
#include <kdebug.h>
-KrAddBookmarkDlg::KrAddBookmarkDlg(QWidget *parent, KURL url):
+KrAddBookmarkDlg::KrAddBookmarkDlg(TQWidget *tqparent, KURL url):
KDialogBase(KDialogBase::Swallow, i18n("Add Bookmark"),
- KDialogBase::User1 | KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent) {
+ KDialogBase::User1 | KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, tqparent) {
// create the 'new folder' button
setButtonText(KDialogBase::User1, i18n("New Folder"));
showButton(KDialogBase::User1, false); // hide it until _createIn is shown
- connect(this, SIGNAL(user1Clicked()), this, SLOT(newFolder()));
+ connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(newFolder()));
// create the main widget
- QWidget *page = new QWidget(this);
+ TQWidget *page = new TQWidget(this);
setMainWidget(page);
- QGridLayout *layout = new QGridLayout(page, 1, 1, 0, spacingHint()); // expanding
+ TQGridLayout *tqlayout = new TQGridLayout(page, 1, 1, 0, spacingHint()); // expanding
// name and url
- QLabel *lb1 = new QLabel(i18n("Name:"), page);
+ TQLabel *lb1 = new TQLabel(i18n("Name:"), page);
_name = new KLineEdit(page);
_name->setText(url.prettyURL()); // default name is the url
_name->selectAll(); // make the text selected
- layout->addWidget(lb1, 0, 0);
- layout->addWidget(_name, 0, 1);
+ tqlayout->addWidget(lb1, 0, 0);
+ tqlayout->addWidget(_name, 0, 1);
- QLabel *lb2 = new QLabel(i18n("URL:"), page);
+ TQLabel *lb2 = new TQLabel(i18n("URL:"), page);
_url = new KLineEdit(page);
- layout->addWidget(lb2, 1, 0);
- layout->addWidget(_url, 1, 1);
+ tqlayout->addWidget(lb2, 1, 0);
+ tqlayout->addWidget(_url, 1, 1);
_url->setText(url.prettyURL()); // set the url in the field
// create in linedit and button
- QLabel *lb3 = new QLabel(i18n("Create in:"), page);
+ TQLabel *lb3 = new TQLabel(i18n("Create in:"), page);
_folder = new KLineEdit(page);
- layout->addWidget(lb3, 2, 0);
- layout->addWidget(_folder, 2, 1);
+ tqlayout->addWidget(lb3, 2, 0);
+ tqlayout->addWidget(_folder, 2, 1);
_folder->setReadOnly(true);
- _createInBtn = new QToolButton(page);
+ _createInBtn = new TQToolButton(page);
_createInBtn->setPixmap(krLoader->loadIcon("down", KIcon::Small));
_createInBtn->setToggleButton(true);
- connect(_createInBtn, SIGNAL(toggled(bool)), this, SLOT(toggleCreateIn(bool )));
- layout->addWidget(_createInBtn, 2, 2);
+ connect(_createInBtn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(toggleCreateIn(bool )));
+ tqlayout->addWidget(_createInBtn, 2, 2);
setDetailsWidget(createInWidget());
@@ -61,12 +61,12 @@ void KrAddBookmarkDlg::toggleCreateIn(bool show) {
}
// creates the widget that lets you decide where to put the new bookmark
-QWidget *KrAddBookmarkDlg::createInWidget() {
+TQWidget *KrAddBookmarkDlg::createInWidget() {
_createIn = new KListView(this);
_createIn->addColumn("Folders");
_createIn->header()->hide();
_createIn->setRootIsDecorated(true);
- _createIn->setAlternateBackground(QColor()); // disable alternate coloring
+ _createIn->setAlternateBackground(TQColor()); // disable alternate coloring
KListViewItem *item = new KListViewItem(_createIn, i18n("Bookmarks"));
item->setOpen(true);
@@ -76,21 +76,21 @@ QWidget *KrAddBookmarkDlg::createInWidget() {
populateCreateInWidget(krBookMan->_root, item);
_createIn->setCurrentItem(item);
createInSelection(item);
- connect(_createIn, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(createInSelection(QListViewItem*)));
+ connect(_createIn, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(createInSelection(TQListViewItem*)));
return _createIn;
}
-void KrAddBookmarkDlg::createInSelection(QListViewItem *item) {
+void KrAddBookmarkDlg::createInSelection(TQListViewItem *item) {
if (item) {
_folder->setText(_xr[static_cast<KListViewItem*>(item)]->text());
}
}
-void KrAddBookmarkDlg::populateCreateInWidget(KrBookmark *root, KListViewItem *parent) {
- for (KrBookmark *bm = root->children().first(); bm; bm = root->children().next()) {
+void KrAddBookmarkDlg::populateCreateInWidget(KrBookmark *root, KListViewItem *tqparent) {
+ for (KrBookmark *bm = root->tqchildren().first(); bm; bm = root->tqchildren().next()) {
if (bm->isFolder()) {
- KListViewItem *item = new KListViewItem(parent, bm->text());
+ KListViewItem *item = new KListViewItem(tqparent, bm->text());
item->setOpen(true);
_xr[item] = bm;
populateCreateInWidget(bm, item);
@@ -100,8 +100,8 @@ void KrAddBookmarkDlg::populateCreateInWidget(KrBookmark *root, KListViewItem *p
void KrAddBookmarkDlg::newFolder() {
// get the name
- QString newFolder = KInputDialog::getText(i18n("New Folder"), i18n("Folder name:"), QString::null, 0, this);
- if (newFolder == QString::null)
+ TQString newFolder = KInputDialog::getText(i18n("New Folder"), i18n("Folder name:"), TQString(), 0, this);
+ if (newFolder == TQString())
return;
// add to the list in bookman
KrBookmark *bm = new KrBookmark(newFolder);
diff --git a/krusader/BookMan/kraddbookmarkdlg.h b/krusader/BookMan/kraddbookmarkdlg.h
index d9db75c..24ec677 100644
--- a/krusader/BookMan/kraddbookmarkdlg.h
+++ b/krusader/BookMan/kraddbookmarkdlg.h
@@ -6,25 +6,26 @@
#include <kdialogbase.h>
#include <kurl.h>
#include <klineedit.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <klistview.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
class KrAddBookmarkDlg: public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- KrAddBookmarkDlg(QWidget *parent, KURL url = 0);
+ KrAddBookmarkDlg(TQWidget *tqparent, KURL url = 0);
KURL url() const { return vfs::fromPathOrURL(_url->text()); }
- QString name() const { return _name->text(); }
+ TQString name() const { return _name->text(); }
KrBookmark *folder() const { return _xr[static_cast<KListViewItem*>(_createIn->selectedItem())]; }
protected:
- QWidget *createInWidget();
- void populateCreateInWidget(KrBookmark *root, KListViewItem *parent);
+ TQWidget *createInWidget();
+ void populateCreateInWidget(KrBookmark *root, KListViewItem *tqparent);
protected slots:
void toggleCreateIn(bool show);
- void createInSelection(QListViewItem *item);
+ void createInSelection(TQListViewItem *item);
void newFolder();
private:
@@ -32,8 +33,8 @@ private:
KLineEdit *_url;
KLineEdit *_folder;
KListView *_createIn;
- QMap<KListViewItem*, KrBookmark*> _xr;
- QToolButton *_createInBtn;
+ TQMap<KListViewItem*, KrBookmark*> _xr;
+ TQToolButton *_createInBtn;
};
#endif // KRADDBOOKMARKDLG_H
diff --git a/krusader/BookMan/krbookmark.cpp b/krusader/BookMan/krbookmark.cpp
index f0708d3..f3dac9b 100644
--- a/krusader/BookMan/krbookmark.cpp
+++ b/krusader/BookMan/krbookmark.cpp
@@ -6,7 +6,7 @@
#include <klocale.h>
#include <kdebug.h>
-#define BM_NAME(X) (QString("Bookmark:")+X)
+#define BM_NAME(X) (TQString("Bookmark:")+X)
#if KDE_IS_VERSION(3,4,0)
static const char* NAME_DEVICES = I18N_NOOP("Media");
@@ -16,10 +16,10 @@ static const char* NAME_DEVICES = I18N_NOOP("Devices");
static const char* NAME_VIRTUAL = I18N_NOOP("Virtual Filesystem");
static const char* NAME_LAN = I18N_NOOP("Local Network");
-KrBookmark::KrBookmark(QString name, KURL url, KActionCollection *parent, QString icon, QString actionName ):
- KAction(name, 0, 0, 0, parent, actionName.isNull() ? BM_NAME(name).latin1() : BM_NAME(actionName).latin1()),
+KrBookmark::KrBookmark(TQString name, KURL url, KActionCollection *tqparent, TQString icon, TQString actionName ):
+ KAction(name, 0, 0, 0, tqparent, actionName.isNull() ? BM_NAME(name).latin1() : BM_NAME(actionName).latin1()),
_url(url), _folder(false), _separator(false) {
- connect(this, SIGNAL(activated()), this, SLOT(activatedProxy()));
+ connect(this, TQT_SIGNAL(activated()), this, TQT_SLOT(activatedProxy()));
// do we have an icon?
if (!icon.isEmpty())
setIcon(icon);
@@ -34,15 +34,15 @@ KrBookmark::KrBookmark(QString name, KURL url, KActionCollection *parent, QStrin
}
}
- _children.setAutoDelete(true);
+ _tqchildren.setAutoDelete(true);
}
-KrBookmark::KrBookmark(QString name, QString icon):
+KrBookmark::KrBookmark(TQString name, TQString icon):
KAction(name, 0, 0, 0, 0), _folder(true), _separator(false) {
setIcon(icon=="" ? "folder" : icon);
}
-KrBookmark* KrBookmark::getExistingBookmark(QString actionName, KActionCollection *collection) {
+KrBookmark* KrBookmark::getExistingBookmark(TQString actionName, KActionCollection *collection) {
return static_cast<KrBookmark*>(collection->action(BM_NAME(actionName).latin1()));
}
diff --git a/krusader/BookMan/krbookmark.h b/krusader/BookMan/krbookmark.h
index fda39ce..e07e6aa 100644
--- a/krusader/BookMan/krbookmark.h
+++ b/krusader/BookMan/krbookmark.h
@@ -2,25 +2,26 @@
#define KRBOOKMARK_H
#include <kaction.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kurl.h>
class KActionCollection;
class KrBookmark: public KAction {
Q_OBJECT
+ TQ_OBJECT
public:
- KrBookmark(QString name, KURL url, KActionCollection *parent, QString icon = "", QString actionName = QString::null );
- KrBookmark(QString name, QString icon = ""); // creates a folder
+ KrBookmark(TQString name, KURL url, KActionCollection *tqparent, TQString icon = "", TQString actionName = TQString() );
+ KrBookmark(TQString name, TQString icon = ""); // creates a folder
// text() and setText() to change the name of the bookmark
// icon() and setIcon() to change icons (by name)
inline const KURL& url() const { return _url; }
inline void setURL(const KURL& url) { _url = url; }
inline bool isFolder() const { return _folder; }
inline bool isSeparator() const { return _separator; }
- QPtrList<KrBookmark>& children() { return _children; }
+ TQPtrList<KrBookmark>& tqchildren() { return _tqchildren; }
- static KrBookmark* getExistingBookmark(QString actionName, KActionCollection *collection);
+ static KrBookmark* getExistingBookmark(TQString actionName, KActionCollection *collection);
// ----- special bookmarks
static KrBookmark* devices(KActionCollection *collection);
static KrBookmark* virt(KActionCollection *collection);
@@ -36,10 +37,10 @@ protected slots:
private:
KURL _url;
- QString _icon;
+ TQString _icon;
bool _folder;
bool _separator;
- QPtrList<KrBookmark> _children;
+ TQPtrList<KrBookmark> _tqchildren;
};
#endif // KRBOOKMARK_H
diff --git a/krusader/BookMan/krbookmarkbutton.cpp b/krusader/BookMan/krbookmarkbutton.cpp
index 08d13a5..4acbffd 100644
--- a/krusader/BookMan/krbookmarkbutton.cpp
+++ b/krusader/BookMan/krbookmarkbutton.cpp
@@ -1,15 +1,15 @@
#include "krbookmarkbutton.h"
#include "krbookmarkhandler.h"
#include "../krusader.h"
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kiconloader.h>
#include <kaction.h>
#include <klocale.h>
#include <kpopupmenu.h>
#include <kdebug.h>
-KrBookmarkButton::KrBookmarkButton(QWidget *parent): QToolButton(parent) {
- QPixmap icon = krLoader->loadIcon("bookmark", KIcon::Toolbar, 16);
+KrBookmarkButton::KrBookmarkButton(TQWidget *tqparent): TQToolButton(tqparent) {
+ TQPixmap icon = krLoader->loadIcon("bookmark", KIcon::Toolbar, 16);
setFixedSize(icon.width() + 4, icon.height() + 4);
setPixmap(icon);
setTextLabel(i18n("BookMan II"), true);
@@ -22,7 +22,7 @@ KrBookmarkButton::KrBookmarkButton(QWidget *parent): QToolButton(parent) {
acmBookmarks->popupMenu()->setKeyboardShortcutsExecute(true);
setPopup(acmBookmarks->popupMenu());
- connect(this, SIGNAL(pressed()), this, SLOT(populate()));
+ connect(this, TQT_SIGNAL(pressed()), this, TQT_SLOT(populate()));
populate();
}
@@ -32,7 +32,7 @@ void KrBookmarkButton::populate() {
void KrBookmarkButton::openPopup() {
populate();
- popup()->exec(mapToGlobal(QPoint(0, height())));
+ popup()->exec(mapToGlobal(TQPoint(0, height())));
}
#include "krbookmarkbutton.moc"
diff --git a/krusader/BookMan/krbookmarkbutton.h b/krusader/BookMan/krbookmarkbutton.h
index 1267871..950f6c7 100644
--- a/krusader/BookMan/krbookmarkbutton.h
+++ b/krusader/BookMan/krbookmarkbutton.h
@@ -1,13 +1,14 @@
#ifndef KRBOOKMARK_BUTTON_H
#define KRBOOKMARK_BUTTON_H
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include "krbookmarkhandler.h"
-class KrBookmarkButton: public QToolButton {
+class KrBookmarkButton: public TQToolButton {
Q_OBJECT
+ TQ_OBJECT
public:
- KrBookmarkButton(QWidget *parent);
+ KrBookmarkButton(TQWidget *tqparent);
void openPopup();
signals:
diff --git a/krusader/BookMan/krbookmarkhandler.cpp b/krusader/BookMan/krbookmarkhandler.cpp
index 9f1413b..be56138 100644
--- a/krusader/BookMan/krbookmarkhandler.cpp
+++ b/krusader/BookMan/krbookmarkhandler.cpp
@@ -6,23 +6,23 @@
#include "../VFS/vfs.h"
#include <kiconloader.h>
#include <kmessagebox.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kactioncollection.h>
#include <klocale.h>
#include <kdebug.h>
#include <kbookmarkmanager.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qcursor.h>
+#include <tqfile.h>
+#include <tqcursor.h>
#define SPECIAL_BOOKMARKS true
// ------------------------ for internal use
#define BOOKMARKS_FILE "krusader/krbookmarks.xml"
-#define CONNECT_BM(X) { disconnect(X, SIGNAL(activated(const KURL&)), 0, 0); connect(X, SIGNAL(activated(const KURL&)), this, SLOT(slotActivated(const KURL&))); }
+#define CONNECT_BM(X) { disconnect(X, TQT_SIGNAL(activated(const KURL&)), 0, 0); connect(X, TQT_SIGNAL(activated(const KURL&)), this, TQT_SLOT(slotActivated(const KURL&))); }
-KrBookmarkHandler::KrBookmarkHandler(): QObject(0), _middleClick(false), _mainBookmarkPopup( 0 ), _specialBookmarkIDs(), _bookmarkIDTable() {
- // create our own action collection and make the shortcuts apply only to parent
+KrBookmarkHandler::KrBookmarkHandler(): TQObject(0), _middleClick(false), _mainBookmarkPopup( 0 ), _specialBookmarkIDs(), _bookmarkIDTable() {
+ // create our own action collection and make the shortcuts apply only to tqparent
_privateCollection = new KActionCollection(krApp, "private collection");
_collection = krApp->actionCollection();
@@ -36,7 +36,7 @@ KrBookmarkHandler::KrBookmarkHandler(): QObject(0), _middleClick(false), _mainBo
// hack
manager = KBookmarkManager::managerForFile(locateLocal( "data", BOOKMARKS_FILE ), false);
- connect(manager, SIGNAL(changed(const QString&, const QString& )), this, SLOT(bookmarksChanged(const QString&, const QString& )));
+ connect(manager, TQT_SIGNAL(changed(const TQString&, const TQString& )), this, TQT_SLOT(bookmarksChanged(const TQString&, const TQString& )));
}
KrBookmarkHandler::~KrBookmarkHandler() {
@@ -68,7 +68,7 @@ void KrBookmarkHandler::addBookmark(KrBookmark *bm, KrBookmark *folder) {
folder = _root;
// add to the list (bottom)
- folder->children().append(bm);
+ folder->tqchildren().append(bm);
exportToFile();
}
@@ -84,31 +84,31 @@ void KrBookmarkHandler::deleteBookmark(KrBookmark *bm) {
}
void KrBookmarkHandler::removeReferences( KrBookmark *root, KrBookmark *bmToRemove ) {
- int index = root->children().find( bmToRemove );
+ int index = root->tqchildren().tqfind( bmToRemove );
if( index >= 0 )
- root->children().take( index );
+ root->tqchildren().take( index );
- KrBookmark *bm = root->children().first();
+ KrBookmark *bm = root->tqchildren().first();
while (bm) {
if (bm->isFolder())
removeReferences(bm, bmToRemove);
- bm = root->children().next();
+ bm = root->tqchildren().next();
}
}
-void KrBookmarkHandler::exportToFileBookmark(QDomDocument &doc, QDomElement &where, KrBookmark *bm) {
+void KrBookmarkHandler::exportToFileBookmark(TQDomDocument &doc, TQDomElement &where, KrBookmark *bm) {
if( bm->isSeparator() ) {
- QDomElement bookmark = doc.createElement("separator");
+ TQDomElement bookmark = doc.createElement("separator");
where.appendChild(bookmark);
}
else {
- QDomElement bookmark = doc.createElement("bookmark");
+ TQDomElement bookmark = doc.createElement("bookmark");
// url
bookmark.setAttribute("href", bm->url().prettyURL());
// icon
bookmark.setAttribute("icon", bm->icon());
// title
- QDomElement title = doc.createElement("title");
+ TQDomElement title = doc.createElement("title");
title.appendChild(doc.createTextNode(bm->text()));
bookmark.appendChild(title);
@@ -116,18 +116,18 @@ void KrBookmarkHandler::exportToFileBookmark(QDomDocument &doc, QDomElement &whe
}
}
-void KrBookmarkHandler::exportToFileFolder(QDomDocument &doc, QDomElement &parent, KrBookmark *folder) {
- for (KrBookmark *bm = folder->children().first(); bm; bm = folder->children().next()) {
+void KrBookmarkHandler::exportToFileFolder(TQDomDocument &doc, TQDomElement &tqparent, KrBookmark *folder) {
+ for (KrBookmark *bm = folder->tqchildren().first(); bm; bm = folder->tqchildren().next()) {
if (bm->isFolder()) {
- QDomElement newFolder = doc.createElement("folder");
+ TQDomElement newFolder = doc.createElement("folder");
newFolder.setAttribute("icon", bm->icon());
- parent.appendChild(newFolder);
- QDomElement title = doc.createElement("title");
+ tqparent.appendChild(newFolder);
+ TQDomElement title = doc.createElement("title");
title.appendChild(doc.createTextNode(bm->text()));
newFolder.appendChild(title);
exportToFileFolder(doc, newFolder, bm);
} else {
- exportToFileBookmark(doc, parent, bm);
+ exportToFileBookmark(doc, tqparent, bm);
}
}
}
@@ -148,33 +148,33 @@ void KrBookmarkHandler::exportToFileFolder(QDomDocument &doc, QDomElement &paren
// </folder>
// </xbel>
void KrBookmarkHandler::exportToFile() {
- QDomDocument doc( "xbel" );
- QDomElement root = doc.createElement( "xbel" );
+ TQDomDocument doc( "xbel" );
+ TQDomElement root = doc.createElement( "xbel" );
doc.appendChild( root );
exportToFileFolder(doc, root, _root);
if (!doc.firstChild().isProcessingInstruction()) {
// adding: <?xml version="1.0" encoding="UTF-8" ?> if not already present
- QDomProcessingInstruction instr = doc.createProcessingInstruction( "xml",
+ TQDomProcessingInstruction instr = doc.createProcessingInstruction( "xml",
"version=\"1.0\" encoding=\"UTF-8\" ");
doc.insertBefore( instr, doc.firstChild() );
}
- QString filename = locateLocal( "data", BOOKMARKS_FILE );
- QFile file(filename);
+ TQString filename = locateLocal( "data", BOOKMARKS_FILE );
+ TQFile file(filename);
if ( file.open( IO_WriteOnly ) ) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
stream.setEncoding(stream.UnicodeUTF8);
stream << doc.toString();
file.close();
} else {
- KMessageBox::error(krApp, i18n("Unable to write to %1").arg(filename), i18n("Error"));
+ KMessageBox::error(krApp, i18n("Unable to write to %1").tqarg(filename), i18n("Error"));
}
}
-bool KrBookmarkHandler::importFromFileBookmark(QDomElement &e, KrBookmark *parent, QString path, QString *errorMsg) {
- QString url, name, icon;
+bool KrBookmarkHandler::importFromFileBookmark(TQDomElement &e, KrBookmark *tqparent, TQString path, TQString *errorMsg) {
+ TQString url, name, icon;
// verify tag
if (e.tagName() != "bookmark") {
*errorMsg = e.tagName() + i18n(" instead of ")+"bookmark";
@@ -186,7 +186,7 @@ bool KrBookmarkHandler::importFromFileBookmark(QDomElement &e, KrBookmark *paren
return false;
} else url = e.attribute("href");
// verify title
- QDomElement te = e.firstChild().toElement();
+ TQDomElement te = e.firstChild().toElement();
if (te.tagName() != "title") {
*errorMsg = i18n("missing tag ")+"title";
return false;
@@ -199,37 +199,37 @@ bool KrBookmarkHandler::importFromFileBookmark(QDomElement &e, KrBookmark *paren
KrBookmark *bm = KrBookmark::getExistingBookmark(path+name, _collection);
if (!bm) {
bm = new KrBookmark(name, vfs::fromPathOrURL( url ), _collection, icon, path+name);
- parent->children().append(bm);
+ tqparent->tqchildren().append(bm);
}
return true;
}
-bool KrBookmarkHandler::importFromFileFolder(QDomNode &first, KrBookmark *parent, QString path, QString *errorMsg) {
- QString name;
- QDomNode n = first;
+bool KrBookmarkHandler::importFromFileFolder(TQDomNode &first, KrBookmark *tqparent, TQString path, TQString *errorMsg) {
+ TQString name;
+ TQDomNode n = first;
while (!n.isNull()) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (e.tagName() == "bookmark") {
- if (!importFromFileBookmark(e, parent, path, errorMsg))
+ if (!importFromFileBookmark(e, tqparent, path, errorMsg))
return false;
} else if (e.tagName() == "folder") {
- QString iconName = "";
+ TQString iconName = "";
if (e.hasAttribute("icon")) iconName=e.attribute("icon");
// the title is the first child of the folder
- QDomElement tmp = e.firstChild().toElement();
+ TQDomElement tmp = e.firstChild().toElement();
if (tmp.tagName() != "title") {
*errorMsg = i18n("missing tag ")+"title";
return false;
} else name = tmp.text();
KrBookmark *folder = new KrBookmark(name, iconName);
- parent->children().append(folder);
+ tqparent->tqchildren().append(folder);
- QDomNode nextOne = tmp.nextSibling();
+ TQDomNode nextOne = tmp.nextSibling();
if (!importFromFileFolder(nextOne, folder, path + name + "/", errorMsg))
return false;
} else if (e.tagName() == "separator") {
- parent->children().append(KrBookmark::separator());
+ tqparent->tqchildren().append(KrBookmark::separator());
}
n = n.nextSibling();
}
@@ -240,15 +240,15 @@ bool KrBookmarkHandler::importFromFileFolder(QDomNode &first, KrBookmark *parent
void KrBookmarkHandler::importFromFile() {
clearBookmarks(_root);
- QString filename = locateLocal( "data", BOOKMARKS_FILE );
- QFile file( filename );
+ TQString filename = locateLocal( "data", BOOKMARKS_FILE );
+ TQFile file( filename );
if ( !file.open(IO_ReadOnly))
return; // no bookmarks file
- QString errorMsg;
- QDomNode n;
- QDomElement e;
- QDomDocument doc( "xbel" );
+ TQString errorMsg;
+ TQDomNode n;
+ TQDomElement e;
+ TQDomDocument doc( "xbel" );
if ( !doc.setContent( &file, &errorMsg ) ) {
goto ERROR;
}
@@ -258,14 +258,14 @@ void KrBookmarkHandler::importFromFile() {
n = n.nextSibling();
if (n.isNull() || n.toElement().tagName()!="xbel") {
- errorMsg = i18n("%1 doesn't seem to be a valid Bookmarks file").arg(filename);
+ errorMsg = i18n("%1 doesn't seem to be a valid Bookmarks file").tqarg(filename);
goto ERROR;
} else n = n.firstChild(); // skip the xbel part
importFromFileFolder(n, _root, "", &errorMsg);
goto SUCCESS;
ERROR:
- KMessageBox::error(krApp, i18n("Error reading bookmarks file: %1").arg(errorMsg), i18n( "Error" ));
+ KMessageBox::error(krApp, i18n("Error reading bookmarks file: %1").tqarg(errorMsg), i18n( "Error" ));
SUCCESS:
file.close();
@@ -279,26 +279,26 @@ void KrBookmarkHandler::populate(KPopupMenu *menu) {
buildMenu(_root, menu);
}
-void KrBookmarkHandler::buildMenu(KrBookmark *parent, KPopupMenu *menu) {
+void KrBookmarkHandler::buildMenu(KrBookmark *tqparent, KPopupMenu *menu) {
static int inSecondaryMenu = 0; // used to know if we're on the top menu
// run the loop twice, in order to put the folders on top. stupid but easy :-)
// note: this code drops the separators put there by the user
- for (KrBookmark *bm = parent->children().first(); bm; bm = parent->children().next()) {
+ for (KrBookmark *bm = tqparent->tqchildren().first(); bm; bm = tqparent->tqchildren().next()) {
if (!bm->isFolder()) continue;
KPopupMenu *newMenu = new KPopupMenu(menu);
- int id = menu->insertItem(QIconSet(krLoader->loadIcon(bm->icon(), KIcon::Small)),
+ int id = menu->insertItem(TQIconSet(krLoader->loadIcon(bm->icon(), KIcon::Small)),
bm->text(), newMenu, -1 /* dummy id */, -1 /* end of list */);
- if( !_bookmarkIDTable.find( menu ) )
- _bookmarkIDTable.insert( menu, new QMap<int, KrBookmark *> );
+ if( !_bookmarkIDTable.tqfind( menu ) )
+ _bookmarkIDTable.insert( menu, new TQMap<int, KrBookmark *> );
(*_bookmarkIDTable[ menu ])[ id ] = bm;
++inSecondaryMenu;
buildMenu(bm, newMenu);
--inSecondaryMenu;
}
- for (KrBookmark *bm = parent->children().first(); bm; bm = parent->children().next()) {
+ for (KrBookmark *bm = tqparent->tqchildren().first(); bm; bm = tqparent->tqchildren().next()) {
if (bm->isFolder()) continue;
if (bm->isSeparator() ) {
menu->insertSeparator();
@@ -308,8 +308,8 @@ void KrBookmarkHandler::buildMenu(KrBookmark *parent, KPopupMenu *menu) {
CONNECT_BM(bm);
int id = bm->itemId( itemIndex );
- if( !_bookmarkIDTable.find( menu ) )
- _bookmarkIDTable.insert( menu, new QMap<int, KrBookmark *> );
+ if( !_bookmarkIDTable.tqfind( menu ) )
+ _bookmarkIDTable.insert( menu, new TQMap<int, KrBookmark *> );
(*_bookmarkIDTable[ menu ])[ id ] = bm;
}
@@ -328,7 +328,7 @@ void KrBookmarkHandler::buildMenu(KrBookmark *parent, KPopupMenu *menu) {
// add the popular links submenu
KPopupMenu *newMenu = new KPopupMenu(menu);
- itemIndex = menu->insertItem(QIconSet(krLoader->loadIcon("bookmark_folder", KIcon::Small)),
+ itemIndex = menu->insertItem(TQIconSet(krLoader->loadIcon("bookmark_folder", KIcon::Small)),
i18n("Popular URLs"), newMenu, -1 /* dummy id */, -1 /* end of list */);
_specialBookmarkIDs.append( itemIndex );
// add the top 15 urls
@@ -336,7 +336,7 @@ void KrBookmarkHandler::buildMenu(KrBookmark *parent, KPopupMenu *menu) {
KURL::List list = krApp->popularUrls->getMostPopularUrls(MAX);
KURL::List::Iterator it;
for (it = list.begin(); it != list.end(); ++it) {
- QString name;
+ TQString name;
if ((*it).isLocalFile()) name = (*it).path();
else name = (*it).prettyURL();
// note: these bookmark are put into the private collection
@@ -403,15 +403,15 @@ void KrBookmarkHandler::buildMenu(KrBookmark *parent, KPopupMenu *menu) {
_specialBookmarkIDs.append( itemIndex );
// make sure the menu is connected to us
- disconnect(menu, SIGNAL(activated(int)), 0, 0);
- connect(menu, SIGNAL(activated(int)), this, SLOT(menuOperation(int)));
+ disconnect(menu, TQT_SIGNAL(activated(int)), 0, 0);
+ connect(menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuOperation(int)));
}
menu->installEventFilter(this);
}
void KrBookmarkHandler::clearBookmarks(KrBookmark *root) {
- KrBookmark *bm = root->children().first();
+ KrBookmark *bm = root->tqchildren().first();
while (bm) {
if (bm->isFolder())
clearBookmarks(bm);
@@ -420,48 +420,48 @@ void KrBookmarkHandler::clearBookmarks(KrBookmark *root) {
delete bm;
}
- bm = root->children().next();
+ bm = root->tqchildren().next();
}
- root->children().clear();
+ root->tqchildren().clear();
}
-void KrBookmarkHandler::bookmarksChanged(const QString&, const QString&) {
+void KrBookmarkHandler::bookmarksChanged(const TQString&, const TQString&) {
importFromFile();
}
-bool KrBookmarkHandler::eventFilter( QObject *obj, QEvent *ev ) {
- if (ev->type() == QEvent::MouseButtonRelease) {
- switch (static_cast<QMouseEvent*>(ev)->button()) {
- case RightButton:
+bool KrBookmarkHandler::eventFilter( TQObject *obj, TQEvent *ev ) {
+ if (ev->type() == TQEvent::MouseButtonRelease) {
+ switch (TQT_TQMOUSEEVENT(ev)->button()) {
+ case Qt::RightButton:
_middleClick = false;
- if( obj->inherits( "QPopupMenu" ) ) {
- int id = static_cast<QPopupMenu*>(obj)->idAt( static_cast<QMouseEvent*>(ev)->pos() );
+ if( obj->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) {
+ int id = static_cast<TQPopupMenu*>(TQT_TQWIDGET(obj))->idAt( TQT_TQMOUSEEVENT(ev)->pos() );
- if( obj == _mainBookmarkPopup && _specialBookmarkIDs.contains( id ) ) {
+ if( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(_mainBookmarkPopup) && _specialBookmarkIDs.tqcontains( id ) ) {
rightClickOnSpecialBookmark();
return true;
}
- if( _bookmarkIDTable.find( obj ) ) {
- QMap<int, KrBookmark*> * table = _bookmarkIDTable[ obj ];
+ if( _bookmarkIDTable.tqfind( obj ) ) {
+ TQMap<int, KrBookmark*> * table = _bookmarkIDTable[ obj ];
if( table && table->count( id ) ) {
KrBookmark *bm = (*table)[ id ];
- rightClicked( static_cast<QPopupMenu*>(obj), id, bm );
+ rightClicked( static_cast<TQPopupMenu*>(TQT_TQWIDGET(obj)), id, bm );
return true;
}
}
}
- case LeftButton:
+ case Qt::LeftButton:
_middleClick = false;
break;
- case MidButton:
+ case Qt::MidButton:
_middleClick = true;
break;
default:
break;
}
}
- return QObject::eventFilter(obj, ev);
+ return TQObject::eventFilter(obj, ev);
}
#define POPULAR_URLS_ID 100100
@@ -478,7 +478,7 @@ void KrBookmarkHandler::rightClickOnSpecialBookmark() {
bool hasVirtualFS = krConfig->readBoolEntry( "BM Virtual FS", true );
bool hasJumpback = krConfig->readBoolEntry( "BM Jumpback", true );
- QPopupMenu menu( _mainBookmarkPopup );
+ TQPopupMenu menu( _mainBookmarkPopup );
menu.setCaption( i18n( "Enable special bookmarks" ) );
menu.setCheckable( true );
@@ -493,10 +493,10 @@ void KrBookmarkHandler::rightClickOnSpecialBookmark() {
menu.insertItem( i18n( "Jump back" ), JUMP_BACK_ID );
menu.setItemChecked( JUMP_BACK_ID, hasJumpback );
- connect( _mainBookmarkPopup, SIGNAL( highlighted( int ) ), &menu, SLOT( close() ) );
- connect( _mainBookmarkPopup, SIGNAL( activated( int ) ), &menu, SLOT( close() ) );
+ connect( _mainBookmarkPopup, TQT_SIGNAL( highlighted( int ) ), &menu, TQT_SLOT( close() ) );
+ connect( _mainBookmarkPopup, TQT_SIGNAL( activated( int ) ), &menu, TQT_SLOT( close() ) );
- int result = menu.exec( QCursor::pos() );
+ int result = menu.exec( TQCursor::pos() );
bool doCloseMain = true;
krConfig->setGroup( "Private" );
@@ -532,18 +532,18 @@ void KrBookmarkHandler::rightClickOnSpecialBookmark() {
#define OPEN_NEW_TAB_ID 100201
#define DELETE_ID 100202
-void KrBookmarkHandler::rightClicked( QPopupMenu *menu, int /*id*/, KrBookmark * bm ) {
- QPopupMenu popup( _mainBookmarkPopup );
+void KrBookmarkHandler::rightClicked( TQPopupMenu *menu, int /*id*/, KrBookmark * bm ) {
+ TQPopupMenu popup( _mainBookmarkPopup );
popup.insertItem( krLoader->loadIcon( "fileopen", KIcon::Panel ), i18n( "Open" ), OPEN_ID );
popup.insertItem( krLoader->loadIcon( "tab_new", KIcon::Panel ), i18n( "Open in a new tab" ), OPEN_NEW_TAB_ID );
popup.insertSeparator();
popup.insertItem( krLoader->loadIcon( "editdelete", KIcon::Panel ), i18n( "Delete" ), DELETE_ID );
- connect( menu, SIGNAL( highlighted( int ) ), &popup, SLOT( close() ) );
- connect( menu, SIGNAL( activated( int ) ), &popup, SLOT( close() ) );
+ connect( menu, TQT_SIGNAL( highlighted( int ) ), &popup, TQT_SLOT( close() ) );
+ connect( menu, TQT_SIGNAL( activated( int ) ), &popup, TQT_SLOT( close() ) );
- int result = popup.exec( QCursor::pos() );
+ int result = popup.exec( TQCursor::pos() );
popup.close();
if( _mainBookmarkPopup && result >= OPEN_ID && result <= DELETE_ID ) {
diff --git a/krusader/BookMan/krbookmarkhandler.h b/krusader/BookMan/krbookmarkhandler.h
index c6bd9d9..4d032d9 100644
--- a/krusader/BookMan/krbookmarkhandler.h
+++ b/krusader/BookMan/krbookmarkhandler.h
@@ -2,50 +2,51 @@
#define KRBOOKMARK_HANDLER_H
#include "krbookmark.h"
-#include <qobject.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
#include <kpopupmenu.h>
#include <kurl.h>
-#include <qptrdict.h>
-#include <qvaluelist.h>
-#include <qdom.h>
-#include <qmap.h>
+#include <tqptrdict.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
+#include <tqmap.h>
class KActionCollection;
class KBookmarkManager;
-class KrBookmarkHandler: public QObject {
+class KrBookmarkHandler: public TQObject {
Q_OBJECT
+ TQ_OBJECT
friend class KrAddBookmarkDlg;
enum Actions { BookmarkCurrent=0, ManageBookmarks };
public:
KrBookmarkHandler();
~KrBookmarkHandler();
void populate(KPopupMenu *menu);
- void addBookmark(KrBookmark *bm, KrBookmark *parent = 0);
+ void addBookmark(KrBookmark *bm, KrBookmark *tqparent = 0);
void bookmarkCurrent(KURL url);
protected:
void deleteBookmark(KrBookmark *bm);
void importFromFile();
- bool importFromFileBookmark(QDomElement &e, KrBookmark *parent, QString path, QString *errorMsg);
- bool importFromFileFolder(QDomNode &first, KrBookmark *parent, QString path, QString *errorMsg);
+ bool importFromFileBookmark(TQDomElement &e, KrBookmark *tqparent, TQString path, TQString *errorMsg);
+ bool importFromFileFolder(TQDomNode &first, KrBookmark *tqparent, TQString path, TQString *errorMsg);
void exportToFile();
- void exportToFileFolder(QDomDocument &doc, QDomElement &parent, KrBookmark *folder);
- void exportToFileBookmark(QDomDocument &doc, QDomElement &where, KrBookmark *bm);
+ void exportToFileFolder(TQDomDocument &doc, TQDomElement &tqparent, KrBookmark *folder);
+ void exportToFileBookmark(TQDomDocument &doc, TQDomElement &where, KrBookmark *bm);
void clearBookmarks(KrBookmark *root);
- void buildMenu(KrBookmark *parent, KPopupMenu *menu);
+ void buildMenu(KrBookmark *tqparent, KPopupMenu *menu);
- bool eventFilter( QObject *obj, QEvent *ev );
+ bool eventFilter( TQObject *obj, TQEvent *ev );
- void rightClicked( QPopupMenu *menu, int id, KrBookmark *bm );
+ void rightClicked( TQPopupMenu *menu, int id, KrBookmark *bm );
void rightClickOnSpecialBookmark();
void removeReferences( KrBookmark *root, KrBookmark *bmToRemove );
protected slots:
void menuOperation(int id);
- void bookmarksChanged(const QString&, const QString&);
+ void bookmarksChanged(const TQString&, const TQString&);
void slotActivated(const KURL& url);
private:
@@ -55,9 +56,9 @@ private:
KBookmarkManager *manager;
bool _middleClick; // if true, the user clicked the middle button to open the bookmark
- QGuardedPtr<KPopupMenu> _mainBookmarkPopup; // main bookmark popup menu
- QValueList<int> _specialBookmarkIDs; // the ID list of the special bookmarks
- QPtrDict<QMap<int,KrBookmark*> > _bookmarkIDTable; // the IDs of the bookmarks
+ TQGuardedPtr<KPopupMenu> _mainBookmarkPopup; // main bookmark popup menu
+ TQValueList<int> _specialBookmarkIDs; // the ID list of the special bookmarks
+ TQPtrDict<TQMap<int,KrBookmark*> > _bookmarkIDTable; // the IDs of the bookmarks
};
#endif // KRBOOKMARK_HANDLER_H
diff --git a/krusader/Dialogs/checksumdlg.cpp b/krusader/Dialogs/checksumdlg.cpp
index c79a66e..497b415 100644
--- a/krusader/Dialogs/checksumdlg.cpp
+++ b/krusader/Dialogs/checksumdlg.cpp
@@ -1,33 +1,33 @@
#include "checksumdlg.h"
#include "../krusader.h"
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
#include <klineedit.h>
#include <klistview.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kcursor.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kfiledialog.h>
-#include <qframe.h>
+#include <tqframe.h>
#include <kiconloader.h>
#include <kcombobox.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kurlrequester.h>
#include "../krservices.h"
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
#include <ktempfile.h>
#include <kstandarddirs.h>
class CS_Tool; // forward
-typedef void PREPARE_PROC_FUNC(KProcess& proc, CS_Tool *self, const QStringList& files,
- const QString checksumFile, bool recursive, const QString& stdoutFileName,
- const QString& stderrFileName, const QString& type=QString::null);
-typedef QStringList GET_FAILED_FUNC(const QStringList& stdOut, const QStringList& stdErr);
+typedef void PREPARE_PROC_FUNC(KProcess& proc, CS_Tool *self, const TQStringList& files,
+ const TQString checksumFile, bool recursive, const TQString& stdoutFileName,
+ const TQString& stderrFileName, const TQString& type=TQString());
+typedef TQStringList GET_FAILED_FUNC(const TQStringList& stdOut, const TQStringList& stdErr);
class CS_Tool {
public:
@@ -38,7 +38,7 @@ public:
};
Type type;
- QString binary;
+ TQString binary;
bool recursive;
bool standardFormat;
PREPARE_PROC_FUNC *create, *verify;
@@ -47,38 +47,38 @@ public:
class CS_ToolByType {
public:
- QPtrList<CS_Tool> tools, r_tools; // normal and recursive tools
+ TQPtrList<CS_Tool> tools, r_tools; // normal and recursive tools
};
// handles md5sum and sha1sum
-void sumCreateFunc(KProcess& proc, CS_Tool *self, const QStringList& files,
- const QString, bool recursive, const QString& stdoutFileName,
- const QString& stderrFileName, const QString&) {
+void sumCreateFunc(KProcess& proc, CS_Tool *self, const TQStringList& files,
+ const TQString, bool recursive, const TQString& stdoutFileName,
+ const TQString& stderrFileName, const TQString&) {
proc.setUseShell(true, "/bin/bash");
proc << KrServices::fullPathName( self->binary );
Q_ASSERT(!recursive);
proc << files << "1>" << stdoutFileName << "2>" << stderrFileName;
}
-void sumVerifyFunc(KProcess& proc, CS_Tool *self, const QStringList& /* files */,
- const QString checksumFile, bool recursive, const QString& stdoutFileName,
- const QString& stderrFileName, const QString& /* type */) {
+void sumVerifyFunc(KProcess& proc, CS_Tool *self, const TQStringList& /* files */,
+ const TQString checksumFile, bool recursive, const TQString& stdoutFileName,
+ const TQString& stderrFileName, const TQString& /* type */) {
proc.setUseShell(true, "/bin/bash");
proc << KrServices::fullPathName( self->binary );
Q_ASSERT(!recursive);
proc << "-c" << checksumFile << "1>" << stdoutFileName << "2>" << stderrFileName;
}
-QStringList sumFailedFunc(const QStringList& stdOut, const QStringList& stdErr) {
+TQStringList sumFailedFunc(const TQStringList& stdOut, const TQStringList& stdErr) {
// md5sum and sha1sum print "...: FAILED" for failed files and display
// the number of failures to stderr. so if stderr is empty, we'll assume all is ok
- QStringList result;
+ TQStringList result;
if (stdErr.size()==0) return result;
result += stdErr;
// grep for the ":FAILED" substring
- const QString tmp = QString(": FAILED").local8Bit();
+ const TQString tmp = TQString(": FAILED").local8Bit();
for (uint i=0; i<stdOut.size();++i) {
- if (stdOut[i].find(tmp) != -1)
+ if (stdOut[i].tqfind(tmp) != -1)
result += stdOut[i];
}
@@ -86,49 +86,49 @@ QStringList sumFailedFunc(const QStringList& stdOut, const QStringList& stdErr)
}
// handles *deep binaries
-void deepCreateFunc(KProcess& proc, CS_Tool *self, const QStringList& files,
- const QString, bool recursive, const QString& stdoutFileName,
- const QString& stderrFileName, const QString&) {
+void deepCreateFunc(KProcess& proc, CS_Tool *self, const TQStringList& files,
+ const TQString, bool recursive, const TQString& stdoutFileName,
+ const TQString& stderrFileName, const TQString&) {
proc.setUseShell(true, "/bin/bash");
proc << KrServices::fullPathName( self->binary );
if (recursive) proc << "-r";
proc << "-l" << files << "1>" << stdoutFileName << "2>" << stderrFileName;
}
-void deepVerifyFunc(KProcess& proc, CS_Tool *self, const QStringList& files,
- const QString checksumFile, bool recursive, const QString& stdoutFileName,
- const QString& stderrFileName, const QString&) {
+void deepVerifyFunc(KProcess& proc, CS_Tool *self, const TQStringList& files,
+ const TQString checksumFile, bool recursive, const TQString& stdoutFileName,
+ const TQString& stderrFileName, const TQString&) {
proc.setUseShell(true, "/bin/bash");
proc << KrServices::fullPathName( self->binary );
if (recursive) proc << "-r";
proc << "-x" << checksumFile << files << "1>" << stdoutFileName << "2>" << stderrFileName;
}
-QStringList deepFailedFunc(const QStringList& stdOut, const QStringList&/* stdErr */) {
+TQStringList deepFailedFunc(const TQStringList& stdOut, const TQStringList&/* stdErr */) {
// *deep dumps (via -x) all failed hashes to stdout
return stdOut;
}
// handles cfv binary
-void cfvCreateFunc(KProcess& proc, CS_Tool *self, const QStringList& files,
- const QString, bool recursive, const QString& stdoutFileName,
- const QString& stderrFileName, const QString& type) {
+void cfvCreateFunc(KProcess& proc, CS_Tool *self, const TQStringList& files,
+ const TQString, bool recursive, const TQString& stdoutFileName,
+ const TQString& stderrFileName, const TQString& type) {
proc.setUseShell(true, "/bin/bash");
proc << KrServices::fullPathName( self->binary ) << "-C" << "-VV";
if (recursive) proc << "-rr";
proc << "-t" << type << "-f-" << "-U" << files << "1>" << stdoutFileName << "2>" << stderrFileName;
}
-void cfvVerifyFunc(KProcess& proc, CS_Tool *self, const QStringList& /* files */,
- const QString checksumFile, bool recursive, const QString& stdoutFileName,
- const QString& stderrFileName, const QString&type) {
+void cfvVerifyFunc(KProcess& proc, CS_Tool *self, const TQStringList& /* files */,
+ const TQString checksumFile, bool recursive, const TQString& stdoutFileName,
+ const TQString& stderrFileName, const TQString&type) {
proc.setUseShell(true, "/bin/bash");
proc << KrServices::fullPathName( self->binary ) << "-M";
if (recursive) proc << "-rr";
proc << "-U" << "-VV" << "-t" << type << "-f" << checksumFile << "1>" << stdoutFileName << "2>" << stderrFileName;// << files;
}
-QStringList cfvFailedFunc(const QStringList& /* stdOut */, const QStringList& stdErr) {
+TQStringList cfvFailedFunc(const TQStringList& /* stdOut */, const TQStringList& stdErr) {
// cfv dumps all failed hashes to stderr
return stdErr;
}
@@ -155,8 +155,8 @@ CS_Tool cs_tools[] = {
{CS_Tool::CRC, "cfv", true, false, cfvCreateFunc, cfvVerifyFunc, cfvFailedFunc},
};
-QMap<QString, CS_Tool::Type> cs_textToType;
-QMap<CS_Tool::Type, QString> cs_typeToText;
+TQMap<TQString, CS_Tool::Type> cs_textToType;
+TQMap<CS_Tool::Type, TQString> cs_typeToText;
void initChecksumModule() {
// prepare the dictionaries - pity it has to be manually
@@ -183,7 +183,7 @@ void initChecksumModule() {
cs_typeToText[CS_Tool::CRC]="crc";
// build the checksumFilter (for usage in KRQuery)
- QMap<QString, CS_Tool::Type>::Iterator it;
+ TQMap<TQString, CS_Tool::Type>::Iterator it;
for (it=cs_textToType.begin(); it!=cs_textToType.end(); ++it)
MatchChecksumDlg::checksumTypesFilter += ("*."+it.key()+" ");
}
@@ -192,8 +192,8 @@ void initChecksumModule() {
// returns a list of tools which can work with recursive or non-recursive mode and are installed
// note: only 1 tool from each type is suggested
-static QPtrList<CS_Tool> getTools(bool folders) {
- QPtrList<CS_Tool> result;
+static TQPtrList<CS_Tool> getTools(bool folders) {
+ TQPtrList<CS_Tool> result;
uint i;
for (i=0; i < sizeof(cs_tools)/sizeof(CS_Tool); ++i) {
if (result.last() && result.last()->type == cs_tools[i].type) continue; // 1 from each type please
@@ -207,13 +207,13 @@ static QPtrList<CS_Tool> getTools(bool folders) {
// ------------- CreateChecksumDlg
-CreateChecksumDlg::CreateChecksumDlg(const QStringList& files, bool containFolders, const QString& path):
+CreateChecksumDlg::CreateChecksumDlg(const TQStringList& files, bool containFolders, const TQString& path):
KDialogBase(Plain, i18n("Create Checksum"), Ok | Cancel, Ok, krApp) {
- QPtrList<CS_Tool> tools = getTools(containFolders);
+ TQPtrList<CS_Tool> tools = getTools(containFolders);
if (tools.count() == 0) { // nothing was suggested?!
- QString error = i18n("<qt>Can't calculate checksum since no supported tool was found. "
+ TQString error = i18n("<qt>Can't calculate checksum since no supported tool was found. "
"Please check the <b>Dependencies</b> page in Krusader's settings.</qt>");
if (containFolders)
error += i18n("<qt><b>Note</b>: you've selected directories, and probably have no recursive checksum tool installed."
@@ -222,40 +222,40 @@ CreateChecksumDlg::CreateChecksumDlg(const QStringList& files, bool containFolde
return;
}
- QGridLayout *layout = new QGridLayout( plainPage(), 1, 1,
+ TQGridLayout *tqlayout = new TQGridLayout( plainPage(), 1, 1,
KDialogBase::marginHint(), KDialogBase::spacingHint());
int row=0;
// title (icon+text)
- QHBoxLayout *hlayout = new QHBoxLayout(layout, KDialogBase::spacingHint());
- QLabel *p = new QLabel(plainPage());
+ TQHBoxLayout *htqlayout = new TQHBoxLayout(tqlayout, KDialogBase::spacingHint());
+ TQLabel *p = new TQLabel(plainPage());
p->setPixmap(krLoader->loadIcon("binary", KIcon::Desktop, 32));
- hlayout->addWidget(p);
- QLabel *l1 = new QLabel(i18n("About to calculate checksum for the following files") +
+ htqlayout->addWidget(p);
+ TQLabel *l1 = new TQLabel(i18n("About to calculate checksum for the following files") +
(containFolders ? i18n(" and folders:") : ":"), plainPage());
- hlayout->addWidget(l1);
- layout->addMultiCellLayout(hlayout, row, row, 0, 1, Qt::AlignLeft);
+ htqlayout->addWidget(l1);
+ tqlayout->addMultiCellLayout(htqlayout, row, row, 0, 1, TQt::AlignLeft);
++row;
// file list
KListBox *lb = new KListBox(plainPage());
lb->insertStringList(files);
- layout->addMultiCellWidget(lb, row, row, 0, 1);
+ tqlayout->addMultiCellWidget(lb, row, row, 0, 1);
++row;
// checksum method
- QHBoxLayout *hlayout2 = new QHBoxLayout(layout, KDialogBase::spacingHint());
- QLabel *l2 = new QLabel(i18n("Select the checksum method:"), plainPage());
- hlayout2->addWidget(l2);
+ TQHBoxLayout *htqlayout2 = new TQHBoxLayout(tqlayout, KDialogBase::spacingHint());
+ TQLabel *l2 = new TQLabel(i18n("Select the checksum method:"), plainPage());
+ htqlayout2->addWidget(l2);
KComboBox *method = new KComboBox(plainPage());
// -- fill the combo with available methods
uint i;
for ( i=0; i<tools.count(); ++i )
method->insertItem( cs_typeToText[tools.at(i)->type], i);
method->setFocus();
- hlayout2->addWidget(method);
- layout->addMultiCellLayout(hlayout2, row, row, 0, 1, Qt::AlignLeft);
+ htqlayout2->addWidget(method);
+ tqlayout->addMultiCellLayout(htqlayout2, row, row, 0, 1, TQt::AlignLeft);
++row;
if (exec() != Accepted) return;
@@ -264,34 +264,34 @@ CreateChecksumDlg::CreateChecksumDlg(const QStringList& files, bool containFolde
tmpErr = new KTempFile(locateLocal("tmp", "krusader"), ".stderr" );
KProcess proc;
CS_Tool *mytool = tools.at(method->currentItem());
- mytool->create(proc, mytool, KrServices::quote(files), QString::null, containFolders,
+ mytool->create(proc, mytool, KrServices::quote(files), TQString(), containFolders,
tmpOut->name(), tmpErr->name(), method->currentText());
krApp->startWaiting(i18n("Calculating checksums ..."), 0, true);
- QApplication::setOverrideCursor( KCursor::waitCursor() );
+ TQApplication::setOverrideCursor( KCursor::waitCursor() );
bool r = proc.start(KProcess::NotifyOnExit, KProcess::AllOutput);
if (r) while ( proc.isRunning() ) {
usleep( 500 );
- qApp->processEvents();
+ tqApp->processEvents();
if (krApp->wasWaitingCancelled()) { // user cancelled
proc.kill();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return;
}
};
krApp->stopWait();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if (!r || !proc.normalExit()) {
- KMessageBox::error(0, i18n("<qt>There was an error while running <b>%1</b>.</qt>").arg(mytool->binary));
+ KMessageBox::error(0, i18n("<qt>There was an error while running <b>%1</b>.</qt>").tqarg(mytool->binary));
return;
}
// suggest a filename
- QString suggestedFilename = path + '/';
+ TQString suggestedFilename = path + '/';
if (files.count() > 1) suggestedFilename += ("checksum." + cs_typeToText[mytool->type]);
else suggestedFilename += (files[0] + '.' + cs_typeToText[mytool->type]);
// send both stdout and stderr
- QStringList stdOut, stdErr;
+ TQStringList stdOut, stdErr;
if (!KrServices::fileToStringList(tmpOut->textStream(), stdOut) ||
!KrServices::fileToStringList(tmpErr->textStream(), stdErr)) {
KMessageBox::error(krApp, i18n("Error reading stdout or stderr"));
@@ -305,16 +305,16 @@ CreateChecksumDlg::CreateChecksumDlg(const QStringList& files, bool containFolde
// ------------- MatchChecksumDlg
-QString MatchChecksumDlg::checksumTypesFilter;
+TQString MatchChecksumDlg::checksumTypesFilter;
-MatchChecksumDlg::MatchChecksumDlg(const QStringList& files, bool containFolders,
- const QString& path, const QString& checksumFile):
+MatchChecksumDlg::MatchChecksumDlg(const TQStringList& files, bool containFolders,
+ const TQString& path, const TQString& checksumFile):
KDialogBase(Plain, i18n("Verify Checksum"), Ok | Cancel, Ok, krApp) {
- QPtrList<CS_Tool> tools = getTools(containFolders);
+ TQPtrList<CS_Tool> tools = getTools(containFolders);
if (tools.count() == 0) { // nothing was suggested?!
- QString error = i18n("<qt>Can't verify checksum since no supported tool was found. "
+ TQString error = i18n("<qt>Can't verify checksum since no supported tool was found. "
"Please check the <b>Dependencies</b> page in Krusader's settings.</qt>");
if (containFolders)
error += i18n("<qt><b>Note</b>: you've selected directories, and probably have no recursive checksum tool installed."
@@ -323,45 +323,45 @@ MatchChecksumDlg::MatchChecksumDlg(const QStringList& files, bool containFolders
return;
}
- QGridLayout *layout = new QGridLayout( plainPage(), 1, 1,
+ TQGridLayout *tqlayout = new TQGridLayout( plainPage(), 1, 1,
KDialogBase::marginHint(), KDialogBase::spacingHint());
int row=0;
// title (icon+text)
- QHBoxLayout *hlayout = new QHBoxLayout(layout, KDialogBase::spacingHint());
- QLabel *p = new QLabel(plainPage());
+ TQHBoxLayout *htqlayout = new TQHBoxLayout(tqlayout, KDialogBase::spacingHint());
+ TQLabel *p = new TQLabel(plainPage());
p->setPixmap(krLoader->loadIcon("binary", KIcon::Desktop, 32));
- hlayout->addWidget(p);
- QLabel *l1 = new QLabel(i18n("About to verify checksum for the following files") +
+ htqlayout->addWidget(p);
+ TQLabel *l1 = new TQLabel(i18n("About to verify checksum for the following files") +
(containFolders ? i18n(" and folders:") : ":"), plainPage());
- hlayout->addWidget(l1);
- layout->addMultiCellLayout(hlayout, row, row, 0, 1, Qt::AlignLeft);
+ htqlayout->addWidget(l1);
+ tqlayout->addMultiCellLayout(htqlayout, row, row, 0, 1, TQt::AlignLeft);
++row;
// file list
KListBox *lb = new KListBox(plainPage());
lb->insertStringList(files);
- layout->addMultiCellWidget(lb, row, row, 0, 1);
+ tqlayout->addMultiCellWidget(lb, row, row, 0, 1);
++row;
// checksum file
- QHBoxLayout *hlayout2 = new QHBoxLayout(layout, KDialogBase::spacingHint());
- QLabel *l2 = new QLabel(i18n("Checksum file:"), plainPage());
- hlayout2->addWidget(l2);
+ TQHBoxLayout *htqlayout2 = new TQHBoxLayout(tqlayout, KDialogBase::spacingHint());
+ TQLabel *l2 = new TQLabel(i18n("Checksum file:"), plainPage());
+ htqlayout2->addWidget(l2);
KURLRequester *checksumFileReq = new KURLRequester( plainPage() );
if (!checksumFile.isEmpty())
checksumFileReq->setURL(checksumFile);
checksumFileReq->fileDialog()->setURL(path);
checksumFileReq->setFocus();
- hlayout2->addWidget(checksumFileReq);
- layout->addMultiCellLayout(hlayout2, row, row, 0, 1, Qt::AlignLeft);
+ htqlayout2->addWidget(checksumFileReq);
+ tqlayout->addMultiCellLayout(htqlayout2, row, row, 0, 1, TQt::AlignLeft);
if (exec() != Accepted) return;
- QString file = checksumFileReq->url();
- QString extension;
+ TQString file = checksumFileReq->url();
+ TQString extension;
if (!verifyChecksumFile(file, extension)) {
- KMessageBox::error(0, i18n("<qt>Error reading checksum file <i>%1</i>.<br />Please specify a valid checksum file.</qt>").arg(file));
+ KMessageBox::error(0, i18n("<qt>Error reading checksum file <i>%1</i>.<br />Please specify a valid checksum file.</qt>").tqarg(file));
return;
}
@@ -374,7 +374,7 @@ MatchChecksumDlg::MatchChecksumDlg(const QStringList& files, bool containFolders
break;
}
if (!mytool) {
- KMessageBox::error(0, i18n("<qt>Krusader can't find a checksum tool that handles %1 on your system. Please check the <b>Dependencies</b> page in Krusader's settings.</qt>").arg(extension));
+ KMessageBox::error(0, i18n("<qt>Krusader can't find a checksum tool that handles %1 on your system. Please check the <b>Dependencies</b> page in Krusader's settings.</qt>").tqarg(extension));
return;
}
@@ -384,25 +384,25 @@ MatchChecksumDlg::MatchChecksumDlg(const QStringList& files, bool containFolders
KProcess proc;
mytool->verify(proc, mytool, KrServices::quote(files), KrServices::quote(file), containFolders, tmpOut->name(), tmpErr->name(), extension);
krApp->startWaiting(i18n("Verifying checksums ..."), 0, true);
- QApplication::setOverrideCursor( KCursor::waitCursor() );
+ TQApplication::setOverrideCursor( KCursor::waitCursor() );
bool r = proc.start(KProcess::NotifyOnExit, KProcess::AllOutput);
if (r) while ( proc.isRunning() ) {
usleep( 500 );
- qApp->processEvents();
+ tqApp->processEvents();
if (krApp->wasWaitingCancelled()) { // user cancelled
proc.kill();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return;
}
};
if (!r || !proc.normalExit()) {
- KMessageBox::error(0, i18n("<qt>There was an error while running <b>%1</b>.</qt>").arg(mytool->binary));
+ KMessageBox::error(0, i18n("<qt>There was an error while running <b>%1</b>.</qt>").tqarg(mytool->binary));
return;
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
krApp->stopWait();
// send both stdout and stderr
- QStringList stdOut,stdErr;
+ TQStringList stdOut,stdErr;
if (!KrServices::fileToStringList(tmpOut->textStream(), stdOut) ||
!KrServices::fileToStringList(tmpErr->textStream(), stdErr)) {
KMessageBox::error(krApp, i18n("Error reading stdout or stderr"));
@@ -413,11 +413,11 @@ MatchChecksumDlg::MatchChecksumDlg(const QStringList& files, bool containFolders
tmpErr->unlink(); delete tmpErr;
}
-bool MatchChecksumDlg::verifyChecksumFile(QString path, QString& extension) {
- QFileInfo f(path);
+bool MatchChecksumDlg::verifyChecksumFile(TQString path, TQString& extension) {
+ TQFileInfo f(path);
if (!f.exists() || f.isDir()) return false;
// find the extension
- extension = path.mid(path.findRev(".")+1);
+ extension = path.mid(path.tqfindRev(".")+1);
// TODO: do we know the extension? if not, ask the user for one
@@ -426,33 +426,33 @@ bool MatchChecksumDlg::verifyChecksumFile(QString path, QString& extension) {
}
// ------------- VerifyResultDlg
-VerifyResultDlg::VerifyResultDlg(const QStringList& failed):
+VerifyResultDlg::VerifyResultDlg(const TQStringList& failed):
KDialogBase(Plain, i18n("Verify Checksum"), Close, Close, krApp) {
- QGridLayout *layout = new QGridLayout( plainPage(), 1, 1,
+ TQGridLayout *tqlayout = new TQGridLayout( plainPage(), 1, 1,
KDialogBase::marginHint(), KDialogBase::spacingHint());
bool errors = failed.size()>0;
int row = 0;
// create the icon and title
- QHBoxLayout *hlayout = new QHBoxLayout(layout, KDialogBase::spacingHint());
- QLabel p(plainPage());
+ TQHBoxLayout *htqlayout = new TQHBoxLayout(tqlayout, KDialogBase::spacingHint());
+ TQLabel p(plainPage());
p.setPixmap(krLoader->loadIcon(errors ? "messagebox_critical" : "messagebox_info", KIcon::Desktop, 32));
- hlayout->addWidget(&p);
+ htqlayout->addWidget(&p);
- QLabel *l1 = new QLabel((errors ? i18n("Errors were detected while verifying the checksums") :
+ TQLabel *l1 = new TQLabel((errors ? i18n("Errors were detected while verifying the checksums") :
i18n("Checksums were verified successfully")), plainPage());
- hlayout->addWidget(l1);
- layout->addMultiCellLayout(hlayout,row,row,0,1, Qt::AlignLeft);
+ htqlayout->addWidget(l1);
+ tqlayout->addMultiCellLayout(htqlayout,row,row,0,1, TQt::AlignLeft);
++row;
if (errors) {
- QLabel *l3 = new QLabel(i18n("The following files have failed:"), plainPage());
- layout->addMultiCellWidget(l3, row, row, 0, 1);
+ TQLabel *l3 = new TQLabel(i18n("The following files have failed:"), plainPage());
+ tqlayout->addMultiCellWidget(l3, row, row, 0, 1);
++row;
KListBox *lb2 = new KListBox(plainPage());
lb2->insertStringList(failed);
- layout->addMultiCellWidget(lb2, row, row, 0, 1);
+ tqlayout->addMultiCellWidget(lb2, row, row, 0, 1);
++row;
}
@@ -461,10 +461,10 @@ VerifyResultDlg::VerifyResultDlg(const QStringList& failed):
// ------------- ChecksumResultsDlg
-ChecksumResultsDlg::ChecksumResultsDlg(const QStringList& stdOut, const QStringList& stdErr,
- const QString& suggestedFilename, const QString& binary, const QString& /* type */, bool standardFormat):
+ChecksumResultsDlg::ChecksumResultsDlg(const TQStringList& stdOut, const TQStringList& stdErr,
+ const TQString& suggestedFilename, const TQString& binary, const TQString& /* type */, bool standardFormat):
KDialogBase(Plain, i18n("Create Checksum"), Ok | Cancel, Ok, krApp), _binary(binary) {
- QGridLayout *layout = new QGridLayout( plainPage(), 1, 1,
+ TQGridLayout *tqlayout = new TQGridLayout( plainPage(), 1, 1,
KDialogBase::marginHint(), KDialogBase::spacingHint());
// md5 tools display errors into stderr, so we'll use that to determine the result of the job
@@ -473,21 +473,21 @@ ChecksumResultsDlg::ChecksumResultsDlg(const QStringList& stdOut, const QStringL
int row = 0;
// create the icon and title
- QHBoxLayout *hlayout = new QHBoxLayout(layout, KDialogBase::spacingHint());
- QLabel p(plainPage());
+ TQHBoxLayout *htqlayout = new TQHBoxLayout(tqlayout, KDialogBase::spacingHint());
+ TQLabel p(plainPage());
p.setPixmap(krLoader->loadIcon(errors ? "messagebox_critical" : "messagebox_info", KIcon::Desktop, 32));
- hlayout->addWidget(&p);
+ htqlayout->addWidget(&p);
- QLabel *l1 = new QLabel((errors ? i18n("Errors were detected while creating the checksums") :
+ TQLabel *l1 = new TQLabel((errors ? i18n("Errors were detected while creating the checksums") :
i18n("Checksums were created successfully")), plainPage());
- hlayout->addWidget(l1);
- layout->addMultiCellLayout(hlayout,row,row,0,1, Qt::AlignLeft);
+ htqlayout->addWidget(l1);
+ tqlayout->addMultiCellLayout(htqlayout,row,row,0,1, TQt::AlignLeft);
++row;
if (successes) {
if (errors) {
- QLabel *l2 = new QLabel(i18n("Here are the calculated checksums:"), plainPage());
- layout->addMultiCellWidget(l2, row, row, 0, 1);
+ TQLabel *l2 = new TQLabel(i18n("Here are the calculated checksums:"), plainPage());
+ tqlayout->addMultiCellWidget(l2, row, row, 0, 1);
++row;
}
KListView *lv = new KListView(plainPage());
@@ -498,101 +498,101 @@ ChecksumResultsDlg::ChecksumResultsDlg(const QStringList& stdOut, const QStringL
} else {
lv->addColumn(i18n("File and hash"));
}
- for ( QStringList::ConstIterator it = stdOut.begin(); it != stdOut.end(); ++it ) {
- QString line = (*it);
+ for ( TQStringList::ConstIterator it = stdOut.begin(); it != stdOut.end(); ++it ) {
+ TQString line = (*it);
if(standardFormat) {
- int space = line.find(' ');
+ int space = line.tqfind(' ');
new KListViewItem(lv, line.left(space), line.mid(space+2));
} else {
new KListViewItem(lv, line);
}
}
- layout->addMultiCellWidget(lv, row, row, 0, 1);
+ tqlayout->addMultiCellWidget(lv, row, row, 0, 1);
++row;
}
if (errors) {
- QFrame *line1 = new QFrame( plainPage() );
- line1->setGeometry( QRect( 60, 210, 501, 20 ) );
- line1->setFrameShape( QFrame::HLine );
- line1->setFrameShadow( QFrame::Sunken );
- layout->addMultiCellWidget(line1, row, row, 0, 1);
+ TQFrame *line1 = new TQFrame( plainPage() );
+ line1->setGeometry( TQRect( 60, 210, 501, 20 ) );
+ line1->setFrameShape( TQFrame::HLine );
+ line1->setFrameShadow( TQFrame::Sunken );
+ tqlayout->addMultiCellWidget(line1, row, row, 0, 1);
++row;
- QLabel *l3 = new QLabel(i18n("Here are the errors received:"), plainPage());
- layout->addMultiCellWidget(l3, row, row, 0, 1);
+ TQLabel *l3 = new TQLabel(i18n("Here are the errors received:"), plainPage());
+ tqlayout->addMultiCellWidget(l3, row, row, 0, 1);
++row;
KListBox *lb = new KListBox(plainPage());
lb->insertStringList(stdErr);
- layout->addMultiCellWidget(lb, row, row, 0, 1);
+ tqlayout->addMultiCellWidget(lb, row, row, 0, 1);
++row;
}
// save checksum to disk, if any hashes are found
KURLRequester *checksumFile=0;
- QCheckBox *saveFileCb=0;
+ TQCheckBox *saveFileCb=0;
if (successes) {
- QHBoxLayout *hlayout2 = new QHBoxLayout(layout, KDialogBase::spacingHint());
- saveFileCb = new QCheckBox(i18n("Save checksum to file:"), plainPage());
+ TQHBoxLayout *htqlayout2 = new TQHBoxLayout(tqlayout, KDialogBase::spacingHint());
+ saveFileCb = new TQCheckBox(i18n("Save checksum to file:"), plainPage());
saveFileCb->setChecked(true);
- hlayout2->addWidget(saveFileCb);
+ htqlayout2->addWidget(saveFileCb);
checksumFile = new KURLRequester( suggestedFilename, plainPage() );
- hlayout2->addWidget(checksumFile, Qt::AlignLeft);
- layout->addMultiCellLayout(hlayout2, row, row,0,1, Qt::AlignLeft);
+ htqlayout2->addWidget(checksumFile, TQt::AlignLeft);
+ tqlayout->addMultiCellLayout(htqlayout2, row, row,0,1, TQt::AlignLeft);
++row;
- connect(saveFileCb, SIGNAL(toggled(bool)), checksumFile, SLOT(setEnabled(bool)));
+ connect(saveFileCb, TQT_SIGNAL(toggled(bool)), checksumFile, TQT_SLOT(setEnabled(bool)));
checksumFile->setFocus();
}
- QCheckBox *onePerFile=0;
+ TQCheckBox *onePerFile=0;
if (stdOut.size() > 1 && standardFormat) {
- onePerFile = new QCheckBox(i18n("Checksum file for each source file"), plainPage());
+ onePerFile = new TQCheckBox(i18n("Checksum file for each source file"), plainPage());
onePerFile->setChecked(false);
// clicking this, disables the 'save as' part
- connect(onePerFile, SIGNAL(toggled(bool)), saveFileCb, SLOT(toggle()));
- connect(onePerFile, SIGNAL(toggled(bool)), saveFileCb, SLOT(setDisabled(bool)));
- connect(onePerFile, SIGNAL(toggled(bool)), checksumFile, SLOT(setDisabled(bool)));
- layout->addMultiCellWidget(onePerFile, row, row,0,1, Qt::AlignLeft);
+ connect(onePerFile, TQT_SIGNAL(toggled(bool)), saveFileCb, TQT_SLOT(toggle()));
+ connect(onePerFile, TQT_SIGNAL(toggled(bool)), saveFileCb, TQT_SLOT(setDisabled(bool)));
+ connect(onePerFile, TQT_SIGNAL(toggled(bool)), checksumFile, TQT_SLOT(setDisabled(bool)));
+ tqlayout->addMultiCellWidget(onePerFile, row, row,0,1, TQt::AlignLeft);
++row;
}
if (exec() == Accepted && successes) {
if (stdOut.size()>1 && standardFormat && onePerFile->isChecked()) {
- savePerFile(stdOut, suggestedFilename.mid(suggestedFilename.findRev('.')));
+ savePerFile(stdOut, suggestedFilename.mid(suggestedFilename.tqfindRev('.')));
} else if (saveFileCb->isEnabled() && saveFileCb->isChecked() && !checksumFile->url().simplifyWhiteSpace().isEmpty()) {
saveChecksum(stdOut, checksumFile->url());
}
}
}
-bool ChecksumResultsDlg::saveChecksum(const QStringList& data, QString filename) {
- if (QFile::exists(filename) &&
+bool ChecksumResultsDlg::saveChecksum(const TQStringList& data, TQString filename) {
+ if (TQFile::exists(filename) &&
KMessageBox::warningContinueCancel(this,
- i18n("File %1 already exists.\nAre you sure you want to overwrite it?").arg(filename),
+ i18n("File %1 already exists.\nAre you sure you want to overwrite it?").tqarg(filename),
i18n("Warning"), i18n("Overwrite")) != KMessageBox::Continue) {
// find a better name to save to
- filename = KFileDialog::getSaveFileName(QString::null, "*", 0, i18n("Select a file to save to"));
+ filename = KFileDialog::getSaveFileName(TQString(), "*", 0, i18n("Select a file to save to"));
if (filename.simplifyWhiteSpace().isEmpty()) return false;
}
- QFile file(filename);
+ TQFile file(filename);
if (!file.open(IO_WriteOnly)) {
- KMessageBox::detailedError(0, i18n("Error saving file %1").arg(filename),
+ KMessageBox::detailedError(0, i18n("Error saving file %1").tqarg(filename),
file.errorString());
return false;
}
- QTextStream stream(&file);
- for ( QStringList::ConstIterator it = data.constBegin(); it != data.constEnd(); ++it)
+ TQTextStream stream(&file);
+ for ( TQStringList::ConstIterator it = data.constBegin(); it != data.constEnd(); ++it)
stream << *it << "\n";
file.close();
return true;
}
-void ChecksumResultsDlg::savePerFile(const QStringList& data, const QString& type) {
+void ChecksumResultsDlg::savePerFile(const TQStringList& data, const TQString& type) {
krApp->startWaiting(i18n("Saving checksum files..."), 0);
- for ( QStringList::ConstIterator it = data.begin(); it != data.end(); ++it ) {
- QString line = (*it);
- QString filename = line.mid(line.find(' ')+2)+type;
+ for ( TQStringList::ConstIterator it = data.begin(); it != data.end(); ++it ) {
+ TQString line = (*it);
+ TQString filename = line.mid(line.tqfind(' ')+2)+type;
if (!saveChecksum(*it, filename)) {
KMessageBox::error(0, i18n("Errors occured while saving multiple checksums. Stopping"));
krApp->stopWait();
diff --git a/krusader/Dialogs/checksumdlg.h b/krusader/Dialogs/checksumdlg.h
index 41bb1ad..a145a35 100644
--- a/krusader/Dialogs/checksumdlg.h
+++ b/krusader/Dialogs/checksumdlg.h
@@ -2,14 +2,14 @@
#define CHECKSUMDLG_H
#include <kdialogbase.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class KTempFile;
extern void initChecksumModule();
class CreateChecksumDlg: public KDialogBase {
public:
- CreateChecksumDlg(const QStringList& files, bool containFolders, const QString& path);
+ CreateChecksumDlg(const TQStringList& files, bool containFolders, const TQString& path);
private:
KTempFile *tmpOut, *tmpErr;
@@ -18,13 +18,13 @@ private:
class MatchChecksumDlg: public KDialogBase {
public:
- MatchChecksumDlg(const QStringList& files, bool containFolders,
- const QString& path, const QString& checksumFile=QString::null);
+ MatchChecksumDlg(const TQStringList& files, bool containFolders,
+ const TQString& path, const TQString& checksumFile=TQString());
- static QString checksumTypesFilter;
+ static TQString checksumTypesFilter;
protected:
- bool verifyChecksumFile(QString path, QString& extension);
+ bool verifyChecksumFile(TQString path, TQString& extension);
private:
KTempFile *tmpOut, *tmpErr;
@@ -33,22 +33,22 @@ private:
class ChecksumResultsDlg: public KDialogBase {
public:
- ChecksumResultsDlg(const QStringList& stdOut, const QStringList& stdErr,
- const QString& suggestedFilename, const QString& binary, const QString& type,
+ ChecksumResultsDlg(const TQStringList& stdOut, const TQStringList& stdErr,
+ const TQString& suggestedFilename, const TQString& binary, const TQString& type,
bool standardFormat);
protected:
- bool saveChecksum(const QStringList& data, QString filename);
- void savePerFile(const QStringList& data, const QString& type);
+ bool saveChecksum(const TQStringList& data, TQString filename);
+ void savePerFile(const TQStringList& data, const TQString& type);
private:
- QString _binary;
+ TQString _binary;
};
class VerifyResultDlg: public KDialogBase {
public:
- VerifyResultDlg(const QStringList& failed);
+ VerifyResultDlg(const TQStringList& failed);
};
#endif // CHECKSUMDLG_H
diff --git a/krusader/Dialogs/krdialogs.cpp b/krusader/Dialogs/krdialogs.cpp
index cbcc294..56d60b2 100644
--- a/krusader/Dialogs/krdialogs.cpp
+++ b/krusader/Dialogs/krdialogs.cpp
@@ -32,11 +32,11 @@
// Krusader includes
#include "krdialogs.h"
// QT includes
-#include <qmessagebox.h>
-#include <qwidget.h>
-#include <qapplication.h>
-#include <qfontmetrics.h>
-#include <qtooltip.h>
+#include <tqmessagebox.h>
+#include <tqwidget.h>
+#include <tqapplication.h>
+#include <tqfontmetrics.h>
+#include <tqtooltip.h>
// KDE includes
#include <klocale.h>
#include <kurlcompletion.h>
@@ -46,21 +46,21 @@
#include <kurlrequester.h>
#include <kstandarddirs.h>
#include <kdeversion.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <krecentdocument.h>
-#include <qhbox.h>
+#include <tqhbox.h>
// Krusader includes
#include "../krusader.h"
#include "../resources.h"
#include "../VFS/vfs.h"
#include "../defaults.h"
-#include <qdir.h>
+#include <tqdir.h>
-KURL KChooseDir::getDir(QString text,const KURL& url, const KURL& cwd) {
+KURL KChooseDir::getDir(TQString text,const KURL& url, const KURL& cwd) {
KURLRequesterDlg *dlg = new KURLRequesterDlg( vfs::pathOrURL( url, 1 ),text,krApp,"");
dlg->urlRequester()->completionObject()->setDir(cwd.url());
KURL u;
- if (dlg->exec() == QDialog::Accepted) {
+ if (dlg->exec() == TQDialog::Accepted) {
u = vfs::fromPathOrURL(dlg->urlRequester()->completionObject()->replacedPath(
dlg->urlRequester()->lineEdit()->text()));
if (u.isRelativeURL(u.url())) {
@@ -69,7 +69,7 @@ KURL KChooseDir::getDir(QString text,const KURL& url, const KURL& cwd) {
u.addPath(temp.url());
u.cleanPath();
if( u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso" ) {
- if( QDir( u.path() ).exists() )
+ if( TQDir( u.path() ).exists() )
u.setProtocol( "file" );
}
}
@@ -78,11 +78,11 @@ KURL KChooseDir::getDir(QString text,const KURL& url, const KURL& cwd) {
return u;
}
-KURL KChooseDir::getDir(QString text,const KURL& url, const KURL& cwd, bool &preserveAttrs ) {
+KURL KChooseDir::getDir(TQString text,const KURL& url, const KURL& cwd, bool &preserveAttrs ) {
KURLRequesterDlgForCopy *dlg = new KURLRequesterDlgForCopy( vfs::pathOrURL( url, 1 ),text, preserveAttrs, krApp,"" );
dlg->urlRequester()->completionObject()->setDir(cwd.url());
KURL u;
- if (dlg->exec() == QDialog::Accepted) {
+ if (dlg->exec() == TQDialog::Accepted) {
u = vfs::fromPathOrURL(dlg->urlRequester()->completionObject()->replacedPath(
dlg->urlRequester()->lineEdit()->text()));
if (u.isRelativeURL(u.url())) {
@@ -91,7 +91,7 @@ KURL KChooseDir::getDir(QString text,const KURL& url, const KURL& cwd, bool &pre
u.addPath(temp.url());
u.cleanPath();
if( u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso" ) {
- if( QDir( u.path() ).exists() )
+ if( TQDir( u.path() ).exists() )
u.setProtocol( "file" );
}
}
@@ -101,11 +101,11 @@ KURL KChooseDir::getDir(QString text,const KURL& url, const KURL& cwd, bool &pre
return u;
}
-KURL KChooseDir::getDir(QString text,const KURL& url, const KURL& cwd, bool &preserveAttrs, KURL &baseURL ) {
+KURL KChooseDir::getDir(TQString text,const KURL& url, const KURL& cwd, bool &preserveAttrs, KURL &baseURL ) {
KURLRequesterDlgForCopy *dlg = new KURLRequesterDlgForCopy( vfs::pathOrURL( url, 1 ),text, preserveAttrs, krApp,"", true, baseURL );
dlg->urlRequester()->completionObject()->setDir(cwd.url());
KURL u;
- if (dlg->exec() == QDialog::Accepted) {
+ if (dlg->exec() == TQDialog::Accepted) {
u = vfs::fromPathOrURL(dlg->urlRequester()->completionObject()->replacedPath(
dlg->urlRequester()->lineEdit()->text()));
if (u.isRelativeURL(u.url())) {
@@ -114,7 +114,7 @@ KURL KChooseDir::getDir(QString text,const KURL& url, const KURL& cwd, bool &pre
u.addPath(temp.url());
u.cleanPath();
if( u.protocol() == "zip" || u.protocol() == "krarc" || u.protocol() == "tar" || u.protocol() == "iso" ) {
- if( QDir( u.path() ).exists() )
+ if( TQDir( u.path() ).exists() )
u.setProtocol( "file" );
}
}
@@ -130,39 +130,39 @@ KURL KChooseDir::getDir(QString text,const KURL& url, const KURL& cwd, bool &pre
return u;
}
-KURLRequesterDlgForCopy::KURLRequesterDlgForCopy( const QString& urlName, const QString& _text, bool presAttrs, QWidget *parent,
+KURLRequesterDlgForCopy::KURLRequesterDlgForCopy( const TQString& urlName, const TQString& _text, bool presAttrs, TQWidget *tqparent,
const char *name, bool modal, KURL baseURL )
- : KDialogBase( Plain, QString::null, Ok|Cancel|User1, Ok, parent, name, modal, true, KStdGuiItem::clear() ),
+ : KDialogBase( Plain, TQString(), Ok|Cancel|User1, Ok, tqparent, name, modal, true, KStdGuiItem::clear() ),
baseUrlCombo( 0 ), copyDirStructureCB( 0 ) {
- QVBoxLayout * topLayout = new QVBoxLayout( plainPage(), 0, spacingHint() );
+ TQVBoxLayout * topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
- QLabel * label = new QLabel( _text, plainPage() );
+ TQLabel * label = new TQLabel( _text, plainPage() );
topLayout->addWidget( label );
urlRequester_ = new KURLRequester( urlName, plainPage(), "urlRequester" );
- urlRequester_->setMinimumWidth( urlRequester_->sizeHint().width() * 3 );
+ urlRequester_->setMinimumWidth( urlRequester_->tqsizeHint().width() * 3 );
topLayout->addWidget( urlRequester_ );
- preserveAttrsCB = new QCheckBox(i18n("Preserve attributes (only for local targets)"), plainPage());
+ preserveAttrsCB = new TQCheckBox(i18n("Preserve attributes (only for local targets)"), plainPage());
preserveAttrsCB->setChecked( presAttrs );
topLayout->addWidget( preserveAttrsCB );
if( !baseURL.isEmpty() ) {
- QFrame *line = new QFrame( plainPage(), "sepLine" );
- line->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame *line = new TQFrame( plainPage(), "sepLine" );
+ line->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
topLayout->addWidget( line );
- copyDirStructureCB = new QCheckBox(i18n("Keep virtual directory structure"), plainPage());
- connect( copyDirStructureCB, SIGNAL( toggled( bool ) ), this, SLOT( slotDirStructCBChanged() ) );
+ copyDirStructureCB = new TQCheckBox(i18n("Keep virtual directory structure"), plainPage());
+ connect( copyDirStructureCB, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotDirStructCBChanged() ) );
copyDirStructureCB->setChecked( false );
topLayout->addWidget( copyDirStructureCB );
- QHBox * hbox = new QHBox( plainPage(), "copyDirStructure" );
- new QLabel( i18n("Base URL:"), hbox, "baseURLLabel" );
+ TQHBox * hbox = new TQHBox( plainPage(), "copyDirStructure" );
+ new TQLabel( i18n("Base URL:"), hbox, "baseURLLabel" );
- baseUrlCombo = new QComboBox( hbox, "baseUrlRequester" );
- baseUrlCombo->setMinimumWidth( baseUrlCombo->sizeHint().width() * 3 );
+ baseUrlCombo = new TQComboBox( hbox, "baseUrlRequester" );
+ baseUrlCombo->setMinimumWidth( baseUrlCombo->tqsizeHint().width() * 3 );
baseUrlCombo->setEnabled( copyDirStructureCB->isChecked() );
KURL temp = baseURL, tempOld;
do {
- QString baseURLText = vfs::pathOrURL( temp );
+ TQString baseURLText = vfs::pathOrURL( temp );
baseUrlCombo->insertItem( baseURLText );
tempOld = temp;
temp = temp.upURL();
@@ -172,12 +172,12 @@ KURLRequesterDlgForCopy::KURLRequesterDlgForCopy( const QString& urlName, const
topLayout->addWidget( hbox );
}
urlRequester_->setFocus();
- connect( urlRequester_->lineEdit(), SIGNAL(textChanged(const QString&)),
- SLOT(slotTextChanged(const QString&)) );
+ connect( urlRequester_->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotTextChanged(const TQString&)) );
bool state = !urlName.isEmpty();
enableButtonOK( state );
enableButton( KDialogBase::User1, state );
- connect( this, SIGNAL( user1Clicked() ), SLOT( slotClear() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotClear() ) );
}
KURLRequesterDlgForCopy::KURLRequesterDlgForCopy() {
@@ -193,7 +193,7 @@ bool KURLRequesterDlgForCopy::copyDirStructure() {
return copyDirStructureCB->isChecked();
}
-void KURLRequesterDlgForCopy::slotTextChanged(const QString & text) {
+void KURLRequesterDlgForCopy::slotTextChanged(const TQString & text) {
bool state = !text.stripWhiteSpace().isEmpty();
enableButtonOK( state );
enableButton( KDialogBase::User1, state );
@@ -208,7 +208,7 @@ void KURLRequesterDlgForCopy::slotDirStructCBChanged() {
}
KURL KURLRequesterDlgForCopy::selectedURL() const {
- if ( result() == QDialog::Accepted ) {
+ if ( result() == TQDialog::Accepted ) {
KURL url = KURL::fromPathOrURL( urlRequester_->url() );
if( url.isValid() )
KRecentDocument::add(url);
@@ -228,26 +228,26 @@ KURL KURLRequesterDlgForCopy::baseURL() const {
return vfs::fromPathOrURL( baseUrlCombo->currentText() );
}
-KRGetDate::KRGetDate(QDate date, QWidget *parent, const char *name) : KDialog(parent, name,true,WStyle_DialogBorder) {
+KRGetDate::KRGetDate(TQDate date, TQWidget *tqparent, const char *name) : KDialog(tqparent, name,true,WStyle_DialogBorder) {
dateWidget = new KDatePicker(this, date);
- dateWidget->resize(dateWidget->sizeHint());
- setMinimumSize(dateWidget->sizeHint());
- setMaximumSize(dateWidget->sizeHint());
- resize(minimumSize());
- connect(dateWidget, SIGNAL(dateSelected(QDate)), this, SLOT(setDate(QDate)));
- connect(dateWidget, SIGNAL(dateEntered(QDate)), this, SLOT(setDate(QDate)));
+ dateWidget->resize(dateWidget->tqsizeHint());
+ setMinimumSize(dateWidget->tqsizeHint());
+ setMaximumSize(dateWidget->tqsizeHint());
+ resize(tqminimumSize());
+ connect(dateWidget, TQT_SIGNAL(dateSelected(TQDate)), this, TQT_SLOT(setDate(TQDate)));
+ connect(dateWidget, TQT_SIGNAL(dateEntered(TQDate)), this, TQT_SLOT(setDate(TQDate)));
// keep the original date - incase ESC is pressed
originalDate = date;
}
-QDate KRGetDate::getDate() {
- if (exec() == QDialog::Rejected) chosenDate.setYMD(0,0,0);
+TQDate KRGetDate::getDate() {
+ if (exec() == TQDialog::Rejected) chosenDate.setYMD(0,0,0);
hide();
return chosenDate;
}
-void KRGetDate::setDate(QDate date) {
+void KRGetDate::setDate(TQDate date) {
chosenDate = date;
accept();
}
diff --git a/krusader/Dialogs/krdialogs.h b/krusader/Dialogs/krdialogs.h
index 9f85131..ae33575 100644
--- a/krusader/Dialogs/krdialogs.h
+++ b/krusader/Dialogs/krdialogs.h
@@ -38,16 +38,16 @@
#include <kdatepicker.h>
#include <kdialogbase.h>
// QT includes
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qdatetime.h>
-#include <qpixmap.h>
-#include <qprogressdialog.h>
-#include <qsemimodal.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqdatetime.h>
+#include <tqpixmap.h>
+#include <tqprogressdialog.h>
+#include <tqsemimodal.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
/** \class KChooseDir
* Used for asking the user for a folder.
@@ -69,16 +69,17 @@ public:
* \param cwd - a path which is the current working directory (usually ACTIVE_PANEL->virtualPath()).
* this is used for completion of partial urls
*/
- static KURL getDir(QString text,const KURL& url, const KURL& cwd);
- static KURL getDir(QString text,const KURL& url, const KURL& cwd, bool & preserveAttrs );
- static KURL getDir(QString text,const KURL& url, const KURL& cwd, bool & preserveAttrs, KURL &baseURL );
+ static KURL getDir(TQString text,const KURL& url, const KURL& cwd);
+ static KURL getDir(TQString text,const KURL& url, const KURL& cwd, bool & preserveAttrs );
+ static KURL getDir(TQString text,const KURL& url, const KURL& cwd, bool & preserveAttrs, KURL &baseURL );
};
class KURLRequesterDlgForCopy : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- KURLRequesterDlgForCopy( const QString& url, const QString& text, bool presAttrs,
- QWidget *parent, const char *name, bool modal=true, KURL baseURL = KURL() );
+ KURLRequesterDlgForCopy( const TQString& url, const TQString& text, bool presAttrs,
+ TQWidget *tqparent, const char *name, bool modal=true, KURL baseURL = KURL() );
KURLRequesterDlgForCopy();
KURL selectedURL() const;
@@ -89,27 +90,28 @@ public:
KURLRequester *urlRequester();
private slots:
void slotClear();
- void slotTextChanged(const QString &);
+ void slotTextChanged(const TQString &);
void slotDirStructCBChanged();
private:
KURLRequester *urlRequester_;
- QComboBox *baseUrlCombo;
- QCheckBox *preserveAttrsCB;
- QCheckBox *copyDirStructureCB;
+ TQComboBox *baseUrlCombo;
+ TQCheckBox *preserveAttrsCB;
+ TQCheckBox *copyDirStructureCB;
};
class KRGetDate : public KDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- KRGetDate(QDate date=QDate::currentDate(), QWidget *parent = 0, const char *name = 0);
- QDate getDate();
+ KRGetDate(TQDate date=TQDate::tqcurrentDate(), TQWidget *tqparent = 0, const char *name = 0);
+ TQDate getDate();
private slots:
- void setDate(QDate);
+ void setDate(TQDate);
private:
KDatePicker *dateWidget;
- QDate chosenDate, originalDate;
+ TQDate chosenDate, originalDate;
};
#endif
diff --git a/krusader/Dialogs/krkeydialog.cpp b/krusader/Dialogs/krkeydialog.cpp
index 70e6273..ecfbd5a 100644
--- a/krusader/Dialogs/krkeydialog.cpp
+++ b/krusader/Dialogs/krkeydialog.cpp
@@ -11,8 +11,8 @@
//
#include "krkeydialog.h"
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kpushbutton.h>
#include <kmessagebox.h>
@@ -29,24 +29,24 @@
static const char* FILE_FILTER = I18N_NOOP("*.keymap|Krusader keymaps\n*|all files");
-KrKeyDialog::KrKeyDialog( QWidget * parent ) : KKeyDialog( false /* allow letter shortcuts */, parent ) {
+KrKeyDialog::KrKeyDialog( TQWidget * tqparent ) : KKeyDialog( false /* allow letter shortcuts */, tqparent ) {
insert( krApp->actionCollection() );
- // HACK This fetches the layout of the buttonbox from KDialogBase, although it is not accessable with KDialogBase's API
+ // HACK This fetches the tqlayout of the buttonbox from KDialogBase, although it is not accessable with KDialogBase's API
// None the less it's quite save to use since this implementation hasn't changed since KDE-3.3 (I haven't looked at earlier
// versions since we don't support them) and now all work is done in KDE-4.
- QWidget* buttonBox = static_cast<QWidget*>( actionButton(KDialogBase::Ok)->parent() );
- QBoxLayout* buttonBoxLayout = static_cast<QBoxLayout*>( buttonBox->layout() );
+ TQWidget* buttonBox = TQT_TQWIDGET( actionButton(KDialogBase::Ok)->tqparent() );
+ TQBoxLayout* buttonBoxLayout = static_cast<TQBoxLayout*>( buttonBox->tqlayout() );
KPushButton* importButton = new KPushButton( i18n("Import shortcuts"), buttonBox );
- QWhatsThis::add( importButton, i18n( "Load a keybinding profile, e.g., total_commander.keymap" ) );
+ TQWhatsThis::add( importButton, i18n( "Load a keybinding profile, e.g., total_commander.keymap" ) );
buttonBoxLayout->insertWidget( 1, importButton ); // the defaults-button should stay on position 0
- connect( importButton, SIGNAL( clicked() ), SLOT( slotImportShortcuts() ) );
+ connect( importButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotImportShortcuts() ) );
KPushButton* exportButton = new KPushButton( i18n("Export shortcuts"), buttonBox );
- QWhatsThis::add( exportButton, i18n( "Save current keybindings in a keymap file." ) );
+ TQWhatsThis::add( exportButton, i18n( "Save current keybindings in a keymap file." ) );
buttonBoxLayout->insertWidget( 2, exportButton );
- connect( exportButton, SIGNAL( clicked() ), SLOT( slotExportShortcuts() ) );
+ connect( exportButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotExportShortcuts() ) );
// Also quite HACK 'isch but unfortunately KKeyDialog don't giveus access to this widget
_chooser = static_cast<KKeyChooser*>( mainWidget() );
@@ -58,16 +58,16 @@ KrKeyDialog::~KrKeyDialog() {
}
void KrKeyDialog::slotImportShortcuts() {
- // find $KDEDIR/share/apps/krusader
- QString basedir = KGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap");
+ // tqfind $KDEDIR/share/apps/krusader
+ TQString basedir = KGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap");
// let the user select a file to load
- QString filename = KFileDialog::getOpenFileName(basedir, i18n(FILE_FILTER), 0, i18n("Select a keymap file"));
+ TQString filename = KFileDialog::getOpenFileName(basedir, i18n(FILE_FILTER), 0, i18n("Select a keymap file"));
if ( filename.isEmpty() )
return;
KConfig conf( filename, true /*read only*/, false /*no KDEGlobal*/ );
if ( ! conf.hasGroup("Shortcuts") ) {
- int answer = KMessageBox::warningContinueCancel( this, //parent
+ int answer = KMessageBox::warningContinueCancel( this, //tqparent
i18n("This file does not seem to be a valid keymap.\n"
"It may be a keymap using a legacy format. The import can't be undone!"), //text
i18n("Try to import legacy format?"), //caption
@@ -83,27 +83,27 @@ void KrKeyDialog::slotImportShortcuts() {
_chooser->syncToConfig( "Shortcuts", &conf, false /* don't delete shortcuts of actions not listed in conf */ );
}
-void KrKeyDialog::importLegacyShortcuts( const QString& file ) {
+void KrKeyDialog::importLegacyShortcuts( const TQString& file ) {
/*
* This is basicaly Shie's code. It's copied from Kronfigurator's loog&feel page and adapted to the dialog
*/
// check if there's an info file with the keymap
- QFile info(file+".info");
+ TQFile info(file+".info");
if (info.open(IO_ReadOnly)) {
- QTextStream stream(&info);
- QStringList infoText = QStringList::split("\n", stream.read());
+ TQTextStream stream(&info);
+ TQStringList infoText = TQStringList::split("\n", stream.read());
if (KMessageBox::questionYesNoList(krApp, i18n("The following information was attached to the keymap. Do you really want to import this keymap?"), infoText)!=KMessageBox::Yes)
return;
}
// ok, import away
- QFile f(file);
+ TQFile f(file);
if (!f.open(IO_ReadOnly)) {
krOut << "Error opening " << file << endl;
return;
}
char *actionName;
- QDataStream stream(&f);
+ TQDataStream stream(&f);
int key;
KAction *action;
while (!stream.atEnd()) {
@@ -118,20 +118,20 @@ void KrKeyDialog::importLegacyShortcuts( const QString& file ) {
}
f.close();
- KMessageBox::information( this, // parent
+ KMessageBox::information( this, // tqparent
i18n("Please restart this dialog in order to see the changes"), // text
i18n("Legacy import completed") // caption
);
}
void KrKeyDialog::slotExportShortcuts() {
- QString filename = KFileDialog::getSaveFileName( QString::null, i18n(FILE_FILTER), 0, i18n("Select a keymap file") );
+ TQString filename = KFileDialog::getSaveFileName( TQString(), i18n(FILE_FILTER), 0, i18n("Select a keymap file") );
if ( filename.isEmpty() )
return;
- QFile f( filename );
+ TQFile f( filename );
if ( f.exists() &&
KMessageBox::warningContinueCancel( this,
- i18n("<qt>File <b>%1</b> already exists. Do you really want to overwrite it?</qt>").arg(filename),
+ i18n("<qt>File <b>%1</b> already exists. Do you really want to overwrite it?</qt>").tqarg(filename),
i18n("Warning"), i18n("Overwrite") )
!= KMessageBox::Continue)
return;
@@ -140,7 +140,7 @@ void KrKeyDialog::slotExportShortcuts() {
// Additionaly this prevents merging if the file already contains some shortcuts
f.close();
else {
- KMessageBox::error( this, i18n("<qt>Can't open <b>%1</b> for writing!</qt>").arg(filename) );
+ KMessageBox::error( this, i18n("<qt>Can't open <b>%1</b> for writing!</qt>").tqarg(filename) );
return;
}
diff --git a/krusader/Dialogs/krkeydialog.h b/krusader/Dialogs/krkeydialog.h
index 3731ce5..a07d9af 100644
--- a/krusader/Dialogs/krkeydialog.h
+++ b/krusader/Dialogs/krkeydialog.h
@@ -21,8 +21,9 @@
class KrKeyDialog : protected KKeyDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KrKeyDialog( QWidget* parent = 0 );
+ KrKeyDialog( TQWidget* tqparent = 0 );
~KrKeyDialog();
private slots:
@@ -30,7 +31,7 @@ private slots:
void slotExportShortcuts();
private:
- void importLegacyShortcuts( const QString& file );
+ void importLegacyShortcuts( const TQString& file );
KKeyChooser* _chooser;
};
diff --git a/krusader/Dialogs/krmaskchoice.cpp b/krusader/Dialogs/krmaskchoice.cpp
index 6e55518..b064c27 100644
--- a/krusader/Dialogs/krmaskchoice.cpp
+++ b/krusader/Dialogs/krmaskchoice.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- krmaskchoice.cpp
+ krtqmaskchoice.cpp
-------------------
copyright : (C) 2000 by Shie Erlich & Rafi Yanai
e-mail : krusader@users.sourceforge.net
@@ -29,123 +29,123 @@
***************************************************************************/
#include "krmaskchoice.h"
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qmessagebox.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqmessagebox.h>
#include <klocale.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
/*
- * Constructs a KRMaskChoice which is a child of 'parent', with the
+ * Constructs a KRMaskChoice which is a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-KRMaskChoice::KRMaskChoice( QWidget* parent, const char* name, bool modal, WFlags fl )
- : QDialog( parent, name, modal, fl )
+KRMaskChoice::KRMaskChoice( TQWidget* tqparent, const char* name, bool modal, WFlags fl )
+ : TQDialog( tqparent, name, modal, fl )
{
if ( !name )
setName( "KRMaskChoice" );
resize( 401, 314 );
setCaption( i18n( "Choose Files" ) );
- setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5 ) );
+ tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5 ) );
- selection = new QComboBox( FALSE, this, "selection" );
- int height = QFontMetrics( selection->font() ).height();
+ selection = new TQComboBox( FALSE, this, "selection" );
+ int height = TQFontMetrics( selection->font() ).height();
height = height + 5*(height > 14) + 6;
- selection->setGeometry( QRect( 12, 48, 377, height) );
+ selection->setGeometry( TQRect( 12, 48, 377, height) );
selection->setEditable( TRUE );
- selection->setInsertionPolicy( QComboBox::AtTop );
+ selection->setInsertionPolicy( TQComboBox::AtTop );
selection->setAutoCompletion( TRUE );
- QWidget* Layout7 = new QWidget( this, "Layout7" );
- Layout7->setGeometry( QRect( 10, 10, 380, 30 ) );
- hbox = new QHBoxLayout( Layout7 );
+ TQWidget* Layout7 = new TQWidget( this, "Layout7" );
+ Layout7->setGeometry( TQRect( 10, 10, 380, 30 ) );
+ hbox = new TQHBoxLayout( Layout7 );
hbox->setSpacing( 6 );
hbox->setMargin( 0 );
- PixmapLabel1 = new QLabel( Layout7, "PixmapLabel1" );
+ PixmapLabel1 = new TQLabel( Layout7, "PixmapLabel1" );
PixmapLabel1->setScaledContents( TRUE );
- PixmapLabel1->setMaximumSize( QSize( 31, 31 ) );
+ PixmapLabel1->setMaximumSize( TQSize( 31, 31 ) );
// now, add space for the pixmap
hbox->addWidget( PixmapLabel1 );
- label = new QLabel( Layout7, "label" );
+ label = new TQLabel( Layout7, "label" );
label->setText( i18n( "Select the following files:" ) );
hbox->addWidget( label );
- GroupBox1 = new QGroupBox( this, "GroupBox1" );
- GroupBox1->setGeometry( QRect( 11, 77, 379, 190 ) );
+ GroupBox1 = new TQGroupBox( this, "GroupBox1" );
+ GroupBox1->setGeometry( TQRect( 11, 77, 379, 190 ) );
GroupBox1->setTitle( i18n( "Predefined Selections" ) );
- QWidget* Layout6 = new QWidget( GroupBox1, "Layout6" );
- Layout6->setGeometry( QRect( 10, 20, 360, 160 ) );
- hbox_2 = new QHBoxLayout( Layout6 );
+ TQWidget* Layout6 = new TQWidget( GroupBox1, "Layout6" );
+ Layout6->setGeometry( TQRect( 10, 20, 360, 160 ) );
+ hbox_2 = new TQHBoxLayout( Layout6 );
hbox_2->setSpacing( 6 );
hbox_2->setMargin( 0 );
- preSelections = new QListBox( Layout6, "preSelections" );
- preSelections->setVScrollBarMode( QListBox::AlwaysOn );
- QWhatsThis::add( preSelections, i18n( "A predefined selection is a file-mask which you use often.\nSome examples are: \"*.c, *.h\", \"*.c, *.o\", etc.\nYou can add these masks to the list by typing them and pressing the Add button.\nDelete removes a predefined selection and Clear removes all of them.\nNotice that the line in which you edit the mask has it's own history, you can scroll it, if needed." ) );
+ preSelections = new TQListBox( Layout6, "preSelections" );
+ preSelections->setVScrollBarMode( TQListBox::AlwaysOn );
+ TQWhatsThis::add( preSelections, i18n( "A predefined selection is a file-tqmask which you use often.\nSome examples are: \"*.c, *.h\", \"*.c, *.o\", etc.\nYou can add these tqmasks to the list by typing them and pressing the Add button.\nDelete removes a predefined selection and Clear removes all of them.\nNotice that the line in which you edit the tqmask has it's own history, you can scroll it, if needed." ) );
hbox_2->addWidget( preSelections );
- vbox = new QVBoxLayout;
+ vbox = new TQVBoxLayout;
vbox->setSpacing( 6 );
vbox->setMargin( 0 );
- PushButton7 = new QPushButton( Layout6, "PushButton7" );
+ PushButton7 = new TQPushButton( Layout6, "PushButton7" );
PushButton7->setText( i18n( "Add" ) );
- QToolTip::add( PushButton7, i18n( "Adds the selection in the line-edit to the list" ) );
+ TQToolTip::add( PushButton7, i18n( "Adds the selection in the line-edit to the list" ) );
vbox->addWidget( PushButton7 );
- PushButton7_2 = new QPushButton( Layout6, "PushButton7_2" );
+ PushButton7_2 = new TQPushButton( Layout6, "PushButton7_2" );
PushButton7_2->setText( i18n( "Delete" ) );
- QToolTip::add( PushButton7_2, i18n( "Delete the marked selection from the list" ) );
+ TQToolTip::add( PushButton7_2, i18n( "Delete the marked selection from the list" ) );
vbox->addWidget( PushButton7_2 );
- PushButton7_3 = new QPushButton( Layout6, "PushButton7_3" );
+ PushButton7_3 = new TQPushButton( Layout6, "PushButton7_3" );
PushButton7_3->setText( i18n( "Clear" ) );
- QToolTip::add( PushButton7_3, i18n( "Clears the entire list of selections" ) );
+ TQToolTip::add( PushButton7_3, i18n( "Clears the entire list of selections" ) );
vbox->addWidget( PushButton7_3 );
- QSpacerItem* spacer = new QSpacerItem( 20, 54, QSizePolicy::Fixed, QSizePolicy::Expanding );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 54, TQSizePolicy::Fixed, TQSizePolicy::Expanding );
vbox->addItem( spacer );
hbox_2->addLayout( vbox );
- QWidget* Layout18 = new QWidget( this, "Layout18" );
- Layout18->setGeometry( QRect( 10, 280, 379, 30 ) );
- hbox_3 = new QHBoxLayout( Layout18 );
+ TQWidget* Layout18 = new TQWidget( this, "Layout18" );
+ Layout18->setGeometry( TQRect( 10, 280, 379, 30 ) );
+ hbox_3 = new TQHBoxLayout( Layout18 );
hbox_3->setSpacing( 6 );
hbox_3->setMargin( 0 );
- QSpacerItem* spacer_2 = new QSpacerItem( 205, 20, QSizePolicy::Expanding, QSizePolicy::Fixed );
+ TQSpacerItem* spacer_2 = new TQSpacerItem( 205, 20, TQSizePolicy::Expanding, TQSizePolicy::Fixed );
hbox_3->addItem( spacer_2 );
- PushButton3 = new QPushButton( Layout18, "PushButton3" );
+ PushButton3 = new TQPushButton( Layout18, "PushButton3" );
PushButton3->setText( i18n( "OK" ) );
hbox_3->addWidget( PushButton3 );
- PushButton3_2 = new QPushButton( Layout18, "PushButton3_2" );
+ PushButton3_2 = new TQPushButton( Layout18, "PushButton3_2" );
PushButton3_2->setText( i18n( "Cancel" ) );
hbox_3->addWidget( PushButton3_2 );
// signals and slots connections
- connect( PushButton3_2, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( PushButton3, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( PushButton7, SIGNAL( clicked() ), this, SLOT( addSelection() ) );
- connect( PushButton7_2, SIGNAL( clicked() ), this, SLOT( deleteSelection() ) );
- connect( PushButton7_3, SIGNAL( clicked() ), this, SLOT( clearSelections() ) );
- connect( selection, SIGNAL( activated(const QString&) ), selection, SLOT( setEditText(const QString &) ) );
- connect( selection->lineEdit(), SIGNAL( returnPressed() ), this, SLOT( accept() ));
- connect( preSelections, SIGNAL( doubleClicked(QListBoxItem*) ), this, SLOT( acceptFromList(QListBoxItem *) ) );
- connect( preSelections, SIGNAL( highlighted(const QString&) ), selection, SLOT( setEditText(const QString &) ) );
- connect( preSelections, SIGNAL( returnPressed(QListBoxItem*) ), this, SLOT( acceptFromList(QListBoxItem *) ) );
+ connect( PushButton3_2, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) );
+ connect( PushButton3, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) );
+ connect( PushButton7, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addSelection() ) );
+ connect( PushButton7_2, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deleteSelection() ) );
+ connect( PushButton7_3, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clearSelections() ) );
+ connect( selection, TQT_SIGNAL( activated(const TQString&) ), selection, TQT_SLOT( setEditText(const TQString &) ) );
+ connect( selection->lineEdit(), TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( accept() ));
+ connect( preSelections, TQT_SIGNAL( doubleClicked(TQListBoxItem*) ), this, TQT_SLOT( acceptFromList(TQListBoxItem *) ) );
+ connect( preSelections, TQT_SIGNAL( highlighted(const TQString&) ), selection, TQT_SLOT( setEditText(const TQString &) ) );
+ connect( preSelections, TQT_SIGNAL( returnPressed(TQListBoxItem*) ), this, TQT_SLOT( acceptFromList(TQListBoxItem *) ) );
}
/*
@@ -153,7 +153,7 @@ KRMaskChoice::KRMaskChoice( QWidget* parent, const char* name, bool modal, WFla
*/
KRMaskChoice::~KRMaskChoice()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
void KRMaskChoice::addSelection()
@@ -171,9 +171,9 @@ void KRMaskChoice::deleteSelection()
qWarning( "KRMaskChoice::deleteSelection(): Not implemented yet!" );
}
-void KRMaskChoice::acceptFromList(QListBoxItem *)
+void KRMaskChoice::acceptFromList(TQListBoxItem *)
{
- qWarning( "KRMaskChoice::acceptFromList(QListBoxItem *): Not implemented yet!" );
+ qWarning( "KRMaskChoice::acceptFromList(TQListBoxItem *): Not implemented yet!" );
}
#include "krmaskchoice.moc"
diff --git a/krusader/Dialogs/krmaskchoice.h b/krusader/Dialogs/krmaskchoice.h
index 16be845..a6f6fd6 100644
--- a/krusader/Dialogs/krmaskchoice.h
+++ b/krusader/Dialogs/krmaskchoice.h
@@ -1,5 +1,5 @@
/***************************************************************************
- krmaskchoice.h
+ krtqmaskchoice.h
-------------------
copyright : (C) 2000 by Shie Erlich & Rafi Yanai
email : krusader@users.sourceforge.net
@@ -30,47 +30,48 @@
#ifndef KRMASKCHOICE_H
#define KRMASKCHOICE_H
-#include <qdialog.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QComboBox;
-class QGroupBox;
-class QLabel;
-class QListBox;
-class QListBoxItem;
-class QPushButton;
+#include <tqdialog.h>
+class TQVBoxLayout;
+class TQHBoxLayout;
+class TQGridLayout;
+class TQComboBox;
+class TQGroupBox;
+class TQLabel;
+class TQListBox;
+class TQListBoxItem;
+class TQPushButton;
-class KRMaskChoice : public QDialog
+class KRMaskChoice : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KRMaskChoice( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ KRMaskChoice( TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~KRMaskChoice();
- QComboBox* selection;
- QLabel* PixmapLabel1;
- QLabel* label;
- QGroupBox* GroupBox1;
- QListBox* preSelections;
- QPushButton* PushButton7;
- QPushButton* PushButton7_2;
- QPushButton* PushButton7_3;
- QPushButton* PushButton3;
- QPushButton* PushButton3_2;
+ TQComboBox* selection;
+ TQLabel* PixmapLabel1;
+ TQLabel* label;
+ TQGroupBox* GroupBox1;
+ TQListBox* preSelections;
+ TQPushButton* PushButton7;
+ TQPushButton* PushButton7_2;
+ TQPushButton* PushButton7_3;
+ TQPushButton* PushButton3;
+ TQPushButton* PushButton3_2;
public slots:
virtual void addSelection();
virtual void clearSelections();
virtual void deleteSelection();
- virtual void acceptFromList(QListBoxItem *);
+ virtual void acceptFromList(TQListBoxItem *);
protected:
- QHBoxLayout* hbox;
- QHBoxLayout* hbox_2;
- QHBoxLayout* hbox_3;
- QVBoxLayout* vbox;
+ TQHBoxLayout* hbox;
+ TQHBoxLayout* hbox_2;
+ TQHBoxLayout* hbox_3;
+ TQVBoxLayout* vbox;
};
#endif // KRMASKCHOICE_H
diff --git a/krusader/Dialogs/krpleasewait.cpp b/krusader/Dialogs/krpleasewait.cpp
index c61b61a..c29d777 100644
--- a/krusader/Dialogs/krpleasewait.cpp
+++ b/krusader/Dialogs/krpleasewait.cpp
@@ -29,35 +29,35 @@
***************************************************************************/
#include "krpleasewait.h"
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qapplication.h>
-#include <qpushbutton.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqapplication.h>
+#include <tqpushbutton.h>
#include <unistd.h>
#include "../krusader.h"
#include "klocale.h"
#include <kcursor.h>
-KRPleaseWait::KRPleaseWait( QString msg, int count, bool cancel ):
- QProgressDialog( cancel ? 0 : krApp,0, !cancel) , inc(true) {
+KRPleaseWait::KRPleaseWait( TQString msg, int count, bool cancel ):
+ TQProgressDialog( cancel ? 0 : krApp,0, !cancel) , inc(true) {
- timer = new QTimer(this);
+ timer = new TQTimer(this);
setCaption( i18n( "Krusader::Wait" ) );
setMinimumDuration(500);
setAutoClose(false);
setAutoReset(false);
- connect( timer,SIGNAL(timeout()), this, SLOT(cycleProgress()));
+ connect( timer,TQT_SIGNAL(timeout()), this, TQT_SLOT(cycleProgress()));
- QProgressBar* progress = new QProgressBar(count,this);
+ TQProgressBar* progress = new TQProgressBar(count,this);
progress->setCenterIndicator(true);
setBar(progress);
- QLabel* label = new QLabel(this);
+ TQLabel* label = new TQLabel(this);
setLabel(label);
- QPushButton* btn = new QPushButton(i18n("&Cancel"),this);
+ TQPushButton* btn = new TQPushButton(i18n("&Cancel"),this);
setCancelButton(btn);
btn->setEnabled(canClose = cancel);
@@ -66,7 +66,7 @@ KRPleaseWait::KRPleaseWait( QString msg, int count, bool cancel ):
show();
}
-void KRPleaseWait::closeEvent ( QCloseEvent * e )
+void KRPleaseWait::closeEvent ( TQCloseEvent * e )
{
if( canClose ) {
emit cancelled();
@@ -86,7 +86,7 @@ void KRPleaseWait::cycleProgress(){
if ( progress() <= 0 ) inc = true;
}
-KRPleaseWaitHandler::KRPleaseWaitHandler() : QObject(), job(), dlg( 0 ) {
+KRPleaseWaitHandler::KRPleaseWaitHandler() : TQObject(), job(), dlg( 0 ) {
}
void KRPleaseWaitHandler::stopWait(){
@@ -98,10 +98,10 @@ void KRPleaseWaitHandler::stopWait(){
}
-void KRPleaseWaitHandler::startWaiting( QString msg, int count , bool cancel){
+void KRPleaseWaitHandler::startWaiting( TQString msg, int count , bool cancel){
if ( dlg == 0 ){
dlg = new KRPleaseWait( msg , count, cancel);
- connect( dlg,SIGNAL(cancelled()),this,SLOT(killJob()) );
+ connect( dlg,TQT_SIGNAL(cancelled()),this,TQT_SLOT(killJob()) );
}
incMutex=cycleMutex=_wasCancelled=false;
dlg->setProgress(0);
@@ -122,7 +122,7 @@ void KRPleaseWaitHandler::cycleProgress(){
if (cycleMutex) return;
cycleMutex=true;
if (dlg) dlg->cycleProgress();
- if (cycle) QTimer::singleShot(2000,this,SLOT(cycleProgress()));
+ if (cycle) TQTimer::singleShot(2000,this,TQT_SLOT(cycleProgress()));
cycleMutex=false;
}
diff --git a/krusader/Dialogs/krpleasewait.h b/krusader/Dialogs/krpleasewait.h
index 30b19f8..467266a 100644
--- a/krusader/Dialogs/krpleasewait.h
+++ b/krusader/Dialogs/krpleasewait.h
@@ -31,23 +31,24 @@
#ifndef KRPLEASEWAIT_H
#define KRPLEASEWAIT_H
-#include <qprogressdialog.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
+#include <tqprogressdialog.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
#include <kio/jobclasses.h>
class KProcess;
class KRPleaseWait;
-class KRPleaseWaitHandler : public QObject {
+class KRPleaseWaitHandler : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
KRPleaseWaitHandler();
public slots:
- void startWaiting(QString msg, int count = 0, bool cancel = false);
+ void startWaiting(TQString msg, int count = 0, bool cancel = false);
void stopWait();
void cycleProgress();
void incProgress(int i);
@@ -57,16 +58,17 @@ public slots:
bool wasCancelled() const { return _wasCancelled; }
private:
- QGuardedPtr<KIO::Job> job;
+ TQGuardedPtr<KIO::Job> job;
KRPleaseWait * dlg;
bool cycle, cycleMutex, incMutex, _wasCancelled;
};
-class KRPleaseWait : public QProgressDialog {
+class KRPleaseWait : public TQProgressDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- KRPleaseWait( QString msg, int count = 0 ,bool cancel = false );
+ KRPleaseWait( TQString msg, int count = 0 ,bool cancel = false );
public slots:
void incProgress(int howMuch);
@@ -74,8 +76,8 @@ public slots:
protected:
bool inc;
- QTimer* timer;
- virtual void closeEvent ( QCloseEvent * e );
+ TQTimer* timer;
+ virtual void closeEvent ( TQCloseEvent * e );
bool canClose;
};
diff --git a/krusader/Dialogs/krprogress.cpp b/krusader/Dialogs/krprogress.cpp
index 94f8c8c..85e3a88 100644
--- a/krusader/Dialogs/krprogress.cpp
+++ b/krusader/Dialogs/krprogress.cpp
@@ -16,10 +16,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqdatetime.h>
#include <kapplication.h>
#include <kdialog.h>
@@ -41,27 +41,27 @@ KrProgress::KrProgress( KIO::Job* job )
m_iTotalSize(0), m_iTotalFiles(0), m_iTotalDirs(0),
m_iProcessedSize(0), m_iProcessedDirs(0), m_iProcessedFiles(0){
-#ifdef Q_WS_X11 //FIXME(E): Remove once all the KWin::foo calls have been ported to QWS
+#ifdef TQ_WS_X11 //FIXME(E): Remove once all the KWin::foo calls have been ported to TQWS
// Set a useful icon for this window!
KWin::setIcons( winId(),
KGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 32 ),
KGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 16 ) );
#endif
- QVBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
topLayout->addStrut( 360 ); // makes dlg at least that wide
- QGridLayout *grid = new QGridLayout( 2, 3 );
+ TQGridLayout *grid = new TQGridLayout( 2, 3 );
topLayout->addLayout(grid);
grid->addColSpacing(1, KDialog::spacingHint());
// filenames or action name
- grid->addWidget(new QLabel(i18n("Source:"), this), 0, 0);
+ grid->addWidget(new TQLabel(i18n("Source:"), this), 0, 0);
sourceLabel = new KSqueezedTextLabel(this);
grid->addWidget(sourceLabel, 0, 2);
- destInvite = new QLabel(i18n("Destination:"), this);
+ destInvite = new TQLabel(i18n("Destination:"), this);
grid->addWidget(destInvite, 1, 0);
destLabel = new KSqueezedTextLabel(this);
@@ -71,43 +71,43 @@ KrProgress::KrProgress( KIO::Job* job )
topLayout->addWidget( m_pProgressBar );
// processed info
- QHBoxLayout *hBox = new QHBoxLayout();
+ TQHBoxLayout *hBox = new TQHBoxLayout();
topLayout->addLayout(hBox);
- sizeLabel = new QLabel(this);
+ sizeLabel = new TQLabel(this);
hBox->addWidget(sizeLabel);
- resumeLabel = new QLabel(this);
+ resumeLabel = new TQLabel(this);
hBox->addWidget(resumeLabel);
- progressLabel = new QLabel( this );
-/* progressLabel->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding,
- QSizePolicy::Preferred ) );*/
- progressLabel->setAlignment( QLabel::AlignRight );
+ progressLabel = new TQLabel( this );
+/* progressLabel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding,
+ TQSizePolicy::Preferred ) );*/
+ progressLabel->tqsetAlignment( TQLabel::AlignRight );
hBox->addWidget( progressLabel );
- hBox = new QHBoxLayout();
+ hBox = new TQHBoxLayout();
topLayout->addLayout(hBox);
- speedLabel = new QLabel(this);
+ speedLabel = new TQLabel(this);
hBox->addWidget(speedLabel, 1);
- QFrame *line = new QFrame( this );
- line->setFrameShape( QFrame::HLine );
- line->setFrameShadow( QFrame::Sunken );
+ TQFrame *line = new TQFrame( this );
+ line->setFrameShape( TQFrame::HLine );
+ line->setFrameShadow( TQFrame::Sunken );
topLayout->addWidget( line );
- hBox = new QHBoxLayout();
+ hBox = new TQHBoxLayout();
topLayout->addLayout(hBox);
hBox->addStretch(1);
KPushButton *pb = new KPushButton( KStdGuiItem::cancel(), this );
- connect( pb, SIGNAL( clicked() ), SLOT( slotStop() ) );
+ connect( pb, TQT_SIGNAL( clicked() ), TQT_SLOT( slotStop() ) );
hBox->addWidget( pb );
- resize( sizeHint() );
- setMaximumHeight(sizeHint().height());
+ resize( tqsizeHint() );
+ setMaximumHeight(tqsizeHint().height());
setCaption(i18n("Krusader Progress")); // show something better than kio_uiserver
@@ -115,19 +115,19 @@ KrProgress::KrProgress( KIO::Job* job )
setOnlyClean(false);
setStopOnClose(true);
// Connect global progress info signals
- connect( job, SIGNAL( percent( KIO::Job*, unsigned long ) ),
- SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
- connect( job, SIGNAL( infoMessage( KIO::Job*, const QString & ) ),
- SLOT( slotInfoMessage( KIO::Job*, const QString & ) ) );
- connect( job, SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
- SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( job, SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
- SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
- connect( job, SIGNAL( speed( KIO::Job*, unsigned long ) ),
- SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
+ connect( job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString & ) ),
+ TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString & ) ) );
+ connect( job, TQT_SIGNAL( totalSize( KIO::Job*, KIO::filesize_t ) ),
+ TQT_SLOT( slotTotalSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( job, TQT_SIGNAL( processedSize( KIO::Job*, KIO::filesize_t ) ),
+ TQT_SLOT( slotProcessedSize( KIO::Job*, KIO::filesize_t ) ) );
+ connect( job, TQT_SIGNAL( speed( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( slotSpeed( KIO::Job*, unsigned long ) ) );
// change to modal & move to Krusader's center
- QPoint center((krApp->width()-width())/2,(krApp->height()-height())/2);
+ TQPoint center((krApp->width()-width())/2,(krApp->height()-height())/2);
center = center+(krApp->pos());
reparent(krApp,WType_Modal,center);
//setWFlags(WType_Modal);
@@ -159,7 +159,7 @@ void KrProgress::showTotals(){
// of CopyJob takes a long time (e.g. over networks).
if ( m_iProcessedFiles == 0 && m_iProcessedDirs == 0 )
{
- QString tmps;
+ TQString tmps;
if ( m_iTotalDirs > 1 )
// that we have a singular to translate looks weired but is only logical
tmps = i18n("%n directory", "%n directories", m_iTotalDirs) + " ";
@@ -169,7 +169,7 @@ void KrProgress::showTotals(){
}
void KrProgress::slotPercent( KIO::Job*, unsigned long percent ){
- QString tmp(i18n( "%1% of %2 ").arg( percent ).arg( KIO::convertSize(m_iTotalSize)));
+ TQString tmp(i18n( "%1% of %2 ").tqarg( percent ).tqarg( KIO::convertSize(m_iTotalSize)));
m_pProgressBar->setValue( percent );
tmp.append(i18n(" (Reading)"));
@@ -177,18 +177,18 @@ void KrProgress::slotPercent( KIO::Job*, unsigned long percent ){
}
-void KrProgress::slotInfoMessage( KIO::Job*, const QString & msg )
+void KrProgress::slotInfoMessage( KIO::Job*, const TQString & msg )
{
speedLabel->setText( msg );
- speedLabel->setAlignment( speedLabel->alignment() & ~Qt::WordBreak );
+ speedLabel->tqsetAlignment( speedLabel->tqalignment() & ~TQt::WordBreak );
}
void KrProgress::slotProcessedSize( KIO::Job*, KIO::filesize_t bytes ) {
m_iProcessedSize = bytes;
- QString tmp;
- tmp = i18n( "%1 of %2 complete").arg( KIO::convertSize(bytes) ).arg( KIO::convertSize(m_iTotalSize));
+ TQString tmp;
+ tmp = i18n( "%1 of %2 complete").tqarg( KIO::convertSize(bytes) ).tqarg( KIO::convertSize(m_iTotalSize));
sizeLabel->setText( tmp );
}
@@ -197,10 +197,10 @@ void KrProgress::slotProcessedDirs( KIO::Job*, unsigned long dirs )
{
m_iProcessedDirs = dirs;
- QString tmps;
- tmps = i18n("%1 / %n directory", "%1 / %n directories", m_iTotalDirs).arg( m_iProcessedDirs );
+ TQString tmps;
+ tmps = i18n("%1 / %n directory", "%1 / %n directories", m_iTotalDirs).tqarg( m_iProcessedDirs );
tmps += " ";
- tmps += i18n("%1 / %n file", "%1 / %n files", m_iTotalFiles).arg( m_iProcessedFiles );
+ tmps += i18n("%1 / %n file", "%1 / %n files", m_iTotalFiles).tqarg( m_iProcessedFiles );
progressLabel->setText( tmps );
}
@@ -209,12 +209,12 @@ void KrProgress::slotProcessedFiles( KIO::Job*, unsigned long files )
{
m_iProcessedFiles = files;
- QString tmps;
+ TQString tmps;
if ( m_iTotalDirs > 1 ) {
- tmps = i18n("%1 / %n directory", "%1 / %n directories", m_iTotalDirs).arg( m_iProcessedDirs );
+ tmps = i18n("%1 / %n directory", "%1 / %n directories", m_iTotalDirs).tqarg( m_iProcessedDirs );
tmps += " ";
}
- tmps += i18n("%1 / %n file", "%1 / %n files", m_iTotalFiles).arg( m_iProcessedFiles );
+ tmps += i18n("%1 / %n file", "%1 / %n files", m_iTotalFiles).tqarg( m_iProcessedFiles );
progressLabel->setText( tmps );
}
@@ -226,11 +226,11 @@ void KrProgress::slotSpeed( KIO::Job*, unsigned long bytes_per_second )
} else {
#if KDE_IS_VERSION(3,4,0)
unsigned int seconds = KIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, bytes_per_second );
- QString remaining = KIO::convertSeconds(seconds);
+ TQString remaining = KIO::convertSeconds(seconds);
#else
- QString remaining = KIO::calculateRemaining( m_iTotalSize, m_iProcessedSize, bytes_per_second ).toString();
+ TQString remaining = KIO::calculateRemaining( m_iTotalSize, m_iProcessedSize, bytes_per_second ).toString();
#endif
- speedLabel->setText( i18n( "%1/s ( %2 remaining )").arg( KIO::convertSize( bytes_per_second )).arg( remaining ) );
+ speedLabel->setText( i18n( "%1/s ( %2 remaining )").tqarg( KIO::convertSize( bytes_per_second )).tqarg( remaining ) );
}
}
@@ -238,15 +238,15 @@ void KrProgress::slotSpeed( KIO::Job*, unsigned long bytes_per_second )
void KrProgress::setDestVisible( bool visible )
{
// We can't hide the destInvite/destLabel labels,
- // because it screws up the QGridLayout.
+ // because it screws up the TQGridLayout.
if (visible)
{
destInvite->setText( i18n("Destination:") );
}
else
{
- destInvite->setText( QString::null );
- destLabel->setText( QString::null );
+ destInvite->setText( TQString() );
+ destLabel->setText( TQString() );
}
}
@@ -265,6 +265,6 @@ void KrProgress::slotStop(){
emit stopped();
}
-void KrProgress::closeEvent( QCloseEvent* ) { hide(); slotStop(); }
+void KrProgress::closeEvent( TQCloseEvent* ) { hide(); slotStop(); }
#include "krprogress.moc"
diff --git a/krusader/Dialogs/krprogress.h b/krusader/Dialogs/krprogress.h
index a8731b1..af27efb 100644
--- a/krusader/Dialogs/krprogress.h
+++ b/krusader/Dialogs/krprogress.h
@@ -21,7 +21,7 @@
#ifndef __kr_progress_h__
#define __kr_progress_h__
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kio/global.h>
@@ -30,10 +30,11 @@
#include <kio/progressbase.h>
-#include <qobject.h>
+#include <tqobject.h>
class KrProgress : public KIO::ProgressBase {
Q_OBJECT
+ TQ_OBJECT
public:
KrProgress(KIO::Job* job);
@@ -50,10 +51,10 @@ public slots:
virtual void slotSpeed( KIO::Job*, unsigned long bytes_per_second );
virtual void slotPercent( KIO::Job*, unsigned long percent );
- virtual void slotInfoMessage( KIO::Job*, const QString & msg );
+ virtual void slotInfoMessage( KIO::Job*, const TQString & msg );
virtual void slotStop();
- virtual void closeEvent( QCloseEvent* );
+ virtual void closeEvent( TQCloseEvent* );
protected:
void showTotals();
@@ -61,11 +62,11 @@ protected:
KSqueezedTextLabel* sourceLabel;
KSqueezedTextLabel* destLabel;
- QLabel* progressLabel;
- QLabel* destInvite;
- QLabel* speedLabel;
- QLabel* sizeLabel;
- QLabel* resumeLabel;
+ TQLabel* progressLabel;
+ TQLabel* destInvite;
+ TQLabel* speedLabel;
+ TQLabel* sizeLabel;
+ TQLabel* resumeLabel;
KProgress* m_pProgressBar;
diff --git a/krusader/Dialogs/krspecialwidgets.cpp b/krusader/Dialogs/krspecialwidgets.cpp
index f7027de..d2e4274 100644
--- a/krusader/Dialogs/krspecialwidgets.cpp
+++ b/krusader/Dialogs/krspecialwidgets.cpp
@@ -46,7 +46,7 @@ A
/////////////////////////////////////////////////////////////////////////////
// The pie-related widgets use hard-coded coordinates to create the look.
// This is ok since the whole widget is fitted into an existing view and thus
-// no re-alignments are needed.
+// no re-tqalignments are needed.
#define LEFT 10
#define BOTTOM 150
@@ -56,16 +56,16 @@ A
#define STARTANGLE 0
#define DEG(x) (16*(x))
-QColor KRPie::colors[ 12 ] = {Qt::red, Qt::blue, Qt::green, Qt::cyan, Qt::magenta, Qt::gray,
- Qt::black, Qt::white, Qt::darkRed, Qt::darkBlue, Qt::darkMagenta,
- Qt::darkCyan};
+TQColor KRPie::colors[ 12 ] = {TQt::red, TQt::blue, TQt::green, TQt::cyan, TQt::magenta, TQt::gray,
+ TQt::black, TQt::white, TQt::darkRed, TQt::darkBlue, TQt::darkMagenta,
+ TQt::darkCyan};
//////////////////////////////////////////////////////////////////////////////
/////////////// KRFSDisplay - Filesystem / Freespace Display /////////////////
//////////////////////////////////////////////////////////////////////////////
// This is the full constructor: use it for a mounted filesystem
-KRFSDisplay::KRFSDisplay( QWidget *parent, QString _alias, QString _realName,
- KIO::filesize_t _total, KIO::filesize_t _free ) : QWidget( parent ), totalSpace( _total ),
+KRFSDisplay::KRFSDisplay( TQWidget *tqparent, TQString _alias, TQString _realName,
+ KIO::filesize_t _total, KIO::filesize_t _free ) : TQWidget( tqparent ), totalSpace( _total ),
freeSpace( _free ), alias( _alias ), realName( _realName ), mounted( true ),
empty( false ), supermount( false ) {
resize( 150, 200 );
@@ -73,8 +73,8 @@ empty( false ), supermount( false ) {
}
// Use this one for an unmounted filesystem
-KRFSDisplay::KRFSDisplay( QWidget *parent, QString _alias, QString _realName, bool sm ) :
- QWidget( parent ), alias( _alias ), realName( _realName ), mounted( false ),
+KRFSDisplay::KRFSDisplay( TQWidget *tqparent, TQString _alias, TQString _realName, bool sm ) :
+ TQWidget( tqparent ), alias( _alias ), realName( _realName ), mounted( false ),
empty( false ), supermount( sm ) {
resize( 150, 200 );
show();
@@ -82,54 +82,54 @@ empty( false ), supermount( sm ) {
// This is used only when an empty widget needs to be displayed (for example:
// when filesystem statistics haven't been calculated yet)
-KRFSDisplay::KRFSDisplay( QWidget *parent ) : QWidget( parent ), empty( true ) {
+KRFSDisplay::KRFSDisplay( TQWidget *tqparent ) : TQWidget( tqparent ), empty( true ) {
resize( 150, 200 );
show();
}
// The main painter!
-void KRFSDisplay::paintEvent( QPaintEvent * ) {
- QPainter paint( this );
+void KRFSDisplay::paintEvent( TQPaintEvent * ) {
+ TQPainter paint( this );
if ( !empty ) {
// create the text
// first, name and location
- paint.setFont( QFont( "helvetica", 12, QFont::Bold ) );
+ paint.setFont( TQFont( "helvetica", 12, TQFont::Bold ) );
paint.drawText( 10, 20, alias );
- paint.setFont( QFont( "helvetica", 12, QFont::Normal ) );
+ paint.setFont( TQFont( "helvetica", 12, TQFont::Normal ) );
paint.drawText( 10, 37, "(" + realName + ")" );
if ( mounted ) { // incase the filesystem is already mounted
// second, the capacity
paint.drawText( 10, 70, i18n( "Capacity: " ) + KIO::convertSizeFromKB( totalSpace ) );
// third, the 2 boxes (used, free)
- QPen systemPen = paint.pen();
- paint.setPen( Qt::black );
+ TQPen systemPen = paint.pen();
+ paint.setPen( TQt::black );
paint.drawRect( 10, 90, 10, 10 );
- paint.fillRect( 11, 91, 8, 8, QBrush( Qt::gray ) );
+ paint.fillRect( 11, 91, 8, 8, TQBrush( TQt::gray ) );
paint.drawRect( 10, 110, 10, 10 );
- paint.fillRect( 11, 111, 8, 8, QBrush( Qt::white ) );
+ paint.fillRect( 11, 111, 8, 8, TQBrush( TQt::white ) );
// now, the text for the boxes
paint.setPen( systemPen );
paint.drawText( 25, 100, i18n( "Used: " ) + KIO::convertSizeFromKB( totalSpace - freeSpace ) );
paint.drawText( 25, 120, i18n( "Free: " ) + KIO::convertSizeFromKB( freeSpace ) );
// first, create the empty pie
// bottom...
- paint.setPen( Qt::black );
- paint.setBrush( Qt::white );
+ paint.setPen( TQt::black );
+ paint.setBrush( TQt::white );
paint.drawPie( LEFT, BOTTOM, WIDTH, HEIGHT, STARTANGLE, DEG( 360 ) );
// body...
- paint.setPen( Qt::lightGray );
+ paint.setPen( TQt::lightGray );
for ( int i = 1; i < Z_HEIGHT; ++i )
paint.drawPie( LEFT, BOTTOM - i, WIDTH, HEIGHT, STARTANGLE, DEG( 360 ) );
// side lines...
- paint.setPen( Qt::black );
+ paint.setPen( TQt::black );
paint.drawLine( LEFT, BOTTOM + HEIGHT / 2, LEFT, BOTTOM + HEIGHT / 2 - Z_HEIGHT );
paint.drawLine( LEFT + WIDTH, BOTTOM + HEIGHT / 2, LEFT + WIDTH, BOTTOM + HEIGHT / 2 - Z_HEIGHT );
// top of the pie
paint.drawPie( LEFT, BOTTOM - Z_HEIGHT, WIDTH, HEIGHT, STARTANGLE, DEG( 360 ) );
// the "used space" slice
float i = ( ( float ) ( totalSpace - freeSpace ) / ( totalSpace ) ) * 360.0;
- paint.setBrush( Qt::gray );
+ paint.setBrush( TQt::gray );
paint.drawPie( LEFT, BOTTOM - Z_HEIGHT, WIDTH, HEIGHT, STARTANGLE, ( int ) DEG( i ) );
// if we need to draw a 3d stripe ...
if ( i > 180.0 ) {
@@ -137,7 +137,7 @@ void KRFSDisplay::paintEvent( QPaintEvent * ) {
paint.drawArc( LEFT, BOTTOM - j, WIDTH, HEIGHT, STARTANGLE - 16 * 180, ( int ) ( DEG( i - 180.0 ) ) );
}
} else { // if the filesystem is unmounted...
- paint.setFont( QFont( "helvetica", 12, QFont::Bold ) );
+ paint.setFont( TQFont( "helvetica", 12, TQFont::Bold ) );
paint.drawText( 10, 60, i18n( "Not mounted." ) );
}
} else { // if the widget is in empty situation...
@@ -146,15 +146,15 @@ void KRFSDisplay::paintEvent( QPaintEvent * ) {
}
////////////////////////////////////////////////////////////////////////////////
-KRPie::KRPie( KIO::filesize_t _totalSize, QWidget *parent ) : QWidget( parent, 0 ), totalSize( _totalSize ) {
+KRPie::KRPie( KIO::filesize_t _totalSize, TQWidget *tqparent ) : TQWidget( tqparent, 0 ), totalSize( _totalSize ) {
slices.setAutoDelete( true ); // kill items when they are removed
- slices.append( new KRPieSlice( 100, Qt::yellow, "DEFAULT" ) );
+ slices.append( new KRPieSlice( 100, TQt::yellow, "DEFAULT" ) );
sizeLeft = totalSize;
resize( 300, 300 );
}
-void KRPie::paintEvent( QPaintEvent * ) {
- QPainter paint( this );
+void KRPie::paintEvent( TQPaintEvent * ) {
+ TQPainter paint( this );
// now create the slices
KRPieSlice *slice;
float sAngle = STARTANGLE;
@@ -167,8 +167,8 @@ void KRPie::paintEvent( QPaintEvent * ) {
paint.drawPie( LEFT, BOTTOM + i, WIDTH, HEIGHT, ( int ) sAngle, ( int ) angle );
sAngle += angle;
}
- paint.setPen( Qt::yellow ); // pen
- paint.setBrush( Qt::yellow ); // fill
+ paint.setPen( TQt::yellow ); // pen
+ paint.setBrush( TQt::yellow ); // fill
// for (int i=1; i<Z_HEIGHT; ++i)
// paint.drawPie(LEFT,BOTTOM+i,WIDTH,HEIGHT,sAngle,360*16-(STARTANGLE-sAngle));
sAngle = STARTANGLE;
@@ -182,31 +182,31 @@ void KRPie::paintEvent( QPaintEvent * ) {
}
- paint.setPen( Qt::black );
+ paint.setPen( TQt::black );
// the pie
// paint.drawPie(LEFT,BOTTOM,WIDTH,HEIGHT,STARTANGLE,360*16);
///////////////////////// end of empty pie /////////////////////////
// now, the pie is ready to draw slices on...
// to make a good look on the perimiter, draw another black circle
- paint.setPen( Qt::black );
+ paint.setPen( TQt::black );
paint.drawArc( LEFT, BOTTOM, WIDTH, HEIGHT, STARTANGLE, 360 * 16 );
}
-void KRPie::addSlice( KIO::filesize_t size, QString label ) {
+void KRPie::addSlice( KIO::filesize_t size, TQString label ) {
int i = ( slices.count() % 12 );
slices.removeLast();
slices.append( new KRPieSlice( size * 100 / totalSize, colors[ i ], label ) );
sizeLeft -= size;
- slices.append( new KRPieSlice( sizeLeft * 100 / totalSize, Qt::yellow, "DEFAULT" ) );
+ slices.append( new KRPieSlice( sizeLeft * 100 / totalSize, TQt::yellow, "DEFAULT" ) );
}
////////////////////////////////////////////////////
/////////////////// KrQuickSearch /////////////////
////////////////////////////////////////////////////
-KrQuickSearch::KrQuickSearch( QWidget *parent, const char * name ) : KLineEdit( parent, name ) {}
+KrQuickSearch::KrQuickSearch( TQWidget *tqparent, const char * name ) : KLineEdit( tqparent, name ) {}
-void KrQuickSearch::myKeyPressEvent( QKeyEvent *e ) {
+void KrQuickSearch::myKeyPressEvent( TQKeyEvent *e ) {
switch ( e->key() ) {
case Key_Escape:
emit stop( 0 );
diff --git a/krusader/Dialogs/krspecialwidgets.h b/krusader/Dialogs/krspecialwidgets.h
index 9d0a36a..3952a89 100644
--- a/krusader/Dialogs/krspecialwidgets.h
+++ b/krusader/Dialogs/krspecialwidgets.h
@@ -32,94 +32,97 @@ A
#ifndef KRSPECIALWIDGETS_H
#define KRSPECIALWIDGETS_H
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qcolor.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
+#include <tqptrlist.h>
#include <klineedit.h>
-#include <qevent.h>
+#include <tqevent.h>
#include <kio/global.h>
class KRPieSlice;
-class KRPie : public QWidget {
+class KRPie : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- KRPie( KIO::filesize_t _totalSize, QWidget *parent = 0 );
- void addSlice( KIO::filesize_t size, QString label );
+ KRPie( KIO::filesize_t _totalSize, TQWidget *tqparent = 0 );
+ void addSlice( KIO::filesize_t size, TQString label );
protected:
- void paintEvent( QPaintEvent * );
+ void paintEvent( TQPaintEvent * );
private:
- QList<KRPieSlice> slices;
+ TQList<KRPieSlice> slices;
KIO::filesize_t totalSize, sizeLeft;
- static QColor colors[ 12 ];
+ static TQColor colors[ 12 ];
};
-class KRFSDisplay : public QWidget {
+class KRFSDisplay : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
// this constructor is used for a mounted filesystem
- KRFSDisplay( QWidget *parent, QString _alias, QString _realName,
+ KRFSDisplay( TQWidget *tqparent, TQString _alias, TQString _realName,
KIO::filesize_t _total, KIO::filesize_t _free );
// this one is for an unmounted/supermount file system
- KRFSDisplay( QWidget *parent, QString _alias, QString _realName, bool sm = false );
+ KRFSDisplay( TQWidget *tqparent, TQString _alias, TQString _realName, bool sm = false );
// the last one is used inside MountMan(R), when no filesystem is selected
- KRFSDisplay( QWidget *parent );
+ KRFSDisplay( TQWidget *tqparent );
inline void setTotalSpace( KIO::filesize_t t ) { totalSpace = t; }
inline void setFreeSpace( KIO::filesize_t t ) { freeSpace = t; }
- inline void setAlias( QString a ) { alias = a; }
- inline void setRealName( QString r ) { realName = r; }
+ inline void setAlias( TQString a ) { alias = a; }
+ inline void setRealName( TQString r ) { realName = r; }
inline void setMounted( bool m ) { mounted = m; }
inline void setEmpty( bool e ) { empty = e; }
inline void setSupermount( bool s ) { supermount = s; }
protected:
- void paintEvent( QPaintEvent * );
+ void paintEvent( TQPaintEvent * );
private:
KIO::filesize_t totalSpace, freeSpace;
- QString alias, realName;
+ TQString alias, realName;
bool mounted, empty, supermount;
};
class KRPieSlice {
public:
- KRPieSlice( float _perct, QColor _color, QString _label ) :
+ KRPieSlice( float _perct, TQColor _color, TQString _label ) :
perct( _perct ), color( _color ), label( _label ) {}
- inline QColor getColor() { return color; }
+ inline TQColor getColor() { return color; }
inline float getPerct() { return perct; }
- inline QString getLabel() { return label; }
+ inline TQString getLabel() { return label; }
inline void setPerct( float _perct ) { perct = _perct; }
- inline void setLabel( QString _label ) { label = _label; }
+ inline void setLabel( TQString _label ) { label = _label; }
private:
float perct;
- QColor color;
- QString label;
+ TQColor color;
+ TQString label;
};
class KrQuickSearch: public KLineEdit {
Q_OBJECT
+ TQ_OBJECT
public:
- KrQuickSearch(QWidget *parent, const char * name = 0);
- void addText(const QString &str) { setText(text()+str); }
- void myKeyPressEvent(QKeyEvent *e);
- void myIMStartEvent(QIMEvent* e) {
+ KrQuickSearch(TQWidget *tqparent, const char * name = 0);
+ void addText(const TQString &str) { setText(text()+str); }
+ void myKeyPressEvent(TQKeyEvent *e);
+ void myIMStartEvent(TQIMEvent* e) {
imStartEvent(e);
}
- void myIMEndEvent(QIMEvent* e) {
+ void myIMEndEvent(TQIMEvent* e) {
imEndEvent(e);
}
- void myIMComposeEvent(QIMEvent* e) {
+ void myIMComposeEvent(TQIMEvent* e) {
imComposeEvent(e);
}
signals:
- void stop(QKeyEvent *e);
- void process(QKeyEvent *e);
- void otherMatching(const QString &, int);
+ void stop(TQKeyEvent *e);
+ void process(TQKeyEvent *e);
+ void otherMatching(const TQString &, int);
};
diff --git a/krusader/Dialogs/krspwidgets.cpp b/krusader/Dialogs/krspwidgets.cpp
index 64da41f..2090ba1 100644
--- a/krusader/Dialogs/krspwidgets.cpp
+++ b/krusader/Dialogs/krspwidgets.cpp
@@ -34,28 +34,28 @@
#include "../Panel/listpanel.h"
#include "../kicons.h"
#include "../Filter/filtertabs.h"
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qlistbox.h>
-#include <qspinbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlistbox.h>
+#include <tqspinbox.h>
#include <klocale.h>
#include <kcombobox.h>
#include <kiconloader.h>
#include <kcursor.h>
-#include <qbitmap.h>
+#include <tqbitmap.h>
#include "../resources.h"
///////////////////// initiation of the static members ////////////////////////
-QStrList KRSpWidgets::maskList;
+TQStrList KRSpWidgets::tqmaskList;
///////////////////////////////////////////////////////////////////////////////
KRSpWidgets::KRSpWidgets(){
}
-KRQuery KRSpWidgets::getMask(QString caption, bool nameOnly ) {
+KRQuery KRSpWidgets::getMask(TQString caption, bool nameOnly ) {
if( !nameOnly ) {
return FilterTabs::getQuery();
}
@@ -75,19 +75,19 @@ KURL KRSpWidgets::newFTP() {
if (p->url->currentText()=="") return KURL(); // empty url
KURL url;
- QString protocol = p->prefix->currentText();
+ TQString protocol = p->prefix->currentText();
protocol.truncate(protocol.length() - 3); // remove the trailing ://
- QString username = p->username->text().simplifyWhiteSpace();
- QString password = p->password->text().simplifyWhiteSpace();
- QString uri = p->url->currentText();
+ TQString username = p->username->text().simplifyWhiteSpace();
+ TQString password = p->password->text().simplifyWhiteSpace();
+ TQString uri = p->url->currentText();
- int uriStart = uri.findRev( '@' ); /* lets the user enter user and password in the URI field */
+ int uriStart = uri.tqfindRev( '@' ); /* lets the user enter user and password in the URI field */
if( uriStart != -1 ) {
- QString uriUser = uri.left( uriStart );
- QString uriPsw = QString::null;
+ TQString uriUser = uri.left( uriStart );
+ TQString uriPsw = TQString();
uri = uri.mid( uriStart + 1 );
- int pswStart = uriUser.find( ':' ); /* getting the password name from the URL */
+ int pswStart = uriUser.tqfind( ':' ); /* getting the password name from the URL */
if( pswStart != -1 ) {
uriPsw = uriUser.mid( pswStart + 1 );
uriUser = uriUser.left( pswStart );
@@ -100,9 +100,9 @@ KURL KRSpWidgets::newFTP() {
password = password.isEmpty() ? uriPsw : password + "@" + uriPsw;
}
- QString host = uri; /* separating the hostname and path from the uri */
- QString path = QString::null;
- int pathStart = uri.find( "/" );
+ TQString host = uri; /* separating the hostname and path from the uri */
+ TQString path = TQString();
+ int pathStart = uri.tqfind( "/" );
if( pathStart != -1 ) {
path = host.mid( pathStart );
host = host.left( pathStart );
@@ -132,7 +132,7 @@ void newFTPSub::accept() {
// save the history and completion list when the history combo is
// destroyed
krConfig->setGroup("Private");
- QStringList list = url->completionObject()->items();
+ TQStringList list = url->completionObject()->items();
krConfig->writeEntry( "newFTP Completion list", list );
list = url->historyItems();
krConfig->writeEntry( "newFTP History list", list );
@@ -151,12 +151,12 @@ KRMaskChoiceSub::KRMaskChoiceSub() : KRMaskChoice(0,0,true) {
label->setText(i18n("Enter a selection:"));
// the predefined selections list
krConfig->setGroup("Private");
- QStrList lst;
+ TQStrList lst;
int i=krConfig->readListEntry("Predefined Selections",lst);
if (i>0) preSelections->insertStrList(lst);
// the combo-box tweaks
selection->setDuplicatesEnabled(false);
- selection->insertStrList(KRSpWidgets::maskList);
+ selection->insertStrList(KRSpWidgets::tqmaskList);
selection->lineEdit()->setText("*");
selection->lineEdit()->selectAll();
selection->setFocus();
@@ -171,20 +171,20 @@ void KRMaskChoiceSub::accept() {
bool add = true;
char *tmp;
// make sure we don't have that already
- for ( tmp = KRSpWidgets::maskList.first(); tmp ; tmp = KRSpWidgets::maskList.next() )
- if (QString(tmp).simplifyWhiteSpace() == selection->currentText().simplifyWhiteSpace()) {
+ for ( tmp = KRSpWidgets::tqmaskList.first(); tmp ; tmp = KRSpWidgets::tqmaskList.next() )
+ if (TQString(tmp).simplifyWhiteSpace() == selection->currentText().simplifyWhiteSpace()) {
// break if we found one such as this
add = false;
break;
}
if (add)
- KRSpWidgets::maskList.insert(0,selection->currentText().local8Bit());
+ KRSpWidgets::tqmaskList.insert(0,selection->currentText().local8Bit());
// write down the predefined selections list
- QStrList list;
- QListBoxItem *i=preSelections->firstItem();
+ TQStrList list;
+ TQListBoxItem *i=preSelections->firstItem();
while (i!=0) {
- if (i->text().find(i18n("compare mode"))==-1)
+ if (i->text().tqfind(i18n("compare mode"))==-1)
list.append(i->text().local8Bit());
i=i->next();
}
@@ -194,9 +194,9 @@ void KRMaskChoiceSub::accept() {
}
void KRMaskChoiceSub::addSelection() {
- QString temp=selection->currentText();
+ TQString temp=selection->currentText();
bool itemExists=false;
- QListBoxItem *i=preSelections->firstItem();
+ TQListBoxItem *i=preSelections->firstItem();
// check if the selection already exists
while (i!=0)
if (i->text()==temp) {
@@ -211,7 +211,7 @@ void KRMaskChoiceSub::addSelection() {
void KRMaskChoiceSub::deleteSelection() {
if (preSelections->currentItem()!=-1 &&
- preSelections->currentText().find(i18n("compare mode"))==-1) {
+ preSelections->currentText().tqfind(i18n("compare mode"))==-1) {
preSelections->removeItem(preSelections->currentItem());
preSelections->update();
}
@@ -222,20 +222,20 @@ void KRMaskChoiceSub::clearSelections() {
preSelections->update();
}
-void KRMaskChoiceSub::acceptFromList(QListBoxItem *i) {
+void KRMaskChoiceSub::acceptFromList(TQListBoxItem *i) {
selection->insertItem(i->text(),0);
accept();
}
////////////////////////// QuickNavLineEdit ////////////////////
-QuickNavLineEdit::QuickNavLineEdit(const QString &string, QWidget *parent, const char *name):
- KLineEdit(string, parent, name) { init(); }
+QuickNavLineEdit::QuickNavLineEdit(const TQString &string, TQWidget *tqparent, const char *name):
+ KLineEdit(string, tqparent, name) { init(); }
-QuickNavLineEdit::QuickNavLineEdit(QWidget *parent, const char *name):
- KLineEdit(parent, name) { init(); }
+QuickNavLineEdit::QuickNavLineEdit(TQWidget *tqparent, const char *name):
+ KLineEdit(tqparent, name) { init(); }
-int QuickNavLineEdit::findCharFromPos(const QString & str, const QFontMetrics & metrics, int pos)
+int QuickNavLineEdit::findCharFromPos(const TQString & str, const TQFontMetrics & metrics, int pos)
{
if (pos < 0)
return -1;
@@ -252,11 +252,11 @@ void QuickNavLineEdit::init() {
//setCompletionMode( KGlobalSettings::CompletionPopupAuto ); ==> removed by public demand
}
-void QuickNavLineEdit::leaveEvent(QEvent *) {
+void QuickNavLineEdit::leaveEvent(TQEvent *) {
clearAll();
}
-void QuickNavLineEdit::mousePressEvent( QMouseEvent *m ) {
+void QuickNavLineEdit::mousePressEvent( TQMouseEvent *m ) {
if (m->state()!=ControlButton) clearAll();
else
{
@@ -272,10 +272,10 @@ void QuickNavLineEdit::mousePressEvent( QMouseEvent *m ) {
KLineEdit::mousePressEvent(m);
}
-int QuickNavLineEdit::charCount(const QMouseEvent * const m,QString * const str) {
+int QuickNavLineEdit::charCount(const TQMouseEvent * const m,TQString * const str) {
// find how much of the string we've selected (approx)
// and select from from the start to the closet slash (on the right)
- const QString tx = text().simplifyWhiteSpace();
+ const TQString tx = text().simplifyWhiteSpace();
if (tx.isEmpty()) {
clearAll();
return -1;
@@ -283,21 +283,21 @@ int QuickNavLineEdit::charCount(const QMouseEvent * const m,QString * const str)
int numOfChars = findCharFromPos(tx, fontMetrics(), m->x() - 5);
if(str) *str=tx;
- return tx.find('/', numOfChars);
+ return tx.tqfind('/', numOfChars);
}
-void QuickNavLineEdit::mouseMoveEvent( QMouseEvent *m) {
+void QuickNavLineEdit::mouseMoveEvent( TQMouseEvent *m) {
if (m->state()!=ControlButton) { // works only with ctrl pressed
clearAll();
KLineEdit::mouseMoveEvent(m);
return;
}
- QString tx;
+ TQString tx;
int idx=charCount(m,&tx);
if (idx == -1 && !_dummyDisplayed) { // pointing on or after the current directory
if (_pop) delete _pop;
_pop = KPassivePopup::message( i18n("Quick Navigation"),
- "<qt>" + i18n("Already at <i>%1</i>").arg(tx.left(idx)) + "</qt>",
+ "<qt>" + i18n("Already at <i>%1</i>").tqarg(tx.left(idx)) + "</qt>",
*(KCursor::handCursor().bitmap()), this);
_dummyDisplayed=true;
@@ -308,7 +308,7 @@ void QuickNavLineEdit::mouseMoveEvent( QMouseEvent *m) {
_dummyDisplayed=false;
_pop = KPassivePopup::message( i18n("Quick Navigation"),
- "<qt>" + i18n("Click to go to <i>%1</i>").arg(tx.left(idx)) + "</qt>",
+ "<qt>" + i18n("Click to go to <i>%1</i>").tqarg(tx.left(idx)) + "</qt>",
*(KCursor::handCursor().bitmap()), this );
}
KLineEdit::mouseMoveEvent(m);
diff --git a/krusader/Dialogs/krspwidgets.h b/krusader/Dialogs/krspwidgets.h
index d1466cb..5ab7bb3 100644
--- a/krusader/Dialogs/krspwidgets.h
+++ b/krusader/Dialogs/krspwidgets.h
@@ -30,7 +30,7 @@
#ifndef KRSPWIDGETS_H
#define KRSPWIDGETS_H
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include <kurl.h>
#include "krmaskchoice.h"
#include "newftpgui.h"
@@ -48,11 +48,11 @@ class KRSpWidgets {
public:
KRSpWidgets();
- static KRQuery getMask( QString caption, bool nameOnly=false ); // get file-mask for (un)selecting files
+ static KRQuery getMask( TQString caption, bool nameOnly=false ); // get file-tqmask for (un)selecting files
static KURL newFTP();
private:
- static QStrList maskList; // used by KRMaskChoiceSub
+ static TQStrList tqmaskList; // used by KRMaskChoiceSub
};
/////////////////////////// newFTPSub ///////////////////////////////////////
@@ -76,7 +76,7 @@ public slots:
void addSelection();
void deleteSelection();
void clearSelections();
- void acceptFromList(QListBoxItem *i);
+ void acceptFromList(TQListBoxItem *i);
protected:
void reject();
@@ -89,22 +89,22 @@ protected:
class QuickNavLineEdit: public KLineEdit {
public:
- QuickNavLineEdit(const QString &string, QWidget *parent, const char *name=0);
- QuickNavLineEdit(QWidget *parent=0, const char *name=0);
+ QuickNavLineEdit(const TQString &string, TQWidget *tqparent, const char *name=0);
+ QuickNavLineEdit(TQWidget *tqparent=0, const char *name=0);
virtual ~QuickNavLineEdit() {}
- static int findCharFromPos(const QString &, const QFontMetrics &, int pos);
+ static int findCharFromPos(const TQString &, const TQFontMetrics &, int pos);
protected:
- void mouseMoveEvent( QMouseEvent *m);
- void leaveEvent( QEvent * );
- void mousePressEvent( QMouseEvent *m );
+ void mouseMoveEvent( TQMouseEvent *m);
+ void leaveEvent( TQEvent * );
+ void mousePressEvent( TQMouseEvent *m );
inline void clearAll() { _numOfSelectedChars = 0; if (_pop) delete _pop; _dummyDisplayed=false; }
void init();
private:
- int charCount(const QMouseEvent * const , QString* const =0) ;
+ int charCount(const TQMouseEvent * const , TQString* const =0) ;
int _numOfSelectedChars;
bool _dummyDisplayed;
- QGuardedPtr<KPassivePopup> _pop;
+ TQGuardedPtr<KPassivePopup> _pop;
};
#endif
diff --git a/krusader/Dialogs/krsqueezedtextlabel.cpp b/krusader/Dialogs/krsqueezedtextlabel.cpp
index 5d93269..181c523 100644
--- a/krusader/Dialogs/krsqueezedtextlabel.cpp
+++ b/krusader/Dialogs/krsqueezedtextlabel.cpp
@@ -1,17 +1,17 @@
#include "krsqueezedtextlabel.h"
#include <kstringhandler.h>
#include <kurldrag.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
-KrSqueezedTextLabel::KrSqueezedTextLabel(QWidget *parent, const char *name):
- KSqueezedTextLabel(parent, name), acceptDrops( false ), _index(-1), _length(-1) {
+KrSqueezedTextLabel::KrSqueezedTextLabel(TQWidget *tqparent, const char *name):
+ KSqueezedTextLabel(tqparent, name), acceptDrops( false ), _index(-1), _length(-1) {
}
KrSqueezedTextLabel::~KrSqueezedTextLabel() {
}
-void KrSqueezedTextLabel::mousePressEvent(QMouseEvent *) {
+void KrSqueezedTextLabel::mousePressEvent(TQMouseEvent *) {
emit clicked();
}
@@ -21,11 +21,11 @@ void KrSqueezedTextLabel::enableDrops( bool flag )
setAcceptDrops( acceptDrops = flag );
}
-void KrSqueezedTextLabel::dropEvent(QDropEvent *e) {
+void KrSqueezedTextLabel::dropEvent(TQDropEvent *e) {
emit dropped(e);
}
-void KrSqueezedTextLabel::dragEnterEvent(QDragEnterEvent *e) {
+void KrSqueezedTextLabel::dragEnterEvent(TQDragEnterEvent *e) {
if( acceptDrops )
e->accept( KURLDrag::canDecode( e ) );
else
@@ -36,8 +36,8 @@ void KrSqueezedTextLabel::squeezeTextToLabel(int index, int length) {
if (index==-1 || length==-1)
KSqueezedTextLabel::squeezeTextToLabel();
else {
- QString sqtext=fullText;
- QFontMetrics fm(fontMetrics());
+ TQString sqtext=fullText;
+ TQFontMetrics fm(fontMetrics());
int labelWidth = size().width();
int textWidth = fm.width(sqtext);
if (textWidth > labelWidth) {
@@ -47,29 +47,29 @@ void KrSqueezedTextLabel::squeezeTextToLabel(int index, int length) {
// remove as much as possible from the left, and then from the right
if (index>3) {
- delta=QMIN(index, numOfExtraChars);
+ delta=TQMIN(index, numOfExtraChars);
numOfExtraChars -= delta;
- sqtext.replace(0, delta, "...");
+ sqtext.tqreplace(0, delta, "...");
}
if (numOfExtraChars>0 && ((int)sqtext.length() > length+3)) {
- delta = QMIN(numOfExtraChars, (int)sqtext.length() - (length+3));
- sqtext.replace(sqtext.length()-delta, delta, "...");
+ delta = TQMIN(numOfExtraChars, (int)sqtext.length() - (length+3));
+ sqtext.tqreplace(sqtext.length()-delta, delta, "...");
}
- QLabel::setText(sqtext);
+ TQLabel::setText(sqtext);
- QToolTip::remove( this );
- QToolTip::add( this, fullText );
+ TQToolTip::remove( this );
+ TQToolTip::add( this, fullText );
} else {
- QLabel::setText(fullText);
+ TQLabel::setText(fullText);
- QToolTip::remove( this );
- QToolTip::hide();
+ TQToolTip::remove( this );
+ TQToolTip::hide();
}
}
}
-void KrSqueezedTextLabel::setText( const QString &text, int index, int length ) {
+void KrSqueezedTextLabel::setText( const TQString &text, int index, int length ) {
_index=index;
_length=length;
fullText = text;
diff --git a/krusader/Dialogs/krsqueezedtextlabel.h b/krusader/Dialogs/krsqueezedtextlabel.h
index 8f81389..f75309f 100644
--- a/krusader/Dialogs/krsqueezedtextlabel.h
+++ b/krusader/Dialogs/krsqueezedtextlabel.h
@@ -1,11 +1,11 @@
-#ifndef KRSQUEEZEDTEXTLABEL_H
-#define KRSQUEEZEDTEXTLABEL_H
+#ifndef KRSTQUEEZEDTEXTLABEL_H
+#define KRSTQUEEZEDTEXTLABEL_H
#include <ksqueezedtextlabel.h>
-class QMouseEvent;
-class QDropEvent;
-class QDragEnterEvent;
+class TQMouseEvent;
+class TQDropEvent;
+class TQDragEnterEvent;
/**
This class overloads KSqueezedTextLabel and simply adds a clicked signal,
@@ -16,24 +16,25 @@ NEW: a special setText() method allows to choose which part of the string should
*/
class KrSqueezedTextLabel : public KSqueezedTextLabel {
Q_OBJECT
+ TQ_OBJECT
public:
- KrSqueezedTextLabel(QWidget *parent = 0, const char *name = 0);
+ KrSqueezedTextLabel(TQWidget *tqparent = 0, const char *name = 0);
~KrSqueezedTextLabel();
void enableDrops( bool flag );
public slots:
- void setText( const QString &text, int index=-1, int length=-1 );
+ void setText( const TQString &text, int index=-1, int length=-1 );
signals:
void clicked(); /**< emitted when someone clicks on the label */
- void dropped(QDropEvent *); /**< emitted when someone drops URL onto the label */
+ void dropped(TQDropEvent *); /**< emitted when someone drops URL onto the label */
protected:
- void resizeEvent( QResizeEvent * ) { squeezeTextToLabel(_index, _length); }
- virtual void mousePressEvent(QMouseEvent *e);
- virtual void dropEvent(QDropEvent *e);
- virtual void dragEnterEvent(QDragEnterEvent *e);
+ void resizeEvent( TQResizeEvent * ) { squeezeTextToLabel(_index, _length); }
+ virtual void mousePressEvent(TQMouseEvent *e);
+ virtual void dropEvent(TQDropEvent *e);
+ virtual void dragEnterEvent(TQDragEnterEvent *e);
void squeezeTextToLabel(int index=-1, int length=-1);
private:
diff --git a/krusader/Dialogs/kurllistrequester.cpp b/krusader/Dialogs/kurllistrequester.cpp
index 4575555..32f1cda 100644
--- a/krusader/Dialogs/kurllistrequester.cpp
+++ b/krusader/Dialogs/kurllistrequester.cpp
@@ -30,9 +30,9 @@
#include "kurllistrequester.h"
#include "../VFS/vfs.h"
-#include <qpixmap.h>
-#include <qcursor.h>
-#include <qlayout.h>
+#include <tqpixmap.h>
+#include <tqcursor.h>
+#include <tqlayout.h>
#include <kfiledialog.h>
#include <kpopupmenu.h>
#include <kiconloader.h>
@@ -41,31 +41,31 @@
#define DELETE_ITEM_ID 100
-KURLListRequester::KURLListRequester( QWidget *parent, const char * name ) : QWidget( parent, name )
+KURLListRequester::KURLListRequester( TQWidget *tqparent, const char * name ) : TQWidget( tqparent, name )
{
KIconLoader *iconLoader = new KIconLoader();
- QPixmap imageAdd = iconLoader->loadIcon( "1downarrow", KIcon::Panel, 16 );
- QPixmap imageFolder = iconLoader->loadIcon( "folder", KIcon::Panel, 16 );
+ TQPixmap imageAdd = iconLoader->loadIcon( "1downarrow", KIcon::Panel, 16 );
+ TQPixmap imageFolder = iconLoader->loadIcon( "folder", KIcon::Panel, 16 );
// Creating the widget
- QGridLayout *urlListRequesterGrid = new QGridLayout( this );
+ TQGridLayout *urlListRequesterGrid = new TQGridLayout( this );
urlListRequesterGrid->setSpacing( 0 );
urlListRequesterGrid->setMargin( 0 );
urlLineEdit = new KLineEdit( this, "urlLineEdit" );
urlListRequesterGrid->addWidget( urlLineEdit, 0, 0 );
- urlListBox = new QListBox( this, "urlListBox" );
- urlListBox->setSelectionMode( QListBox::Extended );
+ urlListBox = new TQListBox( this, "urlListBox" );
+ urlListBox->setSelectionMode( TQListBox::Extended );
urlListRequesterGrid->addMultiCellWidget( urlListBox, 1, 1, 0, 2 );
- urlAddBtn = new QToolButton( this, "urlAddBtn" );
+ urlAddBtn = new TQToolButton( this, "urlAddBtn" );
urlAddBtn->setText( "" );
urlAddBtn->setPixmap( imageAdd );
urlListRequesterGrid->addWidget( urlAddBtn, 0, 1 );
- urlBrowseBtn = new QToolButton( this, "urlBrowseBtn" );
+ urlBrowseBtn = new TQToolButton( this, "urlBrowseBtn" );
urlBrowseBtn->setText( "" );
urlBrowseBtn->setPixmap( imageFolder );
urlListRequesterGrid->addWidget( urlBrowseBtn, 0, 2 );
@@ -77,19 +77,19 @@ KURLListRequester::KURLListRequester( QWidget *parent, const char * name ) : QWi
// connection table
- connect( urlAddBtn, SIGNAL( clicked() ), this, SLOT( slotAdd() ) );
- connect( urlBrowseBtn, SIGNAL( clicked() ), this, SLOT( slotBrowse() ) );
- connect( urlLineEdit, SIGNAL( returnPressed(const QString&) ), this, SLOT( slotAdd() ) );
- connect( urlListBox, SIGNAL( rightButtonClicked ( QListBoxItem *, const QPoint & ) ), this,
- SLOT( slotRightClicked( QListBoxItem * ) ) );
+ connect( urlAddBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAdd() ) );
+ connect( urlBrowseBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBrowse() ) );
+ connect( urlLineEdit, TQT_SIGNAL( returnPressed(const TQString&) ), this, TQT_SLOT( slotAdd() ) );
+ connect( urlListBox, TQT_SIGNAL( rightButtonClicked ( TQListBoxItem *, const TQPoint & ) ), this,
+ TQT_SLOT( slotRightClicked( TQListBoxItem * ) ) );
}
void KURLListRequester::slotAdd()
{
- QString text = urlLineEdit->text().simplifyWhiteSpace();
+ TQString text = urlLineEdit->text().simplifyWhiteSpace();
if( text.length() )
{
- QString error = QString::null;
+ TQString error = TQString();
emit checkValidity( text, error );
if( !error.isNull() )
@@ -104,13 +104,13 @@ void KURLListRequester::slotAdd()
void KURLListRequester::slotBrowse()
{
- KURL url = KFileDialog::getExistingURL( QString::null, this );
+ KURL url = KFileDialog::getExistingURL( TQString(), this );
if( !url.isEmpty())
urlLineEdit->setText( vfs::pathOrURL( url ) );
urlLineEdit->setFocus();
}
-void KURLListRequester::keyPressEvent(QKeyEvent *e)
+void KURLListRequester::keyPressEvent(TQKeyEvent *e)
{
if( e->key() == Key_Delete )
{
@@ -121,13 +121,13 @@ void KURLListRequester::keyPressEvent(QKeyEvent *e)
}
}
- QWidget::keyPressEvent( e );
+ TQWidget::keyPressEvent( e );
}
void KURLListRequester::deleteSelectedItems()
{
int i=0;
- QListBoxItem *item;
+ TQListBoxItem *item;
while( (item = urlListBox->item(i)) )
{
@@ -140,7 +140,7 @@ void KURLListRequester::deleteSelectedItems()
}
}
-void KURLListRequester::slotRightClicked( QListBoxItem *item )
+void KURLListRequester::slotRightClicked( TQListBoxItem *item )
{
if( item == 0 )
return;
@@ -148,7 +148,7 @@ void KURLListRequester::slotRightClicked( QListBoxItem *item )
KPopupMenu popupMenu( this );
popupMenu.insertItem( i18n( "Delete" ), DELETE_ITEM_ID );
- switch( popupMenu.exec( QCursor::pos() ) )
+ switch( popupMenu.exec( TQCursor::pos() ) )
{
case DELETE_ITEM_ID:
if( item->isSelected() )
@@ -163,21 +163,21 @@ KURL::List KURLListRequester::urlList()
{
KURL::List urls;
- QString text = urlLineEdit->text().simplifyWhiteSpace();
+ TQString text = urlLineEdit->text().simplifyWhiteSpace();
if (!text.isEmpty())
{
- QString error = QString::null;
+ TQString error = TQString();
emit checkValidity( text, error );
if( error.isNull() )
urls.append( vfs::fromPathOrURL( text ) );
}
- QListBoxItem *item = urlListBox->firstItem();
+ TQListBoxItem *item = urlListBox->firstItem();
while ( item )
{
- QString text = item->text().simplifyWhiteSpace();
+ TQString text = item->text().simplifyWhiteSpace();
- QString error = QString::null;
+ TQString error = TQString();
emit checkValidity( text, error );
if( error.isNull() )
urls.append( vfs::fromPathOrURL( text ) );
diff --git a/krusader/Dialogs/kurllistrequester.h b/krusader/Dialogs/kurllistrequester.h
index 06afe52..60891b1 100644
--- a/krusader/Dialogs/kurllistrequester.h
+++ b/krusader/Dialogs/kurllistrequester.h
@@ -31,44 +31,45 @@
#ifndef __KURLLISTREQUESTER_H__
#define __KURLLISTREQUESTER_H__
-#include <qwidget.h>
-#include <qlistbox.h>
-#include <qtoolbutton.h>
+#include <tqwidget.h>
+#include <tqlistbox.h>
+#include <tqtoolbutton.h>
#include <klineedit.h>
#include <kurl.h>
#include <kurlcompletion.h>
-class KURLListRequester : public QWidget
+class KURLListRequester : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KURLListRequester( QWidget *parent = 0, const char * name = 0 );
+ KURLListRequester( TQWidget *tqparent = 0, const char * name = 0 );
KURL::List urlList();
void setUrlList( KURL::List );
KLineEdit *lineEdit() {return urlLineEdit;}
- QListBox *listBox() {return urlListBox;}
+ TQListBox *listBox() {return urlListBox;}
- void setCompletionDir( QString dir ) { completion.setDir( dir ); }
+ void setCompletionDir( TQString dir ) { completion.setDir( dir ); }
signals:
- void checkValidity( QString &text, QString &error );
+ void checkValidity( TQString &text, TQString &error );
protected slots:
void slotAdd();
void slotBrowse();
- void slotRightClicked( QListBoxItem * );
+ void slotRightClicked( TQListBoxItem * );
protected:
- virtual void keyPressEvent(QKeyEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
void deleteSelectedItems();
KLineEdit *urlLineEdit;
- QListBox *urlListBox;
- QToolButton *urlAddBtn;
- QToolButton *urlBrowseBtn;
+ TQListBox *urlListBox;
+ TQToolButton *urlAddBtn;
+ TQToolButton *urlBrowseBtn;
KURLCompletion completion;
};
diff --git a/krusader/Dialogs/newftpgui.cpp b/krusader/Dialogs/newftpgui.cpp
index 1e8c3ed..223fe7f 100644
--- a/krusader/Dialogs/newftpgui.cpp
+++ b/krusader/Dialogs/newftpgui.cpp
@@ -8,18 +8,18 @@
****************************************************************************/
#include "newftpgui.h"
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qgrid.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qimage.h>
-#include <qpixmap.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqgrid.h>
+#include <tqvariant.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include <kprotocolinfo.h>
#include <kcombobox.h>
@@ -28,118 +28,115 @@
/*
- * Constructs a newFTPGUI which is a child of 'parent', with the
+ * Constructs a newFTPGUI which is a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
- #define SIZE_MINIMUM QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0 )
+ #define SIZE_MINIMUM TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0 )
-newFTPGUI::newFTPGUI( QWidget* parent, const char* name, bool modal, WFlags fl )
- : QDialog( parent, name, modal, fl ){
+newFTPGUI::newFTPGUI( TQWidget* tqparent, const char* name, bool modal, WFlags fl )
+ : TQDialog( tqparent, name, modal, fl ){
- QVBoxLayout * layout = new QVBoxLayout( this, 11, 6, "newFTPGUI_layout" );
- layout->setAutoAdd(true);
+ TQVBoxLayout * tqlayout = new TQVBoxLayout( this, 11, 6, "newFTPGUI_layout" );
+ tqlayout->setAutoAdd(true);
if ( !name )
setName( "newFTPGUI" );
resize( 342, 261 );
setCaption( i18n( "New Network Connection" ) );
// setSizeGripEnabled( TRUE );
- setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, sizePolicy().hasHeightForWidth() ) );
- setMinimumSize( QSize( 342, 261 ) );
+ tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, sizePolicy().hasHeightForWidth() ) );
+ setMinimumSize( TQSize( 342, 261 ) );
- QHBox* hbox_image = new QHBox( this, "hbox_image" );
+ TQHBox* hbox_image = new TQHBox( this, "hbox_image" );
hbox_image->setSpacing( 6 );
- PixmapLabel1 = new QLabel( hbox_image, "PixmapLabel1" );
+ PixmapLabel1 = new TQLabel( hbox_image, "PixmapLabel1" );
PixmapLabel1->setPixmap( krLoader->loadIcon("network", KIcon::Desktop, 32) );
- PixmapLabel1->setSizePolicy( SIZE_MINIMUM );
+ PixmapLabel1->tqsetSizePolicy( SIZE_MINIMUM );
- TextLabel3 = new QLabel( i18n( "About to connect to..." ), hbox_image, "TextLabel3" );
- QFont TextLabel3_font( TextLabel3->font() );
+ TextLabel3 = new TQLabel( i18n( "About to connect to..." ), hbox_image, "TextLabel3" );
+ TQFont TextLabel3_font( TextLabel3->font() );
TextLabel3_font.setBold( TRUE );
TextLabel3->setFont( TextLabel3_font );
- QGrid* grid_host = new QGrid( 3, this, "grid_host" );
+ TQGrid* grid_host = new TQGrid( 3, this, "grid_host" );
- TextLabel1 = new QLabel( i18n( "Protocol:" ), grid_host, "TextLabel1" );
- TextLabel1_22 = new QLabel( i18n( "Host:"), grid_host, "TextLabel_2" );
- TextLabel1_3 = new QLabel( i18n( "Port:" ), grid_host, "TextLabel1_3" );
+ TextLabel1 = new TQLabel( i18n( "Protocol:" ), grid_host, "TextLabel1" );
+ TextLabel1_22 = new TQLabel( i18n( "Host:"), grid_host, "TextLabel_2" );
+ TextLabel1_3 = new TQLabel( i18n( "Port:" ), grid_host, "TextLabel1_3" );
- QStringList protocols = KProtocolInfo::protocols();
+ TQStringList protocols = KProtocolInfo::protocols();
prefix = new KComboBox( FALSE, grid_host, "protocol" );
- if( protocols.contains("ftp") )
+ if( protocols.tqcontains("ftp") )
prefix->insertItem( i18n( "ftp://" ) );
- if( protocols.contains("smb") )
+ if( protocols.tqcontains("smb") )
prefix->insertItem( i18n( "smb://" ) );
- if( protocols.contains("fish") )
+ if( protocols.tqcontains("fish") )
prefix->insertItem( i18n( "fish://" ));
- if( protocols.contains("sftp") )
+ if( protocols.tqcontains("sftp") )
prefix->insertItem( i18n( "sftp://" ));
prefix->setAcceptDrops( FALSE );
prefix->setEnabled( TRUE );
- prefix->setSizePolicy( SIZE_MINIMUM );
- connect( prefix,SIGNAL(activated(const QString& )),
- this,SLOT(slotTextChanged(const QString& )));
+ prefix->tqsetSizePolicy( SIZE_MINIMUM );
+ connect( prefix,TQT_SIGNAL(activated(const TQString& )),
+ this,TQT_SLOT(slotTextChanged(const TQString& )));
url = new KHistoryCombo( grid_host, "url" );
url->setMaximumHeight( 20 );
url->setMaxCount( 25 );
url->setDuplicatesEnabled( false );
- connect( url, SIGNAL( activated( const QString& )),
- url, SLOT( addToHistory( const QString& )));
+ connect( url, TQT_SIGNAL( activated( const TQString& )),
+ url, TQT_SLOT( addToHistory( const TQString& )));
// load the history and completion list after creating the history combo
krConfig->setGroup("Private");
- QStringList list = krConfig->readListEntry( "newFTP Completion list" );
+ TQStringList list = krConfig->readListEntry( "newFTP Completion list" );
url->completionObject()->setItems( list );
list = krConfig->readListEntry( "newFTP History list" );
url->setHistoryItems( list );
- port = new QSpinBox( grid_host, "port" );
+ port = new TQSpinBox( grid_host, "port" );
port->setMaxValue( 65535 );
-#if QT_VERSION < 300
- port->setFrameShadow( QSpinBox::Sunken );
-#endif
port->setValue( 21 );
- port->setSizePolicy( SIZE_MINIMUM );
+ port->tqsetSizePolicy( SIZE_MINIMUM );
- TextLabel1_2 = new QLabel( i18n( "Username:" ), this, "TextLabel1_2" );
- username = new QLineEdit( this, "username" );
- TextLabel1_2_2 = new QLabel( i18n( "Password:" ), this, "TextLabel1_2_2" );
- password = new QLineEdit( this, "password" );
- password->setEchoMode( QLineEdit::Password );
+ TextLabel1_2 = new TQLabel( i18n( "Username:" ), this, "TextLabel1_2" );
+ username = new TQLineEdit( this, "username" );
+ TextLabel1_2_2 = new TQLabel( i18n( "Password:" ), this, "TextLabel1_2_2" );
+ password = new TQLineEdit( this, "password" );
+ password->setEchoMode( TQLineEdit::Password );
- QWidget* Layout6 = new QWidget( this, "Layout6" );
- hbox = new QHBoxLayout( Layout6 );
+ TQWidget* Layout6 = new TQWidget( this, "Layout6" );
+ hbox = new TQHBoxLayout( Layout6 );
hbox->setSpacing( 6 );
hbox->setMargin( 0 );
- hbox->addItem(new QSpacerItem(1,1,QSizePolicy::Expanding));
+ hbox->addItem(new TQSpacerItem(1,1,TQSizePolicy::Expanding));
- connectBtn = new QPushButton( i18n( "&Connect" ), Layout6, "connectBtn" );
+ connectBtn = new TQPushButton( i18n( "&Connect" ), Layout6, "connectBtn" );
connectBtn->setAutoDefault( TRUE );
connectBtn->setDefault( TRUE );
hbox->addWidget( connectBtn );
- //saveBtn = new QPushButton( i18n( "&Save" ), Layout6, "saveBtn" );
+ //saveBtn = new TQPushButton( i18n( "&Save" ), Layout6, "saveBtn" );
//saveBtn->setAutoDefault( TRUE );
//hbox->addWidget( saveBtn );
- cancelBtn = new QPushButton( i18n( "&Cancel" ), Layout6, "cancelBtn" );
+ cancelBtn = new TQPushButton( i18n( "&Cancel" ), Layout6, "cancelBtn" );
cancelBtn->setAutoDefault( TRUE );
hbox->addWidget( cancelBtn );
// signals and slots connections
- connect( connectBtn, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( cancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
+ connect( connectBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) );
+ connect( cancelBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) );
// tab order
setTabOrder( url, username );
@@ -154,10 +151,10 @@ newFTPGUI::newFTPGUI( QWidget* parent, const char* name, bool modal, WFlags fl
* Destroys the object and frees any allocated resources
*/
newFTPGUI::~newFTPGUI(){
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
-void newFTPGUI::slotTextChanged(const QString& string){
+void newFTPGUI::slotTextChanged(const TQString& string){
if( string.startsWith("ftp") || string.startsWith("sftp") || string.startsWith("fish") )
{
if( port->value() == 21 || port->value() == 22 )
@@ -172,10 +169,10 @@ void newFTPGUI::slotTextChanged(const QString& string){
* Main event handler. Reimplemented to handle application
* font changes
*/
-bool newFTPGUI::event( QEvent* ev ) {
- bool ret = QDialog::event( ev );
- if ( ev->type() == QEvent::ApplicationFontChange ) {
- QFont TextLabel3_font( TextLabel3->font() );
+bool newFTPGUI::event( TQEvent* ev ) {
+ bool ret = TQDialog::event( ev );
+ if ( ev->type() == TQEvent::ApplicationFontChange ) {
+ TQFont TextLabel3_font( TextLabel3->font() );
TextLabel3_font.setBold( TRUE );
TextLabel3->setFont( TextLabel3_font );
}
diff --git a/krusader/Dialogs/newftpgui.h b/krusader/Dialogs/newftpgui.h
index 2291d4f..6fc5621 100644
--- a/krusader/Dialogs/newftpgui.h
+++ b/krusader/Dialogs/newftpgui.h
@@ -9,46 +9,47 @@
#ifndef NEWFTPGUI_H
#define NEWFTPGUI_H
-#include <qvariant.h>
-#include <qdialog.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QLabel;
-class QLineEdit;
-class QPushButton;
-class QSpinBox;
+#include <tqvariant.h>
+#include <tqdialog.h>
+class TQVBoxLayout;
+class TQHBoxLayout;
+class TQGridLayout;
+class TQLabel;
+class TQLineEdit;
+class TQPushButton;
+class TQSpinBox;
class KComboBox;
class KHistoryCombo;
-class newFTPGUI : public QDialog {
+class newFTPGUI : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- newFTPGUI( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ newFTPGUI( TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~newFTPGUI();
- QLabel* TextLabel1;
+ TQLabel* TextLabel1;
KComboBox* prefix;
- QLabel* TextLabel1_2_2;
- QLabel* TextLabel1_22;
- QLabel* TextLabel1_2;
- QLabel* TextLabel1_3;
- QSpinBox* port;
- QLineEdit* password;
- QPushButton* connectBtn;
- QPushButton* saveBtn;
- QPushButton* cancelBtn;
- QLabel* PixmapLabel1;
- QLabel* TextLabel3;
- QLineEdit* username;
+ TQLabel* TextLabel1_2_2;
+ TQLabel* TextLabel1_22;
+ TQLabel* TextLabel1_2;
+ TQLabel* TextLabel1_3;
+ TQSpinBox* port;
+ TQLineEdit* password;
+ TQPushButton* connectBtn;
+ TQPushButton* saveBtn;
+ TQPushButton* cancelBtn;
+ TQLabel* PixmapLabel1;
+ TQLabel* TextLabel3;
+ TQLineEdit* username;
KHistoryCombo* url;
public slots:
- void slotTextChanged(const QString& string);
+ void slotTextChanged(const TQString& string);
protected:
- QHBoxLayout* hbox;
- bool event( QEvent* );
+ TQHBoxLayout* hbox;
+ bool event( TQEvent* );
};
#endif // NEWFTPGUI_H
diff --git a/krusader/Dialogs/packgui.cpp b/krusader/Dialogs/packgui.cpp
index 7036a3e..63cc9d3 100644
--- a/krusader/Dialogs/packgui.cpp
+++ b/krusader/Dialogs/packgui.cpp
@@ -32,32 +32,32 @@
#include <kfiledialog.h>
#include "../krusader.h"
#include "../defaults.h"
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qstringlist.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
-#define PS(x) lst.contains(x)>0
+#define PS(x) lst.tqcontains(x)>0
// clear the statics first
-QString PackGUI::filename=0;
-QString PackGUI::destination=0;
-QString PackGUI::type=0;
-QMap<QString, QString> PackGUI::extraProps;
+TQString PackGUI::filename=0;
+TQString PackGUI::destination=0;
+TQString PackGUI::type=0;
+TQMap<TQString, TQString> PackGUI::extraProps;
-PackGUI::PackGUI(QString defaultName, QString defaultPath, int noOfFiles, QString filename) :
+PackGUI::PackGUI(TQString defaultName, TQString defaultPath, int noOfFiles, TQString filename) :
PackGUIBase(0,0,true) {
// first, fill the WhatToPack textfield with information
if(noOfFiles == 1)
- TextLabel1->setText( i18n("Pack %1").arg(filename) );
+ TextLabel1->setText( i18n("Pack %1").tqarg(filename) );
else
TextLabel1->setText( i18n("Pack %n file", "Pack %n files", noOfFiles) );
// now, according to the Konfigurator, fill the combobox with the information
// about what kind of packing we can do
krConfig->setGroup("Archives");
- QStringList lst=krConfig->readListEntry("Supported Packers");
+ TQStringList lst=krConfig->readListEntry("Supported Packers");
// now, clear the type combo and begin...
typeData->clear();
if (PS("tar")) typeData->insertItem("tar");
@@ -69,8 +69,8 @@ PackGUI::PackGUI(QString defaultName, QString defaultPath, int noOfFiles, QStrin
if (PS("arj")) typeData->insertItem("arj");
if (PS("7z")) typeData->insertItem("7z");
// set the last used packer as the top one
- QString tmp=krConfig->readEntry("lastUsedPacker",QString::null);
- if (tmp!=QString::null) {
+ TQString tmp=krConfig->readEntry("lastUsedPacker",TQString());
+ if (tmp!=TQString()) {
for (unsigned int i=0; i< typeData->listBox()->count(); ++i)
if (typeData->listBox()->item(i)->text() == tmp) {
typeData->listBox()->removeItem(i);
@@ -91,8 +91,8 @@ PackGUI::PackGUI(QString defaultName, QString defaultPath, int noOfFiles, QStrin
}
void PackGUI::browse() {
- QString temp=KFileDialog::getExistingDirectory(dirData->text(),0,i18n("Please select a directory"));
- if (temp != QString::null)
+ TQString temp=KFileDialog::getExistingDirectory(dirData->text(),0,i18n("Please select a directory"));
+ if (temp != TQString())
dirData->setText(temp);
}
@@ -111,9 +111,9 @@ void PackGUI::accept() {
}
void PackGUI::reject() {
- filename=QString::null;
- destination=QString::null;
- type=QString::null;
+ filename=TQString();
+ destination=TQString();
+ type=TQString();
PackGUIBase::reject();
}
diff --git a/krusader/Dialogs/packgui.h b/krusader/Dialogs/packgui.h
index d88c831..09a02ec 100644
--- a/krusader/Dialogs/packgui.h
+++ b/krusader/Dialogs/packgui.h
@@ -35,8 +35,9 @@
class PackGUI : public PackGUIBase {
Q_OBJECT
+ TQ_OBJECT
public:
- PackGUI(QString defaultName, QString defaultPath, int noOfFiles, QString filename="");
+ PackGUI(TQString defaultName, TQString defaultPath, int noOfFiles, TQString filename="");
public slots:
void browse();
@@ -46,8 +47,8 @@ protected slots:
void reject();
public:
- static QString filename, destination, type;
- static QMap<QString, QString> extraProps;
+ static TQString filename, destination, type;
+ static TQMap<TQString, TQString> extraProps;
};
#endif
diff --git a/krusader/Dialogs/packguibase.cpp b/krusader/Dialogs/packguibase.cpp
index ace6078..71c507f 100644
--- a/krusader/Dialogs/packguibase.cpp
+++ b/krusader/Dialogs/packguibase.cpp
@@ -29,22 +29,22 @@
***************************************************************************/
#include "packguibase.h"
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qspinbox.h>
-#include <qslider.h>
-#include <qhbox.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqspinbox.h>
+#include <tqslider.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
#include <kiconloader.h>
#include <kglobalsettings.h>
#include <kcombobox.h>
@@ -53,116 +53,116 @@
#include "../krusader.h"
/*
- * Constructs a PackGUIBase which is a child of 'parent', with the
+ * Constructs a PackGUIBase which is a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-PackGUIBase::PackGUIBase( QWidget* parent, const char* name, bool modal, WFlags fl )
- : QDialog( parent, name, modal, fl ), expanded( false )
+PackGUIBase::PackGUIBase( TQWidget* tqparent, const char* name, bool modal, WFlags fl )
+ : TQDialog( tqparent, name, modal, fl ), expanded( false )
{
if ( !name )
setName( "PackGUIBase" );
resize( 430, 140 );
setCaption( i18n( "Pack" ) );
- grid = new QGridLayout( this );
+ grid = new TQGridLayout( this );
grid->setSpacing( 6 );
grid->setMargin( 11 );
- hbox = new QHBoxLayout;
+ hbox = new TQHBoxLayout;
hbox->setSpacing( 6 );
hbox->setMargin( 0 );
- TextLabel3 = new QLabel( this, "TextLabel3" );
+ TextLabel3 = new TQLabel( this, "TextLabel3" );
TextLabel3->setText( i18n( "To archive" ) );
hbox->addWidget( TextLabel3 );
- nameData = new QLineEdit( this, "nameData" );
+ nameData = new TQLineEdit( this, "nameData" );
hbox->addWidget( nameData );
- typeData = new QComboBox( FALSE, this, "typeData" );
- typeData->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0 ) );
- connect( typeData, SIGNAL( activated( const QString & ) ), this, SLOT( checkConsistency() ) );
- connect( typeData, SIGNAL( highlighted( const QString & ) ), this, SLOT( checkConsistency() ) );
+ typeData = new TQComboBox( FALSE, this, "typeData" );
+ typeData->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0 ) );
+ connect( typeData, TQT_SIGNAL( activated( const TQString & ) ), this, TQT_SLOT( checkConsistency() ) );
+ connect( typeData, TQT_SIGNAL( highlighted( const TQString & ) ), this, TQT_SLOT( checkConsistency() ) );
hbox->addWidget( typeData );
grid->addLayout( hbox, 1, 0 );
- hbox_2 = new QHBoxLayout;
+ hbox_2 = new TQHBoxLayout;
hbox_2->setSpacing( 6 );
hbox_2->setMargin( 0 );
- TextLabel5 = new QLabel( this, "TextLabel5" );
+ TextLabel5 = new TQLabel( this, "TextLabel5" );
TextLabel5->setText( i18n( "In directory" ) );
hbox_2->addWidget( TextLabel5 );
- dirData = new QLineEdit( this, "dirData" );
+ dirData = new TQLineEdit( this, "dirData" );
hbox_2->addWidget( dirData );
- browseButton = new QToolButton( this, "browseButton" );
+ browseButton = new TQToolButton( this, "browseButton" );
browseButton->setIconSet( SmallIcon( "fileopen" ) );
hbox_2->addWidget( browseButton );
- QSpacerItem* spacer = new QSpacerItem( 48, 20, QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQSpacerItem* spacer = new TQSpacerItem( 48, 20, TQSizePolicy::Fixed, TQSizePolicy::Fixed );
hbox_2->addItem( spacer );
grid->addLayout( hbox_2, 2, 0 );
- hbox_3 = new QHBoxLayout;
+ hbox_3 = new TQHBoxLayout;
hbox_3->setSpacing( 6 );
hbox_3->setMargin( 0 );
- PixmapLabel1 = new QLabel( this, "PixmapLabel1" );
+ PixmapLabel1 = new TQLabel( this, "PixmapLabel1" );
PixmapLabel1->setPixmap( krLoader->loadIcon("package", KIcon::Desktop, 32) );
PixmapLabel1->setScaledContents( TRUE );
- PixmapLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0 ) );
+ PixmapLabel1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0 ) );
hbox_3->addWidget( PixmapLabel1 );
- TextLabel1 = new QLabel( this, "TextLabel1" );
+ TextLabel1 = new TQLabel( this, "TextLabel1" );
TextLabel1->setText( i18n( "Pack" ) );
hbox_3->addWidget( TextLabel1 );
grid->addLayout( hbox_3, 0, 0 );
- hbox_4 = new QHBoxLayout;
+ hbox_4 = new TQHBoxLayout;
hbox_4->setSpacing( 6 );
hbox_4->setMargin( 0 );
- QSpacerItem* spacer_3 = new QSpacerItem( 20, 26, QSizePolicy::Fixed, QSizePolicy::Expanding );
+ TQSpacerItem* spacer_3 = new TQSpacerItem( 20, 26, TQSizePolicy::Fixed, TQSizePolicy::Expanding );
hbox_4->addItem( spacer_3 );
grid->addLayout( hbox_4, 3, 0 );
- advancedWidget = new QWidget( this, "advancedWidget" );
+ advancedWidget = new TQWidget( this, "advancedWidget" );
- hbox_5 = new QGridLayout( advancedWidget );
+ hbox_5 = new TQGridLayout( advancedWidget );
hbox_5->setSpacing( 6 );
hbox_5->setMargin( 0 );
- QVBoxLayout *compressLayout = new QVBoxLayout;
+ TQVBoxLayout *compressLayout = new TQVBoxLayout;
compressLayout->setSpacing( 6 );
compressLayout->setMargin( 0 );
- multipleVolume = new QCheckBox( i18n( "Multiple volume archive" ), advancedWidget, "multipleVolume" );
- connect( multipleVolume, SIGNAL( toggled( bool ) ), this, SLOT( checkConsistency() ) );
+ multipleVolume = new TQCheckBox( i18n( "Multiple volume archive" ), advancedWidget, "multipleVolume" );
+ connect( multipleVolume, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( checkConsistency() ) );
compressLayout->addWidget( multipleVolume, 0, 0 );
- QHBoxLayout * volumeHbox = new QHBoxLayout;
+ TQHBoxLayout * volumeHbox = new TQHBoxLayout;
- QSpacerItem* spacer_5 = new QSpacerItem( 20, 26, QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQSpacerItem* spacer_5 = new TQSpacerItem( 20, 26, TQSizePolicy::Fixed, TQSizePolicy::Fixed );
volumeHbox->addItem( spacer_5 );
- TextLabel7 = new QLabel( i18n("Size:" ), advancedWidget, "TextLabel7" );
+ TextLabel7 = new TQLabel( i18n("Size:" ), advancedWidget, "TextLabel7" );
volumeHbox->addWidget( TextLabel7 );
- volumeSpinBox = new QSpinBox( advancedWidget, "volumeSpinBox" );
+ volumeSpinBox = new TQSpinBox( advancedWidget, "volumeSpinBox" );
volumeSpinBox->setMinValue( 1 );
volumeSpinBox->setMaxValue( 9999 );
volumeSpinBox->setValue( 1440 );
volumeHbox->addWidget( volumeSpinBox );
- volumeUnitCombo = new QComboBox( FALSE, advancedWidget, "volumeUnitCombo" );
+ volumeUnitCombo = new TQComboBox( FALSE, advancedWidget, "volumeUnitCombo" );
volumeUnitCombo->insertItem( "B" );
volumeUnitCombo->insertItem( "KB" );
volumeUnitCombo->insertItem( "MB" );
@@ -171,24 +171,24 @@ PackGUIBase::PackGUIBase( QWidget* parent, const char* name, bool modal, WFlags
compressLayout->addLayout ( volumeHbox );
- setCompressionLevel = new QCheckBox( i18n( "Set compression level" ), advancedWidget, "multipleVolume" );
- connect( setCompressionLevel, SIGNAL( toggled( bool ) ), this, SLOT( checkConsistency() ) );
+ setCompressionLevel = new TQCheckBox( i18n( "Set compression level" ), advancedWidget, "multipleVolume" );
+ connect( setCompressionLevel, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( checkConsistency() ) );
compressLayout->addWidget( setCompressionLevel, 0, 0 );
- QHBoxLayout * sliderHbox = new QHBoxLayout;
+ TQHBoxLayout * sliderHbox = new TQHBoxLayout;
- QSpacerItem* spacer_6 = new QSpacerItem( 20, 26, QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQSpacerItem* spacer_6 = new TQSpacerItem( 20, 26, TQSizePolicy::Fixed, TQSizePolicy::Fixed );
sliderHbox->addItem( spacer_6 );
- QVBox * sliderVBox = new QVBox( advancedWidget );
+ TQVBox * sliderVBox = new TQVBox( advancedWidget );
- compressionSlider = new QSlider( 1, 9, 1, 5, Qt::Horizontal, sliderVBox, "compressionSlider" );
- compressionSlider->setTickmarks( QSlider::Below );
+ compressionSlider = new TQSlider( 1, 9, 1, 5, Qt::Horizontal, sliderVBox, "compressionSlider" );
+ compressionSlider->setTickmarks( TQSlider::Below );
- QHBox * minmaxHBox = new QHBox( sliderVBox );
- minLabel = new QLabel( i18n("MIN"), minmaxHBox );
- maxLabel = new QLabel( i18n("MAX"), minmaxHBox );
- maxLabel->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQHBox * minmaxHBox = new TQHBox( sliderVBox );
+ minLabel = new TQLabel( i18n("MIN"), minmaxHBox );
+ maxLabel = new TQLabel( i18n("MAX"), minmaxHBox );
+ maxLabel->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
sliderHbox->addWidget( sliderVBox );
@@ -197,66 +197,66 @@ PackGUIBase::PackGUIBase( QWidget* parent, const char* name, bool modal, WFlags
compressLayout->addStretch( 0 );
hbox_5->addLayout( compressLayout, 0, 0 );
- QFrame *vline = new QFrame( advancedWidget, "vline" );
- vline->setFrameStyle( QFrame::VLine | QFrame::Sunken );
+ TQFrame *vline = new TQFrame( advancedWidget, "vline" );
+ vline->setFrameStyle( TQFrame::VLine | TQFrame::Sunken );
vline->setMinimumWidth( 20 );
hbox_5->addWidget( vline, 0, 1 );
- QGridLayout * passwordGrid = new QGridLayout;
+ TQGridLayout * passwordGrid = new TQGridLayout;
passwordGrid->setSpacing( 6 );
passwordGrid->setMargin( 0 );
- TextLabel4 = new QLabel( advancedWidget, "TextLabel4" );
+ TextLabel4 = new TQLabel( advancedWidget, "TextLabel4" );
TextLabel4->setText( i18n( "Password" ) );
passwordGrid->addWidget( TextLabel4, 0, 0 );
- password = new QLineEdit( advancedWidget, "password" );
- password->setEchoMode( QLineEdit::Password );
- connect( password, SIGNAL( textChanged ( const QString & ) ), this, SLOT( checkConsistency() ) );
+ password = new TQLineEdit( advancedWidget, "password" );
+ password->setEchoMode( TQLineEdit::Password );
+ connect( password, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( checkConsistency() ) );
passwordGrid->addWidget( password, 0, 1 );
- TextLabel6 = new QLabel( advancedWidget, "TextLabel6" );
+ TextLabel6 = new TQLabel( advancedWidget, "TextLabel6" );
TextLabel6->setText( i18n( "Again" ) );
passwordGrid->addWidget( TextLabel6, 1, 0 );
- passwordAgain = new QLineEdit( advancedWidget, "password" );
- passwordAgain->setEchoMode( QLineEdit::Password );
- connect( passwordAgain, SIGNAL( textChanged ( const QString & ) ), this, SLOT( checkConsistency() ) );
+ passwordAgain = new TQLineEdit( advancedWidget, "password" );
+ passwordAgain->setEchoMode( TQLineEdit::Password );
+ connect( passwordAgain, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( checkConsistency() ) );
passwordGrid->addWidget( passwordAgain, 1, 1 );
- QHBoxLayout *consistencyHbox = new QHBoxLayout;
+ TQHBoxLayout *consistencyHbox = new TQHBoxLayout;
- QSpacerItem* spacer_cons = new QSpacerItem( 48, 20, QSizePolicy::Expanding, QSizePolicy::Fixed );
+ TQSpacerItem* spacer_cons = new TQSpacerItem( 48, 20, TQSizePolicy::Expanding, TQSizePolicy::Fixed );
consistencyHbox->addItem( spacer_cons );
- passwordConsistencyLabel = new QLabel( advancedWidget, "passwordConsistencyLabel" );
+ passwordConsistencyLabel = new TQLabel( advancedWidget, "passwordConsistencyLabel" );
consistencyHbox->addWidget( passwordConsistencyLabel );
passwordGrid->addMultiCellLayout ( consistencyHbox, 2, 2, 0, 1 );
- encryptHeaders = new QCheckBox( i18n( "Encrypt headers" ), advancedWidget, "encryptHeaders" );
+ encryptHeaders = new TQCheckBox( i18n( "Encrypt headers" ), advancedWidget, "encryptHeaders" );
passwordGrid->addMultiCellWidget ( encryptHeaders, 3, 3, 0, 1 );
- QSpacerItem* spacer_psw = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Expanding );
+ TQSpacerItem* spacer_psw = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Expanding );
passwordGrid->addItem( spacer_psw, 4, 0 );
hbox_5->addLayout( passwordGrid, 0, 2 );
- hbox_7 = new QHBoxLayout;
+ hbox_7 = new TQHBoxLayout;
hbox_7->setSpacing( 6 );
hbox_7->setMargin( 0 );
- TextLabel8 = new QLabel( i18n( "Command line switches:" ), advancedWidget, "TextLabel8" );
- TextLabel8->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TextLabel8 = new TQLabel( i18n( "Command line switches:" ), advancedWidget, "TextLabel8" );
+ TextLabel8->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
hbox_7->addWidget( TextLabel8 );
commandLineSwitches = new KHistoryCombo( advancedWidget, "commandLineSwitches" );
commandLineSwitches->setMaxCount(25); // remember 25 items
commandLineSwitches->setDuplicatesEnabled(false);
krConfig->setGroup("Archives");
- QStringList list = krConfig->readListEntry("Command Line Switches");
+ TQStringList list = krConfig->readListEntry("Command Line Switches");
commandLineSwitches->setHistoryItems(list);
hbox_7->addWidget( commandLineSwitches );
@@ -269,33 +269,33 @@ PackGUIBase::PackGUIBase( QWidget* parent, const char* name, bool modal, WFlags
grid->addWidget( advancedWidget, 4, 0 );
- hbox_6 = new QHBoxLayout;
+ hbox_6 = new TQHBoxLayout;
hbox_6->setSpacing( 6 );
hbox_6->setMargin( 0 );
- advancedButton = new QPushButton( this, "advancedButton" );
+ advancedButton = new TQPushButton( this, "advancedButton" );
advancedButton->setText( i18n( "&Advanced" ) + " >>" );
hbox_6->addWidget( advancedButton );
- QSpacerItem* spacer_2 = new QSpacerItem( 140, 20, QSizePolicy::Expanding, QSizePolicy::Fixed );
+ TQSpacerItem* spacer_2 = new TQSpacerItem( 140, 20, TQSizePolicy::Expanding, TQSizePolicy::Fixed );
hbox_6->addItem( spacer_2 );
- okButton = new QPushButton( this, "okButton" );
+ okButton = new TQPushButton( this, "okButton" );
okButton->setText( i18n( "Ok" ) );
okButton->setDefault( true );
hbox_6->addWidget( okButton );
- cancelButton = new QPushButton( this, "cancelButton" );
+ cancelButton = new TQPushButton( this, "cancelButton" );
cancelButton->setText( i18n( "Cancel" ) );
hbox_6->addWidget( cancelButton );
grid->addLayout( hbox_6, 6, 0 );
// signals and slots connections
- connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( advancedButton, SIGNAL( clicked() ), this, SLOT( expand() ) );
- connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( browseButton, SIGNAL( clicked() ), this, SLOT( browse() ) );
+ connect( okButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) );
+ connect( advancedButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( expand() ) );
+ connect( cancelButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) );
+ connect( browseButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( browse() ) );
}
/*
@@ -303,7 +303,7 @@ PackGUIBase::PackGUIBase( QWidget* parent, const char* name, bool modal, WFlags
*/
PackGUIBase::~PackGUIBase()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
void PackGUIBase::browse()
@@ -320,8 +320,8 @@ void PackGUIBase::expand() {
advancedWidget->show();
else {
advancedWidget->hide();
- layout()->activate();
- QSize minSize = minimumSize();
+ tqlayout()->activate();
+ TQSize minSize = tqminimumSize();
resize( width(), minSize.height() );
}
show();
@@ -338,11 +338,11 @@ void PackGUIBase::checkConsistency() {
passwordConsistencyLabel->setText( i18n( "The passwords are equal" ) );
}
else {
- passwordConsistencyLabel->setPaletteForegroundColor( Qt::red );
+ passwordConsistencyLabel->setPaletteForegroundColor( TQt::red );
passwordConsistencyLabel->setText( i18n( "The passwords are different" ) );
}
- QString packer = typeData->currentText();
+ TQString packer = typeData->currentText();
bool passworded = false;
if( packer == "7z" || packer == "rar" || packer == "zip" || packer == "arj" )
@@ -371,7 +371,7 @@ void PackGUIBase::checkConsistency() {
maxLabel->setEnabled( sliderEnabled );
}
-bool PackGUIBase::extraProperties( QMap<QString,QString> & inMap ) {
+bool PackGUIBase::extraProperties( TQMap<TQString,TQString> & inMap ) {
inMap.clear();
if( password->isEnabled() && passwordAgain->isEnabled() ) {
@@ -405,23 +405,23 @@ bool PackGUIBase::extraProperties( QMap<QString,QString> & inMap ) {
return false;
}
- QString sbuffer;
+ TQString sbuffer;
sbuffer.sprintf("%llu",size);
inMap[ "VolumeSize" ] = sbuffer;
}
if( setCompressionLevel->isEnabled() && setCompressionLevel->isChecked() ) {
- inMap[ "CompressionLevel" ] = QString("%1").arg( compressionSlider->value() );
+ inMap[ "CompressionLevel" ] = TQString("%1").tqarg( compressionSlider->value() );
}
- QString cmdArgs = commandLineSwitches->currentText().stripWhiteSpace();
+ TQString cmdArgs = commandLineSwitches->currentText().stripWhiteSpace();
if( !cmdArgs.isEmpty() ) {
bool firstChar = true;
- QChar quote = '\0';
+ TQChar quote = '\0';
for( unsigned i=0; i < cmdArgs.length(); i++ ) {
- QChar ch( cmdArgs[ i ] );
+ TQChar ch( cmdArgs[ i ] );
if( ch.isSpace() )
continue;
@@ -456,7 +456,7 @@ bool PackGUIBase::extraProperties( QMap<QString,QString> & inMap ) {
}
commandLineSwitches->addToHistory( cmdArgs );
- QStringList list = commandLineSwitches->historyItems();
+ TQStringList list = commandLineSwitches->historyItems();
krConfig->setGroup("Archives");
krConfig->writeEntry("Command Line Switches", list);
diff --git a/krusader/Dialogs/packguibase.h b/krusader/Dialogs/packguibase.h
index 74364a6..5d0a829 100644
--- a/krusader/Dialogs/packguibase.h
+++ b/krusader/Dialogs/packguibase.h
@@ -31,76 +31,77 @@
#define PACKGUIBASE_H
#include <klocale.h>
-#include <qdialog.h>
-#include <qmap.h>
+#include <tqdialog.h>
+#include <tqmap.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QCheckBox;
-class QComboBox;
-class QLabel;
-class QLineEdit;
-class QPushButton;
-class QToolButton;
-class QSpinBox;
-class QSlider;
+class TQVBoxLayout;
+class TQHBoxLayout;
+class TQGridLayout;
+class TQCheckBox;
+class TQComboBox;
+class TQLabel;
+class TQLineEdit;
+class TQPushButton;
+class TQToolButton;
+class TQSpinBox;
+class TQSlider;
class KHistoryCombo;
-class PackGUIBase : public QDialog
+class PackGUIBase : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- PackGUIBase( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ PackGUIBase( TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~PackGUIBase();
- QLabel* TextLabel3;
- QLineEdit* nameData;
- QComboBox* typeData;
- QLabel* TextLabel5;
- QLineEdit* dirData;
- QToolButton* browseButton;
- QWidget* advancedWidget;
- QLabel* PixmapLabel1;
- QLabel* TextLabel1;
- QLabel* TextLabel4;
- QLabel* TextLabel6;
- QLabel* TextLabel7;
- QLabel* TextLabel8;
- QLabel* minLabel;
- QLabel* maxLabel;
- QLineEdit* password;
- QLineEdit* passwordAgain;
- QLabel* passwordConsistencyLabel;
- QPushButton* okButton;
- QPushButton* cancelButton;
- QPushButton* advancedButton;
- QCheckBox* encryptHeaders;
- QCheckBox* multipleVolume;
- QSpinBox* volumeSpinBox;
- QComboBox* volumeUnitCombo;
- QCheckBox* setCompressionLevel;
- QSlider* compressionSlider;
+ TQLabel* TextLabel3;
+ TQLineEdit* nameData;
+ TQComboBox* typeData;
+ TQLabel* TextLabel5;
+ TQLineEdit* dirData;
+ TQToolButton* browseButton;
+ TQWidget* advancedWidget;
+ TQLabel* PixmapLabel1;
+ TQLabel* TextLabel1;
+ TQLabel* TextLabel4;
+ TQLabel* TextLabel6;
+ TQLabel* TextLabel7;
+ TQLabel* TextLabel8;
+ TQLabel* minLabel;
+ TQLabel* maxLabel;
+ TQLineEdit* password;
+ TQLineEdit* passwordAgain;
+ TQLabel* passwordConsistencyLabel;
+ TQPushButton* okButton;
+ TQPushButton* cancelButton;
+ TQPushButton* advancedButton;
+ TQCheckBox* encryptHeaders;
+ TQCheckBox* multipleVolume;
+ TQSpinBox* volumeSpinBox;
+ TQComboBox* volumeUnitCombo;
+ TQCheckBox* setCompressionLevel;
+ TQSlider* compressionSlider;
KHistoryCombo *commandLineSwitches;
public slots:
virtual void browse();
- virtual bool extraProperties( QMap<QString,QString> & );
+ virtual bool extraProperties( TQMap<TQString,TQString> & );
void expand();
void checkConsistency();
protected:
- QHBoxLayout* hbox;
- QHBoxLayout* hbox_2;
- QHBoxLayout* hbox_3;
- QHBoxLayout* hbox_4;
- QGridLayout* hbox_5;
- QHBoxLayout* hbox_6;
- QHBoxLayout* hbox_7;
- QGridLayout* grid;
+ TQHBoxLayout* hbox;
+ TQHBoxLayout* hbox_2;
+ TQHBoxLayout* hbox_3;
+ TQHBoxLayout* hbox_4;
+ TQGridLayout* hbox_5;
+ TQHBoxLayout* hbox_6;
+ TQHBoxLayout* hbox_7;
+ TQGridLayout* grid;
private:
bool expanded;
diff --git a/krusader/Dialogs/percentalsplitter.cpp b/krusader/Dialogs/percentalsplitter.cpp
index 3a1354f..c54e3ce 100644
--- a/krusader/Dialogs/percentalsplitter.cpp
+++ b/krusader/Dialogs/percentalsplitter.cpp
@@ -29,25 +29,25 @@
***************************************************************************/
#include "percentalsplitter.h"
-#include <qtooltip.h>
-#include <qpainter.h>
-#include <qapplication.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
-class PercentalSplitterToolTip : public QToolTip {
+class PercentalSplitterToolTip : public TQToolTip {
public:
- PercentalSplitterToolTip( QWidget * parent ) : QToolTip( parent ) {
+ PercentalSplitterToolTip( TQWidget * tqparent ) : TQToolTip( tqparent ) {
}
virtual ~PercentalSplitterToolTip() {
- remove( parentWidget() );
+ remove( tqparentWidget() );
}
- void maybeTip( const QPoint & point ) {
- if( parentWidget()->inherits( "PercentalSplitter" ) ) {
- PercentalSplitter *splitter = (PercentalSplitter *)parentWidget();
+ void maybeTip( const TQPoint & point ) {
+ if( tqparentWidget()->inherits( "PercentalSplitter" ) ) {
+ PercentalSplitter *splitter = (PercentalSplitter *)tqparentWidget();
- QString tipString = splitter->toolTipString();
- QRect rect = QRect( parentWidget()->rect() );
+ TQString tipString = splitter->toolTipString();
+ TQRect rect = TQRect( tqparentWidget()->rect() );
if( splitter->orientation() == Qt::Vertical ) {
rect.setY( splitter->sizes()[ 0 ] );
@@ -57,13 +57,13 @@ public:
rect.setX( splitter->sizes()[ 0 ] );
rect.setWidth( splitter->handleWidth() );
}
- if( rect.contains( point ) )
+ if( rect.tqcontains( point ) )
tip( rect, tipString );
}
}
};
-PercentalSplitter::PercentalSplitter( QWidget * parent, const char * name ) : QSplitter( parent, name ), label( 0 ), opaqueOldPos( -1 ) {
+PercentalSplitter::PercentalSplitter( TQWidget * tqparent, const char * name ) : TQSplitter( tqparent, name ), label( 0 ), opaqueOldPos( -1 ) {
toolTip = new PercentalSplitterToolTip( this );
}
@@ -71,26 +71,26 @@ PercentalSplitter::~PercentalSplitter() {
delete toolTip;
}
-QString PercentalSplitter::toolTipString( int p ) {
- QValueList<int> values = sizes();
+TQString PercentalSplitter::toolTipString( int p ) {
+ TQValueList<int> values = sizes();
if( values.count() == 2 && ( values[ 0 ] + values[ 1 ] != 0 ) ) {
if( p < 0 )
p = values[ 0 ];
int percent = (int)(((double)p / (double)( values[ 0 ] + values[ 1 ] )) * 10000. + 0.5);
- return QString( "%1.%2%3" ).arg( percent / 100 ).arg( ( percent / 10 )%10 ).arg( percent % 10 ) + "%";
+ return TQString( "%1.%2%3" ).tqarg( percent / 100 ).tqarg( ( percent / 10 )%10 ).tqarg( percent % 10 ) + "%";
}
- return QString::null;
+ return TQString();
}
void PercentalSplitter::setRubberband ( int p ) {
if( p == opaqueOldPos )
return;
- QPainter paint( this );
+ TQPainter paint( this );
paint.setPen( gray );
paint.setBrush( gray );
paint.setRasterOp( XorROP );
- QRect r = contentsRect();
+ TQRect r = contentsRect();
const int rBord = 3; // customizable?
int hw = handleWidth();
@@ -99,7 +99,7 @@ void PercentalSplitter::setRubberband ( int p ) {
if( label == 0 )
paint.drawRect( opaqueOldPos + hw / 2 - rBord, r.y(), 2 * rBord, r.height() );
else {
- QPoint labelLoc = mapFromGlobal( labelLocation );
+ TQPoint labelLoc = mapFromGlobal( labelLocation );
if( labelLoc.y() > r.y() )
paint.drawRect( opaqueOldPos + hw / 2 - rBord, r.y(), 2 * rBord, labelLoc.y() );
if( labelLoc.y() + label->height() < r.height() )
@@ -111,7 +111,7 @@ void PercentalSplitter::setRubberband ( int p ) {
if( label == 0 )
paint.drawRect( r.x(), opaqueOldPos + hw / 2 - rBord, r.width(), 2 * rBord );
else {
- QPoint labelLoc = mapFromGlobal( labelLocation );
+ TQPoint labelLoc = mapFromGlobal( labelLocation );
if( labelLoc.x() > r.x() )
paint.drawRect( r.x(), opaqueOldPos + hw / 2 - rBord, labelLoc.x(), 2 * rBord );
if( labelLoc.x() + label->width() < r.width() )
@@ -127,19 +127,19 @@ void PercentalSplitter::setRubberband ( int p ) {
}
}
else {
- int scr = QApplication::desktop()->screenNumber( this );
+ int scr = TQApplication::desktop()->screenNumber( this );
if( label == 0 ) {
- label = new QLabel( QApplication::desktop()->screen( scr ), "SplitterPercent", WStyle_StaysOnTop |
+ label = new TQLabel( TQT_TQWIDGET(TQApplication::desktop()->screen( scr )), "SplitterPercent", WStyle_StaysOnTop |
WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM );
label->setMargin(1);
label->setAutoMask( FALSE );
- label->setFrameStyle( QFrame::Plain | QFrame::Box );
+ label->setFrameStyle( TQFrame::Plain | TQFrame::Box );
label->setLineWidth( 1 );
- label->setAlignment( AlignAuto | AlignTop );
+ label->tqsetAlignment( AlignAuto | AlignTop );
label->setIndent(0);
- QFontMetrics fm = label->fontMetrics();
+ TQFontMetrics fm = label->fontMetrics();
label->setMinimumWidth( fm.width( "99.99%" ) + 5 );
label->polish();
@@ -149,22 +149,22 @@ void PercentalSplitter::setRubberband ( int p ) {
label->adjustSize();
if( orientation() == Qt::Horizontal ) {
- labelLocation = mapToGlobal( QPoint( p - label->width()/2, r.y() + r.height()/2 ) );
+ labelLocation = mapToGlobal( TQPoint( p - label->width()/2, r.y() + r.height()/2 ) );
if( labelLocation.x() < 0 )
labelLocation.setX( 0 );
} else {
- labelLocation = mapToGlobal( QPoint( r.x() + r.width()/2, p - label->height()/2 ) );
+ labelLocation = mapToGlobal( TQPoint( r.x() + r.width()/2, p - label->height()/2 ) );
if( labelLocation.y() < 0 )
labelLocation.setY( 0 );
}
-#ifdef Q_WS_MAC
- QRect screen = QApplication::desktop()->availableGeometry( scr );
+#ifdef TQ_WS_MAC
+ TQRect screen = TQApplication::desktop()->availableGeometry( scr );
#else
- QRect screen = QApplication::desktop()->screenGeometry( scr );
+ TQRect screen = TQApplication::desktop()->screenGeometry( scr );
#endif
- QPoint labelLoc = mapFromGlobal( labelLocation );
+ TQPoint labelLoc = mapFromGlobal( labelLocation );
if( orientation() == Qt::Horizontal ) {
if( labelLocation.x() + label->width() > screen.width() )
labelLocation.setX( screen.width() - label->width() );
diff --git a/krusader/Dialogs/percentalsplitter.h b/krusader/Dialogs/percentalsplitter.h
index cdbfb4d..b35d3aa 100644
--- a/krusader/Dialogs/percentalsplitter.h
+++ b/krusader/Dialogs/percentalsplitter.h
@@ -31,28 +31,29 @@
#ifndef __PERCENTAL_SPLITTER__
#define __PERCENTAL_SPLITTER__
-#include <qsplitter.h>
-#include <qlabel.h>
+#include <tqsplitter.h>
+#include <tqlabel.h>
class PercentalSplitterToolTip;
-class PercentalSplitter : public QSplitter {
+class PercentalSplitter : public TQSplitter {
Q_OBJECT
+ TQ_OBJECT
public:
- PercentalSplitter( QWidget * parent = 0, const char * name = 0 );
+ PercentalSplitter( TQWidget * tqparent = 0, const char * name = 0 );
virtual ~PercentalSplitter();
- QString toolTipString( int p = -1 );
+ TQString toolTipString( int p = -1 );
protected:
virtual void setRubberband ( int p );
private:
PercentalSplitterToolTip * toolTip;
- QLabel * label;
+ TQLabel * label;
int opaqueOldPos;
- QPoint labelLocation;
+ TQPoint labelLocation;
};
#endif /* __PERCENTAL_SPLITTER__ */
diff --git a/krusader/Dialogs/popularurls.cpp b/krusader/Dialogs/popularurls.cpp
index 45b6162..8b7a41c 100644
--- a/krusader/Dialogs/popularurls.cpp
+++ b/krusader/Dialogs/popularurls.cpp
@@ -1,12 +1,12 @@
#include <kmessagebox.h>
#include <klocale.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <klistview.h>
#include <kiconloader.h>
#include <klistviewsearchline.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <ktoolbarbutton.h>
#include "../krusader.h"
#include "../krslots.h"
@@ -16,7 +16,7 @@
#define INCREASE 2
#define DECREASE 1
-PopularUrls::PopularUrls(QObject *parent, const char *name) : QObject(parent, name),
+PopularUrls::PopularUrls(TQObject *tqparent, const char *name) : TQObject(tqparent, name),
head(0), tail(0), count(0) {
dlg = new PopularUrlsDlg();
}
@@ -42,8 +42,8 @@ void PopularUrls::clearList() {
void PopularUrls::save() {
KConfigGroupSaver svr(krConfig, "Private");
// prepare the string list containing urls and int list with ranks
- QStringList urlList;
- QValueList<int> rankList;
+ TQStringList urlList;
+ TQValueList<int> rankList;
UrlNodeP p = head;
while (p) {
urlList << p->url.prettyURL();
@@ -56,8 +56,8 @@ void PopularUrls::save() {
void PopularUrls::load() {
KConfigGroupSaver svr(krConfig, "Private");
- QStringList urlList = krConfig->readListEntry("PopularUrls");
- QValueList<int> rankList = krConfig->readIntListEntry("PopularUrlsRank");
+ TQStringList urlList = krConfig->readListEntry("PopularUrls");
+ TQValueList<int> rankList = krConfig->readIntListEntry("PopularUrlsRank");
if (urlList.count() != rankList.count()) {
KMessageBox::error(krApp, i18n("Saved 'Popular Urls' are invalid. List will be cleared"));
return;
@@ -65,8 +65,8 @@ void PopularUrls::load() {
clearList();
count = 0;
// iterate through both lists and
- QStringList::Iterator uit;
- QValueList<int>::Iterator rit;
+ TQStringList::Iterator uit;
+ TQValueList<int>::Iterator rit;
for (uit=urlList.begin(), rit=rankList.begin(); uit!=urlList.end() && rit!=rankList.end(); ++uit, ++rit) {
UrlNodeP node = new UrlNode;
node->url = KURL::fromPathOrURL( *uit );
@@ -108,7 +108,7 @@ void PopularUrls::addUrl(const KURL& url) {
appendNode(pnode);
ranks.insert(tmpurl.url(), head);
} else {
- pnode = ranks.find(tmpurl.url());
+ pnode = ranks.tqfind(tmpurl.url());
if (!pnode) { // is the added url new? if so, append it
pnode = new UrlNode;
pnode->rank = STARTING_RANK;
@@ -228,49 +228,49 @@ void PopularUrls::showDialog() {
// ===================================== PopularUrlsDlg ======================================
PopularUrlsDlg::PopularUrlsDlg():
KDialogBase(Plain, i18n("Popular Urls"), Close, KDialogBase::NoDefault, krApp) {
- QGridLayout *layout = new QGridLayout( plainPage(), 0, KDialog::spacingHint() );
+ TQGridLayout *tqlayout = new TQGridLayout( plainPage(), 0, KDialog::spacingHint() );
// listview to contain the urls
urls = new KListView(plainPage());
urls->header()->hide();
urls->addColumn("");
urls->setSorting(-1);
- urls->setVScrollBarMode(QScrollView::AlwaysOn);
+ urls->setVScrollBarMode(TQScrollView::AlwaysOn);
// quick search
- QToolButton *btn = new QToolButton(plainPage());
+ TQToolButton *btn = new TQToolButton(plainPage());
btn->setIconSet(SmallIcon("locationbar_erase"));
search = new KListViewSearchLine(plainPage(), urls);
search->setTrapReturnKey(true);
- QLabel *lbl = new QLabel(search, i18n(" &Search: "), plainPage());
+ TQLabel *lbl = new TQLabel(search, i18n(" &Search: "), plainPage());
- layout->addWidget(btn,0,0);
- layout->addWidget(lbl,0,1);
- layout->addWidget(search,0,2);
- layout->addMultiCellWidget(urls,1,1,0,2);
+ tqlayout->addWidget(btn,0,0);
+ tqlayout->addWidget(lbl,0,1);
+ tqlayout->addWidget(search,0,2);
+ tqlayout->addMultiCellWidget(urls,1,1,0,2);
setMaximumSize(600, 500);
setTabOrder(search, urls);
setTabOrder(urls, actionButton(Close));
- connect(urls, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotItemSelected(QListViewItem*)));
- connect(urls, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(slotItemSelected(QListViewItem*)));
- connect(btn, SIGNAL(clicked()), search, SLOT(clear()));
- connect(search, SIGNAL(returnPressed(const QString&)),
- this, SLOT(slotSearchReturnPressed(const QString&)));
+ connect(urls, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotItemSelected(TQListViewItem*)));
+ connect(urls, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(slotItemSelected(TQListViewItem*)));
+ connect(btn, TQT_SIGNAL(clicked()), search, TQT_SLOT(clear()));
+ connect(search, TQT_SIGNAL(returnPressed(const TQString&)),
+ this, TQT_SLOT(slotSearchReturnPressed(const TQString&)));
}
-void PopularUrlsDlg::slotItemSelected(QListViewItem *it) {
+void PopularUrlsDlg::slotItemSelected(TQListViewItem *it) {
selection = urls->itemIndex(it);
accept();
}
-void PopularUrlsDlg::slotSearchReturnPressed(const QString&) {
+void PopularUrlsDlg::slotSearchReturnPressed(const TQString&) {
urls->setFocus();
// select the first visible item
- QListViewItemIterator it( urls );
+ TQListViewItemIterator it( urls );
while ( it.current() ) {
if ( it.current()->isVisible() ) {
urls->setSelected(it.current(), true);
@@ -296,7 +296,7 @@ void PopularUrlsDlg::run(KURL::List list) {
}
//urls->setCurrentItem(urls->firstChild());
//urls->setSelected(urls->firstChild(), true);
- setMinimumSize(urls->sizeHint().width()+45, 400);
+ setMinimumSize(urls->tqsizeHint().width()+45, 400);
search->clear();
search->setFocus();
diff --git a/krusader/Dialogs/popularurls.h b/krusader/Dialogs/popularurls.h
index 4b908ab..98dab8a 100644
--- a/krusader/Dialogs/popularurls.h
+++ b/krusader/Dialogs/popularurls.h
@@ -1,9 +1,9 @@
#ifndef POPULARURLS_H
#define POPULARURLS_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
-#include <qdict.h>
+#include <tqdict.h>
#include <kdialogbase.h>
// the class holds a list of most popular links in a dual data structure
@@ -26,10 +26,11 @@ typedef struct _UrlNode {
class PopularUrlsDlg;
-class PopularUrls : public QObject {
+class PopularUrls : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- PopularUrls(QObject *parent = 0, const char *name = 0);
+ PopularUrls(TQObject *tqparent = 0, const char *name = 0);
~PopularUrls();
void save();
void load();
@@ -52,7 +53,7 @@ protected:
private:
UrlNodeP head, tail;
- QDict<UrlNode> ranks; // actually holds UrlNode*
+ TQDict<UrlNode> ranks; // actually holds UrlNode*
int count;
static const int maxUrls = 30;
PopularUrlsDlg *dlg;
@@ -63,6 +64,7 @@ class KListViewSearchLine;
class PopularUrlsDlg: public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
PopularUrlsDlg();
~PopularUrlsDlg();
@@ -71,8 +73,8 @@ public:
protected slots:
- void slotSearchReturnPressed(const QString&);
- void slotItemSelected(QListViewItem *it);
+ void slotSearchReturnPressed(const TQString&);
+ void slotItemSelected(TQListViewItem *it);
private:
KListView *urls;
diff --git a/krusader/DiskUsage/diskusage.cpp b/krusader/DiskUsage/diskusage.cpp
index b58f2d6..06a0684 100644
--- a/krusader/DiskUsage/diskusage.cpp
+++ b/krusader/DiskUsage/diskusage.cpp
@@ -29,20 +29,20 @@
***************************************************************************/
#include <time.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kpopupmenu.h>
#include <kmimetype.h>
#include <kmessagebox.h>
#include <kglobalsettings.h>
#include <kio/job.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qpixmapcache.h>
-#include <qgroupbox.h>
-#include <qguardedptr.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqpixmapcache.h>
+#include <tqgroupbox.h>
+#include <tqguardedptr.h>
#include "diskusage.h"
#include "../VFS/krpermhandler.h"
#include "../VFS/krvfshandler.h"
@@ -76,82 +76,82 @@
#define MAX_FILENUM 100
-LoaderWidget::LoaderWidget( QWidget *parent, const char *name ) : QScrollView( parent, name ), cancelled( false )
+LoaderWidget::LoaderWidget( TQWidget *tqparent, const char *name ) : TQScrollView( tqparent, name ), cancelled( false )
{
- viewport()->setEraseColor( Qt::white );
- widget = new QWidget( parent );
+ viewport()->setEraseColor( TQt::white );
+ widget = new TQWidget( tqparent );
- QGridLayout *loaderLayout = new QGridLayout( widget );
+ TQGridLayout *loaderLayout = new TQGridLayout( widget );
loaderLayout->setSpacing( 0 );
loaderLayout->setMargin( 0 );
- QGroupBox *loaderBox = new QGroupBox( widget, "loaderGroupBox" );
- loaderBox->setFrameShape( QGroupBox::Box );
- loaderBox->setFrameShadow( QGroupBox::Sunken );
+ TQGroupBox *loaderBox = new TQGroupBox( widget, "loaderGroupBox" );
+ loaderBox->setFrameShape( TQGroupBox::Box );
+ loaderBox->setFrameShadow( TQGroupBox::Sunken );
loaderBox->setColumnLayout(0, Qt::Vertical );
- loaderBox->layout()->setSpacing( 0 );
- loaderBox->layout()->setMargin( 0 );
- loaderBox->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- loaderBox->setFrameStyle( QFrame::Panel + QFrame::Raised );
+ loaderBox->tqlayout()->setSpacing( 0 );
+ loaderBox->tqlayout()->setMargin( 0 );
+ loaderBox->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ loaderBox->setFrameStyle( TQFrame::Panel + TQFrame::Raised );
loaderBox->setLineWidth( 2 );
- QGridLayout *synchGrid = new QGridLayout( loaderBox->layout() );
+ TQGridLayout *synchGrid = new TQGridLayout( loaderBox->tqlayout() );
synchGrid->setSpacing( 6 );
synchGrid->setMargin( 11 );
- QLabel *titleLabel = new QLabel( i18n( "Loading Usage Information" ), loaderBox, "titleLabel" );
- titleLabel->setAlignment( Qt::AlignHCenter );
+ TQLabel *titleLabel = new TQLabel( i18n( "Loading Usage Information" ), loaderBox, "titleLabel" );
+ titleLabel->tqsetAlignment( TQt::AlignHCenter );
synchGrid->addMultiCellWidget( titleLabel, 0, 0, 0, 1 );
- QLabel *filesLabel = new QLabel( i18n( "Files:" ), loaderBox, "filesLabel" );
- filesLabel->setFrameShape( QLabel::StyledPanel );
- filesLabel->setFrameShadow( QLabel::Sunken );
+ TQLabel *filesLabel = new TQLabel( i18n( "Files:" ), loaderBox, "filesLabel" );
+ filesLabel->setFrameShape( TQLabel::StyledPanel );
+ filesLabel->setFrameShadow( TQLabel::Sunken );
synchGrid->addWidget( filesLabel, 1, 0 );
- QLabel *directoriesLabel = new QLabel( i18n( "Directories:" ), loaderBox, "directoriesLabel" );
- directoriesLabel->setFrameShape( QLabel::StyledPanel );
- directoriesLabel->setFrameShadow( QLabel::Sunken );
+ TQLabel *directoriesLabel = new TQLabel( i18n( "Directories:" ), loaderBox, "directoriesLabel" );
+ directoriesLabel->setFrameShape( TQLabel::StyledPanel );
+ directoriesLabel->setFrameShadow( TQLabel::Sunken );
synchGrid->addWidget( directoriesLabel, 2, 0 );
- QLabel *totalSizeLabel = new QLabel( i18n( "Total Size:" ), loaderBox, "totalSizeLabel" );
- totalSizeLabel->setFrameShape( QLabel::StyledPanel );
- totalSizeLabel->setFrameShadow( QLabel::Sunken );
+ TQLabel *totalSizeLabel = new TQLabel( i18n( "Total Size:" ), loaderBox, "totalSizeLabel" );
+ totalSizeLabel->setFrameShape( TQLabel::StyledPanel );
+ totalSizeLabel->setFrameShadow( TQLabel::Sunken );
synchGrid->addWidget( totalSizeLabel, 3, 0 );
- files = new QLabel( loaderBox, "files" );
- files->setFrameShape( QLabel::StyledPanel );
- files->setFrameShadow( QLabel::Sunken );
- files->setAlignment( Qt::AlignRight );
+ files = new TQLabel( loaderBox, "files" );
+ files->setFrameShape( TQLabel::StyledPanel );
+ files->setFrameShadow( TQLabel::Sunken );
+ files->tqsetAlignment( TQt::AlignRight );
synchGrid->addWidget( files, 1, 1 );
- directories = new QLabel( loaderBox, "directories" );
- directories->setFrameShape( QLabel::StyledPanel );
- directories->setFrameShadow( QLabel::Sunken );
- directories->setAlignment( Qt::AlignRight );
+ directories = new TQLabel( loaderBox, "directories" );
+ directories->setFrameShape( TQLabel::StyledPanel );
+ directories->setFrameShadow( TQLabel::Sunken );
+ directories->tqsetAlignment( TQt::AlignRight );
synchGrid->addWidget( directories, 2, 1 );
- totalSize = new QLabel( loaderBox, "totalSize" );
- totalSize->setFrameShape( QLabel::StyledPanel );
- totalSize->setFrameShadow( QLabel::Sunken );
- totalSize->setAlignment( Qt::AlignRight );
+ totalSize = new TQLabel( loaderBox, "totalSize" );
+ totalSize->setFrameShape( TQLabel::StyledPanel );
+ totalSize->setFrameShadow( TQLabel::Sunken );
+ totalSize->tqsetAlignment( TQt::AlignRight );
synchGrid->addWidget( totalSize, 3, 1 );
int width;
searchedDirectory = new KSqueezedTextLabel( loaderBox, "searchedDirectory" );
- searchedDirectory->setFrameShape( QLabel::StyledPanel );
- searchedDirectory->setFrameShadow( QLabel::Sunken );
- searchedDirectory->setMinimumWidth( width = QFontMetrics(searchedDirectory->font()).width("W") * 30 );
+ searchedDirectory->setFrameShape( TQLabel::StyledPanel );
+ searchedDirectory->setFrameShadow( TQLabel::Sunken );
+ searchedDirectory->setMinimumWidth( width = TQFontMetrics(searchedDirectory->font()).width("W") * 30 );
searchedDirectory->setMaximumWidth( width );
synchGrid->addMultiCellWidget( searchedDirectory, 4, 4, 0, 1 );
- QFrame *line = new QFrame( loaderBox, "duLine" );
- line->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame *line = new TQFrame( loaderBox, "duLine" );
+ line->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
synchGrid->addMultiCellWidget( line, 5, 5, 0, 1 );
- QHBox *hbox = new QHBox( loaderBox, "hbox" );
- QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
- hbox->layout()->addItem( spacer );
- QPushButton *cancelButton = new QPushButton( hbox, "cancelButton" );
+ TQHBox *hbox = new TQHBox( loaderBox, "hbox" );
+ TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
+ hbox->tqlayout()->addItem( spacer );
+ TQPushButton *cancelButton = new TQPushButton( hbox, "cancelButton" );
cancelButton->setText( i18n( "Cancel" ) );
synchGrid->addWidget( hbox, 6, 1 );
@@ -159,12 +159,12 @@ LoaderWidget::LoaderWidget( QWidget *parent, const char *name ) : QScrollView( p
addChild( widget );
- connect( cancelButton, SIGNAL( clicked() ), this, SLOT( slotCancelled() ) );
+ connect( cancelButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCancelled() ) );
}
-void LoaderWidget::resizeEvent ( QResizeEvent *e )
+void LoaderWidget::resizeEvent ( TQResizeEvent *e )
{
- QScrollView::resizeEvent( e );
+ TQScrollView::resizeEvent( e );
int x = ( viewport()->width() - widget->width() ) / 2;
int y = ( viewport()->height() - widget->height() ) / 2;
@@ -186,9 +186,9 @@ void LoaderWidget::setCurrentURL( KURL url )
void LoaderWidget::setValues( int fileNum, int dirNum, KIO::filesize_t total )
{
- files->setText( QString("%1").arg( fileNum ) );
- directories->setText( QString("%1").arg( dirNum ) );
- totalSize->setText( QString("%1").arg( KRpermHandler::parseSize( total ).stripWhiteSpace() ) );
+ files->setText( TQString("%1").tqarg( fileNum ) );
+ directories->setText( TQString("%1").tqarg( dirNum ) );
+ totalSize->setText( TQString("%1").tqarg( KRpermHandler::parseSize( total ).stripWhiteSpace() ) );
}
void LoaderWidget::slotCancelled()
@@ -196,7 +196,7 @@ void LoaderWidget::slotCancelled()
cancelled = true;
}
-DiskUsage::DiskUsage( QString confGroup, QWidget *parent, char *name ) : QWidgetStack( parent, name ),
+DiskUsage::DiskUsage( TQString confGroup, TQWidget *tqparent, char *name ) : TQWidgetStack( tqparent, name ),
currentDirectory( 0 ), root( 0 ), configGroup( confGroup ), loading( false ),
abortLoading( false ), clearAfterAbort( false ), deleting( false ), searchVfs( 0 )
{
@@ -215,7 +215,7 @@ DiskUsage::DiskUsage( QString confGroup, QWidget *parent, char *name ) : QWidget
Filelight::Config::read();
propertyMap.setAutoDelete( true );
- connect( &loadingTimer, SIGNAL( timeout() ), this, SLOT( slotLoadDirectory() ) );
+ connect( &loadingTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotLoadDirectory() ) );
}
DiskUsage::~DiskUsage()
@@ -250,10 +250,10 @@ void DiskUsage::load( KURL baseDir )
root = new Directory( baseURL.fileName(), vfs::pathOrURL( baseDir ) );
directoryStack.clear();
- parentStack.clear();
+ tqparentStack.clear();
directoryStack.push( "" );
- parentStack.push( root );
+ tqparentStack.push( root );
if( searchVfs )
{
@@ -323,7 +323,7 @@ void DiskUsage::slotLoadDirectory()
break;
dirToCheck = directoryStack.pop();
- currentParent = parentStack.pop();
+ currentParent = tqparentStack.pop();
contentMap.insert( dirToCheck, currentParent );
@@ -354,7 +354,7 @@ void DiskUsage::slotLoadDirectory()
fileNum++;
File *newItem = 0;
- QString mime = currentVfile->vfile_getMime(true); // fast == not using mimetype magic
+ TQString mime = currentVfile->vfile_getMime(true); // fast == not using mimetype magic
if( currentVfile->vfile_isDir() && !currentVfile->vfile_isSymLink() )
{
@@ -363,7 +363,7 @@ void DiskUsage::slotLoadDirectory()
currentVfile->vfile_getPerm(), currentVfile->vfile_getTime_t(), currentVfile->vfile_isSymLink(),
mime );
directoryStack.push( (dirToCheck.isEmpty() ? "" : dirToCheck + "/" )+ currentVfile->vfile_getName() );
- parentStack.push( dynamic_cast<Directory *>( newItem ) );
+ tqparentStack.push( dynamic_cast<Directory *>( newItem ) );
}
else
{
@@ -402,16 +402,16 @@ void DiskUsage::dirUp()
{
if( currentDirectory != 0 )
{
- if ( currentDirectory->parent() != 0 )
- changeDirectory( (Directory *)(currentDirectory->parent()) );
+ if ( currentDirectory->tqparent() != 0 )
+ changeDirectory( (Directory *)(currentDirectory->tqparent()) );
else
{
KURL up = baseURL.upURL();
- if( KMessageBox::questionYesNo( this, i18n( "Stepping into the parent directory requires "
+ if( KMessageBox::questionYesNo( this, i18n( "Stepping into the tqparent directory requires "
"loading the content of the \"%1\" URL. Do you wish "
"to continue?" )
- .arg( vfs::pathOrURL( up ) ),
+ .tqarg( vfs::pathOrURL( up ) ),
i18n( "Krusader::DiskUsage" ), KStdGuiItem::yes(),
KStdGuiItem::no(), "DiskUsageLoadParentDir"
) == KMessageBox::Yes )
@@ -420,7 +420,7 @@ void DiskUsage::dirUp()
}
}
-Directory * DiskUsage::getDirectory( QString dir )
+Directory * DiskUsage::getDirectory( TQString dir )
{
while( dir.endsWith( "/" ) )
dir.truncate( dir.length() - 1 );
@@ -428,18 +428,18 @@ Directory * DiskUsage::getDirectory( QString dir )
if( dir.isEmpty() )
return root;
- return contentMap.find( dir );
+ return contentMap.tqfind( dir );
}
-File * DiskUsage::getFile( QString path )
+File * DiskUsage::getFile( TQString path )
{
if( path == "" )
return root;
- QString dir = path;
+ TQString dir = path;
- int ndx = path.findRev( '/' );
- QString file = path.mid( ndx + 1 );
+ int ndx = path.tqfindRev( '/' );
+ TQString file = path.mid( ndx + 1 );
if( ndx == -1 )
dir = "";
@@ -530,7 +530,7 @@ int DiskUsage::exclude( File *file, bool calcPercents, int depth )
{
calculateSizes( root, true );
calculatePercents( true );
- createStatus();
+ createtqStatus();
}
if( depth == 0 && changeNr != 0 )
@@ -572,7 +572,7 @@ void DiskUsage::includeAll()
include( root );
calculateSizes( root, true );
calculatePercents( true );
- createStatus();
+ createtqStatus();
}
int DiskUsage::del( File *file, bool calcPercents, int depth )
@@ -591,7 +591,7 @@ int DiskUsage::del( File *file, bool calcPercents, int depth )
// now ask the user if he want to delete:
krConfig->setGroup( "Advanced" );
if ( krConfig->readBoolEntry( "Confirm Delete", _ConfirmDelete ) ) {
- QString s, b;
+ TQString s, b;
if ( trash && url.isLocalFile() ) {
s = i18n( "Do you really want to move this item to the trash?" );
b = i18n( "&Trash" );
@@ -600,7 +600,7 @@ int DiskUsage::del( File *file, bool calcPercents, int depth )
b = i18n( "&Delete" );
}
- QStringList name;
+ TQStringList name;
name.append( file->fullPath() );
// show message
// note: i'm using continue and not yes/no because the yes/no has cancel as default button
@@ -608,7 +608,7 @@ int DiskUsage::del( File *file, bool calcPercents, int depth )
return 0;
}
- emit status( i18n( "Deleting %1..." ).arg( file->name() ) );
+ emit status( i18n( "Deleting %1..." ).tqarg( file->name() ) );
}
if( file == currentDirectory )
@@ -622,8 +622,8 @@ int DiskUsage::del( File *file, bool calcPercents, int depth )
while( ( it = dir->iterator() ) != dir->end() )
deleteNr += del( *it, false, depth + 1 );
- QString path;
- for( const Directory *d = (Directory*)file; d != root && d && d->parent() != 0; d = d->parent() )
+ TQString path;
+ for( const Directory *d = (Directory*)file; d != root && d && d->tqparent() != 0; d = d->tqparent() )
{
if( !path.isEmpty() )
path = "/" + path;
@@ -637,7 +637,7 @@ int DiskUsage::del( File *file, bool calcPercents, int depth )
emit deleted( file );
deleteNr++;
- QGuardedPtr<KIO::Job> job;
+ TQGuardedPtr<KIO::Job> job;
if( trash )
{
@@ -646,35 +646,35 @@ int DiskUsage::del( File *file, bool calcPercents, int depth )
#else
job = new KIO::CopyJob( url,KGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true );
#endif
- connect(job,SIGNAL(result(KIO::Job*)),krApp,SLOT(changeTrashIcon()));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),krApp,TQT_SLOT(changeTrashIcon()));
}
else
{
job = new KIO::DeleteJob( vfs::fromPathOrURL( file->fullPath() ), false, false);
}
- deleting = true; // during qApp->processEvent strange things can occur
+ deleting = true; // during tqApp->processEvent strange things can occur
grabMouse(); // that's why we disable the mouse and keyboard events
grabKeyboard();
while( !job.isNull() )
- qApp->processEvents();
+ tqApp->processEvents();
releaseMouse();
releaseKeyboard();
deleting = false;
- ((Directory *)(file->parent()))->remove( file );
+ ((Directory *)(file->tqparent()))->remove( file );
delete file;
if( depth == 0 )
- createStatus();
+ createtqStatus();
if( calcPercents )
{
calculateSizes( root, true );
calculatePercents( true );
- createStatus();
+ createtqStatus();
emit enteringDirectory( currentDirectory );
}
@@ -684,17 +684,17 @@ int DiskUsage::del( File *file, bool calcPercents, int depth )
return deleteNr;
}
-void * DiskUsage::getProperty( File *item, QString key )
+void * DiskUsage::getProperty( File *item, TQString key )
{
- Properties * props = propertyMap.find( item );
+ Properties * props = propertyMap.tqfind( item );
if( props == 0 )
return 0;
- return props->find( key );
+ return props->tqfind( key );
}
-void DiskUsage::addProperty( File *item, QString key, void * prop )
+void DiskUsage::addProperty( File *item, TQString key, void * prop )
{
- Properties * props = propertyMap.find( item );
+ Properties * props = propertyMap.tqfind( item );
if( props == 0 )
{
props = new Properties();
@@ -703,9 +703,9 @@ void DiskUsage::addProperty( File *item, QString key, void * prop )
props->insert( key, prop );
}
-void DiskUsage::removeProperty( File *item, QString key )
+void DiskUsage::removeProperty( File *item, TQString key )
{
- Properties * props = propertyMap.find( item );
+ Properties * props = propertyMap.tqfind( item );
if( props == 0 )
return;
props->remove( key );
@@ -713,7 +713,7 @@ void DiskUsage::removeProperty( File *item, QString key )
propertyMap.remove( item );
}
-void DiskUsage::createStatus()
+void DiskUsage::createtqStatus()
{
Directory *dirEntry = currentDirectory;
@@ -725,9 +725,9 @@ void DiskUsage::createStatus()
url.addPath( dirEntry->directory() );
emit status( i18n( "Current directory:%1, Total size:%2, Own size:%3" )
- .arg( vfs::pathOrURL( url, -1 ) )
- .arg( " "+KRpermHandler::parseSize( dirEntry->size() ) )
- .arg( " "+KRpermHandler::parseSize( dirEntry->ownSize() ) ) );
+ .tqarg( vfs::pathOrURL( url, -1 ) )
+ .tqarg( " "+KRpermHandler::parseSize( dirEntry->size() ) )
+ .tqarg( " "+KRpermHandler::parseSize( dirEntry->ownSize() ) ) );
}
void DiskUsage::changeDirectory( Directory *dir )
@@ -737,7 +737,7 @@ void DiskUsage::changeDirectory( Directory *dir )
currentSize = dir->size();
calculatePercents( true, dir );
- createStatus();
+ createtqStatus();
emit enteringDirectory( dir );
}
@@ -746,7 +746,7 @@ Directory* DiskUsage::getCurrentDir()
return currentDirectory;
}
-void DiskUsage::rightClickMenu( File *fileItem, KPopupMenu *addPopup, QString addPopupName )
+void DiskUsage::rightClickMenu( File *fileItem, KPopupMenu *addPopup, TQString addPopupName )
{
KPopupMenu popup( this );
@@ -776,7 +776,7 @@ void DiskUsage::rightClickMenu( File *fileItem, KPopupMenu *addPopup, QString ad
if( addPopup != 0 )
{
- popup.insertItem( QPixmap(), addPopup, ADDITIONAL_POPUP_ID );
+ popup.insertItem( TQPixmap(), addPopup, ADDITIONAL_POPUP_ID );
popup.changeItem( ADDITIONAL_POPUP_ID, addPopupName );
}
@@ -793,10 +793,10 @@ void DiskUsage::rightClickMenu( File *fileItem, KPopupMenu *addPopup, QString ad
viewPopup.insertItem(i18n("Previous"), PREVIOUS_VIEW_ID);
viewPopup.setAccel( SHIFT + Key_Left, PREVIOUS_VIEW_ID );
- popup.insertItem( QPixmap(), &viewPopup, VIEW_POPUP_ID );
+ popup.insertItem( TQPixmap(), &viewPopup, VIEW_POPUP_ID );
popup.changeItem( VIEW_POPUP_ID, i18n( "View" ) );
- int result=popup.exec(QCursor::pos());
+ int result=popup.exec(TQCursor::pos());
executeAction( result, fileItem );
}
@@ -828,7 +828,7 @@ void DiskUsage::executeAction( int action, File * fileItem )
break;
case STEP_INTO_ID:
{
- QString uri;
+ TQString uri;
if( fileItem && fileItem->isDir() )
uri = fileItem->fullPath();
else
@@ -855,7 +855,7 @@ void DiskUsage::executeAction( int action, File * fileItem )
visibleWidget()->setFocus();
}
-void DiskUsage::keyPressEvent( QKeyEvent *e )
+void DiskUsage::keyPressEvent( TQKeyEvent *e )
{
if( activeView != VIEW_LOADER )
{
@@ -956,23 +956,23 @@ void DiskUsage::keyPressEvent( QKeyEvent *e )
break;
}
}
- QWidgetStack::keyPressEvent( e );
+ TQWidgetStack::keyPressEvent( e );
}
-QPixmap DiskUsage::getIcon( QString mime )
+TQPixmap DiskUsage::getIcon( TQString mime )
{
- QPixmap icon;
+ TQPixmap icon;
- if ( !QPixmapCache::find( mime, icon ) )
+ if ( !TQPixmapCache::tqfind( mime, icon ) )
{
// get the icon.
if ( mime == "Broken Link !" )
icon = FL_LOADICON( "file_broken" );
else
- icon = FL_LOADICON( KMimeType::mimeType( mime ) ->icon( QString::null, true ) );
+ icon = FL_LOADICON( KMimeType::mimeType( mime ) ->icon( TQString(), true ) );
// insert it into the cache
- QPixmapCache::insert( mime, icon );
+ TQPixmapCache::insert( mime, icon );
}
return icon;
}
@@ -1017,17 +1017,17 @@ int DiskUsage::calculatePercents( bool emitSig, Directory *dirEntry, int depth )
return changeNr;
}
-QString DiskUsage::getToolTip( File *item )
+TQString DiskUsage::getToolTip( File *item )
{
KMimeType::Ptr mimePtr = KMimeType::mimeType( item->mime() );
- QString mime = mimePtr->comment();
+ TQString mime = mimePtr->comment();
time_t tma = item->time();
struct tm* t=localtime((time_t *)&tma);
- QDateTime tmp(QDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), QTime(t->tm_hour, t->tm_min));
- QString date = KGlobal::locale()->formatDateTime(tmp);
+ TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min));
+ TQString date = KGlobal::locale()->formatDateTime(tmp);
- QString str = "<qt><h5><table><tr><td>" + i18n( "Name:" ) + "</td><td>" + item->name() + "</td></tr>"+
+ TQString str = "<qt><h5><table><tr><td>" + i18n( "Name:" ) + "</td><td>" + item->name() + "</td></tr>"+
"<tr><td>" + i18n( "Type:" ) + "</td><td>" + mime + "</td></tr>"+
"<tr><td>" + i18n( "Size:" ) + "</td><td>" + KRpermHandler::parseSize( item->size() ) + "</td></tr>";
@@ -1038,7 +1038,7 @@ QString DiskUsage::getToolTip( File *item )
"<tr><td>" + i18n( "Permissions:" ) + "</td><td>" + item->perm() + "</td></tr>"+
"<tr><td>" + i18n( "Owner:" ) + "</td><td>" + item->owner() + " - " + item->group() + "</td></tr>"+
"</table></h5></qt>";
- str.replace( " ", "&nbsp;" );
+ str.tqreplace( " ", "&nbsp;" );
return str;
}
@@ -1084,27 +1084,27 @@ File * DiskUsage::getCurrentFile()
return file;
}
-bool DiskUsage::event( QEvent * e )
+bool DiskUsage::event( TQEvent * e )
{
if( deleting ) { // if we are deleting, disable the mouse and
switch( e->type() ) { // keyboard events
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseMove:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
return true;
default:
break;
}
}
- if ( e->type() == QEvent::AccelOverride )
+ if ( e->type() == TQEvent::AccelOverride )
{
- QKeyEvent* ke = (QKeyEvent*) e;
+ TQKeyEvent* ke = (TQKeyEvent*) e;
- if ( ke->state() == NoButton || ke->state() == Keypad )
+ if ( ke->state() == Qt::NoButton || ke->state() == Keypad )
{
switch ( ke->key() )
{
@@ -1141,7 +1141,7 @@ bool DiskUsage::event( QEvent * e )
}
}
}
- return QWidgetStack::event( e );
+ return TQWidgetStack::event( e );
}
#include "diskusage.moc"
diff --git a/krusader/DiskUsage/diskusage.h b/krusader/DiskUsage/diskusage.h
index da5160e..6ba9cd8 100644
--- a/krusader/DiskUsage/diskusage.h
+++ b/krusader/DiskUsage/diskusage.h
@@ -34,25 +34,25 @@
#include "../VFS/vfs.h"
#include "filelightParts/fileTree.h"
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qptrdict.h>
-#include <qvaluestack.h>
-#include <qptrstack.h>
+#include <tqdialog.h>
+#include <tqlabel.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqptrdict.h>
+#include <tqvaluestack.h>
+#include <tqptrstack.h>
#include <kurl.h>
#include <ksqueezedtextlabel.h>
-#include <qwidgetstack.h>
-#include <qscrollview.h>
-#include <qtimer.h>
+#include <tqwidgetstack.h>
+#include <tqscrollview.h>
+#include <tqtimer.h>
#define VIEW_LINES 0
#define VIEW_DETAILED 1
#define VIEW_FILELIGHT 2
#define VIEW_LOADER 3
-typedef QDict<void> Properties;
+typedef TQDict<void> Properties;
class DUListView;
class DULines;
@@ -60,12 +60,13 @@ class DUFilelight;
class KPopupMenu;
class LoaderWidget;
-class DiskUsage : public QWidgetStack
+class DiskUsage : public TQWidgetStack
{
Q_OBJECT
+ TQ_OBJECT
public:
- DiskUsage( QString confGroup, QWidget *parent = 0, char *name = 0);
+ DiskUsage( TQString confGroup, TQWidget *tqparent = 0, char *name = 0);
~DiskUsage();
void load( KURL dirName );
@@ -76,30 +77,30 @@ public:
void setView( int view );
int getActiveView() { return activeView; }
- Directory* getDirectory( QString path );
- File * getFile( QString path );
+ Directory* getDirectory( TQString path );
+ File * getFile( TQString path );
- QString getConfigGroup() { return configGroup; }
+ TQString getConfigGroup() { return configGroup; }
- void * getProperty( File *, QString );
- void addProperty( File *, QString, void * );
- void removeProperty( File *, QString );
+ void * getProperty( File *, TQString );
+ void addProperty( File *, TQString, void * );
+ void removeProperty( File *, TQString );
int exclude( File *file, bool calcPercents = true, int depth = 0 );
void includeAll();
int del( File *file, bool calcPercents = true, int depth = 0 );
- QString getToolTip( File * );
+ TQString getToolTip( File * );
- void rightClickMenu( File *, KPopupMenu * = 0, QString = QString::null );
+ void rightClickMenu( File *, KPopupMenu * = 0, TQString = TQString() );
void changeDirectory( Directory *dir );
Directory* getCurrentDir();
File* getCurrentFile();
- QPixmap getIcon( QString mime );
+ TQPixmap getIcon( TQString mime );
KURL getBaseURL() { return baseURL; }
@@ -114,7 +115,7 @@ signals:
void changeFinished();
void deleted( File * );
void deleteFinished();
- void status( QString );
+ void status( TQString );
void viewChanged( int );
void loadFinished( bool );
void newSearch();
@@ -123,19 +124,19 @@ protected slots:
void slotLoadDirectory();
protected:
- QDict< Directory > contentMap;
- QPtrDict<Properties> propertyMap;
+ TQDict< Directory > contentMap;
+ TQPtrDict<Properties> propertyMap;
Directory* currentDirectory;
KIO::filesize_t currentSize;
- virtual void keyPressEvent( QKeyEvent * );
- virtual bool event( QEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
+ virtual bool event( TQEvent * );
int calculateSizes( Directory *dir = 0, bool emitSig = false, int depth = 0 );
int calculatePercents( bool emitSig = false, Directory *dir = 0 , int depth = 0 );
int include( Directory *dir, int depth = 0 );
- void createStatus();
+ void createtqStatus();
void executeAction( int, File * = 0 );
KURL baseURL; //< the base URL of loading
@@ -149,7 +150,7 @@ protected:
int activeView;
- QString configGroup;
+ TQString configGroup;
bool first;
bool loading;
@@ -157,28 +158,29 @@ protected:
bool clearAfterAbort;
bool deleting;
- QValueStack<QString> directoryStack;
- QPtrStack<Directory> parentStack;
+ TQValueStack<TQString> directoryStack;
+ TQPtrStack<Directory> tqparentStack;
vfs * searchVfs;
vfile * currentVfile;
Directory * currentParent;
- QString dirToCheck;
+ TQString dirToCheck;
int fileNum;
int dirNum;
int viewBeforeLoad;
- QTimer loadingTimer;
+ TQTimer loadingTimer;
};
-class LoaderWidget : public QScrollView
+class LoaderWidget : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
- LoaderWidget( QWidget *parent = 0, const char *name = 0 );
+ LoaderWidget( TQWidget *tqparent = 0, const char *name = 0 );
void init();
void setCurrentURL( KURL url );
@@ -189,14 +191,14 @@ public slots:
void slotCancelled();
protected:
- virtual void resizeEvent ( QResizeEvent *e );
+ virtual void resizeEvent ( TQResizeEvent *e );
- QLabel *totalSize;
- QLabel *files;
- QLabel *directories;
+ TQLabel *totalSize;
+ TQLabel *files;
+ TQLabel *directories;
KSqueezedTextLabel *searchedDirectory;
- QWidget *widget;
+ TQWidget *widget;
bool cancelled;
};
diff --git a/krusader/DiskUsage/diskusagegui.cpp b/krusader/DiskUsage/diskusagegui.cpp
index f2bc140..21843ad 100644
--- a/krusader/DiskUsage/diskusagegui.cpp
+++ b/krusader/DiskUsage/diskusagegui.cpp
@@ -34,13 +34,13 @@
#include "../VFS/vfs.h"
#include "../Dialogs/krdialogs.h"
-#include <qtimer.h>
-#include <qhbox.h>
+#include <tqtimer.h>
+#include <tqhbox.h>
#include <klocale.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
-DiskUsageGUI::DiskUsageGUI( KURL openDir, QWidget* parent, const char *name )
- : QDialog( parent, name, false, 0 ), exitAtFailure( true )
+DiskUsageGUI::DiskUsageGUI( KURL openDir, TQWidget* tqparent, const char *name )
+ : TQDialog( tqparent, name, false, 0 ), exitAtFailure( true )
{
setCaption( i18n("Krusader::Disk Usage") );
@@ -48,47 +48,47 @@ DiskUsageGUI::DiskUsageGUI( KURL openDir, QWidget* parent, const char *name )
if( !newSearch() )
return;
- QGridLayout *duGrid = new QGridLayout( this );
+ TQGridLayout *duGrid = new TQGridLayout( this );
duGrid->setSpacing( 6 );
duGrid->setMargin( 11 );
- QHBox *duTools = new QHBox( this, "duTools" );
- duTools->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQHBox *duTools = new TQHBox( this, "duTools" );
+ duTools->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
- btnNewSearch = new QToolButton( duTools, "btnNewSearch" );
- btnNewSearch->setIconSet( QIconSet(krLoader->loadIcon("fileopen",KIcon::Desktop)) );
- QToolTip::add( btnNewSearch, i18n( "Start new disk usage search" ) );
+ btnNewSearch = new TQToolButton( duTools, "btnNewSearch" );
+ btnNewSearch->setIconSet( TQIconSet(krLoader->loadIcon("fileopen",KIcon::Desktop)) );
+ TQToolTip::add( btnNewSearch, i18n( "Start new disk usage search" ) );
- btnRefresh = new QToolButton( duTools, "btnRefresh" );
- btnRefresh->setIconSet( QIconSet(krLoader->loadIcon("reload",KIcon::Desktop)) );
- QToolTip::add( btnRefresh, i18n( "Refresh" ) );
+ btnRefresh = new TQToolButton( duTools, "btnRefresh" );
+ btnRefresh->setIconSet( TQIconSet(krLoader->loadIcon("reload",KIcon::Desktop)) );
+ TQToolTip::add( btnRefresh, i18n( "Refresh" ) );
- btnDirUp = new QToolButton( duTools, "btnDirUp" );
- btnDirUp->setIconSet( QIconSet(krLoader->loadIcon("up",KIcon::Desktop)) );
- QToolTip::add( btnDirUp, i18n( "Parent directory" ) );
+ btnDirUp = new TQToolButton( duTools, "btnDirUp" );
+ btnDirUp->setIconSet( TQIconSet(krLoader->loadIcon("up",KIcon::Desktop)) );
+ TQToolTip::add( btnDirUp, i18n( "Parent directory" ) );
- QWidget * separatorWidget = new QWidget( duTools, "separatorWidget" );
+ TQWidget * separatorWidget = new TQWidget( duTools, "separatorWidget" );
separatorWidget->setMinimumWidth( 10 );
- btnLines = new QToolButton( duTools, "btnLines" );
- btnLines->setIconSet( QIconSet(krLoader->loadIcon("leftjust",KIcon::Desktop)) );
+ btnLines = new TQToolButton( duTools, "btnLines" );
+ btnLines->setIconSet( TQIconSet(krLoader->loadIcon("leftjust",KIcon::Desktop)) );
btnLines->setToggleButton( true );
- QToolTip::add( btnLines, i18n( "Line view" ) );
+ TQToolTip::add( btnLines, i18n( "Line view" ) );
- btnDetailed = new QToolButton( duTools, "btnDetailed" );
- btnDetailed->setIconSet( QIconSet(krLoader->loadIcon("view_detailed",KIcon::Desktop)) );
+ btnDetailed = new TQToolButton( duTools, "btnDetailed" );
+ btnDetailed->setIconSet( TQIconSet(krLoader->loadIcon("view_detailed",KIcon::Desktop)) );
btnDetailed->setToggleButton( true );
- QToolTip::add( btnDetailed, i18n( "Detailed view" ) );
+ TQToolTip::add( btnDetailed, i18n( "Detailed view" ) );
- btnFilelight = new QToolButton( duTools, "btnFilelight" );
- btnFilelight->setIconSet( QIconSet(krLoader->loadIcon("kr_diskusage",KIcon::Desktop)) );
+ btnFilelight = new TQToolButton( duTools, "btnFilelight" );
+ btnFilelight->setIconSet( TQIconSet(krLoader->loadIcon("kr_diskusage",KIcon::Desktop)) );
btnFilelight->setToggleButton( true );
- QToolTip::add( btnFilelight, i18n( "Filelight view" ) );
+ TQToolTip::add( btnFilelight, i18n( "Filelight view" ) );
- QWidget *spacerWidget = new QWidget( duTools, "spacerWidget" );
- QHBoxLayout *hboxlayout = new QHBoxLayout( spacerWidget );
- QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed );
- hboxlayout->addItem( spacer );
+ TQWidget *spacerWidget = new TQWidget( duTools, "spacerWidget" );
+ TQHBoxLayout *hboxtqlayout = new TQHBoxLayout( spacerWidget );
+ TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Fixed );
+ hboxtqlayout->addItem( spacer );
duGrid->addWidget( duTools, 0, 0 );
@@ -96,20 +96,20 @@ DiskUsageGUI::DiskUsageGUI( KURL openDir, QWidget* parent, const char *name )
duGrid->addWidget( diskUsage, 1, 0 );
status = new KSqueezedTextLabel( this );
- status->setFrameShape( QLabel::StyledPanel );
- status->setFrameShadow( QLabel::Sunken );
+ status->setFrameShape( TQLabel::StyledPanel );
+ status->setFrameShadow( TQLabel::Sunken );
duGrid->addWidget( status, 2, 0 );
- connect( diskUsage, SIGNAL( status( QString ) ), this, SLOT( setStatus( QString ) ) );
- connect( diskUsage, SIGNAL( viewChanged( int ) ), this, SLOT( slotViewChanged( int ) ) );
- connect( diskUsage, SIGNAL( newSearch() ), this, SLOT( newSearch() ) );
- connect( diskUsage, SIGNAL( loadFinished( bool ) ), this, SLOT( slotLoadFinished( bool ) ) );
- connect( btnNewSearch, SIGNAL( clicked() ), this, SLOT( newSearch() ) );
- connect( btnRefresh, SIGNAL( clicked() ), this, SLOT( loadUsageInfo() ) );
- connect( btnDirUp, SIGNAL( clicked() ), diskUsage, SLOT( dirUp() ) );
- connect( btnLines, SIGNAL( clicked() ), this, SLOT( selectLinesView() ) );
- connect( btnDetailed, SIGNAL( clicked() ), this, SLOT( selectListView() ) );
- connect( btnFilelight, SIGNAL( clicked() ), this, SLOT( selectFilelightView() ) );
+ connect( diskUsage, TQT_SIGNAL( status( TQString ) ), this, TQT_SLOT( settqStatus( TQString ) ) );
+ connect( diskUsage, TQT_SIGNAL( viewChanged( int ) ), this, TQT_SLOT( slotViewChanged( int ) ) );
+ connect( diskUsage, TQT_SIGNAL( newSearch() ), this, TQT_SLOT( newSearch() ) );
+ connect( diskUsage, TQT_SIGNAL( loadFinished( bool ) ), this, TQT_SLOT( slotLoadFinished( bool ) ) );
+ connect( btnNewSearch, TQT_SIGNAL( clicked() ), this, TQT_SLOT( newSearch() ) );
+ connect( btnRefresh, TQT_SIGNAL( clicked() ), this, TQT_SLOT( loadUsageInfo() ) );
+ connect( btnDirUp, TQT_SIGNAL( clicked() ), diskUsage, TQT_SLOT( dirUp() ) );
+ connect( btnLines, TQT_SIGNAL( clicked() ), this, TQT_SLOT( selectLinesView() ) );
+ connect( btnDetailed, TQT_SIGNAL( clicked() ), this, TQT_SLOT( selectListView() ) );
+ connect( btnFilelight, TQT_SIGNAL( clicked() ), this, TQT_SLOT( selectFilelightView() ) );
krConfig->setGroup( "DiskUsage" );
@@ -118,8 +118,8 @@ DiskUsageGUI::DiskUsageGUI( KURL openDir, QWidget* parent, const char *name )
view = VIEW_LINES;
diskUsage->setView( view );
- sizeX = krConfig->readNumEntry( "Window Width", QFontMetrics(font()).width("W") * 70 );
- sizeY = krConfig->readNumEntry( "Window Height", QFontMetrics(font()).height() * 25 );
+ sizeX = krConfig->readNumEntry( "Window Width", TQFontMetrics(font()).width("W") * 70 );
+ sizeY = krConfig->readNumEntry( "Window Height", TQFontMetrics(font()).height() * 25 );
resize( sizeX, sizeY );
if( krConfig->readBoolEntry( "Window Maximized", false ) )
@@ -152,14 +152,14 @@ void DiskUsageGUI::enableButtons( bool isOn )
btnFilelight->setEnabled( isOn );
}
-void DiskUsageGUI::resizeEvent( QResizeEvent *e )
+void DiskUsageGUI::resizeEvent( TQResizeEvent *e )
{
if( !isMaximized() )
{
sizeX = e->size().width();
sizeY = e->size().height();
}
- QDialog::resizeEvent( e );
+ TQDialog::resizeEvent( e );
}
void DiskUsageGUI::reject()
@@ -170,7 +170,7 @@ void DiskUsageGUI::reject()
krConfig->writeEntry("Window Maximized", isMaximized() );
krConfig->writeEntry("View", diskUsage->getActiveView() );
- QDialog::reject();
+ TQDialog::reject();
}
void DiskUsageGUI::loadUsageInfo()
@@ -178,7 +178,7 @@ void DiskUsageGUI::loadUsageInfo()
diskUsage->load( baseDirectory );
}
-void DiskUsageGUI::setStatus( QString stat )
+void DiskUsageGUI::settqStatus( TQString stat )
{
status->setText( stat );
}
@@ -220,7 +220,7 @@ bool DiskUsageGUI::newSearch()
if (tmp.isEmpty()) return false;
baseDirectory = tmp;
- QTimer::singleShot( 0, this, SLOT( loadUsageInfo() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( loadUsageInfo() ) );
return true;
}
diff --git a/krusader/DiskUsage/diskusagegui.h b/krusader/DiskUsage/diskusagegui.h
index d243307..c6310f6 100644
--- a/krusader/DiskUsage/diskusagegui.h
+++ b/krusader/DiskUsage/diskusagegui.h
@@ -31,27 +31,28 @@
#ifndef __DISK_USAGE_GUI_H__
#define __DISK_USAGE_GUI_H__
-#include <qdialog.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
+#include <tqdialog.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
#include <kurl.h>
#include <ksqueezedtextlabel.h>
#include "diskusage.h"
-class DiskUsageGUI : public QDialog
+class DiskUsageGUI : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- DiskUsageGUI( KURL openDir, QWidget* parent=0, const char *name = 0 );
+ DiskUsageGUI( KURL openDir, TQWidget* tqparent=0, const char *name = 0 );
~DiskUsageGUI();
public slots:
void loadUsageInfo();
bool newSearch();
- void setStatus( QString );
+ void settqStatus( TQString );
void selectLinesView() { diskUsage->setView( VIEW_LINES ); }
void selectListView() { diskUsage->setView( VIEW_DETAILED ); }
@@ -64,20 +65,20 @@ protected slots:
void slotLoadFinished( bool );
protected:
- virtual void resizeEvent( QResizeEvent *e );
+ virtual void resizeEvent( TQResizeEvent *e );
DiskUsage *diskUsage;
KURL baseDirectory;
KSqueezedTextLabel *status;
- QToolButton *btnNewSearch;
- QToolButton *btnRefresh;
- QToolButton *btnDirUp;
+ TQToolButton *btnNewSearch;
+ TQToolButton *btnRefresh;
+ TQToolButton *btnDirUp;
- QToolButton *btnLines;
- QToolButton *btnDetailed;
- QToolButton *btnFilelight;
+ TQToolButton *btnLines;
+ TQToolButton *btnDetailed;
+ TQToolButton *btnFilelight;
int sizeX;
int sizeY;
diff --git a/krusader/DiskUsage/dufilelight.cpp b/krusader/DiskUsage/dufilelight.cpp
index 6a6bee9..57922db 100644
--- a/krusader/DiskUsage/dufilelight.cpp
+++ b/krusader/DiskUsage/dufilelight.cpp
@@ -39,15 +39,15 @@
DUFilelight::DUFilelight( DiskUsage *usage, const char *name )
: RadialMap::Widget( usage, name ), diskUsage( usage ), currentDir( 0 ), refreshNeeded( true )
{
- setFocusPolicy( QWidget::StrongFocus );
-
- connect( diskUsage, SIGNAL( enteringDirectory( Directory * ) ), this, SLOT( slotDirChanged( Directory * ) ) );
- connect( diskUsage, SIGNAL( clearing() ), this, SLOT( clear() ) );
- connect( diskUsage, SIGNAL( changed( File * ) ), this, SLOT( slotChanged( File * ) ) );
- connect( diskUsage, SIGNAL( deleted( File * ) ), this, SLOT( slotChanged( File * ) ) );
- connect( diskUsage, SIGNAL( changeFinished() ), this, SLOT( slotRefresh() ) );
- connect( diskUsage, SIGNAL( deleteFinished() ), this, SLOT( slotRefresh() ) );
- connect( diskUsage, SIGNAL( aboutToShow( QWidget * ) ), this, SLOT( slotAboutToShow( QWidget * ) ) );
+ setFocusPolicy( TQ_StrongFocus );
+
+ connect( diskUsage, TQT_SIGNAL( enteringDirectory( Directory * ) ), this, TQT_SLOT( slotDirChanged( Directory * ) ) );
+ connect( diskUsage, TQT_SIGNAL( clearing() ), this, TQT_SLOT( clear() ) );
+ connect( diskUsage, TQT_SIGNAL( changed( File * ) ), this, TQT_SLOT( slotChanged( File * ) ) );
+ connect( diskUsage, TQT_SIGNAL( deleted( File * ) ), this, TQT_SLOT( slotChanged( File * ) ) );
+ connect( diskUsage, TQT_SIGNAL( changeFinished() ), this, TQT_SLOT( slotRefresh() ) );
+ connect( diskUsage, TQT_SIGNAL( deleteFinished() ), this, TQT_SLOT( slotRefresh() ) );
+ connect( diskUsage, TQT_SIGNAL( aboutToShow( TQWidget * ) ), this, TQT_SLOT( slotAboutToShow( TQWidget * ) ) );
}
void DUFilelight::slotDirChanged( Directory *dir )
@@ -59,7 +59,7 @@ void DUFilelight::slotDirChanged( Directory *dir )
{
currentDir = dir;
- invalidate( false );
+ tqinvalidate( false );
create( dir );
refreshNeeded = false;
}
@@ -67,7 +67,7 @@ void DUFilelight::slotDirChanged( Directory *dir )
void DUFilelight::clear()
{
- invalidate( false );
+ tqinvalidate( false );
currentDir = 0;
}
@@ -81,7 +81,7 @@ File * DUFilelight::getCurrentFile()
return (File *)focus->file();
}
-void DUFilelight::mousePressEvent( QMouseEvent *event )
+void DUFilelight::mousePressEvent( TQMouseEvent *event )
{
if( event->button() == Qt::RightButton )
{
@@ -93,30 +93,30 @@ void DUFilelight::mousePressEvent( QMouseEvent *event )
file = (File *)focus->file();
KPopupMenu filelightPopup;
- filelightPopup.insertItem( i18n("Zoom In"), this, SLOT( zoomIn() ), Key_Plus );
- filelightPopup.insertItem( i18n("Zoom Out"), this, SLOT( zoomOut() ), Key_Minus );
+ filelightPopup.insertItem( i18n("Zoom In"), this, TQT_SLOT( zoomIn() ), Key_Plus );
+ filelightPopup.insertItem( i18n("Zoom Out"), this, TQT_SLOT( zoomOut() ), Key_Minus );
KPopupMenu schemePopup;
- schemePopup.insertItem( i18n("Rainbow"), this, SLOT( schemeRainbow() ) );
- schemePopup.insertItem( i18n("High Contrast"), this, SLOT( schemeHighContrast() ) );
- schemePopup.insertItem( i18n("KDE"), this, SLOT( schemeKDE() ) );
+ schemePopup.insertItem( i18n("Rainbow"), this, TQT_SLOT( schemeRainbow() ) );
+ schemePopup.insertItem( i18n("High Contrast"), this, TQT_SLOT( schemeHighContrast() ) );
+ schemePopup.insertItem( i18n("KDE"), this, TQT_SLOT( schemeKDE() ) );
- filelightPopup.insertItem( QPixmap(), &schemePopup, SCHEME_POPUP_ID );
+ filelightPopup.insertItem( TQPixmap(), &schemePopup, SCHEME_POPUP_ID );
filelightPopup.changeItem( SCHEME_POPUP_ID, i18n( "Scheme" ) );
- filelightPopup.insertItem( i18n("Increase contrast"), this, SLOT( increaseContrast() ) );
- filelightPopup.insertItem( i18n("Decrease contrast"), this, SLOT( decreaseContrast() ) );
+ filelightPopup.insertItem( i18n("Increase contrast"), this, TQT_SLOT( increaseContrast() ) );
+ filelightPopup.insertItem( i18n("Decrease contrast"), this, TQT_SLOT( decreaseContrast() ) );
- int aid = filelightPopup.insertItem( i18n("Use anti-aliasing" ), this, SLOT( changeAntiAlias() ) );
+ int aid = filelightPopup.insertItem( i18n("Use anti-aliasing" ), this, TQT_SLOT( changeAntiAlias() ) );
filelightPopup.setItemChecked( aid, Filelight::Config::antiAliasFactor > 1 );
- int sid = filelightPopup.insertItem( i18n("Show small files" ), this, SLOT( showSmallFiles() ) );
+ int sid = filelightPopup.insertItem( i18n("Show small files" ), this, TQT_SLOT( showSmallFiles() ) );
filelightPopup.setItemChecked( sid, Filelight::Config::showSmallFiles );
- int vid = filelightPopup.insertItem( i18n("Vary label font sizes" ), this, SLOT( varyLabelFontSizes() ) );
+ int vid = filelightPopup.insertItem( i18n("Vary label font sizes" ), this, TQT_SLOT( varyLabelFontSizes() ) );
filelightPopup.setItemChecked( vid, Filelight::Config::varyLabelFontSizes );
- filelightPopup.insertItem( i18n("Minimum font size"), this, SLOT( minFontSize() ) );
+ filelightPopup.insertItem( i18n("Minimum font size"), this, TQT_SLOT( minFontSize() ) );
diskUsage->rightClickMenu( file, &filelightPopup, i18n( "Filelight" ) );
return;
@@ -201,14 +201,14 @@ void DUFilelight::minFontSize()
}
}
-void DUFilelight::slotAboutToShow( QWidget *widget )
+void DUFilelight::slotAboutToShow( TQWidget *widget )
{
if( widget == this && ( diskUsage->getCurrentDir() != currentDir || refreshNeeded ) )
{
refreshNeeded = false;
if( ( currentDir = diskUsage->getCurrentDir() ) != 0 )
{
- invalidate( false );
+ tqinvalidate( false );
create( currentDir );
}
}
@@ -222,7 +222,7 @@ void DUFilelight::slotRefresh()
refreshNeeded = false;
if( currentDir && currentDir == diskUsage->getCurrentDir() )
{
- invalidate( false );
+ tqinvalidate( false );
create( currentDir );
}
}
diff --git a/krusader/DiskUsage/dufilelight.h b/krusader/DiskUsage/dufilelight.h
index 556830e..bc06dd5 100644
--- a/krusader/DiskUsage/dufilelight.h
+++ b/krusader/DiskUsage/dufilelight.h
@@ -38,6 +38,7 @@
class DUFilelight : public RadialMap::Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
DUFilelight( DiskUsage *usage, const char *name );
@@ -51,7 +52,7 @@ public slots:
void slotRefresh();
protected slots:
- void slotAboutToShow( QWidget *widget );
+ void slotAboutToShow( TQWidget *widget );
void schemeRainbow() { setScheme( Filelight::Rainbow ); }
void schemeHighContrast() { setScheme( Filelight::HighContrast ); }
@@ -65,7 +66,7 @@ protected slots:
void minFontSize();
protected:
- virtual void mousePressEvent( QMouseEvent* );
+ virtual void mousePressEvent( TQMouseEvent* );
void setScheme( Filelight::MapScheme );
diff --git a/krusader/DiskUsage/dulines.cpp b/krusader/DiskUsage/dulines.cpp
index 089a8a7..922bc37 100644
--- a/krusader/DiskUsage/dulines.cpp
+++ b/krusader/DiskUsage/dulines.cpp
@@ -32,33 +32,33 @@
#include "../kicons.h"
#include "../krusader.h"
#include "../VFS/krpermhandler.h"
-#include <qheader.h>
+#include <tqheader.h>
#include <klocale.h>
-#include <qpen.h>
-#include <qpainter.h>
-#include <qfontmetrics.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqpen.h>
+#include <tqpainter.h>
+#include <tqfontmetrics.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kpopupmenu.h>
-class DULinesItem : public QListViewItem
+class DULinesItem : public TQListViewItem
{
public:
- DULinesItem( DiskUsage *diskUsageIn, File *fileItem, QListView * parent, QString label1,
- QString label2, QString label3, unsigned int italicPos ) : QListViewItem( parent, label1, label2, label3 ),
+ DULinesItem( DiskUsage *diskUsageIn, File *fileItem, TQListView * tqparent, TQString label1,
+ TQString label2, TQString label3, unsigned int italicPos ) : TQListViewItem( tqparent, label1, label2, label3 ),
diskUsage( diskUsageIn ), file( fileItem ), isTruncated( false ), italicTextPos( italicPos ) {}
- DULinesItem( DiskUsage *diskUsageIn, File *fileItem, QListView * parent, QListViewItem * after,
- QString label1, QString label2, QString label3, unsigned int italicPos ) : QListViewItem( parent, after, label1,
+ DULinesItem( DiskUsage *diskUsageIn, File *fileItem, TQListView * tqparent, TQListViewItem * after,
+ TQString label1, TQString label2, TQString label3, unsigned int italicPos ) : TQListViewItem( tqparent, after, label1,
label2, label3 ), diskUsage( diskUsageIn ), file( fileItem ), isTruncated( false ), italicTextPos( italicPos ) {}
- virtual int compare ( QListViewItem * i, int col, bool ascending ) const
+ virtual int compare ( TQListViewItem * i, int col, bool ascending ) const
{
if( text(0) == ".." ) return ascending ? -1 : 1;
if( i->text(0) == "..") return ascending ? 1 : -1;
DULinesItem *compWith = dynamic_cast< DULinesItem * >( i );
- QString buf1,buf2;
+ TQString buf1,buf2;
switch( col )
{
@@ -66,26 +66,26 @@ public:
case 1:
buf1.sprintf("%025llu",file->size());
buf2.sprintf("%025llu",compWith->file->size());
- return -QString::compare( buf1, buf2 );
+ return -TQString::compare( buf1, buf2 );
default:
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
}
}
- virtual void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align )
+ virtual void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{
if( column == 2 )
{
if ( isSelected() )
- p->fillRect( 0, 0, width, height(), cg.brush( QColorGroup::Highlight ) );
+ p->fillRect( 0, 0, width, height(), cg.brush( TQColorGroup::Highlight ) );
else
- p->fillRect( 0, 0, width, height(), cg.brush( QColorGroup::Base ) );
+ p->fillRect( 0, 0, width, height(), cg.brush( TQColorGroup::Base ) );
- QListView *lv = listView();
+ TQListView *lv = listView();
int pos = lv->itemMargin();
- const QPixmap *icon = pixmap( column );
+ const TQPixmap *icon = pixmap( column );
if( icon )
{
int iconWidth = icon->width() + lv->itemMargin();
@@ -97,15 +97,15 @@ public:
pos += iconWidth;
}
- QFontMetrics fm( p->fontMetrics() );
+ TQFontMetrics fm( p->fontMetrics() );
if( isSelected() )
p->setPen( cg.highlightedText() );
else
p->setPen( cg.text() );
- QString t = text( column );
- QString b;
+ TQString t = text( column );
+ TQString b;
if( t.length() > italicTextPos )
{
@@ -136,11 +136,11 @@ public:
if( !b.isEmpty() && !isTruncated )
{
- QFont font( p->font() );
+ TQFont font( p->font() );
font.setItalic( true );
p->setFont( font );
- QFontMetrics fm2( p->fontMetrics() );
+ TQFontMetrics fm2( p->fontMetrics() );
int remWidth = width-pos;
@@ -160,7 +160,7 @@ public:
}
}
else
- QListViewItem::paintCell( p, cg, column, width, align );
+ TQListViewItem::paintCell( p, cg, column, width, align );
}
inline File * getFile() { return file; }
@@ -173,35 +173,35 @@ private:
unsigned int italicTextPos;
};
-class DULinesToolTip : public QToolTip
+class DULinesToolTip : public TQToolTip
{
public:
- DULinesToolTip( DiskUsage *usage, QWidget *parent, QListView *lv );
- void maybeTip( const QPoint &pos );
+ DULinesToolTip( DiskUsage *usage, TQWidget *tqparent, TQListView *lv );
+ void maybeTip( const TQPoint &pos );
virtual ~DULinesToolTip() {}
private:
- QListView *view;
+ TQListView *view;
DiskUsage *diskUsage;
};
-DULinesToolTip::DULinesToolTip( DiskUsage *usage, QWidget *parent, QListView *lv )
- : QToolTip( parent ), view( lv ), diskUsage( usage )
+DULinesToolTip::DULinesToolTip( DiskUsage *usage, TQWidget *tqparent, TQListView *lv )
+ : TQToolTip( tqparent ), view( lv ), diskUsage( usage )
{
}
-void DULinesToolTip::maybeTip( const QPoint &pos )
+void DULinesToolTip::maybeTip( const TQPoint &pos )
{
- QListViewItem *item = view->itemAt( pos );
- QPoint contentsPos = view->viewportToContents( pos );
+ TQListViewItem *item = view->itemAt( pos );
+ TQPoint contentsPos = view->viewportToContents( pos );
if ( !item )
return;
int col = view->header()->sectionAt( contentsPos.x() );
- int width = item->width( QFontMetrics( view->font() ), view, col );
+ int width = item->width( TQFontMetrics( view->font() ), view, col );
- QRect r = view->itemRect( item );
+ TQRect r = view->tqitemRect( item );
int headerPos = view->header()->sectionPos( col );
r.setLeft( headerPos );
r.setRight( headerPos + view->header()->sectionSize( col ) );
@@ -216,15 +216,15 @@ void DULinesToolTip::maybeTip( const QPoint &pos )
}
DULines::DULines( DiskUsage *usage, const char *name )
- : QListView( usage, name ), diskUsage( usage ), refreshNeeded( false )
+ : TQListView( usage, name ), diskUsage( usage ), refreshNeeded( false )
{
setAllColumnsShowFocus(true);
- setVScrollBarMode(QScrollView::Auto);
- setHScrollBarMode(QScrollView::Auto);
+ setVScrollBarMode(TQScrollView::Auto);
+ setHScrollBarMode(TQScrollView::Auto);
setShowSortIndicator(true);
setTreeStepSize( 10 );
- int defaultSize = QFontMetrics(font()).width("W");
+ int defaultSize = TQFontMetrics(font()).width("W");
krConfig->setGroup( diskUsage->getConfigGroup() );
@@ -232,15 +232,15 @@ DULines::DULines( DiskUsage *usage, const char *name )
int lineWidth = krConfig->readNumEntry("L Line Width", defaultSize * 20 );
addColumn( i18n("Line View"), lineWidth );
- setColumnWidthMode(0,QListView::Manual);
+ setColumnWidthMode(0,TQListView::Manual);
int precentWidth = krConfig->readNumEntry("L Percent Width", defaultSize * 6 );
addColumn( i18n("Percent"), precentWidth );
- setColumnWidthMode(1,QListView::Manual);
+ setColumnWidthMode(1,TQListView::Manual);
int nameWidth = krConfig->readNumEntry("L Name Width", defaultSize * 20 );
addColumn( i18n("Name"), nameWidth );
- setColumnWidthMode(2,QListView::Manual);
+ setColumnWidthMode(2,TQListView::Manual);
- setColumnAlignment( 1, Qt::AlignRight );
+ setColumnAlignment( 1, TQt::AlignRight );
header()->setStretchEnabled( true, 0 );
@@ -248,15 +248,15 @@ DULines::DULines( DiskUsage *usage, const char *name )
toolTip = new DULinesToolTip( diskUsage, viewport(), this );
- connect( diskUsage, SIGNAL( enteringDirectory( Directory * ) ), this, SLOT( slotDirChanged( Directory * ) ) );
- connect( diskUsage, SIGNAL( clearing() ), this, SLOT( clear() ) );
+ connect( diskUsage, TQT_SIGNAL( enteringDirectory( Directory * ) ), this, TQT_SLOT( slotDirChanged( Directory * ) ) );
+ connect( diskUsage, TQT_SIGNAL( clearing() ), this, TQT_SLOT( clear() ) );
- connect( header(), SIGNAL( sizeChange( int, int, int ) ), this, SLOT( sectionResized( int ) ) );
+ connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ), this, TQT_SLOT( sectionResized( int ) ) );
- connect( this, SIGNAL(rightButtonPressed(QListViewItem *, const QPoint &, int)),
- this, SLOT( slotRightClicked(QListViewItem *) ) );
- connect( diskUsage, SIGNAL( changed( File * ) ), this, SLOT( slotChanged( File * ) ) );
- connect( diskUsage, SIGNAL( deleted( File * ) ), this, SLOT( slotDeleted( File * ) ) );
+ connect( this, TQT_SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT( slotRightClicked(TQListViewItem *) ) );
+ connect( diskUsage, TQT_SIGNAL( changed( File * ) ), this, TQT_SLOT( slotChanged( File * ) ) );
+ connect( diskUsage, TQT_SIGNAL( deleted( File * ) ), this, TQT_SLOT( slotDeleted( File * ) ) );
}
DULines::~DULines()
@@ -274,11 +274,11 @@ void DULines::slotDirChanged( Directory *dirEntry )
{
clear();
- QListViewItem * lastItem = 0;
+ TQListViewItem * lastItem = 0;
- if( ! ( dirEntry->parent() == 0 ) )
+ if( ! ( dirEntry->tqparent() == 0 ) )
{
- lastItem = new QListViewItem( this, ".." );
+ lastItem = new TQListViewItem( this, ".." );
lastItem->setPixmap( 0, FL_LOADICON( "up" ) );
lastItem->setSelectable( false );
}
@@ -295,7 +295,7 @@ void DULines::slotDirChanged( Directory *dirEntry )
{
File *item = *it;
- QString fileName = item->name();
+ TQString fileName = item->name();
unsigned int italicStart = fileName.length();
@@ -317,23 +317,23 @@ void DULines::slotDirChanged( Directory *dirEntry )
setCurrentItem( firstChild() );
}
-QPixmap DULines::createPixmap( int percent, int maxPercent, int maxWidth )
+TQPixmap DULines::createPixmap( int percent, int maxPercent, int maxWidth )
{
if( percent < 0 || percent > maxPercent || maxWidth < 2 || maxPercent == 0 )
- return QPixmap();
+ return TQPixmap();
maxWidth -= 2;
int actualWidth = maxWidth*percent/maxPercent;
if( actualWidth == 0 )
- return QPixmap();
+ return TQPixmap();
- QPen pen;
- pen.setColor( Qt::black );
- QPainter painter;
+ TQPen pen;
+ pen.setColor( TQt::black );
+ TQPainter painter;
- int size = QFontMetrics(font()).height()-2;
- QRect rect( 0, 0, actualWidth, size );
- QPixmap pixmap( rect.width(), rect.height() );
+ int size = TQFontMetrics(font()).height()-2;
+ TQRect rect( 0, 0, actualWidth, size );
+ TQPixmap pixmap( rect.width(), rect.height() );
painter.begin( &pixmap );
painter.setPen( pen );
@@ -342,15 +342,15 @@ QPixmap DULines::createPixmap( int percent, int maxPercent, int maxWidth )
{
int color = (511*i/maxWidth);
if( color < 256 )
- pen.setColor( QColor( 255-color, 255, 0 ) );
+ pen.setColor( TQColor( 255-color, 255, 0 ) );
else
- pen.setColor( QColor( color-256, 511-color, 0 ) );
+ pen.setColor( TQColor( color-256, 511-color, 0 ) );
painter.setPen( pen );
painter.drawLine( i, 1, i, size-1 );
}
- pen.setColor( Qt::black );
+ pen.setColor( TQt::black );
painter.setPen( pen );
painter.drawRect( rect );
painter.end();
@@ -385,7 +385,7 @@ void DULines::sectionResized( int column )
}
}
-bool DULines::doubleClicked( QListViewItem * item )
+bool DULines::doubleClicked( TQListViewItem * item )
{
if( item )
{
@@ -398,7 +398,7 @@ bool DULines::doubleClicked( QListViewItem * item )
}
else
{
- Directory *upDir = (Directory *)diskUsage->getCurrentDir()->parent();
+ Directory *upDir = (Directory *)diskUsage->getCurrentDir()->tqparent();
if( upDir )
diskUsage->changeDirectory( upDir );
@@ -408,22 +408,22 @@ bool DULines::doubleClicked( QListViewItem * item )
return false;
}
-void DULines::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void DULines::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
- if ( e || e->button() == LeftButton )
+ if ( e || e->button() == Qt::LeftButton )
{
- QPoint vp = contentsToViewport(e->pos());
- QListViewItem * item = itemAt( vp );
+ TQPoint vp = contentsToViewport(e->pos());
+ TQListViewItem * item = itemAt( vp );
if( doubleClicked( item ) )
return;
}
- QListView::contentsMouseDoubleClickEvent( e );
+ TQListView::contentsMouseDoubleClickEvent( e );
}
-void DULines::keyPressEvent( QKeyEvent *e )
+void DULines::keyPressEvent( TQKeyEvent *e )
{
switch ( e->key() )
{
@@ -446,10 +446,10 @@ void DULines::keyPressEvent( QKeyEvent *e )
e->ignore();
return;
}
- QListView::keyPressEvent( e );
+ TQListView::keyPressEvent( e );
}
-void DULines::slotRightClicked( QListViewItem *item )
+void DULines::slotRightClicked( TQListViewItem *item )
{
File * file = 0;
@@ -457,7 +457,7 @@ void DULines::slotRightClicked( QListViewItem *item )
file = ((DULinesItem *)item)->getFile();
KPopupMenu linesPopup;
- int lid = linesPopup.insertItem( i18n("Show file sizes"), this, SLOT( slotShowFileSizes() ) );
+ int lid = linesPopup.insertItem( i18n("Show file sizes"), this, TQT_SLOT( slotShowFileSizes() ) );
linesPopup.setItemChecked( lid, showFileSize );
diskUsage->rightClickMenu( file, &linesPopup, i18n( "Lines" ) );
@@ -471,7 +471,7 @@ void DULines::slotShowFileSizes()
File * DULines::getCurrentFile()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if( item == 0 || item->text( 0 ) == ".." )
return 0;
@@ -481,7 +481,7 @@ File * DULines::getCurrentFile()
void DULines::slotChanged( File * item )
{
- QListViewItem *lvitem = firstChild();
+ TQListViewItem *lvitem = firstChild();
while( lvitem )
{
if( lvitem->text( 0 ) != ".." ) {
@@ -493,7 +493,7 @@ void DULines::slotChanged( File * item )
if( !refreshNeeded )
{
refreshNeeded = true;
- QTimer::singleShot( 0, this, SLOT( slotRefresh() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotRefresh() ) );
}
break;
}
@@ -504,7 +504,7 @@ void DULines::slotChanged( File * item )
void DULines::slotDeleted( File * item )
{
- QListViewItem *lvitem = firstChild();
+ TQListViewItem *lvitem = firstChild();
while( lvitem )
{
if( lvitem->text( 0 ) != ".." ) {
diff --git a/krusader/DiskUsage/dulines.h b/krusader/DiskUsage/dulines.h
index aa83ad1..9823eca 100644
--- a/krusader/DiskUsage/dulines.h
+++ b/krusader/DiskUsage/dulines.h
@@ -31,15 +31,16 @@
#ifndef __DU_LINES_H__
#define __DU_LINES_H__
-#include <qlistview.h>
-#include <qpixmap.h>
+#include <tqlistview.h>
+#include <tqpixmap.h>
#include "diskusage.h"
class DULinesToolTip;
-class DULines : public QListView
+class DULines : public TQListView
{
Q_OBJECT
+ TQ_OBJECT
public:
DULines( DiskUsage *usage, const char *name );
@@ -50,7 +51,7 @@ public:
public slots:
void slotDirChanged( Directory *dirEntry );
void sectionResized( int );
- void slotRightClicked(QListViewItem *);
+ void slotRightClicked(TQListViewItem *);
void slotChanged( File * );
void slotDeleted( File * );
void slotShowFileSizes();
@@ -59,13 +60,13 @@ public slots:
protected:
DiskUsage *diskUsage;
- virtual void contentsMouseDoubleClickEvent ( QMouseEvent * e );
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void contentsMouseDoubleClickEvent ( TQMouseEvent * e );
+ virtual void keyPressEvent( TQKeyEvent *e );
private:
- QPixmap createPixmap( int percent, int maxPercent, int maxWidth );
+ TQPixmap createPixmap( int percent, int maxPercent, int maxWidth );
- bool doubleClicked( QListViewItem * item );
+ bool doubleClicked( TQListViewItem * item );
bool refreshNeeded;
diff --git a/krusader/DiskUsage/dulistview.cpp b/krusader/DiskUsage/dulistview.cpp
index 62c1fcf..1fbffe3 100644
--- a/krusader/DiskUsage/dulistview.cpp
+++ b/krusader/DiskUsage/dulistview.cpp
@@ -32,69 +32,69 @@
#include "../krusader.h"
#include "../kicons.h"
#include "../VFS/krpermhandler.h"
-#include <qfontmetrics.h>
+#include <tqfontmetrics.h>
#include <klocale.h>
#include <kmimetype.h>
#include <kglobal.h>
-#include <qheader.h>
+#include <tqheader.h>
#include <time.h>
DUListView::DUListView( DiskUsage *usage, const char *name )
- : QListView( usage, name ), diskUsage( usage )
+ : TQListView( usage, name ), diskUsage( usage )
{
setAllColumnsShowFocus(true);
- setVScrollBarMode(QScrollView::Auto);
- setHScrollBarMode(QScrollView::Auto);
+ setVScrollBarMode(TQScrollView::Auto);
+ setHScrollBarMode(TQScrollView::Auto);
setShowSortIndicator(true);
setRootIsDecorated( true );
setTreeStepSize( 10 );
- int defaultSize = QFontMetrics(font()).width("W");
+ int defaultSize = TQFontMetrics(font()).width("W");
krConfig->setGroup( diskUsage->getConfigGroup() );
int nameWidth = krConfig->readNumEntry("D Name Width", defaultSize * 20 );
addColumn( i18n("Name"), nameWidth );
- setColumnWidthMode(0,QListView::Manual);
+ setColumnWidthMode(0,TQListView::Manual);
int percentWidth = krConfig->readNumEntry("D Percent Width", defaultSize * 5 );
addColumn( i18n("Percent"), percentWidth );
- setColumnWidthMode(1,QListView::Manual);
+ setColumnWidthMode(1,TQListView::Manual);
int totalSizeWidth = krConfig->readNumEntry("D Total Size Width", defaultSize * 10 );
addColumn( i18n("Total size"), totalSizeWidth );
- setColumnWidthMode(1,QListView::Manual);
+ setColumnWidthMode(1,TQListView::Manual);
int ownSizeWidth = krConfig->readNumEntry("D Own Size Width", defaultSize * 10 );
addColumn( i18n("Own size"), ownSizeWidth );
- setColumnWidthMode(2,QListView::Manual);
+ setColumnWidthMode(2,TQListView::Manual);
int typeWidth = krConfig->readNumEntry("D Type Width", defaultSize * 10 );
addColumn( i18n("Type"), typeWidth );
- setColumnWidthMode(3,QListView::Manual);
+ setColumnWidthMode(3,TQListView::Manual);
int dateWidth = krConfig->readNumEntry("D Date Width", defaultSize * 10 );
addColumn( i18n("Date"), dateWidth );
- setColumnWidthMode(4,QListView::Manual);
+ setColumnWidthMode(4,TQListView::Manual);
int permissionsWidth = krConfig->readNumEntry("D Permissions Width", defaultSize * 6 );
addColumn( i18n("Permissions"), permissionsWidth );
- setColumnWidthMode(5,QListView::Manual);
+ setColumnWidthMode(5,TQListView::Manual);
int ownerWidth = krConfig->readNumEntry("D Owner Width", defaultSize * 5 );
addColumn( i18n("Owner"), ownerWidth );
- setColumnWidthMode(6,QListView::Manual);
+ setColumnWidthMode(6,TQListView::Manual);
int groupWidth = krConfig->readNumEntry("D Group Width", defaultSize * 5 );
addColumn( i18n("Group"), groupWidth );
- setColumnWidthMode(7,QListView::Manual);
+ setColumnWidthMode(7,TQListView::Manual);
- setColumnAlignment( 1, Qt::AlignRight );
- setColumnAlignment( 2, Qt::AlignRight );
- setColumnAlignment( 3, Qt::AlignRight );
+ setColumnAlignment( 1, TQt::AlignRight );
+ setColumnAlignment( 2, TQt::AlignRight );
+ setColumnAlignment( 3, TQt::AlignRight );
setSorting( 2 );
- connect( diskUsage, SIGNAL( enteringDirectory( Directory * ) ), this, SLOT( slotDirChanged( Directory * ) ) );
- connect( diskUsage, SIGNAL( clearing() ), this, SLOT( clear() ) );
- connect( diskUsage, SIGNAL( changed( File * ) ), this, SLOT( slotChanged( File * ) ) );
- connect( diskUsage, SIGNAL( deleted( File * ) ), this, SLOT( slotDeleted( File * ) ) );
+ connect( diskUsage, TQT_SIGNAL( enteringDirectory( Directory * ) ), this, TQT_SLOT( slotDirChanged( Directory * ) ) );
+ connect( diskUsage, TQT_SIGNAL( clearing() ), this, TQT_SLOT( clear() ) );
+ connect( diskUsage, TQT_SIGNAL( changed( File * ) ), this, TQT_SLOT( slotChanged( File * ) ) );
+ connect( diskUsage, TQT_SIGNAL( deleted( File * ) ), this, TQT_SLOT( slotDeleted( File * ) ) );
- connect( this, SIGNAL(rightButtonPressed(QListViewItem *, const QPoint &, int)),
- this, SLOT( slotRightClicked(QListViewItem *) ) );
- connect( this, SIGNAL( expanded ( QListViewItem * ) ),
- this, SLOT( slotExpanded( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT( slotRightClicked(TQListViewItem *) ) );
+ connect( this, TQT_SIGNAL( expanded ( TQListViewItem * ) ),
+ this, TQT_SLOT( slotExpanded( TQListViewItem * ) ) );
}
DUListView::~ DUListView()
@@ -111,13 +111,13 @@ DUListView::~ DUListView()
krConfig->writeEntry("D Group Width", columnWidth( 8 ) );
}
-void DUListView::addDirectory( Directory *dirEntry, QListViewItem *parent )
+void DUListView::addDirectory( Directory *dirEntry, TQListViewItem *tqparent )
{
- QListViewItem * lastItem = 0;
+ TQListViewItem * lastItem = 0;
- if( parent == 0 && ! ( dirEntry->parent() == 0 ) )
+ if( tqparent == 0 && ! ( dirEntry->tqparent() == 0 ) )
{
- lastItem = new QListViewItem( this, ".." );
+ lastItem = new TQListViewItem( this, ".." );
lastItem->setPixmap( 0, FL_LOADICON( "up" ) );
lastItem->setSelectable( false );
}
@@ -127,28 +127,28 @@ void DUListView::addDirectory( Directory *dirEntry, QListViewItem *parent )
File *item = *it;
KMimeType::Ptr mimePtr = KMimeType::mimeType( item->mime() );
- QString mime = mimePtr->comment();
+ TQString mime = mimePtr->comment();
time_t tma = item->time();
struct tm* t=localtime((time_t *)&tma);
- QDateTime tmp(QDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), QTime(t->tm_hour, t->tm_min));
- QString date = KGlobal::locale()->formatDateTime(tmp);
+ TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min));
+ TQString date = KGlobal::locale()->formatDateTime(tmp);
- QString totalSize = KRpermHandler::parseSize( item->size() ) + " ";
- QString ownSize = KRpermHandler::parseSize( item->ownSize() ) + " ";
- QString percent = item->percent();
+ TQString totalSize = KRpermHandler::parseSize( item->size() ) + " ";
+ TQString ownSize = KRpermHandler::parseSize( item->ownSize() ) + " ";
+ TQString percent = item->percent();
- if( lastItem == 0 && parent == 0 )
+ if( lastItem == 0 && tqparent == 0 )
lastItem = new DUListViewItem( diskUsage, item, this, item->name(), percent, totalSize, ownSize,
mime, date, item->perm(), item->owner(), item->group() );
else if ( lastItem == 0 )
- lastItem = new DUListViewItem( diskUsage, item, parent, item->name(), percent, totalSize, ownSize,
+ lastItem = new DUListViewItem( diskUsage, item, tqparent, item->name(), percent, totalSize, ownSize,
mime, date, item->perm(), item->owner(), item->group() );
- else if ( parent == 0 )
+ else if ( tqparent == 0 )
lastItem = new DUListViewItem( diskUsage, item, this, lastItem, item->name(), percent, totalSize,
ownSize, mime, date, item->perm(), item->owner(), item->group() );
else
- lastItem = new DUListViewItem( diskUsage, item, parent, lastItem, item->name(), percent, totalSize,
+ lastItem = new DUListViewItem( diskUsage, item, tqparent, lastItem, item->name(), percent, totalSize,
ownSize, mime, date, item->perm(), item->owner(), item->group() );
if( item->isExcluded() )
@@ -160,7 +160,7 @@ void DUListView::addDirectory( Directory *dirEntry, QListViewItem *parent )
lastItem->setExpandable( true );
}
- QListViewItem *first = firstChild();
+ TQListViewItem *first = firstChild();
if( first )
setCurrentItem( first );
}
@@ -173,7 +173,7 @@ void DUListView::slotDirChanged( Directory *dirEntry )
File * DUListView::getCurrentFile()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if( item == 0 || item->text( 0 ) == ".." )
return 0;
@@ -204,7 +204,7 @@ void DUListView::slotDeleted( File * item )
delete duItem;
}
-void DUListView::slotRightClicked( QListViewItem *item )
+void DUListView::slotRightClicked( TQListViewItem *item )
{
File * file = 0;
@@ -214,7 +214,7 @@ void DUListView::slotRightClicked( QListViewItem *item )
diskUsage->rightClickMenu( file );
}
-bool DUListView::doubleClicked( QListViewItem * item )
+bool DUListView::doubleClicked( TQListViewItem * item )
{
if( item )
{
@@ -227,7 +227,7 @@ bool DUListView::doubleClicked( QListViewItem * item )
}
else
{
- Directory *upDir = (Directory *)diskUsage->getCurrentDir()->parent();
+ Directory *upDir = (Directory *)diskUsage->getCurrentDir()->tqparent();
if( upDir )
diskUsage->changeDirectory( upDir );
@@ -237,21 +237,21 @@ bool DUListView::doubleClicked( QListViewItem * item )
return false;
}
-void DUListView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void DUListView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
- if ( e || e->button() == LeftButton )
+ if ( e || e->button() == Qt::LeftButton )
{
- QPoint vp = contentsToViewport(e->pos());
- QListViewItem * item = itemAt( vp );
+ TQPoint vp = contentsToViewport(e->pos());
+ TQListViewItem * item = itemAt( vp );
if( doubleClicked( item ) )
return;
}
- QListView::contentsMouseDoubleClickEvent( e );
+ TQListView::contentsMouseDoubleClickEvent( e );
}
-void DUListView::keyPressEvent( QKeyEvent *e )
+void DUListView::keyPressEvent( TQKeyEvent *e )
{
switch ( e->key() )
{
@@ -274,10 +274,10 @@ void DUListView::keyPressEvent( QKeyEvent *e )
e->ignore();
return;
}
- QListView::keyPressEvent( e );
+ TQListView::keyPressEvent( e );
}
-void DUListView::slotExpanded( QListViewItem *item )
+void DUListView::slotExpanded( TQListViewItem *item )
{
if( item == 0 || item->text( 0 ) == ".." )
return;
diff --git a/krusader/DiskUsage/dulistview.h b/krusader/DiskUsage/dulistview.h
index 01ab59f..de3725a 100644
--- a/krusader/DiskUsage/dulistview.h
+++ b/krusader/DiskUsage/dulistview.h
@@ -31,43 +31,43 @@
#ifndef __DU_LISTVIEW_H__
#define __DU_LISTVIEW_H__
-#include <qlistview.h>
+#include <tqlistview.h>
#include "diskusage.h"
-class DUListViewItem : public QListViewItem
+class DUListViewItem : public TQListViewItem
{
public:
- DUListViewItem( DiskUsage *diskUsageIn, File *fileIn, QListView * parent, QString label1,
- QString label2, QString label3, QString label4, QString label5, QString label6,
- QString label7, QString label8, QString label9 )
- : QListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8),
+ DUListViewItem( DiskUsage *diskUsageIn, File *fileIn, TQListView * tqparent, TQString label1,
+ TQString label2, TQString label3, TQString label4, TQString label5, TQString label6,
+ TQString label7, TQString label8, TQString label9 )
+ : TQListViewItem( tqparent, label1, label2, label3, label4, label5, label6, label7, label8),
diskUsage( diskUsageIn ), file( fileIn )
{
setText( 8, label9 );
diskUsage->addProperty( file, "ListView-Ref", this );
}
- DUListViewItem( DiskUsage *diskUsageIn, File *fileIn, QListViewItem * parent, QString label1,
- QString label2, QString label3, QString label4, QString label5, QString label6,
- QString label7, QString label8, QString label9 )
- : QListViewItem( parent, label1, label2, label3, label4, label5, label6, label7, label8),
+ DUListViewItem( DiskUsage *diskUsageIn, File *fileIn, TQListViewItem * tqparent, TQString label1,
+ TQString label2, TQString label3, TQString label4, TQString label5, TQString label6,
+ TQString label7, TQString label8, TQString label9 )
+ : TQListViewItem( tqparent, label1, label2, label3, label4, label5, label6, label7, label8),
diskUsage( diskUsageIn ), file( fileIn )
{
setText( 8, label9 );
diskUsage->addProperty( file, "ListView-Ref", this );
}
- DUListViewItem( DiskUsage *diskUsageIn, File *fileIn, QListView * parent, QListViewItem * after,
- QString label1, QString label2, QString label3, QString label4, QString label5,
- QString label6, QString label7, QString label8, QString label9 )
- : QListViewItem( parent, after, label1, label2, label3, label4, label5, label6, label7, label8),
+ DUListViewItem( DiskUsage *diskUsageIn, File *fileIn, TQListView * tqparent, TQListViewItem * after,
+ TQString label1, TQString label2, TQString label3, TQString label4, TQString label5,
+ TQString label6, TQString label7, TQString label8, TQString label9 )
+ : TQListViewItem( tqparent, after, label1, label2, label3, label4, label5, label6, label7, label8),
diskUsage( diskUsageIn ), file( fileIn )
{
setText( 8, label9 );
diskUsage->addProperty( file, "ListView-Ref", this );
}
- DUListViewItem( DiskUsage *diskUsageIn, File *fileIn, QListViewItem * parent, QListViewItem * after,
- QString label1, QString label2, QString label3, QString label4, QString label5,
- QString label6, QString label7, QString label8, QString label9 )
- : QListViewItem( parent, after, label1, label2, label3, label4, label5, label6, label7, label8),
+ DUListViewItem( DiskUsage *diskUsageIn, File *fileIn, TQListViewItem * tqparent, TQListViewItem * after,
+ TQString label1, TQString label2, TQString label3, TQString label4, TQString label5,
+ TQString label6, TQString label7, TQString label8, TQString label9 )
+ : TQListViewItem( tqparent, after, label1, label2, label3, label4, label5, label6, label7, label8),
diskUsage( diskUsageIn ), file( fileIn )
{
setText( 8, label9 );
@@ -78,14 +78,14 @@ public:
diskUsage->removeProperty( file, "ListView-Ref" );
}
- virtual int compare ( QListViewItem * i, int col, bool ascending ) const
+ virtual int compare ( TQListViewItem * i, int col, bool ascending ) const
{
if( text(0) == ".." ) return ascending ? -1 : 1;
if( i->text(0) == "..") return ascending ? 1 : -1;
DUListViewItem *compWith = dynamic_cast< DUListViewItem * >( i );
- QString buf1,buf2;
+ TQString buf1,buf2;
switch( col )
{
@@ -93,15 +93,15 @@ public:
case 2:
buf1.sprintf("%025llu",file->size());
buf2.sprintf("%025llu",compWith->file->size());
- return -QString::compare( buf1, buf2 );
+ return -TQString::compare( buf1, buf2 );
case 3:
buf1.sprintf("%025llu",file->ownSize());
buf2.sprintf("%025llu",compWith->file->ownSize());
- return -QString::compare( buf1, buf2 );
+ return -TQString::compare( buf1, buf2 );
case 5:
- return QListViewItem::compare( i, col, !ascending );
+ return TQListViewItem::compare( i, col, !ascending );
default:
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
}
}
@@ -112,9 +112,10 @@ private:
File *file;
};
-class DUListView : public QListView
+class DUListView : public TQListView
{
Q_OBJECT
+ TQ_OBJECT
public:
DUListView( DiskUsage *usage, const char *name );
@@ -126,18 +127,18 @@ public slots:
void slotDirChanged( Directory * );
void slotChanged( File * );
void slotDeleted( File * );
- void slotRightClicked(QListViewItem *);
- void slotExpanded( QListViewItem * );
+ void slotRightClicked(TQListViewItem *);
+ void slotExpanded( TQListViewItem * );
protected:
DiskUsage *diskUsage;
- virtual void contentsMouseDoubleClickEvent ( QMouseEvent * e );
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void contentsMouseDoubleClickEvent ( TQMouseEvent * e );
+ virtual void keyPressEvent( TQKeyEvent *e );
private:
- void addDirectory( Directory *dirEntry, QListViewItem *parent );
- bool doubleClicked( QListViewItem * item );
+ void addDirectory( Directory *dirEntry, TQListViewItem *tqparent );
+ bool doubleClicked( TQListViewItem * item );
};
#endif /* __DU_LISTVIEW_H__ */
diff --git a/krusader/DiskUsage/filelightParts/Config.cpp b/krusader/DiskUsage/filelightParts/Config.cpp
index 777ec68..dc632c1 100644
--- a/krusader/DiskUsage/filelightParts/Config.cpp
+++ b/krusader/DiskUsage/filelightParts/Config.cpp
@@ -30,7 +30,7 @@ Filelight::Config::read()
showSmallFiles = config.readBoolEntry( "showSmallFiles", false );
contrast = config.readNumEntry( "contrast", 50 );
antiAliasFactor = config.readNumEntry( "antiAliasFactor", 2 );
- minFontPitch = config.readNumEntry( "minFontPitch", QFont().pointSize() - 3);
+ minFontPitch = config.readNumEntry( "minFontPitch", TQFont().pointSize() - 3);
scheme = (MapScheme) config.readNumEntry( "scheme", 0 );
defaultRingDepth = 4;
diff --git a/krusader/DiskUsage/filelightParts/Config.h b/krusader/DiskUsage/filelightParts/Config.h
index a0491b6..405281b 100644
--- a/krusader/DiskUsage/filelightParts/Config.h
+++ b/krusader/DiskUsage/filelightParts/Config.h
@@ -2,7 +2,7 @@
#ifndef Config_H
#define Config_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KConfig;
diff --git a/krusader/DiskUsage/filelightParts/fileTree.cpp b/krusader/DiskUsage/filelightParts/fileTree.cpp
index b9409c3..b5136f8 100644
--- a/krusader/DiskUsage/filelightParts/fileTree.cpp
+++ b/krusader/DiskUsage/filelightParts/fileTree.cpp
@@ -4,22 +4,22 @@
#include "fileTree.h"
#include <kglobal.h>
#include <klocale.h>
-#include <qstring.h>
+#include <tqstring.h>
//static definitions
const FileSize File::DENOMINATOR[4] = { 1ull, 1ull<<10, 1ull<<20, 1ull<<30 };
const char File::PREFIX[5][2] = { "", "K", "M", "G", "T" };
-QString
+TQString
File::fullPath( const Directory *root /*= 0*/ ) const
{
- QString path;
+ TQString path;
if( root == this ) root = 0; //prevent returning empty string when there is something we could return
const File *d;
- for( d = this; d != root && d && d->parent() != 0; d = d->parent() )
+ for( d = this; d != root && d && d->tqparent() != 0; d = d->tqparent() )
{
if( !path.isEmpty() )
path = "/" + path;
@@ -29,8 +29,8 @@ File::fullPath( const Directory *root /*= 0*/ ) const
if( d )
{
- while( d->parent() )
- d = d->parent();
+ while( d->tqparent() )
+ d = d->tqparent();
if( d->directory().endsWith( "/" ) )
return d->directory() + path;
@@ -41,16 +41,16 @@ File::fullPath( const Directory *root /*= 0*/ ) const
return path;
}
-QString
+TQString
File::humanReadableSize( UnitPrefix key /*= mega*/ ) const //FIXME inline
{
return humanReadableSize( m_size, key );
}
-QString
+TQString
File::humanReadableSize( FileSize size, UnitPrefix key /*= mega*/ ) //static
{
- QString s;
+ TQString s;
double prettySize = (double)size / (double)DENOMINATOR[key];
const KLocale &locale = *KGlobal::locale();
diff --git a/krusader/DiskUsage/filelightParts/fileTree.h b/krusader/DiskUsage/filelightParts/fileTree.h
index f4d98b6..eebb6cd 100644
--- a/krusader/DiskUsage/filelightParts/fileTree.h
+++ b/krusader/DiskUsage/filelightParts/fileTree.h
@@ -153,66 +153,66 @@ private:
class Directory;
-class QString;
+class TQString;
class KURL;
class File
{
protected:
Directory *m_parent; //0 if this is treeRoot
- QString m_name; //< file name
- QString m_directory;//< the directory of the file
+ TQString m_name; //< file name
+ TQString m_directory;//< the directory of the file
FileSize m_size; //< size with subdirectories
FileSize m_ownSize; //< size without subdirectories
mode_t m_mode; //< file mode
- QString m_owner; //< file owner name
- QString m_group; //< file group name
- QString m_perm; //< file permissions string
+ TQString m_owner; //< file owner name
+ TQString m_group; //< file group name
+ TQString m_perm; //< file permissions string
time_t m_time; //< file modification in time_t format
bool m_symLink; //< true if the file is a symlink
- QString m_mimeType; //< file mimetype
+ TQString m_mimeType; //< file mimetype
bool m_excluded; //< flag if the file is excluded from du
int m_percent; //< percent flag
public:
- File( Directory *parentIn, const QString &nameIn, const QString &dir, FileSize sizeIn, mode_t modeIn,
- const QString &ownerIn, const QString &groupIn, const QString &permIn, time_t timeIn, bool symLinkIn,
- const QString &mimeTypeIn )
- : m_parent( parentIn ), m_name( nameIn ), m_directory( dir ), m_size( sizeIn ), m_ownSize( sizeIn ), m_mode( modeIn ),
+ File( Directory *tqparentIn, const TQString &nameIn, const TQString &dir, FileSize sizeIn, mode_t modeIn,
+ const TQString &ownerIn, const TQString &groupIn, const TQString &permIn, time_t timeIn, bool symLinkIn,
+ const TQString &mimeTypeIn )
+ : m_parent( tqparentIn ), m_name( nameIn ), m_directory( dir ), m_size( sizeIn ), m_ownSize( sizeIn ), m_mode( modeIn ),
m_owner( ownerIn ), m_group( groupIn ), m_perm( permIn ), m_time( timeIn ), m_symLink( symLinkIn ),
m_mimeType( mimeTypeIn ), m_excluded( false ), m_percent( -1 ) {}
- File( const QString &nameIn, FileSize sizeIn )
- : m_parent( 0 ), m_name( nameIn ), m_directory( QString::null ), m_size( sizeIn ), m_ownSize( sizeIn ), m_mode( 0 ),
- m_owner( QString::null ), m_group( QString::null ), m_perm( QString::null ), m_time( -1 ),
- m_symLink( false ), m_mimeType( QString::null ), m_excluded( false ), m_percent( -1 )
+ File( const TQString &nameIn, FileSize sizeIn )
+ : m_parent( 0 ), m_name( nameIn ), m_directory( TQString() ), m_size( sizeIn ), m_ownSize( sizeIn ), m_mode( 0 ),
+ m_owner( TQString() ), m_group( TQString() ), m_perm( TQString() ), m_time( -1 ),
+ m_symLink( false ), m_mimeType( TQString() ), m_excluded( false ), m_percent( -1 )
{
}
virtual ~File() {}
- inline const QString & name() const {return m_name;}
- inline const QString & directory() const {return m_directory;}
+ inline const TQString & name() const {return m_name;}
+ inline const TQString & directory() const {return m_directory;}
inline const FileSize size() const {return m_excluded ? 0 : m_size;}
inline const FileSize ownSize() const {return m_excluded ? 0 : m_ownSize;}
inline const mode_t mode() const {return m_mode;}
- inline const QString & owner() const {return m_owner;}
- inline const QString & group() const {return m_group;}
- inline const QString & perm() const {return m_perm;}
+ inline const TQString & owner() const {return m_owner;}
+ inline const TQString & group() const {return m_group;}
+ inline const TQString & perm() const {return m_perm;}
inline const time_t time() const {return m_time;}
- inline const QString & mime() const {return m_mimeType;}
+ inline const TQString & mime() const {return m_mimeType;}
inline const bool isSymLink() const {return m_symLink;}
virtual const bool isDir() const {return false;}
inline const bool isExcluded() const {return m_excluded;}
inline void exclude( bool flag ) {m_excluded = flag;}
inline const int intPercent() const {return m_percent;}
- inline const QString percent() const {if( m_percent < 0 )
+ inline const TQString percent() const {if( m_percent < 0 )
return "INV";
- QString buf;
+ TQString buf;
buf.sprintf( "%d.%02d%%", m_percent / 100, m_percent % 100 );
return buf;}
inline void setPercent( int p ) {m_percent = p;}
- inline const Directory* parent() const {return m_parent;}
+ inline const Directory* tqparent() const {return m_parent;}
inline void setSizes( KIO::filesize_t totalSize, KIO::filesize_t ownSize )
{
@@ -225,10 +225,10 @@ public:
static const FileSize DENOMINATOR[4];
static const char PREFIX[5][2];
- QString fullPath( const Directory* = 0 ) const;
- QString humanReadableSize( UnitPrefix key = mega ) const;
+ TQString fullPath( const Directory* = 0 ) const;
+ TQString humanReadableSize( UnitPrefix key = mega ) const;
- static QString humanReadableSize( FileSize size, UnitPrefix Key = mega );
+ static TQString humanReadableSize( FileSize size, UnitPrefix Key = mega );
friend class Directory;
};
@@ -238,14 +238,14 @@ public:
class Directory : public Chain<File>, public File
{
public:
- Directory( Directory *parentIn, const QString &nameIn, const QString &dir, FileSize sizeIn, mode_t modeIn,
- const QString &ownerIn, const QString &groupIn, const QString &permIn, time_t timeIn, bool symLinkIn,
- const QString &mimeTypeIn )
- : File( parentIn, nameIn, dir, sizeIn, modeIn, ownerIn, groupIn, permIn, timeIn, symLinkIn, mimeTypeIn ),
+ Directory( Directory *tqparentIn, const TQString &nameIn, const TQString &dir, FileSize sizeIn, mode_t modeIn,
+ const TQString &ownerIn, const TQString &groupIn, const TQString &permIn, time_t timeIn, bool symLinkIn,
+ const TQString &mimeTypeIn )
+ : File( tqparentIn, nameIn, dir, sizeIn, modeIn, ownerIn, groupIn, permIn, timeIn, symLinkIn, mimeTypeIn ),
m_fileCount( 0 )
{}
- Directory( const QString &name, QString url ) : File( name, 0 ), m_fileCount( 0 )
+ Directory( const TQString &name, TQString url ) : File( name, 0 ), m_fileCount( 0 )
{
m_directory = url;
}
@@ -257,11 +257,11 @@ public:
{
++m_fileCount;
- Directory *parent = m_parent;
- while( parent )
+ Directory *tqparent = m_parent;
+ while( tqparent )
{
- parent->m_fileCount++;
- parent = parent->m_parent;
+ tqparent->m_fileCount++;
+ tqparent = tqparent->m_parent;
}
Chain<File>::append( p );
@@ -275,11 +275,11 @@ public:
{
--m_fileCount;
- Directory *parent = m_parent;
- while( parent )
+ Directory *tqparent = m_parent;
+ while( tqparent )
{
- parent->m_fileCount--;
- parent = parent->m_parent;
+ tqparent->m_fileCount--;
+ tqparent = tqparent->m_parent;
}
it.remove();
diff --git a/krusader/DiskUsage/radialMap/builder.cpp b/krusader/DiskUsage/radialMap/builder.cpp
index 5a827af..b31aed0 100644
--- a/krusader/DiskUsage/radialMap/builder.cpp
+++ b/krusader/DiskUsage/radialMap/builder.cpp
@@ -40,7 +40,7 @@ RadialMap::Builder::Builder( RadialMap::Map *m, const Directory* const d, bool f
void
RadialMap::Builder::findVisibleDepth( const Directory* const dir, const unsigned int depth )
{
- //**** because I don't use the same minimumSize criteria as in the visual function
+ //**** because I don't use the same tqminimumSize criteria as in the visual function
// this can lead to incorrect visual representation
//**** BUT, you can't set those limits until you know m_depth!
@@ -131,7 +131,7 @@ RadialMap::Builder::build( const Directory* const dir, const unsigned int depth,
{
//append a segment for unrepresented space - a "fake" segment
- const QString s = i18n( "%1 files: ~ %2" ).arg( KGlobal::locale()->formatNumber( hiddenFileCount, 0 ) ).arg( File::humanReadableSize( hiddenSize/hiddenFileCount ) );
+ const TQString s = i18n( "%1 files: ~ %2" ).tqarg( KGlobal::locale()->formatNumber( hiddenFileCount, 0 ) ).tqarg( File::humanReadableSize( hiddenSize/hiddenFileCount ) );
(m_signature + depth)->append( new Segment( new File( s, hiddenSize ), a_start, a_end - a_start, true ) );
}
diff --git a/krusader/DiskUsage/radialMap/labels.cpp b/krusader/DiskUsage/radialMap/labels.cpp
index 5ba77ac..90c0ab8 100644
--- a/krusader/DiskUsage/radialMap/labels.cpp
+++ b/krusader/DiskUsage/radialMap/labels.cpp
@@ -2,10 +2,10 @@
//Copyright: See COPYING file that comes with this distribution
#include <kstringhandler.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qpainter.h>
-#include <qptrlist.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
+#include <tqptrlist.h>
#include "Config.h"
#include "fileTree.h"
@@ -30,13 +30,13 @@ namespace RadialMap
int x1, y1, x2, y2, x3;
int tx, ty;
- QString qs;
+ TQString qs;
};
- class LabelList : public QPtrList<Label>
+ class LabelList : public TQPtrList<Label>
{
protected:
- int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 )
+ int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 )
{
//you add 1440 to work round the fact that later you want the circle split vertically
//and as it is you start at 3 o' clock. It's to do with rightPrevY, stops annoying bug
@@ -60,12 +60,12 @@ namespace RadialMap
void
-RadialMap::Widget::paintExplodedLabels( QPainter &paint ) const
+RadialMap::Widget::paintExplodedLabels( TQPainter &paint ) const
{
//we are a friend of RadialMap::Map
LabelList list; list.setAutoDelete( true );
- QPtrListIterator<Label> it( list );
+ TQPtrListIterator<Label> it( list );
unsigned int startLevel = 0;
@@ -81,7 +81,7 @@ RadialMap::Widget::paintExplodedLabels( QPainter &paint ) const
p != m_tree;
++startLevel ) //startLevel is the level above whatever m_focus is in
{
- p = p->parent();
+ p = p->tqparent();
}
//range=2 means 2 levels to draw labels for
@@ -126,7 +126,7 @@ RadialMap::Widget::paintExplodedLabels( QPainter &paint ) const
// if so, remove the least significant labels
it.toFirst();
- QPtrListIterator<Label> jt( it );
+ TQPtrListIterator<Label> jt( it );
++jt;
while( jt ) //**** no need to check _it_ as jt will be NULL if _it_ was too
@@ -211,13 +211,13 @@ RadialMap::Widget::paintExplodedLabels( QPainter &paint ) const
bool rightSide;
- QFont font;
+ TQFont font;
for( it.toFirst(); it != 0; ++it )
{
- //** bear in mind that text is drawn with QPoint param as BOTTOM left corner of text box
+ //** bear in mind that text is drawn with TQPoint param as BOTTOM left corner of text box
if( varySizes ) font.setPointSize( sizes[(*it)->lvl] );
- QFontMetrics fm( font );
+ TQFontMetrics fm( font );
int fmh = fm.height(); //used to ensure label texts don't overlap
int fmhD4 = fmh / 4;
@@ -251,7 +251,7 @@ RadialMap::Widget::paintExplodedLabels( QPainter &paint ) const
x2 = x1 - int(double(y2 - y1) / tan( ra ));
ty = y2 + fmhD4;
- QString qs;
+ TQString qs;
if( rightSide ) {
if( x2 > width() || ty < fmh || x2 < x1 )
@@ -319,15 +319,15 @@ RadialMap::Widget::paintExplodedLabels( QPainter &paint ) const
//5. Render labels
- paint.setPen( QPen( Qt::black, 1 ) );
+ paint.setPen( TQPen( TQt::black, 1 ) );
for( it.toFirst(); it != 0; ++it )
{
if( varySizes )
{
- //**** how much overhead in making new QFont each time?
+ //**** how much overhead in making new TQFont each time?
// (implicate sharing remember)
- QFont font = paint.font();
+ TQFont font = paint.font();
font.setPointSize( sizes[(*it)->lvl] );
paint.setFont( font );
}
diff --git a/krusader/DiskUsage/radialMap/map.cpp b/krusader/DiskUsage/radialMap/map.cpp
index 1a2899f..93a45c5 100644
--- a/krusader/DiskUsage/radialMap/map.cpp
+++ b/krusader/DiskUsage/radialMap/map.cpp
@@ -4,11 +4,11 @@
#include <kcursor.h> //make()
#include <kglobalsettings.h> //kdeColours
#include <kimageeffect.h> //desaturate()
-#include <qapplication.h> //make()
-#include <qimage.h> //make() & paint()
-#include <qfont.h> //ctor
-#include <qfontmetrics.h> //ctor
-#include <qpainter.h>
+#include <tqapplication.h> //make()
+#include <tqimage.h> //make() & paint()
+#include <tqfont.h> //ctor
+#include <tqfontmetrics.h> //ctor
+#include <tqpainter.h>
#include "builder.h"
#include "Config.h"
@@ -16,7 +16,7 @@
#include "sincos.h"
#include "widget.h"
-#define COLOR_GREY QColor( 0, 0, 140, QColor::Hsv )
+#define COLOR_GREY TQColor( 0, 0, 140, TQColor::Hsv )
RadialMap::Map::Map()
@@ -26,7 +26,7 @@ RadialMap::Map::Map()
, m_visibleDepth( DEFAULT_RING_DEPTH )
{
//FIXME this is all broken. No longer is a maximum depth!
- const int fmh = QFontMetrics( QFont() ).height();
+ const int fmh = TQFontMetrics( TQFont() ).height();
const int fmhD4 = fmh / 4;
MAP_2MARGIN = 2 * ( fmh - (fmhD4 - LABEL_MAP_SPACER) ); //margin is dependent on fitting in labels at top and bottom
}
@@ -37,14 +37,14 @@ RadialMap::Map::~Map()
}
void
-RadialMap::Map::invalidate( const bool desaturateTheImage )
+RadialMap::Map::tqinvalidate( const bool desaturateTheImage )
{
delete [] m_signature;
m_signature = 0;
if( desaturateTheImage )
{
- QImage img = this->convertToImage();
+ TQImage img = this->convertToImage();
KImageEffect::desaturate( img, 0.7 );
KImageEffect::toGray( img, true );
@@ -63,7 +63,7 @@ RadialMap::Map::make( const Directory *tree, bool refresh )
// even if it makes it a lie?
//slow operation so set the wait cursor
- QApplication::setOverrideCursor( KCursor::waitCursor() );
+ TQApplication::setOverrideCursor( KCursor::waitCursor() );
{
//build a signature of visible components
@@ -89,7 +89,7 @@ RadialMap::Map::make( const Directory *tree, bool refresh )
//paint the pixmap
aaPaint();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
void
@@ -102,7 +102,7 @@ RadialMap::Map::setRingBreadth()
}
bool
-RadialMap::Map::resize( const QRect &rect )
+RadialMap::Map::resize( const TQRect &rect )
{
//there's a MAP_2MARGIN border
@@ -124,7 +124,7 @@ RadialMap::Map::resize( const QRect &rect )
if( size < minSize ) size = minSize;
- //this QRect is used by paint()
+ //this TQRect is used by paint()
m_rect.setRect( mD2, mD2, size, size );
}
@@ -153,12 +153,12 @@ RadialMap::Map::resize( const QRect &rect )
void
RadialMap::Map::colorise()
{
- QColor cp, cb;
+ TQColor cp, cb;
double darkness = 1;
double contrast = (double)Config::contrast / (double)100;
int h, s1, s2, v1, v2;
- QColor kdeColour[2] = { KGlobalSettings::inactiveTitleColor(), KGlobalSettings::activeTitleColor() };
+ TQColor kdeColour[2] = { KGlobalSettings::inactiveTitleColor(), KGlobalSettings::activeTitleColor() };
double deltaRed = (double)(kdeColour[0].red() - kdeColour[1].red()) / 2880; //2880 for semicircle
double deltaGreen = (double)(kdeColour[0].green() - kdeColour[1].green()) / 2880;
@@ -173,7 +173,7 @@ RadialMap::Map::colorise()
case 2000: //HACK for summary view
if( (*it)->file()->name() == "Used" ) {
- cb = QApplication::palette().active().color( QColorGroup::Highlight );
+ cb = TQApplication::tqpalette().active().color( TQColorGroup::Highlight );
cb.hsv( &h, &s1, &v1 );
if( s1 > 80 )
@@ -186,8 +186,8 @@ RadialMap::Map::colorise()
cp.setHsv( h, s2, v2 );
}
else {
- cp = Qt::gray;
- cb = Qt::white;
+ cp = TQt::gray;
+ cb = TQt::white;
}
(*it)->setPalette( cp, cb );
@@ -251,7 +251,7 @@ RadialMap::Map::colorise()
//**** may be better to store KDE colours as H and S and vary V as others
//**** perhaps make saturation difference for s2 dependent on contrast too
//**** fake segments don't work with highContrast
- //**** may work better with cp = cb rather than Qt::white
+ //**** may work better with cp = cb rather than TQt::white
//**** you have to ensure the grey of files is sufficient, currently it works only with rainbow (perhaps use contrast there too)
//**** change v1,v2 to vp, vb etc.
//**** using percentages is not strictly correct as the eye doesn't work like that
@@ -265,9 +265,9 @@ RadialMap::Map::aaPaint()
{
//paint() is called during continuous processes
//aaPaint() is not and is slower so set overidecursor (make sets it too)
- QApplication::setOverrideCursor( KCursor::waitCursor() );
+ TQApplication::setOverrideCursor( KCursor::waitCursor() );
paint( Config::antiAliasFactor );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
void
@@ -276,8 +276,8 @@ RadialMap::Map::paint( unsigned int scaleFactor )
if( scaleFactor == 0 ) //just in case
scaleFactor = 1;
- QPainter paint;
- QRect rect = m_rect;
+ TQPainter paint;
+ TQRect rect = m_rect;
int step = m_ringBreadth;
int excess = -1;
@@ -324,8 +324,8 @@ RadialMap::Map::paint( unsigned int scaleFactor )
if( (*it)->hasHiddenChildren() )
{
//draw arrow head to indicate undisplayed files/directories
- QPointArray pts( 3 );
- QPoint pos, cpos = rect.center();
+ TQPointArray pts( 3 );
+ TQPoint pos, cpos = rect.center();
int a[3] = { (*it)->start(), (*it)->length(), 0 };
a[2] = a[0] + (a[1] / 2); //assign to halfway between
@@ -363,11 +363,11 @@ RadialMap::Map::paint( unsigned int scaleFactor )
{
//**** code is bloated!
paint.save();
- QPen pen = paint.pen();
+ TQPen pen = paint.pen();
int width = 2 * scaleFactor;
pen.setWidth( width );
paint.setPen( pen );
- QRect rect2 = rect;
+ TQRect rect2 = rect;
width /= 2;
rect2.addCoords( width, width, -width, -width );
paint.drawArc( rect2, (*it)->start(), (*it)->length() );
@@ -387,7 +387,7 @@ RadialMap::Map::paint( unsigned int scaleFactor )
// if( excess > 0 ) rect.addCoords( excess, excess, 0, 0 ); //ugly
paint.setPen( COLOR_GREY );
- paint.setBrush( Qt::white );
+ paint.setBrush( TQt::white );
paint.drawEllipse( rect );
if( scaleFactor > 1 )
@@ -403,16 +403,16 @@ RadialMap::Map::paint( unsigned int scaleFactor )
y2 /= scaleFactor;
rect.setCoords( x1, y1, x2, y2 );
- QImage img = this->convertToImage();
+ TQImage img = this->convertToImage();
img = img.smoothScale( this->size() / (int)scaleFactor );
this->convertFromImage( img );
paint.begin( this );
paint.setPen( COLOR_GREY );
- paint.setBrush( Qt::white );
+ paint.setBrush( TQt::white );
}
- paint.drawText( rect, Qt::AlignCenter, m_centerText );
+ paint.drawText( rect, TQt::AlignCenter, m_centerText );
m_innerRadius = rect.width() / 2; //rect.width should be multiple of 2
diff --git a/krusader/DiskUsage/radialMap/radialMap.h b/krusader/DiskUsage/radialMap/radialMap.h
index 81959b8..c5edf65 100644
--- a/krusader/DiskUsage/radialMap/radialMap.h
+++ b/krusader/DiskUsage/radialMap/radialMap.h
@@ -4,7 +4,7 @@
#ifndef RADIALMAP_H
#define RADIALMAP_H
-#include <qcolor.h>
+#include <tqcolor.h>
class File;
@@ -26,8 +26,8 @@ namespace RadialMap
uint length() const { return m_angleSegment; }
uint end() const { return m_angleStart + m_angleSegment; }
const File *file() const { return m_file; }
- const QColor& pen() const { return m_pen; }
- const QColor& brush() const { return m_brush; }
+ const TQColor& pen() const { return m_pen; }
+ const TQColor& brush() const { return m_brush; }
bool isFake() const { return m_fake; }
bool hasHiddenChildren() const { return m_hasHiddenChildren; }
@@ -38,11 +38,11 @@ namespace RadialMap
friend class Builder;
private:
- void setPalette( const QColor &p, const QColor &b ) { m_pen = p; m_brush = b; }
+ void setPalette( const TQColor &p, const TQColor &b ) { m_pen = p; m_brush = b; }
const uint m_angleStart, m_angleSegment;
const File* const m_file;
- QColor m_pen, m_brush;
+ TQColor m_pen, m_brush;
bool m_hasHiddenChildren;
const bool m_fake;
};
diff --git a/krusader/DiskUsage/radialMap/segmentTip.cpp b/krusader/DiskUsage/radialMap/segmentTip.cpp
index a3ce1b0..3af47e4 100644
--- a/krusader/DiskUsage/radialMap/segmentTip.cpp
+++ b/krusader/DiskUsage/radialMap/segmentTip.cpp
@@ -9,22 +9,22 @@
#include <kglobalsettings.h>
#include <klocale.h>
#include <kpixmapeffect.h>
-#include <qpainter.h>
-#include <qtooltip.h> //for its palette
+#include <tqpainter.h>
+#include <tqtooltip.h> //for its palette
namespace RadialMap {
SegmentTip::SegmentTip( uint h )
- : QWidget( 0, 0, WNoAutoErase | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop | WX11BypassWM )
+ : TQWidget( 0, 0, WNoAutoErase | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop | WX11BypassWM )
, m_cursorHeight( -h )
{
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
}
void
-SegmentTip::moveto( QPoint p, const QWidget &canvas, bool placeAbove )
+SegmentTip::moveto( TQPoint p, const TQWidget &canvas, bool placeAbove )
{
//**** this function is very slow and seems to be visibly influenced by operations like mapFromGlobal() (who knows why!)
// ** so any improvements are much desired
@@ -33,7 +33,7 @@ SegmentTip::moveto( QPoint p, const QWidget &canvas, bool placeAbove )
p.rx() -= rect().center().x();
p.ry() -= (placeAbove ? 8 + height() : m_cursorHeight - 8);
- const QRect screen = KGlobalSettings::desktopGeometry( parentWidget() );
+ const TQRect screen = KGlobalSettings::desktopGeometry( tqparentWidget() );
const int x = p.x();
const int y = p.y();
@@ -48,25 +48,25 @@ SegmentTip::moveto( QPoint p, const QWidget &canvas, bool placeAbove )
if( y2 > sh ) p.ry() -= y2 - sh;
- //I'm using this QPoint to determine where to offset the bitBlt in m_pixmap
- QPoint offset = canvas.mapToGlobal( QPoint() ) - p;
+ //I'm using this TQPoint to determine where to offset the bitBlt in m_pixmap
+ TQPoint offset = canvas.mapToGlobal( TQPoint() ) - p;
if( offset.x() < 0 ) offset.setX( 0 );
if( offset.y() < 0 ) offset.setY( 0 );
- const QRect alphaMaskRect( canvas.mapFromGlobal( p ), size() );
- const QRect intersection( alphaMaskRect.intersect( canvas.rect() ) );
+ const TQRect alphaMaskRect( canvas.mapFromGlobal( p ), size() );
+ const TQRect intersection( alphaMaskRect.intersect( canvas.rect() ) );
m_pixmap.resize( size() ); //move to updateTip once you are sure it can never be null
- bitBlt( &m_pixmap, offset, &canvas, intersection, Qt::CopyROP );
+ bitBlt( &m_pixmap, offset, &canvas, intersection, TQt::CopyROP );
- QPainter paint( &m_pixmap );
- paint.setPen( Qt::black );
- paint.setBrush( Qt::NoBrush );
+ TQPainter paint( &m_pixmap );
+ paint.setPen( TQt::black );
+ paint.setBrush( TQt::NoBrush );
paint.drawRect( rect() );
paint.end();
- m_pixmap = KPixmapEffect::fade( m_pixmap, 0.6, QToolTip::palette().color( QPalette::Active, QColorGroup::Background ) );
+ m_pixmap = KPixmapEffect::fade( m_pixmap, 0.6, TQToolTip::palette().color( TQPalette::Active, TQColorGroup::Background ) );
paint.begin( &m_pixmap );
paint.drawText( rect(), AlignCenter, m_text );
@@ -82,15 +82,15 @@ SegmentTip::moveto( QPoint p, const QWidget &canvas, bool placeAbove )
void
SegmentTip::updateTip( const File* const file, const Directory* const root )
{
- const QString s1 = file->fullPath( root );
- QString s2 = file->humanReadableSize();
+ const TQString s1 = file->fullPath( root );
+ TQString s2 = file->humanReadableSize();
KLocale *loc = KGlobal::locale();
const uint MARGIN = 3;
const uint pc = 100 * file->size() / root->size();
uint maxw = 0;
uint h = fontMetrics().height()*2 + 2*MARGIN;
- if( pc > 0 ) s2 += QString( " (%1%)" ).arg( loc->formatNumber( pc, 0 ) );
+ if( pc > 0 ) s2 += TQString( " (%1%)" ).tqarg( loc->formatNumber( pc, 0 ) );
m_text = s1;
m_text += '\n';
@@ -100,9 +100,9 @@ SegmentTip::updateTip( const File* const file, const Directory* const root )
{
double files = static_cast<const Directory*>(file)->fileCount();
const uint pc = uint((100 * files) / (double)root->fileCount());
- QString s3 = i18n( "Files: %1" ).arg( loc->formatNumber( files, 0 ) );
+ TQString s3 = i18n( "Files: %1" ).tqarg( loc->formatNumber( files, 0 ) );
- if( pc > 0 ) s3 += QString( " (%1%)" ).arg( loc->formatNumber( pc, 0 ) );
+ if( pc > 0 ) s3 += TQString( " (%1%)" ).tqarg( loc->formatNumber( pc, 0 ) );
maxw = fontMetrics().width( s3 );
h += fontMetrics().height();
@@ -118,19 +118,19 @@ SegmentTip::updateTip( const File* const file, const Directory* const root )
}
bool
-SegmentTip::event( QEvent *e )
+SegmentTip::event( TQEvent *e )
{
switch( e->type() )
{
- case QEvent::Show:
+ case TQEvent::Show:
kapp->installEventFilter( this );
break;
- case QEvent::Hide:
+ case TQEvent::Hide:
kapp->removeEventFilter( this );
break;
- case QEvent::Paint:
+ case TQEvent::Paint:
{
- //QPainter( this ).drawPixmap( 0, 0, m_pixmap );
+ //TQPainter( this ).drawPixmap( 0, 0, m_pixmap );
bitBlt( this, 0, 0, &m_pixmap );
return true;
}
@@ -138,22 +138,22 @@ SegmentTip::event( QEvent *e )
;
}
- return false/*QWidget::event( e )*/;
+ return false/*TQWidget::event( e )*/;
}
bool
-SegmentTip::eventFilter( QObject*, QEvent *e )
+SegmentTip::eventFilter( TQObject*, TQEvent *e )
{
switch ( e->type() )
{
- case QEvent::Leave:
-// case QEvent::MouseButtonPress:
-// case QEvent::MouseButtonRelease:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- case QEvent::FocusIn:
- case QEvent::FocusOut:
- case QEvent::Wheel:
+ case TQEvent::Leave:
+// case TQEvent::MouseButtonPress:
+// case TQEvent::MouseButtonRelease:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::FocusIn:
+ case TQEvent::FocusOut:
+ case TQEvent::Wheel:
hide(); //FALL THROUGH
default:
return false; //allow this event to passed to target
diff --git a/krusader/DiskUsage/radialMap/segmentTip.h b/krusader/DiskUsage/radialMap/segmentTip.h
index 648e083..7f279cb 100644
--- a/krusader/DiskUsage/radialMap/segmentTip.h
+++ b/krusader/DiskUsage/radialMap/segmentTip.h
@@ -5,28 +5,28 @@
#define SEGMENTTIP_H
#include <kpixmap.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class File;
class Directory;
namespace RadialMap
{
- class SegmentTip : public QWidget
+ class SegmentTip : public TQWidget
{
public:
SegmentTip( uint );
void updateTip( const File*, const Directory* );
- void moveto( QPoint, const QWidget&, bool );
+ void moveto( TQPoint, const TQWidget&, bool );
private:
- virtual bool eventFilter( QObject*, QEvent* );
- virtual bool event( QEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
+ virtual bool event( TQEvent* );
uint m_cursorHeight;
KPixmap m_pixmap;
- QString m_text;
+ TQString m_text;
};
}
diff --git a/krusader/DiskUsage/radialMap/widget.cpp b/krusader/DiskUsage/radialMap/widget.cpp
index 3d54c2d..483d1f0 100644
--- a/krusader/DiskUsage/radialMap/widget.cpp
+++ b/krusader/DiskUsage/radialMap/widget.cpp
@@ -4,10 +4,10 @@
#include <kcursor.h> //ctor
#include <klocale.h>
#include <kurl.h>
-#include <qapplication.h> //sendEvent
-#include <qbitmap.h> //ctor - finding cursor size
-#include <qcursor.h> //slotPostMouseEvent()
-#include <qtimer.h> //member
+#include <tqapplication.h> //sendEvent
+#include <tqbitmap.h> //ctor - finding cursor size
+#include <tqcursor.h> //slotPostMouseEvent()
+#include <tqtimer.h> //member
#include "Config.h"
#include "debug.h"
@@ -17,25 +17,25 @@
-RadialMap::Widget::Widget( QWidget *parent, const char *name )
- : QWidget( parent, name, Qt::WNoAutoErase )
+RadialMap::Widget::Widget( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name, TQt::WNoAutoErase )
, m_tree( 0 )
, m_focus( 0 )
, m_tip( KCursor::handCursor().bitmap()->height() ) //needs to know cursor height
, m_rootSegment( 0 ) //TODO we don't delete it, *shrug*
{
- setBackgroundColor( Qt::white );
+ setBackgroundColor( TQt::white );
- connect( this, SIGNAL(created( const Directory* )), SLOT(sendFakeMouseEvent()) );
- connect( this, SIGNAL(created( const Directory* )), SLOT(update()) );
- connect( &m_timer, SIGNAL(timeout()), SLOT(resizeTimeout()) );
+ connect( this, TQT_SIGNAL(created( const Directory* )), TQT_SLOT(sendFakeMouseEvent()) );
+ connect( this, TQT_SIGNAL(created( const Directory* )), TQT_SLOT(update()) );
+ connect( &m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(resizeTimeout()) );
}
-QString
+TQString
RadialMap::Widget::path() const
{
if( m_tree == 0 )
- return QString::null;
+ return TQString();
return m_tree->fullPath();
}
@@ -49,11 +49,11 @@ RadialMap::Widget::url( File const * const file ) const
}
void
-RadialMap::Widget::invalidate( const bool b )
+RadialMap::Widget::tqinvalidate( const bool b )
{
if( isValid() )
{
- //**** have to check that only way to invalidate is this function frankly
+ //**** have to check that only way to tqinvalidate is this function frankly
//**** otherwise you may get bugs..
//disable mouse tracking
@@ -70,22 +70,22 @@ RadialMap::Widget::invalidate( const bool b )
//FIXME move this disablement thing no?
// it is confusing in other areas, like the whole createFromCache() thing
- m_map.invalidate( b ); //b signifies whether the pixmap is made to look disabled or not
+ m_map.tqinvalidate( b ); //b signifies whether the pixmap is made to look disabled or not
if( b )
update();
//tell rest of Filelight
- emit invalidated( urlInv );
+ emit tqinvalidated( urlInv );
}
}
void
RadialMap::Widget::create( const Directory *tree )
{
- //it is not the responsibility of create() to invalidate first
+ //it is not the responsibility of create() to tqinvalidate first
//skip invalidation at your own risk
- //FIXME make it the responsibility of create to invalidate first
+ //FIXME make it the responsibility of create to tqinvalidate first
if( tree )
{
@@ -108,16 +108,16 @@ RadialMap::Widget::create( const Directory *tree )
void
RadialMap::Widget::createFromCache( const Directory *tree )
{
- //no scan was necessary, use cached tree, however we MUST still emit invalidate
- invalidate( false );
+ //no scan was necessary, use cached tree, however we MUST still emit tqinvalidate
+ tqinvalidate( false );
create( tree );
}
void
RadialMap::Widget::sendFakeMouseEvent() //slot
{
- QMouseEvent me( QEvent::MouseMove, mapFromGlobal( QCursor::pos() ), Qt::NoButton, Qt::NoButton );
- QApplication::sendEvent( this, &me );
+ TQMouseEvent me( TQEvent::MouseMove, mapFromGlobal( TQCursor::pos() ), Qt::NoButton, Qt::NoButton );
+ TQApplication::sendEvent( this, &me );
}
void
diff --git a/krusader/DiskUsage/radialMap/widget.h b/krusader/DiskUsage/radialMap/widget.h
index fcbe08c..6ba6a86 100644
--- a/krusader/DiskUsage/radialMap/widget.h
+++ b/krusader/DiskUsage/radialMap/widget.h
@@ -5,7 +5,7 @@
#define WIDGET_H
#include <kurl.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "segmentTip.h"
template <class T> class Chain;
@@ -25,10 +25,10 @@ namespace RadialMap
~Map();
void make( const Directory *, bool = false );
- bool resize( const QRect& );
+ bool resize( const TQRect& );
bool isNull() const { return ( m_signature == 0 ); }
- void invalidate( const bool );
+ void tqinvalidate( const bool );
friend class Builder;
friend class Widget;
@@ -41,23 +41,24 @@ namespace RadialMap
Chain<Segment> *m_signature;
- QRect m_rect;
+ TQRect m_rect;
uint m_ringBreadth; ///ring breadth
uint m_innerRadius; ///radius of inner circle
uint m_visibleDepth; ///visible level depth of system
- QString m_centerText;
+ TQString m_centerText;
uint MAP_2MARGIN;
};
- class Widget : public QWidget
+ class Widget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Widget( QWidget* = 0, const char* = 0 );
+ Widget( TQWidget* = 0, const char* = 0 );
- QString path() const;
+ TQString path() const;
KURL url( File const * const = 0 ) const;
bool isValid() const { return m_tree != 0; }
@@ -68,7 +69,7 @@ namespace RadialMap
void zoomIn();
void zoomOut();
void create( const Directory* );
- void invalidate( const bool = true );
+ void tqinvalidate( const bool = true );
void refresh( int );
private slots:
@@ -79,28 +80,28 @@ namespace RadialMap
signals:
void activated( const KURL& );
- void invalidated( const KURL& );
+ void tqinvalidated( const KURL& );
void created( const Directory* );
- void mouseHover( const QString& );
+ void mouseHover( const TQString& );
protected:
- virtual void paintEvent( QPaintEvent* );
- virtual void resizeEvent( QResizeEvent* );
- virtual void mouseMoveEvent( QMouseEvent* );
- virtual void mousePressEvent( QMouseEvent* );
+ virtual void paintEvent( TQPaintEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
+ virtual void mouseMoveEvent( TQMouseEvent* );
+ virtual void mousePressEvent( TQMouseEvent* );
protected:
- const Segment *segmentAt( QPoint& ) const; //FIXME const reference for a library others can use
+ const Segment *segmentAt( TQPoint& ) const; //FIXME const reference for a library others can use
const Segment *rootSegment() const { return m_rootSegment; } ///never == 0
const Segment *focusSegment() const { return m_focus; } ///0 == nothing in focus
private:
- void paintExplodedLabels( QPainter& ) const;
+ void paintExplodedLabels( TQPainter& ) const;
const Directory *m_tree;
const Segment *m_focus;
- QPoint m_offset;
- QTimer m_timer;
+ TQPoint m_offset;
+ TQTimer m_timer;
Map m_map;
SegmentTip m_tip;
Segment *m_rootSegment;
diff --git a/krusader/DiskUsage/radialMap/widgetEvents.cpp b/krusader/DiskUsage/radialMap/widgetEvents.cpp
index a2486bb..2666d89 100644
--- a/krusader/DiskUsage/radialMap/widgetEvents.cpp
+++ b/krusader/DiskUsage/radialMap/widgetEvents.cpp
@@ -14,14 +14,14 @@
#include <kpopupmenu.h> //::mousePressEvent()
#include <krun.h> //::mousePressEvent()
#include <math.h> //::segmentAt()
-#include <qapplication.h>//QApplication::setOverrideCursor()
-#include <qpainter.h>
-#include <qtimer.h> //::resizeEvent()
+#include <tqapplication.h>//TQApplication::setOverrideCursor()
+#include <tqpainter.h>
+#include <tqtimer.h> //::resizeEvent()
void
-RadialMap::Widget::resizeEvent( QResizeEvent* )
+RadialMap::Widget::resizeEvent( TQResizeEvent* )
{
if( m_map.resize( rect() ) )
m_timer.start( 500, true ); //will cause signature to rebuild for new size
@@ -32,13 +32,13 @@ RadialMap::Widget::resizeEvent( QResizeEvent* )
}
void
-RadialMap::Widget::paintEvent( QPaintEvent* )
+RadialMap::Widget::paintEvent( TQPaintEvent* )
{
- //bltBit for some Qt setups will bitBlt _after_ the labels are painted. Which buggers things up!
- //shame as bitBlt is faster, possibly Qt bug? Should report the bug? - seems to be race condition
+ //bltBit for some TQt setups will bitBlt _after_ the labels are painted. Which buggers things up!
+ //shame as bitBlt is faster, possibly TQt bug? Should report the bug? - seems to be race condition
//bitBlt( this, m_offset, &m_map );
- QPainter paint( this );
+ TQPainter paint( this );
paint.drawPixmap( m_offset, m_map );
@@ -61,9 +61,9 @@ RadialMap::Widget::paintEvent( QPaintEvent* )
}
const RadialMap::Segment*
-RadialMap::Widget::segmentAt( QPoint &e ) const
+RadialMap::Widget::segmentAt( TQPoint &e ) const
{
- //determine which segment QPoint e is above
+ //determine which segment TQPoint e is above
e -= m_offset;
@@ -105,12 +105,12 @@ RadialMap::Widget::segmentAt( QPoint &e ) const
}
void
-RadialMap::Widget::mouseMoveEvent( QMouseEvent *e )
+RadialMap::Widget::mouseMoveEvent( TQMouseEvent *e )
{
//set m_focus to what we hover over, update UI if it's a new segment
Segment const * const oldFocus = m_focus;
- QPoint p = e->pos();
+ TQPoint p = e->pos();
m_focus = segmentAt( p ); //NOTE p is passed by non-const reference
@@ -122,11 +122,11 @@ RadialMap::Widget::mouseMoveEvent( QMouseEvent *e )
m_tip.updateTip( m_focus->file(), m_tree );
emit mouseHover( m_focus->file()->fullPath() );
- //repaint required to update labels now before transparency is generated
- repaint( false );
+ //tqrepaint required to update labels now before transparency is generated
+ tqrepaint( false );
}
- m_tip.moveto( e->globalPos(), *this, ( p.y() < 0 ) ); //updates tooltip psuedo-tranparent background
+ m_tip.moveto( e->globalPos(), *this, ( p.y() < 0 ) ); //updates tooltip psuedo-trantqparent background
}
else if( oldFocus && oldFocus->file() != m_tree )
{
@@ -134,12 +134,12 @@ RadialMap::Widget::mouseMoveEvent( QMouseEvent *e )
m_tip.hide();
update();
- emit mouseHover( QString::null );
+ emit mouseHover( TQString() );
}
}
void
-RadialMap::Widget::mousePressEvent( QMouseEvent *e )
+RadialMap::Widget::mousePressEvent( TQMouseEvent *e )
{
//m_tip is hidden already by event filter
//m_focus is set correctly (I've been strict, I assure you it is correct!)
@@ -174,11 +174,11 @@ RadialMap::Widget::mousePressEvent( QMouseEvent *e )
switch( popup.exec( e->globalPos(), 1 ) ) {
case 0:
//KRun::runCommand will show an error message if there was trouble
- KRun::runCommand( QString( "kfmclient openURL '%1'" ).arg( url.url() ) );
+ KRun::runCommand( TQString( "kfmclient openURL '%1'" ).tqarg( url.url() ) );
break;
case 1:
- KRun::runCommand( QString( "konsole --workdir '%1'" ).arg( url.url() ) );
+ KRun::runCommand( TQString( "konsole --workdir '%1'" ).tqarg( url.url() ) );
break;
case 2:
@@ -188,16 +188,16 @@ RadialMap::Widget::mousePressEvent( QMouseEvent *e )
case 4:
{
const KURL url = Widget::url( m_focus->file() );
- const QString message = ( m_focus->file()->isDir()
+ const TQString message = ( m_focus->file()->isDir()
? i18n( "<qt>The directory at <i>'%1'</i> will be <b>recursively</b> and <b>permanently</b> deleted!</qt>" )
- : i18n( "<qt><i>'%1'</i> will be <b>permanently</b> deleted!</qt>" )).arg( url.prettyURL() );
- const int userIntention = KMessageBox::warningContinueCancel( this, message, QString::null, KGuiItem( i18n("&Delete"), "editdelete" ) );
+ : i18n( "<qt><i>'%1'</i> will be <b>permanently</b> deleted!</qt>" )).tqarg( url.prettyURL() );
+ const int userIntention = KMessageBox::warningContinueCancel( this, message, TQString(), KGuiItem( i18n("&Delete"), "editdelete" ) );
if( userIntention == KMessageBox::Continue ) {
KIO::Job *job = KIO::del( url );
job->setWindow( this );
- connect( job, SIGNAL(result( KIO::Job* )), SLOT(deleteJobFinished( KIO::Job* )) );
- QApplication::setOverrideCursor( KCursor::workingCursor() );
+ connect( job, TQT_SIGNAL(result( KIO::Job* )), TQT_SLOT(deleteJobFinished( KIO::Job* )) );
+ TQApplication::setOverrideCursor( KCursor::workingCursor() );
}
}
@@ -210,7 +210,7 @@ RadialMap::Widget::mousePressEvent( QMouseEvent *e )
sectionTwo:
- const QRect rect( e->x() - 20, e->y() - 20, 40, 40 );
+ const TQRect rect( e->x() - 20, e->y() - 20, 40, 40 );
m_tip.hide(); //user expects this
@@ -233,9 +233,9 @@ RadialMap::Widget::mousePressEvent( QMouseEvent *e )
void
RadialMap::Widget::deleteJobFinished( KIO::Job *job )
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( !job->error() )
- invalidate();
+ tqinvalidate();
else
job->showErrorDialog( this );
}
diff --git a/krusader/Filter/advancedfilter.cpp b/krusader/Filter/advancedfilter.cpp
index e599036..9eb5922 100644
--- a/krusader/Filter/advancedfilter.cpp
+++ b/krusader/Filter/advancedfilter.cpp
@@ -32,46 +32,46 @@
#include "advancedfilter.h"
#include "../Dialogs/krdialogs.h"
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qfile.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <time.h>
#include <kiconloader.h>
-#define USERSFILE QString("/etc/passwd")
-#define GROUPSFILE QString("/etc/group")
+#define USERSFILE TQString("/etc/passwd")
+#define GROUPSFILE TQString("/etc/group")
-AdvancedFilter::AdvancedFilter( FilterTabs *tabs, QWidget *parent, const char *name ) : QWidget( parent, name ), fltTabs( tabs )
+AdvancedFilter::AdvancedFilter( FilterTabs *tabs, TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name ), fltTabs( tabs )
{
- QGridLayout *filterLayout = new QGridLayout( this );
+ TQGridLayout *filterLayout = new TQGridLayout( this );
filterLayout->setSpacing( 6 );
filterLayout->setMargin( 11 );
// Options for size
- QGroupBox *sizeGroup = new QGroupBox( this, "sizeGroup" );
- sizeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, sizeGroup->sizePolicy().hasHeightForWidth() ) );
+ TQGroupBox *sizeGroup = new TQGroupBox( this, "sizeGroup" );
+ sizeGroup->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, sizeGroup->sizePolicy().hasHeightForWidth() ) );
sizeGroup->setTitle( i18n( "Size" ) );
sizeGroup->setColumnLayout(0, Qt::Vertical );
- sizeGroup->layout()->setSpacing( 0 );
- sizeGroup->layout()->setMargin( 0 );
- QGridLayout *sizeLayout = new QGridLayout( sizeGroup->layout() );
- sizeLayout->setAlignment( Qt::AlignTop );
+ sizeGroup->tqlayout()->setSpacing( 0 );
+ sizeGroup->tqlayout()->setMargin( 0 );
+ TQGridLayout *sizeLayout = new TQGridLayout( sizeGroup->tqlayout() );
+ sizeLayout->tqsetAlignment( TQt::AlignTop );
sizeLayout->setSpacing( 6 );
sizeLayout->setMargin( 11 );
- biggerThanEnabled = new QCheckBox( sizeGroup, "biggerThanEnabled" );
+ biggerThanEnabled = new TQCheckBox( sizeGroup, "biggerThanEnabled" );
biggerThanEnabled->setText( i18n( "&Bigger than" ) );
sizeLayout->addWidget( biggerThanEnabled, 0, 0 );
- biggerThanAmount = new QLineEdit( sizeGroup, "biggerThanAmount" );
+ biggerThanAmount = new TQLineEdit( sizeGroup, "biggerThanAmount" );
biggerThanAmount->setEnabled( false );
- biggerThanAmount->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed, biggerThanAmount->sizePolicy().hasHeightForWidth() ) );
+ biggerThanAmount->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed, biggerThanAmount->sizePolicy().hasHeightForWidth() ) );
sizeLayout->addWidget( biggerThanAmount, 0, 1 );
biggerThanType = new KComboBox( false, sizeGroup, "biggerThanType" );
@@ -81,13 +81,13 @@ AdvancedFilter::AdvancedFilter( FilterTabs *tabs, QWidget *parent, const char *n
biggerThanType->setEnabled( false );
sizeLayout->addWidget( biggerThanType, 0, 2 );
- smallerThanEnabled = new QCheckBox( sizeGroup, "smallerThanEnabled" );
+ smallerThanEnabled = new TQCheckBox( sizeGroup, "smallerThanEnabled" );
smallerThanEnabled->setText( i18n( "&Smaller than" ) );
sizeLayout->addWidget( smallerThanEnabled, 0, 3 );
- smallerThanAmount = new QLineEdit( sizeGroup, "smallerThanAmount" );
+ smallerThanAmount = new TQLineEdit( sizeGroup, "smallerThanAmount" );
smallerThanAmount->setEnabled( false );
- smallerThanAmount->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed, smallerThanAmount->sizePolicy().hasHeightForWidth() ) );
+ smallerThanAmount->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed, smallerThanAmount->sizePolicy().hasHeightForWidth() ) );
sizeLayout->addWidget( smallerThanAmount, 0, 4 );
smallerThanType = new KComboBox( false, sizeGroup, "smallerThanType" );
@@ -99,7 +99,7 @@ AdvancedFilter::AdvancedFilter( FilterTabs *tabs, QWidget *parent, const char *n
// set a tighter box around the type box
- int height = QFontMetrics(biggerThanType->font()).height()+2;
+ int height = TQFontMetrics(biggerThanType->font()).height()+2;
biggerThanType->setMaximumHeight(height);
smallerThanType->setMaximumHeight(height);
@@ -107,79 +107,79 @@ AdvancedFilter::AdvancedFilter( FilterTabs *tabs, QWidget *parent, const char *n
// Options for date
- QPixmap iconDate = krLoader->loadIcon( "date", KIcon::Toolbar, 16 );
+ TQPixmap iconDate = krLoader->loadIcon( "date", KIcon::Toolbar, 16 );
- QButtonGroup *dateGroup = new QButtonGroup( this, "dateGroup" );
+ TQButtonGroup *dateGroup = new TQButtonGroup( this, "dateGroup" );
dateGroup->setTitle( i18n( "Date" ) );
dateGroup->setExclusive( true );
dateGroup->setColumnLayout(0, Qt::Vertical );
- dateGroup->layout()->setSpacing( 0 );
- dateGroup->layout()->setMargin( 0 );
- QGridLayout *dateLayout = new QGridLayout( dateGroup->layout() );
- dateLayout->setAlignment( Qt::AlignTop );
+ dateGroup->tqlayout()->setSpacing( 0 );
+ dateGroup->tqlayout()->setMargin( 0 );
+ TQGridLayout *dateLayout = new TQGridLayout( dateGroup->tqlayout() );
+ dateLayout->tqsetAlignment( TQt::AlignTop );
dateLayout->setSpacing( 6 );
dateLayout->setMargin( 11 );
- modifiedBetweenEnabled = new QRadioButton( dateGroup, "modifiedBetweenEnabled" );
+ modifiedBetweenEnabled = new TQRadioButton( dateGroup, "modifiedBetweenEnabled" );
modifiedBetweenEnabled->setText( i18n( "&Modified between" ) );
dateGroup->insert( modifiedBetweenEnabled, 0 );
dateLayout->addMultiCellWidget( modifiedBetweenEnabled, 0, 0, 0, 1 );
- modifiedBetweenData1 = new QLineEdit( dateGroup, "modifiedBetweenData1" );
+ modifiedBetweenData1 = new TQLineEdit( dateGroup, "modifiedBetweenData1" );
modifiedBetweenData1->setEnabled( false );
modifiedBetweenData1->setText( "" );
dateLayout->addMultiCellWidget( modifiedBetweenData1, 0, 0, 2, 3 );
- modifiedBetweenBtn1 = new QToolButton( dateGroup, "modifiedBetweenBtn1" );
+ modifiedBetweenBtn1 = new TQToolButton( dateGroup, "modifiedBetweenBtn1" );
modifiedBetweenBtn1->setEnabled( false );
modifiedBetweenBtn1->setText( "" );
modifiedBetweenBtn1->setPixmap( iconDate );
dateLayout->addWidget( modifiedBetweenBtn1, 0, 4 );
- QLabel *andLabel = new QLabel( dateGroup, "andLabel" );
+ TQLabel *andLabel = new TQLabel( dateGroup, "andLabel" );
andLabel->setText( i18n( "an&d" ) );
dateLayout->addWidget( andLabel, 0, 5 );
- modifiedBetweenData2 = new QLineEdit( dateGroup, "modifiedBetweenData2" );
+ modifiedBetweenData2 = new TQLineEdit( dateGroup, "modifiedBetweenData2" );
modifiedBetweenData2->setEnabled( false );
modifiedBetweenData2->setText( "" );
andLabel->setBuddy(modifiedBetweenData2);
dateLayout->addWidget( modifiedBetweenData2, 0, 6 );
- modifiedBetweenBtn2 = new QToolButton( dateGroup, "modifiedBetweenBtn2" );
+ modifiedBetweenBtn2 = new TQToolButton( dateGroup, "modifiedBetweenBtn2" );
modifiedBetweenBtn2->setEnabled( false );
modifiedBetweenBtn2->setText( "" );
modifiedBetweenBtn2->setPixmap( iconDate );
dateLayout->addWidget( modifiedBetweenBtn2, 0, 7 );
- notModifiedAfterEnabled = new QRadioButton( dateGroup, "notModifiedAfterEnabled" );
+ notModifiedAfterEnabled = new TQRadioButton( dateGroup, "notModifiedAfterEnabled" );
notModifiedAfterEnabled->setText( i18n( "&Not modified after" ) );
dateGroup->insert( notModifiedAfterEnabled, 0 );
dateLayout->addMultiCellWidget( notModifiedAfterEnabled, 1, 1, 0, 1 );
- notModifiedAfterData = new QLineEdit( dateGroup, "notModifiedAfterData" );
+ notModifiedAfterData = new TQLineEdit( dateGroup, "notModifiedAfterData" );
notModifiedAfterData->setEnabled( false );
notModifiedAfterData->setText( "" );
dateLayout->addMultiCellWidget( notModifiedAfterData, 1, 1, 2, 3 );
- notModifiedAfterBtn = new QToolButton( dateGroup, "notModifiedAfterBtn" );
+ notModifiedAfterBtn = new TQToolButton( dateGroup, "notModifiedAfterBtn" );
notModifiedAfterBtn->setEnabled( false );
notModifiedAfterBtn->setText( "" );
notModifiedAfterBtn->setPixmap( iconDate );
dateLayout->addWidget( notModifiedAfterBtn, 1, 4 );
- modifiedInTheLastEnabled = new QRadioButton( dateGroup, "modifiedInTheLastEnabled" );
+ modifiedInTheLastEnabled = new TQRadioButton( dateGroup, "modifiedInTheLastEnabled" );
modifiedInTheLastEnabled->setText( i18n("Mod&ified in the last") );
dateGroup->insert( modifiedInTheLastEnabled, 0 );
dateLayout->addWidget( modifiedInTheLastEnabled, 2, 0 );
- modifiedInTheLastData = new QLineEdit( dateGroup, "modifiedInTheLastData" );
+ modifiedInTheLastData = new TQLineEdit( dateGroup, "modifiedInTheLastData" );
modifiedInTheLastData->setEnabled( false );
modifiedInTheLastData->setText( "" );
dateLayout->addWidget( modifiedInTheLastData, 2, 2 );
- modifiedInTheLastType = new QComboBox( false, dateGroup, "modifiedInTheLastType" );
+ modifiedInTheLastType = new TQComboBox( false, dateGroup, "modifiedInTheLastType" );
modifiedInTheLastType->insertItem( i18n( "days" ) );
modifiedInTheLastType->insertItem( i18n( "weeks" ) );
modifiedInTheLastType->insertItem( i18n( "months" ) );
@@ -187,17 +187,17 @@ AdvancedFilter::AdvancedFilter( FilterTabs *tabs, QWidget *parent, const char *n
modifiedInTheLastType->setEnabled( false );
dateLayout->addMultiCellWidget( modifiedInTheLastType, 2, 2, 3, 4 );
- notModifiedInTheLastData = new QLineEdit( dateGroup, "notModifiedInTheLastData" );
+ notModifiedInTheLastData = new TQLineEdit( dateGroup, "notModifiedInTheLastData" );
notModifiedInTheLastData->setEnabled( false );
notModifiedInTheLastData->setText( "" );
dateLayout->addWidget( notModifiedInTheLastData, 3, 2 );
- QLabel *notModifiedInTheLastLbl = new QLabel( dateGroup, "notModifiedInTheLastLbl" );
+ TQLabel *notModifiedInTheLastLbl = new TQLabel( dateGroup, "notModifiedInTheLastLbl" );
notModifiedInTheLastLbl->setText( i18n( "No&t modified in the last" ) );
notModifiedInTheLastLbl->setBuddy(notModifiedInTheLastData);
dateLayout->addWidget( notModifiedInTheLastLbl, 3, 0 );
- notModifiedInTheLastType = new QComboBox( false, dateGroup, "notModifiedInTheLastType" );
+ notModifiedInTheLastType = new TQComboBox( false, dateGroup, "notModifiedInTheLastType" );
notModifiedInTheLastType->insertItem( i18n( "days" ) );
notModifiedInTheLastType->insertItem( i18n( "weeks" ) );
notModifiedInTheLastType->insertItem( i18n( "months" ) );
@@ -209,164 +209,164 @@ AdvancedFilter::AdvancedFilter( FilterTabs *tabs, QWidget *parent, const char *n
// Options for ownership
- QGroupBox *ownershipGroup = new QGroupBox( this, "ownershipGroup" );
+ TQGroupBox *ownershipGroup = new TQGroupBox( this, "ownershipGroup" );
ownershipGroup->setTitle( i18n( "Ownership" ) );
ownershipGroup->setColumnLayout(0, Qt::Vertical );
- ownershipGroup->layout()->setSpacing( 0 );
- ownershipGroup->layout()->setMargin( 0 );
- QGridLayout *ownershipLayout = new QGridLayout( ownershipGroup->layout() );
- ownershipLayout->setAlignment( Qt::AlignTop );
+ ownershipGroup->tqlayout()->setSpacing( 0 );
+ ownershipGroup->tqlayout()->setMargin( 0 );
+ TQGridLayout *ownershipLayout = new TQGridLayout( ownershipGroup->tqlayout() );
+ ownershipLayout->tqsetAlignment( TQt::AlignTop );
ownershipLayout->setSpacing( 6 );
ownershipLayout->setMargin( 11 );
- QHBoxLayout *hboxLayout = new QHBoxLayout();
+ TQHBoxLayout *hboxLayout = new TQHBoxLayout();
hboxLayout->setSpacing( 6 );
hboxLayout->setMargin( 0 );
- belongsToUserEnabled = new QCheckBox( ownershipGroup, "belongsToUserEnabled" );
+ belongsToUserEnabled = new TQCheckBox( ownershipGroup, "belongsToUserEnabled" );
belongsToUserEnabled->setText( i18n( "Belongs to &user" ) );
hboxLayout->addWidget( belongsToUserEnabled );
- belongsToUserData = new QComboBox( false, ownershipGroup, "belongsToUserData" );
+ belongsToUserData = new TQComboBox( false, ownershipGroup, "belongsToUserData" );
belongsToUserData->setEnabled( false );
belongsToUserData->setEditable( false );
hboxLayout->addWidget( belongsToUserData );
- belongsToGroupEnabled = new QCheckBox( ownershipGroup, "belongsToGroupEnabled" );
+ belongsToGroupEnabled = new TQCheckBox( ownershipGroup, "belongsToGroupEnabled" );
belongsToGroupEnabled->setText( i18n( "Belongs to gr&oup" ) );
hboxLayout->addWidget( belongsToGroupEnabled );
- belongsToGroupData = new QComboBox( false, ownershipGroup, "belongsToGroupData" );
+ belongsToGroupData = new TQComboBox( false, ownershipGroup, "belongsToGroupData" );
belongsToGroupData->setEnabled( false );
belongsToGroupData->setEditable( false );
hboxLayout->addWidget( belongsToGroupData );
ownershipLayout->addMultiCellLayout( hboxLayout, 0, 0, 0, 3 );
- permissionsEnabled = new QCheckBox( ownershipGroup, "permissionsEnabled" );
+ permissionsEnabled = new TQCheckBox( ownershipGroup, "permissionsEnabled" );
permissionsEnabled->setText( i18n( "P&ermissions" ) );
ownershipLayout->addWidget( permissionsEnabled, 1, 0 );
- QGroupBox *ownerGroup = new QGroupBox( ownershipGroup, "ownerGroup" );
+ TQGroupBox *ownerGroup = new TQGroupBox( ownershipGroup, "ownerGroup" );
ownerGroup->setTitle( i18n( "O&wner" ) );
int width = 2*height + height / 2;
- ownerR = new QComboBox( false, ownerGroup, "ownerR" );
+ ownerR = new TQComboBox( false, ownerGroup, "ownerR" );
ownerR->insertItem( i18n( "?" ) );
ownerR->insertItem( i18n( "r" ) );
ownerR->insertItem( i18n( "-" ) );
ownerR->setEnabled( false );
- ownerR->setGeometry( QRect( 10, 20, width, height+6 ) );
+ ownerR->setGeometry( TQRect( 10, 20, width, height+6 ) );
- ownerW = new QComboBox( false, ownerGroup, "ownerW" );
+ ownerW = new TQComboBox( false, ownerGroup, "ownerW" );
ownerW->insertItem( i18n( "?" ) );
ownerW->insertItem( i18n( "w" ) );
ownerW->insertItem( i18n( "-" ) );
ownerW->setEnabled( false );
- ownerW->setGeometry( QRect( 10 + width, 20, width, height+6 ) );
+ ownerW->setGeometry( TQRect( 10 + width, 20, width, height+6 ) );
- ownerX = new QComboBox( false, ownerGroup, "ownerX" );
+ ownerX = new TQComboBox( false, ownerGroup, "ownerX" );
ownerX->insertItem( i18n( "?" ) );
ownerX->insertItem( i18n( "x" ) );
ownerX->insertItem( i18n( "-" ) );
ownerX->setEnabled( false );
- ownerX->setGeometry( QRect( 10 + 2*width, 20, width, height+6 ) );
+ ownerX->setGeometry( TQRect( 10 + 2*width, 20, width, height+6 ) );
ownershipLayout->addWidget( ownerGroup, 1, 1 );
- QGroupBox *groupGroup = new QGroupBox( ownershipGroup, "groupGroup" );
+ TQGroupBox *groupGroup = new TQGroupBox( ownershipGroup, "groupGroup" );
groupGroup->setTitle( i18n( "Grou&p" ) );
- groupR = new QComboBox( false, groupGroup, "groupR" );
+ groupR = new TQComboBox( false, groupGroup, "groupR" );
groupR->insertItem( i18n( "?" ) );
groupR->insertItem( i18n( "r" ) );
groupR->insertItem( i18n( "-" ) );
groupR->setEnabled( false );
- groupR->setGeometry( QRect( 10, 20, width, height+6 ) );
+ groupR->setGeometry( TQRect( 10, 20, width, height+6 ) );
- groupW = new QComboBox( false, groupGroup, "groupW" );
+ groupW = new TQComboBox( false, groupGroup, "groupW" );
groupW->insertItem( i18n( "?" ) );
groupW->insertItem( i18n( "w" ) );
groupW->insertItem( i18n( "-" ) );
groupW->setEnabled( false );
- groupW->setGeometry( QRect( 10 + width, 20, width, height+6 ) );
+ groupW->setGeometry( TQRect( 10 + width, 20, width, height+6 ) );
- groupX = new QComboBox( false, groupGroup, "groupX" );
+ groupX = new TQComboBox( false, groupGroup, "groupX" );
groupX->insertItem( i18n( "?" ) );
groupX->insertItem( i18n( "x" ) );
groupX->insertItem( i18n( "-" ) );
groupX->setEnabled( false );
- groupX->setGeometry( QRect( 10 + 2*width, 20, width, height+6 ) );
+ groupX->setGeometry( TQRect( 10 + 2*width, 20, width, height+6 ) );
ownershipLayout->addWidget( groupGroup, 1, 2 );
- QGroupBox *allGroup = new QGroupBox( ownershipGroup, "allGroup" );
+ TQGroupBox *allGroup = new TQGroupBox( ownershipGroup, "allGroup" );
allGroup->setTitle( i18n( "A&ll" ) );
- allR = new QComboBox( false, allGroup, "allR" );
+ allR = new TQComboBox( false, allGroup, "allR" );
allR->insertItem( i18n( "?" ) );
allR->insertItem( i18n( "r" ) );
allR->insertItem( i18n( "-" ) );
allR->setEnabled( false );
- allR->setGeometry( QRect( 10, 20, width, height+6 ) );
+ allR->setGeometry( TQRect( 10, 20, width, height+6 ) );
- allW = new QComboBox( false, allGroup, "allW" );
+ allW = new TQComboBox( false, allGroup, "allW" );
allW->insertItem( i18n( "?" ) );
allW->insertItem( i18n( "w" ) );
allW->insertItem( i18n( "-" ) );
allW->setEnabled( false );
- allW->setGeometry( QRect( 10 + width, 20, width, height+6 ) );
+ allW->setGeometry( TQRect( 10 + width, 20, width, height+6 ) );
- allX = new QComboBox( false, allGroup, "allX" );
+ allX = new TQComboBox( false, allGroup, "allX" );
allX->insertItem( i18n( "?" ) );
allX->insertItem( i18n( "x" ) );
allX->insertItem( i18n( "-" ) );
allX->setEnabled( false );
- allX->setGeometry( QRect( 10 + 2*width, 20, width, height+6 ) );
+ allX->setGeometry( TQRect( 10 + 2*width, 20, width, height+6 ) );
ownershipLayout->addWidget( allGroup, 1, 3 );
- QLabel *infoLabel = new QLabel( ownershipGroup, "TextLabel4" );
- QFont infoLabel_font( infoLabel->font() );
+ TQLabel *infoLabel = new TQLabel( ownershipGroup, "TextLabel4" );
+ TQFont infoLabel_font( infoLabel->font() );
infoLabel_font.setFamily( "adobe-helvetica" );
infoLabel_font.setItalic( true );
infoLabel->setFont( infoLabel_font );
infoLabel->setText( i18n( "Note: a '?' is a wildcard" ) );
- ownershipLayout->addMultiCellWidget( infoLabel, 2, 2, 0, 3, Qt::AlignRight );
+ ownershipLayout->addMultiCellWidget( infoLabel, 2, 2, 0, 3, TQt::AlignRight );
filterLayout->addWidget( ownershipGroup, 2, 0 );
// Connection table
- connect( biggerThanEnabled, SIGNAL( toggled(bool) ), biggerThanAmount, SLOT( setEnabled(bool) ) );
- connect( biggerThanEnabled, SIGNAL( toggled(bool) ), biggerThanType, SLOT( setEnabled(bool) ) );
- connect( smallerThanEnabled, SIGNAL( toggled(bool) ), smallerThanAmount, SLOT( setEnabled(bool) ) );
- connect( smallerThanEnabled, SIGNAL( toggled(bool) ), smallerThanType, SLOT( setEnabled(bool) ) );
- connect( modifiedBetweenEnabled, SIGNAL( toggled(bool) ), modifiedBetweenData1, SLOT( setEnabled(bool) ) );
- connect( modifiedBetweenEnabled, SIGNAL( toggled(bool) ), modifiedBetweenBtn1, SLOT( setEnabled(bool) ) );
- connect( modifiedBetweenEnabled, SIGNAL( toggled(bool) ), modifiedBetweenData2, SLOT( setEnabled(bool) ) );
- connect( modifiedBetweenEnabled, SIGNAL( toggled(bool) ), modifiedBetweenBtn2, SLOT( setEnabled(bool) ) );
- connect( notModifiedAfterEnabled, SIGNAL( toggled(bool) ), notModifiedAfterData, SLOT( setEnabled(bool) ) );
- connect( notModifiedAfterEnabled, SIGNAL( toggled(bool) ), notModifiedAfterBtn, SLOT( setEnabled(bool) ) );
- connect( modifiedInTheLastEnabled, SIGNAL( toggled(bool) ), modifiedInTheLastData, SLOT( setEnabled(bool) ) );
- connect( modifiedInTheLastEnabled, SIGNAL( toggled(bool) ), modifiedInTheLastType, SLOT( setEnabled(bool) ) );
- connect( modifiedInTheLastEnabled, SIGNAL( toggled(bool) ), notModifiedInTheLastData, SLOT( setEnabled(bool) ) );
- connect( modifiedInTheLastEnabled, SIGNAL( toggled(bool) ), notModifiedInTheLastType, SLOT( setEnabled(bool) ) );
- connect( belongsToUserEnabled, SIGNAL( toggled(bool) ), belongsToUserData, SLOT( setEnabled(bool) ) );
- connect( belongsToGroupEnabled, SIGNAL( toggled(bool) ), belongsToGroupData, SLOT( setEnabled(bool) ) );
- connect( permissionsEnabled, SIGNAL( toggled(bool) ), ownerR, SLOT( setEnabled(bool) ) );
- connect( permissionsEnabled, SIGNAL( toggled(bool) ), ownerW, SLOT( setEnabled(bool) ) );
- connect( permissionsEnabled, SIGNAL( toggled(bool) ), ownerX, SLOT( setEnabled(bool) ) );
- connect( permissionsEnabled, SIGNAL( toggled(bool) ), groupR, SLOT( setEnabled(bool) ) );
- connect( permissionsEnabled, SIGNAL( toggled(bool) ), groupW, SLOT( setEnabled(bool) ) );
- connect( permissionsEnabled, SIGNAL( toggled(bool) ), groupX, SLOT( setEnabled(bool) ) );
- connect( permissionsEnabled, SIGNAL( toggled(bool) ), allR, SLOT( setEnabled(bool) ) );
- connect( permissionsEnabled, SIGNAL( toggled(bool) ), allW, SLOT( setEnabled(bool) ) );
- connect( permissionsEnabled, SIGNAL( toggled(bool) ), allX, SLOT( setEnabled(bool) ) );
- connect( modifiedBetweenBtn1, SIGNAL( clicked() ), this, SLOT( modifiedBetweenSetDate1() ) );
- connect( modifiedBetweenBtn2, SIGNAL( clicked() ), this, SLOT( modifiedBetweenSetDate2() ) );
- connect( notModifiedAfterBtn, SIGNAL( clicked() ), this, SLOT( notModifiedAfterSetDate() ) );
+ connect( biggerThanEnabled, TQT_SIGNAL( toggled(bool) ), biggerThanAmount, TQT_SLOT( setEnabled(bool) ) );
+ connect( biggerThanEnabled, TQT_SIGNAL( toggled(bool) ), biggerThanType, TQT_SLOT( setEnabled(bool) ) );
+ connect( smallerThanEnabled, TQT_SIGNAL( toggled(bool) ), smallerThanAmount, TQT_SLOT( setEnabled(bool) ) );
+ connect( smallerThanEnabled, TQT_SIGNAL( toggled(bool) ), smallerThanType, TQT_SLOT( setEnabled(bool) ) );
+ connect( modifiedBetweenEnabled, TQT_SIGNAL( toggled(bool) ), modifiedBetweenData1, TQT_SLOT( setEnabled(bool) ) );
+ connect( modifiedBetweenEnabled, TQT_SIGNAL( toggled(bool) ), modifiedBetweenBtn1, TQT_SLOT( setEnabled(bool) ) );
+ connect( modifiedBetweenEnabled, TQT_SIGNAL( toggled(bool) ), modifiedBetweenData2, TQT_SLOT( setEnabled(bool) ) );
+ connect( modifiedBetweenEnabled, TQT_SIGNAL( toggled(bool) ), modifiedBetweenBtn2, TQT_SLOT( setEnabled(bool) ) );
+ connect( notModifiedAfterEnabled, TQT_SIGNAL( toggled(bool) ), notModifiedAfterData, TQT_SLOT( setEnabled(bool) ) );
+ connect( notModifiedAfterEnabled, TQT_SIGNAL( toggled(bool) ), notModifiedAfterBtn, TQT_SLOT( setEnabled(bool) ) );
+ connect( modifiedInTheLastEnabled, TQT_SIGNAL( toggled(bool) ), modifiedInTheLastData, TQT_SLOT( setEnabled(bool) ) );
+ connect( modifiedInTheLastEnabled, TQT_SIGNAL( toggled(bool) ), modifiedInTheLastType, TQT_SLOT( setEnabled(bool) ) );
+ connect( modifiedInTheLastEnabled, TQT_SIGNAL( toggled(bool) ), notModifiedInTheLastData, TQT_SLOT( setEnabled(bool) ) );
+ connect( modifiedInTheLastEnabled, TQT_SIGNAL( toggled(bool) ), notModifiedInTheLastType, TQT_SLOT( setEnabled(bool) ) );
+ connect( belongsToUserEnabled, TQT_SIGNAL( toggled(bool) ), belongsToUserData, TQT_SLOT( setEnabled(bool) ) );
+ connect( belongsToGroupEnabled, TQT_SIGNAL( toggled(bool) ), belongsToGroupData, TQT_SLOT( setEnabled(bool) ) );
+ connect( permissionsEnabled, TQT_SIGNAL( toggled(bool) ), ownerR, TQT_SLOT( setEnabled(bool) ) );
+ connect( permissionsEnabled, TQT_SIGNAL( toggled(bool) ), ownerW, TQT_SLOT( setEnabled(bool) ) );
+ connect( permissionsEnabled, TQT_SIGNAL( toggled(bool) ), ownerX, TQT_SLOT( setEnabled(bool) ) );
+ connect( permissionsEnabled, TQT_SIGNAL( toggled(bool) ), groupR, TQT_SLOT( setEnabled(bool) ) );
+ connect( permissionsEnabled, TQT_SIGNAL( toggled(bool) ), groupW, TQT_SLOT( setEnabled(bool) ) );
+ connect( permissionsEnabled, TQT_SIGNAL( toggled(bool) ), groupX, TQT_SLOT( setEnabled(bool) ) );
+ connect( permissionsEnabled, TQT_SIGNAL( toggled(bool) ), allR, TQT_SLOT( setEnabled(bool) ) );
+ connect( permissionsEnabled, TQT_SIGNAL( toggled(bool) ), allW, TQT_SLOT( setEnabled(bool) ) );
+ connect( permissionsEnabled, TQT_SIGNAL( toggled(bool) ), allX, TQT_SLOT( setEnabled(bool) ) );
+ connect( modifiedBetweenBtn1, TQT_SIGNAL( clicked() ), this, TQT_SLOT( modifiedBetweenSetDate1() ) );
+ connect( modifiedBetweenBtn2, TQT_SIGNAL( clicked() ), this, TQT_SLOT( modifiedBetweenSetDate2() ) );
+ connect( notModifiedAfterBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( notModifiedAfterSetDate() ) );
// fill the users and groups list
@@ -420,10 +420,10 @@ void AdvancedFilter::notModifiedAfterSetDate()
changeDate(notModifiedAfterData);
}
-void AdvancedFilter::changeDate(QLineEdit *p) {
+void AdvancedFilter::changeDate(TQLineEdit *p) {
// check if the current date is valid
- QDate d = KGlobal::locale()->readDate(p->text());
- if (!d.isValid()) d = QDate::currentDate();
+ TQDate d = KGlobal::locale()->readDate(p->text());
+ if (!d.isValid()) d = TQDate::tqcurrentDate();
KRGetDate *gd = new KRGetDate(d, this);
d = gd->getDate();
@@ -435,7 +435,7 @@ void AdvancedFilter::changeDate(QLineEdit *p) {
// bool start: set it to true if this date is the beginning of the search,
// if it's the end, set it to false
-void AdvancedFilter::qdate2time_t(time_t *dest, QDate d, bool start) {
+void AdvancedFilter::qdate2time_t(time_t *dest, TQDate d, bool start) {
struct tm t;
t.tm_sec = (start ? 0 : 59);
t.tm_min = (start ? 0 : 59);
@@ -451,28 +451,28 @@ void AdvancedFilter::qdate2time_t(time_t *dest, QDate d, bool start) {
}
-void AdvancedFilter::fillList(QComboBox *list, QString filename) {
- QFile data(filename);
+void AdvancedFilter::fillList(TQComboBox *list, TQString filename) {
+ TQFile data(filename);
if (!data.open(IO_ReadOnly))
{
krOut << "Search: Unable to read " << filename << " !!!" << endl;
return;
}
// and read it into the temporary array
- QTextStream t(&data);
+ TQTextStream t(&data);
while (!data.atEnd())
{
- QString s = t.readLine();
- QString name = s.left(s.find(':'));
+ TQString s = t.readLine();
+ TQString name = s.left(s.tqfind(':'));
list->insertItem(name);
}
}
-void AdvancedFilter::invalidDateMessage(QLineEdit *p)
+void AdvancedFilter::invalidDateMessage(TQLineEdit *p)
{
// FIXME p->text() is empty sometimes (to reproduce, set date to "13.09.005")
KMessageBox::detailedError(this, i18n("Invalid date entered."),
- i18n("The date %1 is not valid according to your locale. Please re-enter a valid date (use the date button for easy access).").arg(p->text()) );
+ i18n("The date %1 is not valid according to your locale. Please re-enter a valid date (use the date button for easy access).").tqarg(p->text()) );
p->setFocus();
}
@@ -517,9 +517,9 @@ bool AdvancedFilter::fillQuery( KRQuery *query )
if ( !(modifiedBetweenData1->text().simplifyWhiteSpace().isEmpty() &&
modifiedBetweenData2->text().simplifyWhiteSpace().isEmpty()) ) {
// check if date is valid
- QDate d1 = KGlobal::locale()->readDate(modifiedBetweenData1->text());
+ TQDate d1 = KGlobal::locale()->readDate(modifiedBetweenData1->text());
if (!d1.isValid()) { invalidDateMessage(modifiedBetweenData1); return false; }
- QDate d2 = KGlobal::locale()->readDate(modifiedBetweenData2->text());
+ TQDate d2 = KGlobal::locale()->readDate(modifiedBetweenData2->text());
if (!d2.isValid()) { invalidDateMessage(modifiedBetweenData2); return false; }
if (d1 > d2) {
@@ -538,7 +538,7 @@ bool AdvancedFilter::fillQuery( KRQuery *query )
}
} else if (notModifiedAfterEnabled->isChecked()) {
if ( !notModifiedAfterData->text().simplifyWhiteSpace().isEmpty() ) {
- QDate d = KGlobal::locale()->readDate(notModifiedAfterData->text());
+ TQDate d = KGlobal::locale()->readDate(notModifiedAfterData->text());
if (!d.isValid()) { invalidDateMessage(notModifiedAfterData); return false; }
time_t olderTime;
qdate2time_t(&olderTime, d, false);
@@ -547,7 +547,7 @@ bool AdvancedFilter::fillQuery( KRQuery *query )
} else if (modifiedInTheLastEnabled->isChecked()) {
if ( !(modifiedInTheLastData->text().simplifyWhiteSpace().isEmpty() &&
notModifiedInTheLastData->text().simplifyWhiteSpace().isEmpty()) ) {
- QDate d1 = QDate::currentDate(); QDate d2 = QDate::currentDate();
+ TQDate d1 = TQDate::tqcurrentDate(); TQDate d2 = TQDate::tqcurrentDate();
if (!modifiedInTheLastData->text().simplifyWhiteSpace().isEmpty()) {
int tmp1 = modifiedInTheLastData->text().simplifyWhiteSpace().toInt();
switch (modifiedInTheLastType->currentItem()) {
@@ -591,7 +591,7 @@ bool AdvancedFilter::fillQuery( KRQuery *query )
}
// permissions and ownership /////////////////////////////////////
if (permissionsEnabled->isChecked()) {
- QString perm = ownerR->currentText() + ownerW->currentText() + ownerX->currentText() +
+ TQString perm = ownerR->currentText() + ownerW->currentText() + ownerX->currentText() +
groupR->currentText() + groupW->currentText() + groupX->currentText() +
allR->currentText() + allW->currentText() + allX->currentText();
query->setPermissions( perm );
@@ -604,7 +604,7 @@ bool AdvancedFilter::fillQuery( KRQuery *query )
return true;
}
-void AdvancedFilter::loadFromProfile( QString name )
+void AdvancedFilter::loadFromProfile( TQString name )
{
krConfig->setGroup( name );
@@ -633,7 +633,7 @@ void AdvancedFilter::loadFromProfile( QString name )
belongsToUserEnabled->setChecked( krConfig->readBoolEntry( "Belongs To User Enabled", false ) );
belongsToGroupEnabled->setChecked( krConfig->readBoolEntry( "Belongs To Group Enabled", false ) );
- QString user = krConfig->readEntry( "Belongs To User", "" );
+ TQString user = krConfig->readEntry( "Belongs To User", "" );
for( int i = belongsToUserData->count(); i >= 0; i-- )
{
belongsToUserData->setCurrentItem( i );
@@ -641,7 +641,7 @@ void AdvancedFilter::loadFromProfile( QString name )
break;
}
- QString group = krConfig->readEntry( "Belongs To Group", "" );
+ TQString group = krConfig->readEntry( "Belongs To Group", "" );
for( int i = belongsToGroupData->count(); i >= 0; i-- )
{
belongsToGroupData->setCurrentItem( i );
@@ -662,7 +662,7 @@ void AdvancedFilter::loadFromProfile( QString name )
allX->setCurrentItem( krConfig->readNumEntry( "All Execute", 0 ) );
}
-void AdvancedFilter::saveToProfile( QString name )
+void AdvancedFilter::saveToProfile( TQString name )
{
krConfig->setGroup( name );
diff --git a/krusader/Filter/advancedfilter.h b/krusader/Filter/advancedfilter.h
index 77912e0..1dc9033 100644
--- a/krusader/Filter/advancedfilter.h
+++ b/krusader/Filter/advancedfilter.h
@@ -34,25 +34,26 @@
#include "filterbase.h"
#include "../VFS/krquery.h"
-#include <qwidget.h>
-#include <qcheckbox.h>
+#include <tqwidget.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <klineedit.h>
-#include <qradiobutton.h>
-#include <qtoolbutton.h>
+#include <tqradiobutton.h>
+#include <tqtoolbutton.h>
-class AdvancedFilter : public QWidget, public FilterBase
+class AdvancedFilter : public TQWidget, public FilterBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- AdvancedFilter( FilterTabs *tabs, QWidget *parent = 0, const char *name = 0 );
+ AdvancedFilter( FilterTabs *tabs, TQWidget *tqparent = 0, const char *name = 0 );
virtual void queryAccepted() {}
virtual bool fillQuery( KRQuery *query );
- virtual void loadFromProfile( QString name );
- virtual void saveToProfile( QString name );
- virtual QString name() { return "AdvancedFilter";}
+ virtual void loadFromProfile( TQString name );
+ virtual void saveToProfile( TQString name );
+ virtual TQString name() { return "AdvancedFilter";}
virtual FilterTabs * filterTabs() { return fltTabs; }
public slots:
@@ -61,55 +62,55 @@ public slots:
void notModifiedAfterSetDate();
public:
- QCheckBox* smallerThanEnabled;
- QLineEdit* smallerThanAmount;
+ TQCheckBox* smallerThanEnabled;
+ TQLineEdit* smallerThanAmount;
KComboBox* smallerThanType;
- QCheckBox* biggerThanEnabled;
+ TQCheckBox* biggerThanEnabled;
KComboBox* biggerThanType;
- QLineEdit* biggerThanAmount;
-
- QRadioButton* modifiedBetweenEnabled;
- QRadioButton* notModifiedAfterEnabled;
- QRadioButton* modifiedInTheLastEnabled;
-
- QLineEdit* modifiedBetweenData1;
- QLineEdit* modifiedBetweenData2;
-
- QToolButton* modifiedBetweenBtn1;
- QToolButton* modifiedBetweenBtn2;
- QToolButton* notModifiedAfterBtn;
-
- QLineEdit* notModifiedAfterData;
- QLineEdit* modifiedInTheLastData;
- QLineEdit* notModifiedInTheLastData;
- QComboBox* modifiedInTheLastType;
- QComboBox* notModifiedInTheLastType;
-
- QCheckBox* belongsToUserEnabled;
- QComboBox* belongsToUserData;
- QCheckBox* belongsToGroupEnabled;
- QComboBox* belongsToGroupData;
-
- QCheckBox* permissionsEnabled;
-
- QComboBox* ownerW;
- QComboBox* ownerR;
- QComboBox* ownerX;
- QComboBox* groupW;
- QComboBox* groupR;
- QComboBox* groupX;
- QComboBox* allW;
- QComboBox* allX;
- QComboBox* allR;
+ TQLineEdit* biggerThanAmount;
+
+ TQRadioButton* modifiedBetweenEnabled;
+ TQRadioButton* notModifiedAfterEnabled;
+ TQRadioButton* modifiedInTheLastEnabled;
+
+ TQLineEdit* modifiedBetweenData1;
+ TQLineEdit* modifiedBetweenData2;
+
+ TQToolButton* modifiedBetweenBtn1;
+ TQToolButton* modifiedBetweenBtn2;
+ TQToolButton* notModifiedAfterBtn;
+
+ TQLineEdit* notModifiedAfterData;
+ TQLineEdit* modifiedInTheLastData;
+ TQLineEdit* notModifiedInTheLastData;
+ TQComboBox* modifiedInTheLastType;
+ TQComboBox* notModifiedInTheLastType;
+
+ TQCheckBox* belongsToUserEnabled;
+ TQComboBox* belongsToUserData;
+ TQCheckBox* belongsToGroupEnabled;
+ TQComboBox* belongsToGroupData;
+
+ TQCheckBox* permissionsEnabled;
+
+ TQComboBox* ownerW;
+ TQComboBox* ownerR;
+ TQComboBox* ownerX;
+ TQComboBox* groupW;
+ TQComboBox* groupR;
+ TQComboBox* groupX;
+ TQComboBox* allW;
+ TQComboBox* allX;
+ TQComboBox* allR;
FilterTabs *fltTabs;
private:
- void changeDate(QLineEdit *p);
- void fillList(QComboBox *list, QString filename);
- void qdate2time_t(time_t *dest, QDate d, bool start);
- void invalidDateMessage(QLineEdit *p);
+ void changeDate(TQLineEdit *p);
+ void fillList(TQComboBox *list, TQString filename);
+ void qdate2time_t(time_t *dest, TQDate d, bool start);
+ void invalidDateMessage(TQLineEdit *p);
};
#endif /* ADVANCEDFILTER_H */
diff --git a/krusader/Filter/filterbase.h b/krusader/Filter/filterbase.h
index ef9ed4d..bdcdce0 100644
--- a/krusader/Filter/filterbase.h
+++ b/krusader/Filter/filterbase.h
@@ -32,7 +32,7 @@
#define FILTERBASE_H
#include "../VFS/krquery.h"
-#include <qstring.h>
+#include <tqstring.h>
class FilterTabs;
@@ -41,9 +41,9 @@ class FilterBase
public:
virtual bool fillQuery( KRQuery *query ) = 0;
virtual void queryAccepted() = 0;
- virtual void loadFromProfile( QString name ) = 0;
- virtual void saveToProfile( QString name ) = 0;
- virtual QString name() = 0;
+ virtual void loadFromProfile( TQString name ) = 0;
+ virtual void saveToProfile( TQString name ) = 0;
+ virtual TQString name() = 0;
virtual FilterTabs * filterTabs() = 0;
virtual ~FilterBase() {}
};
diff --git a/krusader/Filter/filterdialog.cpp b/krusader/Filter/filterdialog.cpp
index 1c76029..fecce72 100644
--- a/krusader/Filter/filterdialog.cpp
+++ b/krusader/Filter/filterdialog.cpp
@@ -34,14 +34,14 @@
#include <klocale.h>
-FilterDialog::FilterDialog( QWidget *parent, const char *name )
- : KDialogBase( parent, name, true, i18n("Krusader::Choose Files"), Ok|Cancel )
+FilterDialog::FilterDialog( TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name, true, i18n("Krusader::Choose Files"), Ok|Cancel )
{
- QGridLayout *filterGrid = new QGridLayout( this->layout() );
+ TQGridLayout *filterGrid = new TQGridLayout( this->tqlayout() );
filterGrid->setSpacing( 6 );
filterGrid->setMargin( 11 );
- QTabWidget *filterWidget = new QTabWidget( this, "filterTabs" );
+ TQTabWidget *filterWidget = new TQTabWidget( this, "filterTabs" );
filterTabs = FilterTabs::addTo( filterWidget, FilterTabs::HasProfileHandler );
generalFilter = (GeneralFilter *)filterTabs->get( "GeneralFilter" );
@@ -52,7 +52,7 @@ FilterDialog::FilterDialog( QWidget *parent, const char *name )
generalFilter->searchFor->setFocus();
- connect( filterTabs, SIGNAL( closeRequest(bool) ), this, SLOT( slotCloseRequest(bool) ) );
+ connect( filterTabs, TQT_SIGNAL( closeRequest(bool) ), this, TQT_SLOT( slotCloseRequest(bool) ) );
exec();
}
diff --git a/krusader/Filter/filterdialog.h b/krusader/Filter/filterdialog.h
index 18d80c3..c41a284 100644
--- a/krusader/Filter/filterdialog.h
+++ b/krusader/Filter/filterdialog.h
@@ -40,9 +40,10 @@ class GeneralFilter;
class FilterDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- FilterDialog( QWidget *parent = 0, const char *name = 0 );
+ FilterDialog( TQWidget *tqparent = 0, const char *name = 0 );
KRQuery getQuery();
public slots:
diff --git a/krusader/Filter/filtertabs.cpp b/krusader/Filter/filtertabs.cpp
index e66e7bd..25154dc 100644
--- a/krusader/Filter/filtertabs.cpp
+++ b/krusader/Filter/filtertabs.cpp
@@ -35,8 +35,8 @@
#include <klocale.h>
-FilterTabs::FilterTabs( int properties, QTabWidget *tabWidget, QObject *parent ) :
- QObject( parent, 0 )
+FilterTabs::FilterTabs( int properties, TQTabWidget *tabWidget, TQObject *tqparent ) :
+ TQObject( tqparent, 0 )
{
this->tabWidget = tabWidget;
@@ -51,12 +51,12 @@ FilterTabs::FilterTabs( int properties, QTabWidget *tabWidget, QObject *parent )
pageNumbers.append( tabWidget->indexOf( advancedFilter ) );
}
-FilterTabs * FilterTabs::addTo( QTabWidget *tabWidget, int props )
+FilterTabs * FilterTabs::addTo( TQTabWidget *tabWidget, int props )
{
- return new FilterTabs( props, tabWidget, tabWidget );
+ return new FilterTabs( props, tabWidget, TQT_TQOBJECT(tabWidget) );
}
-void FilterTabs::saveToProfile( QString name )
+void FilterTabs::saveToProfile( TQString name )
{
FilterBase *filter = filterList.first();
@@ -67,7 +67,7 @@ void FilterTabs::saveToProfile( QString name )
}
}
-void FilterTabs::loadFromProfile( QString name )
+void FilterTabs::loadFromProfile( TQString name )
{
FilterBase *filter = filterList.first();
@@ -108,7 +108,7 @@ bool FilterTabs::fillQuery( KRQuery *query )
return true;
}
-FilterBase * FilterTabs::get( QString name )
+FilterBase * FilterTabs::get( TQString name )
{
FilterBase *filter = filterList.first();
@@ -123,9 +123,9 @@ FilterBase * FilterTabs::get( QString name )
return 0;
}
-KRQuery FilterTabs::getQuery( QWidget *parent, const char *name )
+KRQuery FilterTabs::getQuery( TQWidget *tqparent, const char *name )
{
- FilterDialog dialog( parent, name );
+ FilterDialog dialog( tqparent, name );
return dialog.getQuery();
}
diff --git a/krusader/Filter/filtertabs.h b/krusader/Filter/filtertabs.h
index 94c5c48..5e5774d 100644
--- a/krusader/Filter/filtertabs.h
+++ b/krusader/Filter/filtertabs.h
@@ -31,14 +31,15 @@
#ifndef FILTERTABS_H
#define FILTERTABS_H
-#include <qtabwidget.h>
-#include <qptrlist.h>
+#include <tqtabwidget.h>
+#include <tqptrlist.h>
#include "filterbase.h"
-class FilterTabs : public QObject
+class FilterTabs : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -53,14 +54,14 @@ class FilterTabs : public QObject
Default = 0xe000
};
- static FilterTabs * addTo( QTabWidget *tabWidget, int props = FilterTabs::Default );
- static KRQuery getQuery( QWidget *parent = 0, const char *name = 0 );
+ static FilterTabs * addTo( TQTabWidget *tabWidget, int props = FilterTabs::Default );
+ static KRQuery getQuery( TQWidget *tqparent = 0, const char *name = 0 );
- FilterBase *get( QString name );
+ FilterBase *get( TQString name );
public slots:
- void loadFromProfile( QString );
- void saveToProfile( QString );
+ void loadFromProfile( TQString );
+ void saveToProfile( TQString );
bool fillQuery( KRQuery *query );
void close( bool accept = true ) { emit closeRequest( accept ); }
@@ -68,13 +69,13 @@ class FilterTabs : public QObject
void closeRequest( bool accept = true );
private:
- FilterTabs( int properties, QTabWidget *tabWidget, QObject *parent );
+ FilterTabs( int properties, TQTabWidget *tabWidget, TQObject *tqparent );
void acceptQuery();
- QPtrList<FilterBase> filterList;
- QValueList<int> pageNumbers;
+ TQPtrList<FilterBase> filterList;
+ TQValueList<int> pageNumbers;
- QTabWidget * tabWidget;
+ TQTabWidget * tabWidget;
};
#endif /* FILTERTABS_H */
diff --git a/krusader/Filter/generalfilter.cpp b/krusader/Filter/generalfilter.cpp
index 2c037a4..f35db98 100644
--- a/krusader/Filter/generalfilter.cpp
+++ b/krusader/Filter/generalfilter.cpp
@@ -37,13 +37,13 @@
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <kiconloader.h>
-#include <qwhatsthis.h>
-#include <qpushbutton.h>
+#include <tqwhatsthis.h>
+#include <tqpushbutton.h>
-GeneralFilter::GeneralFilter( FilterTabs *tabs, int properties, QWidget *parent, const char *name ) : QWidget( parent, name ),
+GeneralFilter::GeneralFilter( FilterTabs *tabs, int properties, TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name ),
profileManager( 0 ), fltTabs( tabs )
{
- QGridLayout *filterLayout = new QGridLayout( this );
+ TQGridLayout *filterLayout = new TQGridLayout( this );
filterLayout->setSpacing( 6 );
filterLayout->setMargin( 11 );
@@ -51,43 +51,43 @@ GeneralFilter::GeneralFilter( FilterTabs *tabs, int properties, QWidget *parent,
// Options for name filtering
- QGroupBox *nameGroup = new QGroupBox( this, "nameGroup" );
+ TQGroupBox *nameGroup = new TQGroupBox( this, "nameGroup" );
nameGroup->setTitle( i18n( "File name" ) );
nameGroup->setColumnLayout(0, Qt::Vertical );
- nameGroup->layout()->setSpacing( 0 );
- nameGroup->layout()->setMargin( 0 );
- QGridLayout *nameGroupLayout = new QGridLayout( nameGroup->layout() );
- nameGroupLayout->setAlignment( Qt::AlignTop );
+ nameGroup->tqlayout()->setSpacing( 0 );
+ nameGroup->tqlayout()->setMargin( 0 );
+ TQGridLayout *nameGroupLayout = new TQGridLayout( nameGroup->tqlayout() );
+ nameGroupLayout->tqsetAlignment( TQt::AlignTop );
nameGroupLayout->setSpacing( 6 );
nameGroupLayout->setMargin( 11 );
- searchForCase = new QCheckBox( nameGroup, "searchForCase" );
+ searchForCase = new TQCheckBox( nameGroup, "searchForCase" );
searchForCase->setText( i18n( "&Case sensitive" ) );
searchForCase->setChecked( false );
nameGroupLayout->addWidget( searchForCase, 1, 2 );
- QLabel *searchForLabel = new QLabel( nameGroup, "searchForLabel" );
+ TQLabel *searchForLabel = new TQLabel( nameGroup, "searchForLabel" );
searchForLabel->setText( i18n( "Search &for:" ) );
nameGroupLayout->addWidget( searchForLabel, 0, 0 );
searchFor = new KHistoryCombo( false, nameGroup, "searchFor" );
- searchFor->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, searchFor->sizePolicy().hasHeightForWidth() ) );
+ searchFor->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, searchFor->sizePolicy().hasHeightForWidth() ) );
searchFor->setEditable( true );
searchFor->setDuplicatesEnabled( false );
searchFor->setMaxCount( 25 );
searchForLabel->setBuddy( searchFor );
nameGroupLayout->addMultiCellWidget( searchFor, 0, 0, 1, 2 );
- QString s = "<p><img src='toolbar|find'></p>" + i18n("<p>The filename filtering criteria is defined here.</p><p>You can make use of wildcards. Multiple patterns are separated by space (means logical OR) and patterns are excluded from the search using the pipe symbol.</p><p>If the pattern is ended with a slash (<code>*pattern*/</code>), that means that pattern relates to recursive search of directories.<ul><li><code>pattern</code> - means to search those files/directories that name is <code>pattern</code>, recursive search goes through all subdirectories independently of the value of <code>pattern</code></li><li><code>pattern/</code> - means to search all files/directories, but recursive search goes through/excludes the directories that name is <code>pattern</code></li></ul><p></p><p>It's allowed to use quotation marks for names that contain space. Filter <code>\"Program&nbsp;Files\"</code> searches out those files/directories that name is <code>Program&nbsp;Files</code>.</p><p>Examples:<ul><code><li>*.o</li><li>*.h *.c\?\?</li><li>*.cpp *.h | *.moc.cpp</li><li>* | CVS/ .svn/</li></code></ul><b>Note</b>: the search term '<code>text</code>' is equivalent to '<code>*text*</code>'.</p>");
- QWhatsThis::add(searchFor, s);
- QWhatsThis::add(searchForLabel, s);
+ TQString s = "<p><img src='toolbar|tqfind'></p>" + i18n("<p>The filename filtering criteria is defined here.</p><p>You can make use of wildcards. Multiple patterns are separated by space (means logical OR) and patterns are excluded from the search using the pipe symbol.</p><p>If the pattern is ended with a slash (<code>*pattern*/</code>), that means that pattern relates to recursive search of directories.<ul><li><code>pattern</code> - means to search those files/directories that name is <code>pattern</code>, recursive search goes through all subdirectories independently of the value of <code>pattern</code></li><li><code>pattern/</code> - means to search all files/directories, but recursive search goes through/excludes the directories that name is <code>pattern</code></li></ul><p></p><p>It's allowed to use quotation marks for names that contain space. Filter <code>\"Program&nbsp;Files\"</code> searches out those files/directories that name is <code>Program&nbsp;Files</code>.</p><p>Examples:<ul><code><li>*.o</li><li>*.h *.c\?\?</li><li>*.cpp *.h | *.tqmoc.cpp</li><li>* | CVS/ .svn/</li></code></ul><b>Note</b>: the search term '<code>text</code>' is equivalent to '<code>*text*</code>'.</p>");
+ TQWhatsThis::add(searchFor, s);
+ TQWhatsThis::add(searchForLabel, s);
- QLabel *searchType = new QLabel( nameGroup, "searchType" );
+ TQLabel *searchType = new TQLabel( nameGroup, "searchType" );
searchType->setText( i18n( "&Of type:" ) );
nameGroupLayout->addWidget( searchType, 1, 0 );
ofType = new KComboBox( false, nameGroup, "ofType" );
- ofType->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, ofType->sizePolicy().hasHeightForWidth() ) );
+ ofType->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, ofType->sizePolicy().hasHeightForWidth() ) );
ofType->setEditable( false );
searchType->setBuddy(ofType);
ofType->insertItem(i18n("All Files"));
@@ -101,41 +101,41 @@ GeneralFilter::GeneralFilter( FilterTabs *tabs, int properties, QWidget *parent,
nameGroupLayout->addWidget( ofType, 1, 1 );
filterLayout->addWidget( nameGroup, 0, 0 );
- middleLayout = new QHBoxLayout();
+ middleLayout = new TQHBoxLayout();
middleLayout->setSpacing( 6 );
middleLayout->setMargin( 0 );
- QSpacerItem* middleSpacer = new QSpacerItem( 1, 1, QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQSpacerItem* middleSpacer = new TQSpacerItem( 1, 1, TQSizePolicy::Fixed, TQSizePolicy::Fixed );
middleLayout->addItem( middleSpacer );
if( properties & FilterTabs::HasProfileHandler )
{
// The profile handler
- QGroupBox *profileHandler = new QGroupBox( this, "profileHandler" );
+ TQGroupBox *profileHandler = new TQGroupBox( this, "profileHandler" );
profileHandler->setTitle( i18n( "&Profile handler" ) );
profileHandler->setColumnLayout(0, Qt::Vertical );
- profileHandler->layout()->setSpacing( 0 );
- profileHandler->layout()->setMargin( 0 );
- QGridLayout *profileLayout = new QGridLayout( profileHandler->layout() );
- profileLayout->setAlignment( Qt::AlignTop );
+ profileHandler->tqlayout()->setSpacing( 0 );
+ profileHandler->tqlayout()->setMargin( 0 );
+ TQGridLayout *profileLayout = new TQGridLayout( profileHandler->tqlayout() );
+ profileLayout->tqsetAlignment( TQt::AlignTop );
profileLayout->setSpacing( 6 );
profileLayout->setMargin( 11 );
- profileListBox = new QListBox( profileHandler, "profileListBox" );
+ profileListBox = new TQListBox( profileHandler, "profileListBox" );
profileLayout->addMultiCellWidget( profileListBox, 0, 3, 0, 0 );
- profileAddBtn = new QPushButton( i18n( "&Add" ), profileHandler, "profileAddBtn" );
+ profileAddBtn = new TQPushButton( i18n( "&Add" ), profileHandler, "profileAddBtn" );
profileLayout->addWidget( profileAddBtn, 0, 1 );
- profileLoadBtn = new QPushButton( i18n( "&Load" ), profileHandler, "profileLoadBtn" );
+ profileLoadBtn = new TQPushButton( i18n( "&Load" ), profileHandler, "profileLoadBtn" );
profileLoadBtn->setEnabled( false );
profileLayout->addWidget( profileLoadBtn, 1, 1 );
- profileOverwriteBtn = new QPushButton( i18n( "&Overwrite" ), profileHandler, "profileOverwriteBtn" );
+ profileOverwriteBtn = new TQPushButton( i18n( "&Overwrite" ), profileHandler, "profileOverwriteBtn" );
profileOverwriteBtn->setEnabled( false );
profileLayout->addWidget( profileOverwriteBtn, 2, 1 );
- profileRemoveBtn = new QPushButton( i18n( "&Remove" ), profileHandler, "profileRemoveBtn" );
+ profileRemoveBtn = new TQPushButton( i18n( "&Remove" ), profileHandler, "profileRemoveBtn" );
profileRemoveBtn->setEnabled( false );
profileLayout->addWidget( profileRemoveBtn, 3, 1 );
@@ -151,13 +151,13 @@ GeneralFilter::GeneralFilter( FilterTabs *tabs, int properties, QWidget *parent,
{
// Options for search in
- QGroupBox *searchInGroup = new QGroupBox( this, "searchInGroup" );
+ TQGroupBox *searchInGroup = new TQGroupBox( this, "searchInGroup" );
searchInGroup->setTitle( i18n( "&Search in" ) );
searchInGroup->setColumnLayout(0, Qt::Vertical );
- searchInGroup->layout()->setSpacing( 0 );
- searchInGroup->layout()->setMargin( 0 );
- QGridLayout *searchInLayout = new QGridLayout( searchInGroup->layout() );
- searchInLayout->setAlignment( Qt::AlignTop );
+ searchInGroup->tqlayout()->setSpacing( 0 );
+ searchInGroup->tqlayout()->setMargin( 0 );
+ TQGridLayout *searchInLayout = new TQGridLayout( searchInGroup->tqlayout() );
+ searchInLayout->tqsetAlignment( TQt::AlignTop );
searchInLayout->setSpacing( 6 );
searchInLayout->setMargin( 11 );
@@ -171,13 +171,13 @@ GeneralFilter::GeneralFilter( FilterTabs *tabs, int properties, QWidget *parent,
{
// Options for don't search in
- QGroupBox *dontSearchInGroup = new QGroupBox( this, "dontSearchInGroup" );
+ TQGroupBox *dontSearchInGroup = new TQGroupBox( this, "dontSearchInGroup" );
dontSearchInGroup->setTitle( i18n( "&Don't search in" ) );
dontSearchInGroup->setColumnLayout(0, Qt::Vertical );
- dontSearchInGroup->layout()->setSpacing( 0 );
- dontSearchInGroup->layout()->setMargin( 0 );
- QGridLayout *dontSearchInLayout = new QGridLayout( dontSearchInGroup->layout() );
- dontSearchInLayout->setAlignment( Qt::AlignTop );
+ dontSearchInGroup->tqlayout()->setSpacing( 0 );
+ dontSearchInGroup->tqlayout()->setMargin( 0 );
+ TQGridLayout *dontSearchInLayout = new TQGridLayout( dontSearchInGroup->tqlayout() );
+ dontSearchInLayout->tqsetAlignment( TQt::AlignTop );
dontSearchInLayout->setSpacing( 6 );
dontSearchInLayout->setMargin( 11 );
@@ -191,27 +191,27 @@ GeneralFilter::GeneralFilter( FilterTabs *tabs, int properties, QWidget *parent,
// Options for containing text
- QGroupBox *containsGroup = new QGroupBox( this, "containsGroup" );
+ TQGroupBox *containsGroup = new TQGroupBox( this, "containsGroup" );
containsGroup->setTitle( i18n( "Containing text" ) );
containsGroup->setColumnLayout(0, Qt::Vertical );
- containsGroup->layout()->setSpacing( 0 );
- containsGroup->layout()->setMargin( 0 );
- QGridLayout *containsLayout = new QGridLayout( containsGroup->layout() );
- containsLayout->setAlignment( Qt::AlignTop );
+ containsGroup->tqlayout()->setSpacing( 0 );
+ containsGroup->tqlayout()->setMargin( 0 );
+ TQGridLayout *containsLayout = new TQGridLayout( containsGroup->tqlayout() );
+ containsLayout->tqsetAlignment( TQt::AlignTop );
containsLayout->setSpacing( 6 );
containsLayout->setMargin( 11 );
- QHBoxLayout *containsTextLayout = new QHBoxLayout();
+ TQHBoxLayout *containsTextLayout = new TQHBoxLayout();
containsTextLayout->setSpacing( 6 );
containsTextLayout->setMargin( 0 );
- QLabel *containsLabel = new QLabel( containsGroup, "containsLabel" );
- containsLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)1, containsLabel->sizePolicy().hasHeightForWidth() ) );
+ TQLabel *containsLabel = new TQLabel( containsGroup, "containsLabel" );
+ containsLabel->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)1, containsLabel->sizePolicy().hasHeightForWidth() ) );
containsLabel->setText( i18n( "&Text:" ) );
containsTextLayout->addWidget( containsLabel );
containsText = new KHistoryCombo( false, containsGroup, "containsText" );
- containsText->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, containsText->sizePolicy().hasHeightForWidth() ) );
+ containsText->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, containsText->sizePolicy().hasHeightForWidth() ) );
containsText->setDuplicatesEnabled( false );
containsText->setMaxCount( 25 );
containsTextLayout->addWidget( containsText );
@@ -219,28 +219,28 @@ GeneralFilter::GeneralFilter( FilterTabs *tabs, int properties, QWidget *parent,
containsLayout->addLayout( containsTextLayout, 0, 0 );
- QHBoxLayout *containsCbsLayout = new QHBoxLayout();
+ TQHBoxLayout *containsCbsLayout = new TQHBoxLayout();
containsCbsLayout->setSpacing( 6 );
containsCbsLayout->setMargin( 0 );
- QSpacerItem* cbSpacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* cbSpacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
containsCbsLayout->addItem( cbSpacer );
- remoteContentSearch = new QCheckBox( containsGroup, "remoteContentSearch" );
- remoteContentSearch->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, remoteContentSearch->sizePolicy().hasHeightForWidth() ) );
+ remoteContentSearch = new TQCheckBox( containsGroup, "remoteContentSearch" );
+ remoteContentSearch->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, remoteContentSearch->sizePolicy().hasHeightForWidth() ) );
remoteContentSearch->setText( i18n( "&Remote content search" ) );
remoteContentSearch->setChecked( false );
containsCbsLayout->addWidget( remoteContentSearch );
if( !( properties & FilterTabs::HasRemoteContentSearch ) )
remoteContentSearch->hide();
- containsWholeWord = new QCheckBox( containsGroup, "containsWholeWord" );
- containsWholeWord->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, containsWholeWord->sizePolicy().hasHeightForWidth() ) );
+ containsWholeWord = new TQCheckBox( containsGroup, "containsWholeWord" );
+ containsWholeWord->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, containsWholeWord->sizePolicy().hasHeightForWidth() ) );
containsWholeWord->setText( i18n( "&Match whole word only" ) );
containsWholeWord->setChecked( false );
containsCbsLayout->addWidget( containsWholeWord );
- containsTextCase = new QCheckBox( containsGroup, "containsTextCase" );
- containsTextCase->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, containsTextCase->sizePolicy().hasHeightForWidth() ) );
+ containsTextCase = new TQCheckBox( containsGroup, "containsTextCase" );
+ containsTextCase->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, containsTextCase->sizePolicy().hasHeightForWidth() ) );
containsTextCase->setText( i18n( "Cas&e sensitive" ) );
containsTextCase->setChecked( true );
containsCbsLayout->addWidget( containsTextCase );
@@ -253,22 +253,22 @@ GeneralFilter::GeneralFilter( FilterTabs *tabs, int properties, QWidget *parent,
{
// Options for recursive searching
- QHBoxLayout *recurseLayout = new QHBoxLayout();
+ TQHBoxLayout *recurseLayout = new TQHBoxLayout();
recurseLayout->setSpacing( 6 );
recurseLayout->setMargin( 0 );
- QSpacerItem* recurseSpacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* recurseSpacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
recurseLayout->addItem( recurseSpacer );
- searchInDirs = new QCheckBox( this, "searchInDirs" );
+ searchInDirs = new TQCheckBox( this, "searchInDirs" );
searchInDirs->setText( i18n( "Search in s&ubdirectories" ) );
searchInDirs->setChecked( true );
recurseLayout->addWidget( searchInDirs );
- searchInArchives = new QCheckBox( this, "searchInArchives" );
+ searchInArchives = new TQCheckBox( this, "searchInArchives" );
searchInArchives->setText( i18n( "Search in arch&ives" ) );
recurseLayout->addWidget( searchInArchives );
- followLinks = new QCheckBox( this, "followLinks" );
+ followLinks = new TQCheckBox( this, "followLinks" );
followLinks->setText( i18n( "Follow &links" ) );
recurseLayout->addWidget( followLinks );
@@ -279,22 +279,22 @@ GeneralFilter::GeneralFilter( FilterTabs *tabs, int properties, QWidget *parent,
if( properties & FilterTabs::HasProfileHandler )
{
- connect( profileAddBtn, SIGNAL(clicked()) , this, SLOT( slotAddBtnClicked() ) );
- connect( profileLoadBtn, SIGNAL(clicked()) , this, SLOT( slotLoadBtnClicked() ) );
- connect( profileOverwriteBtn, SIGNAL(clicked()) , this, SLOT( slotOverwriteBtnClicked() ) );
- connect( profileRemoveBtn, SIGNAL(clicked()) , this, SLOT( slotRemoveBtnClicked() ) );
- connect( profileListBox, SIGNAL(doubleClicked(QListBoxItem *)) , this, SLOT( slotProfileDoubleClicked(QListBoxItem *) ) );
- connect( profileManager, SIGNAL(loadFromProfile(QString )), fltTabs, SLOT( loadFromProfile(QString ) ) );
- connect( profileManager, SIGNAL(saveToProfile(QString )), fltTabs, SLOT( saveToProfile(QString ) ) );
+ connect( profileAddBtn, TQT_SIGNAL(clicked()) , this, TQT_SLOT( slotAddBtnClicked() ) );
+ connect( profileLoadBtn, TQT_SIGNAL(clicked()) , this, TQT_SLOT( slotLoadBtnClicked() ) );
+ connect( profileOverwriteBtn, TQT_SIGNAL(clicked()) , this, TQT_SLOT( slotOverwriteBtnClicked() ) );
+ connect( profileRemoveBtn, TQT_SIGNAL(clicked()) , this, TQT_SLOT( slotRemoveBtnClicked() ) );
+ connect( profileListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem *)) , this, TQT_SLOT( slotProfileDoubleClicked(TQListBoxItem *) ) );
+ connect( profileManager, TQT_SIGNAL(loadFromProfile(TQString )), fltTabs, TQT_SLOT( loadFromProfile(TQString ) ) );
+ connect( profileManager, TQT_SIGNAL(saveToProfile(TQString )), fltTabs, TQT_SLOT( saveToProfile(TQString ) ) );
}
- connect( searchFor, SIGNAL(activated(const QString&)), searchFor, SLOT(addToHistory(const QString&)));
- connect( containsText, SIGNAL(activated(const QString&)), containsText, SLOT(addToHistory(const QString&)));
+ connect( searchFor, TQT_SIGNAL(activated(const TQString&)), searchFor, TQT_SLOT(addToHistory(const TQString&)));
+ connect( containsText, TQT_SIGNAL(activated(const TQString&)), containsText, TQT_SLOT(addToHistory(const TQString&)));
// load the completion and history lists
// ==> search for
krConfig->setGroup("Search");
- QStringList list = krConfig->readListEntry("SearchFor Completion");
+ TQStringList list = krConfig->readListEntry("SearchFor Completion");
searchFor->completionObject()->setItems(list);
list = krConfig->readListEntry("SearchFor History");
searchFor->setHistoryItems(list);
@@ -313,7 +313,7 @@ GeneralFilter::~GeneralFilter()
{
// save the history combos
// ==> search for
- QStringList list = searchFor->completionObject()->items();
+ TQStringList list = searchFor->completionObject()->items();
krConfig->setGroup("Search");
krConfig->writeEntry("SearchFor Completion", list);
list = searchFor->historyItems();
@@ -351,7 +351,7 @@ bool GeneralFilter::fillQuery( KRQuery *query )
if (ofType->currentText()!=i18n("All Files"))
query->setMimeType( ofType->currentText() );
- else query->setMimeType( QString::null );
+ else query->setMimeType( TQString() );
if ( properties & FilterTabs::HasRecurseOptions )
{
@@ -386,7 +386,7 @@ void GeneralFilter::queryAccepted()
containsText->addToHistory(containsText->currentText());
}
-void GeneralFilter::loadFromProfile( QString name )
+void GeneralFilter::loadFromProfile( TQString name )
{
krConfig->setGroup( name );
@@ -397,7 +397,7 @@ void GeneralFilter::loadFromProfile( QString name )
containsText->setEditText( krConfig->readEntry( "Contains Text", "" ) );
searchFor->setEditText( krConfig->readEntry( "Search For", "" ) );
- QString mime = krConfig->readEntry( "Mime Type", "" );
+ TQString mime = krConfig->readEntry( "Mime Type", "" );
for( int i = ofType->count(); i >= 0; i-- )
{
ofType->setCurrentItem( i );
@@ -417,7 +417,7 @@ void GeneralFilter::loadFromProfile( QString name )
searchIn->lineEdit()->setText( krConfig->readEntry( "Search In Edit", "" ) );
searchIn->listBox()->clear();
- QStringList searchInList = krConfig->readListEntry( "Search In List" );
+ TQStringList searchInList = krConfig->readListEntry( "Search In List" );
if( !searchInList.isEmpty() )
searchIn->listBox()->insertStringList( searchInList );
}
@@ -427,13 +427,13 @@ void GeneralFilter::loadFromProfile( QString name )
dontSearchIn->lineEdit()->setText( krConfig->readEntry( "Dont Search In Edit", "" ) );
dontSearchIn->listBox()->clear();
- QStringList dontSearchInList = krConfig->readListEntry( "Dont Search In List" );
+ TQStringList dontSearchInList = krConfig->readListEntry( "Dont Search In List" );
if( !dontSearchInList.isEmpty() )
dontSearchIn->listBox()->insertStringList( dontSearchInList );
}
}
-void GeneralFilter::saveToProfile( QString name )
+void GeneralFilter::saveToProfile( TQString name )
{
krConfig->setGroup( name );
@@ -457,8 +457,8 @@ void GeneralFilter::saveToProfile( QString name )
{
krConfig->writeEntry( "Search In Edit", searchIn->lineEdit()->text() );
- QStringList searchInList;
- for ( QListBoxItem *item = searchIn->listBox()->firstItem(); item != 0; item = item->next() )
+ TQStringList searchInList;
+ for ( TQListBoxItem *item = searchIn->listBox()->firstItem(); item != 0; item = item->next() )
searchInList.append( item->text().simplifyWhiteSpace() );
krConfig->writeEntry( "Search In List", searchInList );
}
@@ -467,8 +467,8 @@ void GeneralFilter::saveToProfile( QString name )
{
krConfig->writeEntry( "Dont Search In Edit", dontSearchIn->lineEdit()->text() );
- QStringList dontSearchInList;
- for ( QListBoxItem *item = dontSearchIn->listBox()->firstItem(); item != 0; item = item->next() )
+ TQStringList dontSearchInList;
+ for ( TQListBoxItem *item = dontSearchIn->listBox()->firstItem(); item != 0; item = item->next() )
dontSearchInList.append( item->text().simplifyWhiteSpace() );
krConfig->writeEntry( "Dont Search In List", dontSearchInList );
}
@@ -501,14 +501,14 @@ void GeneralFilter::slotAddBtnClicked()
void GeneralFilter::slotOverwriteBtnClicked()
{
- QListBoxItem *item = profileListBox->item( profileListBox->currentItem() );
+ TQListBoxItem *item = profileListBox->item( profileListBox->currentItem() );
if( item != 0 )
profileManager->overwriteProfile( item->text() );
}
void GeneralFilter::slotRemoveBtnClicked()
{
- QListBoxItem *item = profileListBox->item( profileListBox->currentItem() );
+ TQListBoxItem *item = profileListBox->item( profileListBox->currentItem() );
if( item != 0 )
{
profileManager->deleteProfile( item->text() );
@@ -516,11 +516,11 @@ void GeneralFilter::slotRemoveBtnClicked()
}
}
-void GeneralFilter::slotProfileDoubleClicked( QListBoxItem *item )
+void GeneralFilter::slotProfileDoubleClicked( TQListBoxItem *item )
{
if( item != 0 )
{
- QString profileName = item->text();
+ TQString profileName = item->text();
profileManager->loadProfile( profileName );
fltTabs->close( true );
}
@@ -528,7 +528,7 @@ void GeneralFilter::slotProfileDoubleClicked( QListBoxItem *item )
void GeneralFilter::slotLoadBtnClicked()
{
- QListBoxItem *item = profileListBox->item( profileListBox->currentItem() );
+ TQListBoxItem *item = profileListBox->item( profileListBox->currentItem() );
if( item != 0 )
profileManager->loadProfile( item->text() );
}
diff --git a/krusader/Filter/generalfilter.h b/krusader/Filter/generalfilter.h
index 24e3b87..807785a 100644
--- a/krusader/Filter/generalfilter.h
+++ b/krusader/Filter/generalfilter.h
@@ -36,28 +36,29 @@
#include "../Dialogs/kurllistrequester.h"
#include "../GUI/profilemanager.h"
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlistbox.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
#include <kcombobox.h>
#include <kshellcompletion.h>
-class GeneralFilter : public QWidget, public FilterBase
+class GeneralFilter : public TQWidget, public FilterBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- GeneralFilter( FilterTabs *tabs, int properties, QWidget *parent = 0, const char *name = 0 );
+ GeneralFilter( FilterTabs *tabs, int properties, TQWidget *tqparent = 0, const char *name = 0 );
~GeneralFilter();
virtual bool fillQuery( KRQuery *query );
virtual void queryAccepted();
- virtual void loadFromProfile( QString name );
- virtual void saveToProfile( QString name );
- virtual QString name() { return "GeneralFilter";}
+ virtual void loadFromProfile( TQString name );
+ virtual void saveToProfile( TQString name );
+ virtual TQString name() { return "GeneralFilter";}
virtual FilterTabs * filterTabs() { return fltTabs; }
public slots:
@@ -65,21 +66,21 @@ public slots:
void slotLoadBtnClicked();
void slotOverwriteBtnClicked();
void slotRemoveBtnClicked();
- void slotProfileDoubleClicked( QListBoxItem * );
+ void slotProfileDoubleClicked( TQListBoxItem * );
void refreshProfileListBox();
public:
- QCheckBox* searchForCase;
- QCheckBox* remoteContentSearch;
- QCheckBox* containsTextCase;
- QCheckBox* containsWholeWord;
- QCheckBox* searchInDirs;
- QCheckBox* searchInArchives;
- QCheckBox* followLinks;
+ TQCheckBox* searchForCase;
+ TQCheckBox* remoteContentSearch;
+ TQCheckBox* containsTextCase;
+ TQCheckBox* containsWholeWord;
+ TQCheckBox* searchInDirs;
+ TQCheckBox* searchInArchives;
+ TQCheckBox* followLinks;
KURLListRequester *searchIn;
KURLListRequester *dontSearchIn;
- QHBoxLayout *middleLayout;
+ TQHBoxLayout *middleLayout;
KHistoryCombo* searchFor;
KHistoryCombo* containsText;
@@ -88,12 +89,12 @@ public:
KShellCompletion completion;
- QListBox* profileListBox;
+ TQListBox* profileListBox;
- QPushButton *profileAddBtn;
- QPushButton *profileLoadBtn;
- QPushButton *profileOverwriteBtn;
- QPushButton *profileRemoveBtn;
+ TQPushButton *profileAddBtn;
+ TQPushButton *profileLoadBtn;
+ TQPushButton *profileOverwriteBtn;
+ TQPushButton *profileRemoveBtn;
ProfileManager *profileManager;
diff --git a/krusader/GUI/dirhistorybutton.cpp b/krusader/GUI/dirhistorybutton.cpp
index 1863782..de3c744 100644
--- a/krusader/GUI/dirhistorybutton.cpp
+++ b/krusader/GUI/dirhistorybutton.cpp
@@ -19,16 +19,16 @@
#include "dirhistoryqueue.h"
#include "../VFS/vfs.h"
-#include <qpopupmenu.h>
-#include <qdir.h>
+#include <tqpopupmenu.h>
+#include <tqdir.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kdebug.h>
-DirHistoryButton::DirHistoryButton( DirHistoryQueue* hQ, QWidget *parent, const char *name ) : QToolButton( parent, name ) {
+DirHistoryButton::DirHistoryButton( DirHistoryQueue* hQ, TQWidget *tqparent, const char *name ) : TQToolButton( tqparent, name ) {
KIconLoader * iconLoader = new KIconLoader();
- QPixmap icon = iconLoader->loadIcon( "history", KIcon::Toolbar, 16 );
+ TQPixmap icon = iconLoader->loadIcon( "history", KIcon::Toolbar, 16 );
setFixedSize( icon.width() + 4, icon.height() + 4 );
setPixmap( icon );
@@ -36,7 +36,7 @@ DirHistoryButton::DirHistoryButton( DirHistoryQueue* hQ, QWidget *parent, const
setPopupDelay( 10 ); // 0.01 seconds press
setAcceptDrops( false );
- popupMenu = new QPopupMenu( this );
+ popupMenu = new TQPopupMenu( this );
Q_CHECK_PTR( popupMenu );
setPopup( popupMenu );
@@ -44,16 +44,16 @@ DirHistoryButton::DirHistoryButton( DirHistoryQueue* hQ, QWidget *parent, const
historyQueue = hQ;
- connect( popupMenu, SIGNAL( aboutToShow() ), this, SLOT( slotAboutToShow() ) );
- connect( popupMenu, SIGNAL( activated( int ) ), this, SLOT( slotPopupActivated( int ) ) );
+ connect( popupMenu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotAboutToShow() ) );
+ connect( popupMenu, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotPopupActivated( int ) ) );
}
DirHistoryButton::~DirHistoryButton() {}
void DirHistoryButton::openPopup() {
- QPopupMenu * pP = popup();
+ TQPopupMenu * pP = popup();
if ( pP ) {
- popup() ->exec( mapToGlobal( QPoint( 0, height() ) ) );
+ popup() ->exec( mapToGlobal( TQPoint( 0, height() ) ) );
}
}
/** No descriptions */
diff --git a/krusader/GUI/dirhistorybutton.h b/krusader/GUI/dirhistorybutton.h
index 643795a..50bdbf0 100644
--- a/krusader/GUI/dirhistorybutton.h
+++ b/krusader/GUI/dirhistorybutton.h
@@ -18,27 +18,28 @@
#ifndef DIRHISTORYBUTTON_H
#define DIRHISTORYBUTTON_H
-#include <qwidget.h>
-#include <qtoolbutton.h>
+#include <tqwidget.h>
+#include <tqtoolbutton.h>
#include <kurl.h>
-class QPopupMenu;
+class TQPopupMenu;
class DirHistoryQueue;
/**
*@author Shie Erlich & Rafi Yanai
*/
-class DirHistoryButton : public QToolButton {
+class DirHistoryButton : public TQToolButton {
Q_OBJECT
+ TQ_OBJECT
public:
- DirHistoryButton(DirHistoryQueue* hQ, QWidget *parent=0, const char *name=0);
+ DirHistoryButton(DirHistoryQueue* hQ, TQWidget *tqparent=0, const char *name=0);
~DirHistoryButton();
void openPopup();
private:
- QPopupMenu* popupMenu;
+ TQPopupMenu* popupMenu;
DirHistoryQueue* historyQueue;
public slots: // Public slots
diff --git a/krusader/GUI/dirhistoryqueue.cpp b/krusader/GUI/dirhistoryqueue.cpp
index a66d47f..8a6d89e 100644
--- a/krusader/GUI/dirhistoryqueue.cpp
+++ b/krusader/GUI/dirhistoryqueue.cpp
@@ -23,7 +23,7 @@
DirHistoryQueue::DirHistoryQueue( ListPanel* p ) {
panel = p;
- connect( panel, SIGNAL( pathChanged( ListPanel* ) ), this, SLOT( slotPathChanged( ListPanel* ) ) );
+ connect( panel, TQT_SIGNAL( pathChanged( ListPanel* ) ), this, TQT_SLOT( slotPathChanged( ListPanel* ) ) );
}
DirHistoryQueue::~DirHistoryQueue() {}
@@ -31,7 +31,7 @@ DirHistoryQueue::~DirHistoryQueue() {}
void DirHistoryQueue::slotPathChanged( ListPanel* p ) {
KURL url = p->virtualPath();
// already in the queue ?
- if( urlQueue.findIndex( url ) >= 0 ){
+ if( urlQueue.tqfindIndex( url ) >= 0 ){
// remove it !
urlQueue.remove( url );
}
@@ -58,21 +58,21 @@ void DirHistoryQueue::addUrl(const KURL& url){
pathQueue.push_front( path );
}
-void DirHistoryQueue::RemovePath( const QString& path ) {
- QStringList::iterator it;
- it = pathQueue.find( path );
+void DirHistoryQueue::RemovePath( const TQString& path ) {
+ TQStringList::iterator it;
+ it = pathQueue.tqfind( path );
if ( it != pathQueue.end() ) {
pathQueue.remove( it );
}
}
-bool DirHistoryQueue::checkPath( const QString& path ) {
+bool DirHistoryQueue::checkPath( const TQString& path ) {
KURL url( path );
- QString p = url.path();
+ TQString p = url.path();
// kdDebug() << "url:" << p << ", file: " << url.fileName() << ", dir: " << url.directory() << endl;
if ( url.protocol() == "file" ) {
- QDir dir( path );
+ TQDir dir( path );
if ( !dir.exists() ) {
RemovePath( path );
return false;
diff --git a/krusader/GUI/dirhistoryqueue.h b/krusader/GUI/dirhistoryqueue.h
index 21665f8..ff8573e 100644
--- a/krusader/GUI/dirhistoryqueue.h
+++ b/krusader/GUI/dirhistoryqueue.h
@@ -15,10 +15,10 @@
* *
***************************************************************************/
-#ifndef DIRHISTORYQUEUE_H
-#define DIRHISTORYQUEUE_H
+#ifndef DIRHISTORYTQUEUE_H
+#define DIRHISTORYTQUEUE_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
class ListPanel;
@@ -27,14 +27,15 @@ class ListPanel;
*@author Shie Erlich & Rafi Yanai
*/
-class DirHistoryQueue : public QObject {
+class DirHistoryQueue : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
DirHistoryQueue(ListPanel* p);
~DirHistoryQueue();
KURL::List urlQueue;
-// bool checkPath(const QString& path);
-// void RemovePath(const QString& path);
+// bool checkPath(const TQString& path);
+// void RemovePath(const TQString& path);
public slots: // Public slots
/** No descriptions */
diff --git a/krusader/GUI/kcmdline.cpp b/krusader/GUI/kcmdline.cpp
index 46e360f..2aeb759 100644
--- a/krusader/GUI/kcmdline.cpp
+++ b/krusader/GUI/kcmdline.cpp
@@ -32,10 +32,10 @@
#include "kcmdline.h"
#include "stdlib.h"
#include <unistd.h>
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
#include <kprocess.h>
-#include <qiconset.h>
-#include <qwhatsthis.h>
+#include <tqiconset.h>
+#include <tqwhatsthis.h>
#include <unistd.h>
#include "../krusader.h"
#include "../kicons.h"
@@ -47,30 +47,30 @@
#include "../krservices.h"
#include "../ActionMan/addplaceholderpopup.h"
#include "kcmdmodebutton.h"
-#include <qdir.h>
+#include <tqdir.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kglobalsettings.h>
-#include <qfontmetrics.h>
-#include <qimage.h>
-#include <qstringlist.h>
-#include <qsizepolicy.h>
+#include <tqfontmetrics.h>
+#include <tqimage.h>
+#include <tqstringlist.h>
+#include <tqsizepolicy.h>
#include <ktempfile.h>
-KCMDLine::KCMDLine( QWidget *parent, const char *name ) : QWidget( parent, name ) {
- QGridLayout * layout = new QGridLayout( this, 1, 4 );
- path = new QLabel( this );
- QWhatsThis::add
+KCMDLine::KCMDLine( TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name ) {
+ TQGridLayout * tqlayout = new TQGridLayout( this, 1, 4 );
+ path = new TQLabel( this );
+ TQWhatsThis::add
( path, i18n( "Name of directory where command will be processed." ) );
- path->setAlignment( Qt::AlignRight );
- path->setFrameStyle( QFrame::Box | QFrame::Sunken );
+ path->tqsetAlignment( TQt::AlignRight );
+ path->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
path->setLineWidth( 1 );
path->setFont( KGlobalSettings::generalFont() );
- int height = QFontMetrics( KGlobalSettings::generalFont() ).height();
+ int height = TQFontMetrics( KGlobalSettings::generalFont() ).height();
height = height + 5*(height > 14) + 6;
path->setMaximumHeight( height );
- path->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred));
- layout->addWidget( path, 0, 0 );
+ path->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Preferred));
+ tqlayout->addWidget( path, 0, 0 );
// and editable command line
completion.setMode( KURLCompletion::FileCompletion );
@@ -80,48 +80,48 @@ KCMDLine::KCMDLine( QWidget *parent, const char *name ) : QWidget( parent, name
cmdLine->setFont( KGlobalSettings::generalFont() );
cmdLine->setMaximumHeight( height );
cmdLine->setCompletionObject( &completion );
- cmdLine->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
+ cmdLine->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed));
// load the history
KConfigGroupSaver grpSvr( krConfig, "Private" );
- QStringList list = krConfig->readListEntry( "cmdline history" );
+ TQStringList list = krConfig->readListEntry( "cmdline history" );
cmdLine->setHistoryItems( list );
- connect( cmdLine, SIGNAL( returnPressed(const QString &) ), this, SLOT( slotRun() ) );
- connect( cmdLine, SIGNAL( returnPressed(const QString &) ), cmdLine, SLOT( clearEdit() ) );
- connect( cmdLine, SIGNAL( returnToPanel() ), this, SLOT( slotReturnFocus() ));
+ connect( cmdLine, TQT_SIGNAL( returnPressed(const TQString &) ), this, TQT_SLOT( slotRun() ) );
+ connect( cmdLine, TQT_SIGNAL( returnPressed(const TQString &) ), cmdLine, TQT_SLOT( clearEdit() ) );
+ connect( cmdLine, TQT_SIGNAL( returnToPanel() ), this, TQT_SLOT( slotReturnFocus() ));
- QWhatsThis::add
+ TQWhatsThis::add
( cmdLine, i18n( "<qt><p>Well, it's actually quite simple: You type your command here and Krusader obeys.</p><p><b>Tip</b>: Move within command line history with &lt;Up&gt; and &lt;Down&gt; arrows.</p></qt>" ) );
- layout->addWidget( cmdLine, 0, 1 );
+ tqlayout->addWidget( cmdLine, 0, 1 );
- buttonAddPlaceholder = new QToolButton( this, "ButtonAddPlaceholder" );
+ buttonAddPlaceholder = new TQToolButton( this, "ButtonAddPlaceholder" );
buttonAddPlaceholder->setFixedSize(22,20);
buttonAddPlaceholder->adjustSize();
buttonAddPlaceholder->setPixmap( SmallIcon( "add" ) );
- connect( buttonAddPlaceholder, SIGNAL( clicked() ), this, SLOT( addPlaceholder() ) );
- QWhatsThis::add( buttonAddPlaceholder, i18n( "Add <b>Placeholders</b> for the selected files in the panel." ) );
+ connect( buttonAddPlaceholder, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addPlaceholder() ) );
+ TQWhatsThis::add( buttonAddPlaceholder, i18n( "Add <b>Placeholders</b> for the selected files in the panel." ) );
- layout->addWidget( buttonAddPlaceholder, 0, 2 );
+ tqlayout->addWidget( buttonAddPlaceholder, 0, 2 );
// a run in terminal button
terminal = new KCMDModeButton( this );
- layout->addWidget( terminal, 0, 3 );
+ tqlayout->addWidget( terminal, 0, 3 );
- layout->activate();
+ tqlayout->activate();
}
void KCMDLine::addPlaceholder() {
AddPlaceholderPopup popup( this );
- QString exp = popup.getPlaceholder(
- buttonAddPlaceholder->mapToGlobal( QPoint( 0, 0) )
+ TQString exp = popup.getPlaceholder(
+ buttonAddPlaceholder->mapToGlobal( TQPoint( 0, 0) )
);
this->addText( exp );
}
-void KCMDLine::setCurrent( const QString &p ) {
+void KCMDLine::setCurrent( const TQString &p ) {
- QString pathName = p;
- QFontMetrics fm(path->fontMetrics());
+ TQString pathName = p;
+ TQFontMetrics fm(path->fontMetrics());
int textWidth = fm.width(pathName);
int maxWidth = ( cmdLine->width() + path->width() ) * 2 / 5;
int letters = p.length() / 2;
@@ -143,26 +143,26 @@ void KCMDLine::setCurrent( const QString &p ) {
KCMDLine::~KCMDLine() {
KConfigGroupSaver grpSvr( krConfig, "Private" );
- QStringList list = cmdLine->historyItems();
+ TQStringList list = cmdLine->historyItems();
//krOut << list[0] << endl;
krConfig->writeEntry( "cmdline history", list );
krConfig->sync();
}
void KCMDLine::slotRun() {
- const QString command1(cmdLine->currentText());
+ const TQString command1(cmdLine->currentText());
if ( command1.isEmpty() )
return ;
- QString panelPath = path->text().left( path->text().length() - 1 );
+ TQString panelPath = path->text().left( path->text().length() - 1 );
cmdLine->addToHistory(command1);
if ( command1.simplifyWhiteSpace().left( 3 ) == "cd " ) { // cd command effect the active panel
- QString dir = command1.right( command1.length() - command1.find( " " ) ).stripWhiteSpace();
+ TQString dir = command1.right( command1.length() - command1.tqfind( " " ) ).stripWhiteSpace();
if ( dir == "~" )
- dir = QDir::homeDirPath();
+ dir = TQDir::homeDirPath();
else
- if ( dir.left( 1 ) != "/" && !dir.contains( ":/" ) )
+ if ( dir.left( 1 ) != "/" && !dir.tqcontains( ":/" ) )
dir = panelPath + ( panelPath == "/" ? "" : "/" ) + dir;
SLOTS->refresh( dir );
} else {
@@ -184,7 +184,7 @@ static const KrActionBase::ExecType execModesMenu[] = {
KrActionBase::RunInTE,
};
-QString KCMDLine::command() const {
+TQString KCMDLine::command() const {
return cmdLine->currentText();
}
@@ -194,15 +194,15 @@ KrActionBase::ExecType KCMDLine::execType() const {
return execModesMenu[i];
}
-QString KCMDLine::startpath() const {
+TQString KCMDLine::startpath() const {
return path->text().left( path->text().length() - 1 );
}
-QString KCMDLine::user() const {
- return QString();
+TQString KCMDLine::user() const {
+ return TQString();
}
-QString KCMDLine::text() const {
+TQString KCMDLine::text() const {
return cmdLine->currentText();
}
@@ -218,11 +218,11 @@ bool KCMDLine::doSubstitution() const {
return true;
}
-void KCMDLine::setText(QString text) {
+void KCMDLine::setText(TQString text) {
cmdLine->setCurrentText( text );
}
-void KrHistoryCombo::keyPressEvent( QKeyEvent *e ) {
+void KrHistoryCombo::keyPressEvent( TQKeyEvent *e ) {
switch (e->key()) {
case Key_Enter:
case Key_Return:
diff --git a/krusader/GUI/kcmdline.h b/krusader/GUI/kcmdline.h
index 3c13efb..392d6ae 100644
--- a/krusader/GUI/kcmdline.h
+++ b/krusader/GUI/kcmdline.h
@@ -34,10 +34,10 @@
#define KCMDLINE_H
// QT includes
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
// KDE includes
#include <klineedit.h>
@@ -50,30 +50,32 @@ class KCMDModeButton;
class KrHistoryCombo: public KHistoryCombo {
Q_OBJECT
+ TQ_OBJECT
public:
- KrHistoryCombo(QWidget *parent): KHistoryCombo(parent) {}
+ KrHistoryCombo(TQWidget *tqparent): KHistoryCombo(tqparent) {}
protected:
- void keyPressEvent( QKeyEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
signals:
void returnToPanel();
};
-class KCMDLine : public QWidget, KrActionBase {
+class KCMDLine : public TQWidget, KrActionBase {
Q_OBJECT
+ TQ_OBJECT
public:
- KCMDLine( QWidget *parent = 0, const char *name = 0 );
+ KCMDLine( TQWidget *tqparent = 0, const char *name = 0 );
~KCMDLine();
- void setCurrent( const QString & );
+ void setCurrent( const TQString & );
//virtual methods from KrActionBase
- void setText(QString text);
- QString command() const;
+ void setText(TQString text);
+ TQString command() const;
ExecType execType() const;
- QString startpath() const;
- QString user() const;
- QString text() const;
+ TQString startpath() const;
+ TQString user() const;
+ TQString text() const;
bool acceptURLs() const;
bool confirmExecution() const;
bool doSubstitution() const;
@@ -84,15 +86,15 @@ class KCMDLine : public QWidget, KrActionBase {
void slotReturnFocus(); // returns keyboard focus to panel
void slotRun();
void addPlaceholder();
- void addText( QString text ) { cmdLine->setCurrentText( cmdLine->currentText() + text ); }
+ void addText( TQString text ) { cmdLine->setCurrentText( cmdLine->currentText() + text ); }
void popup() { cmdLine->popup(); }
private:
- QLabel *path;
+ TQLabel *path;
KrHistoryCombo *cmdLine;
KCMDModeButton *terminal;
- QToolButton *buttonAddPlaceholder;
+ TQToolButton *buttonAddPlaceholder;
KShellCompletion completion;
};
diff --git a/krusader/GUI/kcmdmodebutton.cpp b/krusader/GUI/kcmdmodebutton.cpp
index 46960bc..5e84d1c 100644
--- a/krusader/GUI/kcmdmodebutton.cpp
+++ b/krusader/GUI/kcmdmodebutton.cpp
@@ -32,11 +32,11 @@
#include <kdebug.h>
-KCMDModeButton::KCMDModeButton( QWidget *parent, const char *name ) : QToolButton( parent, name ) {
+KCMDModeButton::KCMDModeButton( TQWidget *tqparent, const char *name ) : TQToolButton( tqparent, name ) {
setFixedSize( 22, 20 );
/* // from the old terminal-button:
setTextLabel( i18n( "If pressed, Krusader executes command line in a terminal." ) );
- QWhatsThis::add( terminal, i18n(
+ TQWhatsThis::add( terminal, i18n(
"The 'run in terminal' button allows Krusader "
"to run console (or otherwise non-graphical) "
"programs in a terminal of your choice. If it's "
@@ -50,7 +50,7 @@ KCMDModeButton::KCMDModeButton( QWidget *parent, const char *name ) : QToolButto
{
action->insert( *Krusader::execTypeArray[i] );
}
- QPopupMenu *pP = action->popupMenu();
+ TQPopupMenu *pP = action->popupMenu();
Q_CHECK_PTR( pP );
setPopup( pP );
setPopupDelay( 10 );
@@ -63,9 +63,9 @@ KCMDModeButton::~KCMDModeButton() {
/** called when clicked to the button */
void KCMDModeButton::openPopup() {
- QPopupMenu * pP = popup();
+ TQPopupMenu * pP = popup();
if ( pP ) {
- popup() ->exec( mapToGlobal( QPoint( 0, 0 ) ) );
+ popup() ->exec( mapToGlobal( TQPoint( 0, 0 ) ) );
}
}
diff --git a/krusader/GUI/kcmdmodebutton.h b/krusader/GUI/kcmdmodebutton.h
index 1da4a79..9c30c2e 100644
--- a/krusader/GUI/kcmdmodebutton.h
+++ b/krusader/GUI/kcmdmodebutton.h
@@ -23,7 +23,7 @@
#ifndef KCMDMODEBUTTON_H
#define KCMDMODEBUTTON_H
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
class KActionMenu;
@@ -31,14 +31,15 @@ class KActionMenu;
* @author Vaclav Juza
*
* represents a button for switching the command-line execution mode
- * It extends QToolButton, set the icon etc., and creates a popup menu
+ * It extends TQToolButton, set the icon etc., and creates a popup menu
* containing the actions to actually switch the mode.
*/
-class KCMDModeButton : public QToolButton {
+class KCMDModeButton : public TQToolButton {
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor. Sets up the menu, and the icon */
- KCMDModeButton(QWidget *parent=0, const char *name=0);
+ KCMDModeButton(TQWidget *tqparent=0, const char *name=0);
~KCMDModeButton();
/** Shows the popup menu. Called when clicked to the button */
diff --git a/krusader/GUI/kfnkeys.cpp b/krusader/GUI/kfnkeys.cpp
index be48163..96fa6a3 100644
--- a/krusader/GUI/kfnkeys.cpp
+++ b/krusader/GUI/kfnkeys.cpp
@@ -28,17 +28,17 @@
* *
***************************************************************************/
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <kglobalsettings.h>
-#include <qfontmetrics.h>
-#include <qwhatsthis.h>
+#include <tqfontmetrics.h>
+#include <tqwhatsthis.h>
#include "kfnkeys.h"
#include "../krusader.h"
#include "../defaults.h"
#include "../krslots.h"
-KFnKeys::KFnKeys(QWidget *parent, char *name): QWidget(parent,name) {
+KFnKeys::KFnKeys(TQWidget *tqparent, char *name): TQWidget(tqparent,name) {
krConfig->setGroup("Look&Feel");
////////////////////////////////
#define SETUP(TARGET) {\
@@ -46,75 +46,75 @@ KFnKeys::KFnKeys(QWidget *parent, char *name): QWidget(parent,name) {
}
setFont( KGlobalSettings::generalFont() );
- layout=new QGridLayout(this,1,9); // 9 keys
- F2=new QPushButton( i18n("F2 Term ") ,this);
- QToolTip::add( F2, "<qt>" + i18n( "<p>Open terminal in current directory.</p>"
+ tqlayout=new TQGridLayout(this,1,9); // 9 keys
+ F2=new TQPushButton( i18n("F2 Term ") ,this);
+ TQToolTip::add( F2, "<qt>" + i18n( "<p>Open terminal in current directory.</p>"
"<p>The terminal can be defined in Konfigurator, "
"default is <b>konsole</b>.</p>" ) + "</qt>" );
- connect(F2,SIGNAL(clicked()), SLOTS, SLOT(terminal()));
+ connect(F2,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(terminal()));
SETUP(F2);
- F3=new QPushButton( i18n("F3 View ") ,this);
- QToolTip::add( F3, i18n( "Open file in viewer." ) );
- connect(F3,SIGNAL(clicked()), SLOTS, SLOT(view()));
+ F3=new TQPushButton( i18n("F3 View ") ,this);
+ TQToolTip::add( F3, i18n( "Open file in viewer." ) );
+ connect(F3,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(view()));
SETUP(F3);
- F4=new QPushButton( i18n("F4 Edit ") ,this);
- QToolTip::add( F4, "<qt>" + i18n( "<p>Edit file.</p>"
+ F4=new TQPushButton( i18n("F4 Edit ") ,this);
+ TQToolTip::add( F4, "<qt>" + i18n( "<p>Edit file.</p>"
"<p>The editor can be defined in Konfigurator, "
"default is <b>internal editor</b>.</p>" ) + "</qt>" );
- connect(F4,SIGNAL(clicked()), SLOTS, SLOT(edit()));
+ connect(F4,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(edit()));
SETUP(F4);
- F5=new QPushButton( i18n("F5 Copy ") ,this);
- QToolTip::add( F5, i18n( "Copy file from one panel to the other." ) );
- connect(F5,SIGNAL(clicked()), SLOTS, SLOT(copyFiles()));
+ F5=new TQPushButton( i18n("F5 Copy ") ,this);
+ TQToolTip::add( F5, i18n( "Copy file from one panel to the other." ) );
+ connect(F5,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(copyFiles()));
SETUP(F5);
- F6=new QPushButton( i18n("F6 Move") ,this);
- QToolTip::add( F6, i18n( "Move file from one panel to the other." ) );
- connect(F6,SIGNAL(clicked()), SLOTS, SLOT(moveFiles()));
+ F6=new TQPushButton( i18n("F6 Move") ,this);
+ TQToolTip::add( F6, i18n( "Move file from one panel to the other." ) );
+ connect(F6,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(moveFiles()));
SETUP(F6);
- F7=new QPushButton( i18n("F7 Mkdir ") ,this);
- QToolTip::add( F7, i18n( "Create directory in current panel." ) );
- connect(F7,SIGNAL(clicked()), SLOTS, SLOT(mkdir()));
+ F7=new TQPushButton( i18n("F7 Mkdir ") ,this);
+ TQToolTip::add( F7, i18n( "Create directory in current panel." ) );
+ connect(F7,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(mkdir()));
SETUP(F7);
- F8=new QPushButton( i18n("F8 Delete") ,this);
- QToolTip::add( F8, i18n( "Delete file, directory, etc." ) );
- connect(F8,SIGNAL(clicked()), SLOTS, SLOT(deleteFiles()));
+ F8=new TQPushButton( i18n("F8 Delete") ,this);
+ TQToolTip::add( F8, i18n( "Delete file, directory, etc." ) );
+ connect(F8,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(deleteFiles()));
SETUP(F8);
- F9=new QPushButton( i18n("F9 Rename") ,this);
- QToolTip::add( F9, i18n( "Rename file, directory, etc." ) );
- connect(F9,SIGNAL(clicked()), SLOTS, SLOT(rename()));
+ F9=new TQPushButton( i18n("F9 Rename") ,this);
+ TQToolTip::add( F9, i18n( "Rename file, directory, etc." ) );
+ connect(F9,TQT_SIGNAL(clicked()), SLOTS, TQT_SLOT(rename()));
SETUP(F9);
- F10=new QPushButton( i18n("F10 Quit ") ,this);
- QToolTip::add( F10, i18n( "Quit Krusader." ) );
- connect(F10,SIGNAL(clicked()),krApp, SLOT(slotClose()));
+ F10=new TQPushButton( i18n("F10 Quit ") ,this);
+ TQToolTip::add( F10, i18n( "Quit Krusader." ) );
+ connect(F10,TQT_SIGNAL(clicked()),krApp, TQT_SLOT(slotClose()));
SETUP(F10);
// set a tighter box around the keys
- int h = QFontMetrics(F2->font()).height()+2;
+ int h = TQFontMetrics(F2->font()).height()+2;
F2->setMaximumHeight(h); F3->setMaximumHeight(h);
F4->setMaximumHeight(h); F5->setMaximumHeight(h);
F6->setMaximumHeight(h); F7->setMaximumHeight(h);
F8->setMaximumHeight(h); F9->setMaximumHeight(h);
F10->setMaximumHeight(h);
- layout->addWidget(F2,0,0);
- layout->addWidget(F3,0,1);
- layout->addWidget(F4,0,2);
- layout->addWidget(F5,0,3);
- layout->addWidget(F6,0,4);
- layout->addWidget(F7,0,5);
- layout->addWidget(F8,0,6);
- layout->addWidget(F9,0,7);
- layout->addWidget(F10,0,8);
+ tqlayout->addWidget(F2,0,0);
+ tqlayout->addWidget(F3,0,1);
+ tqlayout->addWidget(F4,0,2);
+ tqlayout->addWidget(F5,0,3);
+ tqlayout->addWidget(F6,0,4);
+ tqlayout->addWidget(F7,0,5);
+ tqlayout->addWidget(F8,0,6);
+ tqlayout->addWidget(F9,0,7);
+ tqlayout->addWidget(F10,0,8);
- layout->activate();
+ tqlayout->activate();
}
void KFnKeys::updateShortcuts() {
diff --git a/krusader/GUI/kfnkeys.h b/krusader/GUI/kfnkeys.h
index d25b9d1..955387c 100644
--- a/krusader/GUI/kfnkeys.h
+++ b/krusader/GUI/kfnkeys.h
@@ -32,23 +32,24 @@
#ifndef KFNKEYS_H
#define KFNKEYS_H
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
// Function Keys widget
///////////////////////
-class KFnKeys : public QWidget {
+class KFnKeys : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
// constructor
- KFnKeys(QWidget *parent, char *name=0);
+ KFnKeys(TQWidget *tqparent, char *name=0);
void updateShortcuts();
private:
- QPushButton *F2 ,*F3,*F4,*F5,*F6,*F7,*F8,*F9,*F10;
- QGridLayout *layout;
+ TQPushButton *F2 ,*F3,*F4,*F5,*F6,*F7,*F8,*F9,*F10;
+ TQGridLayout *tqlayout;
};
#endif
diff --git a/krusader/GUI/krremoteencodingmenu.cpp b/krusader/GUI/krremoteencodingmenu.cpp
index 4563356..0bd246e 100644
--- a/krusader/GUI/krremoteencodingmenu.cpp
+++ b/krusader/GUI/krremoteencodingmenu.cpp
@@ -41,12 +41,12 @@
#include "krremoteencodingmenu.h"
-#define DATA_KEY QString::fromLatin1("Charset")
+#define DATA_KEY TQString::tqfromLatin1("Charset")
-KrRemoteEncodingMenu::KrRemoteEncodingMenu(const QString &text, const QString &icon, QObject *parent, const char *name) :
- KActionMenu( text, icon, parent, name ), settingsLoaded( false )
+KrRemoteEncodingMenu::KrRemoteEncodingMenu(const TQString &text, const TQString &icon, TQObject *tqparent, const char *name) :
+ KActionMenu( text, icon, tqparent, name ), settingsLoaded( false )
{
- connect(popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotAboutToShow()));
+ connect(popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotAboutToShow()));
}
void KrRemoteEncodingMenu::slotAboutToShow()
@@ -60,13 +60,13 @@ void KrRemoteEncodingMenu::slotAboutToShow()
KURL currentURL = ACTIVE_PANEL->virtualPath();
- QString charset = KIO::SlaveConfig::self()->configData(currentURL.protocol(), currentURL.host(), DATA_KEY);
+ TQString charset = KIO::SlaveConfig::self()->configData(currentURL.protocol(), currentURL.host(), DATA_KEY);
if (!charset.isEmpty())
{
int id = 1;
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for (it = encodingNames.begin(); it != encodingNames.end(); ++it, ++id)
- if ((*it).find(charset) != -1)
+ if ((*it).tqfind(charset) != -1)
break;
// kdDebug() << k_funcinfo << "URL=" << currentURL << " charset=" << charset << endl;
@@ -88,22 +88,22 @@ void KrRemoteEncodingMenu::loadSettings()
KPopupMenu *menu = popupMenu();
menu->clear();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
int count = 0;
for (it = encodingNames.begin(); it != encodingNames.end(); ++it)
- menu->insertItem(*it, this, SLOT(slotItemSelected(int)), 0, ++count);
+ menu->insertItem(*it, this, TQT_SLOT(slotItemSelected(int)), 0, ++count);
menu->insertSeparator();
- menu->insertItem(i18n("Reload"), this, SLOT(slotReload()), 0, ++count);
- menu->insertItem(i18n("Default"), this, SLOT(slotDefault()), 0, ++count);
+ menu->insertItem(i18n("Reload"), this, TQT_SLOT(slotReload()), 0, ++count);
+ menu->insertItem(i18n("Default"), this, TQT_SLOT(slotDefault()), 0, ++count);
defaultID = count;
}
-int KrRemoteEncodingMenu::plug( QWidget *widget, int index )
+int KrRemoteEncodingMenu::plug( TQWidget *widget, int index )
{
- if( widget->inherits( "QPopupMenu" ) )
+ if( widget->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) )
{
- connect( widget, SIGNAL(aboutToShow()), this, SLOT(slotCheckEnabled()));
+ connect( widget, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotCheckEnabled()));
slotCheckEnabled();
}
@@ -121,11 +121,11 @@ void KrRemoteEncodingMenu::slotItemSelected(int id)
KURL currentURL = ACTIVE_PANEL->virtualPath();
KConfig config(("kio_" + currentURL.protocol() + "rc").latin1());
- QString host = currentURL.host();
+ TQString host = currentURL.host();
if (!popupMenu()->isItemChecked(id))
{
- QString charset = KGlobal::charsets()->encodingForName( encodingNames[id - 1] );
+ TQString charset = KGlobal::charsets()->encodingForName( encodingNames[id - 1] );
config.setGroup(host);
config.writeEntry(DATA_KEY, charset);
@@ -149,12 +149,12 @@ void KrRemoteEncodingMenu::slotDefault()
// settings here since it affects what will be matched.
KConfig config(("kio_" + currentURL.protocol() + "rc").latin1());
- QStringList partList = QStringList::split('.', currentURL.host(), false);
+ TQStringList partList = TQStringList::split('.', currentURL.host(), false);
if (!partList.isEmpty())
{
partList.remove(partList.begin());
- QStringList domains;
+ TQStringList domains;
// Remove the exact name match...
domains << currentURL.host();
@@ -171,7 +171,7 @@ void KrRemoteEncodingMenu::slotDefault()
partList.remove(partList.begin());
}
- for (QStringList::Iterator it = domains.begin(); it != domains.end(); it++)
+ for (TQStringList::Iterator it = domains.begin(); it != domains.end(); it++)
{
// kdDebug() << k_funcinfo << "Domain to remove: " << *it << endl;
if (config.hasGroup(*it))
@@ -194,14 +194,14 @@ void KrRemoteEncodingMenu::updateKIOSlaves()
if (!client->attach())
kdDebug() << "Can't connect with DCOP server." << endl;
- QByteArray data;
- QDataStream stream(data, IO_WriteOnly);
- stream << QString::null;
- client->send("*", "KIO::Scheduler", "reparseSlaveConfiguration(QString)", data);
+ TQByteArray data;
+ TQDataStream stream(data, IO_WriteOnly);
+ stream << TQString();
+ client->send("*", "KIO::Scheduler", "reparseSlaveConfiguration(TQString)", data);
delete client;
// Reload the page with the new charset
- QTimer::singleShot( 500, ACTIVE_FUNC, SLOT( refresh() ) );
+ TQTimer::singleShot( 500, ACTIVE_FUNC, TQT_SLOT( refresh() ) );
}
#include "krremoteencodingmenu.moc"
diff --git a/krusader/GUI/krremoteencodingmenu.h b/krusader/GUI/krremoteencodingmenu.h
index 9ee4680..8b7f04b 100644
--- a/krusader/GUI/krremoteencodingmenu.h
+++ b/krusader/GUI/krremoteencodingmenu.h
@@ -32,7 +32,7 @@
#ifndef REMOTEENCODING_MENU_H
#define REMOTEENCODING_MENU_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <klibloader.h>
#include <kaction.h>
@@ -40,10 +40,11 @@
class KrRemoteEncodingMenu: public KActionMenu
{
Q_OBJECT
+ TQ_OBJECT
public:
- KrRemoteEncodingMenu (const QString &text, const QString &icon, QObject *parent=0, const char *name=0);
+ KrRemoteEncodingMenu (const TQString &text, const TQString &icon, TQObject *tqparent=0, const char *name=0);
- virtual int plug( QWidget *widget, int index = -1);
+ virtual int plug( TQWidget *widget, int index = -1);
protected slots:
@@ -59,7 +60,7 @@ private:
void loadSettings();
void updateKIOSlaves();
- QStringList encodingNames;
+ TQStringList encodingNames;
bool settingsLoaded;
int defaultID;
};
diff --git a/krusader/GUI/krusaderstatus.cpp b/krusader/GUI/krusaderstatus.cpp
index ad11308..51c3340 100644
--- a/krusader/GUI/krusaderstatus.cpp
+++ b/krusader/GUI/krusaderstatus.cpp
@@ -29,18 +29,18 @@
***************************************************************************/
// Krusader includes
-#include <qfontmetrics.h>
+#include <tqfontmetrics.h>
#include "krusaderstatus.h"
#include "../resources.h"
-KrusaderStatus::KrusaderStatus(QWidget *parent, const char *name ):
- KStatusBar(parent,name){
+KrusadertqStatus::KrusadertqStatus(TQWidget *tqparent, const char *name ):
+ KStatusBar(tqparent,name){
insertItem(i18n("Ready."), S_READY_ID);
- setMaximumHeight(QFontMetrics(font()).height()+2);
+ setMaximumHeight(TQFontMetrics(font()).height()+2);
}
-KrusaderStatus::~KrusaderStatus(){
+KrusadertqStatus::~KrusadertqStatus(){
}
#include "krusaderstatus.moc"
diff --git a/krusader/GUI/krusaderstatus.h b/krusader/GUI/krusaderstatus.h
index 45a4cf5..bbfaa49 100644
--- a/krusader/GUI/krusaderstatus.h
+++ b/krusader/GUI/krusaderstatus.h
@@ -34,22 +34,23 @@
#define KRUSADERSTATUS_H
// QT includes
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qframe.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
+#include <tqframe.h>
// KDE includes
#include <kstatusbar.h>
#include <klocale.h>
-class KrusaderStatus : public KStatusBar {
+class KrusadertqStatus : public KStatusBar {
Q_OBJECT
+ TQ_OBJECT
public:
- KrusaderStatus(QWidget *parent=0, const char *name=0);
- ~KrusaderStatus();
+ KrusadertqStatus(TQWidget *tqparent=0, const char *name=0);
+ ~KrusadertqStatus();
private:
- QLabel *mess;
+ TQLabel *mess;
};
diff --git a/krusader/GUI/mediabutton.cpp b/krusader/GUI/mediabutton.cpp
index 65e8fc9..9208290 100644
--- a/krusader/GUI/mediabutton.cpp
+++ b/krusader/GUI/mediabutton.cpp
@@ -36,9 +36,9 @@
#include "../MountMan/kdiskfreesp.h"
#include "../MountMan/kmountman.h"
-#include <qpopupmenu.h>
-#include <qfile.h>
-#include <qfontmetrics.h>
+#include <tqpopupmenu.h>
+#include <tqfile.h>
+#include <tqfontmetrics.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -50,7 +50,7 @@
#include <kprotocolinfo.h>
#include <kfileitem.h>
#include <kprocess.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#ifdef Q_OS_LINUX
// For CD/DVD drive detection
@@ -65,16 +65,16 @@
#define CDC_CD_R 0x2000 /* drive is a CD-R */
#define CDC_CD_RW 0x4000 /* drive is a CD-RW */
#define CDC_DVD 0x8000 /* drive is a DVD */
-#include <qfile.h>
+#include <tqfile.h>
#endif
-MediaButton::MediaButton( QWidget *parent, const char *name ) : QToolButton( parent, name ),
+MediaButton::MediaButton( TQWidget *tqparent, const char *name ) : TQToolButton( tqparent, name ),
popupMenu( 0 ), rightMenu( 0 ), hasMedia( false ), waitingForMount( -1 ), mountCheckerTimer()
{
KIconLoader * iconLoader = new KIconLoader();
- QPixmap icon = iconLoader->loadIcon( "blockdevice", KIcon::Toolbar, 16 );
+ TQPixmap icon = iconLoader->loadIcon( "blockdevice", KIcon::Toolbar, 16 );
setFixedSize( icon.width() + 4, icon.height() + 4 );
setPixmap( icon );
@@ -82,17 +82,17 @@ MediaButton::MediaButton( QWidget *parent, const char *name ) : QToolButton( par
setPopupDelay( 1 ); // immediate press
setAcceptDrops( false );
- popupMenu = new QPopupMenu( this );
+ popupMenu = new TQPopupMenu( this );
popupMenu->installEventFilter( this );
Q_CHECK_PTR( popupMenu );
setPopup( popupMenu );
- connect( popupMenu, SIGNAL( aboutToShow() ), this, SLOT( slotAboutToShow() ) );
- connect( popupMenu, SIGNAL( aboutToHide() ), this, SLOT( slotAboutToHide() ) );
- connect( popupMenu, SIGNAL( activated( int ) ), this, SLOT( slotPopupActivated( int ) ) );
+ connect( popupMenu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotAboutToShow() ) );
+ connect( popupMenu, TQT_SIGNAL( aboutToHide() ), this, TQT_SLOT( slotAboutToHide() ) );
+ connect( popupMenu, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotPopupActivated( int ) ) );
- connect( &mountCheckerTimer, SIGNAL( timeout() ), this, SLOT( slotTimeout() ) );
+ connect( &mountCheckerTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTimeout() ) );
}
MediaButton::~MediaButton() {
@@ -100,7 +100,7 @@ MediaButton::~MediaButton() {
}
void MediaButton::slotAboutToShow() {
- hasMedia = KProtocolInfo::isKnownProtocol( QString( "media" ) );
+ hasMedia = KProtocolInfo::isKnownProtocol( TQString( "media" ) );
krConfig->setGroup( "Advanced" );
if( krConfig->readBoolEntry( "DontUseMediaProt", !hasMedia ) )
hasMedia = false;
@@ -130,14 +130,14 @@ void MediaButton::slotAboutToHide() {
void MediaButton::createListWithMedia() {
KIO::ListJob *job = KIO::listDir( KURL( "media:/" ), false );
- connect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- this, SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotListResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
+ this, TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotListResult( KIO::Job* ) ) );
busy = true;
if( !busy )
- qApp->processEvents();
+ tqApp->processEvents();
}
void MediaButton::slotEntries( KIO::Job *, const KIO::UDSEntryList& entries )
@@ -150,9 +150,9 @@ void MediaButton::slotEntries( KIO::Job *, const KIO::UDSEntryList& entries )
while( it != end )
{
KURL url;
- QString text;
- QString mime;
- QString localPath;
+ TQString text;
+ TQString mime;
+ TQString localPath;
bool mounted = false;
KIO::UDSEntry::ConstIterator it2 = (*it).begin();
@@ -180,20 +180,20 @@ void MediaButton::slotEntries( KIO::Job *, const KIO::UDSEntryList& entries )
if( text != "." && text != ".." ) {
int index = popupMenu->count();
- QPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mime ) ->icon( QString::null, true ) );
+ TQPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mime ) ->icon( TQString(), true ) );
mediaUrls.append( url );
if( mounted && !localPath.isEmpty() )
{
url = KURL::fromPathOrURL( localPath );
- if( !text.contains( url.path() ) )
+ if( !text.tqcontains( url.path() ) )
text += " [" + url.path() + "]";
}
else if( mounted )
{
url = getLocalPath( url, &mountList );
- if( url.isLocalFile() && !text.contains( url.path() ) )
+ if( url.isLocalFile() && !text.tqcontains( url.path() ) )
text += " [" + url.path() + "]";
}
@@ -219,10 +219,10 @@ KURL MediaButton::getLocalPath( const KURL &url, KMountPoint::List *mountList )
}
for (KMountPoint::List::iterator it = mountList->begin(); it != mountList->end(); ++it) {
- QString name = (*it)->mountedFrom();
- name = name.mid( name.findRev( "/" ) + 1 );
+ TQString name = (*it)->mountedFrom();
+ name = name.mid( name.tqfindRev( "/" ) + 1 );
if( name == url.fileName() ) {
- QString point = (*it)->mountPoint();
+ TQString point = (*it)->mountPoint();
if( !point.isEmpty() )
return KURL::fromPathOrURL( point );
}
@@ -244,7 +244,7 @@ void MediaButton::createListWithoutMedia() {
the buggy widget resize. These are extra spaces. */
extraSpaces = "";
- QFontMetrics fm( popupMenu->font() );
+ TQFontMetrics fm( popupMenu->font() );
int requiredWidth = fm.width( "999.9 GB " );
while( fm.width( extraSpaces ) < requiredWidth )
extraSpaces+=" ";
@@ -261,15 +261,15 @@ void MediaButton::createListWithoutMedia() {
}
}
-QString MediaButton::detectType( KMountPoint *mp )
+TQString MediaButton::detectType( KMountPoint *mp )
{
- QString typeName = QString::null;
+ TQString typeName = TQString();
#ifdef Q_OS_LINUX
// Guessing device types by mount point is not exactly accurate...
// Do something accurate first, and fall back if necessary.
bool isCd=false;
- QString devname=mp->mountedFrom().section('/', -1);
+ TQString devname=mp->mountedFrom().section('/', -1);
if(devname.startsWith("scd") || devname.startsWith("sr"))
{
// SCSI CD/DVD drive
@@ -280,19 +280,19 @@ QString MediaButton::detectType( KMountPoint *mp )
// IDE device -- we can't tell if this is a
// CD/DVD drive or harddisk by just looking at the
// filename
- QFile m(QString("/proc/ide/") + devname + "/media");
+ TQFile m(TQString("/proc/ide/") + devname + "/media");
if(m.open(IO_ReadOnly))
{
- QTextStream in(&m);
- QString buf=in.readLine();
- if(buf.contains("cdrom"))
+ TQTextStream in(&m);
+ TQString buf=in.readLine();
+ if(buf.tqcontains("cdrom"))
isCd=true;
m.close();
}
}
if(isCd)
{
- int device=::open((const char *)QFile::encodeName(mp->mountedFrom()), O_RDONLY | O_NONBLOCK );
+ int device=::open((const char *)TQFile::encodeName(mp->mountedFrom()), O_RDONLY | O_NONBLOCK );
if(device>=0)
{
int drv=::ioctl(device, CDROM_GET_CAPABILITY, CDSL_CURRENT);
@@ -315,44 +315,44 @@ QString MediaButton::detectType( KMountPoint *mp )
return typeName;
#elif defined(__FreeBSD__)
- if (-1!=mp->mountedFrom().find("/acd",0,FALSE)) typeName="cdrom";
- else if (-1!=mp->mountedFrom().find("/scd",0,FALSE)) typeName="cdrom";
- else if (-1!=mp->mountedFrom().find("/ad",0,FALSE)) typeName="hdd";
- else if (-1!=mp->mountedFrom().find("/da",0,FALSE)) typeName="hdd";
- else if (-1!=mp->mountedFrom().find("/afd",0,FALSE)) typeName="zip";
+ if (-1!=mp->mountedFrom().tqfind("/acd",0,FALSE)) typeName="cdrom";
+ else if (-1!=mp->mountedFrom().tqfind("/scd",0,FALSE)) typeName="cdrom";
+ else if (-1!=mp->mountedFrom().tqfind("/ad",0,FALSE)) typeName="hdd";
+ else if (-1!=mp->mountedFrom().tqfind("/da",0,FALSE)) typeName="hdd";
+ else if (-1!=mp->mountedFrom().tqfind("/afd",0,FALSE)) typeName="zip";
else
#endif
/* Guessing of cdrom and cd recorder devices */
- if (-1!=mp->mountPoint().find("cdrom",0,FALSE)) typeName="cdrom";
- else if (-1!=mp->mountedFrom().find("cdrom",0,FALSE)) typeName="cdrom";
- else if (-1!=mp->mountPoint().find("cdwriter",0,FALSE)) typeName="cdwriter";
- else if (-1!=mp->mountedFrom().find("cdwriter",0,FALSE)) typeName="cdwriter";
- else if (-1!=mp->mountedFrom().find("cdrw",0,FALSE)) typeName="cdwriter";
- else if (-1!=mp->mountPoint().find("cdrw",0,FALSE)) typeName="cdwriter";
- else if (-1!=mp->mountedFrom().find("cdrecorder",0,FALSE)) typeName="cdwriter";
- else if (-1!=mp->mountPoint().find("cdrecorder",0,FALSE)) typeName="cdwriter";
- else if (-1!=mp->mountedFrom().find("dvdrecorder",0,FALSE)) typeName="dvdwriter";
- else if (-1!=mp->mountPoint().find("dvdrecorder",0,FALSE)) typeName="dvdwriter";
- else if (-1!=mp->mountPoint().find("dvdwriter",0,FALSE)) typeName="dvdwriter";
- else if (-1!=mp->mountedFrom().find("dvdwriter",0,FALSE)) typeName="dvdwriter";
- else if (-1!=mp->mountPoint().find("dvd",0,FALSE)) typeName="dvd";
- else if (-1!=mp->mountedFrom().find("dvd",0,FALSE)) typeName="dvd";
- else if (-1!=mp->mountedFrom().find("/dev/scd",0,FALSE)) typeName="cdrom";
- else if (-1!=mp->mountedFrom().find("/dev/sr",0,FALSE)) typeName="cdrom";
+ if (-1!=mp->mountPoint().tqfind("cdrom",0,FALSE)) typeName="cdrom";
+ else if (-1!=mp->mountedFrom().tqfind("cdrom",0,FALSE)) typeName="cdrom";
+ else if (-1!=mp->mountPoint().tqfind("cdwriter",0,FALSE)) typeName="cdwriter";
+ else if (-1!=mp->mountedFrom().tqfind("cdwriter",0,FALSE)) typeName="cdwriter";
+ else if (-1!=mp->mountedFrom().tqfind("cdrw",0,FALSE)) typeName="cdwriter";
+ else if (-1!=mp->mountPoint().tqfind("cdrw",0,FALSE)) typeName="cdwriter";
+ else if (-1!=mp->mountedFrom().tqfind("cdrecorder",0,FALSE)) typeName="cdwriter";
+ else if (-1!=mp->mountPoint().tqfind("cdrecorder",0,FALSE)) typeName="cdwriter";
+ else if (-1!=mp->mountedFrom().tqfind("dvdrecorder",0,FALSE)) typeName="dvdwriter";
+ else if (-1!=mp->mountPoint().tqfind("dvdrecorder",0,FALSE)) typeName="dvdwriter";
+ else if (-1!=mp->mountPoint().tqfind("dvdwriter",0,FALSE)) typeName="dvdwriter";
+ else if (-1!=mp->mountedFrom().tqfind("dvdwriter",0,FALSE)) typeName="dvdwriter";
+ else if (-1!=mp->mountPoint().tqfind("dvd",0,FALSE)) typeName="dvd";
+ else if (-1!=mp->mountedFrom().tqfind("dvd",0,FALSE)) typeName="dvd";
+ else if (-1!=mp->mountedFrom().tqfind("/dev/scd",0,FALSE)) typeName="cdrom";
+ else if (-1!=mp->mountedFrom().tqfind("/dev/sr",0,FALSE)) typeName="cdrom";
/* Guessing of floppy types */
- else if (-1!=mp->mountedFrom().find("fd",0,FALSE)) {
- if (-1!=mp->mountedFrom().find("360",0,FALSE)) typeName="floppy5";
- if (-1!=mp->mountedFrom().find("1200",0,FALSE)) typeName="floppy5";
+ else if (-1!=mp->mountedFrom().tqfind("fd",0,FALSE)) {
+ if (-1!=mp->mountedFrom().tqfind("360",0,FALSE)) typeName="floppy5";
+ if (-1!=mp->mountedFrom().tqfind("1200",0,FALSE)) typeName="floppy5";
else typeName="floppy";
}
- else if (-1!=mp->mountPoint().find("floppy",0,FALSE)) typeName="floppy";
+ else if (-1!=mp->mountPoint().tqfind("floppy",0,FALSE)) typeName="floppy";
- else if (-1!=mp->mountPoint().find("zip",0,FALSE)) typeName="zip";
- else if (-1!=mp->mountType().find("nfs",0,FALSE)) typeName="nfs";
- else if (-1!=mp->mountType().find("smb",0,FALSE)) typeName="smb";
- else if (-1!=mp->mountedFrom().find("//",0,FALSE)) typeName="smb";
+ else if (-1!=mp->mountPoint().tqfind("zip",0,FALSE)) typeName="zip";
+ else if (-1!=mp->mountType().tqfind("nfs",0,FALSE)) typeName="nfs";
+ else if (-1!=mp->mountType().tqfind("smb",0,FALSE)) typeName="smb";
+ else if (-1!=mp->mountedFrom().tqfind("//",0,FALSE)) typeName="smb";
else typeName="hdd";
return typeName;
@@ -370,26 +370,26 @@ void MediaButton::slotPopupActivated( int elem ) {
emit openUrl( urls[ elem ] );
}
-void MediaButton::gettingSpaceData(const QString &mountPoint, unsigned long kBSize, unsigned long, unsigned long ) {
+void MediaButton::gettingSpaceData(const TQString &mountPoint, unsigned long kBSize, unsigned long, unsigned long ) {
KURL mediaURL = KURL::fromPathOrURL( mountPoint );
KIO::filesize_t size = kBSize;
size *= 1024;
- QString sizeText = KIO::convertSize( size );
+ TQString sizeText = KIO::convertSize( size );
for( unsigned i=0; i != urls.size(); i++ ) {
if( mediaURL.equals( urls[ i ], true ) ) {
if( kBSize == 0 ) { // if df gives 0, it means the device is quasy umounted
- QString mime = mimes[ i ];
+ TQString mime = mimes[ i ];
if( mimes[ i ].endsWith( "_mounted" ) ) {
quasiMounted[ i ] = true;
- mimes[ i ] = mimes[ i ].replace( "_mounted", "_unmounted" );
+ mimes[ i ] = mimes[ i ].tqreplace( "_mounted", "_unmounted" );
}
- QPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mimes[ i ] ) ->icon( QString::null, true ) );
+ TQPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mimes[ i ] ) ->icon( TQString(), true ) );
popupMenu->changeItem( i, pixmap, popupMenu->text( i ) );
}
- else if( mimes[ i ].contains( "hdd_" ) )
+ else if( mimes[ i ].tqcontains( "hdd_" ) )
popupMenu->changeItem( i, sizeText + " " + popupMenu->text( i ).stripWhiteSpace() );
return;
}
@@ -397,18 +397,18 @@ void MediaButton::gettingSpaceData(const QString &mountPoint, unsigned long kBSi
}
void MediaButton::openPopup() {
- QPopupMenu * pP = popup();
+ TQPopupMenu * pP = popup();
if ( pP ) {
- popup() ->exec( mapToGlobal( QPoint( 0, height() ) ) );
+ popup() ->exec( mapToGlobal( TQPoint( 0, height() ) ) );
}
}
void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) {
- QString mountString = isMounted ? "_mounted" : "_unmounted";
+ TQString mountString = isMounted ? "_mounted" : "_unmounted";
if( mp->mountPoint() == "/dev/swap" ||
mp->mountPoint() == "/dev/pts" ||
mp->mountPoint().startsWith( "/sys/kernel" ) ||
- mp->mountPoint().find( "/proc" ) == 0 )
+ mp->mountPoint().tqfind( "/proc" ) == 0 )
return;
if( mp->mountType() == "swap" ||
mp->mountType() == "sysfs" ||
@@ -421,7 +421,7 @@ void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) {
return;
if( mp->mountedFrom() == "none" ||
mp->mountedFrom() == "tmpfs" ||
- mp->mountedFrom().find( "shm" ) != -1 )
+ mp->mountedFrom().tqfind( "shm" ) != -1 )
return;
int overwrite = -1;
@@ -433,22 +433,22 @@ void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) {
break;
}
- QString name;
- QString type = detectType( mp );
+ TQString name;
+ TQString type = detectType( mp );
/* WORKAROUND CODE START */
/* add spaces to avoid widget resize in gettingSpaceData,
which is buggy in QT when transparency is set */
- QString extSpc = ( isMounted && type == "hdd" ) ? extraSpaces : "";
+ TQString extSpc = ( isMounted && type == "hdd" ) ? extraSpaces : "";
/* WORKAROUND CODE END */
#if KDE_IS_VERSION(3,4,0)
- QString mimeBase = "media/";
+ TQString mimeBase = "media/";
#else
- QString mimeBase = "kdedevice/";
+ TQString mimeBase = "kdedevice/";
#endif
- QString mime = mimeBase + type + mountString;
+ TQString mime = mimeBase + type + mountString;
if( type == "hdd" )
name = i18n( "Hard Disk" ) ;
@@ -479,11 +479,11 @@ void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) {
if( isMounted ) {
KDiskFreeSp *sp = KDiskFreeSp::findUsageInfo( mp->mountPoint() );
- connect( sp, SIGNAL( foundMountPoint( const QString &, unsigned long, unsigned long, unsigned long ) ),
- this, SLOT( gettingSpaceData( const QString&, unsigned long, unsigned long, unsigned long ) ) );
+ connect( sp, TQT_SIGNAL( foundMountPoint( const TQString &, unsigned long, unsigned long, unsigned long ) ),
+ this, TQT_SLOT( gettingSpaceData( const TQString&, unsigned long, unsigned long, unsigned long ) ) );
}
- QPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mime ) ->icon( QString::null, true ) );
+ TQPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mime ) ->icon( TQString(), true ) );
if( overwrite == -1 ) {
int index = popupMenu->count();
@@ -499,12 +499,12 @@ void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) {
}
}
-bool MediaButton::eventFilter( QObject *o, QEvent *e ) {
- if( o == popupMenu ) {
- if( e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonRelease ) {
- QMouseEvent *m = (QMouseEvent *)e;
- if( m->button() == RightButton ) {
- if( e->type() == QEvent::MouseButtonPress ) {
+bool MediaButton::eventFilter( TQObject *o, TQEvent *e ) {
+ if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(popupMenu) ) {
+ if( e->type() == TQEvent::MouseButtonPress || e->type() == TQEvent::MouseButtonRelease ) {
+ TQMouseEvent *m = TQT_TQMOUSEEVENT(e);
+ if( m->button() == Qt::RightButton ) {
+ if( e->type() == TQEvent::MouseButtonPress ) {
int id = popupMenu->idAt( m->pos() );
if( id != -1 )
rightClickMenu( id );
@@ -521,11 +521,11 @@ void MediaButton::rightClickMenu( int index ) {
if( rightMenu )
rightMenu->close();
- QString mime = mimes[ index ];
- bool ejectable = mime.contains( "dvd_" ) || mime.contains( "dvdwriter_" ) || mime.contains( "cdrom_" ) || mime.contains( "cdwriter_" );
- bool mounted = mime.contains( "_mounted" );
+ TQString mime = mimes[ index ];
+ bool ejectable = mime.tqcontains( "dvd_" ) || mime.tqcontains( "dvdwriter_" ) || mime.tqcontains( "cdrom_" ) || mime.tqcontains( "cdwriter_" );
+ bool mounted = mime.tqcontains( "_mounted" );
- QPopupMenu * myMenu = rightMenu = new QPopupMenu( popupMenu );
+ TQPopupMenu * myMenu = rightMenu = new TQPopupMenu( popupMenu );
myMenu->insertItem( i18n( "Open" ), 1 );
myMenu->insertItem( i18n( "Open in a new tab" ), 2 );
myMenu->insertSeparator();
@@ -535,7 +535,7 @@ void MediaButton::rightClickMenu( int index ) {
myMenu->insertItem( i18n( "Unmount" ), 4 );
if( ejectable )
myMenu->insertItem( i18n( "Eject" ), 5 );
- int result = myMenu->exec( QCursor::pos() );
+ int result = myMenu->exec( TQCursor::pos() );
delete myMenu;
if( rightMenu == myMenu )
rightMenu = 0;
@@ -621,7 +621,7 @@ void MediaButton::slotTimeout() {
for( unsigned index = 0; index < urls.count(); index++ ) {
bool mounted = false;
- QString text = popupMenu->text( index );
+ TQString text = popupMenu->text( index );
if( mediaUrls[ index ].isEmpty() ) {
for (KMountPoint::List::iterator it = mountList.begin(); it != mountList.end(); ++it)
@@ -635,11 +635,11 @@ void MediaButton::slotTimeout() {
urls[ index ] = uri;
mounted = true;
- if( !text.contains( uri.path() ) )
+ if( !text.tqcontains( uri.path() ) )
{
if( text.endsWith( "]" ) )
{
- int ndx = text.findRev( " [" );
+ int ndx = text.tqfindRev( " [" );
if( ndx >0 )
text.truncate( ndx );
}
@@ -651,7 +651,7 @@ void MediaButton::slotTimeout() {
{
if( text.endsWith( "]" ) )
{
- int ndx = text.findRev( " [" );
+ int ndx = text.tqfindRev( " [" );
if( ndx >0 )
text.truncate( ndx );
}
@@ -661,12 +661,12 @@ void MediaButton::slotTimeout() {
if( quasiMounted[ index ] ) // mounted but not listed with DF
mounted = false;
- if( mimes[ index ].contains( "_mounted" ) && !mounted )
- mimes[ index ] = mimes[ index ].replace( "_mounted", "_unmounted" );
- if( mimes[ index ].contains( "_unmounted" ) && mounted )
- mimes[ index ] = mimes[ index ].replace( "_unmounted", "_mounted" );
+ if( mimes[ index ].tqcontains( "_mounted" ) && !mounted )
+ mimes[ index ] = mimes[ index ].tqreplace( "_mounted", "_unmounted" );
+ if( mimes[ index ].tqcontains( "_unmounted" ) && mounted )
+ mimes[ index ] = mimes[ index ].tqreplace( "_unmounted", "_mounted" );
- QPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mimes[ index ] ) ->icon( QString::null, true ) );
+ TQPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mimes[ index ] ) ->icon( TQString(), true ) );
popupMenu->changeItem( index, pixmap, text );
if( ((int)index == waitingForMount) && mounted ) {
diff --git a/krusader/GUI/mediabutton.h b/krusader/GUI/mediabutton.h
index 1158a2b..b57ea1b 100644
--- a/krusader/GUI/mediabutton.h
+++ b/krusader/GUI/mediabutton.h
@@ -31,35 +31,36 @@
#ifndef MEDIABUTTON_H
#define MEDIABUTTON_H
-#include <qwidget.h>
-#include <qtoolbutton.h>
+#include <tqwidget.h>
+#include <tqtoolbutton.h>
#include <kurl.h>
#include <kio/jobclasses.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kmountpoint.h>
-#include <qtimer.h>
+#include <tqtimer.h>
/**
*@author Csaba Karai
*/
-class QPopupMenu;
+class TQPopupMenu;
class KMountPoint;
-class MediaButton : public QToolButton {
+class MediaButton : public TQToolButton {
Q_OBJECT
+ TQ_OBJECT
public:
- MediaButton(QWidget *parent=0, const char *name=0);
+ MediaButton(TQWidget *tqparent=0, const char *name=0);
~MediaButton();
- QString detectType( KMountPoint *mp );
+ TQString detectType( KMountPoint *mp );
public slots:
void slotAboutToShow();
void slotAboutToHide();
void slotTimeout();
void slotPopupActivated( int );
- void gettingSpaceData(const QString &mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail);
+ void gettingSpaceData(const TQString &mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail);
void openPopup();
void slotEntries( KIO::Job*, const KIO::UDSEntryList& );
void slotListResult( KIO::Job* );
@@ -68,7 +69,7 @@ signals:
void openUrl(const KURL&);
protected:
- bool eventFilter( QObject *o, QEvent *e );
+ bool eventFilter( TQObject *o, TQEvent *e );
private:
void createListWithMedia();
@@ -83,8 +84,8 @@ private:
void addMountPoint( KMountPoint *mp, bool isMounted );
- QPopupMenu *popupMenu;
- QPopupMenu *rightMenu;
+ TQPopupMenu *popupMenu;
+ TQPopupMenu *rightMenu;
bool hasMedia;
bool busy;
@@ -93,14 +94,14 @@ private:
bool newTabAfterMount;
int maxMountWait;
- QValueList<KURL> urls;
- QValueList<KURL> mediaUrls;
- QValueList<QString> mimes;
- QValueList<bool> quasiMounted;
+ TQValueList<KURL> urls;
+ TQValueList<KURL> mediaUrls;
+ TQValueList<TQString> mimes;
+ TQValueList<bool> quasiMounted;
- QString extraSpaces; //prevents from increasing the size of the widget
+ TQString extraSpaces; //prevents from increasing the size of the widget
- QTimer mountCheckerTimer;
+ TQTimer mountCheckerTimer;
};
#endif /* MEDIABUTTON_H */
diff --git a/krusader/GUI/profilemanager.cpp b/krusader/GUI/profilemanager.cpp
index b886751..e18e6ab 100644
--- a/krusader/GUI/profilemanager.cpp
+++ b/krusader/GUI/profilemanager.cpp
@@ -32,23 +32,23 @@
#include "profilemanager.h"
#include <klocale.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kpopupmenu.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kinputdialog.h>
#include <kiconloader.h>
-ProfileManager::ProfileManager( QString profileType, QWidget * parent, const char * name )
- : QPushButton( parent, name )
+ProfileManager::ProfileManager( TQString profileType, TQWidget * tqparent, const char * name )
+ : TQPushButton( tqparent, name )
{
setText( "" );
KIconLoader *iconLoader = new KIconLoader();
setPixmap( iconLoader->loadIcon( "kr_profile", KIcon::Toolbar, 16 ) );
- QToolTip::add( this, i18n( "Profiles" ) );
+ TQToolTip::add( this, i18n( "Profiles" ) );
this->profileType = profileType;
- connect( this, SIGNAL( clicked() ), this, SLOT( profilePopup() ) );
+ connect( this, TQT_SIGNAL( clicked() ), this, TQT_SLOT( profilePopup() ) );
krConfig->setGroup("Private");
profileList = krConfig->readListEntry( profileType );
@@ -69,7 +69,7 @@ void ProfileManager::profilePopup()
for( unsigned i=0; i != profileList.count() ; i++ )
{
krConfig->setGroup( profileType + " - " + profileList[i] );
- QString name = krConfig->readEntry( "Name" );
+ TQString name = krConfig->readEntry( "Name" );
popup.insertItem( name, LOAD_ENTRY_ID + i );
removePopup.insertItem( name, REMOVE_ENTRY_ID + i );
overwritePopup.insertItem( name, OVERWRITE_ENTRY_ID + i );
@@ -85,7 +85,7 @@ void ProfileManager::profilePopup()
popup.insertItem(i18n("Add new entry"),ADD_NEW_ENTRY_ID);
- unsigned result=popup.exec(QCursor::pos());
+ unsigned result=popup.exec(TQCursor::pos());
// check out the user's selection
if( result == ADD_NEW_ENTRY_ID )
@@ -107,19 +107,19 @@ void ProfileManager::profilePopup()
}
}
-void ProfileManager::newProfile( QString defaultName )
+void ProfileManager::newProfile( TQString defaultName )
{
- QString profile = KInputDialog::getText( i18n( "Krusader::ProfileManager" ), i18n( "Enter the profile name:" ),
+ TQString profile = KInputDialog::getText( i18n( "Krusader::ProfileManager" ), i18n( "Enter the profile name:" ),
defaultName, 0, this );
if( !profile.isEmpty() )
{
int profileNum = 1;
- while( profileList.contains( QString( "%1" ).arg( profileNum ) ) )
+ while( profileList.tqcontains( TQString( "%1" ).tqarg( profileNum ) ) )
profileNum++;
- QString profileString = QString( "%1" ).arg( profileNum );
- QString profileName = profileType + " - " + profileString;
- profileList.append( QString( "%1" ).arg( profileString ) );
+ TQString profileString = TQString( "%1" ).tqarg( profileNum );
+ TQString profileName = profileType + " - " + profileString;
+ profileList.append( TQString( "%1" ).tqarg( profileString ) );
krConfig->setGroup("Private");
krConfig->writeEntry( profileType, profileList );
@@ -131,12 +131,12 @@ void ProfileManager::newProfile( QString defaultName )
}
}
-void ProfileManager::deleteProfile( QString name )
+void ProfileManager::deleteProfile( TQString name )
{
for( unsigned i=0; i != profileList.count() ; i++ )
{
krConfig->setGroup( profileType + " - " + profileList[ i ] );
- QString currentName = krConfig->readEntry( "Name" );
+ TQString currentName = krConfig->readEntry( "Name" );
if( name == currentName )
{
@@ -151,12 +151,12 @@ void ProfileManager::deleteProfile( QString name )
}
}
-void ProfileManager::overwriteProfile( QString name )
+void ProfileManager::overwriteProfile( TQString name )
{
for( unsigned i=0; i != profileList.count() ; i++ )
{
krConfig->setGroup( profileType + " - " + profileList[ i ] );
- QString currentName = krConfig->readEntry( "Name" );
+ TQString currentName = krConfig->readEntry( "Name" );
if( name == currentName )
{
@@ -166,12 +166,12 @@ void ProfileManager::overwriteProfile( QString name )
}
}
-bool ProfileManager::loadProfile( QString name )
+bool ProfileManager::loadProfile( TQString name )
{
for( unsigned i=0; i != profileList.count() ; i++ )
{
krConfig->setGroup( profileType + " - " + profileList[i] );
- QString currentName = krConfig->readEntry( "Name" );
+ TQString currentName = krConfig->readEntry( "Name" );
if( name == currentName )
{
@@ -182,10 +182,10 @@ bool ProfileManager::loadProfile( QString name )
return false;
}
-QStringList ProfileManager::availableProfiles( QString profileType ) {
+TQStringList ProfileManager::availableProfiles( TQString profileType ) {
krConfig->setGroup("Private");
- QStringList profiles = krConfig->readListEntry( profileType );
- QStringList profileNames;
+ TQStringList profiles = krConfig->readListEntry( profileType );
+ TQStringList profileNames;
for( unsigned i=0; i != profiles.count() ; i++ ) {
krConfig->setGroup( profileType + " - " + profiles[ i ] );
diff --git a/krusader/GUI/profilemanager.h b/krusader/GUI/profilemanager.h
index 7566872..e4d3641 100644
--- a/krusader/GUI/profilemanager.h
+++ b/krusader/GUI/profilemanager.h
@@ -31,39 +31,40 @@
#ifndef PROFILEMANAGER_H
#define PROFILEMANAGER_H
-#include <qpushbutton.h>
-#include <qstring.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
-class ProfileManager : public QPushButton
+class ProfileManager : public TQPushButton
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProfileManager( QString profileType, QWidget * parent = 0, const char * name = 0 );
+ ProfileManager( TQString profileType, TQWidget * tqparent = 0, const char * name = 0 );
/**
* @param profileType Type of the profile (sync, search, ...)
* @return A list of all available profile-names
*/
- static QStringList availableProfiles( QString profileType );
+ static TQStringList availableProfiles( TQString profileType );
- QStringList getNames();
+ TQStringList getNames();
public slots:
void profilePopup();
- void newProfile( QString defaultName = QString::null );
- void deleteProfile( QString name );
- void overwriteProfile( QString name );
- bool loadProfile( QString name );
+ void newProfile( TQString defaultName = TQString() );
+ void deleteProfile( TQString name );
+ void overwriteProfile( TQString name );
+ bool loadProfile( TQString name );
signals:
- void saveToProfile( QString profileName );
- void loadFromProfile( QString profileName );
+ void saveToProfile( TQString profileName );
+ void loadFromProfile( TQString profileName );
private:
- QString profileType;
- QStringList profileList;
+ TQString profileType;
+ TQStringList profileList;
};
#endif /* PROFILEMANAGER_H */
diff --git a/krusader/GUI/syncbrowsebutton.cpp b/krusader/GUI/syncbrowsebutton.cpp
index 7f42594..d59f927 100644
--- a/krusader/GUI/syncbrowsebutton.cpp
+++ b/krusader/GUI/syncbrowsebutton.cpp
@@ -32,7 +32,7 @@ The current version only manages sync-browse and got no mode-switch options.
//#include <kdebug.h>
-SyncBrowseButton::SyncBrowseButton(QWidget *parent, const char *name) : QToolButton(parent,name)
+SyncBrowseButton::SyncBrowseButton(TQWidget *tqparent, const char *name) : TQToolButton(tqparent,name)
{
KIconLoader *iconLoader = new KIconLoader();
_icon_on = iconLoader->loadIcon( "kr_syncbrowse_on", KIcon::Toolbar, 16 );
@@ -46,7 +46,7 @@ SyncBrowseButton::SyncBrowseButton(QWidget *parent, const char *name) : QToolBut
"When active, each directory change is performed in the\n"
"active and inactive panel - if possible." ), true ); //set this as toop-tip (somehow whatsthis::add(this, ...) don't work)
- connect( this, SIGNAL(toggled(bool)), this, SLOT(slotToggled(bool)) );
+ connect( this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled(bool)) );
}
SyncBrowseButton::~SyncBrowseButton() {
diff --git a/krusader/GUI/syncbrowsebutton.h b/krusader/GUI/syncbrowsebutton.h
index 7345151..f22de5d 100644
--- a/krusader/GUI/syncbrowsebutton.h
+++ b/krusader/GUI/syncbrowsebutton.h
@@ -28,7 +28,7 @@ The current version only manages sync-browse and got no mode-switch options.
#ifndef SYNCBROWSEBUTTON_H
#define SYNCBROWSEBUTTON_H
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
// No synchrone browsing
#define SYNCBROWSE_OFF 0
@@ -46,18 +46,19 @@ The current version only manages sync-browse and got no mode-switch options.
#define SYNCBROWSE_COPY 2048
*/
-class SyncBrowseButton : public QToolButton {
+class SyncBrowseButton : public TQToolButton {
Q_OBJECT
+ TQ_OBJECT
public:
- SyncBrowseButton(QWidget *parent=0, const char *name=0);
+ SyncBrowseButton(TQWidget *tqparent=0, const char *name=0);
~SyncBrowseButton();
int state();
protected:
int _state;
- QPixmap _icon_on;
- QPixmap _icon_off;
+ TQPixmap _icon_on;
+ TQPixmap _icon_off;
private slots:
void slotToggled(bool on);
diff --git a/krusader/KViewer/diskusageviewer.cpp b/krusader/KViewer/diskusageviewer.cpp
index 76ad373..9512bb5 100644
--- a/krusader/KViewer/diskusageviewer.cpp
+++ b/krusader/KViewer/diskusageviewer.cpp
@@ -34,10 +34,10 @@
#include "../Panel/panelfunc.h"
#include "diskusageviewer.h"
-DiskUsageViewer::DiskUsageViewer( QWidget *parent, char *name )
- : QWidget( parent, name ), diskUsage( 0 ), statusLabel( 0 )
+DiskUsageViewer::DiskUsageViewer( TQWidget *tqparent, char *name )
+ : TQWidget( tqparent, name ), diskUsage( 0 ), statusLabel( 0 )
{
- layout = new QGridLayout( this, 1, 1 );
+ tqlayout = new TQGridLayout( this, 1, 1 );
}
DiskUsageViewer::~ DiskUsageViewer()
@@ -56,10 +56,10 @@ void DiskUsageViewer::openURL( KURL url )
{
diskUsage = new DiskUsage( "DiskUsageViewer", this );
- connect( diskUsage, SIGNAL( enteringDirectory( Directory * ) ), this, SLOT( slotUpdateStatus() ) );
- connect( diskUsage, SIGNAL( status( QString ) ), this, SLOT( slotUpdateStatus( QString ) ) );
- connect( diskUsage, SIGNAL( newSearch() ), this, SLOT( slotNewSearch() ) );
- layout->addWidget( diskUsage, 0, 0 );
+ connect( diskUsage, TQT_SIGNAL( enteringDirectory( Directory * ) ), this, TQT_SLOT( slotUpdatetqStatus() ) );
+ connect( diskUsage, TQT_SIGNAL( status( TQString ) ), this, TQT_SLOT( slotUpdatetqStatus( TQString ) ) );
+ connect( diskUsage, TQT_SIGNAL( newSearch() ), this, TQT_SLOT( slotNewSearch() ) );
+ tqlayout->addWidget( diskUsage, 0, 0 );
this->show();
diskUsage->show();
@@ -77,11 +77,11 @@ void DiskUsageViewer::openURL( KURL url )
{
if( url.protocol() == baseURL.protocol() && ( !url.hasHost() || url.host() == baseURL.host() ) )
{
- QString baseStr = baseURL.path( 1 ), urlStr = url.path( 1 );
+ TQString baseStr = baseURL.path( 1 ), urlStr = url.path( 1 );
if( urlStr.startsWith( baseStr ) )
{
- QString relURL = urlStr.mid( baseStr.length() );
+ TQString relURL = urlStr.mid( baseStr.length() );
if( relURL.endsWith( "/" ) )
relURL.truncate( relURL.length() -1 );
@@ -103,13 +103,13 @@ void DiskUsageViewer::closeURL()
diskUsage->close();
}
-void DiskUsageViewer::setStatusLabel( QLabel *statLabel, QString pref )
+void DiskUsageViewer::setStatusLabel( TQLabel *statLabel, TQString pref )
{
statusLabel = statLabel;
prefix = pref;
}
-void DiskUsageViewer::slotUpdateStatus( QString status )
+void DiskUsageViewer::slotUpdatetqStatus( TQString status )
{
if( statusLabel ) {
if( status.isEmpty() ) {
diff --git a/krusader/KViewer/diskusageviewer.h b/krusader/KViewer/diskusageviewer.h
index 9049cfd..d393869 100644
--- a/krusader/KViewer/diskusageviewer.h
+++ b/krusader/KViewer/diskusageviewer.h
@@ -33,20 +33,21 @@
#include "../DiskUsage/diskusage.h"
#include <kurl.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
-class DiskUsageViewer : public QWidget
+class DiskUsageViewer : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- DiskUsageViewer( QWidget *parent = 0, char *name = 0 );
+ DiskUsageViewer( TQWidget *tqparent = 0, char *name = 0 );
~DiskUsageViewer();
void openURL( KURL url );
void closeURL();
- void setStatusLabel( QLabel *statLabel, QString pref );
+ void setStatusLabel( TQLabel *statLabel, TQString pref );
inline DiskUsage * getWidget() { return diskUsage; }
@@ -54,15 +55,15 @@ signals:
void openURLRequest(const KURL &);
protected slots:
- void slotUpdateStatus( QString status = QString() );
+ void slotUpdatetqStatus( TQString status = TQString() );
void slotNewSearch();
protected:
DiskUsage *diskUsage;
- QGridLayout *layout;
+ TQGridLayout *tqlayout;
- QLabel *statusLabel;
- QString prefix;
+ TQLabel *statusLabel;
+ TQString prefix;
};
#endif /* DISKUSAGEVIEWER_H */
diff --git a/krusader/KViewer/kimagefilepreview.cpp b/krusader/KViewer/kimagefilepreview.cpp
index 84039e0..dce4fc4 100644
--- a/krusader/KViewer/kimagefilepreview.cpp
+++ b/krusader/KViewer/kimagefilepreview.cpp
@@ -7,12 +7,12 @@
* License. See the file "COPYING" for the exact licensing terms.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -29,19 +29,19 @@
/**** KrusaderImageFilePreview ****/
-KrusaderImageFilePreview::KrusaderImageFilePreview( QWidget *parent )
- : KPreviewWidgetBase( parent ),
+KrusaderImageFilePreview::KrusaderImageFilePreview( TQWidget *tqparent )
+ : KPreviewWidgetBase( tqparent ),
m_job( 0L ) {
- QVBoxLayout *vb = new QVBoxLayout( this, KDialog::marginHint() );
+ TQVBoxLayout *vb = new TQVBoxLayout( this, KDialog::marginHint() );
- imageLabel = new QLabel( this );
- imageLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
- imageLabel->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
- imageLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored ) );
+ imageLabel = new TQLabel( this );
+ imageLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ imageLabel->tqsetAlignment( TQt::AlignHCenter | TQt::AlignVCenter );
+ imageLabel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Ignored ) );
vb->addWidget( imageLabel, 1 );
- timer = new QTimer( this );
- connect( timer, SIGNAL( timeout() ), SLOT( showPreview() ) );
+ timer = new TQTimer( this );
+ connect( timer, TQT_SIGNAL( timeout() ), TQT_SLOT( showPreview() ) );
setSupportedMimeTypes( KIO::PreviewJob::supportedMimeTypes() );
}
@@ -76,23 +76,23 @@ void KrusaderImageFilePreview::showPreview( const KURL &url, bool force ) {
int h = imageLabel->contentsRect().height() - 4;
m_job = createJob( url, w, h );
- connect( m_job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotResult( KIO::Job * ) ) );
- connect( m_job, SIGNAL( gotPreview( const KFileItem*,
- const QPixmap& ) ),
- SLOT( gotPreview( const KFileItem*, const QPixmap& ) ) );
-
- connect( m_job, SIGNAL( failed( const KFileItem* ) ),
- this, SLOT( slotFailed( const KFileItem* ) ) );
+ connect( m_job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotResult( KIO::Job * ) ) );
+ connect( m_job, TQT_SIGNAL( gotPreview( const KFileItem*,
+ const TQPixmap& ) ),
+ TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) ) );
+
+ connect( m_job, TQT_SIGNAL( failed( const KFileItem* ) ),
+ this, TQT_SLOT( slotFailed( const KFileItem* ) ) );
}
}
-void KrusaderImageFilePreview::resizeEvent( QResizeEvent * ) {
+void KrusaderImageFilePreview::resizeEvent( TQResizeEvent * ) {
timer->start( 100, true ); // forces a new preview
}
-QSize KrusaderImageFilePreview::sizeHint() const {
- return QSize( 20, 200 ); // otherwise it ends up huge???
+TQSize KrusaderImageFilePreview::tqsizeHint() const {
+ return TQSize( 20, 200 ); // otherwise it ends up huge???
}
KIO::PreviewJob * KrusaderImageFilePreview::createJob( const KURL& url, int w, int h ) {
@@ -101,7 +101,7 @@ KIO::PreviewJob * KrusaderImageFilePreview::createJob( const KURL& url, int w, i
return KIO::filePreview( urls, w, h, 0, 0, true, false );
}
-void KrusaderImageFilePreview::gotPreview( const KFileItem* item, const QPixmap& pm ) {
+void KrusaderImageFilePreview::gotPreview( const KFileItem* item, const TQPixmap& pm ) {
if ( item->url() == currentURL ) // should always be the case
imageLabel->setPixmap( pm );
}
diff --git a/krusader/KViewer/kimagefilepreview.h b/krusader/KViewer/kimagefilepreview.h
index 7e0caec..8966c5f 100644
--- a/krusader/KViewer/kimagefilepreview.h
+++ b/krusader/KViewer/kimagefilepreview.h
@@ -13,27 +13,28 @@
#ifndef KrusaderImageFilePreview_H
#define KrusaderImageFilePreview_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kurl.h>
#include <kpreviewwidgetbase.h>
-class QCheckBox;
-class QPushButton;
-class QLabel;
-class QTimer;
+class TQCheckBox;
+class TQPushButton;
+class TQLabel;
+class TQTimer;
class KFileDialog;
class KFileItem;
class KrusaderImageFilePreview : public KPreviewWidgetBase {
Q_OBJECT
+ TQ_OBJECT
public:
- KrusaderImageFilePreview( QWidget *parent );
+ KrusaderImageFilePreview( TQWidget *tqparent );
~KrusaderImageFilePreview();
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
public slots:
virtual void showPreview( const KURL &url );
@@ -43,10 +44,10 @@ class KrusaderImageFilePreview : public KPreviewWidgetBase {
void showPreview();
void showPreview( const KURL& url, bool force );
- virtual void gotPreview( const KFileItem*, const QPixmap& );
+ virtual void gotPreview( const KFileItem*, const TQPixmap& );
protected:
- virtual void resizeEvent( QResizeEvent *e );
+ virtual void resizeEvent( TQResizeEvent *e );
virtual KIO::PreviewJob * createJob( const KURL& url,
int w, int h );
@@ -56,9 +57,9 @@ class KrusaderImageFilePreview : public KPreviewWidgetBase {
private:
KURL currentURL;
- QTimer *timer;
- QLabel *imageLabel;
- QLabel *infoLabel;
+ TQTimer *timer;
+ TQLabel *imageLabel;
+ TQLabel *infoLabel;
KIO::PreviewJob *m_job;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/krusader/KViewer/krviewer.cpp b/krusader/KViewer/krviewer.cpp
index 4e73bda..e23dd48 100644
--- a/krusader/KViewer/krviewer.cpp
+++ b/krusader/KViewer/krviewer.cpp
@@ -14,11 +14,11 @@
* (at your option) any later version. *
* *
***************************************************************************/
-// Qt includes
-#include <qdatastream.h>
-#include <qfile.h>
-#include <qpopupmenu.h>
-#include <qtimer.h>
+// TQt includes
+#include <tqdatastream.h>
+#include <tqfile.h>
+#include <tqpopupmenu.h>
+#include <tqtimer.h>
// KDE includes
#include <kmenubar.h>
#include <kmimetype.h>
@@ -50,10 +50,10 @@
#define MODIFIED_ICON "filesaveas"
-QPtrList<KrViewer> KrViewer::viewers;
+TQPtrList<KrViewer> KrViewer::viewers;
-KrViewer::KrViewer( QWidget *parent, const char *name ) :
-KParts::MainWindow( parent, name ), manager( this, this ), tabBar( this ), returnFocusTo( 0 ), returnFocusTab( 0 ),
+KrViewer::KrViewer( TQWidget *tqparent, const char *name ) :
+KParts::MainWindow( tqparent, name ), manager( this, TQT_TQOBJECT(this) ), tabBar( this ), returnFocusTo( 0 ), returnFocusTab( 0 ),
reservedKeys(), reservedKeyIDs() {
//setWFlags(WType_TopLevel | WDestructiveClose);
@@ -63,12 +63,12 @@ KParts::MainWindow( parent, name ), manager( this, this ), tabBar( this ), retur
setAutoSaveSettings( "KrViewerWindow", true );
tmpFile.setAutoDelete( true );
- connect( &manager, SIGNAL( activePartChanged( KParts::Part* ) ),
- this, SLOT( createGUI( KParts::Part* ) ) );
- connect( &tabBar, SIGNAL( currentChanged( QWidget *) ),
- this, SLOT( tabChanged(QWidget*) ) );
- connect( &tabBar, SIGNAL( closeRequest( QWidget *) ),
- this, SLOT( tabCloseRequest(QWidget*) ) );
+ connect( &manager, TQT_SIGNAL( activePartChanged( KParts::Part* ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( createGUI( KParts::Part* ) ) );
+ connect( &tabBar, TQT_SIGNAL( currentChanged( TQWidget *) ),
+ TQT_TQOBJECT(this), TQT_SLOT( tabChanged(TQWidget*) ) );
+ connect( &tabBar, TQT_SIGNAL( closeRequest( TQWidget *) ),
+ TQT_TQOBJECT(this), TQT_SLOT( tabCloseRequest(TQWidget*) ) );
tabBar.setTabReorderingEnabled(false);
#if KDE_IS_VERSION(3,4,0)
@@ -78,28 +78,28 @@ KParts::MainWindow( parent, name ), manager( this, this ), tabBar( this ), retur
// "filesaveas"
setCentralWidget( &tabBar );
- printAction = KStdAction::print( this, SLOT( print() ), 0, 0 );
- copyAction = KStdAction::copy( this, SLOT( copy() ), 0, 0 );
+ printAction = KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT( print() ), 0, 0 );
+ copyAction = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( copy() ), 0, 0 );
- viewerMenu = new QPopupMenu( this );
- viewerMenu->insertItem( i18n( "&Generic viewer" ), this, SLOT( viewGeneric() ), CTRL + SHIFT + Key_G, 1 );
- viewerMenu->insertItem( i18n( "&Text viewer" ), this, SLOT( viewText() ), CTRL + SHIFT + Key_T, 2 );
- viewerMenu->insertItem( i18n( "&Hex viewer" ), this, SLOT( viewHex() ), CTRL + SHIFT + Key_H, 3 );
+ viewerMenu = new TQPopupMenu( this );
+ viewerMenu->insertItem( i18n( "&Generic viewer" ), TQT_TQOBJECT(this), TQT_SLOT( viewGeneric() ), CTRL + SHIFT + Key_G, 1 );
+ viewerMenu->insertItem( i18n( "&Text viewer" ), TQT_TQOBJECT(this), TQT_SLOT( viewText() ), CTRL + SHIFT + Key_T, 2 );
+ viewerMenu->insertItem( i18n( "&Hex viewer" ), TQT_TQOBJECT(this), TQT_SLOT( viewHex() ), CTRL + SHIFT + Key_H, 3 );
viewerMenu->insertSeparator();
- viewerMenu->insertItem( i18n( "Text &editor" ), this, SLOT( editText() ), CTRL + SHIFT + Key_E, 4 );
+ viewerMenu->insertItem( i18n( "Text &editor" ), TQT_TQOBJECT(this), TQT_SLOT( editText() ), CTRL + SHIFT + Key_E, 4 );
viewerMenu->insertSeparator();
- viewerMenu->insertItem( i18n( "&Next tab" ), this, SLOT( nextTab() ), ALT+Key_Right );
- viewerMenu->insertItem( i18n( "&Previous tab" ), this, SLOT( prevTab() ), ALT+Key_Left );
+ viewerMenu->insertItem( i18n( "&Next tab" ), TQT_TQOBJECT(this), TQT_SLOT( nextTab() ), ALT+Key_Right );
+ viewerMenu->insertItem( i18n( "&Previous tab" ), TQT_TQOBJECT(this), TQT_SLOT( prevTab() ), ALT+Key_Left );
- detachActionIndex = viewerMenu->insertItem( i18n( "&Detach tab" ), this, SLOT( detachTab() ), CTRL + SHIFT + Key_D );
+ detachActionIndex = viewerMenu->insertItem( i18n( "&Detach tab" ), TQT_TQOBJECT(this), TQT_SLOT( detachTab() ), CTRL + SHIFT + Key_D );
//no point in detaching only one tab..
viewerMenu->setItemEnabled(detachActionIndex,false);
viewerMenu->insertSeparator();
- viewerMenu->insertItem( printAction->text(), this, SLOT( print() ), printAction->shortcut() );
- viewerMenu->insertItem( copyAction->text(), this, SLOT( copy() ), copyAction->shortcut() );
+ viewerMenu->insertItem( printAction->text(), TQT_TQOBJECT(this), TQT_SLOT( print() ), printAction->shortcut() );
+ viewerMenu->insertItem( copyAction->text(), TQT_TQOBJECT(this), TQT_SLOT( copy() ), copyAction->shortcut() );
viewerMenu->insertSeparator();
- tabCloseID = viewerMenu->insertItem( i18n( "&Close current tab" ), this, SLOT( tabCloseRequest() ), Key_Escape );
- closeID = viewerMenu->insertItem( i18n( "&Quit" ), this, SLOT( close() ), CTRL + Key_Q );
+ tabCloseID = viewerMenu->insertItem( i18n( "&Close current tab" ), TQT_TQOBJECT(this), TQT_SLOT( tabCloseRequest() ), Key_Escape );
+ closeID = viewerMenu->insertItem( i18n( "&Quit" ), TQT_TQOBJECT(this), TQT_SLOT( close() ), CTRL + Key_Q );
//toolBar() ->insertLined("Edit:",1,"",this,"",true ,i18n("Enter an URL to edit and press enter"));
@@ -110,8 +110,8 @@ KParts::MainWindow( parent, name ), manager( this, this ), tabBar( this ), retur
KrViewer::~KrViewer() {
- disconnect( &manager, SIGNAL( activePartChanged( KParts::Part* ) ),
- this, SLOT( createGUI( KParts::Part* ) ) );
+ disconnect( &manager, TQT_SIGNAL( activePartChanged( KParts::Part* ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( createGUI( KParts::Part* ) ) );
viewers.remove( this );
delete printAction;
@@ -124,8 +124,8 @@ void KrViewer::createGUI( KParts::Part* part ) {
// and show the new part widget
- connect( part, SIGNAL( setStatusBarText( const QString& ) ),
- this, SLOT( slotSetStatusBarText( const QString& ) ) );
+ connect( part, TQT_SIGNAL( setStatusBarText( const TQString& ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotSetStatusBarText( const TQString& ) ) );
KParts::MainWindow::createGUI( part );
toolBar() ->insertLineSeparator(0);
@@ -146,7 +146,7 @@ void KrViewer::createGUI( KParts::Part* part ) {
for( unsigned w=0; w != viewerMenu->count(); w++ )
{
int id = viewerMenu->idAt( w );
- QKeySequence sequence = viewerMenu->accel( id );
+ TQKeySequence sequence = viewerMenu->accel( id );
if( sequence.count() > 0 )
{
reservedKeys.push_back( sequence[ 0 ] );
@@ -164,24 +164,24 @@ void KrViewer::createGUI( KParts::Part* part ) {
part->installEventFilter( this );
}
-bool KrViewer::eventFilter ( QObject * /* watched */, QEvent * e )
+bool KrViewer::eventFilter ( TQObject * /* watched */, TQEvent * e )
{
- if( e->type() == QEvent::AccelOverride )
+ if( e->type() == TQEvent::AccelOverride )
{
- QKeyEvent* ke = (QKeyEvent*) e;
- if( reservedKeys.contains( ke->key() ) )
+ TQKeyEvent* ke = (TQKeyEvent*) e;
+ if( reservedKeys.tqcontains( ke->key() ) )
{
ke->accept();
- int id = reservedKeyIDs[ reservedKeys.findIndex( ke->key() ) ];
+ int id = reservedKeyIDs[ reservedKeys.tqfindIndex( ke->key() ) ];
if( id != -1 )
{
// don't activate the close functions immediately!
// it can cause crash
if( id == tabCloseID )
- QTimer::singleShot( 0, this, SLOT( tabCloseRequest() ) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( tabCloseRequest() ) );
else if( id == closeID )
- QTimer::singleShot( 0, this, SLOT( close() ) );
+ TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT( close() ) );
else {
int index = viewerMenu->indexOf( id );
viewerMenu->activateItemAt( index );
@@ -190,10 +190,10 @@ bool KrViewer::eventFilter ( QObject * /* watched */, QEvent * e )
return true;
}
}
- else if( e->type() == QEvent::KeyPress )
+ else if( e->type() == TQEvent::KeyPress )
{
- QKeyEvent* ke = (QKeyEvent*) e;
- if( reservedKeys.contains( ke->key() ) )
+ TQKeyEvent* ke = (TQKeyEvent*) e;
+ if( reservedKeys.tqcontains( ke->key() ) )
{
ke->accept();
return true;
@@ -201,7 +201,7 @@ bool KrViewer::eventFilter ( QObject * /* watched */, QEvent * e )
}
return false;
}
-void KrViewer::keyPressEvent( QKeyEvent *e ) {
+void KrViewer::keyPressEvent( TQKeyEvent *e ) {
switch ( e->key() ) {
case Key_F10:
close();
@@ -235,40 +235,40 @@ KrViewer* KrViewer::getViewer(bool new_window){
}
}
-void KrViewer::view( KURL url, QWidget * parent ) {
+void KrViewer::view( KURL url, TQWidget * tqparent ) {
Mode defaultMode = Generic;
bool defaultWindow = false;
krConfig->setGroup( "General" );
defaultWindow = krConfig->readBoolEntry( "View In Separate Window",_ViewInSeparateWindow );
- QString modeString = krConfig->readEntry( "Default Viewer Mode","generic" );
+ TQString modeString = krConfig->readEntry( "Default Viewer Mode","generic" );
if( modeString == "generic" ) defaultMode = Generic;
else if( modeString == "text" ) defaultMode = Text;
else if( modeString == "hex" ) defaultMode = Hex;
- view(url,defaultMode,defaultWindow, parent );
+ view(url,defaultMode,defaultWindow, tqparent );
}
-void KrViewer::view( KURL url, Mode mode, bool new_window, QWidget * parent ) {
+void KrViewer::view( KURL url, Mode mode, bool new_window, TQWidget * tqparent ) {
KrViewer* viewer = getViewer(new_window);
PanelViewerBase* viewWidget = new PanelViewer(&viewer->tabBar);
KParts::Part* part = viewWidget->openURL(url,mode);
viewer->addTab(viewWidget,i18n( "Viewing" ),VIEW_ICON,part);
- viewer->returnFocusTo = parent;
+ viewer->returnFocusTo = tqparent;
viewer->returnFocusTab = viewWidget;
}
-void KrViewer::edit( KURL url, QWidget * parent ) {
- edit( url, Text, -1, parent );
+void KrViewer::edit( KURL url, TQWidget * tqparent ) {
+ edit( url, Text, -1, tqparent );
}
-void KrViewer::edit( KURL url, Mode mode, int new_window, QWidget * parent ) {
+void KrViewer::edit( KURL url, Mode mode, int new_window, TQWidget * tqparent ) {
krConfig->setGroup( "General" );
- QString edit = krConfig->readEntry( "Editor", _Editor );
+ TQString edit = krConfig->readEntry( "Editor", _Editor );
if( new_window == -1 )
new_window = krConfig->readBoolEntry( "View In Separate Window",_ViewInSeparateWindow );
@@ -278,8 +278,8 @@ void KrViewer::edit( KURL url, Mode mode, int new_window, QWidget * parent ) {
// if the file is local, pass a normal path and not a url. this solves
// the problem for editors that aren't url-aware
if ( url.isLocalFile() )
- proc << QStringList::split( ' ', edit ) << url.path();
- else proc << QStringList::split( ' ', edit ) << url.prettyURL();
+ proc << TQStringList::split( ' ', edit ) << url.path();
+ else proc << TQStringList::split( ' ', edit ) << url.prettyURL();
if ( !proc.start( KProcess::DontCare ) )
KMessageBox::sorry( krApp, i18n( "Can't open " ) + "\"" + edit + "\"" );
return ;
@@ -291,17 +291,17 @@ void KrViewer::edit( KURL url, Mode mode, int new_window, QWidget * parent ) {
KParts::Part* part = editWidget->openURL(url,mode);
viewer->addTab(editWidget,i18n("Editing"),EDIT_ICON,part);
- viewer->returnFocusTo = parent;
+ viewer->returnFocusTo = tqparent;
viewer->returnFocusTab = editWidget;
}
-void KrViewer::addTab(PanelViewerBase* pvb, QString msg, QString iconName ,KParts::Part* part){
+void KrViewer::addTab(PanelViewerBase* pvb, TQString msg, TQString iconName ,KParts::Part* part){
if( !part ) return;
KURL url = pvb->url();
setCaption( msg+": " + url.prettyURL() );
- QIconSet icon = QIconSet(krLoader->loadIcon(iconName,KIcon::Small));
+ TQIconSet icon = TQIconSet(krLoader->loadIcon(iconName,KIcon::Small));
manager.addPart( part, this );
manager.setActivePart( part );
@@ -319,17 +319,17 @@ void KrViewer::addTab(PanelViewerBase* pvb, QString msg, QString iconName ,KPart
show();
tabBar.show();
- connect( pvb, SIGNAL( urlChanged( PanelViewerBase *, const KURL & ) ),
- this, SLOT( tabURLChanged(PanelViewerBase *, const KURL & ) ) );
+ connect( pvb, TQT_SIGNAL( urlChanged( PanelViewerBase *, const KURL & ) ),
+ this, TQT_SLOT( tabURLChanged(PanelViewerBase *, const KURL & ) ) );
}
void KrViewer::tabURLChanged( PanelViewerBase *pvb, const KURL & url ) {
- QString msg = pvb->isEditor() ? i18n( "Editing" ) : i18n( "Viewing" );
+ TQString msg = pvb->isEditor() ? i18n( "Editing" ) : i18n( "Viewing" );
tabBar.setTabLabel( pvb, url.fileName()+"("+msg+")" );
tabBar.setTabToolTip(pvb,msg+": " + url.prettyURL());
}
-void KrViewer::tabChanged(QWidget* w){
+void KrViewer::tabChanged(TQWidget* w){
manager.setActivePart( static_cast<PanelViewerBase*>(w)->part() );
if( static_cast<PanelViewerBase*>(w) != returnFocusTab ) {
@@ -341,11 +341,11 @@ void KrViewer::tabChanged(QWidget* w){
if( viewers.remove( this ) ) viewers.prepend( this ); // move to first
}
-void KrViewer::tabCloseRequest(QWidget *w){
+void KrViewer::tabCloseRequest(TQWidget *w){
if( !w ) return;
// important to save as returnFocusTo will be cleared at removePart
- QWidget * returnFocusToThisWidget = returnFocusTo;
+ TQWidget * returnFocusToThisWidget = returnFocusTo;
PanelViewerBase* pvb = static_cast<PanelViewerBase*>(w);
@@ -439,7 +439,7 @@ void KrViewer::editText(){
}
void KrViewer::checkModified(){
- QTimer::singleShot( 1000, this, SLOT(checkModified()) );
+ TQTimer::singleShot( 1000, TQT_TQOBJECT(this), TQT_SLOT(checkModified()) );
PanelViewerBase* pvb = static_cast<PanelViewerBase*>( tabBar.currentPage() );
if( !pvb ) return;
@@ -450,20 +450,20 @@ void KrViewer::checkModified(){
// add a * to modified files.
if( pvb->isModified() ){
- QString label = tabBar.tabLabel(pvb);
+ TQString label = tabBar.tabLabel(pvb);
if( !label.startsWith("*" + pvb->part()->url().fileName() ) ){
label.prepend("*");
- QIconSet icon = QIconSet(krLoader->loadIcon(MODIFIED_ICON,KIcon::Small));
+ TQIconSet icon = TQIconSet(krLoader->loadIcon(MODIFIED_ICON,KIcon::Small));
tabBar.changeTab(pvb,icon,label);
}
}
// remove the * from previously modified files.
else {
- QString label = tabBar.tabLabel(pvb);
+ TQString label = tabBar.tabLabel(pvb);
if( label.startsWith("*" + pvb->part()->url().fileName() ) ){
label = label.mid( 1 );
- QIconSet icon = QIconSet(krLoader->loadIcon(EDIT_ICON,KIcon::Small));
+ TQIconSet icon = TQIconSet(krLoader->loadIcon(EDIT_ICON,KIcon::Small));
tabBar.changeTab(pvb,icon,label);
}
@@ -495,7 +495,7 @@ void KrViewer::detachTab(){
viewerMenu->setItemEnabled(detachActionIndex,false);
}
- pvb->reparent(&viewer->tabBar,QPoint(0,0));
+ pvb->reparent(&viewer->tabBar,TQPoint(0,0));
if( pvb->isEditor() )
viewer->addTab(pvb,i18n( "Editing" ),EDIT_ICON,pvb->part());
@@ -514,7 +514,7 @@ void KrViewer::print() {
KParts::BrowserExtension * ext = KParts::BrowserExtension::childObject( pvb->part() );
if( ext && ext->isActionEnabled( "print" ) )
- Invoker( ext, SLOT( print() ) ).invoke();
+ Invoker( ext, TQT_SLOT( print() ) ).invoke();
}
void KrViewer::copy() {
@@ -523,7 +523,7 @@ void KrViewer::copy() {
KParts::BrowserExtension * ext = KParts::BrowserExtension::childObject( pvb->part() );
if( ext && ext->isActionEnabled( "copy" ) )
- Invoker( ext, SLOT( copy() ) ).invoke();
+ Invoker( ext, TQT_SLOT( copy() ) ).invoke();
}
PanelViewerBase * KrViewer::getPanelViewerBase( KParts::Part * part ) {
@@ -549,7 +549,7 @@ void KrViewer::updateActions( PanelViewerBase * pvb ) {
}
#if 0
-bool KrViewer::editGeneric( QString mimetype, KURL _url ) {
+bool KrViewer::editGeneric( TQString mimetype, KURL _url ) {
KParts::ReadWritePart * kedit_part = 0L;
KLibFactory *factory = 0;
KTrader::OfferList offers = KTrader::self() ->query( mimetype );
@@ -598,7 +598,7 @@ bool KrViewer::editText( bool create ) {
}
bool KrViewer::viewGeneric() {
- QString mimetype = KMimeType::findByURL( url ) ->name();
+ TQString mimetype = KMimeType::findByURL( url ) ->name();
// ugly hack: don't try to get a part for an XML file, it usually don't work
if ( mimetype == "text/xml" ) return false;
if ( url.prettyURL().startsWith( "man:" ) ) mimetype = "text/html";
@@ -606,13 +606,13 @@ bool KrViewer::viewGeneric() {
viewerMenu->setItemEnabled( 1, false );
if ( !generic_part ) {
- if ( mimetype.contains( "html" ) ) {
+ if ( mimetype.tqcontains( "html" ) ) {
KHTMLPart * p = new KHTMLPart( this, 0, 0, 0, KHTMLPart::BrowserViewGUI );
- connect( p->browserExtension(), SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
- this, SLOT( handleOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
+ connect( p->browserExtension(), TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( handleOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );
/* At JavaScript self.close() the KHTMLPart destroys itself. */
/* After destruction, just close the window */
- connect( p, SIGNAL( destroyed() ), this, SLOT( close() ) );
+ connect( p, TQT_SIGNAL( destroyed() ), TQT_TQOBJECT(this), TQT_SLOT( close() ) );
p-> openURL( url );
generic_part = p;
@@ -642,7 +642,7 @@ bool KrViewer::viewText() {
void KrViewer::viewHex() {
if ( !hex_part ) {
- QString file;
+ TQString file;
// files that are not local must first be downloaded
if ( !url.isLocalFile() ) {
if ( !KIO::NetAccess::download( url, file ) ) {
@@ -653,9 +653,9 @@ void KrViewer::viewHex() {
// create a hex file
- QFile f_in( file );
+ TQFile f_in( file );
f_in.open( IO_ReadOnly );
- QDataStream in( &f_in );
+ TQDataStream in( &f_in );
FILE *out = KDE_fopen( tmpFile.name().local8Bit(), "w" );
diff --git a/krusader/KViewer/krviewer.h b/krusader/KViewer/krviewer.h
index 618e9a2..4ebde12 100644
--- a/krusader/KViewer/krviewer.h
+++ b/krusader/KViewer/krviewer.h
@@ -18,13 +18,13 @@
#ifndef KRVIEWER_H
#define KRVIEWER_H
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
#include <kparts/mainwindow.h>
#include <ktempfile.h>
#include <kparts/partmanager.h>
#include <kparts/browserextension.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <ktabwidget.h>
#include "../krusader.h"
@@ -34,25 +34,26 @@
*@author Shie Erlich & Rafi Yanai
*/
-class QPopupMenu;
+class TQPopupMenu;
class PanelViewerBase;
class KrViewer : public KParts::MainWindow {
Q_OBJECT
+ TQ_OBJECT
public:
virtual ~KrViewer();
enum Mode{Generic,Text,Hex};
- static void view( KURL url, QWidget * parent = krApp );
- static void view( KURL url, Mode mode, bool new_window, QWidget * parent = krApp );
- static void edit( KURL url, QWidget * parent );
- static void edit( KURL url, Mode mode=Text, int new_window=-1, QWidget * parent = krApp );
+ static void view( KURL url, TQWidget * tqparent = krApp );
+ static void view( KURL url, Mode mode, bool new_window, TQWidget * tqparent = krApp );
+ static void edit( KURL url, TQWidget * tqparent );
+ static void edit( KURL url, Mode mode=Text, int new_window=-1, TQWidget * tqparent = krApp );
- virtual bool eventFilter ( QObject * watched, QEvent * e );
+ virtual bool eventFilter ( TQObject * watched, TQEvent * e );
public slots:
- void keyPressEvent( QKeyEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
void createGUI( KParts::Part* );
void viewGeneric();
@@ -63,9 +64,9 @@ public slots:
void print();
void copy();
- void tabChanged(QWidget* w);
+ void tabChanged(TQWidget* w);
void tabURLChanged( PanelViewerBase * pvb, const KURL &url );
- void tabCloseRequest(QWidget *w);
+ void tabCloseRequest(TQWidget *w);
void tabCloseRequest();
void nextTab();
@@ -79,21 +80,21 @@ protected:
virtual bool queryExit();
virtual void windowActivationChange ( bool oldActive );
- virtual void focusInEvent( QFocusEvent * ){ if( viewers.remove( this ) ) viewers.prepend( this ); } // move to first
+ virtual void focusInEvent( TQFocusEvent * ){ if( viewers.remove( this ) ) viewers.prepend( this ); } // move to first
private:
- KrViewer( QWidget *parent = 0, const char *name = 0 );
- void addTab(PanelViewerBase* pvb, QString msg,QString iconName, KParts::Part* part);
+ KrViewer( TQWidget *tqparent = 0, const char *name = 0 );
+ void addTab(PanelViewerBase* pvb, TQString msg,TQString iconName, KParts::Part* part);
PanelViewerBase * getPanelViewerBase( KParts::Part* part);
void updateActions( PanelViewerBase * base );
static KrViewer* getViewer(bool new_window);
KParts::PartManager manager;
- QPopupMenu* viewerMenu;
+ TQPopupMenu* viewerMenu;
KTempFile tmpFile;
KTabWidget tabBar;
- QGuardedPtr<QWidget> returnFocusTo;
+ TQGuardedPtr<TQWidget> returnFocusTo;
PanelViewerBase * returnFocusTab;
int detachActionIndex;
@@ -104,17 +105,18 @@ private:
int tabCloseID;
int closeID;
- static QPtrList<KrViewer> viewers; // the first viewer is the active one
- QValueList<int> reservedKeys; // the reserved key sequences
- QValueList<int> reservedKeyIDs; // the IDs of the reserved keys
+ static TQPtrList<KrViewer> viewers; // the first viewer is the active one
+ TQValueList<int> reservedKeys; // the reserved key sequences
+ TQValueList<int> reservedKeyIDs; // the IDs of the reserved keys
};
-class Invoker : public QObject {
+class Invoker : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- Invoker( QObject *recv, const char * slot ) {
- connect( this, SIGNAL( invokeSignal() ), recv, slot );
+ Invoker( TQObject *recv, const char * slot ) {
+ connect( this, TQT_SIGNAL( invokeSignal() ), recv, slot );
}
void invoke() {
diff --git a/krusader/KViewer/panelviewer.cpp b/krusader/KViewer/panelviewer.cpp
index f39d075..7b9c07b 100644
--- a/krusader/KViewer/panelviewer.cpp
+++ b/krusader/KViewer/panelviewer.cpp
@@ -1,12 +1,12 @@
#include <kurl.h>
-#include <qstring.h>
-#include <qwidgetstack.h>
-#include <qapplication.h>
+#include <tqstring.h>
+#include <tqwidgetstack.h>
+#include <tqapplication.h>
#include <kparts/part.h>
#include <kparts/browserextension.h>
#include <kmessagebox.h>
-#include <qdict.h>
-#include <qlabel.h>
+#include <tqdict.h>
+#include <tqlabel.h>
#include <kmimetype.h>
#include <ktempfile.h>
#include <klocale.h>
@@ -15,7 +15,7 @@
#include <kdebug.h>
#include <kfileitem.h>
#include <kio/netaccess.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <klargefile.h>
#include "panelviewer.h"
@@ -23,15 +23,15 @@
/* ----==={ PanelViewerBase }===---- */
-PanelViewerBase::PanelViewerBase( QWidget *parent ) :
-QWidgetStack( parent ), mimes( 0 ), cpart( 0 ) {
- setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored ) );
+PanelViewerBase::PanelViewerBase( TQWidget *tqparent ) :
+TQWidgetStack( tqparent ), mimes( 0 ), cpart( 0 ) {
+ tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Ignored ) );
- mimes = new QDict<KParts::ReadOnlyPart>( DICTSIZE, false );
+ mimes = new TQDict<KParts::ReadOnlyPart>( DICTSIZE, false );
mimes->setAutoDelete( true );
cpart = 0;
- fallback = new QLabel( i18n( "No file selected or selected file can't be displayed." ), this );
- fallback->setAlignment( AlignCenter | ExpandTabs | WordBreak );
+ fallback = new TQLabel( i18n( "No file selected or selected file can't be displayed." ), this );
+ fallback->tqsetAlignment( AlignCenter | ExpandTabs | WordBreak );
addWidget( fallback );
raiseWidget( fallback );
}
@@ -46,8 +46,8 @@ PanelViewerBase::~PanelViewerBase() {
/* ----==={ PanelViewer }===---- */
-PanelViewer::PanelViewer( QWidget *parent ) :
-PanelViewerBase( parent ) {
+PanelViewer::PanelViewer( TQWidget *tqparent ) :
+PanelViewerBase( tqparent ) {
}
PanelViewer::~PanelViewer() {
@@ -100,32 +100,32 @@ bool PanelViewer::closeURL() {
return false;
}
-KParts::ReadOnlyPart* PanelViewer::getPart( QString mimetype ) {
+KParts::ReadOnlyPart* PanelViewer::getPart( TQString mimetype ) {
KParts::ReadOnlyPart * part = 0L;
KLibFactory *factory = 0;
KService::Ptr ptr = KServiceTypeProfile::preferredService( mimetype, "KParts/ReadOnlyPart" );
if ( ptr ) {
- QStringList args;
- QVariant argsProp = ptr->property( "X-KDE-BrowserView-Args" );
+ TQStringList args;
+ TQVariant argsProp = ptr->property( "X-KDE-BrowserView-Args" );
if ( argsProp.isValid() ) {
- QString argStr = argsProp.toString();
- args = QStringList::split( " ", argStr );
+ TQString argStr = argsProp.toString();
+ args = TQStringList::split( " ", argStr );
}
- QVariant prop = ptr->property( "X-KDE-BrowserView-AllowAsDefault" );
+ TQVariant prop = ptr->property( "X-KDE-BrowserView-AllowAsDefault" );
if ( !prop.isValid() || prop.toBool() ) // defaults to true
{
factory = KLibLoader::self() ->factory( ptr->library().latin1() );
if ( factory ) {
- part = static_cast<KParts::ReadOnlyPart *>( factory->create( this,
- ptr->name().latin1(), QString( "KParts::ReadOnlyPart" ).latin1(), args ) );
+ part = static_cast<KParts::ReadOnlyPart *>( factory->create( TQT_TQOBJECT(this),
+ ptr->name().latin1(), TQString( "KParts::ReadOnlyPart" ).latin1(), args ) );
}
}
}
if ( part ) {
KParts::BrowserExtension * ext = KParts::BrowserExtension::childObject( part );
if ( ext ) {
- connect( ext, SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, SLOT( openURL( const KURL & ) ) );
- connect( ext, SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, SIGNAL( openURLRequest( const KURL & ) ) );
+ connect( ext, TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, TQT_SLOT( openURL( const KURL & ) ) );
+ connect( ext, TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, TQT_SIGNAL( openURLRequest( const KURL & ) ) );
}
}
return part;
@@ -137,14 +137,14 @@ KParts::ReadOnlyPart* PanelViewer::getHexPart(){
KLibFactory * factory = KLibLoader::self() ->factory( "libkhexedit2part" );
if ( factory ) {
// Create the part
- part = ( KParts::ReadOnlyPart * ) factory->create( this, "hexedit2part","KParts::ReadOnlyPart" );
+ part = ( KParts::ReadOnlyPart * ) factory->create( TQT_TQOBJECT(this), "hexedit2part","KParts::ReadOnlyPart" );
}
return part;
}
void PanelViewer::oldHexViewer(KTempFile& tmpFile) {
- QString file;
+ TQString file;
// files that are not local must first be downloaded
if ( !curl.isLocalFile() ) {
if ( !KIO::NetAccess::download( curl, file,this ) ) {
@@ -155,9 +155,9 @@ void PanelViewer::oldHexViewer(KTempFile& tmpFile) {
// create a hex file
- QFile f_in( file );
+ TQFile f_in( file );
f_in.open( IO_ReadOnly );
- QDataStream in( &f_in );
+ TQDataStream in( &f_in );
FILE *out = KDE_fopen( tmpFile.name().local8Bit(), "w" );
@@ -196,8 +196,8 @@ void PanelViewer::oldHexViewer(KTempFile& tmpFile) {
/* ----==={ PanelEditor }===---- */
-PanelEditor::PanelEditor( QWidget *parent ) :
-PanelViewerBase( parent ) {
+PanelEditor::PanelEditor( TQWidget *tqparent ) :
+PanelViewerBase( tqparent ) {
}
PanelEditor::~PanelEditor() {
@@ -231,9 +231,9 @@ KParts::ReadOnlyPart* PanelEditor::openURL( const KURL &url, KrViewer::Mode mode
bool create = true;
KIO::StatJob* statJob = KIO::stat( url, false );
- connect( statJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotStatResult( KIO::Job* ) ) );
+ connect( statJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResult( KIO::Job* ) ) );
busy = true;
- while ( busy ) qApp->processEvents();
+ while ( busy ) tqApp->processEvents();
if( !entry.isEmpty() ) {
KFileItem file( entry, url );
if( file.isReadable() ) create = false;
@@ -263,32 +263,32 @@ bool PanelEditor::closeURL() {
return true;
}
-KParts::ReadWritePart* PanelEditor::getPart( QString mimetype ) {
+KParts::ReadWritePart* PanelEditor::getPart( TQString mimetype ) {
KParts::ReadWritePart * part = 0L;
KLibFactory *factory = 0;
KService::Ptr ptr = KServiceTypeProfile::preferredService( mimetype, "KParts/ReadWritePart" );
if ( ptr ) {
- QStringList args;
- QVariant argsProp = ptr->property( "X-KDE-BrowserView-Args" );
+ TQStringList args;
+ TQVariant argsProp = ptr->property( "X-KDE-BrowserView-Args" );
if ( argsProp.isValid() ) {
- QString argStr = argsProp.toString();
- args = QStringList::split( " ", argStr );
+ TQString argStr = argsProp.toString();
+ args = TQStringList::split( " ", argStr );
}
- QVariant prop = ptr->property( "X-KDE-BrowserView-AllowAsDefault" );
+ TQVariant prop = ptr->property( "X-KDE-BrowserView-AllowAsDefault" );
if ( !prop.isValid() || prop.toBool() ) // defaults to true
{
factory = KLibLoader::self() ->factory( ptr->library().latin1() );
if ( factory ) {
- part = static_cast<KParts::ReadWritePart *>( factory->create( this,
- ptr->name().latin1(), QString( "KParts::ReadWritePart" ).latin1(), args ) );
+ part = static_cast<KParts::ReadWritePart *>( factory->create( TQT_TQOBJECT(this),
+ ptr->name().latin1(), TQString( "KParts::ReadWritePart" ).latin1(), args ) );
}
}
}
if ( part ) {
KParts::BrowserExtension * ext = KParts::BrowserExtension::childObject( part );
if ( ext ) {
- connect( ext, SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, SLOT( openURL( const KURL & ) ) );
- connect( ext, SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, SIGNAL( openURLRequest( const KURL & ) ) );
+ connect( ext, TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, TQT_SLOT( openURL( const KURL & ) ) );
+ connect( ext, TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), this, TQT_SIGNAL( openURLRequest( const KURL & ) ) );
}
}
return part;
diff --git a/krusader/KViewer/panelviewer.h b/krusader/KViewer/panelviewer.h
index dfc72bd..0105a55 100644
--- a/krusader/KViewer/panelviewer.h
+++ b/krusader/KViewer/panelviewer.h
@@ -2,22 +2,23 @@
#define _SUPERVIEW_H
#include <kurl.h>
-#include <qstring.h>
-#include <qwidgetstack.h>
+#include <tqstring.h>
+#include <tqwidgetstack.h>
#include <kparts/part.h>
#include <kio/job.h>
#include <ktempfile.h>
-#include <qdict.h>
-#include <qlabel.h>
+#include <tqdict.h>
+#include <tqlabel.h>
#include "krviewer.h"
-class PanelViewerBase: public QWidgetStack {
+class PanelViewerBase: public TQWidgetStack {
Q_OBJECT
+ TQ_OBJECT
public:
- PanelViewerBase( QWidget *parent = 0 );
+ PanelViewerBase( TQWidget *tqparent = 0 );
virtual ~PanelViewerBase();
inline KURL url() const { return curl; }
inline void setUrl( KURL url ) { emit urlChanged( this, url ); curl = url; }
@@ -35,35 +36,37 @@ signals:
void urlChanged( PanelViewerBase *, const KURL & );
protected:
- QDict<KParts::ReadOnlyPart> *mimes;
+ TQDict<KParts::ReadOnlyPart> *mimes;
KParts::ReadOnlyPart *cpart;
- QString cmimetype;
+ TQString cmimetype;
KURL curl;
- QLabel *fallback;
+ TQLabel *fallback;
};
class PanelViewer: public PanelViewerBase {
Q_OBJECT
+ TQ_OBJECT
public slots:
KParts::ReadOnlyPart* openURL( const KURL &url, KrViewer::Mode mode=KrViewer::Generic );
bool closeURL();
public:
- PanelViewer( QWidget *parent = 0 );
+ PanelViewer( TQWidget *tqparent = 0 );
~PanelViewer();
virtual bool isEditor() { return false; }
protected:
- KParts::ReadOnlyPart *getPart( QString mimetype );
+ KParts::ReadOnlyPart *getPart( TQString mimetype );
KParts::ReadOnlyPart* getHexPart();
void oldHexViewer(KTempFile& tmpFile);
};
class PanelEditor: public PanelViewerBase {
Q_OBJECT
+ TQ_OBJECT
public:
virtual bool isModified();
virtual bool isEditor() { return true; }
@@ -75,11 +78,11 @@ public slots:
void slotStatResult( KIO::Job* job );
public:
- PanelEditor( QWidget *parent = 0 );
+ PanelEditor( TQWidget *tqparent = 0 );
~PanelEditor();
protected:
- KParts::ReadWritePart* getPart( QString mimetype );
+ KParts::ReadWritePart* getPart( TQString mimetype );
bool busy;
KIO::UDSEntry entry;
diff --git a/krusader/Konfigurator/kgadvanced.cpp b/krusader/Konfigurator/kgadvanced.cpp
index 7806ab8..e9d2d10 100644
--- a/krusader/Konfigurator/kgadvanced.cpp
+++ b/krusader/Konfigurator/kgadvanced.cpp
@@ -31,22 +31,22 @@
#include "kgadvanced.h"
#include "../defaults.h"
#include <klocale.h>
-#include <qhbox.h>
-#include <qwhatsthis.h>
+#include <tqhbox.h>
+#include <tqwhatsthis.h>
#include <sys/param.h>
#include <kdeversion.h>
#include <kprotocolinfo.h>
-KgAdvanced::KgAdvanced( bool first, QWidget* parent, const char* name ) :
- KonfiguratorPage( first, parent, name )
+KgAdvanced::KgAdvanced( bool first, TQWidget* tqparent, const char* name ) :
+ KonfiguratorPage( first, tqparent, name )
{
- QGridLayout *kgAdvancedLayout = new QGridLayout( parent );
+ TQGridLayout *kgAdvancedLayout = new TQGridLayout( tqparent );
kgAdvancedLayout->setSpacing( 6 );
// -------------------------- GENERAL GROUPBOX ----------------------------------
- QGroupBox *generalGrp = createFrame( i18n( "General" ), parent, "kgAdvGeneralGrp" );
- QGridLayout *generalGrid = createGridLayout( generalGrp->layout() );
+ TQGroupBox *generalGrp = createFrame( i18n( "General" ), tqparent, "kgAdvGeneralGrp" );
+ TQGridLayout *generalGrid = createGridLayout( generalGrp->tqlayout() );
#if KDE_IS_VERSION( 3,5,1 )
bool dontUseMedia = false;
@@ -54,7 +54,7 @@ KgAdvanced::KgAdvanced( bool first, QWidget* parent, const char* name ) :
bool dontUseMedia = true;
#endif
- bool isMediaProtocolPresent = KProtocolInfo::isKnownProtocol( QString( "media" ) );
+ bool isMediaProtocolPresent = KProtocolInfo::isKnownProtocol( TQString( "media" ) );
if( !isMediaProtocolPresent )
dontUseMedia = true;
@@ -67,7 +67,7 @@ KgAdvanced::KgAdvanced( bool first, QWidget* parent, const char* name ) :
KonfiguratorCheckBoxGroup *generals = createCheckBoxGroup( 1, 0, generalSettings, 3, generalGrp );
if( !isMediaProtocolPresent )
- generals->find( "DontUseMediaProt" )->setEnabled( false );
+ generals->tqfind( "DontUseMediaProt" )->setEnabled( false );
generalGrid->addWidget( generals, 1, 0 );
@@ -78,15 +78,15 @@ KgAdvanced::KgAdvanced( bool first, QWidget* parent, const char* name ) :
#ifdef BSD
- generals->find( "AutoMount" )->setEnabled( false ); /* disable AutoMount on BSD */
+ generals->tqfind( "AutoMount" )->setEnabled( false ); /* disable AutoMount on BSD */
#endif
kgAdvancedLayout->addWidget( generalGrp, 0 ,0 );
// ----------------------- CONFIRMATIONS GROUPBOX -------------------------------
- QGroupBox *confirmGrp = createFrame( i18n( "Confirmations" ), parent, "confirmGrp" );
- QGridLayout *confirmGrid = createGridLayout( confirmGrp->layout() );
+ TQGroupBox *confirmGrp = createFrame( i18n( "Confirmations" ), tqparent, "confirmGrp" );
+ TQGridLayout *confirmGrid = createGridLayout( confirmGrp->tqlayout() );
addLabel( confirmGrid, 0, 0, "\n"+i18n( "Request user confirmation for the following operations:" )+"\n",
confirmGrp, "KgAdvLabel1" );
@@ -109,17 +109,17 @@ KgAdvanced::KgAdvanced( bool first, QWidget* parent, const char* name ) :
// ------------------------ FINE-TUNING GROUPBOX --------------------------------
- QGroupBox *fineTuneGrp = createFrame( i18n( "Fine-Tuning" ), parent, "kgFineTuneGrp" );
- QGridLayout *fineTuneGrid = createGridLayout( fineTuneGrp->layout() );
- fineTuneGrid->setAlignment( Qt::AlignLeft | Qt::AlignTop );
+ TQGroupBox *fineTuneGrp = createFrame( i18n( "Fine-Tuning" ), tqparent, "kgFineTuneGrp" );
+ TQGridLayout *fineTuneGrid = createGridLayout( fineTuneGrp->tqlayout() );
+ fineTuneGrid->tqsetAlignment( TQt::AlignLeft | TQt::AlignTop );
- QLabel *label = new QLabel( i18n( "Icon cache size (KB):" ), fineTuneGrp, "iconCacheLabel" );
- QWhatsThis::add( label, i18n( "The icon cache size influences how fast the contents of a panel can be displayed. However, too large a cache might consume your memory." ) );
+ TQLabel *label = new TQLabel( i18n( "Icon cache size (KB):" ), fineTuneGrp, "iconCacheLabel" );
+ TQWhatsThis::add( label, i18n( "The icon cache size influences how fast the contents of a panel can be displayed. However, too large a cache might consume your memory." ) );
fineTuneGrid->addWidget( label, 0, 0 );
KonfiguratorSpinBox *spinBox = createSpinBox( "Advanced", "Icon Cache Size", _IconCacheSize,
1, 8192, fineTuneGrp, false );
- QWhatsThis::add( spinBox, i18n( "The icon cache size influences how fast the contents of a panel can be displayed. However, too large a cache might consume your memory." ) );
- spinBox->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed);
+ TQWhatsThis::add( spinBox, i18n( "The icon cache size influences how fast the contents of a panel can be displayed. However, too large a cache might consume your memory." ) );
+ spinBox->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed);
fineTuneGrid->addWidget( spinBox, 0, 1 );
addLabel( fineTuneGrid, 1, 0, i18n( "Arguments of updatedb:" ),
diff --git a/krusader/Konfigurator/kgadvanced.h b/krusader/Konfigurator/kgadvanced.h
index a539a01..e96ac5a 100644
--- a/krusader/Konfigurator/kgadvanced.h
+++ b/krusader/Konfigurator/kgadvanced.h
@@ -36,9 +36,10 @@
class KgAdvanced : public KonfiguratorPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- KgAdvanced( bool first, QWidget* parent=0, const char* name=0 );
+ KgAdvanced( bool first, TQWidget* tqparent=0, const char* name=0 );
};
#endif /* __KGADVANCED_H__ */
diff --git a/krusader/Konfigurator/kgarchives.cpp b/krusader/Konfigurator/kgarchives.cpp
index cd2f315..3ba494e 100644
--- a/krusader/Konfigurator/kgarchives.cpp
+++ b/krusader/Konfigurator/kgarchives.cpp
@@ -28,8 +28,8 @@
* *
***************************************************************************/
-#include <qhbox.h>
-#include <qpushbutton.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
#include "kgarchives.h"
#include "krresulttable.h"
@@ -40,16 +40,16 @@
#include "../krusader.h"
#include "../VFS/krarchandler.h"
-KgArchives::KgArchives( bool first, QWidget* parent, const char* name ) :
- KonfiguratorPage( first, parent, name )
+KgArchives::KgArchives( bool first, TQWidget* tqparent, const char* name ) :
+ KonfiguratorPage( first, tqparent, name )
{
- QGridLayout *kgArchivesLayout = new QGridLayout( parent );
+ TQGridLayout *kgArchivesLayout = new TQGridLayout( tqparent );
kgArchivesLayout->setSpacing( 6 );
// -------------------------- GENERAL GROUPBOX ----------------------------------
- QGroupBox *generalGrp = createFrame( i18n( "General" ), parent, "generalGrp" );
- QGridLayout *generalGrid = createGridLayout( generalGrp->layout() );
+ TQGroupBox *generalGrp = createFrame( i18n( "General" ), tqparent, "generalGrp" );
+ TQGridLayout *generalGrid = createGridLayout( generalGrp->tqlayout() );
addLabel( generalGrid, 0, 0, i18n( "Krusader transparently handles the following types of archives:" ),
generalGrp, "KgLabel1" );
@@ -75,19 +75,19 @@ KgArchives::KgArchives( bool first, QWidget* parent, const char* name ) :
addLabel( generalGrid, 2, 0, i18n( "The archives that are \"greyed-out\" were unavailable on your\nsystem last time Krusader checked. If you wish Krusader to\nsearch again, click the 'Auto Configure' button." ),
generalGrp, "KgLabel2" );
- QHBox *hbox = new QHBox( generalGrp );
+ TQHBox *hbox = new TQHBox( generalGrp );
createSpacer( hbox, "spacer1" );
- QPushButton *btnAutoConfigure = new QPushButton( i18n( "Auto Configure" ), hbox, "kgAutoConfigure" );
+ TQPushButton *btnAutoConfigure = new TQPushButton( i18n( "Auto Configure" ), hbox, "kgAutoConfigure" );
createSpacer( hbox, "spacer2" );
generalGrid->addWidget( hbox, 3, 0 );
- connect( btnAutoConfigure, SIGNAL( clicked() ), this, SLOT( slotAutoConfigure() ) );
+ connect( btnAutoConfigure, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAutoConfigure() ) );
kgArchivesLayout->addWidget( generalGrp, 0 ,0 );
// ------------------------ FINE-TUNING GROUPBOX --------------------------------
- QGroupBox *fineTuneGrp = createFrame( i18n( "Fine-Tuning" ), parent, "fineTuneGrp" );
- QGridLayout *fineTuneGrid = createGridLayout( fineTuneGrp->layout() );
+ TQGroupBox *fineTuneGrp = createFrame( i18n( "Fine-Tuning" ), tqparent, "fineTuneGrp" );
+ TQGridLayout *fineTuneGrid = createGridLayout( fineTuneGrp->tqlayout() );
KONFIGURATOR_CHECKBOX_PARAM finetuners[] =
// cfg_class cfg_name default text restart ToolTip
@@ -119,20 +119,20 @@ void KgArchives::slotAutoConfigure()
void KgArchives::disableNonExistingPackers()
{
- #define PS(x) lst.contains(x)>0
-
- QStringList lst=KRarcHandler::supportedPackers(); // get list of availble packers
- cbs->find( "Do Tar" )->setEnabled(PS("tar"));
- cbs->find( "Do GZip" )->setEnabled(PS("gzip"));
- cbs->find( "Do BZip2" )->setEnabled(PS("bzip2"));
- cbs->find( "Do UnZip" )->setEnabled(PS("unzip"));
- cbs->find( "Do Lha" )->setEnabled(PS("lha"));
- cbs->find( "Do RPM" )->setEnabled(PS("rpm") || PS("cpio"));
- cbs->find( "Do UnRar" )->setEnabled(PS("unrar") || PS("rar") );
- cbs->find( "Do UnAce" )->setEnabled(PS("unace"));
- cbs->find( "Do Unarj" )->setEnabled(PS("unarj") || PS("arj") );
- cbs->find( "Do DEB" )->setEnabled(PS("dpkg") && PS("tar") );
- cbs->find( "Do 7z" )->setEnabled( PS("7z") );
+ #define PS(x) lst.tqcontains(x)>0
+
+ TQStringList lst=KRarcHandler::supportedPackers(); // get list of availble packers
+ cbs->tqfind( "Do Tar" )->setEnabled(PS("tar"));
+ cbs->tqfind( "Do GZip" )->setEnabled(PS("gzip"));
+ cbs->tqfind( "Do BZip2" )->setEnabled(PS("bzip2"));
+ cbs->tqfind( "Do UnZip" )->setEnabled(PS("unzip"));
+ cbs->tqfind( "Do Lha" )->setEnabled(PS("lha"));
+ cbs->tqfind( "Do RPM" )->setEnabled(PS("rpm") || PS("cpio"));
+ cbs->tqfind( "Do UnRar" )->setEnabled(PS("unrar") || PS("rar") );
+ cbs->tqfind( "Do UnAce" )->setEnabled(PS("unace"));
+ cbs->tqfind( "Do Unarj" )->setEnabled(PS("unarj") || PS("arj") );
+ cbs->tqfind( "Do DEB" )->setEnabled(PS("dpkg") && PS("tar") );
+ cbs->tqfind( "Do 7z" )->setEnabled( PS("7z") );
krConfig->setGroup( "Archives" );
krConfig->writeEntry( "Supported Packers", lst );
diff --git a/krusader/Konfigurator/kgarchives.h b/krusader/Konfigurator/kgarchives.h
index a3656d4..d848f65 100644
--- a/krusader/Konfigurator/kgarchives.h
+++ b/krusader/Konfigurator/kgarchives.h
@@ -36,9 +36,10 @@
class KgArchives : public KonfiguratorPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- KgArchives( bool first, QWidget* parent=0, const char* name=0 );
+ KgArchives( bool first, TQWidget* tqparent=0, const char* name=0 );
virtual bool apply();
virtual void setDefaults();
diff --git a/krusader/Konfigurator/kgcolors.cpp b/krusader/Konfigurator/kgcolors.cpp
index 461792e..c934f15 100644
--- a/krusader/Konfigurator/kgcolors.cpp
+++ b/krusader/Konfigurator/kgcolors.cpp
@@ -36,20 +36,20 @@
#include <kfiledialog.h>
#include <kglobalsettings.h>
#include <kstandarddirs.h>
-#include <qhbox.h>
-#include <qheader.h>
-#include <qtabwidget.h>
+#include <tqhbox.h>
+#include <tqheader.h>
+#include <tqtabwidget.h>
-KgColors::KgColors( bool first, QWidget* parent, const char* name ) :
- KonfiguratorPage( first, parent, name ), offset( 0 )
+KgColors::KgColors( bool first, TQWidget* tqparent, const char* name ) :
+ KonfiguratorPage( first, tqparent, name ), offset( 0 )
{
- QGridLayout *kgColorsLayout = new QGridLayout( parent );
+ TQGridLayout *kgColorsLayout = new TQGridLayout( tqparent );
kgColorsLayout->setSpacing( 6 );
// -------------------------- GENERAL GROUPBOX ----------------------------------
- QGroupBox *generalGrp = createFrame( i18n( "General" ), parent, "kgColorsGeneralGrp" );
- QGridLayout *generalGrid = createGridLayout( generalGrp->layout() );
+ TQGroupBox *generalGrp = createFrame( i18n( "General" ), tqparent, "kgColorsGeneralGrp" );
+ TQGridLayout *generalGrid = createGridLayout( generalGrp->tqlayout() );
generalGrid->setSpacing( 0 );
generalGrid->setMargin( 5 );
@@ -64,35 +64,35 @@ KgColors::KgColors( bool first, QWidget* parent, const char* name ) :
generals = createCheckBoxGroup( 0, 2, generalSettings, sizeof(generalSettings)/sizeof(generalSettings[0]), generalGrp );
generalGrid->addWidget( generals, 1, 0 );
- generals->layout()->setSpacing( 5 );
+ generals->tqlayout()->setSpacing( 5 );
- connect( generals->find( "KDE Default" ), SIGNAL( stateChanged( int ) ), this, SLOT( slotDisable() ) );
- connect( generals->find( "Enable Alternate Background" ), SIGNAL( stateChanged( int ) ), this, SLOT( generatePreview() ) );
- connect( generals->find( "Show Current Item Always" ), SIGNAL( stateChanged( int ) ), this, SLOT( slotDisable() ) );
- connect( generals->find( "Dim Inactive Colors" ), SIGNAL( stateChanged( int ) ), this, SLOT( slotDisable() ) );
+ connect( generals->tqfind( "KDE Default" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) );
+ connect( generals->tqfind( "Enable Alternate Background" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( generatePreview() ) );
+ connect( generals->tqfind( "Show Current Item Always" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) );
+ connect( generals->tqfind( "Dim Inactive Colors" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) );
kgColorsLayout->addMultiCellWidget( generalGrp, 0 ,0, 0, 2 );
- QHBox *hbox = new QHBox( parent );
+ TQHBox *hbox = new TQHBox( tqparent );
// -------------------------- COLORS GROUPBOX ----------------------------------
- QGroupBox *colorsFrameGrp = createFrame( i18n( "Colors" ), hbox, "kgColorsColorsGrp" );
- QGridLayout *colorsFrameGrid = createGridLayout( colorsFrameGrp->layout() );
+ TQGroupBox *colorsFrameGrp = createFrame( i18n( "Colors" ), hbox, "kgColorsColorsGrp" );
+ TQGridLayout *colorsFrameGrid = createGridLayout( colorsFrameGrp->tqlayout() );
colorsFrameGrid->setSpacing( 0 );
colorsFrameGrid->setMargin( 3 );
- colorTabWidget = new QTabWidget( colorsFrameGrp, "colorTabWidget" );
+ colorTabWidget = new TQTabWidget( colorsFrameGrp, "colorTabWidget" );
- connect( colorTabWidget, SIGNAL( currentChanged ( QWidget * ) ), this, SLOT( generatePreview() ) );
+ connect( colorTabWidget, TQT_SIGNAL( currentChanged ( TQWidget * ) ), this, TQT_SLOT( generatePreview() ) );
- colorsGrp = new QWidget( colorTabWidget, "colorTab" );
+ colorsGrp = new TQWidget( colorTabWidget, "colorTab" );
colorTabWidget->insertTab( colorsGrp, i18n( "Active" ) );
- colorsGrid = new QGridLayout( colorsGrp );
+ colorsGrid = new TQGridLayout( colorsGrp );
colorsGrid->setSpacing( 0 );
colorsGrid->setMargin( 2 );
- ADDITIONAL_COLOR transparent = { i18n("Transparent"), Qt::white, "transparent" };
+ ADDITIONAL_COLOR transparent = { i18n("Transparent"), TQt::white, "transparent" };
addColorSelector( "Foreground", i18n( "Foreground:" ), KGlobalSettings::textColor() );
addColorSelector( "Directory Foreground", i18n( "Directory foreground:" ), getColorSelector( "Foreground" )->getColor(), i18n( "Same as foreground" ) );
@@ -106,24 +106,24 @@ KgColors::KgColors( bool first, QWidget* parent, const char* name ) :
addColorSelector( "Marked Background", i18n( "Selected background:" ), KGlobalSettings::highlightColor(), "", &sameAsBckgnd, 1 );
ADDITIONAL_COLOR sameAsAltern = { i18n("Same as alt. background"), getColorSelector( "Alternate Background" )->getColor(), "Alternate Background" };
addColorSelector( "Alternate Marked Background",i18n( "Alternate selected background:" ), getColorSelector( "Marked Background" )->getColor(), i18n( "Same as selected background" ), &sameAsAltern, 1 );
- addColorSelector( "Current Foreground", i18n( "Current foreground:" ), Qt::white, i18n( "Not used" ) );
+ addColorSelector( "Current Foreground", i18n( "Current foreground:" ), TQt::white, i18n( "Not used" ) );
ADDITIONAL_COLOR sameAsMarkedForegnd = { i18n("Same as selected foreground"), getColorSelector( "Marked Foreground" )->getColor(), "Marked Foreground" };
- addColorSelector( "Marked Current Foreground", i18n( "Selected current foreground:" ), Qt::white, i18n( "Not used" ), &sameAsMarkedForegnd, 1);
- addColorSelector( "Current Background", i18n( "Current background:" ), Qt::white, i18n( "Not used" ), &sameAsBckgnd, 1 );
+ addColorSelector( "Marked Current Foreground", i18n( "Selected current foreground:" ), TQt::white, i18n( "Not used" ), &sameAsMarkedForegnd, 1);
+ addColorSelector( "Current Background", i18n( "Current background:" ), TQt::white, i18n( "Not used" ), &sameAsBckgnd, 1 );
colorsGrid->addWidget(createSpacer(colorsGrp, ""), itemList.count() - offset, 1);
- connect( getColorSelector( "Foreground" ), SIGNAL( colorChanged() ), this, SLOT( slotForegroundChanged() ) );
- connect( getColorSelector( "Background" ), SIGNAL( colorChanged() ), this, SLOT( slotBackgroundChanged() ) );
- connect( getColorSelector( "Alternate Background" ), SIGNAL( colorChanged() ), this, SLOT( slotAltBackgroundChanged() ) );
- connect( getColorSelector( "Marked Background" ), SIGNAL( colorChanged() ), this, SLOT( slotMarkedBackgroundChanged() ) );
+ connect( getColorSelector( "Foreground" ), TQT_SIGNAL( colorChanged() ), this, TQT_SLOT( slotForegroundChanged() ) );
+ connect( getColorSelector( "Background" ), TQT_SIGNAL( colorChanged() ), this, TQT_SLOT( slotBackgroundChanged() ) );
+ connect( getColorSelector( "Alternate Background" ), TQT_SIGNAL( colorChanged() ), this, TQT_SLOT( slotAltBackgroundChanged() ) );
+ connect( getColorSelector( "Marked Background" ), TQT_SIGNAL( colorChanged() ), this, TQT_SLOT( slotMarkedBackgroundChanged() ) );
- inactiveColorStack = new QWidgetStack( colorTabWidget, "colorTab2" );
+ inactiveColorStack = new TQWidgetStack( colorTabWidget, "colorTab2" );
colorTabWidget->insertTab( inactiveColorStack, i18n( "Inactive" ) );
- colorsGrp = normalInactiveWidget = new QWidget( inactiveColorStack, "colorTab2" );
+ colorsGrp = normalInactiveWidget = new TQWidget( inactiveColorStack, "colorTab2" );
- colorsGrid = new QGridLayout( normalInactiveWidget );
+ colorsGrid = new TQGridLayout( normalInactiveWidget );
colorsGrid->setSpacing( 0 );
colorsGrid->setMargin( 2 );
@@ -150,28 +150,28 @@ KgColors::KgColors( bool first, QWidget* parent, const char* name ) :
colorsGrid->addWidget(createSpacer(normalInactiveWidget, ""), itemList.count() - offset, 1);
- connect( getColorSelector( "Inactive Foreground" ), SIGNAL( colorChanged() ), this, SLOT( slotInactiveForegroundChanged() ) );
- connect( getColorSelector( "Inactive Background" ), SIGNAL( colorChanged() ), this, SLOT( slotInactiveBackgroundChanged() ) );
- connect( getColorSelector( "Inactive Alternate Background" ), SIGNAL( colorChanged() ), this, SLOT( slotInactiveAltBackgroundChanged() ) );
- connect( getColorSelector( "Inactive Marked Background" ), SIGNAL( colorChanged() ), this, SLOT( slotInactiveMarkedBackgroundChanged() ) );
+ connect( getColorSelector( "Inactive Foreground" ), TQT_SIGNAL( colorChanged() ), this, TQT_SLOT( slotInactiveForegroundChanged() ) );
+ connect( getColorSelector( "Inactive Background" ), TQT_SIGNAL( colorChanged() ), this, TQT_SLOT( slotInactiveBackgroundChanged() ) );
+ connect( getColorSelector( "Inactive Alternate Background" ), TQT_SIGNAL( colorChanged() ), this, TQT_SLOT( slotInactiveAltBackgroundChanged() ) );
+ connect( getColorSelector( "Inactive Marked Background" ), TQT_SIGNAL( colorChanged() ), this, TQT_SLOT( slotInactiveMarkedBackgroundChanged() ) );
offset = endOfPanelColors = itemList.count();
inactiveColorStack->addWidget( normalInactiveWidget );
- colorsGrp = dimmedInactiveWidget = new QWidget( inactiveColorStack, "colorTab2dimmed" );
+ colorsGrp = dimmedInactiveWidget = new TQWidget( inactiveColorStack, "colorTab2dimmed" );
- colorsGrid = new QGridLayout( dimmedInactiveWidget );
+ colorsGrid = new TQGridLayout( dimmedInactiveWidget );
colorsGrid->setSpacing( 0 );
colorsGrid->setMargin( 2 );
- addColorSelector( "Dim Target Color", i18n( "Dim target color:" ), Qt::white);
+ addColorSelector( "Dim Target Color", i18n( "Dim target color:" ), TQt::white);
int index = itemList.count() - offset;
- labelList.append( addLabel( colorsGrid, index, 0, i18n("Dim factor:"), colorsGrp, QString( "ColorsLabel%1" ).arg( index ).ascii() ) );
+ labelList.append( addLabel( colorsGrid, index, 0, i18n("Dim factor:"), colorsGrp, TQString( "ColorsLabel%1" ).tqarg( index ).ascii() ) );
dimFactor = createSpinBox("Colors", "Dim Factor", 100, 0, 100, colorsGrp);
- dimFactor->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
- connect( dimFactor, SIGNAL( valueChanged( int ) ), this, SLOT( generatePreview() ) );
+ dimFactor->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
+ connect( dimFactor, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( generatePreview() ) );
colorsGrid->addWidget( dimFactor, index++, 1 );
colorsGrid->addWidget(createSpacer(dimmedInactiveWidget, ""), itemList.count() + 1 - offset, 1);
@@ -180,10 +180,10 @@ KgColors::KgColors( bool first, QWidget* parent, const char* name ) :
inactiveColorStack->raiseWidget( normalInactiveWidget );
- colorsGrp = new QWidget( colorTabWidget, "colorTab3" );
+ colorsGrp = new TQWidget( colorTabWidget, "colorTab3" );
colorTabWidget->insertTab( colorsGrp, i18n( "Synchronizer" ) );
- colorsGrid = new QGridLayout( colorsGrp );
+ colorsGrid = new TQGridLayout( colorsGrp );
colorsGrid->setSpacing( 0 );
colorsGrid->setMargin( 2 );
@@ -192,16 +192,16 @@ KgColors::KgColors( bool first, QWidget* parent, const char* name ) :
offset = endOfPanelColors = itemList.count();
- addColorSelector( "Synchronizer Equals Foreground", i18n( "Equals foreground:" ), Qt::black, QString::null, &KDEDefaultFore, 1 );
- addColorSelector( "Synchronizer Equals Background", i18n( "Equals background:" ), KGlobalSettings::baseColor(), QString::null, &KDEDefaultBase, 1 );
- addColorSelector( "Synchronizer Differs Foreground", i18n( "Differing foreground:" ), Qt::red, QString::null, &KDEDefaultFore, 1 );
- addColorSelector( "Synchronizer Differs Background", i18n( "Differing background:" ), KGlobalSettings::baseColor(), QString::null, &KDEDefaultBase, 1 );
- addColorSelector( "Synchronizer LeftCopy Foreground", i18n( "Copy to left foreground:" ), Qt::blue, QString::null, &KDEDefaultFore, 1 );
- addColorSelector( "Synchronizer LeftCopy Background", i18n( "Copy to left background:" ), KGlobalSettings::baseColor(), QString::null, &KDEDefaultBase, 1 );
- addColorSelector( "Synchronizer RightCopy Foreground", i18n( "Copy to right foreground:" ), Qt::darkGreen, QString::null, &KDEDefaultFore, 1 );
- addColorSelector( "Synchronizer RightCopy Background", i18n( "Copy to right background:" ), KGlobalSettings::baseColor(), QString::null, &KDEDefaultBase, 1 );
- addColorSelector( "Synchronizer Delete Foreground", i18n( "Delete foreground:" ), Qt::white, QString::null, &KDEDefaultFore, 1 );
- addColorSelector( "Synchronizer Delete Background", i18n( "Delete background:" ), Qt::red, QString::null, &KDEDefaultBase, 1 );
+ addColorSelector( "Synchronizer Equals Foreground", i18n( "Equals foreground:" ), TQt::black, TQString(), &KDEDefaultFore, 1 );
+ addColorSelector( "Synchronizer Equals Background", i18n( "Equals background:" ), KGlobalSettings::baseColor(), TQString(), &KDEDefaultBase, 1 );
+ addColorSelector( "Synchronizer Differs Foreground", i18n( "Differing foreground:" ), TQt::red, TQString(), &KDEDefaultFore, 1 );
+ addColorSelector( "Synchronizer Differs Background", i18n( "Differing background:" ), KGlobalSettings::baseColor(), TQString(), &KDEDefaultBase, 1 );
+ addColorSelector( "Synchronizer LeftCopy Foreground", i18n( "Copy to left foreground:" ), TQt::blue, TQString(), &KDEDefaultFore, 1 );
+ addColorSelector( "Synchronizer LeftCopy Background", i18n( "Copy to left background:" ), KGlobalSettings::baseColor(), TQString(), &KDEDefaultBase, 1 );
+ addColorSelector( "Synchronizer RightCopy Foreground", i18n( "Copy to right foreground:" ), TQt::darkGreen, TQString(), &KDEDefaultFore, 1 );
+ addColorSelector( "Synchronizer RightCopy Background", i18n( "Copy to right background:" ), KGlobalSettings::baseColor(), TQString(), &KDEDefaultBase, 1 );
+ addColorSelector( "Synchronizer Delete Foreground", i18n( "Delete foreground:" ), TQt::white, TQString(), &KDEDefaultFore, 1 );
+ addColorSelector( "Synchronizer Delete Background", i18n( "Delete background:" ), TQt::red, TQString(), &KDEDefaultBase, 1 );
colorsGrid->addWidget(createSpacer(colorsGrp, ""), itemList.count() - offset, 1);
@@ -210,9 +210,9 @@ KgColors::KgColors( bool first, QWidget* parent, const char* name ) :
// -------------------------- PREVIEW GROUPBOX ----------------------------------
previewGrp = createFrame( i18n( "Preview" ), hbox, "kgColorsPreviewGrp" );
- previewGrid = createGridLayout( previewGrp->layout() );
+ previewGrid = createGridLayout( previewGrp->tqlayout() );
- preview = new QListView( previewGrp, "colorPreView" );
+ preview = new TQListView( previewGrp, "colorPreView" );
preview->setShowSortIndicator(false);
preview->setSorting(-1);
@@ -225,34 +225,34 @@ KgColors::KgColors( bool first, QWidget* parent, const char* name ) :
kgColorsLayout->addMultiCellWidget( hbox, 1 ,1, 0, 2 );
- importBtn = new KPushButton(i18n("Import color-scheme"),parent);
+ importBtn = new KPushButton(i18n("Import color-scheme"),tqparent);
kgColorsLayout->addWidget(importBtn,2,0);
- exportBtn = new KPushButton(i18n("Export color-scheme"),parent);
+ exportBtn = new KPushButton(i18n("Export color-scheme"),tqparent);
kgColorsLayout->addWidget(exportBtn,2,1);
- kgColorsLayout->addWidget(createSpacer(parent, ""), 2,2);
- connect(importBtn, SIGNAL(clicked()), this, SLOT(slotImportColors()));
- connect(exportBtn, SIGNAL(clicked()), this, SLOT(slotExportColors()));
+ kgColorsLayout->addWidget(createSpacer(tqparent, ""), 2,2);
+ connect(importBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotImportColors()));
+ connect(exportBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExportColors()));
slotDisable();
}
-int KgColors::addColorSelector( QString cfgName, QString name, QColor dflt, QString dfltName,
+int KgColors::addColorSelector( TQString cfgName, TQString name, TQColor dflt, TQString dfltName,
ADDITIONAL_COLOR *addColor, int addColNum )
{
int index = itemList.count() - offset;
- labelList.append( addLabel( colorsGrid, index, 0, name, colorsGrp, QString( "ColorsLabel%1" ).arg( index ).ascii() ) );
+ labelList.append( addLabel( colorsGrid, index, 0, name, colorsGrp, TQString( "ColorsLabel%1" ).tqarg( index ).ascii() ) );
KonfiguratorColorChooser *chooser = createColorChooser( "Colors", cfgName, dflt, colorsGrp, false, addColor, addColNum );
- chooser->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+ chooser->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
if( !dfltName.isEmpty() )
chooser->setDefaultText( dfltName );
colorsGrid->addWidget( chooser, index, 1 );
- connect( chooser, SIGNAL( colorChanged() ), this, SLOT( generatePreview() ) );
+ connect( chooser, TQT_SIGNAL( colorChanged() ), this, TQT_SLOT( generatePreview() ) );
if( !offset )
- connect( chooser, SIGNAL( colorChanged() ), this, SLOT( slotActiveChanged() ) );
+ connect( chooser, TQT_SIGNAL( colorChanged() ), this, TQT_SLOT( slotActiveChanged() ) );
itemList.append( chooser );
itemNames.append( cfgName );
@@ -260,9 +260,9 @@ int KgColors::addColorSelector( QString cfgName, QString name, QColor dflt, QStr
return index;
}
-KonfiguratorColorChooser *KgColors::getColorSelector( QString name )
+KonfiguratorColorChooser *KgColors::getColorSelector( TQString name )
{
- QValueList<QString>::iterator it;
+ TQValueList<TQString>::iterator it;
int position = 0;
for( it = itemNames.begin(); it != itemNames.end(); it++, position++ )
@@ -272,9 +272,9 @@ KonfiguratorColorChooser *KgColors::getColorSelector( QString name )
return 0;
}
-QLabel *KgColors::getSelectorLabel( QString name )
+TQLabel *KgColors::getSelectorLabel( TQString name )
{
- QValueList<QString>::iterator it;
+ TQValueList<TQString>::iterator it;
int position = 0;
for( it = itemNames.begin(); it != itemNames.end(); it++, position++ )
@@ -286,7 +286,7 @@ QLabel *KgColors::getSelectorLabel( QString name )
void KgColors::slotDisable()
{
- bool enabled = generals->find( "KDE Default" )->isChecked();
+ bool enabled = generals->tqfind( "KDE Default" )->isChecked();
importBtn->setEnabled(!enabled);
exportBtn->setEnabled(!enabled);
@@ -297,17 +297,17 @@ void KgColors::slotDisable()
for( int j = 0; itemList.at( j ) && j < endOfPanelColors ; j++ )
itemList.at( j )->setEnabled( !enabled );
- generals->find("Enable Alternate Background")->setEnabled( enabled );
- generals->find("Show Current Item Always")->setEnabled( !enabled );
- generals->find("Dim Inactive Colors")->setEnabled( !enabled );
+ generals->tqfind("Enable Alternate Background")->setEnabled( enabled );
+ generals->tqfind("Show Current Item Always")->setEnabled( !enabled );
+ generals->tqfind("Dim Inactive Colors")->setEnabled( !enabled );
- bool dimmed = !enabled && generals->find("Dim Inactive Colors")->isChecked();
+ bool dimmed = !enabled && generals->tqfind("Dim Inactive Colors")->isChecked();
if( dimmed )
inactiveColorStack->raiseWidget( dimmedInactiveWidget );
else
inactiveColorStack->raiseWidget( normalInactiveWidget );
- enabled = enabled || !generals->find( "Show Current Item Always" )->isChecked();
+ enabled = enabled || !generals->tqfind( "Show Current Item Always" )->isChecked();
getColorSelector( "Inactive Current Foreground" )->setEnabled( !enabled );
getColorSelector( "Inactive Current Background" )->setEnabled( !enabled );
@@ -323,7 +323,7 @@ void KgColors::slotActiveChanged()
void KgColors::slotForegroundChanged()
{
- QColor color = getColorSelector( "Foreground" )->getColor();
+ TQColor color = getColorSelector( "Foreground" )->getColor();
getColorSelector( "Directory Foreground" )->setDefaultColor( color );
getColorSelector( "Executable Foreground" )->setDefaultColor( color );
@@ -333,7 +333,7 @@ void KgColors::slotForegroundChanged()
void KgColors::slotBackgroundChanged()
{
- QColor color = getColorSelector( "Background" )->getColor();
+ TQColor color = getColorSelector( "Background" )->getColor();
getColorSelector( "Alternate Background" )->changeAdditionalColor( 0, color );
getColorSelector( "Marked Background" )->changeAdditionalColor( 0, color );
@@ -342,19 +342,19 @@ void KgColors::slotBackgroundChanged()
void KgColors::slotAltBackgroundChanged()
{
- QColor color = getColorSelector( "Alternate Background" )->getColor();
+ TQColor color = getColorSelector( "Alternate Background" )->getColor();
getColorSelector( "Alternate Marked Background" )->changeAdditionalColor( 0, color );
}
void KgColors::slotMarkedBackgroundChanged()
{
- QColor color = getColorSelector( "Marked Background" )->getColor();
+ TQColor color = getColorSelector( "Marked Background" )->getColor();
getColorSelector( "Alternate Marked Background" )->setDefaultColor( color );
}
void KgColors::slotInactiveForegroundChanged()
{
- QColor color = getColorSelector( "Inactive Foreground" )->getColor();
+ TQColor color = getColorSelector( "Inactive Foreground" )->getColor();
getColorSelector( "Inactive Directory Foreground" )->changeAdditionalColor( 0, color );
getColorSelector( "Inactive Executable Foreground" )->changeAdditionalColor( 0, color );
@@ -364,7 +364,7 @@ void KgColors::slotInactiveForegroundChanged()
void KgColors::slotInactiveBackgroundChanged()
{
- QColor color = getColorSelector( "Inactive Background" )->getColor();
+ TQColor color = getColorSelector( "Inactive Background" )->getColor();
getColorSelector( "Inactive Alternate Background" )->changeAdditionalColor( 0, color );
getColorSelector( "Inactive Marked Background" )->changeAdditionalColor( 0, color );
@@ -373,27 +373,27 @@ void KgColors::slotInactiveBackgroundChanged()
void KgColors::slotInactiveAltBackgroundChanged()
{
- QColor color = getColorSelector( "Inactive Alternate Background" )->getColor();
+ TQColor color = getColorSelector( "Inactive Alternate Background" )->getColor();
getColorSelector( "Inactive Alternate Marked Background" )->changeAdditionalColor( 0, color );
}
void KgColors::slotInactiveMarkedBackgroundChanged()
{
- QColor color = getColorSelector( "Inactive Marked Background" )->getColor();
+ TQColor color = getColorSelector( "Inactive Marked Background" )->getColor();
getColorSelector( "Inactive Alternate Marked Background" )->changeAdditionalColor( 1, color );
}
-void KgColors::setColorWithDimming(PreviewItem * item, QColor foreground, QColor background, bool dimmed )
+void KgColors::setColorWithDimming(PreviewItem * item, TQColor foreground, TQColor background, bool dimmed )
{
if ( dimmed && dimFactor->value() < 100)
{
int dim = dimFactor->value();
- QColor dimColor = getColorSelector("Dim Target Color")->getColor();
+ TQColor dimColor = getColorSelector("Dim Target Color")->getColor();
- foreground = QColor((dimColor.red() * (100 - dim) + foreground.red() * dim) / 100,
+ foreground = TQColor((dimColor.red() * (100 - dim) + foreground.red() * dim) / 100,
(dimColor.green() * (100 - dim) + foreground.green() * dim) / 100,
(dimColor.blue() * (100 - dim) + foreground.blue() * dim) / 100);
- background = QColor((dimColor.red() * (100 - dim) + background.red() * dim) / 100,
+ background = TQColor((dimColor.red() * (100 - dim) + background.red() * dim) / 100,
(dimColor.green() * (100 - dim) + background.green() * dim) / 100,
(dimColor.blue() * (100 - dim) + background.blue() * dim) / 100);
}
@@ -427,8 +427,8 @@ void KgColors::generatePreview()
KrColorSettings colorSettings;
// copy over local settings to color settings instance, which does not affect the persisted krConfig settings
- QValueList<QString> names = KrColorSettings::getColorNames();
- for ( QStringList::Iterator it = names.begin(); it != names.end(); ++it )
+ TQValueList<TQString> names = KrColorSettings::getColorNames();
+ for ( TQStringList::Iterator it = names.begin(); it != names.end(); ++it )
{
KonfiguratorColorChooser * chooser = getColorSelector( *it );
if (!chooser)
@@ -437,20 +437,20 @@ void KgColors::generatePreview()
if (chooser->isValueRGB())
colorSettings.setColorValue( *it, chooser->getColor());
else
- colorSettings.setColorValue( *it, QColor());
+ colorSettings.setColorValue( *it, TQColor());
}
- colorSettings.setBoolValue("KDE Default", generals->find( "KDE Default" )->isChecked());
- colorSettings.setBoolValue("Enable Alternate Background", generals->find( "Enable Alternate Background" )->isChecked());
- colorSettings.setBoolValue("Show Current Item Always", generals->find( "Show Current Item Always" )->isChecked());
- colorSettings.setBoolValue("Dim Inactive Colors", generals->find( "Dim Inactive Colors" )->isChecked());
+ colorSettings.setBoolValue("KDE Default", generals->tqfind( "KDE Default" )->isChecked());
+ colorSettings.setBoolValue("Enable Alternate Background", generals->tqfind( "Enable Alternate Background" )->isChecked());
+ colorSettings.setBoolValue("Show Current Item Always", generals->tqfind( "Show Current Item Always" )->isChecked());
+ colorSettings.setBoolValue("Dim Inactive Colors", generals->tqfind( "Dim Inactive Colors" )->isChecked());
colorSettings.setNumValue("Dim Factor", dimFactor->value());
// let the color cache use the local color settings
colCache.setColors( colorSettings );
// ask the local color cache for certain color groups and use them to color the preview
- QColorGroup cg;
+ TQColorGroup cg;
colCache.getColors(cg, KrColorItemType(KrColorItemType::Directory, false, isActive, false, false));
pwDir->setColor( cg.text(), cg.background() );
colCache.getColors(cg, KrColorItemType(KrColorItemType::File, true, isActive, false, false));
@@ -498,26 +498,26 @@ bool KgColors::apply()
}
void KgColors::slotImportColors() {
- // find $KDEDIR/share/apps/krusader
- QString basedir = KGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap");
+ // tqfind $KDEDIR/share/apps/krusader
+ TQString basedir = KGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap");
// let the user select a file to load
- QString file = KFileDialog::getOpenFileName(basedir, "*.color", 0, i18n("Select a color-scheme file"));
- if (file == QString::null) return;
- QFile f(file);
+ TQString file = KFileDialog::getOpenFileName(basedir, "*.color", 0, i18n("Select a color-scheme file"));
+ if (file == TQString()) return;
+ TQFile f(file);
if (!f.open(IO_ReadOnly)) {
KMessageBox::error(this, i18n("Error: unable to read from file"), i18n("Error"));
return;
}
- QDataStream stream(&f);
+ TQDataStream stream(&f);
// ok, import away
deserialize(stream);
generatePreview();
}
void KgColors::slotExportColors() {
- QString file = KFileDialog::getSaveFileName(QString::null, "*", 0, i18n("Select a color scheme file"));
- if (file == QString::null) return;
- QFile f(file);
+ TQString file = KFileDialog::getSaveFileName(TQString(), "*", 0, i18n("Select a color scheme file"));
+ if (file == TQString()) return;
+ TQFile f(file);
if (f.exists() && KMessageBox::warningContinueCancel(this,
i18n("File ")+file+i18n(" already exists. Are you sure you want to overwrite it?"),
i18n("Warning"), i18n("Overwrite")) != KMessageBox::Continue) return;
@@ -525,11 +525,11 @@ void KgColors::slotExportColors() {
KMessageBox::error(this, i18n("Error: unable to write to file"), i18n("Error"));
return;
}
- QDataStream stream(&f);
+ TQDataStream stream(&f);
serialize(stream);
}
-void KgColors::serialize(QDataStream & stream)
+void KgColors::serialize(TQDataStream & stream)
{
serializeItem(stream, "Alternate Background");
serializeItem(stream, "Alternate Marked Background");
@@ -573,14 +573,14 @@ void KgColors::serialize(QDataStream & stream)
serializeItem(stream, "Synchronizer RightCopy Background");
serializeItem(stream, "Synchronizer Delete Foreground");
serializeItem(stream, "Synchronizer Delete Background");
- stream << QString("") << QString("");
+ stream << TQString("") << TQString("");
}
-void KgColors::deserialize(QDataStream & stream)
+void KgColors::deserialize(TQDataStream & stream)
{
for (;;)
{
- QString name, value;
+ TQString name, value;
stream >> name >> value;
if (name == "")
break;
@@ -593,7 +593,7 @@ void KgColors::deserialize(QDataStream & stream)
if( value == "true" || value == "yes" || value == "on" || value == "1" )
bValue = true;
- generals->find( name )->setChecked( bValue );
+ generals->tqfind( name )->setChecked( bValue );
continue;
}
@@ -610,19 +610,19 @@ void KgColors::deserialize(QDataStream & stream)
}
}
-void KgColors::serializeItem(class QDataStream & stream, const char * name)
+void KgColors::serializeItem(class TQDataStream & stream, const char * name)
{
- stream << QString(name);
+ stream << TQString(name);
if( (strcmp( name, "KDE Default") == 0)
|| (strcmp( name, "Enable Alternate Background") == 0)
|| (strcmp( name, "Show Current Item Always") == 0)
|| (strcmp( name, "Dim Inactive Colors") == 0) )
{
- bool bValue = generals->find( name )->isChecked();
- stream << QString( bValue ? "true" : "false" );
+ bool bValue = generals->tqfind( name )->isChecked();
+ stream << TQString( bValue ? "true" : "false" );
}
else if( strcmp( name, "Dim Factor") == 0 )
- stream << QString::number(dimFactor->value());
+ stream << TQString::number(dimFactor->value());
else
{
KonfiguratorColorChooser *selector = getColorSelector( name );
diff --git a/krusader/Konfigurator/kgcolors.h b/krusader/Konfigurator/kgcolors.h
index 55398f4..5dd69e2 100644
--- a/krusader/Konfigurator/kgcolors.h
+++ b/krusader/Konfigurator/kgcolors.h
@@ -32,17 +32,18 @@
#define __KGCOLORS_H__
#include "konfiguratorpage.h"
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qlistview.h>
-#include <qwidgetstack.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqlistview.h>
+#include <tqwidgetstack.h>
class KgColors : public KonfiguratorPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- KgColors( bool first, QWidget* parent=0, const char* name=0 );
+ KgColors( bool first, TQWidget* tqparent=0, const char* name=0 );
bool apply();
@@ -66,73 +67,73 @@ protected slots:
private:
class PreviewItem;
- int addColorSelector( QString cfgName, QString name, QColor dflt, QString dfltName = QString::null,
+ int addColorSelector( TQString cfgName, TQString name, TQColor dflt, TQString dfltName = TQString(),
ADDITIONAL_COLOR *addColor = 0, int addColNum = 0);
- KonfiguratorColorChooser *getColorSelector( QString name );
- QLabel *getSelectorLabel( QString name );
- void serialize(class QDataStream &);
- void deserialize(class QDataStream &);
- void serializeItem(class QDataStream &, const char * name);
- void setColorWithDimming(PreviewItem * item, QColor foreground, QColor background, bool dimmed );
+ KonfiguratorColorChooser *getColorSelector( TQString name );
+ TQLabel *getSelectorLabel( TQString name );
+ void serialize(class TQDataStream &);
+ void deserialize(class TQDataStream &);
+ void serializeItem(class TQDataStream &, const char * name);
+ void setColorWithDimming(PreviewItem * item, TQColor foreground, TQColor background, bool dimmed );
private:
- QWidget *colorsGrp;
- QGridLayout *colorsGrid;
+ TQWidget *colorsGrp;
+ TQGridLayout *colorsGrid;
int offset;
int endOfActiveColors;
int endOfPanelColors;
- QGroupBox *previewGrp;
- QGridLayout *previewGrid;
- QTabWidget *colorTabWidget;
+ TQGroupBox *previewGrp;
+ TQGridLayout *previewGrid;
+ TQTabWidget *colorTabWidget;
- QWidgetStack *inactiveColorStack;
- QWidget *normalInactiveWidget;
- QWidget *dimmedInactiveWidget;
+ TQWidgetStack *inactiveColorStack;
+ TQWidget *normalInactiveWidget;
+ TQWidget *dimmedInactiveWidget;
KonfiguratorSpinBox *dimFactor;
KonfiguratorCheckBoxGroup *generals;
- QPtrList<QLabel> labelList;
- QPtrList<KonfiguratorColorChooser> itemList;
- QValueList<QString> itemNames;
+ TQPtrList<TQLabel> labelList;
+ TQPtrList<KonfiguratorColorChooser> itemList;
+ TQValueList<TQString> itemNames;
- QListView *preview;
+ TQListView *preview;
KPushButton *importBtn, *exportBtn;
- class PreviewItem : public QListViewItem
+ class PreviewItem : public TQListViewItem
{
private:
- QColor defaultBackground;
- QColor defaultForeground;
- QString label;
+ TQColor defaultBackground;
+ TQColor defaultForeground;
+ TQString label;
public:
- PreviewItem( QListView * parent, QString name ) : QListViewItem( parent, name )
+ PreviewItem( TQListView * tqparent, TQString name ) : TQListViewItem( tqparent, name )
{
- defaultBackground = QColor( 255, 255, 255 );
- defaultForeground = QColor( 0, 0, 0 );
+ defaultBackground = TQColor( 255, 255, 255 );
+ defaultForeground = TQColor( 0, 0, 0 );
label = name;
}
- void setColor( QColor foregnd, QColor backgnd )
+ void setColor( TQColor foregnd, TQColor backgnd )
{
defaultForeground = foregnd;
defaultBackground = backgnd;
- listView()->repaintItem( this );
+ listView()->tqrepaintItem( this );
}
- QString text()
+ TQString text()
{
return label;
}
- void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align )
+ void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{
- QColorGroup _cg( cg );
- _cg.setColor( QColorGroup::Base, defaultBackground );
- _cg.setColor( QColorGroup::Text, defaultForeground );
- QListViewItem::paintCell(p, _cg, column, width, align);
+ TQColorGroup _cg( cg );
+ _cg.setColor( TQColorGroup::Base, defaultBackground );
+ _cg.setColor( TQColorGroup::Text, defaultForeground );
+ TQListViewItem::paintCell(p, _cg, column, width, align);
}
};
};
diff --git a/krusader/Konfigurator/kgdependencies.cpp b/krusader/Konfigurator/kgdependencies.cpp
index 7e9f948..9b6607f 100644
--- a/krusader/Konfigurator/kgdependencies.cpp
+++ b/krusader/Konfigurator/kgdependencies.cpp
@@ -31,31 +31,31 @@
#include "kgdependencies.h"
#include "../krservices.h"
#include "../krusader.h"
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <klocale.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include <kmessagebox.h>
#define PAGE_GENERAL 0
#define PAGE_PACKERS 1
#define PAGE_CHECKSUM 2
-KgDependencies::KgDependencies( bool first, QWidget* parent, const char* name ) :
- KonfiguratorPage( first, parent, name )
+KgDependencies::KgDependencies( bool first, TQWidget* tqparent, const char* name ) :
+ KonfiguratorPage( first, tqparent, name )
{
- QGridLayout *kgDependenciesLayout = new QGridLayout( parent );
+ TQGridLayout *kgDependenciesLayout = new TQGridLayout( tqparent );
kgDependenciesLayout->setSpacing( 6 );
// ---------------------------- GENERAL TAB -------------------------------------
- tabWidget = new QTabWidget( parent, "tabWidget" );
+ tabWidget = new TQTabWidget( tqparent, "tabWidget" );
- QWidget *general_tab = new QWidget( tabWidget, "tab" );
+ TQWidget *general_tab = new TQWidget( tabWidget, "tab" );
tabWidget->insertTab( general_tab, i18n( "General" ) );
- QGridLayout *pathsGrid = new QGridLayout( general_tab );
+ TQGridLayout *pathsGrid = new TQGridLayout( general_tab );
pathsGrid->setSpacing( 6 );
pathsGrid->setMargin( 11 );
- pathsGrid->setAlignment( Qt::AlignTop );
+ pathsGrid->tqsetAlignment( TQt::AlignTop );
addApplication( "df", pathsGrid, 0, general_tab, PAGE_GENERAL );
addApplication( "eject", pathsGrid, 1, general_tab, PAGE_GENERAL );
@@ -71,13 +71,13 @@ KgDependencies::KgDependencies( bool first, QWidget* parent, const char* name )
addApplication( "updatedb", pathsGrid,11, general_tab, PAGE_GENERAL );
// ---------------------------- PACKERS TAB -------------------------------------
- QWidget *packers_tab = new QWidget( tabWidget, "tab_3" );
+ TQWidget *packers_tab = new TQWidget( tabWidget, "tab_3" );
tabWidget->insertTab( packers_tab, i18n( "Packers" ) );
- QGridLayout *archGrid1 = new QGridLayout( packers_tab );
+ TQGridLayout *archGrid1 = new TQGridLayout( packers_tab );
archGrid1->setSpacing( 6 );
archGrid1->setMargin( 11 );
- archGrid1->setAlignment( Qt::AlignTop );
+ archGrid1->tqsetAlignment( TQt::AlignTop );
addApplication( "7z", archGrid1, 0, packers_tab, PAGE_PACKERS, "7za" );
addApplication( "arj", archGrid1, 1, packers_tab, PAGE_PACKERS );
@@ -95,13 +95,13 @@ KgDependencies::KgDependencies( bool first, QWidget* parent, const char* name )
addApplication( "zip", archGrid1,13, packers_tab, PAGE_PACKERS );
// ---------------------------- CHECKSUM TAB -------------------------------------
- QWidget *checksum_tab = new QWidget( tabWidget, "tab_4" );
+ TQWidget *checksum_tab = new TQWidget( tabWidget, "tab_4" );
tabWidget->insertTab( checksum_tab, i18n( "Checksum Utilities" ) );
- QGridLayout *archGrid2 = new QGridLayout( checksum_tab );
+ TQGridLayout *archGrid2 = new TQGridLayout( checksum_tab );
archGrid2->setSpacing( 6 );
archGrid2->setMargin( 11 );
- archGrid2->setAlignment( Qt::AlignTop );
+ archGrid2->tqsetAlignment( TQt::AlignTop );
addApplication( "md5sum", archGrid2, 0, checksum_tab, PAGE_CHECKSUM );
addApplication( "sha1sum", archGrid2, 1, checksum_tab, PAGE_CHECKSUM );
@@ -119,12 +119,12 @@ KgDependencies::KgDependencies( bool first, QWidget* parent, const char* name )
kgDependenciesLayout->addWidget( tabWidget, 0, 0 );
}
-void KgDependencies::addApplication( QString name, QGridLayout *grid, int row, QWidget *parent, int page, QString additionalList )
+void KgDependencies::addApplication( TQString name, TQGridLayout *grid, int row, TQWidget *tqparent, int page, TQString additionalList )
{
- QString dflt = KrServices::fullPathName( name ); /* try to autodetect the full path name */
+ TQString dflt = KrServices::fullPathName( name ); /* try to autodetect the full path name */
if( dflt.isEmpty() ) {
- QStringList list = QStringList::split( ',', additionalList );
+ TQStringList list = TQStringList::split( ',', additionalList );
for( unsigned i=0; i != list.count(); i++ )
if( !KrServices::fullPathName( list[ i ] ).isEmpty() ) {
dflt = KrServices::fullPathName( list[ i ] );
@@ -132,32 +132,32 @@ void KgDependencies::addApplication( QString name, QGridLayout *grid, int row, Q
}
}
- addLabel( grid, row, 0, name, parent, (QString( "label:" )+name).ascii() );
+ addLabel( grid, row, 0, name, tqparent, (TQString( "label:" )+name).ascii() );
- KonfiguratorURLRequester *fullPath = createURLRequester( "Dependencies", name, dflt, parent, false, page );
- connect( fullPath->extension(), SIGNAL( applyManually( QObject *, QString, QString ) ),
- this, SLOT( slotApply( QObject *, QString, QString ) ) );
+ KonfiguratorURLRequester *fullPath = createURLRequester( "Dependencies", name, dflt, tqparent, false, page );
+ connect( fullPath->extension(), TQT_SIGNAL( applyManually( TQObject *, TQString, TQString ) ),
+ this, TQT_SLOT( slotApply( TQObject *, TQString, TQString ) ) );
grid->addWidget( fullPath, row, 1 );
}
-void KgDependencies::slotApply( QObject *obj, QString cls, QString name )
+void KgDependencies::slotApply( TQObject *obj, TQString cls, TQString name )
{
KonfiguratorURLRequester *urlRequester = (KonfiguratorURLRequester *) obj;
krConfig->setGroup( cls );
krConfig->writeEntry( name, urlRequester->url() );
- QString usedPath = KrServices::fullPathName( name );
+ TQString usedPath = KrServices::fullPathName( name );
if( urlRequester->url() != usedPath )
{
krConfig->writeEntry( name, usedPath );
if( usedPath.isEmpty() )
KMessageBox::error( this, i18n( "The %1 path is incorrect, no valid path found." )
- .arg( urlRequester->url() ) );
+ .tqarg( urlRequester->url() ) );
else
KMessageBox::error( this, i18n( "The %1 path is incorrect, %2 used instead." )
- .arg( urlRequester->url() ).arg( usedPath ) );
+ .tqarg( urlRequester->url() ).tqarg( usedPath ) );
urlRequester->setURL( usedPath );
}
}
diff --git a/krusader/Konfigurator/kgdependencies.h b/krusader/Konfigurator/kgdependencies.h
index 766c8ce..9a44c52 100644
--- a/krusader/Konfigurator/kgdependencies.h
+++ b/krusader/Konfigurator/kgdependencies.h
@@ -33,26 +33,27 @@
#include "konfiguratorpage.h"
-class QTabWidget;
+class TQTabWidget;
class KgDependencies : public KonfiguratorPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- KgDependencies( bool first, QWidget* parent=0, const char* name=0 );
+ KgDependencies( bool first, TQWidget* tqparent=0, const char* name=0 );
virtual int activeSubPage();
private:
- void addApplication( QString name, QGridLayout *grid, int row, QWidget *parent, int page, QString additionalList=QString::null );
+ void addApplication( TQString name, TQGridLayout *grid, int row, TQWidget *tqparent, int page, TQString additionalList=TQString() );
public slots:
- void slotApply( QObject *obj, QString cls, QString name );
+ void slotApply( TQObject *obj, TQString cls, TQString name );
private:
- QTabWidget *tabWidget;
+ TQTabWidget *tabWidget;
};
#endif /* __KGDEPENDENCIES_H__ */
diff --git a/krusader/Konfigurator/kggeneral.cpp b/krusader/Konfigurator/kggeneral.cpp
index d97189b..2d1002d 100644
--- a/krusader/Konfigurator/kggeneral.cpp
+++ b/krusader/Konfigurator/kggeneral.cpp
@@ -28,10 +28,10 @@
* *
***************************************************************************/
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qfontmetrics.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqfontmetrics.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kinputdialog.h>
@@ -41,19 +41,19 @@
#include "../krusader.h"
#include "../kicons.h"
-KgGeneral::KgGeneral( bool first, QWidget* parent, const char* name ) :
- KonfiguratorPage( first, parent, name )
+KgGeneral::KgGeneral( bool first, TQWidget* tqparent, const char* name ) :
+ KonfiguratorPage( first, tqparent, name )
{
if( first )
slotFindTools();
- QGridLayout *kgGeneralLayout = new QGridLayout( parent );
+ TQGridLayout *kgGeneralLayout = new TQGridLayout( tqparent );
kgGeneralLayout->setSpacing( 6 );
// -------------------------- GENERAL GROUPBOX ----------------------------------
- QGroupBox *generalGrp = createFrame( i18n( "General" ), parent, "kgGenGeneralGrp" );
- QGridLayout *generalGrid = createGridLayout( generalGrp->layout() );
+ TQGroupBox *generalGrp = createFrame( i18n( "General" ), tqparent, "kgGenGeneralGrp" );
+ TQGridLayout *generalGrid = createGridLayout( generalGrp->tqlayout() );
KONFIGURATOR_NAME_VALUE_TIP deleteMode[] =
// name value tooltip
@@ -69,28 +69,28 @@ if( first )
i18n( "Mimetype magic allows better distinction of file types, but is slower." ) );
generalGrid->addMultiCellWidget( checkBox, 1, 1, 0, 1 );
- QFrame *line1 = createLine( generalGrp, "line1" );
+ TQFrame *line1 = createLine( generalGrp, "line1" );
generalGrid->addMultiCellWidget( line1, 2, 2, 0, 1 );
// editor
- QLabel *label1 = new QLabel( i18n( "Editor:" ), generalGrp, "EditorLabel" );
+ TQLabel *label1 = new TQLabel( i18n( "Editor:" ), generalGrp, "EditorLabel" );
generalGrid->addWidget( label1, 3, 0 );
KonfiguratorURLRequester *urlReq = createURLRequester( "General", "Editor", "internal editor",
generalGrp, false );
generalGrid->addWidget( urlReq, 3, 1 );
- QLabel *label2 = new QLabel( i18n( "Hint: use 'internal editor' if you want to use Krusader's fast built-in editor" ), generalGrp, "EditorLabel" );
+ TQLabel *label2 = new TQLabel( i18n( "Hint: use 'internal editor' if you want to use Krusader's fast built-in editor" ), generalGrp, "EditorLabel" );
generalGrid->addMultiCellWidget( label2, 4, 4, 0, 1 );
-QFrame *line2 = createLine( generalGrp, "line2" );
+TQFrame *line2 = createLine( generalGrp, "line2" );
generalGrid->addMultiCellWidget( line2, 5, 5, 0, 1 );
// viewer
- QHBox * hbox2 = new QHBox( generalGrp );
- QVBox * vbox = new QVBox( hbox2 );
+ TQHBox * hbox2 = new TQHBox( generalGrp );
+ TQVBox * vbox = new TQVBox( hbox2 );
- new QLabel( i18n("Default viewer mode:"), vbox);
+ new TQLabel( i18n("Default viewer mode:"), vbox);
KONFIGURATOR_NAME_VALUE_TIP viewMode[] =
// name value tooltip
@@ -107,40 +107,40 @@ QFrame *line2 = createLine( generalGrp, "line2" );
generalGrid->addMultiCellWidget(hbox2, 6, 8, 0, 1);
// atomic extensions
- QFrame * frame21 = createLine( hbox2, "line2.1", true );
+ TQFrame * frame21 = createLine( hbox2, "line2.1", true );
frame21->setMinimumWidth( 15 );
- QVBox * vbox2 = new QVBox( hbox2 );
+ TQVBox * vbox2 = new TQVBox( hbox2 );
- QHBox * hbox3 = new QHBox( vbox2 );
- QLabel * atomLabel = new QLabel( i18n("Atomic extensions:"), hbox3);
+ TQHBox * hbox3 = new TQHBox( vbox2 );
+ TQLabel * atomLabel = new TQLabel( i18n("Atomic extensions:"), hbox3);
- int size = QFontMetrics( atomLabel->font() ).height();
+ int size = TQFontMetrics( atomLabel->font() ).height();
- QToolButton *addButton = new QToolButton( hbox3, "addBtnList" );
- QPixmap icon = krLoader->loadIcon("add",KIcon::Desktop, size );
+ TQToolButton *addButton = new TQToolButton( hbox3, "addBtnList" );
+ TQPixmap icon = krLoader->loadIcon("add",KIcon::Desktop, size );
addButton->setFixedSize( icon.width() + 4, icon.height() + 4 );
addButton->setPixmap( icon );
- connect( addButton, SIGNAL( clicked() ), this, SLOT( slotAddExtension() ) );
+ connect( addButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddExtension() ) );
- QToolButton *removeButton = new QToolButton( hbox3, "removeBtnList" );
+ TQToolButton *removeButton = new TQToolButton( hbox3, "removeBtnList" );
icon = krLoader->loadIcon("remove",KIcon::Desktop, size );
removeButton->setFixedSize( icon.width() + 4, icon.height() + 4 );
removeButton->setPixmap( icon );
- connect( removeButton, SIGNAL( clicked() ), this, SLOT( slotRemoveExtension() ) );
+ connect( removeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemoveExtension() ) );
- QStringList defaultAtomicExtensions;
+ TQStringList defaultAtomicExtensions;
defaultAtomicExtensions += ".tar.gz";
defaultAtomicExtensions += ".tar.bz2";
- defaultAtomicExtensions += ".moc.cpp";
+ defaultAtomicExtensions += ".tqmoc.cpp";
listBox = createListBox( "Look&Feel", "Atomic Extensions",
defaultAtomicExtensions, vbox2, true, false );
- QFrame *line3 = createLine( generalGrp, "line3" );
+ TQFrame *line3 = createLine( generalGrp, "line3" );
generalGrid->addMultiCellWidget( line3, 9, 9, 0, 1 );
// terminal
- QLabel *label3 = new QLabel( i18n( "Terminal:" ), generalGrp, "TerminalLabel" );
+ TQLabel *label3 = new TQLabel( i18n( "Terminal:" ), generalGrp, "TerminalLabel" );
generalGrid->addWidget( label3, 10, 0 );
KonfiguratorURLRequester *urlReq2 = createURLRequester( "General", "Terminal", "konsole",
generalGrp, false );
@@ -151,20 +151,20 @@ QFrame *line2 = createLine( generalGrp, "line2" );
i18n( "When checked, whenever the panel is changed (for example, by pressing TAB), krusader changes the current directory in the terminal emulator." ) );
generalGrid->addMultiCellWidget( checkBox1, 11, 11, 0, 1 );
- QFrame *line31 = createLine( generalGrp, "line4" );
+ TQFrame *line31 = createLine( generalGrp, "line4" );
generalGrid->addMultiCellWidget( line31, 12, 12, 0, 1 );
// temp dir
- QHBox *hbox = new QHBox( generalGrp, "hbox" );
- new QLabel( i18n( "Temp Directory:" ), hbox, "TempDirectory" );
+ TQHBox *hbox = new TQHBox( generalGrp, "hbox" );
+ new TQLabel( i18n( "Temp Directory:" ), hbox, "TempDirectory" );
KonfiguratorURLRequester *urlReq3 = createURLRequester( "General", "Temp Directory", "/tmp/krusader.tmp",
hbox, false );
urlReq3->setMode( KFile::Directory );
- connect( urlReq3->extension(), SIGNAL( applyManually(QObject *,QString, QString) ),
- this, SLOT( applyTempDir(QObject *,QString, QString) ) );
+ connect( urlReq3->extension(), TQT_SIGNAL( applyManually(TQObject *,TQString, TQString) ),
+ this, TQT_SLOT( applyTempDir(TQObject *,TQString, TQString) ) );
generalGrid->addMultiCellWidget( hbox, 13, 13, 0, 1 );
- QLabel *label4 = new QLabel( i18n( "Note: you must have full permissions for the temporary directory!" ),
+ TQLabel *label4 = new TQLabel( i18n( "Note: you must have full permissions for the temporary directory!" ),
generalGrp, "NoteLabel" );
generalGrid->addMultiCellWidget( label4, 14, 14, 0, 1 );
@@ -172,10 +172,10 @@ QFrame *line2 = createLine( generalGrp, "line2" );
kgGeneralLayout->addWidget( generalGrp, 0 ,0 );
}
-void KgGeneral::applyTempDir(QObject *obj,QString cls, QString name)
+void KgGeneral::applyTempDir(TQObject *obj,TQString cls, TQString name)
{
KonfiguratorURLRequester *urlReq = (KonfiguratorURLRequester *)obj;
- QString value = QDir(urlReq->url()).path();
+ TQString value = TQDir(urlReq->url()).path();
krConfig->setGroup( cls );
krConfig->writeEntry( name, value );
@@ -191,12 +191,12 @@ void KgGeneral::slotFindTools()
void KgGeneral::slotAddExtension()
{
bool ok;
- QString atomExt =
- KInputDialog::getText( i18n( "Add new atomic extension" ), i18n( "Extension: " ), QString::null, &ok );
+ TQString atomExt =
+ KInputDialog::getText( i18n( "Add new atomic extension" ), i18n( "Extension: " ), TQString(), &ok );
if( ok )
{
- if( !atomExt.startsWith( "." ) || atomExt.find( '.', 1 ) == -1 )
+ if( !atomExt.startsWith( "." ) || atomExt.tqfind( '.', 1 ) == -1 )
KMessageBox::error(krApp, i18n("Atomic extensions must start with '.'\n and must contain at least one more '.' character"), i18n("Error"));
else
listBox->addItem( atomExt );
@@ -205,7 +205,7 @@ void KgGeneral::slotAddExtension()
void KgGeneral::slotRemoveExtension()
{
- QListBoxItem * item = listBox->selectedItem();
+ TQListBoxItem * item = listBox->selectedItem();
if( item )
listBox->removeItem( item->text() );
}
diff --git a/krusader/Konfigurator/kggeneral.h b/krusader/Konfigurator/kggeneral.h
index 6e6b69f..8987f24 100644
--- a/krusader/Konfigurator/kggeneral.h
+++ b/krusader/Konfigurator/kggeneral.h
@@ -36,12 +36,13 @@
class KgGeneral : public KonfiguratorPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- KgGeneral( bool first, QWidget* parent=0, const char* name=0 );
+ KgGeneral( bool first, TQWidget* tqparent=0, const char* name=0 );
public slots:
- void applyTempDir(QObject *,QString, QString);
+ void applyTempDir(TQObject *,TQString, TQString);
void slotFindTools();
void slotAddExtension();
diff --git a/krusader/Konfigurator/kglookfeel.cpp b/krusader/Konfigurator/kglookfeel.cpp
index c9a167e..a8092c1 100644
--- a/krusader/Konfigurator/kglookfeel.cpp
+++ b/krusader/Konfigurator/kglookfeel.cpp
@@ -32,11 +32,11 @@
#include "../krusader.h"
#include "../defaults.h"
#include "../Dialogs/krdialogs.h"
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <klocale.h>
-#include <qwhatsthis.h>
-#include <qvalidator.h>
-#include <qlistview.h>
+#include <tqwhatsthis.h>
+#include <tqvalidator.h>
+#include <tqlistview.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
#include <kglobal.h>
@@ -49,13 +49,13 @@
#define PAGE_PANELTOOLBAR 2
#define PAGE_MOUSE 3
-KgLookFeel::KgLookFeel( bool first, QWidget* parent, const char* name ) :
- KonfiguratorPage( first, parent, name )
+KgLookFeel::KgLookFeel( bool first, TQWidget* tqparent, const char* name ) :
+ KonfiguratorPage( first, tqparent, name )
{
- QGridLayout *kgLookAndFeelLayout = new QGridLayout( parent );
+ TQGridLayout *kgLookAndFeelLayout = new TQGridLayout( tqparent );
kgLookAndFeelLayout->setSpacing( 6 );
- tabWidget = new QTabWidget( parent, "tabWidget" );
+ tabWidget = new TQTabWidget( tqparent, "tabWidget" );
setupOperationTab();
setupPanelTab();
@@ -69,16 +69,16 @@ KgLookFeel::KgLookFeel( bool first, QWidget* parent, const char* name ) :
// ---------------------------- OPERATION TAB -------------------------------------
// ---------------------------------------------------------------------------------------
void KgLookFeel::setupOperationTab() {
- QWidget *tab = new QWidget( tabWidget, "tab_operation" );
+ TQWidget *tab = new TQWidget( tabWidget, "tab_operation" );
tabWidget->insertTab( tab, i18n( "Operation" ) );
- QGridLayout *lookAndFeelLayout = new QGridLayout( tab );
+ TQGridLayout *lookAndFeelLayout = new TQGridLayout( tab );
lookAndFeelLayout->setSpacing( 6 );
lookAndFeelLayout->setMargin( 11 );
// -------------- General -----------------
- QGroupBox *lookFeelGrp = createFrame( i18n( "Look && Feel" ), tab, "kgLookAndFeelGrp" );
- QGridLayout *lookFeelGrid = createGridLayout( lookFeelGrp->layout() );
+ TQGroupBox *lookFeelGrp = createFrame( i18n( "Look && Feel" ), tab, "kgLookAndFeelGrp" );
+ TQGridLayout *lookFeelGrid = createGridLayout( lookFeelGrp->tqlayout() );
KONFIGURATOR_CHECKBOX_PARAM settings[] =
{ // cfg_class cfg_name default text restart tooltip
@@ -96,8 +96,8 @@ void KgLookFeel::setupOperationTab() {
lookAndFeelLayout->addWidget( lookFeelGrp, 0, 0 );
// -------------- Quicksearch -----------------
- QGroupBox *quicksearchGroup = createFrame( i18n( "Quicksearch" ), tab, "kgQuicksearchGrp" );
- QGridLayout *quicksearchGrid = createGridLayout( quicksearchGroup->layout() );
+ TQGroupBox *quicksearchGroup = createFrame( i18n( "Quicksearch" ), tab, "kgQuicksearchGrp" );
+ TQGridLayout *quicksearchGrid = createGridLayout( quicksearchGroup->tqlayout() );
KONFIGURATOR_CHECKBOX_PARAM quicksearch[] =
{ // cfg_class cfg_name default text restart tooltip
@@ -107,7 +107,7 @@ void KgLookFeel::setupOperationTab() {
quicksearchCheckboxes = createCheckBoxGroup( 2, 0, quicksearch, 2 /*count*/, quicksearchGroup, 0, PAGE_OPERATION );
quicksearchGrid->addWidget( quicksearchCheckboxes, 0, 0 );
- connect( quicksearchCheckboxes->find( "New Style Quicksearch" ), SIGNAL( stateChanged( int ) ), this, SLOT( slotDisable() ) );
+ connect( quicksearchCheckboxes->tqfind( "New Style Quicksearch" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) );
slotDisable();
lookAndFeelLayout->addWidget( quicksearchGroup, 1, 0 );
@@ -117,23 +117,23 @@ void KgLookFeel::setupOperationTab() {
// ---------------------------- PANEL TAB -------------------------------------
// ----------------------------------------------------------------------------------
void KgLookFeel::setupPanelTab() {
- QWidget* tab_panel = new QWidget( tabWidget, "tab_panel" );
+ TQWidget* tab_panel = new TQWidget( tabWidget, "tab_panel" );
tabWidget->insertTab( tab_panel, i18n( "Panel" ) );
- QGridLayout *panelLayout = new QGridLayout( tab_panel );
+ TQGridLayout *panelLayout = new TQGridLayout( tab_panel );
panelLayout->setSpacing( 6 );
panelLayout->setMargin( 11 );
- QGroupBox *panelGrp = createFrame( i18n( "Panel settings" ), tab_panel, "kgPanelGrp" );
- QGridLayout *panelGrid = createGridLayout( panelGrp->layout() );
+ TQGroupBox *panelGrp = createFrame( i18n( "Panel settings" ), tab_panel, "kgPanelGrp" );
+ TQGridLayout *panelGrid = createGridLayout( panelGrp->tqlayout() );
- QHBox *hbox = new QHBox( panelGrp, "lookAndFeelHBox1" );
- new QLabel( i18n( "Panel font:" ), hbox, "lookAndFeelLabel" );
+ TQHBox *hbox = new TQHBox( panelGrp, "lookAndFeelHBox1" );
+ new TQLabel( i18n( "Panel font:" ), hbox, "lookAndFeelLabel" );
createFontChooser( "Look&Feel", "Filelist Font", _FilelistFont, hbox, true, PAGE_PANEL );
createSpacer ( hbox );
panelGrid->addWidget( hbox, 0, 0 );
- QHBox *hbox2 = new QHBox( panelGrp, "lookAndFeelHBox2" );
- QLabel *lbl1 = new QLabel( i18n( "Filelist icon size:" ), hbox2, "lookAndFeelLabel2" );
+ TQHBox *hbox2 = new TQHBox( panelGrp, "lookAndFeelHBox2" );
+ TQLabel *lbl1 = new TQLabel( i18n( "Filelist icon size:" ), hbox2, "lookAndFeelLabel2" );
lbl1->setMinimumWidth( 230 );
KONFIGURATOR_NAME_VALUE_PAIR iconSizes[] =
{{ i18n( "16" ), "16" },
@@ -141,7 +141,7 @@ void KgLookFeel::setupPanelTab() {
{ i18n( "32" ), "32" },
{ i18n( "48" ), "48" }};
KonfiguratorComboBox *iconCombo = createComboBox( "Look&Feel", "Filelist Icon Size", _FilelistIconSize, iconSizes, 4, hbox2, true, true, PAGE_PANEL );
- iconCombo->lineEdit()->setValidator( new QRegExpValidator( QRegExp( "[1-9]\\d{0,1}" ), iconCombo ) );
+ iconCombo->lineEdit()->setValidator( new TQRegExpValidator( TQRegExp( "[1-9]\\d{0,1}" ), TQT_TQOBJECT(iconCombo) ) );
createSpacer ( hbox2 );
panelGrid->addWidget( hbox2, 1, 0 );
@@ -168,8 +168,8 @@ void KgLookFeel::setupPanelTab() {
panelGrid->addWidget( createLine( panelGrp, "lookSep4" ), 4, 0 );
- QHBox *hbox3 = new QHBox( panelGrp, "lookAndFeelHBox3" );
- QLabel *lbl2 = new QLabel( i18n( "Default panel type:" ), hbox3, "lookAndFeelLabel3" );
+ TQHBox *hbox3 = new TQHBox( panelGrp, "lookAndFeelHBox3" );
+ TQLabel *lbl2 = new TQLabel( i18n( "Default panel type:" ), hbox3, "lookAndFeelLabel3" );
KONFIGURATOR_NAME_VALUE_PAIR panelTypes[] =
{{ i18n( "Detailed" ), "Detailed" },
{ i18n( "Brief" ), "Brief" }};
@@ -184,10 +184,10 @@ void KgLookFeel::setupPanelTab() {
// -------------------------- Panel Toolbar TAB ----------------------------------
// -----------------------------------------------------------------------------------
void KgLookFeel::setupPanelToolbarTab() {
- QWidget *tab_4 = new QWidget( tabWidget, "tab_4" );
+ TQWidget *tab_4 = new TQWidget( tabWidget, "tab_4" );
tabWidget->insertTab( tab_4, i18n( "Panel Toolbar" ) );
- QBoxLayout * panelToolbarVLayout = new QVBoxLayout( tab_4 );
+ TQBoxLayout * panelToolbarVLayout = new TQVBoxLayout( tab_4 );
panelToolbarVLayout->setSpacing( 6 );
panelToolbarVLayout->setMargin( 11 );
@@ -197,10 +197,10 @@ void KgLookFeel::setupPanelToolbarTab() {
};
panelToolbarActive = createCheckBoxGroup( 1, 0, panelToolbarActiveCheckbox, 1, tab_4, "panelToolbarActive", PAGE_PANELTOOLBAR);
- connect( panelToolbarActive->find( "Panel Toolbar visible" ), SIGNAL( stateChanged( int ) ), this, SLOT( slotEnablePanelToolbar() ) );
+ connect( panelToolbarActive->tqfind( "Panel Toolbar visible" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotEnablePanelToolbar() ) );
- QGroupBox * panelToolbarGrp = createFrame( i18n( "Visible Panel Toolbar buttons" ), tab_4, "panelToolbarGrp");
- QGridLayout * panelToolbarGrid = createGridLayout( panelToolbarGrp->layout() );
+ TQGroupBox * panelToolbarGrp = createFrame( i18n( "Visible Panel Toolbar buttons" ), tab_4, "panelToolbarGrp");
+ TQGridLayout * panelToolbarGrid = createGridLayout( panelToolbarGrp->tqlayout() );
KONFIGURATOR_CHECKBOX_PARAM panelToolbarCheckboxes[] =
{
@@ -208,7 +208,7 @@ void KgLookFeel::setupPanelToolbarTab() {
{"Look&Feel", "Clear Location Bar Visible", _ClearLocation, i18n( "Clear location bar button" ), true , i18n( "Clears the location bar" ) },
{"Look&Feel", "Open Button Visible", _Open, i18n( "Open button" ), true , i18n( "Opens the directory browser." ) },
{"Look&Feel", "Equal Button Visible", _cdOther, i18n( "Equal button (=)" ),true , i18n( "Changes the panel directory to the other panel directory." ) },
- {"Look&Feel", "Up Button Visible", _cdUp, i18n( "Up button (..)" ), true , i18n( "Changes the panel directory to the parent directory." ) },
+ {"Look&Feel", "Up Button Visible", _cdUp, i18n( "Up button (..)" ), true , i18n( "Changes the panel directory to the tqparent directory." ) },
{"Look&Feel", "Home Button Visible", _cdHome, i18n( "Home button (~)" ), true , i18n( "Changes the panel directory to the home directory." ) },
{"Look&Feel", "Root Button Visible", _cdRoot, i18n( "Root button (/)" ), true , i18n( "Changes the panel directory to the root directory." ) },
{"Look&Feel", "SyncBrowse Button Visible", _syncBrowseButton, i18n( "Toggle-button for sync-browsing" ), true , i18n( "Each directory change in the panel is also performed in the other panel." ) },
@@ -230,15 +230,15 @@ void KgLookFeel::setupPanelToolbarTab() {
// -------------------------- Mouse TAB ----------------------------------
// ---------------------------------------------------------------------------
void KgLookFeel::setupMouseModeTab() {
- QWidget *tab_mouse = new QWidget( tabWidget, "tab_mouse" );
+ TQWidget *tab_mouse = new TQWidget( tabWidget, "tab_mouse" );
tabWidget->insertTab( tab_mouse, i18n( "Selection Mode" ) );
- QGridLayout *mouseLayout = new QGridLayout( tab_mouse );
+ TQGridLayout *mouseLayout = new TQGridLayout( tab_mouse );
mouseLayout->setSpacing( 6 );
mouseLayout->setMargin( 11 );
// -------------- General -----------------
- QGroupBox *mouseGeneralGroup = createFrame( i18n( "General" ), tab_mouse, "mouseGeneralGroup" );
- QGridLayout *mouseGeneralGrid = createGridLayout( mouseGeneralGroup->layout() );
+ TQGroupBox *mouseGeneralGroup = createFrame( i18n( "General" ), tab_mouse, "mouseGeneralGroup" );
+ TQGridLayout *mouseGeneralGrid = createGridLayout( mouseGeneralGroup->tqlayout() );
mouseGeneralGrid->setSpacing( 0 );
mouseGeneralGrid->setMargin( 5 );
@@ -251,15 +251,15 @@ void KgLookFeel::setupMouseModeTab() {
{ i18n( "Custom Selection Mode" ), "3", i18n( "Design your own selection mode!" ) }
};
mouseRadio = createRadioButtonGroup( "Look&Feel", "Mouse Selection", "0", 2, 2, mouseSelection, 4, mouseGeneralGroup, "myLook&FeelRadio", true, PAGE_MOUSE );
- mouseRadio->layout()->setMargin( 0 );
+ mouseRadio->tqlayout()->setMargin( 0 );
mouseGeneralGrid->addWidget( mouseRadio, 0, 0 );
- connect( mouseRadio, SIGNAL( clicked(int) ), SLOT( slotSelectionModeChanged() ) );
+ connect( mouseRadio, TQT_SIGNAL( clicked(int) ), TQT_SLOT( slotSelectionModeChanged() ) );
mouseLayout->addMultiCellWidget( mouseGeneralGroup, 0,0, 0,1 );
// -------------- Details -----------------
- QGroupBox *mouseDetailGroup = createFrame( i18n( "Details" ), tab_mouse, "mouseDetailGroup" );
- QGridLayout *mouseDetailGrid = createGridLayout( mouseDetailGroup->layout() );
+ TQGroupBox *mouseDetailGroup = createFrame( i18n( "Details" ), tab_mouse, "mouseDetailGroup" );
+ TQGridLayout *mouseDetailGrid = createGridLayout( mouseDetailGroup->tqlayout() );
mouseDetailGrid->setSpacing( 0 );
mouseDetailGrid->setMargin( 5 );
@@ -270,7 +270,7 @@ void KgLookFeel::setupMouseModeTab() {
{ i18n( "Obey KDE's global selection policy" ), "1", i18n( "<p>Use KDE's global setting:</p><p><i>KDE Control Center -> Peripherals -> Mouse</i></p>" ) }
};
KonfiguratorRadioButtons *clickRadio = createRadioButtonGroup( "Look&Feel", "Single Click Selects", "0", 1, 0, singleOrDoubleClick, 2, mouseDetailGroup, "myLook&FeelRadio0", true, PAGE_MOUSE );
- clickRadio->layout()->setMargin( 0 );
+ clickRadio->tqlayout()->setMargin( 0 );
mouseDetailGrid->addWidget( clickRadio, 0, 0 );
KONFIGURATOR_CHECKBOX_PARAM mouseCheckboxesParam[] =
@@ -278,7 +278,7 @@ void KgLookFeel::setupMouseModeTab() {
// {cfg_class, cfg_name, default
// text, restart,
// tooltip }
- {"Custom Selection Mode", "QT Selection", _QtSelection,
+ {"Custom Selection Mode", "QT Selection", _TQtSelection,
i18n( "Based on KDE's selection mode" ), true,
i18n( "If checked, use a mode based on KDE's style." ) },
{"Custom Selection Mode", "Left Selects", _LeftSelects,
@@ -323,10 +323,10 @@ void KgLookFeel::setupMouseModeTab() {
slotSelectionModeChanged();
// -------------- Preview -----------------
- QGroupBox *mousePreviewGroup = createFrame( i18n( "Preview" ), tab_mouse, "mousePreviewGroup" );
- QGridLayout *mousePreviewGrid = createGridLayout( mousePreviewGroup->layout() );
+ TQGroupBox *mousePreviewGroup = createFrame( i18n( "Preview" ), tab_mouse, "mousePreviewGroup" );
+ TQGridLayout *mousePreviewGrid = createGridLayout( mousePreviewGroup->tqlayout() );
// TODO preview
- mousePreview = new QListView( mousePreviewGroup, "mousePreview" );
+ mousePreview = new TQListView( mousePreviewGroup, "mousePreview" );
mousePreviewGrid->addWidget( mousePreview, 0 ,0 );
mousePreviewGroup->setEnabled(false); // TODO re-enable once the preview is implemented
// ------------------------------------------
@@ -335,34 +335,34 @@ void KgLookFeel::setupMouseModeTab() {
void KgLookFeel::slotDisable()
{
- bool isNewStyleQuickSearch = quicksearchCheckboxes->find( "New Style Quicksearch" )->isChecked();
- quicksearchCheckboxes->find( "Case Sensitive Quicksearch" )->setEnabled( isNewStyleQuickSearch );
+ bool isNewStyleQuickSearch = quicksearchCheckboxes->tqfind( "New Style Quicksearch" )->isChecked();
+ quicksearchCheckboxes->tqfind( "Case Sensitive Quicksearch" )->setEnabled( isNewStyleQuickSearch );
}
void KgLookFeel::slotEnablePanelToolbar()
{
- bool enableTB = panelToolbarActive->find("Panel Toolbar visible")->isChecked();
- pnlcbs->find( "Root Button Visible" )->setEnabled(enableTB);
- pnlcbs->find( "Home Button Visible" )->setEnabled(enableTB);
- pnlcbs->find( "Up Button Visible" )->setEnabled(enableTB);
- pnlcbs->find( "Equal Button Visible" )->setEnabled(enableTB);
- pnlcbs->find( "Open Button Visible" )->setEnabled(enableTB);
- pnlcbs->find("SyncBrowse Button Visible")->setEnabled(enableTB);
+ bool enableTB = panelToolbarActive->tqfind("Panel Toolbar visible")->isChecked();
+ pnlcbs->tqfind( "Root Button Visible" )->setEnabled(enableTB);
+ pnlcbs->tqfind( "Home Button Visible" )->setEnabled(enableTB);
+ pnlcbs->tqfind( "Up Button Visible" )->setEnabled(enableTB);
+ pnlcbs->tqfind( "Equal Button Visible" )->setEnabled(enableTB);
+ pnlcbs->tqfind( "Open Button Visible" )->setEnabled(enableTB);
+ pnlcbs->tqfind("SyncBrowse Button Visible")->setEnabled(enableTB);
}
void KgLookFeel::slotSelectionModeChanged() {
- bool enable = mouseRadio->find( i18n("Custom Selection Mode") )->isChecked();
- mouseCheckboxes->find( "QT Selection" )->setEnabled( enable );
- mouseCheckboxes->find( "Left Selects" )->setEnabled( enable );
- mouseCheckboxes->find( "Left Preserves" )->setEnabled( enable );
- mouseCheckboxes->find( "ShiftCtrl Left Selects" )->setEnabled( enable );
- mouseCheckboxes->find( "Right Selects" )->setEnabled( enable );
- mouseCheckboxes->find( "Right Preserves" )->setEnabled( enable );
- mouseCheckboxes->find( "ShiftCtrl Right Selects" )->setEnabled( enable );
- mouseCheckboxes->find( "Space Moves Down" )->setEnabled( enable );
- mouseCheckboxes->find( "Space Calc Space" )->setEnabled( enable );
- mouseCheckboxes->find( "Insert Moves Down" )->setEnabled( enable );
- mouseCheckboxes->find( "Immediate Context Menu" )->setEnabled( enable );
+ bool enable = mouseRadio->tqfind( i18n("Custom Selection Mode") )->isChecked();
+ mouseCheckboxes->tqfind( "QT Selection" )->setEnabled( enable );
+ mouseCheckboxes->tqfind( "Left Selects" )->setEnabled( enable );
+ mouseCheckboxes->tqfind( "Left Preserves" )->setEnabled( enable );
+ mouseCheckboxes->tqfind( "ShiftCtrl Left Selects" )->setEnabled( enable );
+ mouseCheckboxes->tqfind( "Right Selects" )->setEnabled( enable );
+ mouseCheckboxes->tqfind( "Right Preserves" )->setEnabled( enable );
+ mouseCheckboxes->tqfind( "ShiftCtrl Right Selects" )->setEnabled( enable );
+ mouseCheckboxes->tqfind( "Space Moves Down" )->setEnabled( enable );
+ mouseCheckboxes->tqfind( "Space Calc Space" )->setEnabled( enable );
+ mouseCheckboxes->tqfind( "Insert Moves Down" )->setEnabled( enable );
+ mouseCheckboxes->tqfind( "Immediate Context Menu" )->setEnabled( enable );
}
int KgLookFeel::activeSubPage() {
diff --git a/krusader/Konfigurator/kglookfeel.h b/krusader/Konfigurator/kglookfeel.h
index c78e6d5..eeb174b 100644
--- a/krusader/Konfigurator/kglookfeel.h
+++ b/krusader/Konfigurator/kglookfeel.h
@@ -33,14 +33,15 @@
#include "konfiguratorpage.h"
-class QListView;
+class TQListView;
class KgLookFeel : public KonfiguratorPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- KgLookFeel( bool first, QWidget* parent=0, const char* name=0 );
+ KgLookFeel( bool first, TQWidget* tqparent=0, const char* name=0 );
virtual int activeSubPage();
@@ -51,7 +52,7 @@ protected:
KonfiguratorCheckBoxGroup *panelToolbarActive;
KonfiguratorRadioButtons *mouseRadio;
KonfiguratorCheckBoxGroup *mouseCheckboxes;
- QListView* mousePreview;
+ TQListView* mousePreview;
protected slots:
void slotDisable();
@@ -63,7 +64,7 @@ private:
void setupPanelTab();
void setupPanelToolbarTab();
void setupMouseModeTab();
- QTabWidget *tabWidget;
+ TQTabWidget *tabWidget;
};
#endif /* __KGLOOKFEEL_H__ */
diff --git a/krusader/Konfigurator/kgprotocols.cpp b/krusader/Konfigurator/kgprotocols.cpp
index 11f6357..f7ac82d 100644
--- a/krusader/Konfigurator/kgprotocols.cpp
+++ b/krusader/Konfigurator/kgprotocols.cpp
@@ -34,14 +34,14 @@
#include <klocale.h>
#include <kprotocolinfo.h>
#include <kmimetype.h>
-#include <qvbox.h>
-#include <qheader.h>
+#include <tqvbox.h>
+#include <tqheader.h>
#include <kiconloader.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
-QString KgProtocols::defaultProtocols = "krarc,iso,tar";
-QString KgProtocols::defaultIsoMimes = "application/x-iso";
-QString KgProtocols::defaultKrarcMimes = "application/x-7z,application/x-7z-compressed,"
+TQString KgProtocols::defaultProtocols = "krarc,iso,tar";
+TQString KgProtocols::defaultIsoMimes = "application/x-iso";
+TQString KgProtocols::defaultKrarcMimes = "application/x-7z,application/x-7z-compressed,"
"application/x-ace,application/x-ace-compressed,"
"application/x-arj,application/x-arj-compressed,"
"application/x-bzip2,"
@@ -52,22 +52,22 @@ QString KgProtocols::defaultKrarcMimes = "application/x-7z,application/x-7z-comp
"application/x-rar,application/x-rar-compressed,"
"application/x-rpm,"
"application/x-zip,application/x-zip-compressed";
-QString KgProtocols::defaultTarMimes = "application/x-tar,application/x-tarz,"
+TQString KgProtocols::defaultTarMimes = "application/x-tar,application/x-tarz,"
"application/x-compressed-tar,"
"application/x-tbz,application/x-tgz";
-KgProtocols::KgProtocols( bool first, QWidget* parent, const char* name ) :
- KonfiguratorPage( first, parent, name )
+KgProtocols::KgProtocols( bool first, TQWidget* tqparent, const char* name ) :
+ KonfiguratorPage( first, tqparent, name )
{
- QGridLayout *KgProtocolsLayout = new QGridLayout( parent );
+ TQGridLayout *KgProtocolsLayout = new TQGridLayout( tqparent );
KgProtocolsLayout->setSpacing( 6 );
// -------------------------- LINK VIEW ----------------------------------
- QGroupBox *linkGrp = createFrame( i18n( "Links" ), parent, "linkGrp" );
- QGridLayout *linkGrid = createGridLayout( linkGrp->layout() );
+ TQGroupBox *linkGrp = createFrame( i18n( "Links" ), tqparent, "linkGrp" );
+ TQGridLayout *linkGrid = createGridLayout( linkGrp->tqlayout() );
- linkList = new QListView( linkGrp, "linkList" );
+ linkList = new TQListView( linkGrp, "linkList" );
linkList->addColumn( i18n( "Defined Links" ) );
linkList->header()->setStretchEnabled( true, 0 );
linkList->setRootIsDecorated( true );
@@ -77,38 +77,38 @@ KgProtocols::KgProtocols( bool first, QWidget* parent, const char* name ) :
// -------------------------- BUTTONS ----------------------------------
- QVBox *vbox1 = new QVBox( parent, "vbox1" ) ;
+ TQVBox *vbox1 = new TQVBox( tqparent, "vbox1" ) ;
addSpacer( vbox1 );
- btnAddProtocol = new QPushButton( vbox1, "btnAddProtocolButton" );
+ btnAddProtocol = new TQPushButton( vbox1, "btnAddProtocolButton" );
btnAddProtocol->setPixmap( krLoader->loadIcon( "1leftarrow", KIcon::Small ) );
- QWhatsThis::add( btnAddProtocol, i18n( "Add protocol to the link list." ) );
- btnRemoveProtocol = new QPushButton( vbox1, "btnRemoveProtocolButton" );
+ TQWhatsThis::add( btnAddProtocol, i18n( "Add protocol to the link list." ) );
+ btnRemoveProtocol = new TQPushButton( vbox1, "btnRemoveProtocolButton" );
btnRemoveProtocol->setPixmap( krLoader->loadIcon( "1rightarrow", KIcon::Small ) );
- QWhatsThis::add( btnRemoveProtocol, i18n( "Remove protocol from the link list." ) );
+ TQWhatsThis::add( btnRemoveProtocol, i18n( "Remove protocol from the link list." ) );
addSpacer( vbox1 );
KgProtocolsLayout->addWidget( vbox1, 0 ,1 );
- QVBox *vbox2 = new QVBox( parent, "vbox2" ) ;
+ TQVBox *vbox2 = new TQVBox( tqparent, "vbox2" ) ;
addSpacer( vbox2 );
- btnAddMime = new QPushButton( vbox2, "btnAddMimeButton" );
+ btnAddMime = new TQPushButton( vbox2, "btnAddMimeButton" );
btnAddMime->setPixmap( krLoader->loadIcon( "1leftarrow", KIcon::Small ) );
- QWhatsThis::add( btnAddMime, i18n( "Add mime to the selected protocol on the link list." ) );
- btnRemoveMime = new QPushButton( vbox2, "btnRemoveMimeButton" );
+ TQWhatsThis::add( btnAddMime, i18n( "Add mime to the selected protocol on the link list." ) );
+ btnRemoveMime = new TQPushButton( vbox2, "btnRemoveMimeButton" );
btnRemoveMime->setPixmap( krLoader->loadIcon( "1rightarrow", KIcon::Small ) );
- QWhatsThis::add( btnRemoveMime, i18n( "Remove mime from the link list." ) );
+ TQWhatsThis::add( btnRemoveMime, i18n( "Remove mime from the link list." ) );
addSpacer( vbox2 );
KgProtocolsLayout->addWidget( vbox2, 1 ,1 );
// -------------------------- PROTOCOLS LISTBOX ----------------------------------
- QGroupBox *protocolGrp = createFrame( i18n( "Protocols" ), parent, "protocolGrp" );
- QGridLayout *protocolGrid = createGridLayout( protocolGrp->layout() );
+ TQGroupBox *protocolGrp = createFrame( i18n( "Protocols" ), tqparent, "protocolGrp" );
+ TQGridLayout *protocolGrid = createGridLayout( protocolGrp->tqlayout() );
- protocolList = new QListBox( protocolGrp, "protocolList" );
+ protocolList = new TQListBox( protocolGrp, "protocolList" );
loadListCapableProtocols();
protocolGrid->addWidget( protocolList, 0, 0 );
@@ -116,10 +116,10 @@ KgProtocols::KgProtocols( bool first, QWidget* parent, const char* name ) :
// -------------------------- MIMES LISTBOX ----------------------------------
- QGroupBox *mimeGrp = createFrame( i18n( "Mimes" ), parent, "mimeGrp" );
- QGridLayout *mimeGrid = createGridLayout( mimeGrp->layout() );
+ TQGroupBox *mimeGrp = createFrame( i18n( "Mimes" ), tqparent, "mimeGrp" );
+ TQGridLayout *mimeGrid = createGridLayout( mimeGrp->tqlayout() );
- mimeList = new QListBox( mimeGrp, "protocolList" );
+ mimeList = new TQListBox( mimeGrp, "protocolList" );
loadMimes();
mimeGrid->addWidget( mimeList, 0, 0 );
@@ -127,34 +127,34 @@ KgProtocols::KgProtocols( bool first, QWidget* parent, const char* name ) :
// -------------------------- CONNECT TABLE ----------------------------------
- connect( protocolList, SIGNAL( selectionChanged() ), this, SLOT( slotDisableButtons() ) );
- connect( linkList, SIGNAL( selectionChanged() ), this, SLOT( slotDisableButtons() ) );
- connect( mimeList, SIGNAL( selectionChanged() ), this, SLOT( slotDisableButtons() ) );
- connect( linkList, SIGNAL( currentChanged( QListViewItem *) ), this, SLOT( slotDisableButtons() ) );
- connect( btnAddProtocol, SIGNAL( clicked() ) , this, SLOT( slotAddProtocol() ) );
- connect( btnRemoveProtocol, SIGNAL( clicked() ) , this, SLOT( slotRemoveProtocol() ) );
- connect( btnAddMime, SIGNAL( clicked() ) , this, SLOT( slotAddMime() ) );
- connect( btnRemoveMime, SIGNAL( clicked() ) , this, SLOT( slotRemoveMime() ) );
+ connect( protocolList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotDisableButtons() ) );
+ connect( linkList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotDisableButtons() ) );
+ connect( mimeList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotDisableButtons() ) );
+ connect( linkList, TQT_SIGNAL( currentChanged( TQListViewItem *) ), this, TQT_SLOT( slotDisableButtons() ) );
+ connect( btnAddProtocol, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotAddProtocol() ) );
+ connect( btnRemoveProtocol, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotRemoveProtocol() ) );
+ connect( btnAddMime, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotAddMime() ) );
+ connect( btnRemoveMime, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotRemoveMime() ) );
loadInitialValues();
slotDisableButtons();
}
-QWidget* KgProtocols::addSpacer( QWidget *parent, const char *widgetName )
+TQWidget* KgProtocols::addSpacer( TQWidget *tqparent, const char *widgetName )
{
- QWidget *widget = new QWidget( parent, widgetName );
- QVBoxLayout *vboxlayout = new QVBoxLayout( widget );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
- vboxlayout->addItem( spacer );
+ TQWidget *widget = new TQWidget( tqparent, widgetName );
+ TQVBoxLayout *vboxtqlayout = new TQVBoxLayout( widget );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
+ vboxtqlayout->addItem( spacer );
return widget;
}
void KgProtocols::loadListCapableProtocols()
{
- QStringList protocols = KProtocolInfo::protocols();
+ TQStringList protocols = KProtocolInfo::protocols();
protocols.sort();
- for ( QStringList::Iterator it = protocols.begin(); it != protocols.end();)
+ for ( TQStringList::Iterator it = protocols.begin(); it != protocols.end();)
{
if( !KProtocolInfo::supportsListing( *it ) )
{
@@ -170,7 +170,7 @@ void KgProtocols::loadMimes()
{
KMimeType::List mimes = KMimeType::allMimeTypes();
- for( QValueListIterator<KMimeType::Ptr> it = mimes.begin(); it != mimes.end(); it++ )
+ for( TQValueListIterator<KMimeType::Ptr> it = mimes.begin(); it != mimes.end(); it++ )
mimeList->insertItem( (*it)->name() );
mimeList->sort();
@@ -179,11 +179,11 @@ void KgProtocols::loadMimes()
void KgProtocols::slotDisableButtons()
{
btnAddProtocol->setEnabled( protocolList->selectedItem() != 0 );
- QListViewItem *listViewItem = linkList->currentItem();
- bool isProtocolSelected = ( listViewItem == 0 ? false : listViewItem->parent() == 0 );
+ TQListViewItem *listViewItem = linkList->currentItem();
+ bool isProtocolSelected = ( listViewItem == 0 ? false : listViewItem->tqparent() == 0 );
btnRemoveProtocol->setEnabled( isProtocolSelected );
btnAddMime->setEnabled( listViewItem != 0 && mimeList->selectedItem() != 0 );
- btnRemoveMime->setEnabled( listViewItem == 0 ? false : listViewItem->parent() != 0 );
+ btnRemoveMime->setEnabled( listViewItem == 0 ? false : listViewItem->tqparent() != 0 );
if( linkList->currentItem() == 0 && linkList->firstChild() != 0 )
linkList->setCurrentItem( linkList->firstChild() );
@@ -193,7 +193,7 @@ void KgProtocols::slotDisableButtons()
void KgProtocols::slotAddProtocol()
{
- QListBoxItem *item = protocolList->selectedItem();
+ TQListBoxItem *item = protocolList->selectedItem();
if( item )
{
addProtocol( item->text(), true );
@@ -202,13 +202,13 @@ void KgProtocols::slotAddProtocol()
}
}
-void KgProtocols::addProtocol( QString name, bool changeCurrent )
+void KgProtocols::addProtocol( TQString name, bool changeCurrent )
{
- QListBoxItem *item = protocolList->findItem( name, ExactMatch );
+ TQListBoxItem *item = protocolList->tqfindItem( name, ExactMatch );
if( item )
{
protocolList->removeItem( protocolList->index( item ) );
- QListViewItem *listViewItem = new QListViewItem( linkList, name );
+ TQListViewItem *listViewItem = new TQListViewItem( linkList, name );
listViewItem->setPixmap( 0, krLoader->loadIcon( "exec", KIcon::Small ) );
if( changeCurrent )
@@ -218,7 +218,7 @@ void KgProtocols::addProtocol( QString name, bool changeCurrent )
void KgProtocols::slotRemoveProtocol()
{
- QListViewItem *item = linkList->currentItem();
+ TQListViewItem *item = linkList->currentItem();
if( item )
{
removeProtocol( item->text( 0 ) );
@@ -227,9 +227,9 @@ void KgProtocols::slotRemoveProtocol()
}
}
-void KgProtocols::removeProtocol( QString name )
+void KgProtocols::removeProtocol( TQString name )
{
- QListViewItem *item = linkList->findItem( name, 0 );
+ TQListViewItem *item = linkList->tqfindItem( name, 0 );
if( item )
{
while( item->childCount() != 0 )
@@ -243,12 +243,12 @@ void KgProtocols::removeProtocol( QString name )
void KgProtocols::slotAddMime()
{
- QListBoxItem *item = mimeList->selectedItem();
+ TQListBoxItem *item = mimeList->selectedItem();
if( item && linkList->currentItem() != 0 )
{
- QListViewItem *itemToAdd = linkList->currentItem();
- if( itemToAdd->parent() )
- itemToAdd = itemToAdd->parent();
+ TQListViewItem *itemToAdd = linkList->currentItem();
+ if( itemToAdd->tqparent() )
+ itemToAdd = itemToAdd->tqparent();
addMime( item->text(), itemToAdd->text( 0 ) );
slotDisableButtons();
@@ -256,15 +256,15 @@ void KgProtocols::slotAddMime()
}
}
-void KgProtocols::addMime( QString name, QString protocol )
+void KgProtocols::addMime( TQString name, TQString protocol )
{
- QListBoxItem *item = mimeList->findItem( name, ExactMatch );
- QListViewItem *currentListItem = linkList->findItem( protocol, 0 );
+ TQListBoxItem *item = mimeList->tqfindItem( name, ExactMatch );
+ TQListViewItem *currentListItem = linkList->tqfindItem( protocol, 0 );
- if( item && currentListItem && currentListItem->parent() == 0 )
+ if( item && currentListItem && currentListItem->tqparent() == 0 )
{
mimeList->removeItem( mimeList->index( item ) );
- QListViewItem *listViewItem = new QListViewItem( currentListItem, name );
+ TQListViewItem *listViewItem = new TQListViewItem( currentListItem, name );
listViewItem->setPixmap( 0, krLoader->loadIcon( "mime", KIcon::Small ) );
currentListItem->setOpen( true );
}
@@ -272,7 +272,7 @@ void KgProtocols::addMime( QString name, QString protocol )
void KgProtocols::slotRemoveMime()
{
- QListViewItem *item = linkList->currentItem();
+ TQListViewItem *item = linkList->currentItem();
if( item )
{
removeMime( item->text( 0 ) );
@@ -281,15 +281,15 @@ void KgProtocols::slotRemoveMime()
}
}
-void KgProtocols::removeMime( QString name )
+void KgProtocols::removeMime( TQString name )
{
- QListViewItem *currentMimeItem = linkList->findItem( name, 0 );
+ TQListViewItem *currentMimeItem = linkList->tqfindItem( name, 0 );
- if( currentMimeItem && currentMimeItem->parent() != 0 )
+ if( currentMimeItem && currentMimeItem->tqparent() != 0 )
{
mimeList->insertItem( currentMimeItem->text( 0 ) );
mimeList->sort();
- currentMimeItem->parent()->takeItem( currentMimeItem );
+ currentMimeItem->tqparent()->takeItem( currentMimeItem );
}
}
@@ -299,15 +299,15 @@ void KgProtocols::loadInitialValues()
removeProtocol( linkList->firstChild()->text( 0 ) );
krConfig->setGroup( "Protocols" );
- QStringList protList = krConfig->readListEntry( "Handled Protocols" );
+ TQStringList protList = krConfig->readListEntry( "Handled Protocols" );
- for( QStringList::Iterator it = protList.begin(); it != protList.end(); it++ )
+ for( TQStringList::Iterator it = protList.begin(); it != protList.end(); it++ )
{
addProtocol( *it );
- QStringList mimes = krConfig->readListEntry( QString( "Mimes For %1" ).arg( *it ) );
+ TQStringList mimes = krConfig->readListEntry( TQString( "Mimes For %1" ).tqarg( *it ) );
- for( QStringList::Iterator it2 = mimes.begin(); it2 != mimes.end(); it2++ )
+ for( TQStringList::Iterator it2 = mimes.begin(); it2 != mimes.end(); it2++ )
addMime( *it2, *it );
}
@@ -325,13 +325,13 @@ void KgProtocols::setDefaults()
addMime( "application/x-iso", "iso" );
addProtocol( "krarc" );
- QStringList krarcMimes = QStringList::split( ',', defaultKrarcMimes );
- for( QStringList::Iterator it = krarcMimes.begin(); it != krarcMimes.end(); it++ )
+ TQStringList krarcMimes = TQStringList::split( ',', defaultKrarcMimes );
+ for( TQStringList::Iterator it = krarcMimes.begin(); it != krarcMimes.end(); it++ )
addMime( *it, "krarc" );
addProtocol( "tar" );
- QStringList tarMimes = QStringList::split( ',', defaultTarMimes );
- for( QStringList::Iterator it = tarMimes.begin(); it != tarMimes.end(); it++ )
+ TQStringList tarMimes = TQStringList::split( ',', defaultTarMimes );
+ for( TQStringList::Iterator it = tarMimes.begin(); it != tarMimes.end(); it++ )
addMime( *it, "tar" );
slotDisableButtons();
@@ -343,25 +343,25 @@ void KgProtocols::setDefaults()
bool KgProtocols::isChanged()
{
krConfig->setGroup( "Protocols" );
- QStringList protList = krConfig->readListEntry( "Handled Protocols" );
+ TQStringList protList = krConfig->readListEntry( "Handled Protocols" );
if( (int)protList.count() != linkList->childCount() )
return true;
- QListViewItem *item = linkList->firstChild();
+ TQListViewItem *item = linkList->firstChild();
while( item )
{
- if( !protList.contains( item->text( 0 ) ) )
+ if( !protList.tqcontains( item->text( 0 ) ) )
return true;
- QStringList mimes = krConfig->readListEntry( QString( "Mimes For %1" ).arg( item->text( 0 ) ) );
+ TQStringList mimes = krConfig->readListEntry( TQString( "Mimes For %1" ).tqarg( item->text( 0 ) ) );
if( (int)mimes.count() != item->childCount() )
return true;
- QListViewItem *childs = item->firstChild();
+ TQListViewItem *childs = item->firstChild();
while( childs )
{
- if( !mimes.contains( childs->text( 0 ) ) )
+ if( !mimes.tqcontains( childs->text( 0 ) ) )
return true;
childs = childs->nextSibling();
}
@@ -376,21 +376,21 @@ bool KgProtocols::apply()
{
krConfig->setGroup( "Protocols" );
- QStringList protocolList;
+ TQStringList protocolList;
- QListViewItem *item = linkList->firstChild();
+ TQListViewItem *item = linkList->firstChild();
while( item )
{
protocolList.append( item->text( 0 ) );
- QStringList mimes;
- QListViewItem *childs = item->firstChild();
+ TQStringList mimes;
+ TQListViewItem *childs = item->firstChild();
while( childs )
{
mimes.append( childs->text( 0 ) );
childs = childs->nextSibling();
}
- krConfig->writeEntry( QString( "Mimes For %1" ).arg( item->text( 0 ) ), mimes );
+ krConfig->writeEntry( TQString( "Mimes For %1" ).tqarg( item->text( 0 ) ), mimes );
item = item->nextSibling();
}
@@ -405,7 +405,7 @@ bool KgProtocols::apply()
void KgProtocols::init()
{
- if( !krConfig->groupList().contains( "Protocols" ) )
+ if( !krConfig->groupList().tqcontains( "Protocols" ) )
{
krConfig->setGroup( "Protocols" );
krConfig->writeEntry( "Handled Protocols", defaultProtocols );
diff --git a/krusader/Konfigurator/kgprotocols.h b/krusader/Konfigurator/kgprotocols.h
index 64a177d..45dc5f1 100644
--- a/krusader/Konfigurator/kgprotocols.h
+++ b/krusader/Konfigurator/kgprotocols.h
@@ -32,16 +32,17 @@
#define __KgProtocols_H__
#include "konfiguratorpage.h"
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qlistview.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqlistview.h>
class KgProtocols : public KonfiguratorPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- KgProtocols( bool first, QWidget* parent=0, const char* name=0 );
+ KgProtocols( bool first, TQWidget* tqparent=0, const char* name=0 );
virtual void loadInitialValues();
virtual void setDefaults();
@@ -60,27 +61,27 @@ public slots:
protected:
void loadListCapableProtocols();
void loadMimes();
- QWidget* addSpacer( QWidget *parent, const char *widgetName = 0);
+ TQWidget* addSpacer( TQWidget *tqparent, const char *widgetName = 0);
- void addProtocol( QString name, bool changeCurrent = false );
- void removeProtocol( QString name );
- void addMime( QString name, QString protocol );
- void removeMime( QString name );
+ void addProtocol( TQString name, bool changeCurrent = false );
+ void removeProtocol( TQString name );
+ void addMime( TQString name, TQString protocol );
+ void removeMime( TQString name );
- QListView *linkList;
+ TQListView *linkList;
- QListBox *protocolList;
- QListBox *mimeList;
+ TQListBox *protocolList;
+ TQListBox *mimeList;
- QPushButton *btnAddProtocol;
- QPushButton *btnRemoveProtocol;
- QPushButton *btnAddMime;
- QPushButton *btnRemoveMime;
+ TQPushButton *btnAddProtocol;
+ TQPushButton *btnRemoveProtocol;
+ TQPushButton *btnAddMime;
+ TQPushButton *btnRemoveMime;
- static QString defaultProtocols;
- static QString defaultIsoMimes;
- static QString defaultKrarcMimes;
- static QString defaultTarMimes;
+ static TQString defaultProtocols;
+ static TQString defaultIsoMimes;
+ static TQString defaultKrarcMimes;
+ static TQString defaultTarMimes;
};
#endif /* __KgProtocols_H__ */
diff --git a/krusader/Konfigurator/kgstartup.cpp b/krusader/Konfigurator/kgstartup.cpp
index b02e321..c838fcd 100644
--- a/krusader/Konfigurator/kgstartup.cpp
+++ b/krusader/Konfigurator/kgstartup.cpp
@@ -34,25 +34,25 @@
#include "../krusader.h"
#include <klocale.h>
#include <klineedit.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
-KgStartup::KgStartup( bool first, QWidget* parent, const char* name ) :
- KonfiguratorPage( first, parent, name ), profileCombo( 0 )
+KgStartup::KgStartup( bool first, TQWidget* tqparent, const char* name ) :
+ KonfiguratorPage( first, tqparent, name ), profileCombo( 0 )
{
- QGridLayout *kgStartupLayout = new QGridLayout( parent );
+ TQGridLayout *kgStartupLayout = new TQGridLayout( tqparent );
kgStartupLayout->setSpacing( 6 );
// --------------------------- PANELS GROUPBOX ----------------------------------
- QGroupBox *panelsGrp = createFrame( i18n( "General" ), parent, "panelsGrp" );
- QGridLayout *panelsGrid = createGridLayout( panelsGrp->layout() );
+ TQGroupBox *panelsGrp = createFrame( i18n( "General" ), tqparent, "panelsGrp" );
+ TQGridLayout *panelsGrid = createGridLayout( panelsGrp->tqlayout() );
- QString s = "<p><img src='toolbar|kr_profile'></p>" + i18n( "Defines the panel profile used at startup. A panel profile contains:<ul><li>all the tabs paths</li><li>the current tab</li><li>the active panel</li></ul><b>&lt;Last session&gt;</b> is a special panel profile which is saved automatically when Krusader is closed.");
- QLabel *label = addLabel( panelsGrid, 0, 0, i18n( "Startup profile:" ), panelsGrp, "Startup session" );
- QWhatsThis::add( label, s );
- QWhatsThis::add( panelsGrp, s );
+ TQString s = "<p><img src='toolbar|kr_profile'></p>" + i18n( "Defines the panel profile used at startup. A panel profile tqcontains:<ul><li>all the tabs paths</li><li>the current tab</li><li>the active panel</li></ul><b>&lt;Last session&gt;</b> is a special panel profile which is saved automatically when Krusader is closed.");
+ TQLabel *label = addLabel( panelsGrid, 0, 0, i18n( "Startup profile:" ), panelsGrp, "Startup session" );
+ TQWhatsThis::add( label, s );
+ TQWhatsThis::add( panelsGrp, s );
- QStringList profileList = ProfileManager::availableProfiles( "Panel" );
+ TQStringList profileList = ProfileManager::availableProfiles( "Panel" );
profileList.push_front( "<" + i18n( "Last session" ) + ">" );
KONFIGURATOR_NAME_VALUE_PAIR comboItems[ profileList.count() ];
@@ -61,7 +61,7 @@ KgStartup::KgStartup( bool first, QWidget* parent, const char* name ) :
comboItems[ 0 ].value = "";
profileCombo = createComboBox( "Startup", "Starter Profile Name", comboItems[ 0 ].value, comboItems, profileList.count(), panelsGrp, false, false );
- profileCombo->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed);
+ profileCombo->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed);
panelsGrid->addWidget( profileCombo, 0, 1 );
//------------------------------------------------
@@ -80,8 +80,8 @@ KgStartup::KgStartup( bool first, QWidget* parent, const char* name ) :
// ------------------------ USERINTERFACE GROUPBOX ------------------------------
- QGroupBox *uiGrp = createFrame( i18n( "User Interface" ), parent, "uiGrp" );
- QGridLayout *uiGrid = createGridLayout( uiGrp->layout() );
+ TQGroupBox *uiGrp = createFrame( i18n( "User Interface" ), tqparent, "uiGrp" );
+ TQGridLayout *uiGrid = createGridLayout( uiGrp->tqlayout() );
KONFIGURATOR_CHECKBOX_PARAM uiCheckBoxes[] =
{ // cfg_class cfg_name default text restart ToolTip
@@ -96,7 +96,7 @@ KgStartup::KgStartup( bool first, QWidget* parent, const char* name ) :
};
uiCbGroup = createCheckBoxGroup( 2, 0, uiCheckBoxes, 8, uiGrp );
- connect( uiCbGroup->find( "UI Save Settings" ), SIGNAL( stateChanged( int ) ), this, SLOT( slotDisable() ) );
+ connect( uiCbGroup->tqfind( "UI Save Settings" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) );
uiGrid->addWidget( uiCbGroup, 1, 0 );
@@ -107,11 +107,11 @@ KgStartup::KgStartup( bool first, QWidget* parent, const char* name ) :
void KgStartup::slotDisable()
{
- bool isUiSave = !uiCbGroup->find( "UI Save Settings" )->isChecked();
+ bool isUiSave = !uiCbGroup->tqfind( "UI Save Settings" )->isChecked();
int i=1;
- while( uiCbGroup->find( i ) )
- uiCbGroup->find( i++ )->setEnabled( isUiSave );
+ while( uiCbGroup->tqfind( i ) )
+ uiCbGroup->tqfind( i++ )->setEnabled( isUiSave );
}
#include "kgstartup.moc"
diff --git a/krusader/Konfigurator/kgstartup.h b/krusader/Konfigurator/kgstartup.h
index 38f05a0..1de8d68 100644
--- a/krusader/Konfigurator/kgstartup.h
+++ b/krusader/Konfigurator/kgstartup.h
@@ -36,9 +36,10 @@
class KgStartup : public KonfiguratorPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- KgStartup( bool first, QWidget* parent=0, const char* name=0 );
+ KgStartup( bool first, TQWidget* tqparent=0, const char* name=0 );
public slots:
void slotDisable();
diff --git a/krusader/Konfigurator/kguseractions.cpp b/krusader/Konfigurator/kguseractions.cpp
index 5488c2e..704576b 100644
--- a/krusader/Konfigurator/kguseractions.cpp
+++ b/krusader/Konfigurator/kguseractions.cpp
@@ -38,34 +38,34 @@
#include <kdebug.h>
-KgUserActions::KgUserActions( bool first, QWidget* parent, const char* name ) :
- KonfiguratorPage( first, parent, name )
+KgUserActions::KgUserActions( bool first, TQWidget* tqparent, const char* name ) :
+ KonfiguratorPage( first, tqparent, name )
{
- QGridLayout *kgUserActionLayout = new QGridLayout( parent, 2, 1,
+ TQGridLayout *kgUserActionLayout = new TQGridLayout( tqparent, 2, 1,
0 /* margin */, 6 /* spacing */, "kgUserActionLayout" );
// ============= Info Group =============
- QGroupBox *InfoGroup = createFrame( i18n( "Information" ), parent, "kgUserActionInfoGroup" );
- QGridLayout *InfoGrid = createGridLayout( InfoGroup->layout() );
+ TQGroupBox *InfoGroup = createFrame( i18n( "Information" ), tqparent, "kgUserActionInfoGroup" );
+ TQGridLayout *InfoGrid = createGridLayout( InfoGroup->tqlayout() );
// terminal for the UserActions
- QLabel *labelInfo = new QLabel( i18n(
+ TQLabel *labelInfo = new TQLabel( i18n(
"Here you can configure settings about useractions.\n"
"To set up, configure and manage your useractions please use ActionMan."
), InfoGroup, "InformationLabel" );
InfoGrid->addWidget( labelInfo, 0, 0 );
KPushButton *actionmanButton = new KPushButton( i18n("Start ActionMan"), InfoGroup, "actionmanButton");
- connect( actionmanButton, SIGNAL( clicked() ), SLOT( startActionMan() ) );
+ connect( actionmanButton, TQT_SIGNAL( clicked() ), TQT_SLOT( startActionMan() ) );
InfoGrid->addWidget( actionmanButton, 1, 0 );
kgUserActionLayout->addWidget( InfoGroup, 0 ,0 );
// ============= Terminal Group =============
- QGroupBox *terminalGroup = createFrame( i18n( "Terminal execution" ), parent, "kgUserActionTerminalGroup" );
- QGridLayout *terminalGrid = createGridLayout( terminalGroup->layout() );
+ TQGroupBox *terminalGroup = createFrame( i18n( "Terminal execution" ), tqparent, "kgUserActionTerminalGroup" );
+ TQGridLayout *terminalGrid = createGridLayout( terminalGroup->tqlayout() );
// terminal for the UserActions
- QLabel *labelTerminal = new QLabel( i18n( "Terminal for UserActions:" ),
+ TQLabel *labelTerminal = new TQLabel( i18n( "Terminal for UserActions:" ),
terminalGroup, "TerminalLabel" );
terminalGrid->addWidget( labelTerminal, 0, 0 );
KonfiguratorURLRequester *urlReqUserActions = createURLRequester( "UserActions",
@@ -75,18 +75,18 @@ KgUserActions::KgUserActions( bool first, QWidget* parent, const char* name ) :
kgUserActionLayout->addWidget( terminalGroup, 1 ,0 );
// ============= Outputcollection Group =============
- QGroupBox *outputGroup = createFrame( i18n( "Output collection" ), parent, "kgUserActionOutputGroup" );
- QGridLayout *outputGrid = createGridLayout( outputGroup->layout() );
+ TQGroupBox *outputGroup = createFrame( i18n( "Output collection" ), tqparent, "kgUserActionOutputGroup" );
+ TQGridLayout *outputGrid = createGridLayout( outputGroup->tqlayout() );
- QHBox *hbox;
- hbox = new QHBox( outputGroup, "HBoxNormalFont" );
- new QLabel( i18n( "Normal font:" ), hbox, "NormalFontLabel" );
+ TQHBox *hbox;
+ hbox = new TQHBox( outputGroup, "HBoxNormalFont" );
+ new TQLabel( i18n( "Normal font:" ), hbox, "NormalFontLabel" );
createFontChooser( "UserActions", "Normal Font", _UserActions_NormalFont, hbox );
createSpacer ( hbox );
outputGrid->addWidget( hbox, 2, 0 );
- hbox = new QHBox( outputGroup, "HBoxFixedFont" );
- new QLabel( i18n( "Font with fixed width:" ), hbox, "FixedFontLabel" );
+ hbox = new TQHBox( outputGroup, "HBoxFixedFont" );
+ new TQLabel( i18n( "Font with fixed width:" ), hbox, "FixedFontLabel" );
createFontChooser( "UserActions", "Fixed Font", _UserActions_FixedFont, hbox );
createSpacer ( hbox );
outputGrid->addWidget( hbox, 3, 0 );
@@ -99,7 +99,7 @@ KgUserActions::KgUserActions( bool first, QWidget* parent, const char* name ) :
}
void KgUserActions::startActionMan() {
- ActionMan actionMan( static_cast<QWidget*>(parent()) );
+ ActionMan actionMan( TQT_TQWIDGET(tqparent()) );
}
diff --git a/krusader/Konfigurator/kguseractions.h b/krusader/Konfigurator/kguseractions.h
index 2515c84..e6e396c 100644
--- a/krusader/Konfigurator/kguseractions.h
+++ b/krusader/Konfigurator/kguseractions.h
@@ -40,9 +40,10 @@ class UserActionListView;
class KgUserActions : public KonfiguratorPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- KgUserActions( bool first, QWidget* parent=0, const char* name=0 );
+ KgUserActions( bool first, TQWidget* tqparent=0, const char* name=0 );
public slots:
void startActionMan();
diff --git a/krusader/Konfigurator/kgwelcome.cpp b/krusader/Konfigurator/kgwelcome.cpp
index ee9a82e..07ee63b 100644
--- a/krusader/Konfigurator/kgwelcome.cpp
+++ b/krusader/Konfigurator/kgwelcome.cpp
@@ -31,16 +31,16 @@
#include "kgwelcome.h"
#include <kstandarddirs.h>
-KgWelcome::KgWelcome( bool first, QWidget* parent, const char* name ) :
- KonfiguratorPage( first, parent, name )
+KgWelcome::KgWelcome( bool first, TQWidget* tqparent, const char* name ) :
+ KonfiguratorPage( first, tqparent, name )
{
- QGridLayout *kgWelcomeLayout = new QGridLayout( parent );
+ TQGridLayout *kgWelcomeLayout = new TQGridLayout( tqparent );
kgWelcomeLayout->setSpacing( 6 );
- QString pix=KGlobal::dirs()->findResource("appdata","konfig_small.jpg");
- QPixmap image0( pix );
+ TQString pix=KGlobal::dirs()->findResource("appdata","konfig_small.jpg");
+ TQPixmap image0( pix );
- QLabel *pixmapLabel = new QLabel( parent, "pixmapLabel" );
+ TQLabel *pixmapLabel = new TQLabel( tqparent, "pixmapLabel" );
pixmapLabel->setPixmap( image0 );
pixmapLabel->setScaledContents( TRUE );
diff --git a/krusader/Konfigurator/kgwelcome.h b/krusader/Konfigurator/kgwelcome.h
index 92e1811..204037d 100644
--- a/krusader/Konfigurator/kgwelcome.h
+++ b/krusader/Konfigurator/kgwelcome.h
@@ -36,9 +36,10 @@
class KgWelcome : public KonfiguratorPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- KgWelcome( bool first, QWidget* parent=0, const char* name=0 );
+ KgWelcome( bool first, TQWidget* tqparent=0, const char* name=0 );
};
#endif /* __KGWELCOME_H__ */
diff --git a/krusader/Konfigurator/konfigurator.cpp b/krusader/Konfigurator/konfigurator.cpp
index 3467425..b16645e 100644
--- a/krusader/Konfigurator/konfigurator.cpp
+++ b/krusader/Konfigurator/konfigurator.cpp
@@ -36,7 +36,7 @@
#include "../kicons.h"
#include <kfiledialog.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klocale.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -70,8 +70,8 @@ Konfigurator::Konfigurator( bool f, int startPage ) : KDialogBase(0,0,true,"Konf
setHelp("konfigurator");
- connect( widget, SIGNAL( aboutToShowPage(QWidget *) ), this, SLOT( slotPageSwitch() ) );
- connect( &restoreTimer, SIGNAL(timeout()), this, SLOT(slotRestorePage()));
+ connect( widget, TQT_SIGNAL( aboutToShowPage(TQWidget *) ), this, TQT_SLOT( slotPageSwitch() ) );
+ connect( &restoreTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotRestorePage()));
createLayout( startPage );
setMainWidget(widget);
@@ -81,42 +81,42 @@ Konfigurator::Konfigurator( bool f, int startPage ) : KDialogBase(0,0,true,"Konf
void Konfigurator::newContent(KonfiguratorPage *page)
{
kgFrames.append(page);
- connect( page, SIGNAL( sigChanged() ), this, SLOT( slotApplyEnable() ) );
+ connect( page, TQT_SIGNAL( sigChanged() ), this, TQT_SLOT( slotApplyEnable() ) );
}
void Konfigurator::createLayout( int startPage )
{
// startup
newContent(new KgStartup(firstTime, widget->addPage(i18n("Startup"),
- i18n("Krusader's settings upon startup"),QPixmap(krLoader->loadIcon("kfm_home",
+ i18n("Krusader's settings upon startup"),TQPixmap(krLoader->loadIcon("kfm_home",
KIcon::Desktop,32)))));
// look n' feel
newContent(new KgLookFeel(firstTime, widget->addPage(i18n("Look & Feel"),
- i18n("Look & Feel"),QPixmap(krLoader->loadIcon("looknfeel",KIcon::Desktop,32)))));
+ i18n("Look & Feel"),TQPixmap(krLoader->loadIcon("looknfeel",KIcon::Desktop,32)))));
// colors
newContent(new KgColors(firstTime, widget->addPage(i18n("Colors"),
- i18n("Colors"),QPixmap(krLoader->loadIcon("colors",KIcon::Desktop,32)))));
+ i18n("Colors"),TQPixmap(krLoader->loadIcon("colors",KIcon::Desktop,32)))));
// general
newContent(new KgGeneral(firstTime, widget->addPage(i18n("General"),
- i18n("Basic Operations"),QPixmap(krLoader->loadIcon("configure",KIcon::Desktop,32)))));
+ i18n("Basic Operations"),TQPixmap(krLoader->loadIcon("configure",KIcon::Desktop,32)))));
// advanced
newContent(new KgAdvanced(firstTime, widget->addPage(i18n("Advanced"),
i18n("Be sure you know what you're doing!"),
- QPixmap(krLoader->loadIcon("messagebox_warning",KIcon::Desktop,32)))));
+ TQPixmap(krLoader->loadIcon("messagebox_warning",KIcon::Desktop,32)))));
// archives
newContent(new KgArchives(firstTime, widget->addPage(i18n("Archives"),i18n("Customize the way Krusader deals with archives"),
- QPixmap(krLoader->loadIcon("tgz",KIcon::Desktop,32)))));
+ TQPixmap(krLoader->loadIcon("tgz",KIcon::Desktop,32)))));
// dependencies
newContent(new KgDependencies(firstTime, widget->addPage(i18n("Dependencies"),i18n("Set the full path of the external applications"),
- QPixmap(krLoader->loadIcon("kr_dependencies",KIcon::Desktop,32)))));
+ TQPixmap(krLoader->loadIcon("kr_dependencies",KIcon::Desktop,32)))));
// useractions
newContent(new KgUserActions(firstTime, widget->addPage(i18n("User Actions"),i18n("Configure your personal actions"),
- QPixmap(krLoader->loadIcon("kr_useractions",KIcon::Desktop,32)))));
+ TQPixmap(krLoader->loadIcon("kr_useractions",KIcon::Desktop,32)))));
// protocols
newContent(new KgProtocols(firstTime, widget->addPage(i18n("Protocols"),
- i18n("Link mimes to protocols"), QPixmap(krLoader->loadIcon("about_kde",KIcon::Desktop,32)))));
+ i18n("Link mimes to protocols"), TQPixmap(krLoader->loadIcon("about_kde",KIcon::Desktop,32)))));
- widget->showPage( widget->pageIndex( kgFrames.at( startPage )->parentWidget() ) );
+ widget->showPage( widget->pageIndex( kgFrames.at( startPage )->tqparentWidget() ) );
slotApplyEnable();
}
@@ -133,7 +133,7 @@ void Konfigurator::slotApply()
{
restartGUI = true;
// KMessageBox::information(this,i18n("Changes to the GUI will be updated next time you run Krusader."),
-// QString::null,"konfigGUInotify");
+// TQString(),"konfigGUInotify");
}
// really ugly, but reload the Fn keys just in case - csaba: any better idea?
@@ -154,7 +154,7 @@ int Konfigurator::searchPage( int pageNum )
while( ( page = kgFrames.at( i ) ) )
{
- if( pageNum == widget->pageIndex( page->parentWidget() ) )
+ if( pageNum == widget->pageIndex( page->tqparentWidget() ) )
return i;
i++;
@@ -194,7 +194,7 @@ bool Konfigurator::slotPageSwitch()
{
restartGUI = true;
// KMessageBox::information(this,i18n("Changes to the GUI will be updated next time you run Krusader."),
-// QString::null,"konfigGUInotify");
+// TQString(),"konfigGUInotify");
}
break;
default:
diff --git a/krusader/Konfigurator/konfigurator.h b/krusader/Konfigurator/konfigurator.h
index 3058244..8f308aa 100644
--- a/krusader/Konfigurator/konfigurator.h
+++ b/krusader/Konfigurator/konfigurator.h
@@ -34,17 +34,18 @@
#define KONFIGURATOR_H
#include "konfiguratorpage.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
#include <kjanuswidget.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-class QLineEdit;
-class QString;
+class TQLineEdit;
+class TQString;
class Konfigurator : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
Konfigurator( bool f=false, int startPage = 0 ); // true if Konfigurator is run for the first time
@@ -68,12 +69,12 @@ private:
int searchPage( int pageNum );
private:
- QPtrList<KonfiguratorPage> kgFrames;
+ TQPtrList<KonfiguratorPage> kgFrames;
KJanusWidget *widget;
bool firstTime;
int lastPage;
bool internalCall;
- QTimer restoreTimer;
+ TQTimer restoreTimer;
bool restartGUI;
};
diff --git a/krusader/Konfigurator/konfiguratoritems.cpp b/krusader/Konfigurator/konfiguratoritems.cpp
index 17b9fcc..095f4e9 100644
--- a/krusader/Konfigurator/konfiguratoritems.cpp
+++ b/krusader/Konfigurator/konfiguratoritems.cpp
@@ -31,29 +31,29 @@
#include "konfiguratoritems.h"
#include "../krusader.h"
#include <klocale.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qcolordialog.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqcolordialog.h>
#include <kiconloader.h>
-KonfiguratorExtension::KonfiguratorExtension( QObject *obj, QString cfgClass, QString cfgName, bool rst, int pg) :
- QObject(), objectPtr( obj ), applyConnected( false ), setDefaultsConnected( false ),
+KonfiguratorExtension::KonfiguratorExtension( TQObject *obj, TQString cfgClass, TQString cfgName, bool rst, int pg) :
+ TQObject(), objectPtr( obj ), applyConnected( false ), setDefaultsConnected( false ),
changed( false ), restartNeeded( rst ), subpage(pg), configClass( cfgClass ), configName( cfgName )
{
}
void KonfiguratorExtension::connectNotify( const char *signal )
{
- QString signalString = QString( signal ).replace( " ", "" );
- QString applyString = QString( SIGNAL( applyManually(QObject *,QString, QString) ) ).replace( " ", "" );
- QString defaultsString = QString( SIGNAL( setDefaultsManually(QObject *) ) ).replace( " ", "" );
+ TQString signalString = TQString( signal ).tqreplace( " ", "" );
+ TQString applyString = TQString( TQT_SIGNAL( applyManually(TQObject *,TQString, TQString) ) ).tqreplace( " ", "" );
+ TQString defaultsString = TQString( TQT_SIGNAL( setDefaultsManually(TQObject *) ) ).tqreplace( " ", "" );
if( signalString == applyString )
applyConnected = true;
else if ( signalString == defaultsString )
setDefaultsConnected = true;
- QObject::connectNotify( signal );
+ TQObject::connectNotify( signal );
}
bool KonfiguratorExtension::apply()
@@ -91,16 +91,16 @@ bool KonfiguratorExtension::isChanged()
// KonfiguratorCheckBox class
///////////////////////////////
-KonfiguratorCheckBox::KonfiguratorCheckBox( QString cls, QString name, bool dflt, QString text,
- QWidget *parent, const char *widgetName, bool rst, int pg ) : QCheckBox( text, parent, widgetName ),
+KonfiguratorCheckBox::KonfiguratorCheckBox( TQString cls, TQString name, bool dflt, TQString text,
+ TQWidget *tqparent, const char *widgetName, bool rst, int pg ) : TQCheckBox( text, tqparent, widgetName ),
defaultValue( dflt )
{
- ext = new KonfiguratorExtension( this, cls, name, rst, pg );
- connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) );
- connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) );
- connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) );
+ ext = new KonfiguratorExtension( TQT_TQOBJECT(this), cls, name, rst, pg );
+ connect( ext, TQT_SIGNAL( applyAuto(TQObject *,TQString, TQString) ), TQT_TQOBJECT(this), TQT_SLOT( slotApply(TQObject *,TQString, TQString) ) );
+ connect( ext, TQT_SIGNAL( setDefaultsAuto(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( slotSetDefaults(TQObject *) ) );
+ connect( ext, TQT_SIGNAL( setInitialValue(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( loadInitialValue() ) );
- connect( this, SIGNAL( stateChanged( int ) ), ext, SLOT( setChanged() ) );
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL( stateChanged( int ) ), ext, TQT_SLOT( setChanged() ) );
loadInitialValue();
}
@@ -116,13 +116,13 @@ void KonfiguratorCheckBox::loadInitialValue()
ext->setChanged( false );
}
-void KonfiguratorCheckBox::slotApply(QObject *,QString cls, QString name)
+void KonfiguratorCheckBox::slotApply(TQObject *,TQString cls, TQString name)
{
krConfig->setGroup( cls );
krConfig->writeEntry( name, isChecked() );
}
-void KonfiguratorCheckBox::slotSetDefaults(QObject *)
+void KonfiguratorCheckBox::slotSetDefaults(TQObject *)
{
if( isChecked() != defaultValue )
setChecked( defaultValue );
@@ -131,16 +131,16 @@ void KonfiguratorCheckBox::slotSetDefaults(QObject *)
// KonfiguratorSpinBox class
///////////////////////////////
-KonfiguratorSpinBox::KonfiguratorSpinBox( QString cls, QString name, int dflt, int min, int max,
- QWidget *parent, const char *widgetName, bool rst, int pg ) : QSpinBox( parent, widgetName ),
+KonfiguratorSpinBox::KonfiguratorSpinBox( TQString cls, TQString name, int dflt, int min, int max,
+ TQWidget *tqparent, const char *widgetName, bool rst, int pg ) : TQSpinBox( tqparent, widgetName ),
defaultValue( dflt )
{
- ext = new KonfiguratorExtension( this, cls, name, rst, pg );
- connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) );
- connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) );
- connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) );
+ ext = new KonfiguratorExtension( TQT_TQOBJECT(this), cls, name, rst, pg );
+ connect( ext, TQT_SIGNAL( applyAuto(TQObject *,TQString, TQString) ), TQT_TQOBJECT(this), TQT_SLOT( slotApply(TQObject *,TQString, TQString) ) );
+ connect( ext, TQT_SIGNAL( setDefaultsAuto(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( slotSetDefaults(TQObject *) ) );
+ connect( ext, TQT_SIGNAL( setInitialValue(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( loadInitialValue() ) );
- connect( this, SIGNAL( valueChanged(int) ), ext, SLOT( setChanged() ) );
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL( valueChanged(int) ), ext, TQT_SLOT( setChanged() ) );
setMinValue( min );
setMaxValue( max );
@@ -160,13 +160,13 @@ void KonfiguratorSpinBox::loadInitialValue()
ext->setChanged( false );
}
-void KonfiguratorSpinBox::slotApply(QObject *,QString cls, QString name)
+void KonfiguratorSpinBox::slotApply(TQObject *,TQString cls, TQString name)
{
krConfig->setGroup( cls );
krConfig->writeEntry( name, value() );
}
-void KonfiguratorSpinBox::slotSetDefaults(QObject *)
+void KonfiguratorSpinBox::slotSetDefaults(TQObject *)
{
if( value() != defaultValue )
setValue( defaultValue );
@@ -180,12 +180,12 @@ void KonfiguratorCheckBoxGroup::add( KonfiguratorCheckBox *checkBox )
checkBoxList.append( checkBox );
}
-KonfiguratorCheckBox * KonfiguratorCheckBoxGroup::find( int index )
+KonfiguratorCheckBox * KonfiguratorCheckBoxGroup::tqfind( int index )
{
return checkBoxList.at( index );
}
-KonfiguratorCheckBox * KonfiguratorCheckBoxGroup::find( QString name )
+KonfiguratorCheckBox * KonfiguratorCheckBoxGroup::tqfind( TQString name )
{
KonfiguratorCheckBox *checkBox = checkBoxList.first();
@@ -203,14 +203,14 @@ KonfiguratorCheckBox * KonfiguratorCheckBoxGroup::find( QString name )
// KonfiguratorRadioButtons class
///////////////////////////////
-KonfiguratorRadioButtons::KonfiguratorRadioButtons( QString cls, QString name,
- QString dflt, QWidget *parent, const char *widgetName, bool rst, int pg ) :
- QButtonGroup( parent, widgetName ), defaultValue( dflt )
+KonfiguratorRadioButtons::KonfiguratorRadioButtons( TQString cls, TQString name,
+ TQString dflt, TQWidget *tqparent, const char *widgetName, bool rst, int pg ) :
+ TQButtonGroup( tqparent, widgetName ), defaultValue( dflt )
{
- ext = new KonfiguratorExtension( this, cls, name, rst, pg );
- connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) );
- connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) );
- connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) );
+ ext = new KonfiguratorExtension( TQT_TQOBJECT(this), cls, name, rst, pg );
+ connect( ext, TQT_SIGNAL( applyAuto(TQObject *,TQString, TQString) ), TQT_TQOBJECT(this), TQT_SLOT( slotApply(TQObject *,TQString, TQString) ) );
+ connect( ext, TQT_SIGNAL( setDefaultsAuto(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( slotSetDefaults(TQObject *) ) );
+ connect( ext, TQT_SIGNAL( setInitialValue(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( loadInitialValue() ) );
}
KonfiguratorRadioButtons::~KonfiguratorRadioButtons()
@@ -218,33 +218,33 @@ KonfiguratorRadioButtons::~KonfiguratorRadioButtons()
delete ext;
}
-void KonfiguratorRadioButtons::addRadioButton( QRadioButton *radioWidget, QString name, QString value )
+void KonfiguratorRadioButtons::addRadioButton( TQRadioButton *radioWidget, TQString name, TQString value )
{
radioButtons.append( radioWidget );
radioNames.push_back( name );
radioValues.push_back( value );
- connect( radioWidget, SIGNAL( stateChanged(int) ), ext, SLOT( setChanged() ) );
+ connect( radioWidget, TQT_SIGNAL( stateChanged(int) ), ext, TQT_SLOT( setChanged() ) );
}
-QRadioButton * KonfiguratorRadioButtons::find( int index )
+TQRadioButton * KonfiguratorRadioButtons::tqfind( int index )
{
return radioButtons.at( index );
}
-QRadioButton * KonfiguratorRadioButtons::find( QString name )
+TQRadioButton * KonfiguratorRadioButtons::tqfind( TQString name )
{
- int index = radioNames.findIndex( name );
+ int index = radioNames.tqfindIndex( name );
if( index == -1 )
return 0;
return radioButtons.at( index );
}
-void KonfiguratorRadioButtons::selectButton( QString value )
+void KonfiguratorRadioButtons::selectButton( TQString value )
{
int cnt = 0;
- QRadioButton *btn = radioButtons.first();
+ TQRadioButton *btn = radioButtons.first();
while( btn )
{
@@ -265,15 +265,15 @@ void KonfiguratorRadioButtons::selectButton( QString value )
void KonfiguratorRadioButtons::loadInitialValue()
{
krConfig->setGroup( ext->getCfgClass() );
- QString initValue = krConfig->readEntry( ext->getCfgName(), defaultValue );
+ TQString initValue = krConfig->readEntry( ext->getCfgName(), defaultValue );
selectButton( initValue );
ext->setChanged( false );
}
-void KonfiguratorRadioButtons::slotApply(QObject *,QString cls, QString name)
+void KonfiguratorRadioButtons::slotApply(TQObject *,TQString cls, TQString name)
{
- QRadioButton *btn = radioButtons.first();
+ TQRadioButton *btn = radioButtons.first();
int cnt = 0;
while( btn )
@@ -290,7 +290,7 @@ void KonfiguratorRadioButtons::slotApply(QObject *,QString cls, QString name)
}
}
-void KonfiguratorRadioButtons::slotSetDefaults(QObject *)
+void KonfiguratorRadioButtons::slotSetDefaults(TQObject *)
{
selectButton( defaultValue );
}
@@ -298,16 +298,16 @@ void KonfiguratorRadioButtons::slotSetDefaults(QObject *)
// KonfiguratorEditBox class
///////////////////////////////
-KonfiguratorEditBox::KonfiguratorEditBox( QString cls, QString name, QString dflt,
- QWidget *parent, const char *widgetName, bool rst, int pg ) : QLineEdit( parent, widgetName ),
+KonfiguratorEditBox::KonfiguratorEditBox( TQString cls, TQString name, TQString dflt,
+ TQWidget *tqparent, const char *widgetName, bool rst, int pg ) : TQLineEdit( tqparent, widgetName ),
defaultValue( dflt )
{
- ext = new KonfiguratorExtension( this, cls, name, rst, pg );
- connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) );
- connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) );
- connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) );
+ ext = new KonfiguratorExtension( TQT_TQOBJECT(this), cls, name, rst, pg );
+ connect( ext, TQT_SIGNAL( applyAuto(TQObject *,TQString, TQString) ), TQT_TQOBJECT(this), TQT_SLOT( slotApply(TQObject *,TQString, TQString) ) );
+ connect( ext, TQT_SIGNAL( setDefaultsAuto(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( slotSetDefaults(TQObject *) ) );
+ connect( ext, TQT_SIGNAL( setInitialValue(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( loadInitialValue() ) );
- connect( this, SIGNAL( textChanged(const QString &) ), ext, SLOT( setChanged() ) );
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL( textChanged(const TQString &) ), ext, TQT_SLOT( setChanged() ) );
loadInitialValue();
}
@@ -324,13 +324,13 @@ void KonfiguratorEditBox::loadInitialValue()
ext->setChanged( false );
}
-void KonfiguratorEditBox::slotApply(QObject *,QString cls, QString name)
+void KonfiguratorEditBox::slotApply(TQObject *,TQString cls, TQString name)
{
krConfig->setGroup( cls );
krConfig->writeEntry( name, text() );
}
-void KonfiguratorEditBox::slotSetDefaults(QObject *)
+void KonfiguratorEditBox::slotSetDefaults(TQObject *)
{
if( text() != defaultValue )
setText( defaultValue );
@@ -340,16 +340,16 @@ void KonfiguratorEditBox::slotSetDefaults(QObject *)
// KonfiguratorURLRequester class
///////////////////////////////
-KonfiguratorURLRequester::KonfiguratorURLRequester( QString cls, QString name, QString dflt,
- QWidget *parent, const char *widgetName, bool rst, int pg ) : KURLRequester( parent, widgetName ),
+KonfiguratorURLRequester::KonfiguratorURLRequester( TQString cls, TQString name, TQString dflt,
+ TQWidget *tqparent, const char *widgetName, bool rst, int pg ) : KURLRequester( tqparent, widgetName ),
defaultValue( dflt )
{
- ext = new KonfiguratorExtension( this, cls, name, rst, pg );
- connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) );
- connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) );
- connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) );
+ ext = new KonfiguratorExtension( TQT_TQOBJECT(this), cls, name, rst, pg );
+ connect( ext, TQT_SIGNAL( applyAuto(TQObject *,TQString, TQString) ), TQT_TQOBJECT(this), TQT_SLOT( slotApply(TQObject *,TQString, TQString) ) );
+ connect( ext, TQT_SIGNAL( setDefaultsAuto(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( slotSetDefaults(TQObject *) ) );
+ connect( ext, TQT_SIGNAL( setInitialValue(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( loadInitialValue() ) );
- connect( this, SIGNAL( textChanged(const QString &) ), ext, SLOT( setChanged() ) );
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL( textChanged(const TQString &) ), ext, TQT_SLOT( setChanged() ) );
button()->setIconSet( SmallIcon( "fileopen" ) );
loadInitialValue();
@@ -367,13 +367,13 @@ void KonfiguratorURLRequester::loadInitialValue()
ext->setChanged( false );
}
-void KonfiguratorURLRequester::slotApply(QObject *,QString cls, QString name)
+void KonfiguratorURLRequester::slotApply(TQObject *,TQString cls, TQString name)
{
krConfig->setGroup( cls );
krConfig->writeEntry( name, url() );
}
-void KonfiguratorURLRequester::slotSetDefaults(QObject *)
+void KonfiguratorURLRequester::slotSetDefaults(TQObject *)
{
if( url() != defaultValue )
setURL( defaultValue );
@@ -382,20 +382,20 @@ void KonfiguratorURLRequester::slotSetDefaults(QObject *)
// KonfiguratorFontChooser class
///////////////////////////////
-KonfiguratorFontChooser::KonfiguratorFontChooser( QString cls, QString name, QFont *dflt,
- QWidget *parent, const char *widgetName, bool rst, int pg ) : QHBox ( parent, widgetName ),
+KonfiguratorFontChooser::KonfiguratorFontChooser( TQString cls, TQString name, TQFont *dflt,
+ TQWidget *tqparent, const char *widgetName, bool rst, int pg ) : TQHBox ( tqparent, widgetName ),
defaultValue( dflt )
{
- ext = new KonfiguratorExtension( this, cls, name, rst, pg );
- connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) );
- connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) );
- connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) );
+ ext = new KonfiguratorExtension( TQT_TQOBJECT(this), cls, name, rst, pg );
+ connect( ext, TQT_SIGNAL( applyAuto(TQObject *,TQString, TQString) ), TQT_TQOBJECT(this), TQT_SLOT( slotApply(TQObject *,TQString, TQString) ) );
+ connect( ext, TQT_SIGNAL( setDefaultsAuto(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( slotSetDefaults(TQObject *) ) );
+ connect( ext, TQT_SIGNAL( setInitialValue(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( loadInitialValue() ) );
- pLabel = new QLabel( this );
+ pLabel = new TQLabel( this );
pLabel->setMinimumWidth( 150 );
- pToolButton = new QToolButton( this );
+ pToolButton = new TQToolButton( this );
- connect( pToolButton, SIGNAL( clicked() ), this, SLOT( slotBrowseFont() ) );
+ connect( pToolButton, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( slotBrowseFont() ) );
pToolButton->setIconSet( SmallIcon( "fileopen" ) );
@@ -418,16 +418,16 @@ void KonfiguratorFontChooser::loadInitialValue()
void KonfiguratorFontChooser::setFont()
{
pLabel->setFont( font );
- pLabel->setText( font.family()+QString(", %1").arg(font.pointSize()) );
+ pLabel->setText( font.family()+TQString(", %1").tqarg(font.pointSize()) );
}
-void KonfiguratorFontChooser::slotApply(QObject *,QString cls, QString name)
+void KonfiguratorFontChooser::slotApply(TQObject *,TQString cls, TQString name)
{
krConfig->setGroup( cls );
krConfig->writeEntry( name, font );
}
-void KonfiguratorFontChooser::slotSetDefaults(QObject *)
+void KonfiguratorFontChooser::slotSetDefaults(TQObject *)
{
font = *defaultValue;
ext->setChanged();
@@ -445,9 +445,9 @@ void KonfiguratorFontChooser::slotBrowseFont()
// KonfiguratorComboBox class
///////////////////////////////
-KonfiguratorComboBox::KonfiguratorComboBox( QString cls, QString name, QString dflt,
- KONFIGURATOR_NAME_VALUE_PAIR *listIn, int listInLen, QWidget *parent,
- const char *widgetName, bool rst, bool editable, int pg ) : QComboBox ( parent, widgetName ),
+KonfiguratorComboBox::KonfiguratorComboBox( TQString cls, TQString name, TQString dflt,
+ KONFIGURATOR_NAME_VALUE_PAIR *listIn, int listInLen, TQWidget *tqparent,
+ const char *widgetName, bool rst, bool editable, int pg ) : TQComboBox ( tqparent, widgetName ),
defaultValue( dflt ), listLen( listInLen )
{
list = new KONFIGURATOR_NAME_VALUE_PAIR[ listInLen ];
@@ -458,14 +458,14 @@ KonfiguratorComboBox::KonfiguratorComboBox( QString cls, QString name, QString d
insertItem( list[i].text );
}
- ext = new KonfiguratorExtension( this, cls, name, rst, pg );
- connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) );
- connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) );
- connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) );
+ ext = new KonfiguratorExtension( TQT_TQOBJECT(this), cls, name, rst, pg );
+ connect( ext, TQT_SIGNAL( applyAuto(TQObject *,TQString, TQString) ), TQT_TQOBJECT(this), TQT_SLOT( slotApply(TQObject *,TQString, TQString) ) );
+ connect( ext, TQT_SIGNAL( setDefaultsAuto(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( slotSetDefaults(TQObject *) ) );
+ connect( ext, TQT_SIGNAL( setInitialValue(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( loadInitialValue() ) );
-// connect( this, SIGNAL( highlighted(int) ), ext, SLOT( setChanged() ) ); /* Removed because of startup combo failure */
- connect( this, SIGNAL( activated(int) ), ext, SLOT( setChanged() ) );
- connect( this, SIGNAL( textChanged ( const QString & ) ), ext, SLOT( setChanged() ) );
+// connect( TQT_TQOBJECT(this), TQT_SIGNAL( highlighted(int) ), ext, TQT_SLOT( setChanged() ) ); /* Removed because of startup combo failure */
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL( activated(int) ), ext, TQT_SLOT( setChanged() ) );
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL( textChanged ( const TQString & ) ), ext, TQT_SLOT( setChanged() ) );
setEditable( editable );
loadInitialValue();
@@ -480,15 +480,15 @@ KonfiguratorComboBox::~KonfiguratorComboBox()
void KonfiguratorComboBox::loadInitialValue()
{
krConfig->setGroup( ext->getCfgClass() );
- QString select = krConfig->readEntry( ext->getCfgName(), defaultValue );
+ TQString select = krConfig->readEntry( ext->getCfgName(), defaultValue );
selectEntry( select );
ext->setChanged( false );
}
-void KonfiguratorComboBox::slotApply(QObject *,QString cls, QString name)
+void KonfiguratorComboBox::slotApply(TQObject *,TQString cls, TQString name)
{
- QString text = editable() ? lineEdit()->text() : currentText();
- QString value = text;
+ TQString text = editable() ? lineEdit()->text() : currentText();
+ TQString value = text;
for( int i=0; i != listLen; i++ )
if( list[i].text == text ) {
@@ -500,7 +500,7 @@ void KonfiguratorComboBox::slotApply(QObject *,QString cls, QString name)
krConfig->writeEntry( name, value );
}
-void KonfiguratorComboBox::selectEntry( QString entry )
+void KonfiguratorComboBox::selectEntry( TQString entry )
{
for( int i=0; i != listLen; i++ )
if( list[i].value == entry )
@@ -515,7 +515,7 @@ void KonfiguratorComboBox::selectEntry( QString entry )
setCurrentItem( 0 );
}
-void KonfiguratorComboBox::slotSetDefaults(QObject *)
+void KonfiguratorComboBox::slotSetDefaults(TQObject *)
{
selectEntry( defaultValue );
}
@@ -524,18 +524,18 @@ void KonfiguratorComboBox::slotSetDefaults(QObject *)
// KonfiguratorColorChooser class
///////////////////////////////
-KonfiguratorColorChooser::KonfiguratorColorChooser( QString cls, QString name, QColor dflt,
- QWidget *parent, const char *widgetName, bool rst, ADDITIONAL_COLOR *addColPtr,
- int addColNum, int pg ) : QComboBox ( parent, widgetName ),
+KonfiguratorColorChooser::KonfiguratorColorChooser( TQString cls, TQString name, TQColor dflt,
+ TQWidget *tqparent, const char *widgetName, bool rst, ADDITIONAL_COLOR *addColPtr,
+ int addColNum, int pg ) : TQComboBox ( tqparent, widgetName ),
defaultValue( dflt ), disableColorChooser( true )
{
- ext = new KonfiguratorExtension( this, cls, name, rst, pg );
+ ext = new KonfiguratorExtension( TQT_TQOBJECT(this), cls, name, rst, pg );
- connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) );
- connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) );
- connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) );
+ connect( ext, TQT_SIGNAL( applyAuto(TQObject *,TQString, TQString) ), TQT_TQOBJECT(this), TQT_SLOT( slotApply(TQObject *,TQString, TQString) ) );
+ connect( ext, TQT_SIGNAL( setDefaultsAuto(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( slotSetDefaults(TQObject *) ) );
+ connect( ext, TQT_SIGNAL( setInitialValue(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( loadInitialValue() ) );
- addColor( i18n("Custom color" ), QColor( 255, 255, 255 ) );
+ addColor( i18n("Custom color" ), TQColor( 255, 255, 255 ) );
addColor( i18n("Default" ), defaultValue );
for( int i=0; i != addColNum; i++ )
@@ -544,25 +544,25 @@ KonfiguratorColorChooser::KonfiguratorColorChooser( QString cls, QString name, Q
addColor( addColPtr[i].name, addColPtr[i].color );
}
- addColor( i18n("Red" ), Qt::red );
- addColor( i18n("Green" ), Qt::green );
- addColor( i18n("Blue" ), Qt::blue );
- addColor( i18n("Cyan" ), Qt::cyan );
- addColor( i18n("Magenta" ), Qt::magenta );
- addColor( i18n("Yellow" ), Qt::yellow );
- addColor( i18n("Dark Red" ), Qt::darkRed );
- addColor( i18n("Dark Green" ), Qt::darkGreen );
- addColor( i18n("Dark Blue" ), Qt::darkBlue );
- addColor( i18n("Dark Cyan" ), Qt::darkCyan );
- addColor( i18n("Dark Magenta" ), Qt::darkMagenta );
- addColor( i18n("Dark Yellow" ), Qt::darkYellow );
- addColor( i18n("White" ), Qt::white );
- addColor( i18n("Light Gray" ), Qt::lightGray );
- addColor( i18n("Gray" ), Qt::gray );
- addColor( i18n("Dark Gray" ), Qt::darkGray );
- addColor( i18n("Black" ), Qt::black );
-
- connect( this, SIGNAL( activated(int) ), this, SLOT( slotCurrentChanged( int ) ) );
+ addColor( i18n("Red" ), TQt::red );
+ addColor( i18n("Green" ), TQt::green );
+ addColor( i18n("Blue" ), TQt::blue );
+ addColor( i18n("Cyan" ), TQt::cyan );
+ addColor( i18n("Magenta" ), TQt::magenta );
+ addColor( i18n("Yellow" ), TQt::yellow );
+ addColor( i18n("Dark Red" ), TQt::darkRed );
+ addColor( i18n("Dark Green" ), TQt::darkGreen );
+ addColor( i18n("Dark Blue" ), TQt::darkBlue );
+ addColor( i18n("Dark Cyan" ), TQt::darkCyan );
+ addColor( i18n("Dark Magenta" ), TQt::darkMagenta );
+ addColor( i18n("Dark Yellow" ), TQt::darkYellow );
+ addColor( i18n("White" ), TQt::white );
+ addColor( i18n("Light Gray" ), TQt::lightGray );
+ addColor( i18n("Gray" ), TQt::gray );
+ addColor( i18n("Dark Gray" ), TQt::darkGray );
+ addColor( i18n("Black" ), TQt::black );
+
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL( activated(int) ), TQT_TQOBJECT(this), TQT_SLOT( slotCurrentChanged( int ) ) );
loadInitialValue();
}
@@ -572,18 +572,18 @@ KonfiguratorColorChooser::~KonfiguratorColorChooser()
delete ext;
}
-QPixmap KonfiguratorColorChooser::createPixmap( QColor color )
+TQPixmap KonfiguratorColorChooser::createPixmap( TQColor color )
{
- QPainter painter;
- QPen pen;
- int size = QFontMetrics(font()).height()*3/4;
- QRect rect( 0, 0, size, size );
- QPixmap pixmap( rect.width(), rect.height() );
+ TQPainter painter;
+ TQPen pen;
+ int size = TQFontMetrics(font()).height()*3/4;
+ TQRect rect( 0, 0, size, size );
+ TQPixmap pixmap( rect.width(), rect.height() );
- pen.setColor( Qt::black );
+ pen.setColor( TQt::black );
painter.begin( &pixmap );
- QBrush brush( color );
+ TQBrush brush( color );
painter.fillRect( rect, brush );
painter.setPen( pen );
painter.drawRect( rect );
@@ -593,7 +593,7 @@ QPixmap KonfiguratorColorChooser::createPixmap( QColor color )
return pixmap;
}
-void KonfiguratorColorChooser::addColor( QString text, QColor color )
+void KonfiguratorColorChooser::addColor( TQString text, TQColor color )
{
insertItem( createPixmap(color), text );
palette.push_back( color );
@@ -602,12 +602,12 @@ void KonfiguratorColorChooser::addColor( QString text, QColor color )
void KonfiguratorColorChooser::loadInitialValue()
{
krConfig->setGroup( ext->getCfgClass() );
- QString selected = krConfig->readEntry( ext->getCfgName(), "" );
+ TQString selected = krConfig->readEntry( ext->getCfgName(), "" );
setValue( selected );
ext->setChanged( false );
}
-void KonfiguratorColorChooser::setDefaultColor( QColor dflt )
+void KonfiguratorColorChooser::setDefaultColor( TQColor dflt )
{
defaultValue = dflt;
palette[1] = defaultValue;
@@ -617,7 +617,7 @@ void KonfiguratorColorChooser::setDefaultColor( QColor dflt )
emit colorChanged();
}
-void KonfiguratorColorChooser::changeAdditionalColor( unsigned int num, QColor color )
+void KonfiguratorColorChooser::changeAdditionalColor( unsigned int num, TQColor color )
{
if( num < additionalColors.size() )
{
@@ -630,18 +630,18 @@ void KonfiguratorColorChooser::changeAdditionalColor( unsigned int num, QColor c
}
}
-void KonfiguratorColorChooser::setDefaultText( QString text )
+void KonfiguratorColorChooser::setDefaultText( TQString text )
{
changeItem( createPixmap( defaultValue ), text, 1 );
}
-void KonfiguratorColorChooser::slotApply(QObject *,QString cls, QString name)
+void KonfiguratorColorChooser::slotApply(TQObject *,TQString cls, TQString name)
{
krConfig->setGroup( cls );
krConfig->writeEntry( name, getValue() );
}
-void KonfiguratorColorChooser::setValue( QString value )
+void KonfiguratorColorChooser::setValue( TQString value )
{
disableColorChooser = true;
@@ -666,7 +666,7 @@ void KonfiguratorColorChooser::setValue( QString value )
{
krConfig->setGroup( ext->getCfgClass() );
krConfig->writeEntry( "TmpColor", value );
- QColor color = krConfig->readColorEntry( "TmpColor", &defaultValue );
+ TQColor color = krConfig->readColorEntry( "TmpColor", &defaultValue );
customValue = color;
krConfig->deleteEntry( "TmpColor" );
@@ -688,15 +688,15 @@ void KonfiguratorColorChooser::setValue( QString value )
disableColorChooser = false;
}
-QString KonfiguratorColorChooser::getValue()
+TQString KonfiguratorColorChooser::getValue()
{
- QColor color = palette[ currentItem() ];
+ TQColor color = palette[ currentItem() ];
if( currentItem() == 1 ) /* it's the default value? */
return "";
else if( currentItem() >= 2 && (unsigned)currentItem() < 2 + additionalColors.size() )
return additionalColors[ currentItem() - 2 ].value;
else
- return QString( "%1,%2,%3" ).arg( color.red() ).arg( color.green() ).arg( color.blue() );
+ return TQString( "%1,%2,%3" ).tqarg( color.red() ).tqarg( color.green() ).tqarg( color.blue() );
}
bool KonfiguratorColorChooser::isValueRGB()
@@ -704,7 +704,7 @@ bool KonfiguratorColorChooser::isValueRGB()
return !( currentItem() >= 1 && (unsigned)currentItem() < 2 + additionalColors.size() );
}
-void KonfiguratorColorChooser::slotSetDefaults(QObject *)
+void KonfiguratorColorChooser::slotSetDefaults(TQObject *)
{
ext->setChanged();
setCurrentItem( 1 );
@@ -716,7 +716,7 @@ void KonfiguratorColorChooser::slotCurrentChanged( int number )
ext->setChanged();
if( number == 0 && !disableColorChooser )
{
- QColor color = QColorDialog::getColor ( customValue, this, "ColorDialog" );
+ TQColor color = TQColorDialog::getColor ( customValue, this, "ColorDialog" );
if( color.isValid() )
{
disableColorChooser = true;
@@ -730,7 +730,7 @@ void KonfiguratorColorChooser::slotCurrentChanged( int number )
emit colorChanged();
}
-QColor KonfiguratorColorChooser::getColor()
+TQColor KonfiguratorColorChooser::getColor()
{
return palette[ currentItem() ];
}
@@ -738,14 +738,14 @@ QColor KonfiguratorColorChooser::getColor()
// KonfiguratorListBox class
///////////////////////////////
-KonfiguratorListBox::KonfiguratorListBox( QString cls, QString name, QStringList dflt,
- QWidget *parent, const char *widgetName, bool rst, int pg ) : QListBox( parent, widgetName ),
+KonfiguratorListBox::KonfiguratorListBox( TQString cls, TQString name, TQStringList dflt,
+ TQWidget *tqparent, const char *widgetName, bool rst, int pg ) : TQListBox( tqparent, widgetName ),
defaultValue( dflt )
{
- ext = new KonfiguratorExtension( this, cls, name, rst, pg );
- connect( ext, SIGNAL( applyAuto(QObject *,QString, QString) ), this, SLOT( slotApply(QObject *,QString, QString) ) );
- connect( ext, SIGNAL( setDefaultsAuto(QObject *) ), this, SLOT( slotSetDefaults(QObject *) ) );
- connect( ext, SIGNAL( setInitialValue(QObject *) ), this, SLOT( loadInitialValue() ) );
+ ext = new KonfiguratorExtension( TQT_TQOBJECT(this), cls, name, rst, pg );
+ connect( ext, TQT_SIGNAL( applyAuto(TQObject *,TQString, TQString) ), TQT_TQOBJECT(this), TQT_SLOT( slotApply(TQObject *,TQString, TQString) ) );
+ connect( ext, TQT_SIGNAL( setDefaultsAuto(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( slotSetDefaults(TQObject *) ) );
+ connect( ext, TQT_SIGNAL( setInitialValue(TQObject *) ), TQT_TQOBJECT(this), TQT_SLOT( loadInitialValue() ) );
loadInitialValue();
}
@@ -762,13 +762,13 @@ void KonfiguratorListBox::loadInitialValue()
ext->setChanged( false );
}
-void KonfiguratorListBox::slotApply(QObject *,QString cls, QString name)
+void KonfiguratorListBox::slotApply(TQObject *,TQString cls, TQString name)
{
krConfig->setGroup( cls );
krConfig->writeEntry( name, list() );
}
-void KonfiguratorListBox::slotSetDefaults(QObject *)
+void KonfiguratorListBox::slotSetDefaults(TQObject *)
{
if( list() != defaultValue )
{
@@ -777,15 +777,15 @@ void KonfiguratorListBox::slotSetDefaults(QObject *)
}
}
-void KonfiguratorListBox::setList( QStringList list )
+void KonfiguratorListBox::setList( TQStringList list )
{
clear();
insertStringList( list );
}
-QStringList KonfiguratorListBox::list()
+TQStringList KonfiguratorListBox::list()
{
- QStringList lst;
+ TQStringList lst;
for( unsigned i=0; i != count(); i++ )
lst += text( i );
@@ -793,18 +793,18 @@ QStringList KonfiguratorListBox::list()
return lst;
}
-void KonfiguratorListBox::addItem( const QString & item )
+void KonfiguratorListBox::addItem( const TQString & item )
{
- if( !list().contains( item ) )
+ if( !list().tqcontains( item ) )
{
insertItem( item );
ext->setChanged();
}
}
-void KonfiguratorListBox::removeItem( const QString & item )
+void KonfiguratorListBox::removeItem( const TQString & item )
{
- QListBoxItem * listItem = findItem( item );
+ TQListBoxItem * listItem = tqfindItem( item );
if( listItem != 0 )
{
takeItem( listItem );
diff --git a/krusader/Konfigurator/konfiguratoritems.h b/krusader/Konfigurator/konfiguratoritems.h
index 1763401..79a48f2 100644
--- a/krusader/Konfigurator/konfiguratoritems.h
+++ b/krusader/Konfigurator/konfiguratoritems.h
@@ -31,33 +31,34 @@
#ifndef __KONFIGURATOR_ITEMS_H__
#define __KONFIGURATOR_ITEMS_H__
-#include <qobject.h>
-#include <qstring.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
-#include <qbuttongroup.h>
-#include <qlineedit.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
+#include <tqbuttongroup.h>
+#include <tqlineedit.h>
#include <kurlrequester.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include <kfontdialog.h>
-#include <qlabel.h>
-#include <qfont.h>
-#include <qtoolbutton.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqfont.h>
+#include <tqtoolbutton.h>
+#include <tqcombobox.h>
#define FIRST_PAGE 0
-class KonfiguratorExtension : public QObject
+class KonfiguratorExtension : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KonfiguratorExtension(QObject *obj, QString cfgClass, QString cfgName, bool rst = false, int pg=FIRST_PAGE );
+ KonfiguratorExtension(TQObject *obj, TQString cfgClass, TQString cfgName, bool rst = false, int pg=FIRST_PAGE );
virtual void loadInitialValue();
virtual bool apply();
@@ -66,25 +67,25 @@ public:
virtual void setSubPage(int pg) {subpage = pg;}
virtual int subPage() {return subpage;}
- inline QObject *object() {return objectPtr;}
+ inline TQObject *object() {return objectPtr;}
- inline QString getCfgClass() {return configClass;}
- inline QString getCfgName() {return configName;}
+ inline TQString getCfgClass() {return configClass;}
+ inline TQString getCfgName() {return configName;}
public slots:
void setChanged() {emit sigChanged( changed = true);}
void setChanged( bool chg ) {emit sigChanged( changed = chg);}
signals:
- void applyManually(QObject *,QString, QString);
- void applyAuto(QObject *,QString, QString);
- void setDefaultsManually(QObject *);
- void setDefaultsAuto(QObject *);
- void setInitialValue(QObject *);
+ void applyManually(TQObject *,TQString, TQString);
+ void applyAuto(TQObject *,TQString, TQString);
+ void setDefaultsManually(TQObject *);
+ void setDefaultsAuto(TQObject *);
+ void setInitialValue(TQObject *);
void sigChanged( bool );
protected:
- QObject *objectPtr;
+ TQObject *objectPtr;
bool applyConnected;
bool setDefaultsConnected;
@@ -92,8 +93,8 @@ protected:
bool restartNeeded;
int subpage;
- QString configClass;
- QString configName;
+ TQString configClass;
+ TQString configName;
virtual void connectNotify( const char *signal );
};
@@ -102,21 +103,22 @@ protected:
// KonfiguratorCheckBox class
///////////////////////////////
-class KonfiguratorCheckBox : public QCheckBox
+class KonfiguratorCheckBox : public TQCheckBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KonfiguratorCheckBox( QString cls, QString name, bool dflt, QString text,
- QWidget *parent=0, const char *widgetName=0, bool rst=false, int pg=FIRST_PAGE );
+ KonfiguratorCheckBox( TQString cls, TQString name, bool dflt, TQString text,
+ TQWidget *tqparent=0, const char *widgetName=0, bool rst=false, int pg=FIRST_PAGE );
~KonfiguratorCheckBox();
inline KonfiguratorExtension *extension() {return ext;}
public slots:
virtual void loadInitialValue();
- void slotApply(QObject *,QString, QString);
- void slotSetDefaults(QObject *);
+ void slotApply(TQObject *,TQString, TQString);
+ void slotSetDefaults(TQObject *);
protected:
bool defaultValue;
@@ -126,21 +128,22 @@ protected:
// KonfiguratorSpinBox class
///////////////////////////////
-class KonfiguratorSpinBox : public QSpinBox
+class KonfiguratorSpinBox : public TQSpinBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KonfiguratorSpinBox( QString cls, QString name, int dflt, int min, int max,
- QWidget *parent=0, const char *widgetName=0, bool rst=false, int pg=FIRST_PAGE );
+ KonfiguratorSpinBox( TQString cls, TQString name, int dflt, int min, int max,
+ TQWidget *tqparent=0, const char *widgetName=0, bool rst=false, int pg=FIRST_PAGE );
~KonfiguratorSpinBox();
inline KonfiguratorExtension *extension() {return ext;}
public slots:
virtual void loadInitialValue();
- void slotApply(QObject *,QString, QString);
- void slotSetDefaults(QObject *);
+ void slotApply(TQObject *,TQString, TQString);
+ void slotSetDefaults(TQObject *);
protected:
int defaultValue;
@@ -150,53 +153,54 @@ protected:
// KonfiguratorCheckBoxGroup class
///////////////////////////////
-class KonfiguratorCheckBoxGroup : public QWidget
+class KonfiguratorCheckBoxGroup : public TQWidget
{
public:
- KonfiguratorCheckBoxGroup( QWidget * parent = 0, const char * name = 0 ) :
- QWidget( parent, name ) {};
+ KonfiguratorCheckBoxGroup( TQWidget * tqparent = 0, const char * name = 0 ) :
+ TQWidget( tqparent, name ) {};
void add( KonfiguratorCheckBox * );
- KonfiguratorCheckBox * find( int index );
- KonfiguratorCheckBox * find( QString name );
+ KonfiguratorCheckBox * tqfind( int index );
+ KonfiguratorCheckBox * tqfind( TQString name );
private:
- QPtrList<KonfiguratorCheckBox> checkBoxList;
+ TQPtrList<KonfiguratorCheckBox> checkBoxList;
};
// KonfiguratorRadioButtons class
///////////////////////////////
-class KonfiguratorRadioButtons : public QButtonGroup
+class KonfiguratorRadioButtons : public TQButtonGroup
{
Q_OBJECT
+ TQ_OBJECT
public:
- KonfiguratorRadioButtons( QString cls, QString name, QString dflt, QWidget *parent=0,
+ KonfiguratorRadioButtons( TQString cls, TQString name, TQString dflt, TQWidget *tqparent=0,
const char *widgetName=0, bool rst=false, int pg=FIRST_PAGE );
~KonfiguratorRadioButtons();
inline KonfiguratorExtension *extension() {return ext;}
- void addRadioButton( QRadioButton *radioWidget, QString name, QString value );
+ void addRadioButton( TQRadioButton *radioWidget, TQString name, TQString value );
- void selectButton( QString value );
+ void selectButton( TQString value );
- QRadioButton* find( int index );
- QRadioButton* find( QString name );
+ TQRadioButton* tqfind( int index );
+ TQRadioButton* tqfind( TQString name );
public slots:
virtual void loadInitialValue();
- void slotApply(QObject *,QString, QString);
- void slotSetDefaults(QObject *);
+ void slotApply(TQObject *,TQString, TQString);
+ void slotSetDefaults(TQObject *);
protected:
- QPtrList<QRadioButton> radioButtons;
- QValueList<QString> radioValues;
- QValueList<QString> radioNames;
+ TQPtrList<TQRadioButton> radioButtons;
+ TQValueList<TQString> radioValues;
+ TQValueList<TQString> radioNames;
- QString defaultValue;
- QButtonGroup *buttonGroup;
+ TQString defaultValue;
+ TQButtonGroup *buttonGroup;
KonfiguratorExtension *ext;
};
@@ -204,12 +208,13 @@ protected:
// KonfiguratorEditBox class
///////////////////////////////
-class KonfiguratorEditBox : public QLineEdit
+class KonfiguratorEditBox : public TQLineEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- KonfiguratorEditBox( QString cls, QString name, QString dflt, QWidget *parent=0,
+ KonfiguratorEditBox( TQString cls, TQString name, TQString dflt, TQWidget *tqparent=0,
const char *widgetName=0, bool rst=false, int pg=FIRST_PAGE );
~KonfiguratorEditBox();
@@ -217,11 +222,11 @@ public:
public slots:
virtual void loadInitialValue();
- void slotApply(QObject *,QString, QString);
- void slotSetDefaults(QObject *);
+ void slotApply(TQObject *,TQString, TQString);
+ void slotSetDefaults(TQObject *);
protected:
- QString defaultValue;
+ TQString defaultValue;
KonfiguratorExtension *ext;
};
@@ -232,9 +237,10 @@ protected:
class KonfiguratorURLRequester : public KURLRequester
{
Q_OBJECT
+ TQ_OBJECT
public:
- KonfiguratorURLRequester( QString cls, QString name, QString dflt, QWidget *parent=0,
+ KonfiguratorURLRequester( TQString cls, TQString name, TQString dflt, TQWidget *tqparent=0,
const char *widgetName=0, bool rst=false, int pg=FIRST_PAGE );
~KonfiguratorURLRequester();
@@ -242,23 +248,24 @@ public:
public slots:
virtual void loadInitialValue();
- void slotApply(QObject *,QString, QString);
- void slotSetDefaults(QObject *);
+ void slotApply(TQObject *,TQString, TQString);
+ void slotSetDefaults(TQObject *);
protected:
- QString defaultValue;
+ TQString defaultValue;
KonfiguratorExtension *ext;
};
// KonfiguratorFontChooser class
///////////////////////////////
-class KonfiguratorFontChooser : public QHBox
+class KonfiguratorFontChooser : public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KonfiguratorFontChooser( QString cls, QString name, QFont *dflt, QWidget *parent=0,
+ KonfiguratorFontChooser( TQString cls, TQString name, TQFont *dflt, TQWidget *tqparent=0,
const char *widgetName=0, bool rst=false, int pg=FIRST_PAGE );
~KonfiguratorFontChooser();
@@ -266,17 +273,17 @@ public:
public slots:
virtual void loadInitialValue();
- void slotApply(QObject *,QString, QString);
- void slotSetDefaults(QObject *);
+ void slotApply(TQObject *,TQString, TQString);
+ void slotSetDefaults(TQObject *);
void slotBrowseFont();
protected:
- QFont * defaultValue;
- QFont font;
+ TQFont * defaultValue;
+ TQFont font;
KonfiguratorExtension *ext;
- QLabel * pLabel;
- QToolButton * pToolButton;
+ TQLabel * pLabel;
+ TQToolButton * pToolButton;
void setFont();
};
@@ -286,8 +293,8 @@ protected:
struct KONFIGURATOR_NAME_VALUE_PAIR
{
- QString text;
- QString value;
+ TQString text;
+ TQString value;
};
// KONFIGURATOR_NAME_VALUE_TIP structure
@@ -295,22 +302,23 @@ struct KONFIGURATOR_NAME_VALUE_PAIR
struct KONFIGURATOR_NAME_VALUE_TIP
{
- QString text;
- QString value;
- QString tooltip;
+ TQString text;
+ TQString value;
+ TQString tooltip;
};
// KonfiguratorComboBox class
///////////////////////////////
-class KonfiguratorComboBox : public QComboBox
+class KonfiguratorComboBox : public TQComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KonfiguratorComboBox( QString cls, QString name, QString dflt,
+ KonfiguratorComboBox( TQString cls, TQString name, TQString dflt,
KONFIGURATOR_NAME_VALUE_PAIR *listIn, int listInLen,
- QWidget *parent=0, const char *widgetName=0,
+ TQWidget *tqparent=0, const char *widgetName=0,
bool rst=false, bool editable=false, int pg=FIRST_PAGE );
~KonfiguratorComboBox();
@@ -318,16 +326,16 @@ public:
public slots:
virtual void loadInitialValue();
- void slotApply(QObject *,QString, QString);
- void slotSetDefaults(QObject *);
+ void slotApply(TQObject *,TQString, TQString);
+ void slotSetDefaults(TQObject *);
protected:
- QString defaultValue;
+ TQString defaultValue;
KONFIGURATOR_NAME_VALUE_PAIR *list;
int listLen;
KonfiguratorExtension *ext;
- void selectEntry( QString entry );
+ void selectEntry( TQString entry );
};
@@ -336,49 +344,50 @@ protected:
typedef struct
{
- QString name;
- QColor color;
- QString value;
+ TQString name;
+ TQColor color;
+ TQString value;
} ADDITIONAL_COLOR;
-class KonfiguratorColorChooser : public QComboBox
+class KonfiguratorColorChooser : public TQComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KonfiguratorColorChooser( QString cls, QString name, QColor dflt,
- QWidget *parent=0, const char *widgetName=0, bool rst=false,
+ KonfiguratorColorChooser( TQString cls, TQString name, TQColor dflt,
+ TQWidget *tqparent=0, const char *widgetName=0, bool rst=false,
ADDITIONAL_COLOR *addColPtr = 0, int addColNum = 0, int pg=FIRST_PAGE );
~KonfiguratorColorChooser();
inline KonfiguratorExtension *extension() {return ext;}
- void setDefaultColor( QColor dflt );
- void setDefaultText( QString text );
- QColor getColor();
- void changeAdditionalColor( unsigned int num, QColor color );
- QString getValue();
+ void setDefaultColor( TQColor dflt );
+ void setDefaultText( TQString text );
+ TQColor getColor();
+ void changeAdditionalColor( unsigned int num, TQColor color );
+ TQString getValue();
bool isValueRGB();
- void setValue( QString value );
+ void setValue( TQString value );
public slots:
virtual void loadInitialValue();
- void slotApply(QObject *,QString, QString);
- void slotSetDefaults(QObject *);
+ void slotApply(TQObject *,TQString, TQString);
+ void slotSetDefaults(TQObject *);
void slotCurrentChanged( int number );
signals:
void colorChanged();
private:
- void addColor( QString text, QColor color );
- QPixmap createPixmap( QColor color );
+ void addColor( TQString text, TQColor color );
+ TQPixmap createPixmap( TQColor color );
protected:
- QColor defaultValue;
- QColor customValue;
- QValueVector<QColor> palette;
- QValueVector<ADDITIONAL_COLOR> additionalColors;
+ TQColor defaultValue;
+ TQColor customValue;
+ TQValueVector<TQColor> palette;
+ TQValueVector<ADDITIONAL_COLOR> additionalColors;
KonfiguratorExtension *ext;
bool disableColorChooser;
};
@@ -386,31 +395,32 @@ protected:
// KonfiguratorListBox class
///////////////////////////////
-class KonfiguratorListBox : public QListBox
+class KonfiguratorListBox : public TQListBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KonfiguratorListBox( QString cls, QString name, QStringList dflt,
- QWidget *parent=0, const char *widgetName=0,
+ KonfiguratorListBox( TQString cls, TQString name, TQStringList dflt,
+ TQWidget *tqparent=0, const char *widgetName=0,
bool rst=false, int pg=FIRST_PAGE );
~KonfiguratorListBox();
inline KonfiguratorExtension *extension() {return ext;}
- void addItem( const QString & );
- void removeItem( const QString & );
+ void addItem( const TQString & );
+ void removeItem( const TQString & );
public slots:
virtual void loadInitialValue();
- void slotApply(QObject *,QString, QString);
- void slotSetDefaults(QObject *);
+ void slotApply(TQObject *,TQString, TQString);
+ void slotSetDefaults(TQObject *);
protected:
- QStringList list();
- void setList( QStringList );
+ TQStringList list();
+ void setList( TQStringList );
- QStringList defaultValue;
+ TQStringList defaultValue;
KonfiguratorExtension *ext;
};
diff --git a/krusader/Konfigurator/konfiguratorpage.cpp b/krusader/Konfigurator/konfiguratorpage.cpp
index 731a522..2cd7f7b 100644
--- a/krusader/Konfigurator/konfiguratorpage.cpp
+++ b/krusader/Konfigurator/konfiguratorpage.cpp
@@ -29,12 +29,12 @@
***************************************************************************/
#include "konfiguratorpage.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include "../krusader.h"
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
-KonfiguratorPage::KonfiguratorPage( bool firstTime, QWidget* parent, const char* name ) :
- QFrame( parent, name ), firstCall( firstTime )
+KonfiguratorPage::KonfiguratorPage( bool firstTime, TQWidget* tqparent, const char* name ) :
+ TQFrame( tqparent, name ), firstCall( firstTime )
{
}
@@ -91,110 +91,110 @@ bool KonfiguratorPage::isChanged()
item = itemList.next();
}
- itemList.find( currentItem ); /* restore the current pointer */
+ itemList.tqfind( currentItem ); /* restore the current pointer */
return isChanged;
}
-KonfiguratorCheckBox* KonfiguratorPage::createCheckBox( QString cls, QString name,
- bool dflt, QString text, QWidget *parent, bool rst, QString toolTip, int pg )
+KonfiguratorCheckBox* KonfiguratorPage::createCheckBox( TQString cls, TQString name,
+ bool dflt, TQString text, TQWidget *tqparent, bool rst, TQString toolTip, int pg )
{
KonfiguratorCheckBox *checkBox = new KonfiguratorCheckBox( cls, name, dflt, text,
- parent, QString(cls + "/" + name).ascii(), rst, pg );
+ tqparent, TQString(cls + "/" + name).ascii(), rst, pg );
if( !toolTip.isEmpty() )
- QWhatsThis::add( checkBox, toolTip );
+ TQWhatsThis::add( checkBox, toolTip );
registerObject( checkBox->extension() );
return checkBox;
}
-KonfiguratorSpinBox* KonfiguratorPage::createSpinBox( QString cls, QString name,
- int dflt, int min, int max, QWidget *parent, bool rst, int pg )
+KonfiguratorSpinBox* KonfiguratorPage::createSpinBox( TQString cls, TQString name,
+ int dflt, int min, int max, TQWidget *tqparent, bool rst, int pg )
{
KonfiguratorSpinBox *spinBox = new KonfiguratorSpinBox( cls, name, dflt, min, max,
- parent, QString(cls + "/" + name).ascii(), rst, pg );
+ tqparent, TQString(cls + "/" + name).ascii(), rst, pg );
registerObject( spinBox->extension() );
return spinBox;
}
-KonfiguratorEditBox* KonfiguratorPage::createEditBox( QString cls, QString name,
- QString dflt, QWidget *parent, bool rst, int pg )
+KonfiguratorEditBox* KonfiguratorPage::createEditBox( TQString cls, TQString name,
+ TQString dflt, TQWidget *tqparent, bool rst, int pg )
{
- KonfiguratorEditBox *editBox = new KonfiguratorEditBox( cls, name, dflt, parent,
- QString(cls + "/" + name).ascii(), rst, pg );
+ KonfiguratorEditBox *editBox = new KonfiguratorEditBox( cls, name, dflt, tqparent,
+ TQString(cls + "/" + name).ascii(), rst, pg );
registerObject( editBox->extension() );
return editBox;
}
-KonfiguratorListBox* KonfiguratorPage::createListBox( QString cls, QString name,
- QStringList dflt, QWidget *parent, bool rst, int pg )
+KonfiguratorListBox* KonfiguratorPage::createListBox( TQString cls, TQString name,
+ TQStringList dflt, TQWidget *tqparent, bool rst, int pg )
{
- KonfiguratorListBox *listBox = new KonfiguratorListBox( cls, name, dflt, parent,
- QString(cls + "/" + name).ascii(), rst, pg );
+ KonfiguratorListBox *listBox = new KonfiguratorListBox( cls, name, dflt, tqparent,
+ TQString(cls + "/" + name).ascii(), rst, pg );
registerObject( listBox->extension() );
return listBox;
}
-KonfiguratorURLRequester* KonfiguratorPage::createURLRequester( QString cls, QString name,
- QString dflt, QWidget *parent, bool rst, int pg )
+KonfiguratorURLRequester* KonfiguratorPage::createURLRequester( TQString cls, TQString name,
+ TQString dflt, TQWidget *tqparent, bool rst, int pg )
{
KonfiguratorURLRequester *urlRequester = new KonfiguratorURLRequester( cls, name, dflt,
- parent, QString(cls + "/" + name).ascii(), rst, pg );
+ tqparent, TQString(cls + "/" + name).ascii(), rst, pg );
registerObject( urlRequester->extension() );
return urlRequester;
}
-QGroupBox* KonfiguratorPage::createFrame( QString text, QWidget *parent,
+TQGroupBox* KonfiguratorPage::createFrame( TQString text, TQWidget *tqparent,
const char *widgetName )
{
- QGroupBox *groupBox = new QGroupBox( parent, widgetName );
- groupBox->setFrameShape( QGroupBox::Box );
- groupBox->setFrameShadow( QGroupBox::Sunken );
+ TQGroupBox *groupBox = new TQGroupBox( tqparent, widgetName );
+ groupBox->setFrameShape( TQGroupBox::Box );
+ groupBox->setFrameShadow( TQGroupBox::Sunken );
if( !text.isNull() )
groupBox->setTitle( text );
groupBox->setColumnLayout(0, Qt::Vertical );
- groupBox->layout()->setSpacing( 0 );
- groupBox->layout()->setMargin( 0 );
+ groupBox->tqlayout()->setSpacing( 0 );
+ groupBox->tqlayout()->setMargin( 0 );
return groupBox;
}
-QGridLayout* KonfiguratorPage::createGridLayout( QLayout *parent )
+TQGridLayout* KonfiguratorPage::createGridLayout( TQLayout *tqparent )
{
- QGridLayout *gridLayout = new QGridLayout( parent );
- gridLayout->setAlignment( Qt::AlignTop );
+ TQGridLayout *gridLayout = new TQGridLayout( tqparent );
+ gridLayout->tqsetAlignment( TQt::AlignTop );
gridLayout->setSpacing( 6 );
gridLayout->setMargin( 11 );
return gridLayout;
}
-QLabel* KonfiguratorPage::addLabel( QGridLayout *layout, int x, int y, QString label,
- QWidget *parent, const char *widgetName )
+TQLabel* KonfiguratorPage::addLabel( TQGridLayout *tqlayout, int x, int y, TQString label,
+ TQWidget *tqparent, const char *widgetName )
{
- QLabel *lbl = new QLabel( label, parent, widgetName );
- layout->addWidget( lbl, x, y );
+ TQLabel *lbl = new TQLabel( label, tqparent, widgetName );
+ tqlayout->addWidget( lbl, x, y );
return lbl;
}
-QWidget* KonfiguratorPage::createSpacer( QWidget *parent, const char *widgetName )
+TQWidget* KonfiguratorPage::createSpacer( TQWidget *tqparent, const char *widgetName )
{
- QWidget *widget = new QWidget( parent, widgetName );
- QHBoxLayout *hboxlayout = new QHBoxLayout( widget );
- QSpacerItem* spacer = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- hboxlayout->addItem( spacer );
+ TQWidget *widget = new TQWidget( tqparent, widgetName );
+ TQHBoxLayout *hboxtqlayout = new TQHBoxLayout( widget );
+ TQSpacerItem* spacer = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ hboxtqlayout->addItem( spacer );
return widget;
}
KonfiguratorCheckBoxGroup* KonfiguratorPage::createCheckBoxGroup( int sizex, int sizey,
- KONFIGURATOR_CHECKBOX_PARAM *params, int paramNum, QWidget *parent,
+ KONFIGURATOR_CHECKBOX_PARAM *params, int paramNum, TQWidget *tqparent,
const char *widgetName, int pg )
{
- KonfiguratorCheckBoxGroup *groupWidget = new KonfiguratorCheckBoxGroup( parent, widgetName );
- QGridLayout *layout = new QGridLayout( groupWidget );
- layout->setSpacing( 6 );
- layout->setMargin( 0 );
+ KonfiguratorCheckBoxGroup *groupWidget = new KonfiguratorCheckBoxGroup( tqparent, widgetName );
+ TQGridLayout *tqlayout = new TQGridLayout( groupWidget );
+ tqlayout->setSpacing( 6 );
+ tqlayout->setMargin( 0 );
int x = 0, y = 0;
@@ -205,7 +205,7 @@ KonfiguratorCheckBoxGroup* KonfiguratorPage::createCheckBoxGroup( int sizex, int
params[i].restart, params[i].toolTip, pg );
groupWidget->add( checkBox );
- layout->addWidget( checkBox, y, x );
+ tqlayout->addWidget( checkBox, y, x );
if( sizex )
{
@@ -222,34 +222,34 @@ KonfiguratorCheckBoxGroup* KonfiguratorPage::createCheckBoxGroup( int sizex, int
return groupWidget;
}
-KonfiguratorRadioButtons* KonfiguratorPage::createRadioButtonGroup( QString cls,
- QString name, QString dflt, int sizex, int sizey, KONFIGURATOR_NAME_VALUE_TIP *params,
- int paramNum, QWidget *parent, const char *widgetName, bool rst, int pg )
+KonfiguratorRadioButtons* KonfiguratorPage::createRadioButtonGroup( TQString cls,
+ TQString name, TQString dflt, int sizex, int sizey, KONFIGURATOR_NAME_VALUE_TIP *params,
+ int paramNum, TQWidget *tqparent, const char *widgetName, bool rst, int pg )
{
- KonfiguratorRadioButtons *radioWidget = new KonfiguratorRadioButtons( cls, name, dflt, parent, widgetName, rst, pg );
- radioWidget->setFrameShape( QButtonGroup::NoFrame );
- radioWidget->setFrameShadow( QButtonGroup::Sunken );
+ KonfiguratorRadioButtons *radioWidget = new KonfiguratorRadioButtons( cls, name, dflt, tqparent, widgetName, rst, pg );
+ radioWidget->setFrameShape( TQButtonGroup::NoFrame );
+ radioWidget->setFrameShadow( TQButtonGroup::Sunken );
radioWidget->setTitle( "" );
radioWidget->setExclusive( true );
radioWidget->setRadioButtonExclusive( true );
radioWidget->setColumnLayout(0, Qt::Vertical );
- QGridLayout *layout = new QGridLayout( radioWidget->layout() );
- layout->setAlignment( Qt::AlignTop );
- layout->setSpacing( 6 );
- layout->setMargin( 0 );
+ TQGridLayout *tqlayout = new TQGridLayout( radioWidget->tqlayout() );
+ tqlayout->tqsetAlignment( TQt::AlignTop );
+ tqlayout->setSpacing( 6 );
+ tqlayout->setMargin( 0 );
int x = 0, y = 0;
for( int i=0; i != paramNum; i++ )
{
- QRadioButton *radBtn = new QRadioButton( params[i].text, radioWidget,
- QString( cls + "/" + name + "/" + params[i].value ).ascii() );
+ TQRadioButton *radBtn = new TQRadioButton( params[i].text, radioWidget,
+ TQString( cls + "/" + name + "/" + params[i].value ).ascii() );
if( !params[i].tooltip.isEmpty() )
- QWhatsThis::add( radBtn, params[i].tooltip );
+ TQWhatsThis::add( radBtn, params[i].tooltip );
- layout->addWidget( radBtn, y, x );
+ tqlayout->addWidget( radBtn, y, x );
radioWidget->addRadioButton( radBtn, params[i].text, params[i].value );
@@ -270,31 +270,31 @@ KonfiguratorRadioButtons* KonfiguratorPage::createRadioButtonGroup( QString cls,
return radioWidget;
}
-KonfiguratorFontChooser *KonfiguratorPage::createFontChooser( QString cls, QString name,
- QFont *dflt, QWidget *parent, bool rst, int pg )
+KonfiguratorFontChooser *KonfiguratorPage::createFontChooser( TQString cls, TQString name,
+ TQFont *dflt, TQWidget *tqparent, bool rst, int pg )
{
- KonfiguratorFontChooser *fontChooser = new KonfiguratorFontChooser( cls, name, dflt, parent,
- QString(cls + "/" + name).ascii(), rst, pg );
+ KonfiguratorFontChooser *fontChooser = new KonfiguratorFontChooser( cls, name, dflt, tqparent,
+ TQString(cls + "/" + name).ascii(), rst, pg );
registerObject( fontChooser->extension() );
return fontChooser;
}
-KonfiguratorComboBox *KonfiguratorPage::createComboBox( QString cls, QString name, QString dflt,
- KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, QWidget *parent, bool rst, bool editable, int pg )
+KonfiguratorComboBox *KonfiguratorPage::createComboBox( TQString cls, TQString name, TQString dflt,
+ KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum, TQWidget *tqparent, bool rst, bool editable, int pg )
{
KonfiguratorComboBox *comboBox = new KonfiguratorComboBox( cls, name, dflt, params,
- paramNum, parent, QString(cls + "/" + name).ascii(),
+ paramNum, tqparent, TQString(cls + "/" + name).ascii(),
rst, editable, pg );
registerObject( comboBox->extension() );
return comboBox;
}
-QFrame* KonfiguratorPage::createLine( QWidget *parent, const char *widgetName, bool vertical )
+TQFrame* KonfiguratorPage::createLine( TQWidget *tqparent, const char *widgetName, bool vertical )
{
- QFrame *line = new QFrame( parent, widgetName );
- line->setFrameStyle( ( vertical ? QFrame::VLine : QFrame::HLine ) | QFrame::Sunken );
+ TQFrame *line = new TQFrame( tqparent, widgetName );
+ line->setFrameStyle( ( vertical ? TQFrame::VLine : TQFrame::HLine ) | TQFrame::Sunken );
return line;
}
@@ -303,9 +303,9 @@ void KonfiguratorPage::registerObject( KonfiguratorExtension *item )
KonfiguratorExtension *currentItem = itemList.current();
itemList.append( item );
- connect( item, SIGNAL( sigChanged( bool ) ), this, SIGNAL ( sigChanged( ) ) );
+ connect( item, TQT_SIGNAL( sigChanged( bool ) ), this, TQT_SIGNAL ( sigChanged( ) ) );
- itemList.find( currentItem );
+ itemList.tqfind( currentItem );
}
void KonfiguratorPage::removeObject( KonfiguratorExtension *item )
@@ -320,12 +320,12 @@ void KonfiguratorPage::removeObject( KonfiguratorExtension *item )
itemList.removeRef( item );
}
-KonfiguratorColorChooser *KonfiguratorPage::createColorChooser( QString cls, QString name, QColor dflt,
- QWidget *parent, bool rst,
+KonfiguratorColorChooser *KonfiguratorPage::createColorChooser( TQString cls, TQString name, TQColor dflt,
+ TQWidget *tqparent, bool rst,
ADDITIONAL_COLOR *addColPtr, int addColNum, int pg )
{
- KonfiguratorColorChooser *colorChooser = new KonfiguratorColorChooser( cls, name, dflt, parent,
- QString(cls + "/" + name).ascii(), rst, addColPtr, addColNum, pg );
+ KonfiguratorColorChooser *colorChooser = new KonfiguratorColorChooser( cls, name, dflt, tqparent,
+ TQString(cls + "/" + name).ascii(), rst, addColPtr, addColNum, pg );
registerObject( colorChooser->extension() );
return colorChooser;
diff --git a/krusader/Konfigurator/konfiguratorpage.h b/krusader/Konfigurator/konfiguratorpage.h
index 64a1b6b..9464f93 100644
--- a/krusader/Konfigurator/konfiguratorpage.h
+++ b/krusader/Konfigurator/konfiguratorpage.h
@@ -32,11 +32,11 @@
#define __KONFIGURATOR_PAGE_H__
#include "konfiguratoritems.h"
-#include <qframe.h>
-#include <qptrlist.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqframe.h>
+#include <tqptrlist.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
struct KONFIGURATOR_CHECKBOX_PARAM;
struct KONFIGURATOR_NAME_VALUE_TIP;
@@ -48,19 +48,20 @@ struct KONFIGURATOR_NAME_VALUE_PAIR;
*
* @short The base class of a page in Konfigurator
*/
-class KonfiguratorPage : public QFrame
+class KonfiguratorPage : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* The constructor of the KonfiguratorPage class.
*
* @param firstTime this parameter is true if it is the first call of Konfigurator
- * @param parent reference to the parent widget
+ * @param tqparent reference to the tqparent widget
* @param name name of the newly generated Konfigurator page widget
*/
- KonfiguratorPage( bool firstTime, QWidget* parent, const char* name );
+ KonfiguratorPage( bool firstTime, TQWidget* tqparent, const char* name );
/**
* Applies the changes in the Konfigurator page.
@@ -116,33 +117,33 @@ public:
/**
* Adds a new checkbox item to the page.
- * <br>The checkbox widget's name is QString(cls + "/" + name).ascii()<br>
+ * <br>The checkbox widget's name is TQString(cls + "/" + name).ascii()<br>
*
* Sample:<br><br>
- * KonfiguratorCheckBox *myCheckBox = createCheckBox( "class", "name", false, parentWidget );<br>
+ * KonfiguratorCheckBox *myCheckBox = createCheckBox( "class", "name", false, tqparentWidget );<br>
* myLayout->addWidget( myCheckBox, 0, 0 );
*
* @param cls The class name used in KConfig (ex. "Archives")
* @param name The item name used in KConfig (ex. "Do Tar")
* @param dflt The default value of the checkbox
* @param text The text field of the checkbox
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param rst The change of this parameter requires Krusader restart
* @param toolTip Tooltip used for this checkbox
* @param pg The subpage of a Konfigurator page (because of setDefaults)
*
* @return reference to the newly created checkbox
*/
- KonfiguratorCheckBox *createCheckBox( QString cls, QString name, bool dflt,
- QString text, QWidget *parent=0, bool rst=false,
- QString toolTip = QString::null, int pg=FIRST_PAGE );
+ KonfiguratorCheckBox *createCheckBox( TQString cls, TQString name, bool dflt,
+ TQString text, TQWidget *tqparent=0, bool rst=false,
+ TQString toolTip = TQString(), int pg=FIRST_PAGE );
/**
* Adds a new spinbox item to the page.
- * <br>The spinbox widget's name is QString(cls + "/" + name).ascii()<br>
+ * <br>The spinbox widget's name is TQString(cls + "/" + name).ascii()<br>
*
* Sample:<br><br>
- * KonfiguratorSpinBox *mySpinBox = createSpinBox( "class", "name", 10, 1, 100, parentWidget );<br>
+ * KonfiguratorSpinBox *mySpinBox = createSpinBox( "class", "name", 10, 1, 100, tqparentWidget );<br>
* myLayout->addWidget( mySpinBox, 0, 0 );
*
* @param cls The class name used in KConfig (ex. "Archives")
@@ -150,108 +151,108 @@ public:
* @param dflt The default value of the spinbox
* @param min The minimum value of the spinbox
* @param max The maximum value of the spinbox
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param rst The change of this parameter requires Krusader restart
* @param pg The subpage of a Konfigurator page (because of setDefaults)
*
* @return reference to the newly created spinbox
*/
- KonfiguratorSpinBox *createSpinBox( QString cls, QString name, int dflt, int min,
- int max, QWidget *parent = 0, bool rst = false, int pg=FIRST_PAGE );
+ KonfiguratorSpinBox *createSpinBox( TQString cls, TQString name, int dflt, int min,
+ int max, TQWidget *tqparent = 0, bool rst = false, int pg=FIRST_PAGE );
/**
* Adds a new editbox item to the page.
- * <br>The editbox widget's name is QString(cls + "/" + name).ascii()<br>
+ * <br>The editbox widget's name is TQString(cls + "/" + name).ascii()<br>
*
* Sample:<br><br>
- * KonfiguratorEditBox *myEditBox = createEditBox( "class", "name", "default", parentWidget );<br>
+ * KonfiguratorEditBox *myEditBox = createEditBox( "class", "name", "default", tqparentWidget );<br>
* myLayout->addWidget( myEditBox, 0, 0 );
*
* @param cls The class name used in KConfig (ex. "Archives")
* @param name The itemname used in KConfig (ex. "Do Tar")
* @param dflt The default value of the editbox
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param rst The change of this parameter requires Krusader restart
* @param pg The subpage of a Konfigurator page (because of setDefaults)
*
* @return reference to the newly created editbox
*/
- KonfiguratorEditBox *createEditBox( QString cls, QString name, QString dflt,
- QWidget *parent=0, bool rst=false, int pg=FIRST_PAGE );
+ KonfiguratorEditBox *createEditBox( TQString cls, TQString name, TQString dflt,
+ TQWidget *tqparent=0, bool rst=false, int pg=FIRST_PAGE );
/**
* Adds a new listbox item to the page.
- * <br>The listbox widget's name is QString(cls + "/" + name).ascii()<br>
+ * <br>The listbox widget's name is TQString(cls + "/" + name).ascii()<br>
*
* Sample:<br><br>
- * QStringList valueList;<br>
+ * TQStringList valueList;<br>
* valueList += "item";<br>
- * KonfiguratorListBox *myListBox = createListBox( "class", "name", valueList, parentWidget );<br>
+ * KonfiguratorListBox *myListBox = createListBox( "class", "name", valueList, tqparentWidget );<br>
* myLayout->addWidget( myListBox, 0, 0 );
*
* @param cls The class name used in KConfig (ex. "Archives")
* @param name The itemname used in KConfig (ex. "Do Tar")
* @param dflt The default value of the listbox
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param rst The change of this parameter requires Krusader restart
* @param pg The subpage of a Konfigurator page (because of setDefaults)
*
* @return reference to the newly created editbox
*/
- KonfiguratorListBox *createListBox( QString cls, QString name, QStringList dflt,
- QWidget *parent=0, bool rst=false, int pg=FIRST_PAGE );
+ KonfiguratorListBox *createListBox( TQString cls, TQString name, TQStringList dflt,
+ TQWidget *tqparent=0, bool rst=false, int pg=FIRST_PAGE );
/**
* Adds a new URL requester item to the page.
- * <br>The URL requester widget's name is QString(cls + "/" + name).ascii()<br>
+ * <br>The URL requester widget's name is TQString(cls + "/" + name).ascii()<br>
*
* Sample:<br><br>
- * KonfiguratorURLRequester *myURLRequester = createURLRequester( "class", "name", "default", parentWidget );<br>
+ * KonfiguratorURLRequester *myURLRequester = createURLRequester( "class", "name", "default", tqparentWidget );<br>
* myLayout->addWidget( myURLRequester, 0, 0 );
*
* @param cls The class name used in KConfig (ex. "Archives")
* @param name The itemname used in KConfig (ex. "Do Tar")
* @param dflt The default value of the URL requester
* @param text The text field of the URL requester
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param rst The change of this parameter requires Krusader restart
* @param pg The subpage of a Konfigurator page (because of setDefaults)
*
* @return reference to the newly created URL requester
*/
- KonfiguratorURLRequester *createURLRequester( QString cls, QString name,
- QString dflt, QWidget *parent, bool rst, int pg=FIRST_PAGE );
+ KonfiguratorURLRequester *createURLRequester( TQString cls, TQString name,
+ TQString dflt, TQWidget *tqparent, bool rst, int pg=FIRST_PAGE );
/**
* Adds a new font chooser item to the page.
- * <br>The font chooser widget's name is QString(cls + "/" + name).ascii()<br>
+ * <br>The font chooser widget's name is TQString(cls + "/" + name).ascii()<br>
*
* Sample:<br><br>
- * KonfiguratorFontChooser *myFontChooser = createFontChooser( "class", "name", new QFont(), parentWidget );<br>
+ * KonfiguratorFontChooser *myFontChooser = createFontChooser( "class", "name", new TQFont(), tqparentWidget );<br>
* myLayout->addWidget( myFontChooser, 0, 0 );
*
* @param cls The class name used in KConfig (ex. "Archives")
* @param name The item name used in KConfig (ex. "Do Tar")
* @param dflt The default value of the font chooser
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param rst The change of this parameter requires Krusader restart
* @param pg The subpage of a Konfigurator page (because of setDefaults)
*
* @return reference to the newly created font chooser
*/
- KonfiguratorFontChooser *createFontChooser( QString cls, QString name, QFont *dflt,
- QWidget *parent=0, bool rst=false, int pg=FIRST_PAGE );
+ KonfiguratorFontChooser *createFontChooser( TQString cls, TQString name, TQFont *dflt,
+ TQWidget *tqparent=0, bool rst=false, int pg=FIRST_PAGE );
/**
* Adds a new combobox item to the page.
- * <br>The combobox widget's name is QString(cls + "/" + name).ascii()<br>
+ * <br>The combobox widget's name is TQString(cls + "/" + name).ascii()<br>
*
* Sample:<br><br>
* KONFIGURATOR_NAME_VALUE_PAIR comboInfo[] =<br>
* &nbsp;{{ i18n( "combo text1" ), "value1" },<br>
* &nbsp;&nbsp;{ i18n( "combo text2" ), "value2" },<br>
* &nbsp;&nbsp;{ i18n( "combo text3" ), "value3" }};<br><br>
- * KonfiguratorComboBox *myComboBox = createComboBox( "class", "name", "value2", comboInfo, 3, parentWidget );<br>
+ * KonfiguratorComboBox *myComboBox = createComboBox( "class", "name", "value2", comboInfo, 3, tqparentWidget );<br>
* myLayout->addWidget( myComboBox, 0, 0 );
*
* @param cls The class name used in KConfig (ex. "Archives")
@@ -260,98 +261,98 @@ public:
* @param params Pointer to the name-value pair array (combo elements)
* @param paramNum Number of the combobox elements
* @param text The text field of the combobox
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param rst The change of this parameter requires Krusader restart
* @param editable Flag indicates that the combo can be edited
* @param pg The subpage of a Konfigurator page (because of setDefaults)
*
* @return reference to the newly created combobox
*/
- KonfiguratorComboBox *createComboBox( QString cls, QString name, QString dflt,
+ KonfiguratorComboBox *createComboBox( TQString cls, TQString name, TQString dflt,
KONFIGURATOR_NAME_VALUE_PAIR *params, int paramNum,
- QWidget *parent=0, bool rst=false, bool editable=false, int pg=FIRST_PAGE );
+ TQWidget *tqparent=0, bool rst=false, bool editable=false, int pg=FIRST_PAGE );
/**
* Creates a frame on the page.
*
* Sample:<br><br>
- * QGroupBox *myGroup = createFrame( i18n( "MyFrameName" ), parentWidget, "frameName" );<br>
+ * TQGroupBox *myGroup = createFrame( i18n( "MyFrameName" ), tqparentWidget, "frameName" );<br>
* myLayout->addWidget( myGroup, 0, 0 );
*
* @param text The text written out onto the frame
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param widgetName The name of the widget
*
* @return reference to the newly created frame
*/
- QGroupBox *createFrame( QString text = QString::null, QWidget *parent=0,
+ TQGroupBox *createFrame( TQString text = TQString(), TQWidget *tqparent=0,
const char *widgetName=0 );
/**
- * Creates a new QGridLayout element and sets its margins.
+ * Creates a new TQGridLayout element and sets its margins.
*
* Sample:<br><br>
- * QGroupBox *myGroup = createFrame( i18n( "MyFrameName" ), parentWidget, "frameName" );<br>
- * QGridLayout *myLayout = createGridLayout( myGroup->layout() );<br>
+ * TQGroupBox *myGroup = createFrame( i18n( "MyFrameName" ), tqparentWidget, "frameName" );<br>
+ * TQGridLayout *myLayout = createGridLayout( myGroup->tqlayout() );<br>
* myLayout->addWidget( myGroup, 0, 0 );
*
- * @param parent Reference to the parent layout
+ * @param tqparent Reference to the tqparent tqlayout
*
- * @return reference to the newly created QGridLayout
+ * @return reference to the newly created TQGridLayout
*/
- QGridLayout *createGridLayout( QLayout *parent );
+ TQGridLayout *createGridLayout( TQLayout *tqparent );
/**
- * Adds a new label to a grid layout.
+ * Adds a new label to a grid tqlayout.
*
* Sample:<br><br>
- * QGroupBox *myGroup = createFrame( i18n( "MyFrameName" ), parentWidget, "frameName" );<br>
- * QGridLayout *myLayout = createGridLayout( myGroup->layout() );<br>
+ * TQGroupBox *myGroup = createFrame( i18n( "MyFrameName" ), tqparentWidget, "frameName" );<br>
+ * TQGridLayout *myLayout = createGridLayout( myGroup->tqlayout() );<br>
* addLabel( myLayout, 0, 0, i18n( "Hello world!" ), myGroup, "myLabel" );<br>
* mainLayout->addWidget( myGroup, 0, 0 );
*
- * @param layout The grid layout on which the item will be placed
+ * @param tqlayout The grid tqlayout on which the item will be placed
* @param x the column to which the label will be placed
* @param y the row to which the label will be placed
* @param label the text of the label
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param widgetName The name of the newly generated label widget
*
* @return reference to the newly created label
*/
- QLabel *addLabel( QGridLayout *layout, int x, int y, QString label,
- QWidget *parent=0, const char *widgetName=0 );
+ TQLabel *addLabel( TQGridLayout *tqlayout, int x, int y, TQString label,
+ TQWidget *tqparent=0, const char *widgetName=0 );
/**
- * Creates a spacer object (for justifying in QHBox).
+ * Creates a spacer object (for justifying in TQHBox).
*
* Sample:<br><br>
- * QHBox *hbox = new QHBox( myParent, "hbox" );<br>
+ * TQHBox *hbox = new TQHBox( myParent, "hbox" );<br>
* createSpinBox( "class", "spin", 5, 1, 10, hbox );<br>
* createSpacer( hbox, "mySpacer" );<br>
* myLayout->addWidget( hbox, 0, 0 );
*
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param widgetName The name of the newly generated label widget
*
* @return reference to the newly created spacer widget
*/
- QWidget *createSpacer( QWidget *parent=0, const char *widgetName=0 );
+ TQWidget *createSpacer( TQWidget *tqparent=0, const char *widgetName=0 );
/**
* Creates a separator line.
*
* Sample:<br><br>
- * QFrame *myLine = createLine( myParent, "myLine" );<br>
+ * TQFrame *myLine = createLine( myParent, "myLine" );<br>
* myLayout->addWidget( myLine, 1, 0 );<br>
*
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param widgetName The name of the newly generated label widget
* @param vertical Means vertical line
*
* @return reference to the newly created spacer widget
*/
- QFrame *createLine( QWidget *parent=0, const char *widgetName=0, bool vertical = false );
+ TQFrame *createLine( TQWidget *tqparent=0, const char *widgetName=0, bool vertical = false );
/**
* Creates a checkbox group. A checkbox group contains a lot of checkboxes.
@@ -362,7 +363,7 @@ public:
* maximum row number in one column. <br>
*
* One specific element can be reached by its name or index with the find methods.
- * The first element is checkBoxGroup->find( 0 ), "myCb" element is checkBoxGroup->find( "myCb" ) ...
+ * The first element is checkBoxGroup->tqfind( 0 ), "myCb" element is checkBoxGroup->tqfind( "myCb" ) ...
*
* Sample:<br><br>
* KONFIGURATOR_CHECKBOX_PARAM myCBArray[] =<br>
@@ -370,14 +371,14 @@ public:
* &nbsp;&nbsp;{"CbClass","CbName2", true, i18n( "name2" ), false, "tooltip2"},<br>
* &nbsp;&nbsp;{"CbClass","CbName3", true, i18n( "name3" ), false, "tooltip3"}};<br><br>
* KonfiguratorCheckBoxGroup *myCheckBoxGroup = createCheckBoxGroup( 1, 0, myCBArray, 3, myParent, "myCheckboxGroup" );<br>
- * myCheckBoxGroup->find( 0 )->setEnabled( false );<br><br>
+ * myCheckBoxGroup->tqfind( 0 )->setEnabled( false );<br><br>
* myLayout->addWidget( myCheckBoxGroup, 0, 0 );<br>
*
* @param sizex the maximum column number at horizontal placing
* @param sizey the maximum row number at vertical placing
* @param params pointer to the checkbox array
* @param paramNum number of the checkbox elements
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param widgetName The name of the newly created checkbox group widget
* @param pg The subpage of a Konfigurator page (because of setDefaults)
*
@@ -385,7 +386,7 @@ public:
*/
KonfiguratorCheckBoxGroup *createCheckBoxGroup( int sizex, int sizey,
KONFIGURATOR_CHECKBOX_PARAM *params, int paramNum,
- QWidget *parent=0, const char *widgetName=0, int pg=FIRST_PAGE );
+ TQWidget *tqparent=0, const char *widgetName=0, int pg=FIRST_PAGE );
/**
* Creates a radio button group. A radio button group contains a lot of radio buttons.
* The grouped buttons are embedded into one widget, which can be placed anywhere
@@ -395,7 +396,7 @@ public:
* maximum row number in one column.<br>
*
* The references of the buttons can be accessed by the find methods of KonfiguratorRadioButtons.
- * The first element is myRadioGrp->find( 0 ), "myRadio" element is myRadioGrp->find( "myRadio" ) ...
+ * The first element is myRadioGrp->tqfind( 0 ), "myRadio" element is myRadioGrp->tqfind( "myRadio" ) ...
*
* Sample:<br><br>
* KONFIGURATOR_NAME_VALUE_TIP radioInfo[] =<br>
@@ -403,7 +404,7 @@ public:
* &nbsp;&nbsp;{ i18n( "radio text2" ), "value2", i18n( "tooltip2" ) },<br>
* &nbsp;&nbsp;{ i18n( "radio text3" ), "value3", i18n( "tooltip3" ) }};<br><br>
* KonfiguratorRadioButtons *myRadioGroup = createRadioButtonGroup( "class", "name", "value1", 1, 0, radioInfo, 3, myParent, "myRadioGroup" );<br>
- * myRadioGroup->find( i18n( "radio text1" ) )->setEnabled( false );<br>
+ * myRadioGroup->tqfind( i18n( "radio text1" ) )->setEnabled( false );<br>
* myLayout->addWidget( myRadioGroup, 0, 0 );<br>
*
* @param cls The class name used in KConfig (ex. "Archives")
@@ -413,17 +414,17 @@ public:
* @param sizey the maximum row number at vertical placing
* @param params pointer to the checkbox array
* @param paramNum number of the checkbox elements
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param widgetName The name of the newly created button group widget
* @param rst The change of this parameter requires Krusader restart
* @param pg The subpage of a Konfigurator page (because of setDefaults)
*
* @return reference to the newly created radio button group widget
*/
- KonfiguratorRadioButtons *createRadioButtonGroup( QString cls, QString name,
- QString dflt, int sizex, int sizey,
+ KonfiguratorRadioButtons *createRadioButtonGroup( TQString cls, TQString name,
+ TQString dflt, int sizex, int sizey,
KONFIGURATOR_NAME_VALUE_TIP *params, int paramNum,
- QWidget *parent=0, const char *widgetName=0, bool rst=false, int pg=FIRST_PAGE );
+ TQWidget *tqparent=0, const char *widgetName=0, bool rst=false, int pg=FIRST_PAGE );
/**
* This function is used to insert new, unknown items into KonfiguratorPage. The
@@ -440,7 +441,7 @@ public:
* This function is used to remove elements from KonfiguratorPage.
*
* Sample:<br><br>
- * KonfiguratorEditBox *myEditBox = createEditBox( "class", "name", "default", parentWidget );<br>
+ * KonfiguratorEditBox *myEditBox = createEditBox( "class", "name", "default", tqparentWidget );<br>
* myLayout->addWidget( myEditBox, 0, 0 );<br>
* removeObject( myEditBox->extension() );
*
@@ -453,16 +454,16 @@ public:
/**
* Adds a new color chooser combobox item to the page.
- * <br>The chooser's widget's name is QString(cls + "/" + name).ascii()<br>
+ * <br>The chooser's widget's name is TQString(cls + "/" + name).ascii()<br>
*
* Sample:<br><br>
- * KonfiguratorColorChooser *myColorChooser = createColorChooser( "class", "name", QColor( 255, 0, 255 ), parentWidget );<br>
+ * KonfiguratorColorChooser *myColorChooser = createColorChooser( "class", "name", TQColor( 255, 0, 255 ), tqparentWidget );<br>
* myLayout->addWidget( myColorChooser, 0, 0 );
*
* @param cls The class name used in KConfig (ex. "Archives")
* @param name The item name used in KConfig (ex. "Do Tar")
* @param dflt The default value of the color chooser
- * @param parent Reference to the parent widget
+ * @param tqparent Reference to the tqparent widget
* @param rst The change of this parameter requires Krusader restart
* @param addColPtr The additional color values
* @param rst Number of additional colors
@@ -470,8 +471,8 @@ public:
*
* @return reference to the newly created combobox
*/
- KonfiguratorColorChooser *createColorChooser( QString cls, QString name, QColor dflt,
- QWidget *parent=0, bool rst=false,
+ KonfiguratorColorChooser *createColorChooser( TQString cls, TQString name, TQColor dflt,
+ TQWidget *tqparent=0, bool rst=false,
ADDITIONAL_COLOR *addColPtr = 0, int addColNum = 0, int pg=FIRST_PAGE );
signals:
/**
@@ -481,14 +482,14 @@ signals:
void sigChanged();
protected:
- QPtrList<KonfiguratorExtension> itemList;
+ TQPtrList<KonfiguratorExtension> itemList;
private:
bool firstCall;
};
/**
- * KONFIGURATOR_CHECKBOX_PARAM is the basic item of checkbox arrays. It contains
+ * KONFIGURATOR_CHECKBOX_PARAM is the basic item of checkbox arrays. It tqcontains
* every information related to a checkbox.
*/
struct KONFIGURATOR_CHECKBOX_PARAM
@@ -496,11 +497,11 @@ struct KONFIGURATOR_CHECKBOX_PARAM
/**
* The class used in KConfig (ex. "Archives")
*/
- QString configClass;
+ TQString configClass;
/**
* The item name used in KConfig (ex. "Do Tar")
*/
- QString configName;
+ TQString configName;
/**
* The default value of the checkbox
*/
@@ -508,7 +509,7 @@ struct KONFIGURATOR_CHECKBOX_PARAM
/**
* The text field of the checkbox
*/
- QString text;
+ TQString text;
/**
* The change of this parameter requires Krusader restart
*/
@@ -516,7 +517,7 @@ struct KONFIGURATOR_CHECKBOX_PARAM
/**
* The checkbox's tooltip
*/
- QString toolTip;
+ TQString toolTip;
};
#endif /* __KONFIGURATOR_PAGE_H__ */
diff --git a/krusader/Konfigurator/krresulttable.cpp b/krusader/Konfigurator/krresulttable.cpp
index 3e18e2c..50d85f7 100644
--- a/krusader/Konfigurator/krresulttable.cpp
+++ b/krusader/Konfigurator/krresulttable.cpp
@@ -32,10 +32,10 @@
#include <iostream>
using namespace std;
-#define PS(x) _supported.contains(x)>0
+#define PS(x) _supported.tqcontains(x)>0
-KrResultTable::KrResultTable(QWidget* parent)
- : QWidget(parent),
+KrResultTable::KrResultTable(TQWidget* tqparent)
+ : TQWidget(tqparent),
_numRows(1)
{
}
@@ -45,21 +45,21 @@ KrResultTable::~KrResultTable()
}
-QGridLayout* KrResultTable::initTable()
+TQGridLayout* KrResultTable::initTable()
{
- _grid = new QGridLayout(this, _numRows, _numColumns);
+ _grid = new TQGridLayout(this, _numRows, _numColumns);
_grid->setColStretch(_numColumns-1, 1); // stretch last column
// +++ Build and add table header +++
int column = 0;
- for( QStringList::Iterator it=_tableHeaders.begin(); it!=_tableHeaders.end(); ++it )
+ for( TQStringList::Iterator it=_tableHeaders.begin(); it!=_tableHeaders.end(); ++it )
{
- _label = new QLabel(*it, this);
+ _label = new TQLabel(*it, this);
_label->setMargin(5);
_grid->addWidget(_label, 0, column);
// Set font
- QFont defFont = KGlobalSettings::generalFont();
+ TQFont defFont = KGlobalSettings::generalFont();
defFont.setPointSize(defFont.pointSize()-1);
defFont.setBold(true);
_label->setFont(defFont);
@@ -71,16 +71,16 @@ QGridLayout* KrResultTable::initTable()
}
-void KrResultTable::adjustRow(QGridLayout* grid)
+void KrResultTable::adjustRow(TQGridLayout* grid)
{
- QLayoutIterator it = grid->iterator();
- QLayoutItem *child;
+ TQLayoutIterator it = grid->iterator();
+ TQLayoutItem *child;
int col = 0;
while( (child = it.current()) != 0 )
{
// Add some space between columns
- child->widget()->setMinimumWidth( child->widget()->sizeHint().width() + 15 );
+ child->widget()->setMinimumWidth( child->widget()->tqsizeHint().width() + 15 );
// Paint uneven rows in alternate color
if( ((col/_numColumns)%2) )
@@ -94,8 +94,8 @@ void KrResultTable::adjustRow(QGridLayout* grid)
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
-KrArchiverResultTable::KrArchiverResultTable(QWidget* parent)
- : KrResultTable(parent)
+KrArchiverResultTable::KrArchiverResultTable(TQWidget* tqparent)
+ : KrResultTable(tqparent)
{
_supported = KRarcHandler::supportedPackers(); // get list of available packers
@@ -171,27 +171,27 @@ KrArchiverResultTable::~KrArchiverResultTable()
}
-bool KrArchiverResultTable::addRow(SearchObject* search, QGridLayout* grid)
+bool KrArchiverResultTable::addRow(SearchObject* search, TQGridLayout* grid)
{
Archiver* arch = dynamic_cast<Archiver*>(search);
// Name column
_label = new KURLLabel(arch->getWebsite(), arch->getSearchName(), this);
_label->setMargin(5);
- _label->setAlignment(Qt::AlignTop);
+ _label->tqsetAlignment(TQt::AlignTop);
grid->addWidget(_label, _numRows, 0);
- connect(_label, SIGNAL(leftClickedURL(const QString&)),
- SLOT(website(const QString&)));
+ connect(_label, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ TQT_SLOT(website(const TQString&)));
// Found column
- _label = new QLabel( arch->getPath(), this );
+ _label = new TQLabel( arch->getPath(), this );
_label->setMargin(5);
grid->addWidget(_label, _numRows, 1);
// Packing column
- _label = new QLabel(this);
+ _label = new TQLabel(this);
_label->setMargin(5);
- _label->setAlignment( Qt::AlignTop );
+ _label->tqsetAlignment( TQt::AlignTop );
if( arch->getIsPacker() && arch->getFound() ) {
_label->setText( i18n("enabled") );
_label->setPaletteForegroundColor("darkgreen");
@@ -203,9 +203,9 @@ bool KrArchiverResultTable::addRow(SearchObject* search, QGridLayout* grid)
grid->addWidget(_label, _numRows, 2);
// Unpacking column
- _label = new QLabel(this);
+ _label = new TQLabel(this);
_label->setMargin(5);
- _label->setAlignment( Qt::AlignTop );
+ _label->tqsetAlignment( TQt::AlignTop );
if( arch->getIsUnpacker() && arch->getFound() ) {
_label->setText( i18n("enabled") );
_label->setPaletteForegroundColor("darkgreen");
@@ -217,9 +217,9 @@ bool KrArchiverResultTable::addRow(SearchObject* search, QGridLayout* grid)
grid->addWidget(_label, _numRows, 3);
// Note column
- _label = new QLabel(arch->getNote(), this);
+ _label = new TQLabel(arch->getNote(), this);
_label->setMargin(5);
- _label->setAlignment( Qt::AlignTop | Qt::WordBreak ); // wrap words
+ _label->tqsetAlignment( TQt::AlignTop | TQt::WordBreak ); // wrap words
grid->addWidget(_label, _numRows, 4);
// Apply shared design elements
@@ -233,7 +233,7 @@ bool KrArchiverResultTable::addRow(SearchObject* search, QGridLayout* grid)
}
-void KrArchiverResultTable::website(const QString& url)
+void KrArchiverResultTable::website(const TQString& url)
{
(void) new KRun(url);
}
@@ -241,12 +241,12 @@ void KrArchiverResultTable::website(const QString& url)
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
-KrToolResultTable::KrToolResultTable(QWidget* parent)
- : KrResultTable(parent)
+KrToolResultTable::KrToolResultTable(TQWidget* tqparent)
+ : KrResultTable(tqparent)
{
_supported = Krusader::supportedTools(); // get list of available tools
- QValueVector<Application*> vecDiff, vecMail, vecRename, vecChecksum;
+ TQValueVector<Application*> vecDiff, vecMail, vecRename, vecChecksum;
Application* kdiff3 = new Application("kdiff3", "http://kdiff3.sourceforge.net/", KrServices::cmdExist("kdiff3"));
Application* kompare = new Application("kompare", "http://www.caffeinated.me.uk/kompare/", KrServices::cmdExist("kompare"));
Application* xxdiff = new Application("xxdiff", "http://xxdiff.sourceforge.net/", KrServices::cmdExist("xxdiff"));
@@ -281,7 +281,7 @@ KrToolResultTable::KrToolResultTable(QWidget* parent)
_tableHeaders.append( i18n("Group") );
_tableHeaders.append( i18n("Tool") );
_tableHeaders.append( i18n("Found") );
- _tableHeaders.append( i18n("Status") );
+ _tableHeaders.append( i18n("tqStatus") );
_numColumns = _tableHeaders.size();
_grid = initTable();
@@ -315,43 +315,43 @@ KrToolResultTable::~KrToolResultTable()
}
-bool KrToolResultTable::addRow(SearchObject* search, QGridLayout* grid)
+bool KrToolResultTable::addRow(SearchObject* search, TQGridLayout* grid)
{
ApplicationGroup* appGroup = dynamic_cast<ApplicationGroup*>(search);
- QValueVector<Application*> _apps = appGroup->getAppVec();
+ TQValueVector<Application*> _apps = appGroup->getAppVec();
// Name column
- _label = new QLabel(appGroup->getSearchName(), this);
+ _label = new TQLabel(appGroup->getSearchName(), this);
_label->setMargin(5);
- _label->setAlignment( Qt::AlignTop );
+ _label->tqsetAlignment( TQt::AlignTop );
grid->addWidget(_label, _numRows, 0);
// Tool column
- QVBox* toolBox = new QVBox(this);
- for( QValueVector<Application*>::Iterator it=_apps.begin(); it!=_apps.end(); it++ )
+ TQVBox* toolBox = new TQVBox(this);
+ for( TQValueVector<Application*>::Iterator it=_apps.begin(); it!=_apps.end(); it++ )
{
KURLLabel* l = new KURLLabel( (*it)->getWebsite(), (*it)->getAppName(), toolBox);
- l->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+ l->tqsetAlignment(TQt::AlignLeft | TQt::AlignTop);
l->setMargin(5);
- connect(l, SIGNAL(leftClickedURL(const QString&)),
- SLOT(website(const QString&)));
+ connect(l, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ TQT_SLOT(website(const TQString&)));
}
grid->addWidget(toolBox, _numRows, 1);
// Found column
- QVBox* vbox = new QVBox(this);
- for( QValueVector<Application*>::Iterator it=_apps.begin(); it!=_apps.end(); it++ )
+ TQVBox* vbox = new TQVBox(this);
+ for( TQValueVector<Application*>::Iterator it=_apps.begin(); it!=_apps.end(); it++ )
{
- _label = new QLabel( (*it)->getPath(), vbox);
+ _label = new TQLabel( (*it)->getPath(), vbox);
_label->setMargin(5);
- _label->setAlignment( Qt::AlignTop );
+ _label->tqsetAlignment( TQt::AlignTop );
}
grid->addWidget(vbox, _numRows, 2);
- // Status column
- _label = new QLabel(this);
+ // tqStatus column
+ _label = new TQLabel(this);
_label->setMargin(5);
- _label->setAlignment( Qt::AlignTop );
+ _label->tqsetAlignment( TQt::AlignTop );
if( appGroup->getFoundGroup() ) {
_label->setText( i18n("enabled") );
_label->setPaletteForegroundColor("darkgreen");
@@ -371,7 +371,7 @@ bool KrToolResultTable::addRow(SearchObject* search, QGridLayout* grid)
return true;
}
-void KrToolResultTable::website(const QString& url)
+void KrToolResultTable::website(const TQString& url)
{
(void) new KRun(url);
}
diff --git a/krusader/Konfigurator/krresulttable.h b/krusader/Konfigurator/krresulttable.h
index 8cdfbfd..c149a67 100644
--- a/krusader/Konfigurator/krresulttable.h
+++ b/krusader/Konfigurator/krresulttable.h
@@ -31,14 +31,14 @@
#ifndef KRRESULTTABLE_H
#define KRRESULTTABLE_H
-#include <qstring.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qgrid.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqgrid.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
#include <kiconloader.h>
#include <kglobalsettings.h>
@@ -56,47 +56,47 @@
/**
@author Dirk Eschler <deschler@users.sourceforge.net>
*/
-class KrResultTable : public QWidget
+class KrResultTable : public TQWidget
{
public:
- KrResultTable(QWidget* parent);
+ KrResultTable(TQWidget* tqparent);
virtual ~KrResultTable();
/**
- * Adds a row of search results to the end of a QGridLayout
+ * Adds a row of search results to the end of a TQGridLayout
* Each KrResultTable has to implement it
*
* @param const SearchObject* search Name of the SearchObject
- * @param const QGridLayout* grid The GridLayout where the row is inserted
+ * @param const TQGridLayout* grid The GridLayout where the row is inserted
*
* @return bool True if row was added successfully to rows, else false
*/
- virtual bool addRow(SearchObject* search, QGridLayout* grid) = 0;
+ virtual bool addRow(SearchObject* search, TQGridLayout* grid) = 0;
protected:
- QStringList _supported;
- QStringList _tableHeaders;
+ TQStringList _supported;
+ TQStringList _tableHeaders;
int _numColumns;
int _numRows;
- QGridLayout* _grid;
- QHBox* _iconBox;
- QLabel* _label; // generic label
+ TQGridLayout* _grid;
+ TQHBox* _iconBox;
+ TQLabel* _label; // generic label
/**
- * Creates the main grid layout and attaches the table header
+ * Creates the main grid tqlayout and attaches the table header
*
- * @return bool Pointer to the main grid layout
+ * @return bool Pointer to the main grid tqlayout
*/
- QGridLayout* initTable();
+ TQGridLayout* initTable();
/**
- * Applies settings to each cell of the grid layout
+ * Applies settings to each cell of the grid tqlayout
* Supposed to be run after a row was added
*
- * @param const QGridLayout* grid The GridLayout
+ * @param const TQGridLayout* grid The GridLayout
*/
- void adjustRow(QGridLayout* grid);
+ void adjustRow(TQGridLayout* grid);
};
// -----------------------------------------------------------------------------
@@ -105,17 +105,18 @@ protected:
class KrArchiverResultTable : public KrResultTable
{
Q_OBJECT
+ TQ_OBJECT
public:
- KrArchiverResultTable(QWidget* parent);
+ KrArchiverResultTable(TQWidget* tqparent);
virtual ~KrArchiverResultTable();
- bool addRow(SearchObject* search, QGridLayout* grid);
+ bool addRow(SearchObject* search, TQGridLayout* grid);
protected:
KURLLabel* _nameLabel;
protected slots:
- void website(const QString&);
+ void website(const TQString&);
};
// -----------------------------------------------------------------------------
@@ -124,17 +125,18 @@ protected slots:
class KrToolResultTable : public KrResultTable
{
Q_OBJECT
+ TQ_OBJECT
public:
- KrToolResultTable(QWidget* parent);
+ KrToolResultTable(TQWidget* tqparent);
virtual ~KrToolResultTable();
- bool addRow(SearchObject* search, QGridLayout* grid);
+ bool addRow(SearchObject* search, TQGridLayout* grid);
protected:
- QValueVector<Application*> _apps;
+ TQValueVector<Application*> _apps;
protected slots:
- void website(const QString&);
+ void website(const TQString&);
};
#endif
diff --git a/krusader/Konfigurator/krresulttabledialog.cpp b/krusader/Konfigurator/krresulttabledialog.cpp
index 622de83..f118ce7 100644
--- a/krusader/Konfigurator/krresulttabledialog.cpp
+++ b/krusader/Konfigurator/krresulttabledialog.cpp
@@ -30,35 +30,35 @@
#include "krresulttabledialog.h"
-KrResultTableDialog::KrResultTableDialog( QWidget *parent, DialogType type,
- const QString& caption, const QString& heading, const QString& headerIcon,
- const QString& hint)
- : KDialogBase( parent, "KrSearchResultDialog", true, caption, KDialogBase::Help|KDialogBase::Ok,
+KrResultTableDialog::KrResultTableDialog( TQWidget *tqparent, DialogType type,
+ const TQString& caption, const TQString& heading, const TQString& headerIcon,
+ const TQString& hint)
+ : KDialogBase( tqparent, "KrSearchResultDialog", true, caption, KDialogBase::Help|KDialogBase::Ok,
KDialogBase::Ok, false )
{
- _page = new QWidget(this);
+ _page = new TQWidget(this);
setMainWidget(_page);
- _topLayout = new QVBoxLayout(_page, 0, spacingHint());
- _topLayout->setAlignment( Qt::AlignTop );
+ _topLayout = new TQVBoxLayout(_page, 0, spacingHint());
+ _topLayout->tqsetAlignment( TQt::AlignTop );
// +++ Heading +++
// prepare the icon
- _iconBox = new QHBox(_page, "_iconBox");
- _iconLabel = new QLabel(_iconBox, "iconLabel");
+ _iconBox = new TQHBox(_page, "_iconBox");
+ _iconLabel = new TQLabel(_iconBox, "iconLabel");
_iconLabel->setPixmap(krLoader->loadIcon(headerIcon, KIcon::Desktop, 32));
_iconLabel->setMinimumWidth(fontMetrics().maxWidth()*20);
- _iconLabel->setAlignment( Qt::AlignLeft | Qt::AlignVCenter );
- _iconLabel->setFixedSize( _iconLabel->sizeHint() );
- _headingLabel = new QLabel(heading, _iconBox);
- QFont defFont = KGlobalSettings::generalFont();
+ _iconLabel->tqsetAlignment( TQt::AlignLeft | TQt::AlignVCenter );
+ _iconLabel->setFixedSize( _iconLabel->tqsizeHint() );
+ _headingLabel = new TQLabel(heading, _iconBox);
+ TQFont defFont = KGlobalSettings::generalFont();
defFont.setBold(true);
_headingLabel->setFont(defFont);
_headingLabel->setIndent(10);
_topLayout->addWidget(_iconBox);
// +++ Add some space between heading and table +++
- QSpacerItem* hSpacer1 = new QSpacerItem(0, 5);
+ TQSpacerItem* hSpacer1 = new TQSpacerItem(0, 5);
_topLayout->addItem(hSpacer1);
// +++ Table +++
@@ -77,19 +77,19 @@ KrResultTableDialog::KrResultTableDialog( QWidget *parent, DialogType type,
_topLayout->addWidget(_resultTable);
// +++ Separator +++
- KSeparator* hSep = new KSeparator(QFrame::HLine, _page);
+ KSeparator* hSep = new KSeparator(TQFrame::HLine, _page);
hSep->setMargin(5);
_topLayout->addWidget(hSep);
// +++ Hint +++
- if(hint != QString::null) {
- _hintLabel = new QLabel(hint, _page);
+ if(hint != TQString()) {
+ _hintLabel = new TQLabel(hint, _page);
_hintLabel->setIndent(5);
- _hintLabel->setAlignment(Qt::AlignRight);
+ _hintLabel->tqsetAlignment(TQt::AlignRight);
_topLayout->addWidget(_hintLabel);
}
- this->setFixedSize( this->sizeHint() ); // make non-resizeable
+ this->setFixedSize( this->tqsizeHint() ); // make non-resizeable
}
KrResultTableDialog::~KrResultTableDialog()
diff --git a/krusader/Konfigurator/krresulttabledialog.h b/krusader/Konfigurator/krresulttabledialog.h
index fe1b85a..1014282 100644
--- a/krusader/Konfigurator/krresulttabledialog.h
+++ b/krusader/Konfigurator/krresulttabledialog.h
@@ -31,12 +31,12 @@
#ifndef KRRESULTTABLEDIALOG_H
#define KRRESULTTABLEDIALOG_H
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
#include <kdialogbase.h>
#include <kiconloader.h>
@@ -60,24 +60,24 @@ public:
Tool = 2
};
- KrResultTableDialog(QWidget *parent, DialogType type, const QString& caption, const QString& heading, const QString& headerIcon=QString::null, const QString& hint=QString::null);
+ KrResultTableDialog(TQWidget *tqparent, DialogType type, const TQString& caption, const TQString& heading, const TQString& headerIcon=TQString(), const TQString& hint=TQString());
virtual ~KrResultTableDialog();
- const QString& getHeading() const { return _heading; }
- const QString& getHint() const { return _hint; }
- void setHeading(const QString& s) { _heading = s; }
- void setHint(const QString& s) { _hint = s; }
+ const TQString& getHeading() const { return _heading; }
+ const TQString& getHint() const { return _hint; }
+ void setHeading(const TQString& s) { _heading = s; }
+ void setHint(const TQString& s) { _hint = s; }
protected:
- QString _heading;
- QString _hint;
+ TQString _heading;
+ TQString _hint;
- QLabel* _headingLabel;
- QLabel* _iconLabel;
- QLabel* _hintLabel;
- QHBox* _iconBox;
- QWidget* _page;
- QVBoxLayout* _topLayout;
+ TQLabel* _headingLabel;
+ TQLabel* _iconLabel;
+ TQLabel* _hintLabel;
+ TQHBox* _iconBox;
+ TQWidget* _page;
+ TQVBoxLayout* _topLayout;
KrResultTable* _resultTable;
};
diff --git a/krusader/Konfigurator/searchobject.cpp b/krusader/Konfigurator/searchobject.cpp
index 5686870..8976cb5 100644
--- a/krusader/Konfigurator/searchobject.cpp
+++ b/krusader/Konfigurator/searchobject.cpp
@@ -34,7 +34,7 @@ SearchObject::SearchObject()
{
}
-SearchObject::SearchObject(const QString& searchName, bool found, const QString& note)
+SearchObject::SearchObject(const TQString& searchName, bool found, const TQString& note)
: _searchName(searchName),
_found(found),
_note(note)
@@ -52,7 +52,7 @@ Application::Application()
{
}
-Application::Application(const QString& searchName, bool found, const QString& appName, const QString& website, const QString& note)
+Application::Application(const TQString& searchName, bool found, const TQString& appName, const TQString& website, const TQString& note)
: SearchObject(searchName, found, note),
_appName(appName),
_website(website),
@@ -60,7 +60,7 @@ Application::Application(const QString& searchName, bool found, const QString& a
{
}
-Application::Application(const QString& searchName, const QString& website, bool found, const QString& note)
+Application::Application(const TQString& searchName, const TQString& website, bool found, const TQString& note)
: SearchObject(searchName, found, note),
_appName(searchName),
_website(website),
@@ -80,7 +80,7 @@ Archiver::Archiver()
{
}
-Archiver::Archiver(const QString& searchName, const QString& website, bool found, bool isPacker, bool isUnpacker, const QString& note)
+Archiver::Archiver(const TQString& searchName, const TQString& website, bool found, bool isPacker, bool isUnpacker, const TQString& note)
: Application(searchName, website, found, note),
_isPacker(isPacker),
_isUnpacker(isUnpacker)
@@ -94,7 +94,7 @@ Archiver::~Archiver()
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
-ApplicationGroup::ApplicationGroup(const QString& searchName, bool foundGroup, const QValueVector<Application*>& apps, const QString& note)
+ApplicationGroup::ApplicationGroup(const TQString& searchName, bool foundGroup, const TQValueVector<Application*>& apps, const TQString& note)
: SearchObject(searchName, foundGroup, note),
_apps(apps),
_foundGroup(foundGroup)
diff --git a/krusader/Konfigurator/searchobject.h b/krusader/Konfigurator/searchobject.h
index fe01a76..3f1da59 100644
--- a/krusader/Konfigurator/searchobject.h
+++ b/krusader/Konfigurator/searchobject.h
@@ -31,8 +31,8 @@
#ifndef SEARCHOBJECT_H
#define SEARCHOBJECT_H
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
#include "../krservices.h"
/**
@@ -42,20 +42,20 @@ class SearchObject
{
public:
SearchObject();
- SearchObject(const QString& name, bool found, const QString& note);
+ SearchObject(const TQString& name, bool found, const TQString& note);
virtual ~SearchObject();
- const QString& getSearchName() const { return _searchName; }
- const QString& getNote() const { return _note; }
+ const TQString& getSearchName() const { return _searchName; }
+ const TQString& getNote() const { return _note; }
const bool getFound() const { return _found; }
- void setSearchName(const QString& s) { _searchName = s; }
- void setNote(const QString& s) { _note = s; }
+ void setSearchName(const TQString& s) { _searchName = s; }
+ void setNote(const TQString& s) { _note = s; }
void setFound(const bool& b) { _found = b; }
protected:
- QString _searchName;
+ TQString _searchName;
bool _found;
- QString _note;
+ TQString _note;
};
// -----------------------------------------------------------------------------
@@ -68,21 +68,21 @@ class Application : public SearchObject
{
public:
Application();
- Application(const QString& searchName, bool found, const QString& appName, const QString& website=QString::null, const QString& note=QString::null);
- Application(const QString& searchName, const QString& website, bool found, const QString& note=QString::null);
+ Application(const TQString& searchName, bool found, const TQString& appName, const TQString& website=TQString(), const TQString& note=TQString());
+ Application(const TQString& searchName, const TQString& website, bool found, const TQString& note=TQString());
virtual ~Application();
- const QString& getWebsite() const { return _website; }
- const QString& getAppName() const { return _appName; }
- const QString& getPath() const { return _path; }
- void setWebsite(const QString& s) { _website = s; }
- void setAppName(const QString& s) { _appName = s; }
- void setPath(const QString& s) { _path = s; }
+ const TQString& getWebsite() const { return _website; }
+ const TQString& getAppName() const { return _appName; }
+ const TQString& getPath() const { return _path; }
+ void setWebsite(const TQString& s) { _website = s; }
+ void setAppName(const TQString& s) { _appName = s; }
+ void setPath(const TQString& s) { _path = s; }
protected:
- QString _appName;
- QString _website;
- QString _path;
+ TQString _appName;
+ TQString _website;
+ TQString _path;
};
// -----------------------------------------------------------------------------
@@ -95,7 +95,7 @@ class Archiver : public Application
{
public:
Archiver();
- Archiver(const QString& searchName, const QString& website, bool found, bool isPacker, bool isUnpacker, const QString& note=QString::null);
+ Archiver(const TQString& searchName, const TQString& website, bool found, bool isPacker, bool isUnpacker, const TQString& note=TQString());
~Archiver();
const bool getIsPacker() const { return _isPacker; }
@@ -117,14 +117,14 @@ protected:
class ApplicationGroup : public SearchObject
{
public:
- ApplicationGroup(const QString& searchName, bool foundGroup, const QValueVector<Application*>& apps, const QString& note=QString::null);
+ ApplicationGroup(const TQString& searchName, bool foundGroup, const TQValueVector<Application*>& apps, const TQString& note=TQString());
~ApplicationGroup();
- const QValueVector<Application*>& getAppVec() const { return _apps; }
+ const TQValueVector<Application*>& getAppVec() const { return _apps; }
const bool getFoundGroup() const { return _foundGroup; }
protected:
- QValueVector<Application*> _apps;
+ TQValueVector<Application*> _apps;
bool _foundGroup;
};
diff --git a/krusader/KrJS/krjs.cpp b/krusader/KrJS/krjs.cpp
index 435b43e..bf69a34 100644
--- a/krusader/KrJS/krjs.cpp
+++ b/krusader/KrJS/krjs.cpp
@@ -22,7 +22,7 @@ KrJS::KrJS() : KJSEmbed::KJSEmbedPart() {
addObject( ACTIVE_MNG, "PanelManager" );
}
-bool KrJS::runFile(const QString & filename) {
+bool KrJS::runFile(const TQString & filename) {
KJS::ExecState *exec = globalExec();
@@ -54,22 +54,22 @@ bool KrJS::runFile(const QString & filename) {
#if KDE_IS_VERSION(3,4,0)
KJS::Object exception = jsres.value().toObject(exec);
int line = int( exception.get( exec, KJS::Identifier("line") ).toNumber(exec) );
- QString type = exception.get( exec, KJS::Identifier("name") ).toString(exec).qstring();
- QString message = exception.get( exec, KJS::Identifier("message") ).toString(exec).qstring();
+ TQString type = exception.get( exec, KJS::Identifier("name") ).toString(exec).qstring();
+ TQString message = exception.get( exec, KJS::Identifier("message") ).toString(exec).qstring();
krOut << "JavaScript: Uncaught " << type << " exception at line " << line << " in " << filename << endl;
krOut << message << endl;
- KMessageBox::error ( 0, //parent
+ KMessageBox::error ( 0, //tqparent
( line < 0 ?
- QString( i18n("In %1:\nUncaught JavaScript exception '%2'\n%3") ).arg(filename).arg(type).arg(message) :
- QString( i18n("In %1:\nUncaught JavaScript exception '%2' at line %3\n%4") ).arg(filename).arg(type).arg(line).arg(message)
+ TQString( i18n("In %1:\nUncaught JavaScript exception '%2'\n%3") ).tqarg(filename).tqarg(type).tqarg(message) :
+ TQString( i18n("In %1:\nUncaught JavaScript exception '%2' at line %3\n%4") ).tqarg(filename).tqarg(type).tqarg(line).tqarg(message)
), //text
i18n("JavaScript error"), //caption
KMessageBox::Dangerous) ;
#else
- KMessageBox::error ( 0, //parent
- QString(i18n("In %1:\nThere is an error in the JavaScript")).arg(filename), //text
+ KMessageBox::error ( 0, //tqparent
+ TQString(i18n("In %1:\nThere is an error in the JavaScript")).tqarg(filename), //text
i18n("JavaScript error"), //caption
KMessageBox::Dangerous) ;
#endif
diff --git a/krusader/KrJS/krjs.h b/krusader/KrJS/krjs.h
index 73f81ae..256d07a 100644
--- a/krusader/KrJS/krjs.h
+++ b/krusader/KrJS/krjs.h
@@ -26,7 +26,7 @@ public:
*
* @par filename The file to run
*/
- bool runFile(const QString & filename);
+ bool runFile(const TQString & filename);
};
#endif //KRJS_H
diff --git a/krusader/Locate/locate.cpp b/krusader/Locate/locate.cpp
index c875de3..e4d0a62 100755
--- a/krusader/Locate/locate.cpp
+++ b/krusader/Locate/locate.cpp
@@ -40,19 +40,19 @@
#include "../KViewer/krviewer.h"
#include "../panelmanager.h"
#include <klocale.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qfontmetrics.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqfontmetrics.h>
#include <kmessagebox.h>
#include <kpopupmenu.h>
-#include <qcursor.h>
-#include <qeventloop.h>
+#include <tqcursor.h>
+#include <tqeventloop.h>
#include <kfinddialog.h>
#include <kinputdialog.h>
-#include <qregexp.h>
-#include <qdir.h>
-#include <qclipboard.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqclipboard.h>
#include <kurldrag.h>
#include <../kicons.h>
@@ -68,7 +68,7 @@
class LocateListView : public KListView
{
public:
- LocateListView( QWidget * parent, const char * name = 0 ) : KListView( parent, name )
+ LocateListView( TQWidget * tqparent, const char * name = 0 ) : KListView( tqparent, name )
{
}
@@ -76,7 +76,7 @@ public:
{
KURL::List urls;
- QListViewItem * item = firstChild();
+ TQListViewItem * item = firstChild();
while( item )
{
if( item->isSelected() )
@@ -89,7 +89,7 @@ public:
return;
KURLDrag *d = new KURLDrag(urls, this);
- d->setPixmap( FL_LOADICON( "file" ), QPoint( -7, 0 ) );
+ d->setPixmap( FL_LOADICON( "file" ), TQPoint( -7, 0 ) );
d->dragCopy();
}
};
@@ -100,41 +100,41 @@ LocateDlg * LocateDlg::LocateDialog = 0;
LocateDlg::LocateDlg() : KDialogBase(0,0,false,"Locate", KDialogBase::User1 | KDialogBase::User2 | KDialogBase::User3 | KDialogBase::Close,
KDialogBase::User3, false, i18n("Stop"), i18n("Update DB"), i18n("Locate") ), isFeedToListBox( false )
{
- QWidget *widget=new QWidget(this, "locateMainWidget");
- QGridLayout *grid = new QGridLayout( widget );
+ TQWidget *widget=new TQWidget(this, "locateMainWidget");
+ TQGridLayout *grid = new TQGridLayout( widget );
grid->setSpacing( 6 );
grid->setMargin( 11 );
setPlainCaption( i18n( "Krusader::Locate" ) );
- QHBox *hbox = new QHBox( widget, "locateHBox" );
- QLabel *label = new QLabel( i18n( "Search for:" ), hbox, "locateLabel" );
+ TQHBox *hbox = new TQHBox( widget, "locateHBox" );
+ TQLabel *label = new TQLabel( i18n( "Search for:" ), hbox, "locateLabel" );
locateSearchFor = new KHistoryCombo( false, hbox, "locateSearchFor" );
label->setBuddy( locateSearchFor );
krConfig->setGroup("Locate");
- QStringList list = krConfig->readListEntry("Search For");
+ TQStringList list = krConfig->readListEntry("Search For");
locateSearchFor->setMaxCount(25); // remember 25 items
locateSearchFor->setHistoryItems(list);
locateSearchFor->setEditable( true );
locateSearchFor->setDuplicatesEnabled( false );
- locateSearchFor->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
+ locateSearchFor->tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Fixed);
locateSearchFor->lineEdit()->setFocus();
grid->addWidget( hbox, 0, 0 );
- QHBox *hbox2 = new QHBox( widget, "locateHBox" );
- QSpacerItem* spacer = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- hbox2->layout()->addItem( spacer );
- dontSearchInPath = new QCheckBox( i18n( "Don't search in path" ), hbox2, "dontSearchInPath" );
+ TQHBox *hbox2 = new TQHBox( widget, "locateHBox" );
+ TQSpacerItem* spacer = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ hbox2->tqlayout()->addItem( spacer );
+ dontSearchInPath = new TQCheckBox( i18n( "Don't search in path" ), hbox2, "dontSearchInPath" );
dontSearchInPath->setChecked( krConfig->readBoolEntry("Dont Search In Path") );
- existingFiles = new QCheckBox( i18n( "Show only the existing files" ), hbox2, "existingFiles" );
+ existingFiles = new TQCheckBox( i18n( "Show only the existing files" ), hbox2, "existingFiles" );
existingFiles->setChecked( krConfig->readBoolEntry("Existing Files") );
- caseSensitive = new QCheckBox( i18n( "Case Sensitive" ), hbox2, "caseSensitive" );
+ caseSensitive = new TQCheckBox( i18n( "Case Sensitive" ), hbox2, "caseSensitive" );
caseSensitive->setChecked( krConfig->readBoolEntry("Case Sensitive") );
grid->addWidget( hbox2, 1, 0 );
- QFrame *line1 = new QFrame( widget, "locateLine1" );
- line1->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame *line1 = new TQFrame( widget, "locateLine1" );
+ line1->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
grid->addWidget( line1, 2, 0 );
resultList=new LocateListView( widget ); // create the main container
@@ -143,26 +143,26 @@ LocateDlg::LocateDlg() : KDialogBase(0,0,false,"Locate", KDialogBase::User1 | KD
resultList->setFont(krConfig->readFontEntry("Filelist Font",_FilelistFont));
resultList->setAllColumnsShowFocus(true);
- resultList->setVScrollBarMode(QScrollView::Auto);
- resultList->setHScrollBarMode(QScrollView::Auto);
+ resultList->setVScrollBarMode(TQScrollView::Auto);
+ resultList->setHScrollBarMode(TQScrollView::Auto);
resultList->setShowSortIndicator(false);
resultList->setSorting(-1);
- resultList->setSelectionMode( QListView::Extended );
+ resultList->setSelectionMode( TQListView::Extended );
- resultList->addColumn( i18n("Results"), QFontMetrics(resultList->font()).width("W") * 60 );
- resultList->setColumnWidthMode(0,QListView::Maximum);
+ resultList->addColumn( i18n("Results"), TQFontMetrics(resultList->font()).width("W") * 60 );
+ resultList->setColumnWidthMode(0,TQListView::Maximum);
- connect( resultList,SIGNAL(rightButtonPressed(QListViewItem *, const QPoint &, int)),
- this, SLOT(slotRightClick(QListViewItem *)));
- connect( resultList,SIGNAL(doubleClicked(QListViewItem *)),
- this, SLOT(slotDoubleClick(QListViewItem *)));
- connect( resultList,SIGNAL(returnPressed(QListViewItem *)),
- this, SLOT(slotDoubleClick(QListViewItem *)));
+ connect( resultList,TQT_SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT(slotRightClick(TQListViewItem *)));
+ connect( resultList,TQT_SIGNAL(doubleClicked(TQListViewItem *)),
+ this, TQT_SLOT(slotDoubleClick(TQListViewItem *)));
+ connect( resultList,TQT_SIGNAL(returnPressed(TQListViewItem *)),
+ this, TQT_SLOT(slotDoubleClick(TQListViewItem *)));
grid->addWidget( resultList, 3, 0 );
- QFrame *line2 = new QFrame( widget, "locateLine2" );
- line2->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame *line2 = new TQFrame( widget, "locateLine2" );
+ line2->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
grid->addWidget( line2, 4, 0 );
enableButton( KDialogBase::User1, false ); /* disable the stop button */
@@ -171,7 +171,7 @@ LocateDlg::LocateDlg() : KDialogBase(0,0,false,"Locate", KDialogBase::User1 | KD
{
if( updateProcess->isRunning() )
{
- connect( updateProcess, SIGNAL(processExited(KProcess *)), this, SLOT(updateFinished()));
+ connect( updateProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(updateFinished()));
enableButton( KDialogBase::User2, false );
}
else
@@ -202,7 +202,7 @@ void LocateDlg::slotUser2() /* The Update DB button */
*updateProcess << KrServices::fullPathName( "updatedb" );
*updateProcess << KrServices::separateArgs( krConfig->readEntry( "UpdateDB Arguments", "" ) );
- connect( updateProcess, SIGNAL(processExited(KProcess *)), this, SLOT(updateFinished()));
+ connect( updateProcess, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(updateFinished()));
updateProcess->start(KProcess::NotifyOnExit);
enableButton( KDialogBase::User2, false );
}
@@ -218,7 +218,7 @@ void LocateDlg::updateFinished()
void LocateDlg::slotUser3() /* The locate button */
{
locateSearchFor->addToHistory(locateSearchFor->currentText());
- QStringList list = locateSearchFor->historyItems();
+ TQStringList list = locateSearchFor->historyItems();
krConfig->setGroup("Locate");
krConfig->writeEntry("Search For", list);
krConfig->writeEntry("Dont Search In Path", dontSearchPath = dontSearchInPath->isChecked() );
@@ -242,15 +242,15 @@ void LocateDlg::slotUser3() /* The locate button */
isFeedToListBox = false;
resultList->setFocus();
- qApp->processEvents();
+ tqApp->processEvents();
stopping = false;
KProcess locateProc;
- connect( &locateProc, SIGNAL( receivedStdout(KProcess *, char *, int) ),
- this, SLOT( processStdout(KProcess *, char *, int) ) );
- connect( &locateProc, SIGNAL( receivedStderr(KProcess *, char *, int) ),
- this, SLOT( processStderr(KProcess *, char *, int) ) );
+ connect( &locateProc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int) ),
+ this, TQT_SLOT( processStdout(KProcess *, char *, int) ) );
+ connect( &locateProc, TQT_SIGNAL( receivedStderr(KProcess *, char *, int) ),
+ this, TQT_SLOT( processStderr(KProcess *, char *, int) ) );
locateProc << KrServices::fullPathName( "locate" );
if( !isCs )
@@ -290,13 +290,13 @@ void LocateDlg::processStdout(KProcess *proc, char *buffer, int length)
memcpy( buf, buffer, length );
buf[ length ] = 0;
- remaining += QString::fromLocal8Bit( buf );
+ remaining += TQString::fromLocal8Bit( buf );
delete []buf;
- QStringList list = QStringList::split("\n", remaining );
+ TQStringList list = TQStringList::split("\n", remaining );
int items = list.size();
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
if( --items == 0 && buffer[length-1] != '\n' )
remaining = *it;
@@ -304,11 +304,11 @@ void LocateDlg::processStdout(KProcess *proc, char *buffer, int length)
{
if( dontSearchPath )
{
- QRegExp regExp( pattern, isCs, true );
- QString fileName = (*it).stripWhiteSpace();
+ TQRegExp regExp( pattern, isCs, true );
+ TQString fileName = (*it).stripWhiteSpace();
if( fileName.endsWith( "/" ) && fileName != "/" )
fileName.truncate( fileName.length() -1 );
- fileName = fileName.mid( fileName.findRev( '/' ) + 1 );
+ fileName = fileName.mid( fileName.tqfindRev( '/' ) + 1 );
if( !regExp.exactMatch( fileName ) )
continue;
@@ -332,7 +332,7 @@ void LocateDlg::processStdout(KProcess *proc, char *buffer, int length)
if( stopping )
proc->kill( SIGKILL );
- qApp->processEvents();
+ tqApp->processEvents();
}
void LocateDlg::processStderr(KProcess *, char *buffer, int length)
@@ -341,11 +341,11 @@ void LocateDlg::processStderr(KProcess *, char *buffer, int length)
memcpy( buf, buffer, length );
buf[ length ] = 0;
- collectedErr += QString::fromLocal8Bit( buf );
+ collectedErr += TQString::fromLocal8Bit( buf );
delete []buf;
}
-void LocateDlg::slotRightClick(QListViewItem *item)
+void LocateDlg::slotRightClick(TQListViewItem *item)
{
if ( !item )
return;
@@ -368,7 +368,7 @@ void LocateDlg::slotRightClick(QListViewItem *item)
popup.insertItem(i18n("Copy selected to clipboard"), COPY_SELECTED_TO_CLIPBOARD);
- int result=popup.exec(QCursor::pos());
+ int result=popup.exec(TQCursor::pos());
// check out the user's option
switch (result)
@@ -384,25 +384,25 @@ void LocateDlg::slotRightClick(QListViewItem *item)
}
}
-void LocateDlg::slotDoubleClick(QListViewItem *item)
+void LocateDlg::slotDoubleClick(TQListViewItem *item)
{
if ( !item )
return;
- QString dirName = item->text(0);
- QString fileName;
+ TQString dirName = item->text(0);
+ TQString fileName;
- if( !QDir( dirName ).exists() )
+ if( !TQDir( dirName ).exists() )
{
- fileName = dirName.mid( dirName.findRev( '/' ) + 1 );
- dirName.truncate( dirName.findRev( '/' ) );
+ fileName = dirName.mid( dirName.tqfindRev( '/' ) + 1 );
+ dirName.truncate( dirName.tqfindRev( '/' ) );
}
ACTIVE_FUNC->openUrl(vfs::fromPathOrURL( dirName ), fileName );
KDialogBase::accept();
}
-void LocateDlg::keyPressEvent( QKeyEvent *e )
+void LocateDlg::keyPressEvent( TQKeyEvent *e )
{
if( Krusader::actCopy->shortcut().contains( KKey( e ) ) )
{
@@ -442,10 +442,10 @@ void LocateDlg::keyPressEvent( QKeyEvent *e )
break;
}
- QDialog::keyPressEvent( e );
+ TQDialog::keyPressEvent( e );
}
-void LocateDlg::operate( QListViewItem *item, int task )
+void LocateDlg::operate( TQListViewItem *item, int task )
{
KURL name;
if( item != 0 )
@@ -463,10 +463,10 @@ void LocateDlg::operate( QListViewItem *item, int task )
{
krConfig->setGroup("Locate");
long options = krConfig->readNumEntry("Find Options", 0);
- QStringList list = krConfig->readListEntry("Find Patterns");
+ TQStringList list = krConfig->readListEntry("Find Patterns");
KFindDialog dlg( this, "locateFindDialog", options, list );
- if ( dlg.exec() != QDialog::Accepted )
+ if ( dlg.exec() != TQDialog::Accepted )
return;
if( list.first() != ( findPattern = dlg.pattern() ) )
@@ -481,7 +481,7 @@ void LocateDlg::operate( QListViewItem *item, int task )
findCurrentItem = (KListViewItem *)resultList->currentItem();
- if( find() && findCurrentItem )
+ if( tqfind() && findCurrentItem )
resultList->setCurrentItem( findCurrentItem );
else
KMessageBox::information( 0, i18n( "Search string not found!" ) );
@@ -498,7 +498,7 @@ void LocateDlg::operate( QListViewItem *item, int task )
findCurrentItem = (KListViewItem *)resultList->currentItem();
nextLine();
- if( find() && findCurrentItem )
+ if( tqfind() && findCurrentItem )
resultList->setCurrentItem( findCurrentItem );
else
KMessageBox::information( 0, i18n( "Search string not found!" ) );
@@ -513,7 +513,7 @@ void LocateDlg::operate( QListViewItem *item, int task )
{
KURL::List urls;
- QListViewItem * item = resultList->firstChild();
+ TQListViewItem * item = resultList->firstChild();
while( item )
{
if( item->isSelected() )
@@ -526,8 +526,8 @@ void LocateDlg::operate( QListViewItem *item, int task )
return;
KURLDrag *d = new KURLDrag(urls, this);
- d->setPixmap( FL_LOADICON( "file" ), QPoint( -7, 0 ) );
- QApplication::clipboard()->setData( d );
+ d->setPixmap( FL_LOADICON( "file" ), TQPoint( -7, 0 ) );
+ TQApplication::tqclipboard()->setData( d );
}
break;
}
@@ -541,20 +541,20 @@ void LocateDlg::nextLine()
findCurrentItem = (KListViewItem *)findCurrentItem->itemBelow();
}
-bool LocateDlg::find()
+bool LocateDlg::tqfind()
{
while( findCurrentItem )
{
- QString item = findCurrentItem->text( 0 );
+ TQString item = findCurrentItem->text( 0 );
if( findOptions & KFindDialog::RegularExpression )
{
- if( item.contains( QRegExp( findPattern, findOptions & KFindDialog::CaseSensitive ) ) )
+ if( item.tqcontains( TQRegExp( findPattern, findOptions & KFindDialog::CaseSensitive ) ) )
return true;
}
else
{
- if( item.contains( findPattern, findOptions & KFindDialog::CaseSensitive ) )
+ if( item.tqcontains( findPattern, findOptions & KFindDialog::CaseSensitive ) )
return true;
}
@@ -571,9 +571,9 @@ void LocateDlg::feedToListBox()
krConfig->setGroup( "Locate" );
int listBoxNum = krConfig->readNumEntry( "Feed To Listbox Counter", 1 );
- QString queryName;
+ TQString queryName;
do {
- queryName = i18n("Locate results")+QString( " %1" ).arg( listBoxNum++ );
+ queryName = i18n("Locate results")+TQString( " %1" ).tqarg( listBoxNum++ );
}while( v.vfs_search( queryName ) != 0 );
krConfig->writeEntry( "Feed To Listbox Counter", listBoxNum );
@@ -590,13 +590,13 @@ void LocateDlg::feedToListBox()
}
KURL::List urlList;
- QListViewItem * item = resultList->firstChild();
+ TQListViewItem * item = resultList->firstChild();
while( item )
{
urlList.push_back( vfs::fromPathOrURL( item->text( 0 ) ) );
item = item->nextSibling();
}
- KURL url = KURL::fromPathOrURL(QString("virt:/")+ queryName);
+ KURL url = KURL::fromPathOrURL(TQString("virt:/")+ queryName);
v.vfs_refresh( url );
v.vfs_addFiles( &urlList, KIO::CopyJob::Copy, 0 );
//ACTIVE_FUNC->openUrl(url);
diff --git a/krusader/Locate/locate.h b/krusader/Locate/locate.h
index e99b987..ebb1f2f 100755
--- a/krusader/Locate/locate.h
+++ b/krusader/Locate/locate.h
@@ -35,11 +35,12 @@
#include <kcombobox.h>
#include <klistview.h>
#include <kprocess.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
class LocateDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
LocateDlg();
@@ -56,17 +57,17 @@ public:
public slots:
void processStdout(KProcess *, char *, int);
void processStderr(KProcess *proc, char *buffer, int length);
- void slotRightClick(QListViewItem *);
- void slotDoubleClick(QListViewItem *);
+ void slotRightClick(TQListViewItem *);
+ void slotDoubleClick(TQListViewItem *);
void updateFinished();
protected:
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
private:
- void operate( QListViewItem *item, int task );
+ void operate( TQListViewItem *item, int task );
- bool find();
+ bool tqfind();
void nextLine();
bool stopping;
@@ -77,22 +78,22 @@ private:
bool isFeedToListBox;
- QString pattern;
+ TQString pattern;
KHistoryCombo *locateSearchFor;
KListView *resultList;
- QString remaining;
+ TQString remaining;
KListViewItem *lastItem;
- QString collectedErr;
+ TQString collectedErr;
long findOptions;
- QString findPattern;
+ TQString findPattern;
KListViewItem *findCurrentItem;
- QCheckBox *dontSearchInPath;
- QCheckBox *existingFiles;
- QCheckBox *caseSensitive;
+ TQCheckBox *dontSearchInPath;
+ TQCheckBox *existingFiles;
+ TQCheckBox *caseSensitive;
static KProcess *updateProcess;
};
diff --git a/krusader/MountMan/kdiskfreesp.cpp b/krusader/MountMan/kdiskfreesp.cpp
index a8a58fc..939bd2d 100644
--- a/krusader/MountMan/kdiskfreesp.cpp
+++ b/krusader/MountMan/kdiskfreesp.cpp
@@ -3,7 +3,7 @@
*
* Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
*
@@ -23,8 +23,8 @@
*/
#include "kdiskfreesp.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kprocess.h>
@@ -42,15 +42,15 @@
/***************************************************************************
* constructor
**/
-KDiskFreeSp::KDiskFreeSp(QObject *parent, const char *name)
- : QObject(parent,name)
+KDiskFreeSp::KDiskFreeSp(TQObject *tqparent, const char *name)
+ : TQObject(tqparent,name)
{
dfProc = new KProcess(); Q_CHECK_PTR(dfProc);
dfProc->setEnvironment("LANGUAGE", "C");
- connect( dfProc, SIGNAL(receivedStdout(KProcess *, char *, int) ),
- this, SLOT (receivedDFStdErrOut(KProcess *, char *, int)) );
- connect(dfProc,SIGNAL(processExited(KProcess *) ),
- this, SLOT(dfDone() ) );
+ connect( dfProc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int) ),
+ this, TQT_SLOT (receivedDFStdErrOut(KProcess *, char *, int)) );
+ connect(dfProc,TQT_SIGNAL(processExited(KProcess *) ),
+ this, TQT_SLOT(dfDone() ) );
readingDFStdErrOut=false;
}
@@ -69,21 +69,21 @@ KDiskFreeSp::~KDiskFreeSp()
**/
void KDiskFreeSp::receivedDFStdErrOut(KProcess *, char *data, int len)
{
- QCString tmp(data,len+1); // adds a zero-byte
+ TQCString tmp(data,len+1); // adds a zero-byte
dfStringErrOut.append(tmp);
}
/***************************************************************************
* reads the df-commands results
**/
-int KDiskFreeSp::readDF( const QString & mountPoint )
+int KDiskFreeSp::readDF( const TQString & mountPoint )
{
if (readingDFStdErrOut || dfProc->isRunning())
return -1;
m_mountPoint = mountPoint;
dfStringErrOut=""; // yet no data received
dfProc->clearArguments();
- (*dfProc) << QString::fromLocal8Bit(DF_COMMAND) << QString::fromLocal8Bit(DF_ARGS) << mountPoint;
+ (*dfProc) << TQString::fromLocal8Bit(DF_COMMAND) << TQString::fromLocal8Bit(DF_ARGS) << mountPoint;
if (!dfProc->start( KProcess::NotifyOnExit, KProcess::AllOutput ))
kdError() << "could not execute ["<< DF_COMMAND << "]" << endl;
return 1;
@@ -97,18 +97,18 @@ void KDiskFreeSp::dfDone()
{
readingDFStdErrOut=true;
- QTextStream t (dfStringErrOut, IO_ReadOnly);
- QString s=t.readLine();
- if ( (s.isEmpty()) || ( s.left(10) != QString::fromLatin1("Filesystem") ) )
+ TQTextStream t (dfStringErrOut, IO_ReadOnly);
+ TQString s=t.readLine();
+ if ( (s.isEmpty()) || ( s.left(10) != TQString::tqfromLatin1("Filesystem") ) )
kdError() << "Error running df command... got [" << s << "]" << endl;
while ( !t.eof() ) {
- QString u,v;
+ TQString u,v;
s=t.readLine();
s=s.simplifyWhiteSpace();
if ( !s.isEmpty() ) {
//kdDebug(kfile_area) << "GOT: [" << s << "]" << endl;
- if (s.find(BLANK)<0) // devicename was too long, rest in next line
+ if (s.tqfind(BLANK)<0) // devicename was too long, rest in next line
if ( !t.eof() ) { // just appends the next line
v=t.readLine();
s=s.append(v);
@@ -118,31 +118,31 @@ void KDiskFreeSp::dfDone()
//kdDebug(kfile_area) << "[" << s << "]" << endl;
- //QString deviceName = s.left(s.find(BLANK));
- s=s.remove(0,s.find(BLANK)+1 );
+ //TQString deviceName = s.left(s.tqfind(BLANK));
+ s=s.remove(0,s.tqfind(BLANK)+1 );
//kdDebug(kfile_area) << " DeviceName: [" << deviceName << "]" << endl;
if (!NO_FS_TYPE)
- s=s.remove(0,s.find(BLANK)+1 ); // eat fs type
+ s=s.remove(0,s.tqfind(BLANK)+1 ); // eat fs type
- u=s.left(s.find(BLANK));
+ u=s.left(s.tqfind(BLANK));
unsigned long kBSize = u.toULong();
- s=s.remove(0,s.find(BLANK)+1 );
+ s=s.remove(0,s.tqfind(BLANK)+1 );
//kdDebug(kfile_area) << " Size: [" << kBSize << "]" << endl;
- u=s.left(s.find(BLANK));
+ u=s.left(s.tqfind(BLANK));
unsigned long kBUsed = u.toULong();
- s=s.remove(0,s.find(BLANK)+1 );
+ s=s.remove(0,s.tqfind(BLANK)+1 );
//kdDebug(kfile_area) << " Used: [" << kBUsed << "]" << endl;
- u=s.left(s.find(BLANK));
+ u=s.left(s.tqfind(BLANK));
unsigned long kBAvail = u.toULong();
- s=s.remove(0,s.find(BLANK)+1 );
+ s=s.remove(0,s.tqfind(BLANK)+1 );
//kdDebug(kfile_area) << " Avail: [" << kBAvail << "]" << endl;
- s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94%
- QString mountPoint = s.stripWhiteSpace();
+ s=s.remove(0,s.tqfind(BLANK)+1 ); // delete the capacity 94%
+ TQString mountPoint = s.stripWhiteSpace();
//kdDebug(kfile_area) << " MountPoint: [" << mountPoint << "]" << endl;
if ( mountPoint == m_mountPoint )
@@ -159,10 +159,10 @@ void KDiskFreeSp::dfDone()
delete this;
}
-KDiskFreeSp * KDiskFreeSp::findUsageInfo( const QString & path )
+KDiskFreeSp * KDiskFreeSp::findUsageInfo( const TQString & path )
{
KDiskFreeSp * job = new KDiskFreeSp;
- QString mountPoint = KIO::findPathMountPoint( path );
+ TQString mountPoint = KIO::findPathMountPoint( path );
job->readDF( mountPoint );
return job;
}
diff --git a/krusader/MountMan/kdiskfreesp.h b/krusader/MountMan/kdiskfreesp.h
index ff0e039..f588aab 100644
--- a/krusader/MountMan/kdiskfreesp.h
+++ b/krusader/MountMan/kdiskfreesp.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* Modifed for Krusader by shie erlich, October 2004
@@ -27,8 +27,8 @@
#ifndef __KDISKFREESP_H__
#define __KDISKFREESP_H__
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
class KProcess;
@@ -36,10 +36,11 @@ class KProcess;
* This class parses the output of "df" to find the disk usage
* information for a given partition (mount point).
*/
-class KDiskFreeSp : public QObject
+class KDiskFreeSp : public TQObject
{ Q_OBJECT
+ TQ_OBJECT
public:
- KDiskFreeSp( QObject *parent=0, const char *name=0 );
+ KDiskFreeSp( TQObject *tqparent=0, const char *name=0 );
/**
* Destructor - this object autodeletes itself when it's done
*/
@@ -50,7 +51,7 @@ public:
* if this mount point is found, with the info requested.
* done is emitted in any case.
*/
- int readDF( const QString & mountPoint );
+ int readDF( const TQString & mountPoint );
/**
* Call this to fire a search on the disk usage information
@@ -59,15 +60,15 @@ public:
* if this mount point is found, with the info requested.
* done is emitted in any case.
*/
- static KDiskFreeSp * findUsageInfo( const QString & path );
+ static KDiskFreeSp * findUsageInfo( const TQString & path );
signals:
- void foundMountPoint( const QString & mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail );
+ void foundMountPoint( const TQString & mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail );
// This one is a hack around a weird (compiler?) bug. In the former signal,
// the slot in KPropsDlg would get 0L, 0L as the last two parameters.
// When using const ulong& instead, all is ok.
- void foundMountPoint( const unsigned long&, const unsigned long&, const unsigned long&, const QString& );
+ void foundMountPoint( const unsigned long&, const unsigned long&, const unsigned long&, const TQString& );
void done();
private slots:
@@ -76,8 +77,8 @@ private slots:
private:
KProcess *dfProc;
- QCString dfStringErrOut;
- QString m_mountPoint;
+ TQCString dfStringErrOut;
+ TQString m_mountPoint;
bool readingDFStdErrOut;
class KDiskFreeSpPrivate;
KDiskFreeSpPrivate * d;
diff --git a/krusader/MountMan/kmountman.cpp b/krusader/MountMan/kmountman.cpp
index 7728fc4..6e0e2e8 100644
--- a/krusader/MountMan/kmountman.cpp
+++ b/krusader/MountMan/kmountman.cpp
@@ -55,7 +55,7 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
static int __delayedIdx; // ugly: pass the processEvents deadlock
-KMountMan::KMountMan() : QObject(), Operational( false ), waiting(false), mountManGui( 0 ) {
+KMountMan::KMountMan() : TQObject(), Operational( false ), waiting(false), mountManGui( 0 ) {
_actions = 0L;
// added as a precaution, although we use kde services now
@@ -77,10 +77,10 @@ KMountMan::KMountMan() : QObject(), Operational( false ), waiting(false), mountM
nonmount_fs << "supermount";
{
KConfigGroupSaver saver(krConfig, "Advanced");
- QStringList nonmount = QStringList::split(",", krConfig->readEntry("Nonmount Points", _NonMountPoints));
+ TQStringList nonmount = TQStringList::split(",", krConfig->readEntry("Nonmount Points", _NonMountPoints));
nonmount_fs_mntpoint += nonmount;
// simplify the white space
- for ( QStringList::Iterator it = nonmount_fs_mntpoint.begin(); it != nonmount_fs_mntpoint.end(); ++it ) {
+ for ( TQStringList::Iterator it = nonmount_fs_mntpoint.begin(); it != nonmount_fs_mntpoint.end(); ++it ) {
*it = (*it).simplifyWhiteSpace();
}
}
@@ -89,13 +89,13 @@ KMountMan::KMountMan() : QObject(), Operational( false ), waiting(false), mountM
KMountMan::~KMountMan() {}
-bool KMountMan::invalidFilesystem(QString type) {
- return (invalid_fs.contains(type) > 0);
+bool KMountMan::invalidFilesystem(TQString type) {
+ return (invalid_fs.tqcontains(type) > 0);
}
// this is an ugly hack, but type can actually be a mountpoint. oh well...
-bool KMountMan::nonmountFilesystem(QString type, QString mntPoint) {
- return((nonmount_fs.contains(type) > 0) || (nonmount_fs_mntpoint.contains(mntPoint) > 0));
+bool KMountMan::nonmountFilesystem(TQString type, TQString mntPoint) {
+ return((nonmount_fs.tqcontains(type) > 0) || (nonmount_fs_mntpoint.tqcontains(mntPoint) > 0));
}
void KMountMan::mainWindow() {
@@ -104,7 +104,7 @@ void KMountMan::mainWindow() {
mountManGui = 0; /* for sanity */
}
-KMountPoint *KMountMan::findInListByMntPoint(KMountPoint::List &lst, QString value) {
+KMountPoint *KMountMan::findInListByMntPoint(KMountPoint::List &lst, TQString value) {
KMountPoint *m;
for (KMountPoint::List::iterator it = lst.begin(); it != lst.end(); ++it) {
m = *it;
@@ -121,7 +121,7 @@ void KMountMan::jobResult(KIO::Job *job) {
job->showErrorDialog( 0 );
}
-void KMountMan::mount( QString mntPoint, bool blocking ) {
+void KMountMan::mount( TQString mntPoint, bool blocking ) {
KMountPoint::List possible = KMountPoint::possibleMountPoints(KMountPoint::NeedMountOptions);
KMountPoint *m = findInListByMntPoint(possible, mntPoint);
if (!m) return;
@@ -129,26 +129,26 @@ void KMountMan::mount( QString mntPoint, bool blocking ) {
waiting = true; // prepare to block
KIO::SimpleJob *job = KIO::mount(false, m->mountType().local8Bit(), m->mountedFrom(), m->mountPoint(), false);
new KrProgress(job);
- connect(job, SIGNAL(result(KIO::Job* )), this, SLOT(jobResult(KIO::Job* )));
+ connect(job, TQT_SIGNAL(result(KIO::Job* )), this, TQT_SLOT(jobResult(KIO::Job* )));
while (blocking && waiting) {
- qApp->processEvents();
+ tqApp->processEvents();
usleep( 1000 );
}
}
-void KMountMan::unmount( QString mntPoint, bool blocking ) {
+void KMountMan::unmount( TQString mntPoint, bool blocking ) {
if (blocking)
waiting = true; // prepare to block
KIO::SimpleJob *job = KIO::unmount(mntPoint, false);
new KrProgress(job);
- connect(job, SIGNAL(result(KIO::Job* )), this, SLOT(jobResult(KIO::Job* )));
+ connect(job, TQT_SIGNAL(result(KIO::Job* )), this, TQT_SLOT(jobResult(KIO::Job* )));
while (blocking && waiting) {
- qApp->processEvents();
+ tqApp->processEvents();
usleep( 1000 );
}
}
-KMountMan::mntStatus KMountMan::getStatus( QString mntPoint ) {
+KMountMan::mnttqStatus KMountMan::gettqStatus( TQString mntPoint ) {
KMountPoint::List::iterator it;
KMountPoint *m;
@@ -169,8 +169,8 @@ KMountMan::mntStatus KMountMan::getStatus( QString mntPoint ) {
}
-void KMountMan::toggleMount( QString mntPoint ) {
- mntStatus status = getStatus(mntPoint);
+void KMountMan::toggleMount( TQString mntPoint ) {
+ mnttqStatus status = gettqStatus(mntPoint);
switch (status) {
case MOUNTED:
unmount(mntPoint);
@@ -184,12 +184,12 @@ void KMountMan::toggleMount( QString mntPoint ) {
}
}
-void KMountMan::autoMount( QString path ) {
- if ( getStatus( path ) == NOT_MOUNTED )
+void KMountMan::autoMount( TQString path ) {
+ if ( gettqStatus( path ) == NOT_MOUNTED )
mount( path );
}
-void KMountMan::eject( QString mntPoint ) {
+void KMountMan::eject( TQString mntPoint ) {
KShellProcess proc;
proc << KrServices::fullPathName( "eject" ) << "'" + mntPoint + "'";
proc.start( KProcess::Block );
@@ -198,7 +198,7 @@ void KMountMan::eject( QString mntPoint ) {
}
// returns true if the path is an ejectable mount point (at the moment CDROM and DVD)
-bool KMountMan::ejectable( QString path ) {
+bool KMountMan::ejectable( TQString path ) {
#if !defined(BSD) && !defined(_OS_SOLARIS_)
KMountPoint::List possible = KMountPoint::possibleMountPoints();
KMountPoint *m = findInListByMntPoint(possible, path);
@@ -213,32 +213,32 @@ bool KMountMan::ejectable( QString path ) {
// a mountMan special version of KIO::convertSize, which deals
// with large filesystems ==> >4GB, it actually recieve size in
// a minimum block of 1024 ==> data is KB not bytes
-QString KMountMan::convertSize( KIO::filesize_t size ) {
+TQString KMountMan::convertSize( KIO::filesize_t size ) {
float fsize;
- QString s;
+ TQString s;
// Tera-byte
if ( size >= 1073741824 ) {
fsize = ( float ) size / ( float ) 1073741824;
if ( fsize > 1024 ) // no name for something bigger than tera byte
// let's call it Zega-Byte, who'll ever find out? :-)
- s = i18n( "%1 ZB" ).arg( KGlobal::locale() ->formatNumber( fsize / ( float ) 1024, 1 ) );
+ s = i18n( "%1 ZB" ).tqarg( KGlobal::locale() ->formatNumber( fsize / ( float ) 1024, 1 ) );
else
- s = i18n( "%1 TB" ).arg( KGlobal::locale() ->formatNumber( fsize, 1 ) );
+ s = i18n( "%1 TB" ).tqarg( KGlobal::locale() ->formatNumber( fsize, 1 ) );
}
// Giga-byte
else if ( size >= 1048576 ) {
fsize = ( float ) size / ( float ) 1048576;
- s = i18n( "%1 GB" ).arg( KGlobal::locale() ->formatNumber( fsize, 1 ) );
+ s = i18n( "%1 GB" ).tqarg( KGlobal::locale() ->formatNumber( fsize, 1 ) );
}
// Mega-byte
else if ( size > 1024 ) {
fsize = ( float ) size / ( float ) 1024;
- s = i18n( "%1 MB" ).arg( KGlobal::locale() ->formatNumber( fsize, 1 ) );
+ s = i18n( "%1 MB" ).tqarg( KGlobal::locale() ->formatNumber( fsize, 1 ) );
}
// Kilo-byte
else {
fsize = ( float ) size;
- s = i18n( "%1 KB" ).arg( KGlobal::locale() ->formatNumber( fsize, 0 ) );
+ s = i18n( "%1 KB" ).tqarg( KGlobal::locale() ->formatNumber( fsize, 0 ) );
}
return s;
}
@@ -262,7 +262,7 @@ void KMountMan::quickList() {
// also, populate a small array with the actions
if ( _actions )
delete[] _actions;
- _actions = new QString[ possible.size() ];
+ _actions = new TQString[ possible.size() ];
KMountPoint::List::iterator it;
KMountPoint *m;
@@ -283,26 +283,26 @@ void KMountMan::quickList() {
}
}
// add the item to the menu
- _actions[ idx ] = QString( needUmount ? "_U_" : "_M_" ) + m->mountPoint();
- QString text = QString( ( needUmount ? i18n( "Unmount" ) : i18n( "Mount" ) ) ) + " " + m->mountPoint() +
+ _actions[ idx ] = TQString( needUmount ? "_U_" : "_M_" ) + m->mountPoint();
+ TQString text = TQString( ( needUmount ? i18n( "Unmount" ) : i18n( "Mount" ) ) ) + " " + m->mountPoint() +
" (" + m->mountedFrom() + ")";
( ( KToolBarPopupAction* ) krMountMan ) ->popupMenu() ->insertItem( text, idx );
}
- connect( ( ( KToolBarPopupAction* ) krMountMan ) ->popupMenu(), SIGNAL( activated( int ) ),
- this, SLOT( delayedPerformAction( int ) ) );
+ connect( ( ( KToolBarPopupAction* ) krMountMan ) ->popupMenu(), TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( delayedPerformAction( int ) ) );
}
void KMountMan::delayedPerformAction( int idx ) {
__delayedIdx = idx;
- QTimer::singleShot(0, this, SLOT(performAction(int)));
+ TQTimer::singleShot(0, this, TQT_SLOT(performAction(int)));
}
void KMountMan::performAction( int idx ) {
- while ( qApp->hasPendingEvents() )
- qApp->processEvents();
+ while ( tqApp->hasPendingEvents() )
+ tqApp->processEvents();
// ugly !!! take idx from the value put there by delayedPerformAction so
// as to NOT DIE because of a processEvents deadlock!!! @#$@!@
@@ -311,7 +311,7 @@ void KMountMan::performAction( int idx ) {
if ( idx < 0 )
return ;
bool domount = _actions[ idx ].left( 3 ) == "_M_";
- QString mountPoint = _actions[ idx ].mid( 3 );
+ TQString mountPoint = _actions[ idx ].mid( 3 );
if ( !domount ) { // umount
unmount( mountPoint);
} else { // mount
@@ -321,7 +321,7 @@ void KMountMan::performAction( int idx ) {
// free memory
delete[] _actions;
_actions = 0L;
- disconnect( ( ( KToolBarPopupAction* ) krMountMan ) ->popupMenu(), SIGNAL( activated( int ) ), 0, 0 );
+ disconnect( ( ( KToolBarPopupAction* ) krMountMan ) ->popupMenu(), TQT_SIGNAL( activated( int ) ), 0, 0 );
}
#include "kmountman.moc"
diff --git a/krusader/MountMan/kmountman.h b/krusader/MountMan/kmountman.h
index 67c6509..67216a7 100644
--- a/krusader/MountMan/kmountman.h
+++ b/krusader/MountMan/kmountman.h
@@ -31,8 +31,8 @@ A
#define KMOUNTMAN_H
// QT includes
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
// KDE includes
#include <kdeversion.h>
@@ -47,27 +47,28 @@ A
class KMountManGUI;
-class KMountMan : public QObject {
+class KMountMan : public TQObject {
Q_OBJECT
+ TQ_OBJECT
friend class KMountManGUI;
public:
- enum mntStatus {DOESNT_EXIST, NOT_MOUNTED, MOUNTED};
+ enum mnttqStatus {DOESNT_EXIST, NOT_MOUNTED, MOUNTED};
inline bool operational() {
return Operational;
} // check this 1st
void mainWindow(); // opens up the GUI
- void mount( QString mntPoint, bool blocking=true ); // this is probably what you need for mount
- void unmount( QString mntPoint, bool blocking=true ); // this is probably what you need for unmount
- mntStatus getStatus( QString mntPoint ); // return the status of a mntPoint (if any)
- void autoMount( QString path ); // just call it before refreshing into a dir
- static void eject( QString mntPoint );
- bool ejectable( QString path );
- QString convertSize( KIO::filesize_t size );
- bool invalidFilesystem(QString type);
- bool nonmountFilesystem(QString type, QString mntPoint);
+ void mount( TQString mntPoint, bool blocking=true ); // this is probably what you need for mount
+ void unmount( TQString mntPoint, bool blocking=true ); // this is probably what you need for unmount
+ mnttqStatus gettqStatus( TQString mntPoint ); // return the status of a mntPoint (if any)
+ void autoMount( TQString path ); // just call it before refreshing into a dir
+ static void eject( TQString mntPoint );
+ bool ejectable( TQString path );
+ TQString convertSize( KIO::filesize_t size );
+ bool invalidFilesystem(TQString type);
+ bool nonmountFilesystem(TQString type, TQString mntPoint);
KMountMan();
~KMountMan();
@@ -82,21 +83,21 @@ protected slots:
protected:
// used internally
- static KMountPoint *findInListByMntPoint(KMountPoint::List &lst, QString value);
- void toggleMount( QString mntPoint );
+ static KMountPoint *findInListByMntPoint(KMountPoint::List &lst, TQString value);
+ void toggleMount( TQString mntPoint );
private:
- QString *_actions;
+ TQString *_actions;
private:
bool Operational; // if false, something went terribly wrong on startup
bool waiting; // used to block krusader while waiting for (un)mount operation
KMountManGUI *mountManGui;
// the following is the FS type
- QStringList invalid_fs;
- QStringList nonmount_fs;
+ TQStringList invalid_fs;
+ TQStringList nonmount_fs;
// the following is the FS name
- QStringList nonmount_fs_mntpoint;
+ TQStringList nonmount_fs_mntpoint;
};
#endif
diff --git a/krusader/MountMan/kmountmangui.cpp b/krusader/MountMan/kmountmangui.cpp
index 540f102..030bfd5 100644
--- a/krusader/MountMan/kmountmangui.cpp
+++ b/krusader/MountMan/kmountmangui.cpp
@@ -38,17 +38,17 @@ A
#include "../defaults.h"
#include "../VFS/vfs.h"
#include <klocale.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kpopupmenu.h>
-#include <qbitmap.h>
+#include <tqbitmap.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
#include <kprocess.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kdebug.h>
#include <kguiitem.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <sys/param.h>
#if defined(BSD)
@@ -63,30 +63,30 @@ A
KMountManGUI::KMountManGUI() : KDialogBase( krApp, 0, true, "Mount.Man" ),
info( 0 ), mountList( 0 ) {
- watcher = new QTimer( this );
- connect( watcher, SIGNAL( timeout() ), this, SLOT( checkMountChange() ) );
+ watcher = new TQTimer( this );
+ connect( watcher, TQT_SIGNAL( timeout() ), this, TQT_SLOT( checkMountChange() ) );
- connect( this, SIGNAL( finishedGettingSpaceData() ), this, SLOT( updateList() ) );
+ connect( this, TQT_SIGNAL( finishedGettingSpaceData() ), this, TQT_SLOT( updateList() ) );
setButtonOK( i18n( "&Close" ) );
showButtonApply( false ); showButtonCancel( false );
setPlainCaption( i18n( "MountMan - Your Mount-Manager" ) );
widget = new KJanusWidget( this, 0, KJanusWidget::Tabbed );
createLayout();
setMainWidget( widget );
- widget->setMinimumSize( widget->sizeHint().width() + mountList->columnWidth( 5 ),
- widget->sizeHint().height() );
- setMinimumSize( widget->minimumSize().width(), widget->minimumSize().height() );
- resize( minimumSize() );
+ widget->setMinimumSize( widget->tqsizeHint().width() + mountList->columnWidth( 5 ),
+ widget->tqsizeHint().height() );
+ setMinimumSize( widget->tqminimumSize().width(), widget->tqminimumSize().height() );
+ resize( tqminimumSize() );
// connections
- connect( mountList, SIGNAL( doubleClicked( QListViewItem * ) ), this,
- SLOT( doubleClicked( QListViewItem* ) ) );
- connect( mountList, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ),
- this, SLOT( clicked( QListViewItem*, const QPoint&, int ) ) );
- connect( mountList, SIGNAL( clicked( QListViewItem * ) ), this,
- SLOT( changeActive( QListViewItem * ) ) );
- connect( mountList, SIGNAL( selectionChanged( QListViewItem * ) ), this,
- SLOT( changeActive( QListViewItem * ) ) );
+ connect( mountList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), this,
+ TQT_SLOT( doubleClicked( TQListViewItem* ) ) );
+ connect( mountList, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( clicked( TQListViewItem*, const TQPoint&, int ) ) );
+ connect( mountList, TQT_SIGNAL( clicked( TQListViewItem * ) ), this,
+ TQT_SLOT( changeActive( TQListViewItem * ) ) );
+ connect( mountList, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), this,
+ TQT_SLOT( changeActive( TQListViewItem * ) ) );
getSpaceData();
exec();
@@ -111,18 +111,18 @@ void KMountManGUI::createMainPage() {
mountList = 0;
}
// clean up is finished...
- QGridLayout *layout = new QGridLayout( mainPage, 1, 1 );
- mountList = new QListView( mainPage ); // create the main container
+ TQGridLayout *tqlayout = new TQGridLayout( mainPage, 1, 1 );
+ mountList = new TQListView( mainPage ); // create the main container
krConfig->setGroup( "Look&Feel" );
mountList->setFont( krConfig->readFontEntry( "Filelist Font", _FilelistFont ) );
mountList->setAllColumnsShowFocus( true );
mountList->setMultiSelection( false );
- mountList->setSelectionMode( QListView::Single );
- mountList->setVScrollBarMode( QScrollView::AlwaysOn );
- mountList->setHScrollBarMode( QScrollView::Auto );
+ mountList->setSelectionMode( TQListView::Single );
+ mountList->setVScrollBarMode( TQScrollView::AlwaysOn );
+ mountList->setHScrollBarMode( TQScrollView::Auto );
mountList->setShowSortIndicator( true );
- int i = QFontMetrics( mountList->font() ).width( "W" );
- int j = QFontMetrics( mountList->font() ).width( "0" );
+ int i = TQFontMetrics( mountList->font() ).width( "W" );
+ int j = TQFontMetrics( mountList->font() ).width( "0" );
j = ( i > j ? i : j );
mountList->addColumn( i18n( "Name" ), j * 8 );
mountList->addColumn( i18n( "Type" ), j * 4 );
@@ -130,20 +130,20 @@ void KMountManGUI::createMainPage() {
mountList->addColumn( i18n( "Total Size" ), j * 6 );
mountList->addColumn( i18n( "Free Size" ), j * 6 );
mountList->addColumn( i18n( "Free %" ), j * 5 );
- mountList->setColumnWidthMode( 0, QListView::Maximum );
- mountList->setColumnWidthMode( 1, QListView::Maximum );
- mountList->setColumnWidthMode( 2, QListView::Maximum );
- mountList->setColumnWidthMode( 3, QListView::Maximum );
- mountList->setColumnWidthMode( 4, QListView::Maximum );
- mountList->setColumnWidthMode( 5, QListView::Maximum );
+ mountList->setColumnWidthMode( 0, TQListView::Maximum );
+ mountList->setColumnWidthMode( 1, TQListView::Maximum );
+ mountList->setColumnWidthMode( 2, TQListView::Maximum );
+ mountList->setColumnWidthMode( 3, TQListView::Maximum );
+ mountList->setColumnWidthMode( 4, TQListView::Maximum );
+ mountList->setColumnWidthMode( 5, TQListView::Maximum );
// now the list is created, time to fill it with data.
//=>krMtMan.forceUpdate();
- QGroupBox *box = new QGroupBox( "MountMan.Info", mainPage );
- box->setAlignment( Qt::AlignHCenter );
+ TQGroupBox *box = new TQGroupBox( "MountMan.Info", mainPage );
+ box->tqsetAlignment( TQt::AlignHCenter );
info = new KRFSDisplay( box );
info->resize( info->width(), height() );
- layout->addWidget( box, 0, 0 );
- layout->addWidget( mountList, 0, 1 );
+ tqlayout->addWidget( box, 0, 0 );
+ tqlayout->addWidget( mountList, 0, 1 );
}
void KMountManGUI::getSpaceData() {
@@ -165,9 +165,9 @@ void KMountManGUI::getSpaceData() {
continue;
}
KDiskFreeSp *sp = KDiskFreeSp::findUsageInfo( ( *it ) ->mountPoint() );
- connect( sp, SIGNAL( foundMountPoint( const QString &, unsigned long, unsigned long, unsigned long ) ),
- this, SLOT( gettingSpaceData( const QString&, unsigned long, unsigned long, unsigned long ) ) );
- connect( sp, SIGNAL( done() ), this, SLOT( gettingSpaceData() ) );
+ connect( sp, TQT_SIGNAL( foundMountPoint( const TQString &, unsigned long, unsigned long, unsigned long ) ),
+ this, TQT_SLOT( gettingSpaceData( const TQString&, unsigned long, unsigned long, unsigned long ) ) );
+ connect( sp, TQT_SIGNAL( done() ), this, TQT_SLOT( gettingSpaceData() ) );
}
}
@@ -180,7 +180,7 @@ void KMountManGUI::gettingSpaceData() {
}
}
-void KMountManGUI::gettingSpaceData( const QString &mountPoint, unsigned long kBSize,
+void KMountManGUI::gettingSpaceData( const TQString &mountPoint, unsigned long kBSize,
unsigned long /*kBUsed*/, unsigned long kBAvail ) {
KMountPoint *m = KMountMan::findInListByMntPoint( mounted, mountPoint );
if ( !m ) { // this should never never never happen!
@@ -198,26 +198,26 @@ void KMountManGUI::gettingSpaceData( const QString &mountPoint, unsigned long kB
fileSystemsTemp.append( data );
}
-void KMountManGUI::addItemToMountList( QListView *lst, fsData &fs ) {
+void KMountManGUI::addItemToMountList( TQListView *lst, fsData &fs ) {
bool mtd = fs.mounted();
- QString tSize = QString( "%1" ).arg( KIO::convertSizeFromKB( fs.totalBlks() ) );
- QString fSize = QString( "%1" ).arg( KIO::convertSizeFromKB( fs.freeBlks() ) );
- QString sPrct = QString( "%1%" ).arg( 100 - ( fs.usedPerct() ) );
- QListViewItem *item = new QListViewItem( lst, fs.name(),
+ TQString tSize = TQString( "%1" ).tqarg( KIO::convertSizeFromKB( fs.totalBlks() ) );
+ TQString fSize = TQString( "%1" ).tqarg( KIO::convertSizeFromKB( fs.freeBlks() ) );
+ TQString sPrct = TQString( "%1%" ).tqarg( 100 - ( fs.usedPerct() ) );
+ TQListViewItem *item = new TQListViewItem( lst, fs.name(),
fs.type(), fs.mntPoint(),
- ( mtd ? tSize : QString( "N/A" ) ), ( mtd ? fSize : QString( "N/A" ) ),
- ( mtd ? sPrct : QString( "N/A" ) ) );
+ ( mtd ? tSize : TQString( "N/A" ) ), ( mtd ? fSize : TQString( "N/A" ) ),
+ ( mtd ? sPrct : TQString( "N/A" ) ) );
- QString id = fs.name().left(7); // only works assuming devices start with "/dev/XX"
- QPixmap *icon = 0;
+ TQString id = fs.name().left(7); // only works assuming devices start with "/dev/XX"
+ TQPixmap *icon = 0;
if ( id == "/dev/fd") {
- icon = new QPixmap( LOADICON( mtd ? "3floppy_mount" : "3floppy_unmount" ) );
+ icon = new TQPixmap( LOADICON( mtd ? "3floppy_mount" : "3floppy_unmount" ) );
} else if ( id == "/dev/cd" || fs.type() == "iso9660" ) {
- icon = new QPixmap( LOADICON( mtd ? "cdrom_mount" : "cdrom_unmount" ) );
+ icon = new TQPixmap( LOADICON( mtd ? "cdrom_mount" : "cdrom_unmount" ) );
} else if ( fs.type() == "nfs" || fs.type() == "smbfs" ) {
- icon = new QPixmap( LOADICON( mtd ? "nfs_mount" : "nfs_unmount" ) );
- } else icon = new QPixmap( LOADICON( mtd ? "hdd_mount" : "hdd_unmount" ) );
+ icon = new TQPixmap( LOADICON( mtd ? "nfs_mount" : "nfs_unmount" ) );
+ } else icon = new TQPixmap( LOADICON( mtd ? "hdd_mount" : "hdd_unmount" ) );
item->setPixmap( 0, *icon );
delete icon;
@@ -226,7 +226,7 @@ void KMountManGUI::addItemToMountList( QListView *lst, fsData &fs ) {
void KMountManGUI::updateList() {
mountList->clear();
// this handles the mounted ones
- for ( QValueList<fsData>::iterator it = fileSystems.begin(); it != fileSystems.end() ; ++it ) {
+ for ( TQValueList<fsData>::iterator it = fileSystems.begin(); it != fileSystems.end() ; ++it ) {
if (krMtMan.invalidFilesystem((*it).type())) {
continue;
}
@@ -254,7 +254,7 @@ void KMountManGUI::updateList() {
mountList->clearSelection();
if ( info ) {
info->setEmpty( true );
- info->repaint();
+ info->tqrepaint();
}
watcher->start( WATCHER_DELAY, true ); // starting the watch timer ( single shot )
}
@@ -265,24 +265,24 @@ void KMountManGUI::checkMountChange() {
watcher->start( WATCHER_DELAY, true ); // starting the watch timer ( single shot )
}
-void KMountManGUI::doubleClicked( QListViewItem *i ) {
+void KMountManGUI::doubleClicked( TQListViewItem *i ) {
if ( !i )
return; // we don't want to refresh to swap, do we ?
// change the active panel to this mountpoint
- connect( ( QObject* ) this, SIGNAL( refreshPanel( const KURL & ) ), ( QObject* ) SLOTS,
- SLOT( refresh( const KURL & ) ) );
+ connect( ( TQObject* ) this, TQT_SIGNAL( refreshPanel( const KURL & ) ), ( TQObject* ) SLOTS,
+ TQT_SLOT( refresh( const KURL & ) ) );
emit refreshPanel( vfs::fromPathOrURL( i->text(2) ) ); // text(2) ? so ugly ...
- disconnect( this, SIGNAL( refreshPanel( const KURL & ) ), 0, 0 );
+ disconnect( this, TQT_SIGNAL( refreshPanel( const KURL & ) ), 0, 0 );
slotClose();
}
// when user clicks on a filesystem, change information
-void KMountManGUI::changeActive( QListViewItem *i ) {
+void KMountManGUI::changeActive( TQListViewItem *i ) {
if ( !i ) return ;
fsData *system = 0;
- for (QValueList<fsData>::Iterator it = fileSystems.begin(); it != fileSystems.end(); ++it) {
+ for (TQValueList<fsData>::Iterator it = fileSystems.begin(); it != fileSystems.end(); ++it) {
// the only thing which is unique is the mount point
if ((*it).mntPoint() == i->text(2)) { // text(2) ? ugly ugly ugly
system = &(*it);
@@ -300,11 +300,11 @@ void KMountManGUI::changeActive( QListViewItem *i ) {
info->setEmpty( false );
info->setTotalSpace( system->totalBlks() );
info->setFreeSpace( system->freeBlks() );
- info->repaint();
+ info->tqrepaint();
}
// called when right-clicked on a filesystem
-void KMountManGUI::clicked( QListViewItem *item, const QPoint& pos, int /* col */ ) {
+void KMountManGUI::clicked( TQListViewItem *item, const TQPoint& pos, int /* col */ ) {
// these are the values that will exist in the menu
#define MOUNT_ID 90
#define UNMOUNT_ID 91
@@ -314,7 +314,7 @@ void KMountManGUI::clicked( QListViewItem *item, const QPoint& pos, int /* col *
if ( !item ) return ;
fsData *system = 0;
- for (QValueList<fsData>::Iterator it = fileSystems.begin(); it != fileSystems.end(); ++it) {
+ for (TQValueList<fsData>::Iterator it = fileSystems.begin(); it != fileSystems.end(); ++it) {
// the only thing which is unique is the mount point
if ((*it).mntPoint() == item->text(2)) { // text(2) ? ugly ugly ugly
system = &(*it);
@@ -346,7 +346,7 @@ void KMountManGUI::clicked( QListViewItem *item, const QPoint& pos, int /* col *
popup.setItemEnabled( FORMAT_ID, false );
}
- QString mountPoint = system->mntPoint();
+ TQString mountPoint = system->mntPoint();
int result = popup.exec( pos );
// check out the user's option
@@ -378,12 +378,12 @@ bool KrMountDetector::hasMountsChanged() {
md5.update((*i)->mountPoint().utf8());
md5.update((*i)->mountType().utf8());
}
- QString s = md5.hexDigest();
+ TQString s = md5.hexDigest();
bool result = s != checksum;
checksum = s;
#else
- bool result = QFileInfo(MTAB).lastModified() != lastMtab;
- lastMtab = QFileInfo(MTAB).lastModified();
+ bool result = TQFileInfo(MTAB).lastModified() != lastMtab;
+ lastMtab = TQFileInfo(MTAB).lastModified();
#endif
return result;
}
diff --git a/krusader/MountMan/kmountmangui.h b/krusader/MountMan/kmountmangui.h
index f379b5d..f07aa28 100644
--- a/krusader/MountMan/kmountmangui.h
+++ b/krusader/MountMan/kmountmangui.h
@@ -35,13 +35,13 @@
#include <sys/param.h>
#include <kdialogbase.h>
-#include <qlistview.h>
+#include <tqlistview.h>
#include <kjanuswidget.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kurl.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kmountpoint.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "kmountman.h"
#define WATCHER_DELAY 3000
@@ -55,6 +55,7 @@ class fsData;
class KMountManGUI : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
enum Pages {
Filesystems = 0
@@ -63,23 +64,23 @@ class KMountManGUI : public KDialogBase {
public:
KMountManGUI();
~KMountManGUI();
- void createLayout(); // calls the various tab layout-creators
+ void createLayout(); // calls the various tab tqlayout-creators
void createMainPage(); // creator of the main page - filesystems
protected slots:
- void doubleClicked( QListViewItem * );
- void clicked( QListViewItem *, const QPoint& pos, int col );
- void changeActive( QListViewItem * );
+ void doubleClicked( TQListViewItem * );
+ void clicked( TQListViewItem *, const TQPoint& pos, int col );
+ void changeActive( TQListViewItem * );
void checkMountChange(); // check whether the mount table was changed
void updateList(); // fill-up the filesystems list
void getSpaceData();
void gettingSpaceData();
- void gettingSpaceData(const QString &mountPoint, unsigned long kBSize,
+ void gettingSpaceData(const TQString &mountPoint, unsigned long kBSize,
unsigned long kBUsed, unsigned long kBAvail);
protected:
- void addItemToMountList( QListView *lst, fsData &fs );
+ void addItemToMountList( TQListView *lst, fsData &fs );
signals:
void refreshPanel( const KURL & );
@@ -87,15 +88,15 @@ signals:
private:
KRFSDisplay *info;
- QFrame *mainPage;
+ TQFrame *mainPage;
KJanusWidget *widget;
- QListView *mountList;
- QTimer *watcher;
- QDateTime lastMtab;
+ TQListView *mountList;
+ TQTimer *watcher;
+ TQDateTime lastMtab;
// used for the getSpace - gotSpace functions
KMountPoint::List possible, mounted;
- QValueList<fsData> fileSystems;
- QValueList<fsData> fileSystemsTemp; // first collect to a temporary place
+ TQValueList<fsData> fileSystems;
+ TQValueList<fsData> fileSystemsTemp; // first collect to a temporary place
int numOfMountPoints;
};
@@ -110,16 +111,16 @@ public:
FreeBlks( 0 ), Mounted( false ) {}
// get information
- inline QString name() {
+ inline TQString name() {
return Name;
}
- inline QString shortName() {
- return Name.right( Name.length() - Name.find( "/", 1 ) - 1 );
+ inline TQString shortName() {
+ return Name.right( Name.length() - Name.tqfind( "/", 1 ) - 1 );
}
- inline QString type() {
+ inline TQString type() {
return Type;
}
- inline QString mntPoint() {
+ inline TQString mntPoint() {
return MntPoint;
}
inline long totalBlks() {
@@ -149,13 +150,13 @@ public:
}
// set information
- inline void setName( QString n_ ) {
+ inline void setName( TQString n_ ) {
Name = n_;
}
- inline void setType( QString t_ ) {
+ inline void setType( TQString t_ ) {
Type = t_;
}
- inline void setMntPoint( QString m_ ) {
+ inline void setMntPoint( TQString m_ ) {
MntPoint = m_;
}
inline void setTotalBlks( long t_ ) {
@@ -169,23 +170,23 @@ public:
}
private:
- QString Name; // i.e: /dev/cdrom
- QString Type; // i.e: iso9600
- QString MntPoint; // i.e: /mnt/cdrom
+ TQString Name; // i.e: /dev/cdrom
+ TQString Type; // i.e: iso9600
+ TQString MntPoint; // i.e: /mnt/cdrom
long TotalBlks; // measured in 1024bytes per block
long FreeBlks;
bool Mounted; // true if filesystem is mounted
// additional attributes of a filesystem, parsed from fstab
public:
- QString options; // additional fstab options
+ TQString options; // additional fstab options
};
class KrMountDetector {
#if defined(BSD)
- QString checksum;
+ TQString checksum;
#else
- QDateTime lastMtab;
+ TQDateTime lastMtab;
#endif
public:
KrMountDetector();
diff --git a/krusader/Panel/krbriefview.cpp b/krusader/Panel/krbriefview.cpp
index 1fe8a36..734fb33 100644
--- a/krusader/Panel/krbriefview.cpp
+++ b/krusader/Panel/krbriefview.cpp
@@ -38,8 +38,8 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#include "../VFS/krarchandler.h"
#include "../VFS/krquery.h"
#include "../Dialogs/krspecialwidgets.h"
-#include <qheader.h>
-#include <qtooltip.h>
+#include <tqheader.h>
+#include <tqtooltip.h>
#define CANCEL_TWO_CLICK_RENAME {singleClicked = false;renameTimer.stop();}
#define PROPS static_cast<KrBriefViewProperties*>(_properties)
@@ -47,43 +47,43 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#define VF getVfile()
-class KrBriefViewToolTip : public QToolTip
+class KrBriefViewToolTip : public TQToolTip
{
public:
- KrBriefViewToolTip( KrBriefView *view, QWidget *parent );
- void maybeTip( const QPoint &pos );
+ KrBriefViewToolTip( KrBriefView *view, TQWidget *tqparent );
+ void maybeTip( const TQPoint &pos );
virtual ~KrBriefViewToolTip() {}
private:
KrBriefView *view;
};
-KrBriefViewToolTip::KrBriefViewToolTip( KrBriefView *lv, QWidget *parent )
- : QToolTip( parent ), view( lv )
+KrBriefViewToolTip::KrBriefViewToolTip( KrBriefView *lv, TQWidget *tqparent )
+ : TQToolTip( tqparent ), view( lv )
{
}
-void KrBriefViewToolTip::maybeTip( const QPoint &pos )
+void KrBriefViewToolTip::maybeTip( const TQPoint &pos )
{
- QIconViewItem *item = view->findItem( view->viewportToContents( pos ) );
+ TQIconViewItem *item = view->tqfindItem( view->viewportToContents( pos ) );
if ( !item )
return;
- int width = QFontMetrics( view->font() ).width( item->text() ) + 4;
+ int width = TQFontMetrics( view->font() ).width( item->text() ) + 4;
- QRect r = item->rect();
+ TQRect r = item->rect();
r.setTopLeft( view->contentsToViewport( r.topLeft() ) );
if( width > item->textRect().width() )
tip( r, item->text() );
}
-KrBriefView::KrBriefView( QHeader * headerIn, QWidget *parent, bool &left, KConfig *cfg, const char *name ):
- KIconView(parent, name), KrView( cfg ), header( headerIn ), _currDragItem( 0 ),
+KrBriefView::KrBriefView( TQHeader * headerIn, TQWidget *tqparent, bool &left, KConfig *cfg, const char *name ):
+ KIconView(tqparent, name), KrView( cfg ), header( headerIn ), _currDragItem( 0 ),
currentlyRenamedItem( 0 ), pressedItem( 0 ), mouseEvent( 0 ) {
setWidget( this );
- _nameInKConfig = QString( "KrBriefView" ) + QString( ( left ? "Left" : "Right" ) );
+ _nameInKConfig = TQString( "KrBriefView" ) + TQString( ( left ? "Left" : "Right" ) );
krConfig->setGroup("Private");
if (krConfig->readBoolEntry("Enable Input Method", true))
setInputMethodEnabled(true);
@@ -99,23 +99,23 @@ void KrBriefView::setup() {
// decide on single click/double click selection
if ( _config->readBoolEntry( "Single Click Selects", _SingleClickSelects ) &&
KGlobalSettings::singleClick() ) {
- connect( this, SIGNAL( executed( QIconViewItem* ) ), this, SLOT( slotExecuted( QIconViewItem* ) ) );
+ connect( this, TQT_SIGNAL( executed( TQIconViewItem* ) ), this, TQT_SLOT( slotExecuted( TQIconViewItem* ) ) );
} else {
- connect( this, SIGNAL( clicked( QIconViewItem* ) ), this, SLOT( slotClicked( QIconViewItem* ) ) );
- connect( this, SIGNAL( doubleClicked( QIconViewItem* ) ), this, SLOT( slotDoubleClicked( QIconViewItem* ) ) );
+ connect( this, TQT_SIGNAL( clicked( TQIconViewItem* ) ), this, TQT_SLOT( slotClicked( TQIconViewItem* ) ) );
+ connect( this, TQT_SIGNAL( doubleClicked( TQIconViewItem* ) ), this, TQT_SLOT( slotDoubleClicked( TQIconViewItem* ) ) );
}
// a change in the selection needs to update totals
- connect( this, SIGNAL( onItem( QIconViewItem* ) ), this, SLOT( slotItemDescription( QIconViewItem* ) ) );
- connect( this, SIGNAL( contextMenuRequested( QIconViewItem*, const QPoint& ) ),
- this, SLOT( handleContextMenu( QIconViewItem*, const QPoint& ) ) );
- connect( this, SIGNAL( rightButtonPressed(QIconViewItem*, const QPoint&)),
- this, SLOT(slotRightButtonPressed(QIconViewItem*, const QPoint&)));
- connect( this, SIGNAL( currentChanged( QIconViewItem* ) ), this, SLOT( setNameToMakeCurrent( QIconViewItem* ) ) );
- connect( this, SIGNAL( currentChanged( QIconViewItem* ) ), this, SLOT( transformCurrentChanged( QIconViewItem* ) ) );
- connect( this, SIGNAL( mouseButtonClicked ( int, QIconViewItem *, const QPoint & ) ),
- this, SLOT( slotMouseClicked ( int, QIconViewItem *, const QPoint & ) ) );
- connect( &KrColorCache::getColorCache(), SIGNAL( colorsRefreshed() ), this, SLOT( refreshColors() ) );
+ connect( this, TQT_SIGNAL( onItem( TQIconViewItem* ) ), this, TQT_SLOT( slotItemDescription( TQIconViewItem* ) ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested( TQIconViewItem*, const TQPoint& ) ),
+ this, TQT_SLOT( handleContextMenu( TQIconViewItem*, const TQPoint& ) ) );
+ connect( this, TQT_SIGNAL( rightButtonPressed(TQIconViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotRightButtonPressed(TQIconViewItem*, const TQPoint&)));
+ connect( this, TQT_SIGNAL( currentChanged( TQIconViewItem* ) ), this, TQT_SLOT( setNameToMakeCurrent( TQIconViewItem* ) ) );
+ connect( this, TQT_SIGNAL( currentChanged( TQIconViewItem* ) ), this, TQT_SLOT( transformCurrentChanged( TQIconViewItem* ) ) );
+ connect( this, TQT_SIGNAL( mouseButtonClicked ( int, TQIconViewItem *, const TQPoint & ) ),
+ this, TQT_SLOT( slotMouseClicked ( int, TQIconViewItem *, const TQPoint & ) ) );
+ connect( &KrColorCache::getColorCache(), TQT_SIGNAL( colorsRefreshed() ), this, TQT_SLOT( refreshColors() ) );
// add whatever columns are needed to the listview
krConfig->setGroup( nameInKConfig() );
@@ -123,22 +123,22 @@ void KrBriefView::setup() {
// determine basic settings for the view
setAcceptDrops( true );
setItemsMovable( false );
- setItemTextPos( QIconView::Right );
- setArrangement( QIconView::TopToBottom );
+ setItemTextPos( TQIconView::Right );
+ setArrangement( TQIconView::TopToBottom );
setWordWrapIconText( false );
setSpacing( 0 );
horizontalScrollBar()->installEventFilter( this );
// allow in-place renaming
- connect( this, SIGNAL( itemRenamed ( QIconViewItem * ) ),
- this, SLOT( inplaceRenameFinished( QIconViewItem * ) ) );
- connect( &renameTimer, SIGNAL( timeout() ), this, SLOT( renameCurrentItem() ) );
- connect( &contextMenuTimer, SIGNAL (timeout()), this, SLOT (showContextMenu()));
+ connect( this, TQT_SIGNAL( itemRenamed ( TQIconViewItem * ) ),
+ this, TQT_SLOT( inplaceRenameFinished( TQIconViewItem * ) ) );
+ connect( &renameTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( renameCurrentItem() ) );
+ connect( &contextMenuTimer, TQT_SIGNAL (timeout()), this, TQT_SLOT (showContextMenu()));
- setSelectionMode( QIconView::Extended );
+ setSelectionMode( TQIconView::Extended );
- setFocusPolicy( StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
restoreSettings();
refreshColors();
@@ -151,8 +151,8 @@ void KrBriefView::setup() {
header->addLabel( i18n( "Name" ) );
header->setStretchEnabled( true );
- header->setSortIndicator( 0, sortDirection() ? Qt::Ascending : Qt::Descending );
- connect( header, SIGNAL(clicked( int )), this, SLOT( changeSortOrder()));
+ header->setSortIndicator( 0, sortDirection() ? TQt::Ascending : TQt::Descending );
+ connect( header, TQT_SIGNAL(clicked( int )), this, TQT_SLOT( changeSortOrder()));
header->installEventFilter( this );
header->show();
@@ -167,13 +167,13 @@ KrBriefView::~KrBriefView() {
delete toolTip;
}
-void KrBriefView::resizeEvent ( QResizeEvent * resEvent )
+void KrBriefView::resizeEvent ( TQResizeEvent * resEvent )
{
- QPoint pnt( contentsX(), contentsY() );
- QRect viewportRect( pnt, resEvent->oldSize() );
+ TQPoint pnt( contentsX(), contentsY() );
+ TQRect viewportRect( pnt, resEvent->oldSize() );
bool visible = false;
if( currentItem() )
- visible = viewportRect.contains( currentItem()->rect() );
+ visible = viewportRect.tqcontains( currentItem()->rect() );
KIconView::resizeEvent( resEvent );
redrawColumns();
@@ -190,9 +190,9 @@ void KrBriefView::redrawColumns()
setGridX( width() / PROPS->numberOfColumns );
// QT bug, it's important for recalculating the bounding rectangle
- for( QIconViewItem * item = firstItem(); item; item = item->nextItem() )
+ for( TQIconViewItem * item = firstItem(); item; item = item->nextItem() )
{
- QString txt = item->text();
+ TQString txt = item->text();
item->setText( "" );
item->setText( txt );
}
@@ -239,17 +239,17 @@ bool KrBriefView::preDelItem(KrViewItem *item) {
}
void KrBriefView::addItems( vfs *v, bool addUpDir ) {
- QIconViewItem * item = firstItem();
- QIconViewItem * currentItem = item;
+ TQIconViewItem * item = firstItem();
+ TQIconViewItem * currentItem = item;
// add the up-dir arrow if needed
if ( addUpDir ) {
- new KrBriefViewItem( this, ( QIconViewItem* ) 0L, ( vfile* ) 0L );
+ new KrBriefViewItem( this, ( TQIconViewItem* ) 0L, ( vfile* ) 0L );
}
// text for updating the status bar
- QString statusText = QString("%1/ ").arg( v->vfs_getOrigin().fileName() ) + i18n("Directory");
+ TQString statusText = TQString("%1/ ").tqarg( v->vfs_getOrigin().fileName() ) + i18n("Directory");
bool as = sortDirection();
setSorting( false, as ); // disable sorting
@@ -288,7 +288,7 @@ void KrBriefView::addItems( vfs *v, bool addUpDir ) {
// if the item should be current - make it so
if ( bvitem->name() == nameToMakeCurrent() )
{
- currentItem = static_cast<QIconViewItem*>(bvitem);
+ currentItem = static_cast<TQIconViewItem*>(bvitem);
statusText = bvitem->description();
}
}
@@ -306,20 +306,20 @@ void KrBriefView::addItems( vfs *v, bool addUpDir ) {
op()->emitItemDescription( statusText );
}
-void KrBriefView::delItem( const QString &name ) {
+void KrBriefView::delItem( const TQString &name ) {
KrView::delItem( name );
arrangeItemsInGrid();
}
-QString KrBriefView::getCurrentItem() const {
- QIconViewItem * it = currentItem();
+TQString KrBriefView::getCurrentItem() const {
+ TQIconViewItem * it = currentItem();
if ( !it )
- return QString::null;
+ return TQString();
else
return dynamic_cast<KrViewItem*>( it ) ->name();
}
-void KrBriefView::setCurrentItem( const QString& name ) {
+void KrBriefView::setCurrentItem( const TQString& name ) {
KrBriefViewItem * it = dynamic_cast<KrBriefViewItem*>(_dict[ name ]);
if ( it )
KIconView::setCurrentItem( it );
@@ -336,7 +336,7 @@ void KrBriefView::clear() {
KrView::clear();
}
-void KrBriefView::slotClicked( QIconViewItem *item ) {
+void KrBriefView::slotClicked( TQIconViewItem *item ) {
if ( !item ) return ;
if ( !modifierPressed ) {
@@ -345,7 +345,7 @@ void KrBriefView::slotClicked( QIconViewItem *item ) {
config->setGroup( "KDE" );
int doubleClickInterval = config->readNumEntry( "DoubleClickInterval", 400 );
- int msecsFromLastClick = clickTime.msecsTo( QTime::currentTime() );
+ int msecsFromLastClick = clickTime.msecsTo( TQTime::currentTime() );
if ( msecsFromLastClick > doubleClickInterval && msecsFromLastClick < 5 * doubleClickInterval ) {
singleClicked = false;
@@ -356,16 +356,16 @@ void KrBriefView::slotClicked( QIconViewItem *item ) {
CANCEL_TWO_CLICK_RENAME;
singleClicked = true;
- clickTime = QTime::currentTime();
+ clickTime = TQTime::currentTime();
clickedItem = item;
}
}
-void KrBriefView::slotDoubleClicked( QIconViewItem *item ) {
+void KrBriefView::slotDoubleClicked( TQIconViewItem *item ) {
CANCEL_TWO_CLICK_RENAME;
if ( !item )
return ;
- QString tmp = dynamic_cast<KrViewItem*>( item ) ->name();
+ TQString tmp = dynamic_cast<KrViewItem*>( item ) ->name();
op()->emitExecuted(tmp);
}
@@ -392,35 +392,35 @@ void KrBriefView::prepareForPassive() {
}
}
-void KrBriefView::slotItemDescription( QIconViewItem * item ) {
+void KrBriefView::slotItemDescription( TQIconViewItem * item ) {
KrViewItem * it = static_cast<KrBriefViewItem*>( item );
if ( !it )
return ;
- QString desc = it->description();
+ TQString desc = it->description();
op()->emitItemDescription(desc);
}
-void KrBriefView::handleQuickSearchEvent( QKeyEvent * e ) {
+void KrBriefView::handleQuickSearchEvent( TQKeyEvent * e ) {
switch ( e->key() ) {
case Key_Insert:
{
- QKeyEvent ev = QKeyEvent( QKeyEvent::KeyPress, Key_Space, 0, 0 );
+ TQKeyEvent ev = TQKeyEvent( TQKeyEvent::KeyPress, Key_Space, 0, 0 );
KIconView::keyPressEvent( & ev );
- ev = QKeyEvent( QKeyEvent::KeyPress, Key_Down, 0, 0 );
+ ev = TQKeyEvent( TQKeyEvent::KeyPress, Key_Down, 0, 0 );
keyPressEvent( & ev );
break;
}
case Key_Home:
{
- QIconView::setCurrentItem( firstItem() );
- QKeyEvent ev = QKeyEvent( QKeyEvent::KeyPress, Key_Down, 0, 0 );
+ TQIconView::setCurrentItem( firstItem() );
+ TQKeyEvent ev = TQKeyEvent( TQKeyEvent::KeyPress, Key_Down, 0, 0 );
keyPressEvent( & ev );
break;
}
case Key_End:
{
- QIconView::setCurrentItem( firstItem() );
- QKeyEvent ev = QKeyEvent( QKeyEvent::KeyPress, Key_Up, 0, 0 );
+ TQIconView::setCurrentItem( firstItem() );
+ TQKeyEvent ev = TQKeyEvent( TQKeyEvent::KeyPress, Key_Up, 0, 0 );
keyPressEvent( & ev );
break;
}
@@ -428,22 +428,22 @@ void KrBriefView::handleQuickSearchEvent( QKeyEvent * e ) {
}
-void KrBriefView::slotCurrentChanged( QIconViewItem * item ) {
+void KrBriefView::slotCurrentChanged( TQIconViewItem * item ) {
CANCEL_TWO_CLICK_RENAME;
if ( !item )
return ;
_nameToMakeCurrent = static_cast<KrBriefViewItem*>( item ) ->name();
}
-void KrBriefView::contentsMousePressEvent( QMouseEvent * e ) {
+void KrBriefView::contentsMousePressEvent( TQMouseEvent * e ) {
bool callDefaultHandler = true, processEvent = true, selectionChanged = false;
pressedItem = 0;
e = transformMouseEvent( e );
- QIconViewItem * oldCurrent = currentItem();
- QIconViewItem *newCurrent = findItem( e->pos() );
- if (e->button() == RightButton)
+ TQIconViewItem * oldCurrent = currentItem();
+ TQIconViewItem *newCurrent = tqfindItem( e->pos() );
+ if (e->button() == Qt::RightButton)
{
if (KrSelectionMode::getSelectionHandler()->rightButtonSelects() ||
(((e->state() & ShiftButton) || (e->state() & ControlButton))) && KrSelectionMode::getSelectionHandler()->shiftCtrlRightButtonSelects())
@@ -459,7 +459,7 @@ void KrBriefView::contentsMousePressEvent( QMouseEvent * e ) {
lastSwushPosition = newCurrent;
}
newCurrent->setSelected(!newCurrent->isSelected(), true);
- newCurrent->repaint();
+ newCurrent->tqrepaint();
selectionChanged = true;
}
callDefaultHandler = false;
@@ -474,7 +474,7 @@ void KrBriefView::contentsMousePressEvent( QMouseEvent * e ) {
if( newCurrent )
{
newCurrent->setSelected(!newCurrent->isSelected());
- newCurrent->repaint();
+ newCurrent->tqrepaint();
selectionChanged = true;
callDefaultHandler = false;
e->accept();
@@ -486,7 +486,7 @@ void KrBriefView::contentsMousePressEvent( QMouseEvent * e ) {
if( newCurrent )
{
newCurrent->setSelected( true );
- newCurrent->repaint();
+ newCurrent->tqrepaint();
}
selectionChanged = true;
callDefaultHandler = false;
@@ -501,7 +501,7 @@ void KrBriefView::contentsMousePressEvent( QMouseEvent * e ) {
e->accept();
}
}
- if (e->button() == LeftButton)
+ if (e->button() == Qt::LeftButton)
{
dragStartPos = e->pos();
if (KrSelectionMode::getSelectionHandler()->leftButtonSelects() ||
@@ -514,7 +514,7 @@ void KrBriefView::contentsMousePressEvent( QMouseEvent * e ) {
if (newCurrent)
{
newCurrent->setSelected(!newCurrent->isSelected(), true);
- newCurrent->repaint();
+ newCurrent->tqrepaint();
selectionChanged = true;
}
callDefaultHandler = false;
@@ -554,11 +554,11 @@ void KrBriefView::contentsMousePressEvent( QMouseEvent * e ) {
op()->emitNeedFocus();
setFocus();
- if (processEvent && ( (e->state() & ShiftButton) || (e->state() & ControlButton) || (e->state() & AltButton) ) && !KrSelectionMode::getSelectionHandler()->useQTSelection()){
+ if (processEvent && ( (e->state() & ShiftButton) || (e->state() & ControlButton) || (e->state() & AltButton) ) && !KrSelectionMode::getSelectionHandler()->useTQTSelection()){
if ( oldCurrent && newCurrent && oldCurrent != newCurrent && e->state() & ShiftButton ) {
int oldPos = oldCurrent->index();
int newPos = newCurrent->index();
- QIconViewItem *top = 0, *bottom = 0;
+ TQIconViewItem *top = 0, *bottom = 0;
if ( oldPos > newPos ) {
top = newCurrent;
bottom = oldCurrent;
@@ -576,7 +576,7 @@ void KrBriefView::contentsMousePressEvent( QMouseEvent * e ) {
break;
top = top->nextItem();
}
- QIconView::setCurrentItem( newCurrent );
+ TQIconView::setCurrentItem( newCurrent );
callDefaultHandler = false;
}
if( e->state() & ShiftButton )
@@ -588,21 +588,21 @@ void KrBriefView::contentsMousePressEvent( QMouseEvent * e ) {
if (callDefaultHandler)
{
- dragStartPos = QPoint( -1, -1 );
+ dragStartPos = TQPoint( -1, -1 );
- QString name = QString::null; // will the file be deleted by the mouse event?
+ TQString name = TQString(); // will the file be deleted by the mouse event?
if( newCurrent ) // save the name of the file
name = static_cast<KrBriefViewItem*>( newCurrent ) ->name();
KIconView::contentsMousePressEvent( e );
- if( name.isEmpty() || _dict.find( name ) == 0 ) // is the file still valid?
+ if( name.isEmpty() || _dict.tqfind( name ) == 0 ) // is the file still valid?
newCurrent = 0; // if not, don't do any crash...
} else {
- // emitting the missing signals from QIconView::contentsMousePressEvent();
+ // emitting the missing signals from TQIconView::contentsMousePressEvent();
// the right click signal is not emitted as it is used for selection
- QPoint vp = contentsToViewport( e->pos() );
+ TQPoint vp = contentsToViewport( e->pos() );
if( !newCurrent ) {
emit pressed( pressedItem = newCurrent );
@@ -614,7 +614,7 @@ void KrBriefView::contentsMousePressEvent( QMouseEvent * e ) {
// if (i != 0) // comment in, if click sould NOT select
// setSelected(i, FALSE);
- if (newCurrent) QIconView::setCurrentItem(newCurrent);
+ if (newCurrent) TQIconView::setCurrentItem(newCurrent);
if ( ACTIVE_PANEL->quickSearch->isShown() ) {
ACTIVE_PANEL->quickSearch->hide();
@@ -628,8 +628,8 @@ void KrBriefView::contentsMousePressEvent( QMouseEvent * e ) {
}
}
-void KrBriefView::contentsMouseReleaseEvent( QMouseEvent * e ) {
- if (e->button() == RightButton)
+void KrBriefView::contentsMouseReleaseEvent( TQMouseEvent * e ) {
+ if (e->button() == Qt::RightButton)
contextMenuTimer.stop();
e = transformMouseEvent( e );
@@ -637,11 +637,11 @@ void KrBriefView::contentsMouseReleaseEvent( QMouseEvent * e ) {
KIconView::contentsMouseReleaseEvent( e );
if( pressedItem ) {
- QPoint vp = contentsToViewport( e->pos() );
- QIconViewItem *newCurrent = findItem( e->pos() );
+ TQPoint vp = contentsToViewport( e->pos() );
+ TQIconViewItem *newCurrent = tqfindItem( e->pos() );
if( pressedItem == newCurrent ) {
- // emitting the missing signals from QIconView::contentsMouseReleaseEvent();
+ // emitting the missing signals from TQIconView::contentsMouseReleaseEvent();
// the right click signal is not emitted as it is used for selection
if( !newCurrent ) {
@@ -656,26 +656,26 @@ void KrBriefView::contentsMouseReleaseEvent( QMouseEvent * e ) {
}
}
-void KrBriefView::contentsMouseMoveEvent ( QMouseEvent * e ) {
+void KrBriefView::contentsMouseMoveEvent ( TQMouseEvent * e ) {
e = transformMouseEvent( e );
- if ( ( singleClicked || renameTimer.isActive() ) && findItem( e->pos() ) != clickedItem )
+ if ( ( singleClicked || renameTimer.isActive() ) && tqfindItem( e->pos() ) != clickedItem )
CANCEL_TWO_CLICK_RENAME;
- if ( dragStartPos != QPoint( -1, -1 ) &&
- e->state() & LeftButton && ( dragStartPos - e->pos() ).manhattanLength() > QApplication::startDragDistance() )
+ if ( dragStartPos != TQPoint( -1, -1 ) &&
+ e->state() & Qt::LeftButton && ( dragStartPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() )
startDrag();
if (KrSelectionMode::getSelectionHandler()->rightButtonPreservesSelection()
&& KrSelectionMode::getSelectionHandler()->rightButtonSelects()
&& KrSelectionMode::getSelectionHandler()->showContextMenu() >= 0 && e->state() == Qt::RightButton)
{
- QIconViewItem *newItem = findItem( e->pos() );
+ TQIconViewItem *newItem = tqfindItem( e->pos() );
e->accept();
if (newItem != lastSwushPosition && newItem)
{
// is the new item above or below the previous one?
- QIconViewItem * above = newItem;
- QIconViewItem * below = newItem;
+ TQIconViewItem * above = newItem;
+ TQIconViewItem * below = newItem;
for (;(above || below) && above != lastSwushPosition && below != lastSwushPosition;)
{
if (above)
@@ -701,7 +701,7 @@ void KrBriefView::contentsMouseMoveEvent ( QMouseEvent * e ) {
}
contextMenuTimer.stop();
}
- // emitting the missing signals from QIconView::contentsMouseMoveEvent();
+ // emitting the missing signals from TQIconView::contentsMouseMoveEvent();
if( newItem )
emit onItem( newItem );
else
@@ -711,13 +711,13 @@ void KrBriefView::contentsMouseMoveEvent ( QMouseEvent * e ) {
KIconView::contentsMouseMoveEvent( e );
}
-void KrBriefView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void KrBriefView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{
e = transformMouseEvent ( e );
KIconView::contentsMouseDoubleClickEvent( e );
}
-void KrBriefView::handleContextMenu( QIconViewItem * it, const QPoint & pos ) {
+void KrBriefView::handleContextMenu( TQIconViewItem * it, const TQPoint & pos ) {
if ( !_focused )
op()->emitNeedFocus();
setFocus();
@@ -728,7 +728,7 @@ void KrBriefView::handleContextMenu( QIconViewItem * it, const QPoint & pos ) {
name() == ".." )
return ;
int i = KrSelectionMode::getSelectionHandler()->showContextMenu();
- contextMenuPoint = QPoint( pos.x(), pos.y() );
+ contextMenuPoint = TQPoint( pos.x(), pos.y() );
if (i < 0)
showContextMenu();
else if (i > 0)
@@ -742,22 +742,22 @@ void KrBriefView::showContextMenu()
op()->emitContextMenu( contextMenuPoint );
}
-KrViewItem *KrBriefView::getKrViewItemAt( const QPoint & vp ) {
- return dynamic_cast<KrViewItem*>( KIconView::findItem( vp ) );
+KrViewItem *KrBriefView::getKrViewItemAt( const TQPoint & vp ) {
+ return dynamic_cast<KrViewItem*>( KIconView::tqfindItem( vp ) );
}
-bool KrBriefView::acceptDrag( QDropEvent* ) const {
+bool KrBriefView::acceptDrag( TQDropEvent* ) const {
return true;
}
-void KrBriefView::contentsDropEvent( QDropEvent * e ) {
+void KrBriefView::contentsDropEvent( TQDropEvent * e ) {
_currDragItem = 0;
op()->emitGotDrop(e);
e->ignore();
KIconView::contentsDropEvent( e );
}
-void KrBriefView::contentsDragMoveEvent( QDragMoveEvent * e ) {
+void KrBriefView::contentsDragMoveEvent( TQDragMoveEvent * e ) {
KrViewItem *oldDragItem = _currDragItem;
_currDragItem = getKrViewItemAt( e->pos() );
@@ -769,13 +769,13 @@ void KrBriefView::contentsDragMoveEvent( QDragMoveEvent * e ) {
if( _currDragItem != oldDragItem )
{
if( oldDragItem )
- dynamic_cast<KrBriefViewItem *>( oldDragItem )->repaint();
+ dynamic_cast<KrBriefViewItem *>( oldDragItem )->tqrepaint();
if( _currDragItem )
- dynamic_cast<KrBriefViewItem *>( _currDragItem )->repaint();
+ dynamic_cast<KrBriefViewItem *>( _currDragItem )->tqrepaint();
}
}
-void KrBriefView::contentsDragLeaveEvent ( QDragLeaveEvent *e )
+void KrBriefView::contentsDragLeaveEvent ( TQDragLeaveEvent *e )
{
KrViewItem *oldDragItem = _currDragItem;
@@ -783,10 +783,10 @@ void KrBriefView::contentsDragLeaveEvent ( QDragLeaveEvent *e )
KIconView::contentsDragLeaveEvent( e );
if( oldDragItem )
- dynamic_cast<KrBriefViewItem *>( oldDragItem )->repaint();
+ dynamic_cast<KrBriefViewItem *>( oldDragItem )->tqrepaint();
}
-void KrBriefView::imStartEvent(QIMEvent* e)
+void KrBriefView::imStartEvent(TQIMEvent* e)
{
if ( ACTIVE_PANEL->quickSearch->isShown() ) {
ACTIVE_PANEL->quickSearch->myIMStartEvent( e );
@@ -803,7 +803,7 @@ void KrBriefView::imStartEvent(QIMEvent* e)
// item is "below" the quick search window, as the icon view will
// realize its new size after the key processing. The following line
// will resize the icon view immediately.
- ACTIVE_PANEL->layout->activate();
+ ACTIVE_PANEL->tqlayout->activate();
// second, we need to disable the dirup action - hack!
krDirUp->setEnabled( false );
}
@@ -813,7 +813,7 @@ void KrBriefView::imStartEvent(QIMEvent* e)
}
}
-void KrBriefView::imEndEvent(QIMEvent* e)
+void KrBriefView::imEndEvent(TQIMEvent* e)
{
if ( ACTIVE_PANEL->quickSearch->isShown() ) {
ACTIVE_PANEL->quickSearch->myIMEndEvent( e );
@@ -821,7 +821,7 @@ void KrBriefView::imEndEvent(QIMEvent* e)
}
}
-void KrBriefView::imComposeEvent(QIMEvent* e)
+void KrBriefView::imComposeEvent(TQIMEvent* e)
{
if ( ACTIVE_PANEL->quickSearch->isShown() ) {
ACTIVE_PANEL->quickSearch->myIMComposeEvent( e );
@@ -829,7 +829,7 @@ void KrBriefView::imComposeEvent(QIMEvent* e)
}
}
-void KrBriefView::keyPressEvent( QKeyEvent * e ) {
+void KrBriefView::keyPressEvent( TQKeyEvent * e ) {
if ( !e || !firstItem() )
return ; // subclass bug
if ( ACTIVE_PANEL->quickSearch->isShown() ) {
@@ -841,14 +841,14 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
if ( e->state() == ControlButton ) { // let the panel handle it - jump to the Location Bar
e->ignore();
break;
- } else if (!KrSelectionMode::getSelectionHandler()->useQTSelection()) {
- QIconViewItem * i = currentItem();
+ } else if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()) {
+ TQIconViewItem * i = currentItem();
if ( !i ) break;
if ( e->state() == ShiftButton ) setSelected( i, !i->isSelected(), true );
i = i->prevItem();
if ( i ) {
- QIconView::setCurrentItem( i );
- QIconView::ensureItemVisible( i );
+ TQIconView::setCurrentItem( i );
+ TQIconView::ensureItemVisible( i );
}
} else KIconView::keyPressEvent(e);
break;
@@ -856,35 +856,35 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
if ( e->state() == ControlButton || e->state() == ( ControlButton | ShiftButton ) ) { // let the panel handle it - jump to command line
e->ignore();
break;
- } else if (!KrSelectionMode::getSelectionHandler()->useQTSelection()){
- QIconViewItem * i = currentItem();
+ } else if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()){
+ TQIconViewItem * i = currentItem();
if ( !i ) break;
if ( e->state() == ShiftButton ) setSelected( i, !i->isSelected(), true );
i = i->nextItem();
- if ( i ) {QIconView::setCurrentItem( i ); QIconView::ensureItemVisible( i ); }
+ if ( i ) {TQIconView::setCurrentItem( i ); TQIconView::ensureItemVisible( i ); }
} else KIconView::keyPressEvent(e);
break;
- case Key_Next: if (!KrSelectionMode::getSelectionHandler()->useQTSelection()){
- QIconViewItem * i = currentItem(), *j;
+ case Key_Next: if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()){
+ TQIconViewItem * i = currentItem(), *j;
if ( !i ) break;
- QRect r( i->rect() );
+ TQRect r( i->rect() );
if ( !r.height() ) break;
for ( int page = visibleHeight() / r.height() - 1; page > 0 && ( j = i->nextItem() ); --page )
i = j;
- if ( i ) {QIconView::setCurrentItem( i ); QIconView::ensureItemVisible( i ); }
+ if ( i ) {TQIconView::setCurrentItem( i ); TQIconView::ensureItemVisible( i ); }
} else KIconView::keyPressEvent(e);
break;
- case Key_Prior: if (!KrSelectionMode::getSelectionHandler()->useQTSelection()){
- QIconViewItem * i = currentItem(), *j;
+ case Key_Prior: if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()){
+ TQIconViewItem * i = currentItem(), *j;
if ( !i ) break;
- QRect r( i->rect() );
+ TQRect r( i->rect() );
if ( !r.height() ) break;
for ( int page = visibleHeight() / r.height() - 1; page > 0 && ( j = i->prevItem() ); --page )
i = j;
- if ( i ) {QIconView::setCurrentItem( i ); QIconView::ensureItemVisible( i ); }
+ if ( i ) {TQIconView::setCurrentItem( i ); TQIconView::ensureItemVisible( i ); }
} else KIconView::keyPressEvent(e);
break;
- case Key_Home: if (!KrSelectionMode::getSelectionHandler()->useQTSelection()){
+ case Key_Home: if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()){
if ( e->state() & ShiftButton ) /* Shift+Home */
{
clearSelection();
@@ -893,12 +893,12 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
arrangeItemsInGrid();
break;
} else {
- QIconViewItem * i = firstItem();
- if ( i ) {QIconView::setCurrentItem( i ); QIconView::ensureItemVisible( i ); }
+ TQIconViewItem * i = firstItem();
+ if ( i ) {TQIconView::setCurrentItem( i ); TQIconView::ensureItemVisible( i ); }
}
} else KIconView::keyPressEvent(e);
break;
- case Key_End: if (!KrSelectionMode::getSelectionHandler()->useQTSelection()){
+ case Key_End: if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()){
if ( e->state() & ShiftButton ) /* Shift+End */
{
clearSelection();
@@ -907,12 +907,12 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
arrangeItemsInGrid();
break;
} else {
- QIconViewItem *i = firstItem(), *j;
+ TQIconViewItem *i = firstItem(), *j;
while ( ( j = i->nextItem() ) )
i = j;
while ( ( j = i->nextItem() ) )
i = j;
- if ( i ) {QIconView::setCurrentItem( i ); QIconView::ensureItemVisible( i ); }
+ if ( i ) {TQIconView::setCurrentItem( i ); TQIconView::ensureItemVisible( i ); }
break;
}
} else KIconView::keyPressEvent(e);
@@ -923,7 +923,7 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
e->ignore();
else {
KrViewItem * i = getCurrentKrViewItem();
- QString tmp = i->name();
+ TQString tmp = i->name();
op()->emitExecuted(tmp);
}
break;
@@ -941,9 +941,9 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
if ( e->state() == ControlButton ) { // let the panel handle it
e->ignore();
break;
- } else if (!KrSelectionMode::getSelectionHandler()->useQTSelection()) {
- QIconViewItem *i = currentItem();
- QIconViewItem *newCurrent = 0;
+ } else if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()) {
+ TQIconViewItem *i = currentItem();
+ TQIconViewItem *newCurrent = 0;
if ( !i ) break;
@@ -974,8 +974,8 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
if( newCurrent )
{
- QIconView::setCurrentItem( newCurrent );
- QIconView::ensureItemVisible( newCurrent );
+ TQIconView::setCurrentItem( newCurrent );
+ TQIconView::ensureItemVisible( newCurrent );
}
} else KIconView::keyPressEvent(e);
break;
@@ -991,9 +991,9 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
if ( e->state() == ControlButton ) { // let the panel handle it
e->ignore();
break;
- } else if (!KrSelectionMode::getSelectionHandler()->useQTSelection()) {
- QIconViewItem *i = currentItem();
- QIconViewItem *newCurrent = 0;
+ } else if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()) {
+ TQIconViewItem *i = currentItem();
+ TQIconViewItem *newCurrent = 0;
if ( !i ) break;
@@ -1023,8 +1023,8 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
if( newCurrent )
{
- QIconView::setCurrentItem( newCurrent );
- QIconView::ensureItemVisible( newCurrent );
+ TQIconView::setCurrentItem( newCurrent );
+ TQIconView::ensureItemVisible( newCurrent );
}
} else KIconView::keyPressEvent(e);
break;
@@ -1035,7 +1035,7 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
break ;
case Key_Insert : {
{
- QIconViewItem *i = currentItem();
+ TQIconViewItem *i = currentItem();
if( !i )
break;
@@ -1044,8 +1044,8 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
setSelected( i, !i->isSelected(), true );
if( i->nextItem() )
{
- QIconView::setCurrentItem( i->nextItem() );
- QIconView::ensureItemVisible( i->nextItem() );
+ TQIconView::setCurrentItem( i->nextItem() );
+ TQIconView::ensureItemVisible( i->nextItem() );
}
}
else
@@ -1057,7 +1057,7 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
}
case Key_Space : {
{
- QIconViewItem *i = currentItem();
+ TQIconViewItem *i = currentItem();
if( !i )
break;
@@ -1066,8 +1066,8 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
setSelected( i, !i->isSelected(), true );
if( i->nextItem() )
{
- QIconView::setCurrentItem( i->nextItem() );
- QIconView::ensureItemVisible( i->nextItem() );
+ TQIconView::setCurrentItem( i->nextItem() );
+ TQIconView::ensureItemVisible( i->nextItem() );
}
}
else
@@ -1085,7 +1085,7 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
}
default:
if ( e->key() == Key_Escape ) {
- QIconView::keyPressEvent( e ); return ; // otherwise the selection gets lost??!??
+ TQIconView::keyPressEvent( e ); return ; // otherwise the selection gets lost??!??
}
// if the key is A..Z or 1..0 do quick search otherwise...
if ( e->text().length() > 0 && e->text() [ 0 ].isPrint() ) // better choice. Otherwise non-ascii characters like can not be the first character of a filename
@@ -1109,7 +1109,7 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
// item is "below" the quick search window, as the icon view will
// realize its new size after the key processing. The following line
// will resize the icon view immediately.
- ACTIVE_PANEL->layout->activate();
+ ACTIVE_PANEL->tqlayout->activate();
// second, we need to disable the dirup action - hack!
krDirUp->setEnabled( false );
}
@@ -1129,17 +1129,17 @@ void KrBriefView::keyPressEvent( QKeyEvent * e ) {
}
}
// emit the new item description
- slotItemDescription( currentItem() ); // actually send the QIconViewItem
+ slotItemDescription( currentItem() ); // actually send the TQIconViewItem
}
// overridden to make sure EXTENTION won't be lost during rename
-void KrBriefView::rename( QIconViewItem * item ) {
+void KrBriefView::rename( TQIconViewItem * item ) {
currentlyRenamedItem = dynamic_cast< KrBriefViewItem * >( item );
currentlyRenamedItem->rename();
//TODO: renameLineEdit() ->selectAll();
}
void KrBriefView::renameCurrentItem() {
- QString newName, fileName;
+ TQString newName, fileName;
// handle inplace renaming, if possible
@@ -1152,17 +1152,17 @@ void KrBriefView::renameCurrentItem() {
if ( fileName == ".." )
return ;
- rename( static_cast<QIconViewItem*>( it ) );
+ rename( static_cast<TQIconViewItem*>( it ) );
// if applicable, select only the name without extension
/* TODO:
KConfigGroupSaver svr(krConfig,"Look&Feel");
if (!krConfig->readBoolEntry("Rename Selects Extension", true)) {
if (it->hasExtension() && !it->VF->vfile_isDir() )
- renameLineEdit()->setSelection(0, it->name().findRev(it->extension())-1);
+ renameLineEdit()->setSelection(0, it->name().tqfindRev(it->extension())-1);
}*/
}
-void KrBriefView::inplaceRenameFinished( QIconViewItem * it ) {
+void KrBriefView::inplaceRenameFinished( TQIconViewItem * it ) {
if ( !it ) { // major failure - call developers
krOut << "Major failure at inplaceRenameFinished(): item is null" << endl;
return;
@@ -1177,7 +1177,7 @@ void KrBriefView::inplaceRenameFinished( QIconViewItem * it ) {
}
// TODO: move the whole quicksearch mess out of here and into krview
-void KrBriefView::quickSearch( const QString & str, int direction ) {
+void KrBriefView::quickSearch( const TQString & str, int direction ) {
KrViewItem * item = getCurrentKrViewItem();
if (!item)
return;
@@ -1203,7 +1203,7 @@ void KrBriefView::quickSearch( const QString & str, int direction ) {
}
}
-void KrBriefView::stopQuickSearch( QKeyEvent * e ) {
+void KrBriefView::stopQuickSearch( TQKeyEvent * e ) {
if( ACTIVE_PANEL && ACTIVE_PANEL->quickSearch ) {
ACTIVE_PANEL->quickSearch->hide();
ACTIVE_PANEL->quickSearch->clear();
@@ -1213,12 +1213,12 @@ void KrBriefView::stopQuickSearch( QKeyEvent * e ) {
}
}
-void KrBriefView::setNameToMakeCurrent( QIconViewItem * it ) {
+void KrBriefView::setNameToMakeCurrent( TQIconViewItem * it ) {
if (!it) return;
KrView::setNameToMakeCurrent( static_cast<KrBriefViewItem*>( it ) ->name() );
}
-void KrBriefView::slotMouseClicked( int button, QIconViewItem * item, const QPoint& ) {
+void KrBriefView::slotMouseClicked( int button, TQIconViewItem * item, const TQPoint& ) {
pressedItem = 0; // if the signals are emitted, don't emit twice at contentsMouseReleaseEvent
if ( button == Qt::MidButton )
emit middleButtonClicked( dynamic_cast<KrViewItem *>( item ) );
@@ -1232,7 +1232,7 @@ void KrBriefView::refreshColors() {
bool isActive = hasFocus();
if ( MAIN_VIEW && ACTIVE_PANEL && ACTIVE_PANEL->view )
isActive = ( static_cast<KrView *>( this ) == ACTIVE_PANEL->view );
- QColorGroup cg;
+ TQColorGroup cg;
KrColorCache::getColorCache().getColors(cg, KrColorItemType(KrColorItemType::File, false, isActive, false, false));
setPaletteBackgroundColor( cg.background() );
} else {
@@ -1242,19 +1242,19 @@ void KrBriefView::refreshColors() {
slotUpdate();
}
-bool KrBriefView::event( QEvent *e ) {
+bool KrBriefView::event( TQEvent *e ) {
modifierPressed = false;
switch ( e->type() ) {
- case QEvent::Timer:
- case QEvent::MouseMove:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
+ case TQEvent::Timer:
+ case TQEvent::MouseMove:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
break;
default:
CANCEL_TWO_CLICK_RENAME;
}
- if( e->type() == QEvent::Wheel )
+ if( e->type() == TQEvent::Wheel )
{
if ( !_focused )
op()->emitNeedFocus();
@@ -1264,20 +1264,20 @@ bool KrBriefView::event( QEvent *e ) {
}
-bool KrBriefView::eventFilter( QObject * watched, QEvent * e )
+bool KrBriefView::eventFilter( TQObject * watched, TQEvent * e )
{
- if( watched == horizontalScrollBar() )
+ if( TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(horizontalScrollBar()) )
{
- if( e->type() == QEvent::Hide || e->type() == QEvent::Show )
+ if( e->type() == TQEvent::Hide || e->type() == TQEvent::Show )
{
bool res = KIconView::eventFilter( watched, e );
arrangeItemsInGrid();
return res;
}
}
- else if( watched == header )
+ else if( TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(header) )
{
- if( e->type() == QEvent::MouseButtonPress && ((QMouseEvent *)e )->button() == Qt::RightButton )
+ if( e->type() == TQEvent::MouseButtonPress && ((TQMouseEvent *)e )->button() == Qt::RightButton )
{
setColumnNr();
return TRUE;
@@ -1288,14 +1288,14 @@ bool KrBriefView::eventFilter( QObject * watched, QEvent * e )
}
void KrBriefView::makeItemVisible( const KrViewItem *item ) {
-// qApp->processEvents(); // Please don't remove the comment. Causes crash if it is inserted!
- ensureItemVisible( (QIconViewItem *)( static_cast<const KrBriefViewItem*>( item ) ) );
+// tqApp->processEvents(); // Please don't remove the comment. Causes crash if it is inserted!
+ ensureItemVisible( (TQIconViewItem *)( static_cast<const KrBriefViewItem*>( item ) ) );
}
void KrBriefView::initOperator() {
_operator = new KrViewOperator(this, this);
- // QIconView emits selection changed, so chain them to operator
- connect(this, SIGNAL(selectionChanged()), _operator, SIGNAL(selectionChanged()));
+ // TQIconView emits selection changed, so chain them to operator
+ connect(this, TQT_SIGNAL(selectionChanged()), _operator, TQT_SIGNAL(selectionChanged()));
}
void KrBriefView::initProperties() {
@@ -1313,16 +1313,16 @@ void KrBriefView::initProperties() {
_properties->sortMode = static_cast<KrViewProperties::SortSpec>( _properties->sortMode |
KrViewProperties::IgnoreCase );
_properties->humanReadableSize = krConfig->readBoolEntry("Human Readable Size", _HumanReadableSize);
- _properties->localeAwareCompareIsCaseSensitive = QString( "a" ).localeAwareCompare( "B" ) > 0; // see KDE bug #40131
+ _properties->localeAwareCompareIsCaseSensitive = TQString( "a" ).localeAwareCompare( "B" ) > 0; // see KDE bug #40131
- QStringList defaultAtomicExtensions;
+ TQStringList defaultAtomicExtensions;
defaultAtomicExtensions += ".tar.gz";
defaultAtomicExtensions += ".tar.bz2";
- defaultAtomicExtensions += ".moc.cpp";
- QStringList atomicExtensions = krConfig->readListEntry("Atomic Extensions", defaultAtomicExtensions);
- for (QStringList::iterator i = atomicExtensions.begin(); i != atomicExtensions.end(); )
+ defaultAtomicExtensions += ".tqmoc.cpp";
+ TQStringList atomicExtensions = krConfig->readListEntry("Atomic Extensions", defaultAtomicExtensions);
+ for (TQStringList::iterator i = atomicExtensions.begin(); i != atomicExtensions.end(); )
{
- QString & ext = *i;
+ TQString & ext = *i;
ext = ext.stripWhiteSpace();
if (!ext.length())
{
@@ -1352,11 +1352,11 @@ void KrBriefView::setColumnNr()
for( int i=1; i <= MAX_COLS; i++ )
{
- popup.insertItem( QString( "%1" ).arg( i ), COL_ID + i );
+ popup.insertItem( TQString( "%1" ).tqarg( i ), COL_ID + i );
popup.setItemChecked( COL_ID + i, PROPS->numberOfColumns == i );
}
- int result=popup.exec(QCursor::pos());
+ int result=popup.exec(TQCursor::pos());
krConfig->setGroup( nameInKConfig() );
@@ -1382,33 +1382,33 @@ void KrBriefView::updateView() {
}
void KrBriefView::updateItem(KrViewItem* item) {
- dynamic_cast<KrBriefViewItem*>(item)->repaintItem();
+ dynamic_cast<KrBriefViewItem*>(item)->tqrepaintItem();
}
-void KrBriefView::slotRightButtonPressed(QIconViewItem*, const QPoint& point) {
+void KrBriefView::slotRightButtonPressed(TQIconViewItem*, const TQPoint& point) {
op()->emitEmptyContextMenu(point);
}
void KrBriefView::changeSortOrder()
{
bool asc = !sortDirection();
- header->setSortIndicator( 0, asc ? Qt::Ascending : Qt::Descending );
+ header->setSortIndicator( 0, asc ? TQt::Ascending : TQt::Descending );
sort( asc );
}
-QMouseEvent * KrBriefView::transformMouseEvent( QMouseEvent * e )
+TQMouseEvent * KrBriefView::transformMouseEvent( TQMouseEvent * e )
{
- if( findItem( e->pos() ) != 0 )
+ if( tqfindItem( e->pos() ) != 0 )
return e;
- QIconViewItem *closestItem = 0;
+ TQIconViewItem *closestItem = 0;
int mouseX = e->pos().x(), mouseY = e->pos().y();
int closestDelta = 0x7FFFFFFF;
int minX = ( mouseX / gridX() ) * gridX();
int maxX = minX + gridX();
- QIconViewItem *current = firstItem();
+ TQIconViewItem *current = firstItem();
while( current )
{
if( current->x() >= minX && current->x() < maxX )
@@ -1433,7 +1433,7 @@ QMouseEvent * KrBriefView::transformMouseEvent( QMouseEvent * e )
if( closestItem != 0 )
{
- QRect rec = closestItem->textRect( false );
+ TQRect rec = closestItem->textRect( false );
if( mouseX < rec.x() )
mouseX = rec.x();
if( mouseY < rec.y() )
@@ -1442,17 +1442,17 @@ QMouseEvent * KrBriefView::transformMouseEvent( QMouseEvent * e )
mouseX = rec.x() + rec.width() -1;
if( mouseY > rec.y() + rec.height() -1 )
mouseY = rec.y() + rec.height() -1;
- QPoint newPos( mouseX, mouseY );
- QPoint glPos;
+ TQPoint newPos( mouseX, mouseY );
+ TQPoint glPos;
if( !e->globalPos().isNull() )
{
- glPos = QPoint( mouseX - e->pos().x() + e->globalPos().x(),
+ glPos = TQPoint( mouseX - e->pos().x() + e->globalPos().x(),
mouseY - e->pos().y() + e->globalPos().y() );
}
if( mouseEvent )
delete mouseEvent;
- return mouseEvent = new QMouseEvent( e->type(), newPos, glPos, e->button(), e->state() );
+ return mouseEvent = new TQMouseEvent( e->type(), newPos, glPos, e->button(), e->state() );
}
return e;
diff --git a/krusader/Panel/krbriefview.h b/krusader/Panel/krbriefview.h
index 8ba27f4..fd3ad7e 100644
--- a/krusader/Panel/krbriefview.h
+++ b/krusader/Panel/krbriefview.h
@@ -33,7 +33,7 @@ A
#include "krview.h"
#include "krviewitem.h"
#include <kiconview.h>
-#include <qtimer.h>
+#include <tqtimer.h>
// extends KrViewProperties to add detailedview-only properties
class KrBriefViewProperties: public KrViewProperties {
@@ -42,13 +42,13 @@ public:
};
class KrBriefViewItem;
-class QDragMoveEvent;
-class QToolTip;
-class QHeader;
+class TQDragMoveEvent;
+class TQToolTip;
+class TQHeader;
/**
* KrBriefView implements everthing and anything regarding a brief view in a filemananger.
- * IT MUST USE KrViewItem as the children to it's *KIconView. KrBriefView and KrViewItem are
+ * IT MUST USE KrViewItem as the tqchildren to it's *KIconView. KrBriefView and KrViewItem are
* tightly coupled and the view will not work with other kinds of items.
* Apart from this, the view is self-reliant and you can use the vast interface to get whatever
* information is necessery from it.
@@ -56,21 +56,22 @@ class QHeader;
class KrBriefView: public KIconView, public KrView {
friend class KrBriefViewItem;
Q_OBJECT
+ TQ_OBJECT
public:
- KrBriefView( QHeader *header, QWidget *parent, bool &left, KConfig *cfg = krConfig, const char *name = 0 );
+ KrBriefView( TQHeader *header, TQWidget *tqparent, bool &left, KConfig *cfg = krConfig, const char *name = 0 );
virtual ~KrBriefView();
virtual inline KrViewItem *getFirst() { return dynamic_cast<KrViewItem*>( firstItem() ); }
virtual inline KrViewItem *getLast() { return dynamic_cast<KrViewItem*>( lastItem() ); }
- virtual inline KrViewItem *getNext( KrViewItem *current ) { return dynamic_cast<KrViewItem*>( dynamic_cast<QIconViewItem*>( current ) ->nextItem() ); }
- virtual inline KrViewItem *getPrev( KrViewItem *current ) { return dynamic_cast<KrViewItem*>( dynamic_cast<QIconViewItem*>( current ) ->prevItem() ); }
+ virtual inline KrViewItem *getNext( KrViewItem *current ) { return dynamic_cast<KrViewItem*>( dynamic_cast<TQIconViewItem*>( current ) ->nextItem() ); }
+ virtual inline KrViewItem *getPrev( KrViewItem *current ) { return dynamic_cast<KrViewItem*>( dynamic_cast<TQIconViewItem*>( current ) ->prevItem() ); }
virtual inline KrViewItem *getCurrentKrViewItem() { return dynamic_cast<KrViewItem*>( currentItem() ); }
- virtual KrViewItem *getKrViewItemAt(const QPoint &vp);
- virtual inline KrViewItem *findItemByName(const QString &name) { return dynamic_cast<KrViewItem*>( findItem( name, Qt::ExactMatch ) ); }
+ virtual KrViewItem *getKrViewItemAt(const TQPoint &vp);
+ virtual inline KrViewItem *findItemByName(const TQString &name) { return dynamic_cast<KrViewItem*>( tqfindItem( name, TQt::ExactMatch ) ); }
virtual void addItems(vfs* v, bool addUpDir = true);
- virtual void delItem(const QString &);
- virtual QString getCurrentItem() const;
+ virtual void delItem(const TQString &);
+ virtual TQString getCurrentItem() const;
virtual void makeItemVisible(const KrViewItem * item );
- virtual void setCurrentItem(const QString& name );
+ virtual void setCurrentItem(const TQString& name );
virtual void updateView();
virtual void updateItem(KrViewItem* item );
virtual void clear();
@@ -80,8 +81,8 @@ public:
virtual void prepareForPassive();
virtual void saveSettings() {}
virtual void restoreSettings() {}
- virtual QString nameInKConfig() {return _nameInKConfig;}
- virtual void resizeEvent ( QResizeEvent * );
+ virtual TQString nameInKConfig() {return _nameInKConfig;}
+ virtual void resizeEvent ( TQResizeEvent * );
signals:
void middleButtonClicked( KrViewItem *item );
@@ -97,76 +98,76 @@ protected:
void setColumnNr();
void redrawColumns();
- virtual void keyPressEvent( QKeyEvent *e );
- virtual void imStartEvent( QIMEvent* e );
- virtual void imEndEvent( QIMEvent *e );
- virtual void imComposeEvent( QIMEvent *e );
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseReleaseEvent (QMouseEvent *e);
- virtual void contentsMouseMoveEvent ( QMouseEvent * e );
- virtual void contentsMouseDoubleClickEvent ( QMouseEvent * e );
- virtual bool acceptDrag( QDropEvent* e ) const;
- virtual void contentsDropEvent( QDropEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDragLeaveEvent ( QDragLeaveEvent * );
+ virtual void keyPressEvent( TQKeyEvent *e );
+ virtual void imStartEvent( TQIMEvent* e );
+ virtual void imEndEvent( TQIMEvent *e );
+ virtual void imComposeEvent( TQIMEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseReleaseEvent (TQMouseEvent *e);
+ virtual void contentsMouseMoveEvent ( TQMouseEvent * e );
+ virtual void contentsMouseDoubleClickEvent ( TQMouseEvent * e );
+ virtual bool acceptDrag( TQDropEvent* e ) const;
+ virtual void contentsDropEvent( TQDropEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDragLeaveEvent ( TQDragLeaveEvent * );
virtual void startDrag() { op()->startDrag(); }
- virtual bool event( QEvent *e );
- virtual bool eventFilter( QObject * watched, QEvent * e );
- QMouseEvent * transformMouseEvent( QMouseEvent * );
+ virtual bool event( TQEvent *e );
+ virtual bool eventFilter( TQObject * watched, TQEvent * e );
+ TQMouseEvent * transformMouseEvent( TQMouseEvent * );
protected slots:
- void rename( QIconViewItem *item );
- void slotClicked( QIconViewItem *item );
- void slotDoubleClicked( QIconViewItem *item );
- void slotItemDescription( QIconViewItem * );
- void slotCurrentChanged( QIconViewItem *item );
- void handleContextMenu( QIconViewItem*, const QPoint& );
+ void rename( TQIconViewItem *item );
+ void slotClicked( TQIconViewItem *item );
+ void slotDoubleClicked( TQIconViewItem *item );
+ void slotItemDescription( TQIconViewItem * );
+ void slotCurrentChanged( TQIconViewItem *item );
+ void handleContextMenu( TQIconViewItem*, const TQPoint& );
virtual void renameCurrentItem();
virtual void showContextMenu( );
- void inplaceRenameFinished( QIconViewItem *it );
- void setNameToMakeCurrent( QIconViewItem *it );
+ void inplaceRenameFinished( TQIconViewItem *it );
+ void setNameToMakeCurrent( TQIconViewItem *it );
void sortOrderChanged();
- void slotRightButtonPressed(QIconViewItem*, const QPoint& point);
- void transformCurrentChanged( QIconViewItem * item ) { emit currentChanged( dynamic_cast<KrViewItem *>(item ) ); }
+ void slotRightButtonPressed(TQIconViewItem*, const TQPoint& point);
+ void transformCurrentChanged( TQIconViewItem * item ) { emit currentChanged( dynamic_cast<KrViewItem *>(item ) ); }
/**
* used internally to produce the signal middleButtonClicked()
*/
- void slotMouseClicked( int button, QIconViewItem * item, const QPoint & pos );
- inline void slotExecuted( QIconViewItem* i ) {
- QString tmp = dynamic_cast<KrViewItem*>( i ) ->name();
+ void slotMouseClicked( int button, TQIconViewItem * item, const TQPoint & pos );
+ inline void slotExecuted( TQIconViewItem* i ) {
+ TQString tmp = dynamic_cast<KrViewItem*>( i ) ->name();
op()->emitExecuted( tmp );
}
public slots:
void refreshColors();
- void quickSearch( const QString &, int = 0 );
- void stopQuickSearch( QKeyEvent* );
- void handleQuickSearchEvent( QKeyEvent* );
+ void quickSearch( const TQString &, int = 0 );
+ void stopQuickSearch( TQKeyEvent* );
+ void handleQuickSearchEvent( TQKeyEvent* );
void changeSortOrder();
signals:
- void letsDrag(QStringList items, QPixmap icon);
- void gotDrop(QDropEvent *);
+ void letsDrag(TQStringList items, TQPixmap icon);
+ void gotDrop(TQDropEvent *);
private:
- QHeader * header;
+ TQHeader * header;
bool swushSelects;
- QPoint dragStartPos;
- QIconViewItem *lastSwushPosition;
+ TQPoint dragStartPos;
+ TQIconViewItem *lastSwushPosition;
KrViewItem *_currDragItem;
bool singleClicked;
bool modifierPressed;
- QTime clickTime;
- QIconViewItem *clickedItem;
- QTimer renameTimer;
- QTimer contextMenuTimer;
- QPoint contextMenuPoint;
+ TQTime clickTime;
+ TQIconViewItem *clickedItem;
+ TQTimer renameTimer;
+ TQTimer contextMenuTimer;
+ TQPoint contextMenuPoint;
KrBriefViewItem *currentlyRenamedItem;
- QIconViewItem *pressedItem;
- QMouseEvent *mouseEvent;
- QToolTip *toolTip;
+ TQIconViewItem *pressedItem;
+ TQMouseEvent *mouseEvent;
+ TQToolTip *toolTip;
};
#endif
diff --git a/krusader/Panel/krbriefviewitem.cpp b/krusader/Panel/krbriefviewitem.cpp
index 533090f..857b264 100644
--- a/krusader/Panel/krbriefviewitem.cpp
+++ b/krusader/Panel/krbriefviewitem.cpp
@@ -7,8 +7,8 @@
#include <kconfig.h>
#include "krcolorcache.h"
-#include <qpainter.h>
-#include <qpointarray.h>
+#include <tqpainter.h>
+#include <tqpointarray.h>
#define PROPS _viewProperties
#define VF getVfile()
@@ -17,8 +17,8 @@
int KrBriefViewItem::expHeight = 0;
#endif // FASTER
-KrBriefViewItem::KrBriefViewItem(KrBriefView *parent, QIconViewItem *after, vfile *vf):
- KIconViewItem(parent, after), KrViewItem(vf, parent->properties()) {
+KrBriefViewItem::KrBriefViewItem(KrBriefView *tqparent, TQIconViewItem *after, vfile *vf):
+ KIconViewItem(tqparent, after), KrViewItem(vf, tqparent->properties()) {
#ifdef FASTER
initiated = false;
// get the expected height of an item - should be done only once
@@ -27,14 +27,14 @@ KrBriefViewItem::KrBriefViewItem(KrBriefView *parent, QIconViewItem *after, vfil
expHeight = 2 + (krConfig->readEntry("Filelist Icon Size",_FilelistIconSize)).toInt();
}
if( PROPS->displayIcons )
- itemIcon = QPixmap( expHeight, expHeight );
+ itemIcon = TQPixmap( expHeight, expHeight );
#endif // FASTER
// there's a special case, where if _vf is null, then we've got the ".." (updir) item
// in that case, create a special vfile for that item, and delete it, if needed
if (!_vf) {
dummyVfile = true;
- _vf = new vfile("..", 0, "drw-r--r--", 0, false, 0, 0, QString::null, QString::null, 0);
+ _vf = new vfile("..", 0, "drw-r--r--", 0, false, 0, 0, TQString(), TQString(), 0);
setText("..");
if ( PROPS->displayIcons )
@@ -50,11 +50,11 @@ KrBriefViewItem::KrBriefViewItem(KrBriefView *parent, QIconViewItem *after, vfil
setRenameEnabled( false );
setDragEnabled( true );
setDropEnabled( true );
- repaintItem();
+ tqrepaintItem();
}
-int KrBriefViewItem::compare(QIconViewItem *i ) const {
+int KrBriefViewItem::compare(TQIconViewItem *i ) const {
bool ignoreCase = (PROPS->sortMode & KrViewProperties::IgnoreCase);
KrBriefViewItem *other = (KrBriefViewItem *)i;
@@ -71,10 +71,10 @@ int KrBriefViewItem::compare(QIconViewItem *i ) const {
if ( isDummy() ) return 1*asc;
if ( other->isDummy() ) return -1*asc;
- QString text0 = name();
+ TQString text0 = name();
if (text0 == "..") return 1*asc;
- QString itext0 = other->name();
+ TQString itext0 = other->name();
if (itext0 == "..") return -1*asc;
if( ignoreCase )
@@ -90,11 +90,11 @@ int KrBriefViewItem::compare(QIconViewItem *i ) const {
if (!ignoreCase && !PROPS->localeAwareCompareIsCaseSensitive) {
// sometimes, localeAwareCompare is not case sensative. in that case,
// we need to fallback to a simple string compare (KDE bug #40131)
- return QString::compare(text0, itext0);
- } else return QString::localeAwareCompare(text0,itext0);
+ return TQString::compare(text0, itext0);
+ } else return TQString::localeAwareCompare(text0,itext0);
}
-void KrBriefViewItem::paintItem(QPainter *p, const QColorGroup &cg) {
+void KrBriefViewItem::paintItem(TQPainter *p, const TQColorGroup &cg) {
#ifdef FASTER
if (!initiated && !dummyVfile) {
// display an icon if needed
@@ -104,7 +104,7 @@ void KrBriefViewItem::paintItem(QPainter *p, const QColorGroup &cg) {
}
#endif
- QColorGroup _cg(cg);
+ TQColorGroup _cg(cg);
KrColorItemType colorItemType;
colorItemType.m_activePanel = (dynamic_cast<KrView *>(iconView()) == ACTIVE_PANEL->view);
@@ -134,28 +134,28 @@ void KrBriefViewItem::paintItem(QPainter *p, const QColorGroup &cg) {
if( _cg.background() != iconView()->paletteBackgroundColor() )
{
p->save();
- p->setPen( Qt::NoPen );
- p->setBrush( QBrush( _cg.background() ) );
+ p->setPen( TQt::NoPen );
+ p->setBrush( TQBrush( _cg.background() ) );
p->drawRect( rect() );
p->restore();
}
- QIconViewItem::paintItem(p, _cg);
+ TQIconViewItem::paintItem(p, _cg);
paintFocus( p, cg );
}
-void KrBriefViewItem::paintFocus(QPainter *p, const QColorGroup &cg) {
+void KrBriefViewItem::paintFocus(TQPainter *p, const TQColorGroup &cg) {
if ( ( iconView()->hasFocus() && this == iconView()->currentItem() ) ||
((KrBriefView *)iconView())->_currDragItem == this )
{
p->save();
- QPen pen( cg.shadow(), 0, Qt::DotLine );
+ TQPen pen( cg.shadow(), 0, TQt::DotLine );
p->setPen( pen );
// we manually draw the focus rect by points
- QRect rec = rect();
- QPointArray points( rec.right() - rec.left() + rec.bottom() - rec.top() + 4 );
+ TQRect rec = rect();
+ TQPointArray points( rec.right() - rec.left() + rec.bottom() - rec.top() + 4 );
int ndx = 0;
for( int x=rec.left(); x <= rec.right(); x+=2 )
@@ -173,9 +173,9 @@ void KrBriefViewItem::paintFocus(QPainter *p, const QColorGroup &cg) {
p->restore();
// --- That didn't work with all themes
-// iconView()->style().drawPrimitive(QStyle::PE_FocusRect, p,
-// QRect( rect().x(), rect().y(), rect().width(), rect().height() ), cg,
-// QStyle::Style_Default, cg.base() );
+// iconView()->style().drawPrimitive(TQStyle::PE_FocusRect, p,
+// TQRect( rect().x(), rect().y(), rect().width(), rect().height() ), cg,
+// TQStyle::Style_Default, cg.base() );
}
}
@@ -185,7 +185,7 @@ void KrBriefViewItem::itemHeightChanged() {
#endif // FASTER
}
-void KrBriefViewItem::repaintItem()
+void KrBriefViewItem::tqrepaintItem()
{
if ( dummyVfile ) return;
@@ -197,10 +197,10 @@ void KrBriefViewItem::repaintItem()
}
// for keeping the exact item heights...
-void KrBriefViewItem::calcRect ( const QString & text_ )
+void KrBriefViewItem::calcRect ( const TQString & text_ )
{
KIconViewItem::calcRect( text_ );
- QRect rec = rect();
+ TQRect rec = rect();
int gridX = iconView()->gridX();
int minX = ( rec.x() / gridX ) * gridX;
diff --git a/krusader/Panel/krbriefviewitem.h b/krusader/Panel/krbriefviewitem.h
index e95c01b..b84cd33 100644
--- a/krusader/Panel/krbriefviewitem.h
+++ b/krusader/Panel/krbriefviewitem.h
@@ -35,43 +35,43 @@
#include <sys/types.h>
#include "../VFS/vfile.h"
#include <kiconview.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#define FASTER
-class QPixmap;
+class TQPixmap;
class KrBriefView;
class KrBriefViewItem : public KIconViewItem, public KrViewItem {
friend class KrBriefView;
friend class KrCalcSpaceDialog;
public:
- KrBriefViewItem(KrBriefView *parent, QIconViewItem *after, vfile *vf);
+ KrBriefViewItem(KrBriefView *tqparent, TQIconViewItem *after, vfile *vf);
inline bool isSelected() const { return KIconViewItem::isSelected(); }
inline void setSelected(bool s) { KIconViewItem::setSelected(s); }
inline void cancelRename() { removeRenameBox(); }
- int compare(QIconViewItem *i) const;
- virtual void repaintItem();
+ int compare(TQIconViewItem *i) const;
+ virtual void tqrepaintItem();
static void itemHeightChanged(); // force the items to resize when icon/font size change
// TODO: virtual void setup(); // called when iconview needs to know the height of the item
#ifdef FASTER
- virtual QPixmap * pixmap() const {return const_cast<QPixmap *>(&itemIcon);}
- virtual void setPixmap ( const QPixmap &icon ) { itemIcon = icon;}
+ virtual TQPixmap * pixmap() const {return const_cast<TQPixmap *>(&itemIcon);}
+ virtual void setPixmap ( const TQPixmap &icon ) { itemIcon = icon;}
#endif
protected:
- virtual void paintItem(QPainter *p, const QColorGroup &cg);
- virtual void paintFocus(QPainter *p, const QColorGroup &cg);
- virtual void calcRect ( const QString & text_ = QString::null );
+ virtual void paintItem(TQPainter *p, const TQColorGroup &cg);
+ virtual void paintFocus(TQPainter *p, const TQColorGroup &cg);
+ virtual void calcRect ( const TQString & text_ = TQString() );
private:
#ifdef FASTER
bool initiated;
static int expHeight;
- QPixmap itemIcon;
+ TQPixmap itemIcon;
#endif // FASTER
// TODO:
- static const QColor & setColorIfContrastIsSufficient(const QColor & /* background */, const QColor & /* color1 */, const QColor & /* color2 */ ) {static QColor col; return col;}
+ static const TQColor & setColorIfContrastIsSufficient(const TQColor & /* background */, const TQColor & /* color1 */, const TQColor & /* color2 */ ) {static TQColor col; return col;}
// static int expHeight;
};
diff --git a/krusader/Panel/krcalcspacedialog.cpp b/krusader/Panel/krcalcspacedialog.cpp
index aced7ed..fc82574 100644
--- a/krusader/Panel/krcalcspacedialog.cpp
+++ b/krusader/Panel/krcalcspacedialog.cpp
@@ -29,10 +29,10 @@ A
* *
***************************************************************************/
-// Qt Includes
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qlabel.h>
+// TQt Includes
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
// KDE Includes
#include <klocale.h>
#include <kcursor.h>
@@ -44,9 +44,9 @@ A
#include "../VFS/krpermhandler.h"
/* --=={ Patch by Heiner <h.eichmann@gmx.de> }==-- */
-KrCalcSpaceDialog::CalcThread::CalcThread(KrCalcSpaceDialog * parent, ListPanel * panel, const QStringList & items)
+KrCalcSpaceDialog::CalcThread::CalcThread(KrCalcSpaceDialog * tqparent, ListPanel * panel, const TQStringList & items)
: m_totalSize(0), m_currentSize(0), m_totalFiles(0), m_totalDirs(0), m_items(items), m_files(panel->func->files()),
- m_view(panel->view), m_parent(parent), m_threadInUse(true), m_stop(false) {}
+ m_view(panel->view), m_parent(tqparent), m_threadInUse(true), m_stop(false) {}
void KrCalcSpaceDialog::CalcThread::cleanUp(){
if (m_threadInUse || !finished())
@@ -67,7 +67,7 @@ void KrCalcSpaceDialog::CalcThread::deleteInstance(){
void KrCalcSpaceDialog::CalcThread::run(){
if ( !m_items.isEmpty() ) // if something to do: do the calculation
- for ( QStringList::ConstIterator it = m_items.begin(); it != m_items.end(); ++it )
+ for ( TQStringList::ConstIterator it = m_items.begin(); it != m_items.end(); ++it )
{
m_currentSize = 0;
m_files->vfs_calcSpace( *it, &m_currentSize, &m_totalFiles, &m_totalDirs , & m_stop);
@@ -76,7 +76,7 @@ void KrCalcSpaceDialog::CalcThread::run(){
KrDetailedViewItem * viewItem = dynamic_cast<KrDetailedViewItem *>(m_view->findItemByName ( *it ) );
if (viewItem){
KrCalcSpaceDialog::setDirSize(viewItem, m_currentSize);
- //viewItem->repaintItem(); // crash in KrDetailedViewItem::repaintItem(): setPixmap(_view->column(KrDetailedView::Name),KrView::getIcon(_vf))
+ //viewItem->tqrepaintItem(); // crash in KrDetailedViewItem::tqrepaintItem(): setPixmap(_view->column(KrDetailedView::Name),KrView::getIcon(_vf))
}
m_totalSize += m_currentSize;
m_currentSize = 0;
@@ -91,18 +91,18 @@ void KrCalcSpaceDialog::CalcThread::stop(){
m_stop = true;
}
-KrCalcSpaceDialog::KrCalcSpaceDialog(QWidget *parent, ListPanel * files, const QStringList & items, bool autoclose) :
- KDialogBase(parent, "KrCalcSpaceDialog", true, i18n("Calculate Occupied Space"), Ok|Cancel),
+KrCalcSpaceDialog::KrCalcSpaceDialog(TQWidget *tqparent, ListPanel * files, const TQStringList & items, bool autoclose) :
+ KDialogBase(tqparent, "KrCalcSpaceDialog", true, i18n("Calculate Occupied Space"), Ok|Cancel),
m_autoClose(autoclose), m_canceled(false), m_timerCounter(0){
// the dialog: The Ok button is hidden until it is needed
showButtonOK(false);
m_thread = new CalcThread(this, files, items);
- m_pollTimer = new QTimer(this);
- QWidget * mainWidget = new QWidget( this );
+ m_pollTimer = new TQTimer(this);
+ TQWidget * mainWidget = new TQWidget( this );
setMainWidget(mainWidget);
- QVBoxLayout *topLayout = new QVBoxLayout( mainWidget, 0, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( mainWidget, 0, spacingHint() );
- m_label = new QLabel( "", mainWidget, "caption" );
+ m_label = new TQLabel( "", mainWidget, "caption" );
showResult(); // fill m_label with something usefull
topLayout->addWidget( m_label );
topLayout->addStretch(10);
@@ -142,9 +142,9 @@ void KrCalcSpaceDialog::timer(){
void KrCalcSpaceDialog::showResult(){
if (!m_thread) return;
- QString msg;
- QString fileName = ( ( m_thread->getItems().count() == 1 ) ? ( i18n( "Name: " ) + m_thread->getItems().first() + "\n" ) : QString( "" ) );
- msg = fileName + i18n( "Total occupied space: %1").arg( KIO::convertSize( m_thread->getTotalSize() ) );
+ TQString msg;
+ TQString fileName = ( ( m_thread->getItems().count() == 1 ) ? ( i18n( "Name: " ) + m_thread->getItems().first() + "\n" ) : TQString( "" ) );
+ msg = fileName + i18n( "Total occupied space: %1").tqarg( KIO::convertSize( m_thread->getTotalSize() ) );
if (m_thread->getTotalSize() >= 1024)
msg += " (" + KRpermHandler::parseSize( m_thread->getTotalSize() ) + "bytes)";
msg += "\n";
@@ -177,7 +177,7 @@ void KrCalcSpaceDialog::exec(){
showResult(); // fill the invisible dialog with usefull data
}
// prepare and start the poll timer
- connect(m_pollTimer, SIGNAL(timeout()), this, SLOT(timer()));
+ connect(m_pollTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timer()));
m_pollTimer->start(100);
KDialogBase::exec(); // show the dialog
}
diff --git a/krusader/Panel/krcalcspacedialog.h b/krusader/Panel/krcalcspacedialog.h
index fcdbdce..6410247 100644
--- a/krusader/Panel/krcalcspacedialog.h
+++ b/krusader/Panel/krcalcspacedialog.h
@@ -37,8 +37,8 @@
// KDE Includes
#include <kdialogbase.h>
#include <kio/jobclasses.h>
-// Qt Includes
-#include <qthread.h>
+// TQt Includes
+#include <tqthread.h>
// Krusader Includes
#include "../VFS/vfs.h"
#include "krdetailedviewitem.h"
@@ -53,18 +53,19 @@ class KrView;
*/
class KrCalcSpaceDialog : public KDialogBase{
Q_OBJECT
+ TQ_OBJECT
/* Thread which does the actual calculation. Deletes itself, if no longer
needed. Creator must call finished(), if the thread is no longer needed.
*/
- class CalcThread : public QThread{
+ class CalcThread : public TQThread{
KIO::filesize_t m_totalSize, m_currentSize;
unsigned long m_totalFiles;
unsigned long m_totalDirs;
- const QStringList m_items;
+ const TQStringList m_items;
vfs * m_files;
KrView *m_view;
KrCalcSpaceDialog * m_parent;
- QMutex m_synchronizeUsageAccess;
+ TQMutex m_synchronizeUsageAccess;
bool m_threadInUse; // true: caller needs the thread
bool m_stop;
void cleanUp(); // Deletes this, if possible
@@ -72,15 +73,15 @@ class KrCalcSpaceDialog : public KDialogBase{
KIO::filesize_t getTotalSize() const {return m_totalSize + m_currentSize;} // the result
unsigned long getTotalFiles() const {return m_totalFiles;} // the result
unsigned long getTotalDirs() const {return m_totalDirs;} // the result
- const QStringList & getItems() const {return m_items;} // list of directories to calculate
- CalcThread(KrCalcSpaceDialog * parent, ListPanel * panel, const QStringList & items);
+ const TQStringList & getItems() const {return m_items;} // list of directories to calculate
+ CalcThread(KrCalcSpaceDialog * tqparent, ListPanel * panel, const TQStringList & items);
void deleteInstance(); // thread is no longer needed.
void run(); // start calculation
void stop(); // stop it. Thread continues until vfs_calcSpace returns
} * m_thread;
friend class CalcThread;
- class QTimer * m_pollTimer;
- QLabel * m_label;
+ class TQTimer * m_pollTimer;
+ TQLabel * m_label;
bool m_autoClose; // true: wait 3 sec. before showing the dialog. Close it, when done
bool m_canceled; // true: cancel was pressed
int m_timerCounter; // internal counter. The timer runs faster as the rehresh (see comment there)
@@ -92,7 +93,7 @@ protected slots:
void slotCancel(); // cancel was pressed
public:
// autoclose: wait 3 sec. before showing the dialog. Close it, when done
- KrCalcSpaceDialog(QWidget *parent, ListPanel * panel, const QStringList & items, bool autoclose);
+ KrCalcSpaceDialog(TQWidget *tqparent, ListPanel * panel, const TQStringList & items, bool autoclose);
~KrCalcSpaceDialog();
KIO::filesize_t getTotalSize() const {return m_thread->getTotalSize();} // the result
unsigned long getTotalFiles() const {return m_thread->getTotalFiles();} // the result
diff --git a/krusader/Panel/krcolorcache.cpp b/krusader/Panel/krcolorcache.cpp
index 2c3351a..d5396c2 100644
--- a/krusader/Panel/krcolorcache.cpp
+++ b/krusader/Panel/krcolorcache.cpp
@@ -31,7 +31,7 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#include "../krusader.h"
#include "../defaults.h"
#include <kglobalsettings.h>
-#include <qfile.h>
+#include <tqfile.h>
// Macro: set target = col, if col is valid
@@ -42,22 +42,22 @@ Static class, which lists all allowed keywords for a quick access. Just call a m
*/
class KrColorSettingNames
{
- static QMap<QString, bool> s_colorNames;
- static QMap<QString, bool> s_numNames;
- static QMap<QString, bool> s_boolNames;
+ static TQMap<TQString, bool> s_colorNames;
+ static TQMap<TQString, bool> s_numNames;
+ static TQMap<TQString, bool> s_boolNames;
static void initialize();
public:
- static QValueList<QString> getColorNames();
- static bool isColorNameValid(const QString & settingName);
- static QValueList<QString> getNumNames();
- static bool isNumNameValid(const QString & settingName);
- static QValueList<QString> getBoolNames();
- static bool isBoolNameValid(const QString & settingName);
+ static TQValueList<TQString> getColorNames();
+ static bool isColorNameValid(const TQString & settingName);
+ static TQValueList<TQString> getNumNames();
+ static bool isNumNameValid(const TQString & settingName);
+ static TQValueList<TQString> getBoolNames();
+ static bool isBoolNameValid(const TQString & settingName);
} krColorSettingNames;
-QMap<QString, bool> KrColorSettingNames::s_colorNames;
-QMap<QString, bool> KrColorSettingNames::s_numNames;
-QMap<QString, bool> KrColorSettingNames::s_boolNames;
+TQMap<TQString, bool> KrColorSettingNames::s_colorNames;
+TQMap<TQString, bool> KrColorSettingNames::s_numNames;
+TQMap<TQString, bool> KrColorSettingNames::s_boolNames;
void KrColorSettingNames::initialize()
{
@@ -99,76 +99,76 @@ void KrColorSettingNames::initialize()
s_boolNames["Dim Inactive Colors"] = true;
}
-QValueList<QString> KrColorSettingNames::getColorNames()
+TQValueList<TQString> KrColorSettingNames::getColorNames()
{
initialize();
return s_colorNames.keys();
}
-bool KrColorSettingNames::isColorNameValid(const QString & settingName)
+bool KrColorSettingNames::isColorNameValid(const TQString & settingName)
{
initialize();
- return s_colorNames.contains(settingName);
+ return s_colorNames.tqcontains(settingName);
}
-QValueList<QString> KrColorSettingNames::getNumNames()
+TQValueList<TQString> KrColorSettingNames::getNumNames()
{
initialize();
return s_numNames.keys();
}
-bool KrColorSettingNames::isNumNameValid(const QString & settingName)
+bool KrColorSettingNames::isNumNameValid(const TQString & settingName)
{
initialize();
- return s_numNames.contains(settingName);
+ return s_numNames.tqcontains(settingName);
}
-QValueList<QString> KrColorSettingNames::getBoolNames()
+TQValueList<TQString> KrColorSettingNames::getBoolNames()
{
initialize();
return s_boolNames.keys();
}
-bool KrColorSettingNames::isBoolNameValid(const QString & settingName)
+bool KrColorSettingNames::isBoolNameValid(const TQString & settingName)
{
initialize();
- return s_boolNames.contains(settingName);
+ return s_boolNames.tqcontains(settingName);
}
/*
-KrColorSettings implementation. Contains all properties in QMaps. loadFromConfig initializes them from krConfig.
+KrColorSettings implementation. Contains all properties in TQMaps. loadFromConfig initializes them from krConfig.
*/
class KrColorSettingsImpl
{
friend class KrColorSettings;
- QMap<QString, QString> m_colorTextValues;
- QMap<QString, QColor> m_colorValues;
- QMap<QString, int> m_numValues;
- QMap<QString, bool> m_boolValues;
+ TQMap<TQString, TQString> m_colorTextValues;
+ TQMap<TQString, TQColor> m_colorValues;
+ TQMap<TQString, int> m_numValues;
+ TQMap<TQString, bool> m_boolValues;
void loadFromConfig();
};
void KrColorSettingsImpl::loadFromConfig()
{
krConfig->setGroup("Colors");
- QValueList<QString> names = KrColorSettingNames::getColorNames();
- for ( QStringList::Iterator it = names.begin(); it != names.end(); ++it )
+ TQValueList<TQString> names = KrColorSettingNames::getColorNames();
+ for ( TQStringList::Iterator it = names.begin(); it != names.end(); ++it )
{
m_colorTextValues[*it] = krConfig->readEntry(*it, "");
m_colorValues[*it] = krConfig->readColorEntry(*it);
}
names = KrColorSettingNames::getNumNames();
- for ( QStringList::Iterator it = names.begin(); it != names.end(); ++it )
+ for ( TQStringList::Iterator it = names.begin(); it != names.end(); ++it )
{
- if (krConfig->readEntry(*it) != QString::null)
+ if (krConfig->readEntry(*it) != TQString())
m_numValues[*it] = krConfig->readNumEntry(*it);
}
names = KrColorSettingNames::getBoolNames();
- for ( QStringList::Iterator it = names.begin(); it != names.end(); ++it )
+ for ( TQStringList::Iterator it = names.begin(); it != names.end(); ++it )
{
- if (krConfig->readEntry(*it) != QString::null)
+ if (krConfig->readEntry(*it) != TQString())
m_boolValues[*it] = krConfig->readBoolEntry(*it);
}
}
@@ -196,34 +196,34 @@ const KrColorSettings & KrColorSettings::operator= (const KrColorSettings & src)
{
if (this == & src)
return * this;
- QValueList<QString> names = KrColorSettingNames::getColorNames();
- for ( QStringList::Iterator it = names.begin(); it != names.end(); ++it )
+ TQValueList<TQString> names = KrColorSettingNames::getColorNames();
+ for ( TQStringList::Iterator it = names.begin(); it != names.end(); ++it )
{
m_impl->m_colorTextValues[*it] = src.m_impl->m_colorTextValues[*it];
m_impl->m_colorValues[*it] = src.m_impl->m_colorValues[*it];
}
- for ( QMap<QString, int>::Iterator it = src.m_impl->m_numValues.begin(); it != src.m_impl->m_numValues.end(); ++it )
+ for ( TQMap<TQString, int>::Iterator it = src.m_impl->m_numValues.begin(); it != src.m_impl->m_numValues.end(); ++it )
{
m_impl->m_numValues[it.key()] = it.data();
}
- for ( QMap<QString, bool>::Iterator it = src.m_impl->m_boolValues.begin(); it != src.m_impl->m_boolValues.end(); ++it )
+ for ( TQMap<TQString, bool>::Iterator it = src.m_impl->m_boolValues.begin(); it != src.m_impl->m_boolValues.end(); ++it )
{
m_impl->m_boolValues[it.key()] = it.data();
}
return * this;
}
-QValueList<QString> KrColorSettings::getColorNames()
+TQValueList<TQString> KrColorSettings::getColorNames()
{
return KrColorSettingNames::getColorNames();
}
-bool KrColorSettings::isColorNameValid(const QString & settingName)
+bool KrColorSettings::isColorNameValid(const TQString & settingName)
{
return KrColorSettingNames::isColorNameValid(settingName);
}
-bool KrColorSettings::setColorValue(const QString & settingName, const QColor & color)
+bool KrColorSettings::setColorValue(const TQString & settingName, const TQColor & color)
{
if (!isColorNameValid(settingName))
{
@@ -234,17 +234,17 @@ bool KrColorSettings::setColorValue(const QString & settingName, const QColor &
return true;
}
-QColor KrColorSettings::getColorValue(const QString & settingName) const
+TQColor KrColorSettings::getColorValue(const TQString & settingName) const
{
if (!isColorNameValid(settingName))
{
krOut << "Invalid color setting name: " << settingName << endl;
- return QColor();
+ return TQColor();
}
return m_impl->m_colorValues[settingName];
}
-bool KrColorSettings::setColorTextValue(const QString & settingName, const QString & colorText)
+bool KrColorSettings::setColorTextValue(const TQString & settingName, const TQString & colorText)
{
if (!isColorNameValid(settingName))
{
@@ -255,27 +255,27 @@ bool KrColorSettings::setColorTextValue(const QString & settingName, const QStri
return true;
}
-QString KrColorSettings::getColorTextValue(const QString & settingName) const
+TQString KrColorSettings::getColorTextValue(const TQString & settingName) const
{
if (!isColorNameValid(settingName))
{
krOut << "Invalid color setting name: " << settingName << endl;
- return QString();
+ return TQString();
}
return m_impl->m_colorTextValues[settingName];
}
-QValueList<QString> KrColorSettings::getNumNames()
+TQValueList<TQString> KrColorSettings::getNumNames()
{
return KrColorSettingNames::getNumNames();
}
-bool KrColorSettings::isNumNameValid(const QString & settingName)
+bool KrColorSettings::isNumNameValid(const TQString & settingName)
{
return KrColorSettingNames::isNumNameValid(settingName);
}
-bool KrColorSettings::setNumValue(const QString & settingName, int value)
+bool KrColorSettings::setNumValue(const TQString & settingName, int value)
{
if (!isNumNameValid(settingName))
{
@@ -286,29 +286,29 @@ bool KrColorSettings::setNumValue(const QString & settingName, int value)
return true;
}
-int KrColorSettings::getNumValue(const QString & settingName, int defaultValue) const
+int KrColorSettings::getNumValue(const TQString & settingName, int defaultValue) const
{
if (!isNumNameValid(settingName))
{
krOut << "Invalid number setting name: " << settingName << endl;
return 0;
}
- if (!m_impl->m_numValues.contains(settingName))
+ if (!m_impl->m_numValues.tqcontains(settingName))
return defaultValue;
return m_impl->m_numValues[settingName];
}
-QValueList<QString> KrColorSettings::getBoolNames()
+TQValueList<TQString> KrColorSettings::getBoolNames()
{
return KrColorSettingNames::getBoolNames();
}
-bool KrColorSettings::isBoolNameValid(const QString & settingName)
+bool KrColorSettings::isBoolNameValid(const TQString & settingName)
{
return KrColorSettingNames::isBoolNameValid(settingName);
}
-bool KrColorSettings::setBoolValue(const QString & settingName, bool value)
+bool KrColorSettings::setBoolValue(const TQString & settingName, bool value)
{
if (!isBoolNameValid(settingName))
{
@@ -319,14 +319,14 @@ bool KrColorSettings::setBoolValue(const QString & settingName, bool value)
return true;
}
-int KrColorSettings::getBoolValue(const QString & settingName, bool defaultValue) const
+int KrColorSettings::getBoolValue(const TQString & settingName, bool defaultValue) const
{
if (!isBoolNameValid(settingName))
{
krOut << "Invalid bool setting name: " << settingName << endl;
return false;
}
- if (!m_impl->m_boolValues.contains(settingName))
+ if (!m_impl->m_boolValues.tqcontains(settingName))
return defaultValue;
return m_impl->m_boolValues[settingName];
}
@@ -378,38 +378,38 @@ getColors is the only method to call. All other are taken from the previous vers
class KrColorCacheImpl
{
friend class KrColorCache;
- QMap<QString, QColorGroup> m_cachedColors;
+ TQMap<TQString, TQColorGroup> m_cachedColors;
KrColorSettings m_colorSettings;
- QColorGroup getColors(const KrColorItemType & type) const;
- static const QColor & setColorIfContrastIsSufficient(const QColor & background, const QColor & color1, const QColor & color2);
- QColor getForegroundColor(bool isActive) const;
- QColor getSpecialForegroundColor(const QString & type, bool isActive) const;
- QColor getBackgroundColor(bool isActive) const;
- QColor getAlternateBackgroundColor(bool isActive) const;
- QColor getMarkedForegroundColor(bool isActive) const;
- QColor getMarkedBackgroundColor(bool isActive) const;
- QColor getAlternateMarkedBackgroundColor(bool isActive) const;
- QColor getCurrentForegroundColor(bool isActive) const;
- QColor getCurrentBackgroundColor(bool isActive) const;
- QColor getCurrentMarkedForegroundColor(bool isActive) const;
- QColor dimColor(QColor color, bool isBackgroundColor) const;
+ TQColorGroup getColors(const KrColorItemType & type) const;
+ static const TQColor & setColorIfContrastIsSufficient(const TQColor & background, const TQColor & color1, const TQColor & color2);
+ TQColor getForegroundColor(bool isActive) const;
+ TQColor getSpecialForegroundColor(const TQString & type, bool isActive) const;
+ TQColor getBackgroundColor(bool isActive) const;
+ TQColor getAlternateBackgroundColor(bool isActive) const;
+ TQColor getMarkedForegroundColor(bool isActive) const;
+ TQColor getMarkedBackgroundColor(bool isActive) const;
+ TQColor getAlternateMarkedBackgroundColor(bool isActive) const;
+ TQColor getCurrentForegroundColor(bool isActive) const;
+ TQColor getCurrentBackgroundColor(bool isActive) const;
+ TQColor getCurrentMarkedForegroundColor(bool isActive) const;
+ TQColor dimColor(TQColor color, bool isBackgroundColor) const;
};
-QColorGroup KrColorCacheImpl::getColors(const KrColorItemType & type) const
+TQColorGroup KrColorCacheImpl::getColors(const KrColorItemType & type) const
{
- QColorGroup result;
+ TQColorGroup result;
if (m_colorSettings.getBoolValue("KDE Default", _KDEDefaultColors))
{
// KDE default? Getcolors from KGlobalSettings.
bool enableAlternateBackground = m_colorSettings.getBoolValue("Enable Alternate Background", _AlternateBackground);
- QColor background = enableAlternateBackground && type.m_alternateBackgroundColor ?
+ TQColor background = enableAlternateBackground && type.m_alternateBackgroundColor ?
KGlobalSettings::alternateBackgroundColor()
: KGlobalSettings::baseColor();
- result.setColor(QColorGroup::Base, background);
- result.setColor(QColorGroup::Background, background);
- result.setColor(QColorGroup::Text, KGlobalSettings::textColor());
- result.setColor(QColorGroup::HighlightedText, KGlobalSettings::highlightedTextColor());
- result.setColor(QColorGroup::Highlight, KGlobalSettings::highlightColor());
+ result.setColor(TQColorGroup::Base, background);
+ result.setColor(TQColorGroup::Background, background);
+ result.setColor(TQColorGroup::Text, KGlobalSettings::textColor());
+ result.setColor(TQColorGroup::HighlightedText, KGlobalSettings::highlightedTextColor());
+ result.setColor(TQColorGroup::Highlight, KGlobalSettings::highlightColor());
return result;
}
bool markCurrentAlways = m_colorSettings.getBoolValue("Show Current Item Always", _ShowCurrentItemAlways);
@@ -422,10 +422,10 @@ QColorGroup KrColorCacheImpl::getColors(const KrColorItemType & type) const
isActive = true;
// First calculate fore- and background.
- QColor background = type.m_alternateBackgroundColor ?
+ TQColor background = type.m_alternateBackgroundColor ?
getAlternateBackgroundColor(isActive)
: getBackgroundColor(isActive);
- QColor foreground;
+ TQColor foreground;
switch(type.m_fileType)
{
case KrColorItemType::Directory :
@@ -445,24 +445,24 @@ QColorGroup KrColorCacheImpl::getColors(const KrColorItemType & type) const
}
// set the background color
- result.setColor(QColorGroup::Base, background);
- result.setColor(QColorGroup::Background, background);
+ result.setColor(TQColorGroup::Base, background);
+ result.setColor(TQColorGroup::Background, background);
// set the foreground color
- result.setColor(QColorGroup::Text, foreground);
+ result.setColor(TQColorGroup::Text, foreground);
// now the color of a marked item
- QColor markedBackground = type.m_alternateBackgroundColor ?
+ TQColor markedBackground = type.m_alternateBackgroundColor ?
getAlternateMarkedBackgroundColor(isActive)
: getMarkedBackgroundColor(isActive);
- QColor markedForeground = getMarkedForegroundColor(isActive);
+ TQColor markedForeground = getMarkedForegroundColor(isActive);
if (!markedForeground.isValid()) // transparent
// choose fore- or background, depending on its contrast compared to markedBackground
markedForeground = setColorIfContrastIsSufficient(markedBackground, foreground, background);
// set it in the color group (different group color than normal foreground!)
- result.setColor(QColorGroup::HighlightedText, markedForeground);
- result.setColor(QColorGroup::Highlight, markedBackground);
+ result.setColor(TQColorGroup::HighlightedText, markedForeground);
+ result.setColor(TQColorGroup::Highlight, markedBackground);
// In case the current item is a selected one, set the fore- and background colors for the contrast calculation below
if (type.m_selectedItem)
@@ -475,17 +475,17 @@ QColorGroup KrColorCacheImpl::getColors(const KrColorItemType & type) const
if (type.m_currentItem && (markCurrentAlways || isActive))
{
// if this is the current item AND the panels has the focus OR the current should be marked always
- QColor currentBackground = getCurrentBackgroundColor(isActive);
+ TQColor currentBackground = getCurrentBackgroundColor(isActive);
if (!currentBackground.isValid()) // transparent
currentBackground = background;
// set the background
- result.setColor(QColorGroup::Highlight, currentBackground);
- result.setColor(QColorGroup::Base, currentBackground);
- result.setColor(QColorGroup::Background, currentBackground);
+ result.setColor(TQColorGroup::Highlight, currentBackground);
+ result.setColor(TQColorGroup::Base, currentBackground);
+ result.setColor(TQColorGroup::Background, currentBackground);
- QColor color;
+ TQColor color;
if (type.m_selectedItem)
color = getCurrentMarkedForegroundColor(isActive);
if (!color.isValid()) // not used
@@ -497,23 +497,23 @@ QColorGroup KrColorCacheImpl::getColors(const KrColorItemType & type) const
}
// set the foreground
- result.setColor(QColorGroup::Text, color);
- result.setColor(QColorGroup::HighlightedText, color);
+ result.setColor(TQColorGroup::Text, color);
+ result.setColor(TQColorGroup::HighlightedText, color);
}
if (dimBackground && !type.m_activePanel)
{
// if color dimming is choosen, dim the colors for the inactive panel
- result.setColor(QColorGroup::Base, dimColor(result.base(), true));
- result.setColor(QColorGroup::Background, dimColor(result.base(), true));
- result.setColor(QColorGroup::Text, dimColor(result.text(), false));
- result.setColor(QColorGroup::HighlightedText, dimColor(result.highlightedText(), false));
- result.setColor(QColorGroup::Highlight, dimColor(result.highlight(), true));
+ result.setColor(TQColorGroup::Base, dimColor(result.base(), true));
+ result.setColor(TQColorGroup::Background, dimColor(result.base(), true));
+ result.setColor(TQColorGroup::Text, dimColor(result.text(), false));
+ result.setColor(TQColorGroup::HighlightedText, dimColor(result.highlightedText(), false));
+ result.setColor(TQColorGroup::Highlight, dimColor(result.highlight(), true));
}
return result;
}
-const QColor & KrColorCacheImpl::setColorIfContrastIsSufficient(const QColor & background, const QColor & color1, const QColor & color2)
+const TQColor & KrColorCacheImpl::setColorIfContrastIsSufficient(const TQColor & background, const TQColor & color1, const TQColor & color2)
{
#define sqr(x) ((x)*(x))
int contrast = sqr(color1.red() - background.red()) + sqr(color1.green() - background.green()) + sqr(color1.blue() - background.blue());
@@ -524,35 +524,35 @@ const QColor & KrColorCacheImpl::setColorIfContrastIsSufficient(const QColor & b
return color1;
}
-QColor KrColorCacheImpl::getForegroundColor(bool isActive) const
+TQColor KrColorCacheImpl::getForegroundColor(bool isActive) const
{
- QColor color = KGlobalSettings::textColor();
+ TQColor color = KGlobalSettings::textColor();
SETCOLOR(color, m_colorSettings.getColorValue("Foreground"));
if (!isActive) SETCOLOR(color, m_colorSettings.getColorValue("Inactive Foreground"));
return color;
}
-QColor KrColorCacheImpl::getSpecialForegroundColor(const QString & type, bool isActive) const
+TQColor KrColorCacheImpl::getSpecialForegroundColor(const TQString & type, bool isActive) const
{
- QString colorName = "Inactive " + type + " Foreground";
+ TQString colorName = "Inactive " + type + " Foreground";
if (!isActive && m_colorSettings.getColorTextValue(colorName) == "Inactive Foreground")
return getForegroundColor(false);
- QColor color = m_colorSettings.getColorValue(type + " Foreground");
+ TQColor color = m_colorSettings.getColorValue(type + " Foreground");
if (!isActive) SETCOLOR(color, m_colorSettings.getColorValue(colorName));
if (!color.isValid())
return getForegroundColor(isActive);
return color;
}
-QColor KrColorCacheImpl::getBackgroundColor(bool isActive) const
+TQColor KrColorCacheImpl::getBackgroundColor(bool isActive) const
{
- QColor color = KGlobalSettings::baseColor();
+ TQColor color = KGlobalSettings::baseColor();
SETCOLOR(color, m_colorSettings.getColorValue("Background"));
if (!isActive) SETCOLOR(color, m_colorSettings.getColorValue("Inactive Background"));
return color;
}
-QColor KrColorCacheImpl::getAlternateBackgroundColor(bool isActive) const
+TQColor KrColorCacheImpl::getAlternateBackgroundColor(bool isActive) const
{
if (isActive && m_colorSettings.getColorTextValue("Alternate Background") == "Background")
return getBackgroundColor(true);
@@ -560,7 +560,7 @@ QColor KrColorCacheImpl::getAlternateBackgroundColor(bool isActive) const
return getAlternateBackgroundColor(true);
if (!isActive && m_colorSettings.getColorTextValue("Inactive Alternate Background") == "Inactive Background")
return getBackgroundColor(false);
- QColor color = isActive ?
+ TQColor color = isActive ?
m_colorSettings.getColorValue("Alternate Background")
: m_colorSettings.getColorValue("Inactive Alternate Background");
if (!color.isValid())
@@ -570,11 +570,11 @@ QColor KrColorCacheImpl::getAlternateBackgroundColor(bool isActive) const
return color;
}
-QColor KrColorCacheImpl::getMarkedForegroundColor(bool isActive) const
+TQColor KrColorCacheImpl::getMarkedForegroundColor(bool isActive) const
{
- QString colorName = isActive?"Marked Foreground":"Inactive Marked Foreground";
+ TQString colorName = isActive?"Marked Foreground":"Inactive Marked Foreground";
if (m_colorSettings.getColorTextValue(colorName) == "transparent")
- return QColor();
+ return TQColor();
if (isActive && m_colorSettings.getColorTextValue(colorName) == "")
return KGlobalSettings::highlightedTextColor();
if (!isActive && m_colorSettings.getColorTextValue(colorName) == "")
@@ -582,7 +582,7 @@ QColor KrColorCacheImpl::getMarkedForegroundColor(bool isActive) const
return m_colorSettings.getColorValue(colorName);
}
-QColor KrColorCacheImpl::getMarkedBackgroundColor(bool isActive) const
+TQColor KrColorCacheImpl::getMarkedBackgroundColor(bool isActive) const
{
if (isActive && m_colorSettings.getColorTextValue("Marked Background") == "")
return KGlobalSettings::highlightColor();
@@ -597,7 +597,7 @@ QColor KrColorCacheImpl::getMarkedBackgroundColor(bool isActive) const
: m_colorSettings.getColorValue("Inactive Marked Background");
}
-QColor KrColorCacheImpl::getAlternateMarkedBackgroundColor(bool isActive) const
+TQColor KrColorCacheImpl::getAlternateMarkedBackgroundColor(bool isActive) const
{
if (isActive && m_colorSettings.getColorTextValue("Alternate Marked Background") == "Alternate Background")
return getAlternateBackgroundColor(true);
@@ -614,17 +614,17 @@ QColor KrColorCacheImpl::getAlternateMarkedBackgroundColor(bool isActive) const
: m_colorSettings.getColorValue("Inactive Alternate Marked Background");
}
-QColor KrColorCacheImpl::getCurrentForegroundColor(bool isActive) const
+TQColor KrColorCacheImpl::getCurrentForegroundColor(bool isActive) const
{
- QColor color = m_colorSettings.getColorValue("Current Foreground");
+ TQColor color = m_colorSettings.getColorValue("Current Foreground");
if (!isActive) SETCOLOR(color, m_colorSettings.getColorValue("Inactive Current Foreground"));
return color;
}
-QColor KrColorCacheImpl::getCurrentBackgroundColor(bool isActive) const
+TQColor KrColorCacheImpl::getCurrentBackgroundColor(bool isActive) const
{
if (isActive && m_colorSettings.getColorTextValue("Current Background") == "")
- return QColor();
+ return TQColor();
if (isActive && m_colorSettings.getColorTextValue("Current Background") == "Background")
return getBackgroundColor(true);
if (!isActive && m_colorSettings.getColorTextValue("Inactive Current Background") == "")
@@ -636,11 +636,11 @@ QColor KrColorCacheImpl::getCurrentBackgroundColor(bool isActive) const
: m_colorSettings.getColorValue("Inactive Current Background");
}
-QColor KrColorCacheImpl::getCurrentMarkedForegroundColor(bool isActive) const
+TQColor KrColorCacheImpl::getCurrentMarkedForegroundColor(bool isActive) const
{
- QString colorName = isActive?"Marked Current Foreground":"Inactive Marked Current Foreground";
+ TQString colorName = isActive?"Marked Current Foreground":"Inactive Marked Current Foreground";
if (isActive && m_colorSettings.getColorTextValue(colorName) == "")
- return QColor();
+ return TQColor();
if (isActive && m_colorSettings.getColorTextValue(colorName) == "Marked Foreground")
return getMarkedForegroundColor(true);
if (!isActive && m_colorSettings.getColorTextValue(colorName) == "")
@@ -650,13 +650,13 @@ QColor KrColorCacheImpl::getCurrentMarkedForegroundColor(bool isActive) const
return m_colorSettings.getColorValue(colorName);
}
-QColor KrColorCacheImpl::dimColor(QColor color, bool /* isBackgroundColor */) const
+TQColor KrColorCacheImpl::dimColor(TQColor color, bool /* isBackgroundColor */) const
{
krConfig->setGroup("Colors");
int dimFactor = m_colorSettings.getNumValue("Dim Factor", 100);
- QColor targetColor = m_colorSettings.getColorValue("Dim Target Color");
+ TQColor targetColor = m_colorSettings.getColorValue("Dim Target Color");
if (!targetColor.isValid())
- targetColor = QColor(255, 255, 255);
+ targetColor = TQColor(255, 255, 255);
bool dimBackground = m_colorSettings.getBoolValue("Dim Inactive Colors", false);
bool dim = dimFactor >= 0 && dimFactor < 100 && dimBackground;
if (dim)
@@ -691,7 +691,7 @@ KrColorCache & KrColorCache::getColorCache()
return * m_instance;
}
-void KrColorCache::getColors(QColorGroup & result, const KrColorItemType & type) const
+void KrColorCache::getColors(TQColorGroup & result, const KrColorItemType & type) const
{
// for the cache lookup: calculate a unique key from the type
char hashKey[128];
@@ -722,24 +722,24 @@ void KrColorCache::getColors(QColorGroup & result, const KrColorItemType & type
strcat(hashKey, "-Selected");
// lookup in cache
- if (!m_impl->m_cachedColors.contains(hashKey))
+ if (!m_impl->m_cachedColors.tqcontains(hashKey))
// not found: calculate color group and store it in cache
m_impl->m_cachedColors[hashKey] = m_impl->getColors(type);
// get color group from cache
- const QColorGroup & col = m_impl->m_cachedColors[hashKey];
+ const TQColorGroup & col = m_impl->m_cachedColors[hashKey];
// copy colors in question to result color group
- result.setColor(QColorGroup::Base, col.base());
- result.setColor(QColorGroup::Background, col.base());
- result.setColor(QColorGroup::Text, col.text());
- result.setColor(QColorGroup::HighlightedText, col.highlightedText());
- result.setColor(QColorGroup::Highlight, col.highlight());
+ result.setColor(TQColorGroup::Base, col.base());
+ result.setColor(TQColorGroup::Background, col.base());
+ result.setColor(TQColorGroup::Text, col.text());
+ result.setColor(TQColorGroup::HighlightedText, col.highlightedText());
+ result.setColor(TQColorGroup::Highlight, col.highlight());
}
-QColor KrColorCache::dimColor(const QColor & color, int dim, const QColor & targetColor)
+TQColor KrColorCache::dimColor(const TQColor & color, int dim, const TQColor & targetColor)
{
- return QColor((targetColor.red() * (100 - dim) + color.red() * dim) / 100,
+ return TQColor((targetColor.red() * (100 - dim) + color.red() * dim) / 100,
(targetColor.green() * (100 - dim) + color.green() * dim) / 100,
(targetColor.blue() * (100 - dim) + color.blue() * dim) / 100);
}
diff --git a/krusader/Panel/krcolorcache.h b/krusader/Panel/krcolorcache.h
index a213319..5684899 100644
--- a/krusader/Panel/krcolorcache.h
+++ b/krusader/Panel/krcolorcache.h
@@ -1,8 +1,8 @@
#ifndef KRCOLORCACHE_H
#define KRCOLORCACHE_H
-#include <qobject.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqdict.h>
/*
Design goals: Color calculation is done on one place only. Configuration through krConfig OR through local settings.
@@ -17,7 +17,7 @@ KrColorCache: perfomes the color calculation and caches the result. Uses KrColor
/*
-Copies all used color settings from krConfig into a local cache on creation. It contains 3 types of properties:
+Copies all used color settings from krConfig into a local cache on creation. It tqcontains 3 types of properties:
color, numeric (int) and boolean. Color properties can have string or color values. Property values can be
changed. These changes does not go into krConfig!
@@ -27,7 +27,7 @@ set*Value overwrites a property with a new value
get*Value retunrs the current value
For colors teh value can be returned as text or as color. If a text representation is not a valid color,
-setColorValue(QColor()) should be called.
+setColorValue(TQColor()) should be called.
*/
class KrColorSettings
{
@@ -38,22 +38,22 @@ public:
~KrColorSettings();
const KrColorSettings & operator= (const KrColorSettings &);
- static bool isColorNameValid(const QString & settingName);
- static QValueList<QString> getColorNames();
- bool setColorValue(const QString & settingName, const QColor & color);
- QColor getColorValue(const QString & settingName) const;
- bool setColorTextValue(const QString & settingName, const QString & colorText);
- QString getColorTextValue(const QString & settingName) const;
+ static bool isColorNameValid(const TQString & settingName);
+ static TQValueList<TQString> getColorNames();
+ bool setColorValue(const TQString & settingName, const TQColor & color);
+ TQColor getColorValue(const TQString & settingName) const;
+ bool setColorTextValue(const TQString & settingName, const TQString & colorText);
+ TQString getColorTextValue(const TQString & settingName) const;
- static bool isNumNameValid(const QString & settingName);
- static QValueList<QString> getNumNames();
- bool setNumValue(const QString & settingName, int value);
- int getNumValue(const QString & settingName, int defaultValue = 0) const;
+ static bool isNumNameValid(const TQString & settingName);
+ static TQValueList<TQString> getNumNames();
+ bool setNumValue(const TQString & settingName, int value);
+ int getNumValue(const TQString & settingName, int defaultValue = 0) const;
- static bool isBoolNameValid(const QString & settingName);
- static QValueList<QString> getBoolNames();
- bool setBoolValue(const QString & settingName, bool value);
- int getBoolValue(const QString & settingName, bool defaultValue = false) const;
+ static bool isBoolNameValid(const TQString & settingName);
+ static TQValueList<TQString> getBoolNames();
+ bool setBoolValue(const TQString & settingName, bool value);
+ int getBoolValue(const TQString & settingName, bool defaultValue = false) const;
};
/*
@@ -78,9 +78,10 @@ All calculated values are cached. The cache is deleted on refreshColors and setC
colorsRefreshed. getColorCache returns a statis color cached for painting the panels. On the color cache
setColors should NEVER be called!
*/
-class KrColorCache : public QObject
+class KrColorCache : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
static KrColorCache * m_instance;
class KrColorCacheImpl * m_impl;
KrColorCache(const KrColorCache &);
@@ -89,8 +90,8 @@ public:
KrColorCache();
~KrColorCache();
static KrColorCache & getColorCache();
- void getColors(QColorGroup & result, const KrColorItemType & type) const;
- static QColor dimColor(const QColor & color, int dim, const QColor & targetColor);
+ void getColors(TQColorGroup & result, const KrColorItemType & type) const;
+ static TQColor dimColor(const TQColor & color, int dim, const TQColor & targetColor);
public slots:
void refreshColors();
void setColors(const KrColorSettings &);
diff --git a/krusader/Panel/krdetailedview.cpp b/krusader/Panel/krdetailedview.cpp
index 633c2d7..b2ab370 100644
--- a/krusader/Panel/krdetailedview.cpp
+++ b/krusader/Panel/krdetailedview.cpp
@@ -41,18 +41,18 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#include "../GUI/kcmdline.h"
#include "../Dialogs/krspecialwidgets.h"
#include "../panelmanager.h"
-#include <qlayout.h>
-#include <qdir.h>
-#include <qwhatsthis.h>
-#include <qheader.h>
-#include <qstyle.h>
+#include <tqlayout.h>
+#include <tqdir.h>
+#include <tqwhatsthis.h>
+#include <tqheader.h>
+#include <tqstyle.h>
#include <kprogress.h>
#include <kstatusbar.h>
#include <kinputdialog.h>
#include <kmessagebox.h>
#include <klocale.h>
#include <kpopupmenu.h>
-#include <qdict.h>
+#include <tqdict.h>
//////////////////////////////////////////////////////////////////////////
// The following is KrDetailedView's settings in KConfig:
@@ -85,13 +85,13 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#define COLUMN_POPUP_IDS 91
-QString KrDetailedView::ColumnName[ KrDetailedViewProperties::MAX_COLUMNS ];
+TQString KrDetailedView::ColumnName[ KrDetailedViewProperties::MAX_COLUMNS ];
-KrDetailedView::KrDetailedView( QWidget *parent, bool &left, KConfig *cfg, const char *name ) :
- KListView( parent, name ), KrView( cfg ), _currDragItem( 0L ), currentlyRenamedItem( 0 ),
+KrDetailedView::KrDetailedView( TQWidget *tqparent, bool &left, KConfig *cfg, const char *name ) :
+ KListView( tqparent, name ), KrView( cfg ), _currDragItem( 0L ), currentlyRenamedItem( 0 ),
pressedItem( 0 ) {
setWidget( this );
- _nameInKConfig=QString( "KrDetailedView" ) + QString( ( left ? "Left" : "Right" ) ) ;
+ _nameInKConfig=TQString( "KrDetailedView" ) + TQString( ( left ? "Left" : "Right" ) ) ;
krConfig->setGroup("Private");
if (krConfig->readBoolEntry("Enable Input Method", true))
setInputMethodEnabled(true);
@@ -118,73 +118,73 @@ void KrDetailedView::setup() {
// decide on single click/double click selection
if ( _config->readBoolEntry( "Single Click Selects", _SingleClickSelects ) &&
KGlobalSettings::singleClick() ) {
- connect( this, SIGNAL( executed( QListViewItem* ) ), this, SLOT( slotExecuted( QListViewItem* ) ) );
+ connect( this, TQT_SIGNAL( executed( TQListViewItem* ) ), this, TQT_SLOT( slotExecuted( TQListViewItem* ) ) );
} else {
- connect( this, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( slotClicked( QListViewItem* ) ) );
- connect( this, SIGNAL( doubleClicked( QListViewItem* ) ), this, SLOT( slotDoubleClicked( QListViewItem* ) ) );
+ connect( this, TQT_SIGNAL( clicked( TQListViewItem* ) ), this, TQT_SLOT( slotClicked( TQListViewItem* ) ) );
+ connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem* ) ), this, TQT_SLOT( slotDoubleClicked( TQListViewItem* ) ) );
}
// a change in the selection needs to update totals
- connect( this, SIGNAL( onItem( QListViewItem* ) ), this, SLOT( slotItemDescription( QListViewItem* ) ) );
- connect( this, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint&, int ) ),
- this, SLOT( handleContextMenu( QListViewItem*, const QPoint&, int ) ) );
- connect( this, SIGNAL( rightButtonPressed(QListViewItem*, const QPoint&, int)),
- this, SLOT(slotRightButtonPressed(QListViewItem*, const QPoint&, int)));
- connect( this, SIGNAL( currentChanged( QListViewItem* ) ), this, SLOT( setNameToMakeCurrent( QListViewItem* ) ) );
- connect( this, SIGNAL( currentChanged( QListViewItem* ) ), this, SLOT( transformCurrentChanged( QListViewItem* ) ) );
- connect( this, SIGNAL( mouseButtonClicked ( int, QListViewItem *, const QPoint &, int ) ),
- this, SLOT( slotMouseClicked ( int, QListViewItem *, const QPoint &, int ) ) );
- connect( &KrColorCache::getColorCache(), SIGNAL( colorsRefreshed() ), this, SLOT( refreshColors() ) );
- connect( header(), SIGNAL(clicked(int)), this, SLOT(sortOrderChanged(int )));
+ connect( this, TQT_SIGNAL( onItem( TQListViewItem* ) ), this, TQT_SLOT( slotItemDescription( TQListViewItem* ) ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint&, int ) ),
+ this, TQT_SLOT( handleContextMenu( TQListViewItem*, const TQPoint&, int ) ) );
+ connect( this, TQT_SIGNAL( rightButtonPressed(TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT(slotRightButtonPressed(TQListViewItem*, const TQPoint&, int)));
+ connect( this, TQT_SIGNAL( currentChanged( TQListViewItem* ) ), this, TQT_SLOT( setNameToMakeCurrent( TQListViewItem* ) ) );
+ connect( this, TQT_SIGNAL( currentChanged( TQListViewItem* ) ), this, TQT_SLOT( transformCurrentChanged( TQListViewItem* ) ) );
+ connect( this, TQT_SIGNAL( mouseButtonClicked ( int, TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( slotMouseClicked ( int, TQListViewItem *, const TQPoint &, int ) ) );
+ connect( &KrColorCache::getColorCache(), TQT_SIGNAL( colorsRefreshed() ), this, TQT_SLOT( refreshColors() ) );
+ connect( header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(sortOrderChanged(int )));
}
// add whatever columns are needed to the listview
krConfig->setGroup( nameInKConfig() );
newColumn( KrDetailedViewProperties::Name ); // we always have a name
- setColumnWidthMode( COLUMN(Name), QListView::Manual );
+ setColumnWidthMode( COLUMN(Name), TQListView::Manual );
if ( _config->readBoolEntry( "Ext Column", _ExtColumn ) ) {
newColumn( KrDetailedViewProperties::Extention );
- setColumnWidthMode( COLUMN(Extention), QListView::Manual );
- setColumnWidth( COLUMN(Extention), QFontMetrics( font() ).width( "tar.bz2" ) );
+ setColumnWidthMode( COLUMN(Extention), TQListView::Manual );
+ setColumnWidth( COLUMN(Extention), TQFontMetrics( font() ).width( "tar.bz2" ) );
}
if ( _config->readBoolEntry( "Mime Column", _MimeColumn ) ) {
newColumn( KrDetailedViewProperties::Mime );
- setColumnWidthMode( COLUMN(Mime), QListView::Manual );
- setColumnWidth( COLUMN(Mime), QFontMetrics( font() ).width( 'X' ) * 6 );
+ setColumnWidthMode( COLUMN(Mime), TQListView::Manual );
+ setColumnWidth( COLUMN(Mime), TQFontMetrics( font() ).width( 'X' ) * 6 );
}
if ( _config->readBoolEntry( "Size Column", _SizeColumn ) ) {
newColumn( KrDetailedViewProperties::Size );
- setColumnWidthMode( COLUMN(Size), QListView::Manual );
- setColumnWidth( COLUMN(Size), QFontMetrics( font() ).width( "9" ) * 10 );
- setColumnAlignment( COLUMN(Size), Qt::AlignRight ); // right-align numbers
+ setColumnWidthMode( COLUMN(Size), TQListView::Manual );
+ setColumnWidth( COLUMN(Size), TQFontMetrics( font() ).width( "9" ) * 10 );
+ setColumnAlignment( COLUMN(Size), TQt::AlignRight ); // right-align numbers
}
if ( _config->readBoolEntry( "DateTime Column", _DateTimeColumn ) ) {
newColumn( KrDetailedViewProperties::DateTime );
- setColumnWidthMode( COLUMN(DateTime), QListView::Manual );
- //setColumnWidth( column( DateTime ), QFontMetrics( font() ).width( "99/99/99 99:99" ) );
- setColumnWidth( COLUMN(DateTime), QFontMetrics( font() ).width( KGlobal::locale() ->formatDateTime(
- QDateTime ( QDate( 2099, 12, 29 ), QTime( 23, 59 ) ) ) ) + 3 );
+ setColumnWidthMode( COLUMN(DateTime), TQListView::Manual );
+ //setColumnWidth( column( DateTime ), TQFontMetrics( font() ).width( "99/99/99 99:99" ) );
+ setColumnWidth( COLUMN(DateTime), TQFontMetrics( font() ).width( KGlobal::locale() ->formatDateTime(
+ TQDateTime ( TQDate( 2099, 12, 29 ), TQTime( 23, 59 ) ) ) ) + 3 );
}
if ( _config->readBoolEntry( "Perm Column", _PermColumn ) ) {
newColumn( KrDetailedViewProperties::Permissions );
- setColumnWidthMode( COLUMN(Permissions), QListView::Manual );
- setColumnWidth( COLUMN(Permissions), QFontMetrics( font() ).width( "drwxrwxrwx" ) );
+ setColumnWidthMode( COLUMN(Permissions), TQListView::Manual );
+ setColumnWidth( COLUMN(Permissions), TQFontMetrics( font() ).width( "drwxrwxrwx" ) );
}
if ( _config->readBoolEntry( "KrPerm Column", _KrPermColumn ) ) {
newColumn( KrDetailedViewProperties::KrPermissions );
- setColumnWidthMode( COLUMN(KrPermissions), QListView::Manual );
- setColumnWidth( COLUMN(KrPermissions), QFontMetrics( font() ).width( "RWX" ) );
+ setColumnWidthMode( COLUMN(KrPermissions), TQListView::Manual );
+ setColumnWidth( COLUMN(KrPermissions), TQFontMetrics( font() ).width( "RWX" ) );
}
if ( _config->readBoolEntry( "Owner Column", _OwnerColumn ) ) {
newColumn( KrDetailedViewProperties::Owner );
- setColumnWidthMode( COLUMN(Owner), QListView::Manual );
- setColumnWidth( COLUMN(Owner), QFontMetrics( font() ).width( 'X' ) * 6 );
+ setColumnWidthMode( COLUMN(Owner), TQListView::Manual );
+ setColumnWidth( COLUMN(Owner), TQFontMetrics( font() ).width( 'X' ) * 6 );
}
if ( _config->readBoolEntry( "Group Column", _GroupColumn ) ) {
newColumn( KrDetailedViewProperties::Group );
- setColumnWidthMode( COLUMN(Group), QListView::Manual );
- setColumnWidth( COLUMN(Group), QFontMetrics( font() ).width( 'X' ) * 6 );
+ setColumnWidthMode( COLUMN(Group), TQListView::Manual );
+ setColumnWidth( COLUMN(Group), TQFontMetrics( font() ).width( 'X' ) * 6 );
}
// determine basic settings for the listview
@@ -207,14 +207,14 @@ void KrDetailedView::setup() {
renameLineEdit()->installEventFilter( this );
// allow in-place renaming
- connect( renameLineEdit(), SIGNAL( done( QListViewItem *, int ) ),
- this, SLOT( inplaceRenameFinished( QListViewItem*, int ) ) );
- connect( &renameTimer, SIGNAL( timeout() ), this, SLOT( renameCurrentItem() ) );
- connect( &contextMenuTimer, SIGNAL (timeout()), this, SLOT (showContextMenu()));
+ connect( renameLineEdit(), TQT_SIGNAL( done( TQListViewItem *, int ) ),
+ this, TQT_SLOT( inplaceRenameFinished( TQListViewItem*, int ) ) );
+ connect( &renameTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( renameCurrentItem() ) );
+ connect( &contextMenuTimer, TQT_SIGNAL (timeout()), this, TQT_SLOT (showContextMenu()));
- connect( header(), SIGNAL(clicked(int)), this, SLOT(slotSortOrderChanged(int )));
+ connect( header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotSortOrderChanged(int )));
- setFocusPolicy( StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
restoreSettings();
refreshColors();
@@ -250,8 +250,8 @@ int KrDetailedView::column( KrDetailedViewProperties::ColumnType type ) {
// if vfile passes the filter, create an item, otherwise, drop it
KrViewItem *KrDetailedView::preAddItem( vfile *vf ) {
- QString size = KRpermHandler::parseSize( vf->vfile_getSize() );
- QString name = vf->vfile_getName();
+ TQString size = KRpermHandler::parseSize( vf->vfile_getSize() );
+ TQString name = vf->vfile_getName();
bool isDir = vf->vfile_isDir();
if ( !isDir || ( isDir && ( _properties->filter & KrViewProperties::ApplyToDirs ) ) ) {
switch ( _properties->filter ) {
@@ -278,11 +278,11 @@ bool KrDetailedView::preDelItem(KrViewItem *item) {
/* KDE HACK START - the renaming item is not disappeared after delete */
/* solution: we send an ESC key event to terminate the rename */
if( item ) {
- QListViewItem * viewItem = dynamic_cast<QListViewItem*>( item );
+ TQListViewItem * viewItem = dynamic_cast<TQListViewItem*>( item );
if( viewItem == currentlyRenamedItem ) {
currentlyRenamedItem = 0;
- QKeyEvent escEvent( QEvent::KeyPress, Key_Escape, 27, 0 );
- QApplication::sendEvent( renameLineEdit(), &escEvent );
+ TQKeyEvent escEvent( TQEvent::KeyPress, Key_Escape, 27, 0 );
+ TQApplication::sendEvent( renameLineEdit(), &escEvent );
}
}
/* KDE HACK END */
@@ -290,17 +290,17 @@ bool KrDetailedView::preDelItem(KrViewItem *item) {
}
void KrDetailedView::addItems( vfs *v, bool addUpDir ) {
- QListViewItem * item = firstChild();
- QListViewItem *currentItem = item;
- QString size, name;
+ TQListViewItem * item = firstChild();
+ TQListViewItem *currentItem = item;
+ TQString size, name;
// add the up-dir arrow if needed
if ( addUpDir ) {
- new KrDetailedViewItem( this, ( QListViewItem* ) 0L, ( vfile* ) 0L );
+ new KrDetailedViewItem( this, ( TQListViewItem* ) 0L, ( vfile* ) 0L );
}
// text for updating the status bar
- QString statusText = QString("%1/ ").arg( v->vfs_getOrigin().fileName() ) + i18n("Directory");
+ TQString statusText = TQString("%1/ ").tqarg( v->vfs_getOrigin().fileName() ) + i18n("Directory");
int cnt = 0;
int cl = columnSorted();
@@ -343,7 +343,7 @@ void KrDetailedView::addItems( vfs *v, bool addUpDir ) {
// if the item should be current - make it so
if ( dvitem->name() == nameToMakeCurrent() )
{
- currentItem = static_cast<QListViewItem*>(dvitem);
+ currentItem = static_cast<TQListViewItem*>(dvitem);
statusText = dvitem->description();
}
@@ -363,15 +363,15 @@ void KrDetailedView::addItems( vfs *v, bool addUpDir ) {
op()->emitItemDescription( statusText );
}
-QString KrDetailedView::getCurrentItem() const {
- QListViewItem * it = currentItem();
+TQString KrDetailedView::getCurrentItem() const {
+ TQListViewItem * it = currentItem();
if ( !it )
- return QString::null;
+ return TQString();
else
return dynamic_cast<KrViewItem*>( it ) ->name();
}
-void KrDetailedView::setCurrentItem( const QString& name ) {
+void KrDetailedView::setCurrentItem( const TQString& name ) {
KrDetailedViewItem * it = dynamic_cast<KrDetailedViewItem*>(_dict[ name ]);
if ( it )
KListView::setCurrentItem( it );
@@ -382,8 +382,8 @@ void KrDetailedView::clear() {
/* solution: we send an ESC key event to terminate the rename */
if( currentlyRenamedItem ) {
currentlyRenamedItem = 0;
- QKeyEvent escEvent( QEvent::KeyPress, Key_Escape, 27, 0 );
- QApplication::sendEvent( renameLineEdit(), &escEvent );
+ TQKeyEvent escEvent( TQEvent::KeyPress, Key_Escape, 27, 0 );
+ TQApplication::sendEvent( renameLineEdit(), &escEvent );
}
/* KDE HACK END */
@@ -426,7 +426,7 @@ void KrDetailedView::setSortMode( KrViewProperties::SortSpec mode ) {
KListView::sort();
}
-void KrDetailedView::slotClicked( QListViewItem *item ) {
+void KrDetailedView::slotClicked( TQListViewItem *item ) {
if ( !item ) return ;
if ( !modifierPressed ) {
@@ -435,7 +435,7 @@ void KrDetailedView::slotClicked( QListViewItem *item ) {
config->setGroup( "KDE" );
int doubleClickInterval = config->readNumEntry( "DoubleClickInterval", 400 );
- int msecsFromLastClick = clickTime.msecsTo( QTime::currentTime() );
+ int msecsFromLastClick = clickTime.msecsTo( TQTime::currentTime() );
if ( msecsFromLastClick > doubleClickInterval && msecsFromLastClick < 5 * doubleClickInterval ) {
singleClicked = false;
@@ -446,16 +446,16 @@ void KrDetailedView::slotClicked( QListViewItem *item ) {
CANCEL_TWO_CLICK_RENAME;
singleClicked = true;
- clickTime = QTime::currentTime();
+ clickTime = TQTime::currentTime();
clickedItem = item;
}
}
-void KrDetailedView::slotDoubleClicked( QListViewItem *item ) {
+void KrDetailedView::slotDoubleClicked( TQListViewItem *item ) {
CANCEL_TWO_CLICK_RENAME;
if ( !item )
return ;
- QString tmp = dynamic_cast<KrViewItem*>( item ) ->name();
+ TQString tmp = dynamic_cast<KrViewItem*>( item ) ->name();
op()->emitExecuted(tmp);
}
@@ -484,35 +484,35 @@ void KrDetailedView::prepareForPassive() {
}
}
-void KrDetailedView::slotItemDescription( QListViewItem * item ) {
+void KrDetailedView::slotItemDescription( TQListViewItem * item ) {
KrViewItem * it = static_cast<KrDetailedViewItem*>( item );
if ( !it )
return ;
- QString desc = it->description();
+ TQString desc = it->description();
op()->emitItemDescription(desc);
}
-void KrDetailedView::handleQuickSearchEvent( QKeyEvent * e ) {
+void KrDetailedView::handleQuickSearchEvent( TQKeyEvent * e ) {
switch ( e->key() ) {
case Key_Insert:
{
- QKeyEvent ev = QKeyEvent( QKeyEvent::KeyPress, Key_Space, 0, 0 );
+ TQKeyEvent ev = TQKeyEvent( TQKeyEvent::KeyPress, Key_Space, 0, 0 );
KListView::keyPressEvent( & ev );
- ev = QKeyEvent( QKeyEvent::KeyPress, Key_Down, 0, 0 );
+ ev = TQKeyEvent( TQKeyEvent::KeyPress, Key_Down, 0, 0 );
keyPressEvent( & ev );
break;
}
case Key_Home:
{
- QListView::setCurrentItem( firstChild() );
- QKeyEvent ev = QKeyEvent( QKeyEvent::KeyPress, Key_Down, 0, 0 );
+ TQListView::setCurrentItem( firstChild() );
+ TQKeyEvent ev = TQKeyEvent( TQKeyEvent::KeyPress, Key_Down, 0, 0 );
keyPressEvent( & ev );
break;
}
case Key_End:
{
- QListView::setCurrentItem( firstChild() );
- QKeyEvent ev = QKeyEvent( QKeyEvent::KeyPress, Key_Up, 0, 0 );
+ TQListView::setCurrentItem( firstChild() );
+ TQKeyEvent ev = TQKeyEvent( TQKeyEvent::KeyPress, Key_Up, 0, 0 );
keyPressEvent( & ev );
break;
}
@@ -520,20 +520,20 @@ void KrDetailedView::handleQuickSearchEvent( QKeyEvent * e ) {
}
-void KrDetailedView::slotCurrentChanged( QListViewItem * item ) {
+void KrDetailedView::slotCurrentChanged( TQListViewItem * item ) {
CANCEL_TWO_CLICK_RENAME;
if ( !item )
return ;
_nameToMakeCurrent = static_cast<KrDetailedViewItem*>( item ) ->name();
}
-void KrDetailedView::contentsMousePressEvent( QMouseEvent * e ) {
+void KrDetailedView::contentsMousePressEvent( TQMouseEvent * e ) {
bool callDefaultHandler = true, processEvent = true, selectionChanged = false;
pressedItem = 0;
- QListViewItem * oldCurrent = currentItem();
- QListViewItem *newCurrent = itemAt( contentsToViewport( e->pos() ) );
- if (e->button() == RightButton)
+ TQListViewItem * oldCurrent = currentItem();
+ TQListViewItem *newCurrent = itemAt( contentsToViewport( e->pos() ) );
+ if (e->button() == Qt::RightButton)
{
if (KrSelectionMode::getSelectionHandler()->rightButtonSelects() ||
(((e->state() & ShiftButton) || (e->state() & ControlButton))) && KrSelectionMode::getSelectionHandler()->shiftCtrlRightButtonSelects())
@@ -549,7 +549,7 @@ void KrDetailedView::contentsMousePressEvent( QMouseEvent * e ) {
lastSwushPosition = newCurrent;
}
newCurrent->setSelected(!newCurrent->isSelected());
- newCurrent->repaint();
+ newCurrent->tqrepaint();
selectionChanged = true;
}
callDefaultHandler = false;
@@ -564,7 +564,7 @@ void KrDetailedView::contentsMousePressEvent( QMouseEvent * e ) {
if( newCurrent )
{
newCurrent->setSelected(!newCurrent->isSelected());
- newCurrent->repaint();
+ newCurrent->tqrepaint();
selectionChanged = true;
callDefaultHandler = false;
e->accept();
@@ -576,7 +576,7 @@ void KrDetailedView::contentsMousePressEvent( QMouseEvent * e ) {
if( newCurrent )
{
newCurrent->setSelected( true );
- newCurrent->repaint();
+ newCurrent->tqrepaint();
}
selectionChanged = true;
callDefaultHandler = false;
@@ -591,7 +591,7 @@ void KrDetailedView::contentsMousePressEvent( QMouseEvent * e ) {
e->accept();
}
}
- if (e->button() == LeftButton)
+ if (e->button() == Qt::LeftButton)
{
dragStartPos = e->pos();
if (KrSelectionMode::getSelectionHandler()->leftButtonSelects() ||
@@ -604,7 +604,7 @@ void KrDetailedView::contentsMousePressEvent( QMouseEvent * e ) {
if (newCurrent)
{
newCurrent->setSelected(!newCurrent->isSelected());
- newCurrent->repaint();
+ newCurrent->tqrepaint();
selectionChanged = true;
}
callDefaultHandler = false;
@@ -642,11 +642,11 @@ void KrDetailedView::contentsMousePressEvent( QMouseEvent * e ) {
if ( !_focused )
op()->emitNeedFocus();
- if (processEvent && ( (e->state() & ShiftButton) || (e->state() & ControlButton) || (e->state() & AltButton) ) && !KrSelectionMode::getSelectionHandler()->useQTSelection()){
+ if (processEvent && ( (e->state() & ShiftButton) || (e->state() & ControlButton) || (e->state() & AltButton) ) && !KrSelectionMode::getSelectionHandler()->useTQTSelection()){
if ( oldCurrent && newCurrent && oldCurrent != newCurrent && e->state() & ShiftButton ) {
int oldPos = oldCurrent->itemPos();
int newPos = newCurrent->itemPos();
- QListViewItem *top = 0, *bottom = 0;
+ TQListViewItem *top = 0, *bottom = 0;
if ( oldPos > newPos ) {
top = newCurrent;
bottom = oldCurrent;
@@ -654,7 +654,7 @@ void KrDetailedView::contentsMousePressEvent( QMouseEvent * e ) {
top = oldCurrent;
bottom = newCurrent;
}
- QListViewItemIterator it( top );
+ TQListViewItemIterator it( top );
for ( ; it.current(); ++it ) {
if ( !it.current() ->isSelected() ) {
it.current() ->setSelected( true );
@@ -663,7 +663,7 @@ void KrDetailedView::contentsMousePressEvent( QMouseEvent * e ) {
if ( it.current() == bottom )
break;
}
- QListView::setCurrentItem( newCurrent );
+ TQListView::setCurrentItem( newCurrent );
callDefaultHandler = false;
}
}
@@ -671,24 +671,24 @@ void KrDetailedView::contentsMousePressEvent( QMouseEvent * e ) {
if (selectionChanged)
updateView(); // don't call triggerUpdate directly!
- // QListViewItem * i = itemAt( contentsToViewport( e->pos() ) );
+ // TQListViewItem * i = itemAt( contentsToViewport( e->pos() ) );
if (callDefaultHandler)
{
- dragStartPos = QPoint( -1, -1 );
+ dragStartPos = TQPoint( -1, -1 );
- QString name = QString::null; // will the file be deleted by the mouse event?
+ TQString name = TQString(); // will the file be deleted by the mouse event?
if( newCurrent ) // save the name of the file
name = static_cast<KrDetailedViewItem*>( newCurrent ) ->name();
KListView::contentsMousePressEvent( e );
- if( name.isEmpty() || _dict.find( name ) == 0 ) // is the file still valid?
+ if( name.isEmpty() || _dict.tqfind( name ) == 0 ) // is the file still valid?
newCurrent = 0; // if not, don't do any crash...
} else {
- // emitting the missing signals from QListView::contentsMousePressEvent();
+ // emitting the missing signals from TQListView::contentsMousePressEvent();
// the right click signal is not emitted as it is used for selection
- QPoint vp = contentsToViewport( e->pos() );
+ TQPoint vp = contentsToViewport( e->pos() );
if( !newCurrent || ( newCurrent && newCurrent->isEnabled() ) ) {
emit pressed( pressedItem = newCurrent );
@@ -700,7 +700,7 @@ void KrDetailedView::contentsMousePressEvent( QMouseEvent * e ) {
// if (i != 0) // comment in, if click sould NOT select
// setSelected(i, FALSE);
- if (newCurrent) QListView::setCurrentItem(newCurrent);
+ if (newCurrent) TQListView::setCurrentItem(newCurrent);
if ( ACTIVE_PANEL->quickSearch->isShown() ) {
ACTIVE_PANEL->quickSearch->hide();
@@ -714,17 +714,17 @@ void KrDetailedView::contentsMousePressEvent( QMouseEvent * e ) {
}
}
-void KrDetailedView::contentsMouseReleaseEvent( QMouseEvent * e ) {
- if (e->button() == RightButton)
+void KrDetailedView::contentsMouseReleaseEvent( TQMouseEvent * e ) {
+ if (e->button() == Qt::RightButton)
contextMenuTimer.stop();
KListView::contentsMouseReleaseEvent( e );
if( pressedItem ) {
- QPoint vp = contentsToViewport( e->pos() );
- QListViewItem *newCurrent = itemAt( vp );
+ TQPoint vp = contentsToViewport( e->pos() );
+ TQListViewItem *newCurrent = itemAt( vp );
if( pressedItem == newCurrent ) {
- // emitting the missing signals from QListView::contentsMouseReleaseEvent();
+ // emitting the missing signals from TQListView::contentsMouseReleaseEvent();
// the right click signal is not emitted as it is used for selection
if( !newCurrent || ( newCurrent && newCurrent->isEnabled() ) ) {
@@ -739,23 +739,23 @@ void KrDetailedView::contentsMouseReleaseEvent( QMouseEvent * e ) {
}
}
-void KrDetailedView::contentsMouseMoveEvent ( QMouseEvent * e ) {
+void KrDetailedView::contentsMouseMoveEvent ( TQMouseEvent * e ) {
if ( ( singleClicked || renameTimer.isActive() ) && itemAt( contentsToViewport( e->pos() ) ) != clickedItem )
CANCEL_TWO_CLICK_RENAME;
- if ( dragStartPos != QPoint( -1, -1 ) &&
- e->state() & LeftButton && ( dragStartPos - e->pos() ).manhattanLength() > QApplication::startDragDistance() )
+ if ( dragStartPos != TQPoint( -1, -1 ) &&
+ e->state() & Qt::LeftButton && ( dragStartPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() )
startDrag();
if (KrSelectionMode::getSelectionHandler()->rightButtonPreservesSelection()
&& KrSelectionMode::getSelectionHandler()->rightButtonSelects()
&& KrSelectionMode::getSelectionHandler()->showContextMenu() >= 0 && e->state() == Qt::RightButton)
{
- QListViewItem *newItem = itemAt( contentsToViewport( e->pos() ) );
+ TQListViewItem *newItem = itemAt( contentsToViewport( e->pos() ) );
e->accept();
if (newItem != lastSwushPosition && newItem)
{
// is the new item above or below the previous one?
- QListViewItem * above = newItem;
- QListViewItem * below = newItem;
+ TQListViewItem * above = newItem;
+ TQListViewItem * below = newItem;
for (;(above || below) && above != lastSwushPosition && below != lastSwushPosition;)
{
if (above)
@@ -781,7 +781,7 @@ void KrDetailedView::contentsMouseMoveEvent ( QMouseEvent * e ) {
}
contextMenuTimer.stop();
}
- // emitting the missing signals from QListView::contentsMouseMoveEvent();
+ // emitting the missing signals from TQListView::contentsMouseMoveEvent();
if( newItem )
emit onItem( newItem );
else
@@ -791,13 +791,13 @@ void KrDetailedView::contentsMouseMoveEvent ( QMouseEvent * e ) {
KListView::contentsMouseMoveEvent( e );
}
-void KrDetailedView::contentsWheelEvent( QWheelEvent * e ) {
+void KrDetailedView::contentsWheelEvent( TQWheelEvent * e ) {
if ( !_focused )
op()->emitNeedFocus();
KListView::contentsWheelEvent( e );
}
-void KrDetailedView::handleContextMenu( QListViewItem * it, const QPoint & pos, int ) {
+void KrDetailedView::handleContextMenu( TQListViewItem * it, const TQPoint & pos, int ) {
if ( !_focused )
op()->emitNeedFocus();
if ( !it )
@@ -806,7 +806,7 @@ void KrDetailedView::handleContextMenu( QListViewItem * it, const QPoint & pos,
name() == ".." )
return ;
int i = KrSelectionMode::getSelectionHandler()->showContextMenu();
- contextMenuPoint = QPoint( pos.x(), pos.y() - header() ->height() );
+ contextMenuPoint = TQPoint( pos.x(), pos.y() - header() ->height() );
if (i < 0)
showContextMenu();
else if (i > 0)
@@ -820,35 +820,35 @@ void KrDetailedView::showContextMenu()
op()->emitContextMenu( contextMenuPoint );
}
-KrViewItem *KrDetailedView::getKrViewItemAt( const QPoint & vp ) {
+KrViewItem *KrDetailedView::getKrViewItemAt( const TQPoint & vp ) {
return dynamic_cast<KrViewItem*>( KListView::itemAt( vp ) );
}
-bool KrDetailedView::acceptDrag( QDropEvent* ) const {
+bool KrDetailedView::acceptDrag( TQDropEvent* ) const {
return true;
}
-QRect KrDetailedView::drawItemHighlighter(QPainter *painter, QListViewItem *item)
+TQRect KrDetailedView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item)
{
- QRect r;
+ TQRect r;
if( _currDragItem && item ) {
- r = itemRect(item);
+ r = tqitemRect(item);
if (painter)
- style().drawPrimitive(QStyle::PE_FocusRect, painter, r, colorGroup(),
- QStyle::Style_FocusAtBorder, colorGroup().highlight());
+ tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, r, tqcolorGroup(),
+ TQStyle::Style_FocusAtBorder, tqcolorGroup().highlight());
}
return r;
}
-void KrDetailedView::contentsDropEvent( QDropEvent * e ) {
+void KrDetailedView::contentsDropEvent( TQDropEvent * e ) {
e->setPoint( contentsToViewport( e->pos() ) );
op()->emitGotDrop(e);
e->ignore();
KListView::contentsDropEvent( e );
}
-void KrDetailedView::contentsDragMoveEvent( QDragMoveEvent * e ) {
+void KrDetailedView::contentsDragMoveEvent( TQDragMoveEvent * e ) {
_currDragItem = getKrViewItemAt(contentsToViewport(e->pos()));
if( _currDragItem && !_currDragItem->VF->vfile_isDir() )
_currDragItem = 0;
@@ -856,7 +856,7 @@ void KrDetailedView::contentsDragMoveEvent( QDragMoveEvent * e ) {
KListView::contentsDragMoveEvent( e );
}
-void KrDetailedView::imStartEvent(QIMEvent* e)
+void KrDetailedView::imStartEvent(TQIMEvent* e)
{
if ( ACTIVE_PANEL->quickSearch->isShown() ) {
ACTIVE_PANEL->quickSearch->myIMStartEvent( e );
@@ -873,7 +873,7 @@ void KrDetailedView::imStartEvent(QIMEvent* e)
// item is "below" the quick search window, as the list view will
// realize its new size after the key processing. The following line
// will resize the list view immediately.
- ACTIVE_PANEL->layout->activate();
+ ACTIVE_PANEL->tqlayout->activate();
// second, we need to disable the dirup action - hack!
krDirUp->setEnabled( false );
}
@@ -883,7 +883,7 @@ void KrDetailedView::imStartEvent(QIMEvent* e)
}
}
-void KrDetailedView::imEndEvent(QIMEvent* e)
+void KrDetailedView::imEndEvent(TQIMEvent* e)
{
if ( ACTIVE_PANEL->quickSearch->isShown() ) {
ACTIVE_PANEL->quickSearch->myIMEndEvent( e );
@@ -891,7 +891,7 @@ void KrDetailedView::imEndEvent(QIMEvent* e)
}
}
-void KrDetailedView::imComposeEvent(QIMEvent* e)
+void KrDetailedView::imComposeEvent(TQIMEvent* e)
{
if ( ACTIVE_PANEL->quickSearch->isShown() ) {
ACTIVE_PANEL->quickSearch->myIMComposeEvent( e );
@@ -900,7 +900,7 @@ void KrDetailedView::imComposeEvent(QIMEvent* e)
}
// TODO: for brief mode, move as much of this as possible to the viewOperator
-void KrDetailedView::keyPressEvent( QKeyEvent * e ) {
+void KrDetailedView::keyPressEvent( TQKeyEvent * e ) {
if ( !e || !firstChild() )
return ; // subclass bug
if ( ACTIVE_PANEL->quickSearch->isShown() ) {
@@ -912,14 +912,14 @@ void KrDetailedView::keyPressEvent( QKeyEvent * e ) {
if ( e->state() == ControlButton ) { // let the panel handle it - jump to the Location Bar
e->ignore();
break;
- } else if (!KrSelectionMode::getSelectionHandler()->useQTSelection()) {
- QListViewItem * i = currentItem();
+ } else if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()) {
+ TQListViewItem * i = currentItem();
if ( !i ) break;
if ( e->state() == ShiftButton ) setSelected( i, !i->isSelected() );
i = i->itemAbove();
if ( i ) {
- QListView::setCurrentItem( i );
- QListView::ensureItemVisible( i );
+ TQListView::setCurrentItem( i );
+ TQListView::ensureItemVisible( i );
}
} else KListView::keyPressEvent(e);
break;
@@ -927,35 +927,35 @@ void KrDetailedView::keyPressEvent( QKeyEvent * e ) {
if ( e->state() == ControlButton || e->state() == ( ControlButton | ShiftButton ) ) { // let the panel handle it - jump to command line
e->ignore();
break;
- } else if (!KrSelectionMode::getSelectionHandler()->useQTSelection()){
- QListViewItem * i = currentItem();
+ } else if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()){
+ TQListViewItem * i = currentItem();
if ( !i ) break;
if ( e->state() == ShiftButton ) setSelected( i, !i->isSelected() );
i = i->itemBelow();
- if ( i ) {QListView::setCurrentItem( i ); QListView::ensureItemVisible( i ); }
+ if ( i ) {TQListView::setCurrentItem( i ); TQListView::ensureItemVisible( i ); }
} else KListView::keyPressEvent(e);
break;
- case Key_Next: if (!KrSelectionMode::getSelectionHandler()->useQTSelection()){
- QListViewItem * i = currentItem(), *j;
+ case Key_Next: if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()){
+ TQListViewItem * i = currentItem(), *j;
if ( !i ) break;
- QRect r( itemRect( i ) );
+ TQRect r( tqitemRect( i ) );
if ( !r.height() ) break;
for ( int page = visibleHeight() / r.height() - 1; page > 0 && ( j = i->itemBelow() ); --page )
i = j;
- if ( i ) {QListView::setCurrentItem( i ); QListView::ensureItemVisible( i ); }
+ if ( i ) {TQListView::setCurrentItem( i ); TQListView::ensureItemVisible( i ); }
} else KListView::keyPressEvent(e);
break;
- case Key_Prior: if (!KrSelectionMode::getSelectionHandler()->useQTSelection()){
- QListViewItem * i = currentItem(), *j;
+ case Key_Prior: if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()){
+ TQListViewItem * i = currentItem(), *j;
if ( !i ) break;
- QRect r( itemRect( i ) );
+ TQRect r( tqitemRect( i ) );
if ( !r.height() ) break;
for ( int page = visibleHeight() / r.height() - 1; page > 0 && ( j = i->itemAbove() ); --page )
i = j;
- if ( i ) {QListView::setCurrentItem( i ); QListView::ensureItemVisible( i ); }
+ if ( i ) {TQListView::setCurrentItem( i ); TQListView::ensureItemVisible( i ); }
} else KListView::keyPressEvent(e);
break;
- case Key_Home: if (!KrSelectionMode::getSelectionHandler()->useQTSelection()){
+ case Key_Home: if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()){
if ( e->state() & ShiftButton ) /* Shift+Home */
{
clearSelection();
@@ -964,12 +964,12 @@ void KrDetailedView::keyPressEvent( QKeyEvent * e ) {
triggerUpdate();
break;
} else {
- QListViewItem * i = firstChild();
- if ( i ) {QListView::setCurrentItem( i ); QListView::ensureItemVisible( i ); }
+ TQListViewItem * i = firstChild();
+ if ( i ) {TQListView::setCurrentItem( i ); TQListView::ensureItemVisible( i ); }
}
} else KListView::keyPressEvent(e);
break;
- case Key_End: if (!KrSelectionMode::getSelectionHandler()->useQTSelection()){
+ case Key_End: if (!KrSelectionMode::getSelectionHandler()->useTQTSelection()){
if ( e->state() & ShiftButton ) /* Shift+End */
{
clearSelection();
@@ -978,12 +978,12 @@ void KrDetailedView::keyPressEvent( QKeyEvent * e ) {
triggerUpdate();
break;
} else {
- QListViewItem *i = firstChild(), *j;
+ TQListViewItem *i = firstChild(), *j;
while ( ( j = i->nextSibling() ) )
i = j;
while ( ( j = i->itemBelow() ) )
i = j;
- if ( i ) {QListView::setCurrentItem( i ); QListView::ensureItemVisible( i ); }
+ if ( i ) {TQListView::setCurrentItem( i ); TQListView::ensureItemVisible( i ); }
break;
}
} else KListView::keyPressEvent(e);
@@ -994,7 +994,7 @@ void KrDetailedView::keyPressEvent( QKeyEvent * e ) {
e->ignore();
else {
KrViewItem * i = getCurrentKrViewItem();
- QString tmp = i->name();
+ TQString tmp = i->name();
op()->emitExecuted(tmp);
}
break;
@@ -1019,13 +1019,13 @@ void KrDetailedView::keyPressEvent( QKeyEvent * e ) {
return ;
}
if ( i->VF->vfile_isDir() ) { // we create a return-pressed event,
- QString tmp = i->name();
+ TQString tmp = i->name();
op()->emitExecuted(tmp); // thereby emulating a chdir
} else if( i->VF->vfile_getUrl().isLocalFile() ) {
bool encrypted;
KURL url = i->VF->vfile_getUrl();
- QString mime = ((vfile *)(i->VF))->vfile_getMime();
- QString type = KRarcHandler::getType( encrypted, url.path(), mime, false );
+ TQString mime = ((vfile *)(i->VF))->vfile_getMime();
+ TQString type = KRarcHandler::getType( encrypted, url.path(), mime, false );
if( KRarcHandler::arcSupported( type ) ) {
KURL url = i->VF->vfile_getUrl();
@@ -1068,7 +1068,7 @@ void KrDetailedView::keyPressEvent( QKeyEvent * e ) {
KListView::keyPressEvent( e );
else
{
- QKeyEvent ev = QKeyEvent( QKeyEvent::KeyPress, Key_Space, 0, 0 );
+ TQKeyEvent ev = TQKeyEvent( TQKeyEvent::KeyPress, Key_Space, 0, 0 );
KListView::keyPressEvent( & ev );
}
break ;
@@ -1078,7 +1078,7 @@ void KrDetailedView::keyPressEvent( QKeyEvent * e ) {
if ( !viewItem || viewItem->name() == ".." ) { // wrong type, just mark(unmark it)
if (KrSelectionMode::getSelectionHandler()->spaceMovesDown())
{
- QKeyEvent ev = QKeyEvent( QKeyEvent::KeyPress, Key_Insert, 0, 0 );
+ TQKeyEvent ev = TQKeyEvent( TQKeyEvent::KeyPress, Key_Insert, 0, 0 );
KListView::keyPressEvent( & ev );
}
else
@@ -1094,7 +1094,7 @@ void KrDetailedView::keyPressEvent( QKeyEvent * e ) {
//
KIO::filesize_t totalSize = 0;
unsigned long totalFiles = 0, totalDirs = 0;
- QStringList items;
+ TQStringList items;
items.push_back( viewItem->name() );
if ( ACTIVE_PANEL->func->calcSpace( items, totalSize, totalFiles, totalDirs ) ) {
// did we succeed to calcSpace? we'll fail if we don't have permissions
@@ -1102,12 +1102,12 @@ void KrDetailedView::keyPressEvent( QKeyEvent * e ) {
goto mark;
}
viewItem->setSize( totalSize );
- viewItem->repaintItem();
+ viewItem->tqrepaintItem();
}
}
mark: if (KrSelectionMode::getSelectionHandler()->spaceMovesDown())
{
- QKeyEvent ev = QKeyEvent( QKeyEvent::KeyPress, Key_Insert, 0, 0 );
+ TQKeyEvent ev = TQKeyEvent( TQKeyEvent::KeyPress, Key_Insert, 0, 0 );
KListView::keyPressEvent( & ev );
}
else
@@ -1122,7 +1122,7 @@ mark: if (KrSelectionMode::getSelectionHandler()->spaceMovesDown())
}
default:
if ( e->key() == Key_Escape ) {
- QListView::keyPressEvent( e ); return ; // otherwise the selection gets lost??!??
+ TQListView::keyPressEvent( e ); return ; // otherwise the selection gets lost??!??
}
// if the key is A..Z or 1..0 do quick search otherwise...
if ( e->text().length() > 0 && e->text() [ 0 ].isPrint() ) // better choice. Otherwise non-ascii characters like can not be the first character of a filename
@@ -1146,7 +1146,7 @@ mark: if (KrSelectionMode::getSelectionHandler()->spaceMovesDown())
// item is "below" the quick search window, as the list view will
// realize its new size after the key processing. The following line
// will resize the list view immediately.
- ACTIVE_PANEL->layout->activate();
+ ACTIVE_PANEL->tqlayout->activate();
// second, we need to disable the dirup action - hack!
krDirUp->setEnabled( false );
}
@@ -1166,30 +1166,30 @@ mark: if (KrSelectionMode::getSelectionHandler()->spaceMovesDown())
}
}
// emit the new item description
- slotItemDescription( currentItem() ); // actually send the QListViewItem
+ slotItemDescription( currentItem() ); // actually send the TQListViewItem
}
// overridden to make sure EXTENTION won't be lost during rename
-void KrDetailedView::rename( QListViewItem * item, int c ) {
+void KrDetailedView::rename( TQListViewItem * item, int c ) {
// do we have an EXT column? if so, handle differently:
// copy the contents of the EXT column over to the name
if ( COLUMN( Extention ) != -1 ) {
item->setText( COLUMN( Name ), static_cast<KrDetailedViewItem*>( item ) ->name() );
- item->setText( COLUMN( Extention ), QString::null );
- repaintItem( item );
+ item->setText( COLUMN( Extention ), TQString() );
+ tqrepaintItem( item );
}
currentlyRenamedItem = item;
- renameLineEdit()->setBackgroundMode(Qt::FixedColor);
- renameLineEdit()->setPaletteBackgroundColor(Qt::white);
- renameLineEdit()->setPaletteForegroundColor(Qt::black);
+ renameLineEdit()->setBackgroundMode(TQt::FixedColor);
+ renameLineEdit()->setPaletteBackgroundColor(TQt::white);
+ renameLineEdit()->setPaletteForegroundColor(TQt::black);
KListView::rename( item, c );
renameLineEdit() ->selectAll();
}
void KrDetailedView::renameCurrentItem() {
int c;
- QString newName, fileName;
+ TQString newName, fileName;
// handle inplace renaming, if possible
@@ -1210,12 +1210,12 @@ void KrDetailedView::renameCurrentItem() {
c = -1; // failsafe
if ( c >= 0 ) {
- rename( static_cast<QListViewItem*>( it ), c );
+ rename( static_cast<TQListViewItem*>( it ), c );
// if applicable, select only the name without extension
KConfigGroupSaver svr(krConfig,"Look&Feel");
if (!krConfig->readBoolEntry("Rename Selects Extension", true)) {
if (it->hasExtension() && !it->VF->vfile_isDir() )
- renameLineEdit()->setSelection(0, it->name().findRev(it->extension())-1);
+ renameLineEdit()->setSelection(0, it->name().tqfindRev(it->extension())-1);
}
// signal will be emited when renaming is done, and finalization
// will occur in inplaceRenameFinished()
@@ -1226,7 +1226,7 @@ void KrDetailedView::renameCurrentItem() {
}
}
-void KrDetailedView::inplaceRenameFinished( QListViewItem * it, int ) {
+void KrDetailedView::inplaceRenameFinished( TQListViewItem * it, int ) {
if( currentlyRenamedItem == 0 )
return;
@@ -1250,14 +1250,14 @@ void KrDetailedView::inplaceRenameFinished( QListViewItem * it, int ) {
if ( COLUMN( Extention ) != -1 && restoreView ) { // nothing happened, restore the view (if needed)
#endif
- QString ext, name = static_cast<KrDetailedViewItem*>( it ) ->name();
+ TQString ext, name = static_cast<KrDetailedViewItem*>( it ) ->name();
if ( !static_cast<KrDetailedViewItem*>( it ) ->VF->vfile_isDir() && COLUMN( Extention ) != -1 ) {
ext = static_cast<KrDetailedViewItem*>( it ) ->extension();
name = static_cast<KrDetailedViewItem*>( it ) ->name( false );
}
it->setText( COLUMN( Name ), name );
it->setText( COLUMN( Extention ), ext );
- repaintItem( it );
+ tqrepaintItem( it );
#if 0
}
#endif
@@ -1268,7 +1268,7 @@ void KrDetailedView::inplaceRenameFinished( QListViewItem * it, int ) {
}
// TODO: move the whole quicksearch mess out of here and into krview
-void KrDetailedView::quickSearch( const QString & str, int direction ) {
+void KrDetailedView::quickSearch( const TQString & str, int direction ) {
KrViewItem * item = getCurrentKrViewItem();
if (!item)
return;
@@ -1294,7 +1294,7 @@ void KrDetailedView::quickSearch( const QString & str, int direction ) {
}
}
-void KrDetailedView::stopQuickSearch( QKeyEvent * e ) {
+void KrDetailedView::stopQuickSearch( TQKeyEvent * e ) {
if( ACTIVE_PANEL && ACTIVE_PANEL->quickSearch ) {
ACTIVE_PANEL->quickSearch->hide();
ACTIVE_PANEL->quickSearch->clear();
@@ -1305,12 +1305,12 @@ void KrDetailedView::stopQuickSearch( QKeyEvent * e ) {
}
// internal: converts signal from qlistview to krview
-void KrDetailedView::setNameToMakeCurrent( QListViewItem * it ) {
+void KrDetailedView::setNameToMakeCurrent( TQListViewItem * it ) {
if (!it) return;
KrView::setNameToMakeCurrent( static_cast<KrDetailedViewItem*>( it ) ->name() );
}
-void KrDetailedView::slotMouseClicked( int button, QListViewItem * item, const QPoint&, int ) {
+void KrDetailedView::slotMouseClicked( int button, TQListViewItem * item, const TQPoint&, int ) {
pressedItem = 0; // if the signals are emitted, don't emit twice at contentsMouseReleaseEvent
if ( button == Qt::MidButton )
emit middleButtonClicked( dynamic_cast<KrViewItem *>( item ) );
@@ -1325,7 +1325,7 @@ void KrDetailedView::refreshColors() {
bool isActive = hasFocus();
if ( MAIN_VIEW && ACTIVE_PANEL && ACTIVE_PANEL->view )
isActive = ( static_cast<KrView *>( this ) == ACTIVE_PANEL->view );
- QColorGroup cg;
+ TQColorGroup cg;
KrColorCache::getColorCache().getColors(cg, KrColorItemType(KrColorItemType::File, false, isActive, false, false));
setPaletteBackgroundColor( cg.background() );
@@ -1335,18 +1335,18 @@ void KrDetailedView::refreshColors() {
// KDE default is choosen: set back the background color
setPaletteBackgroundColor( KGlobalSettings::baseColor() );
// Set the alternate color to its default or to an invalid color, to turn alternate the background off.
- setAlternateBackground( alternateBackgroundEnabled ? KGlobalSettings::alternateBackgroundColor() : QColor() );
+ setAlternateBackground( alternateBackgroundEnabled ? KGlobalSettings::alternateBackgroundColor() : TQColor() );
}
}
-bool KrDetailedView::event( QEvent *e ) {
+bool KrDetailedView::event( TQEvent *e ) {
modifierPressed = false;
switch ( e->type() ) {
- case QEvent::Timer:
- case QEvent::MouseMove:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
+ case TQEvent::Timer:
+ case TQEvent::MouseMove:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
break;
default:
CANCEL_TWO_CLICK_RENAME;
@@ -1354,14 +1354,14 @@ bool KrDetailedView::event( QEvent *e ) {
return KListView::event( e );
}
-bool KrDetailedView::eventFilter( QObject * watched, QEvent * e )
+bool KrDetailedView::eventFilter( TQObject * watched, TQEvent * e )
{
- if( watched == renameLineEdit() )
+ if( TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(renameLineEdit()) )
{
- if( currentlyRenamedItem && e->type() == QEvent::Hide )
+ if( currentlyRenamedItem && e->type() == TQEvent::Hide )
{
/* checking if the currentlyRenamedItem pointer is valid (vfs_refresh can delete this item) */
- for( QListViewItem *it = firstChild(); it; it = it->nextSibling() )
+ for( TQListViewItem *it = firstChild(); it; it = it->nextSibling() )
if( it == currentlyRenamedItem )
{
if ( it->text( COLUMN( Name ) ) == dynamic_cast<KrDetailedViewItem*>( it ) ->name() && COLUMN( Extention ) != -1 )
@@ -1371,9 +1371,9 @@ bool KrDetailedView::eventFilter( QObject * watched, QEvent * e )
}
return FALSE;
}
- else if( watched == header() )
+ else if( TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(header()) )
{
- if( e->type() == QEvent::MouseButtonPress && ((QMouseEvent *)e )->button() == Qt::RightButton )
+ if( e->type() == TQEvent::MouseButtonPress && ((TQMouseEvent *)e )->button() == Qt::RightButton )
{
selectColumns();
return TRUE;
@@ -1384,14 +1384,14 @@ bool KrDetailedView::eventFilter( QObject * watched, QEvent * e )
}
void KrDetailedView::makeItemVisible( const KrViewItem *item ) {
-// qApp->processEvents(); // Please don't remove the comment. Causes crash if it is inserted!
+// tqApp->processEvents(); // Please don't remove the comment. Causes crash if it is inserted!
ensureItemVisible( static_cast<const KrDetailedViewItem*>( item ) );
}
void KrDetailedView::initOperator() {
_operator = new KrViewOperator(this, this);
// klistview emits selection changed, so chain them to operator
- connect(this, SIGNAL(selectionChanged()), _operator, SIGNAL(selectionChanged()));
+ connect(this, TQT_SIGNAL(selectionChanged()), _operator, TQT_SIGNAL(selectionChanged()));
}
void KrDetailedView::initProperties() {
@@ -1409,15 +1409,15 @@ void KrDetailedView::initProperties() {
PROPS->sortMode = static_cast<KrViewProperties::SortSpec>( _properties->sortMode |
KrViewProperties::IgnoreCase );
PROPS->humanReadableSize = krConfig->readBoolEntry("Human Readable Size", _HumanReadableSize);
- PROPS->localeAwareCompareIsCaseSensitive = QString( "a" ).localeAwareCompare( "B" ) > 0; // see KDE bug #40131
- QStringList defaultAtomicExtensions;
+ PROPS->localeAwareCompareIsCaseSensitive = TQString( "a" ).localeAwareCompare( "B" ) > 0; // see KDE bug #40131
+ TQStringList defaultAtomicExtensions;
defaultAtomicExtensions += ".tar.gz";
defaultAtomicExtensions += ".tar.bz2";
- defaultAtomicExtensions += ".moc.cpp";
- QStringList atomicExtensions = krConfig->readListEntry("Atomic Extensions", defaultAtomicExtensions);
- for (QStringList::iterator i = atomicExtensions.begin(); i != atomicExtensions.end(); )
+ defaultAtomicExtensions += ".tqmoc.cpp";
+ TQStringList atomicExtensions = krConfig->readListEntry("Atomic Extensions", defaultAtomicExtensions);
+ for (TQStringList::iterator i = atomicExtensions.begin(); i != atomicExtensions.end(); )
{
- QString & ext = *i;
+ TQString & ext = *i;
ext = ext.stripWhiteSpace();
if (!ext.length())
{
@@ -1471,7 +1471,7 @@ void KrDetailedView::selectColumns()
popup.insertItem( i18n( "Group" ), COLUMN_POPUP_IDS + KrDetailedViewProperties::Group );
popup.setItemChecked( COLUMN_POPUP_IDS + KrDetailedViewProperties::Group, hasGroup );
- int result=popup.exec(QCursor::pos());
+ int result=popup.exec(TQCursor::pos());
krConfig->setGroup( nameInKConfig() );
@@ -1514,7 +1514,7 @@ void KrDetailedView::selectColumns()
if( refresh )
{
PanelManager *p = ACTIVE_PANEL->view == this ? ACTIVE_MNG : OTHER_MNG;
- QTimer::singleShot( 0, p, SLOT( slotRecreatePanels() ) );
+ TQTimer::singleShot( 0, p, TQT_SLOT( slotRecreatePanels() ) );
}
}
@@ -1528,10 +1528,10 @@ void KrDetailedView::updateView() {
}
void KrDetailedView::updateItem(KrViewItem* item) {
- dynamic_cast<KrDetailedViewItem*>(item)->repaintItem();
+ dynamic_cast<KrDetailedViewItem*>(item)->tqrepaintItem();
}
-void KrDetailedView::slotRightButtonPressed(QListViewItem*, const QPoint& point, int) {
+void KrDetailedView::slotRightButtonPressed(TQListViewItem*, const TQPoint& point, int) {
op()->emitEmptyContextMenu(point);
}
diff --git a/krusader/Panel/krdetailedview.h b/krusader/Panel/krdetailedview.h
index f0616fb..c3cba90 100644
--- a/krusader/Panel/krdetailedview.h
+++ b/krusader/Panel/krdetailedview.h
@@ -33,9 +33,9 @@ A
#include <klistview.h>
#include <ksqueezedtextlabel.h>
#include <klocale.h>
-#include <qwidget.h>
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
#include "krview.h"
#include "krviewitem.h"
@@ -57,24 +57,25 @@ public:
};
-class QDragMoveEvent;
+class TQDragMoveEvent;
class KrRenameTimerObject;
class ListPanel;
class KrDetailedViewItem;
/**
* KrDetailedView implements everthing and anything regarding a detailed view in a filemananger.
- * IT MUST USE KrViewItem as the children to it's *KListView. KrDetailedView and KrViewItem are
+ * IT MUST USE KrViewItem as the tqchildren to it's *KListView. KrDetailedView and KrViewItem are
* tightly coupled and the view will not work with other kinds of items.
* Apart from this, the view is self-reliant and you can use the vast interface to get whatever
* information is necessery from it.
*/
class KrDetailedView : public KListView, public KrView {
Q_OBJECT
+ TQ_OBJECT
friend class KrDetailedViewItem;
public:
- KrDetailedView( QWidget *parent, bool &left, KConfig *cfg = krConfig, const char *name = 0 );
+ KrDetailedView( TQWidget *tqparent, bool &left, KConfig *cfg = krConfig, const char *name = 0 );
virtual ~KrDetailedView();
virtual int column( KrDetailedViewProperties::ColumnType type );
virtual inline KrViewItem *getFirst() { return dynamic_cast<KrViewItem*>( firstChild() ); }
@@ -82,12 +83,12 @@ public:
virtual inline KrViewItem *getNext( KrViewItem *current ) { return dynamic_cast<KrViewItem*>( dynamic_cast<KListViewItem*>( current ) ->itemBelow() ); }
virtual inline KrViewItem *getPrev( KrViewItem *current ) { return dynamic_cast<KrViewItem*>( dynamic_cast<KListViewItem*>( current ) ->itemAbove() ); }
virtual inline KrViewItem *getCurrentKrViewItem() { return dynamic_cast<KrViewItem*>( currentItem() ); }
- virtual KrViewItem *getKrViewItemAt( const QPoint &vp );
- virtual inline KrViewItem *findItemByName( const QString &name ) { return dynamic_cast<KrViewItem*>( findItem( name, 0 ) ); }
+ virtual KrViewItem *getKrViewItemAt( const TQPoint &vp );
+ virtual inline KrViewItem *findItemByName( const TQString &name ) { return dynamic_cast<KrViewItem*>( tqfindItem( name, 0 ) ); }
virtual void addItems( vfs *v, bool addUpDir = true );
- virtual QString getCurrentItem() const;
+ virtual TQString getCurrentItem() const;
virtual void makeItemVisible( const KrViewItem *item );
- virtual void setCurrentItem( const QString& name );
+ virtual void setCurrentItem( const TQString& name );
virtual void updateView();
virtual void updateItem(KrViewItem* item);
virtual void clear();
@@ -112,69 +113,69 @@ protected:
void newColumn( KrDetailedViewProperties::ColumnType type );
void selectColumns();
- virtual void keyPressEvent( QKeyEvent *e );
- virtual void imStartEvent( QIMEvent* e );
- virtual void imEndEvent( QIMEvent *e );
- virtual void imComposeEvent( QIMEvent *e );
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseReleaseEvent (QMouseEvent *e);
- virtual void contentsMouseMoveEvent ( QMouseEvent * e );
- virtual void contentsWheelEvent( QWheelEvent *e );
- virtual bool acceptDrag( QDropEvent* e ) const;
- virtual void contentsDropEvent( QDropEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual QRect drawItemHighlighter(QPainter *painter, QListViewItem *item);
+ virtual void keyPressEvent( TQKeyEvent *e );
+ virtual void imStartEvent( TQIMEvent* e );
+ virtual void imEndEvent( TQIMEvent *e );
+ virtual void imComposeEvent( TQIMEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseReleaseEvent (TQMouseEvent *e);
+ virtual void contentsMouseMoveEvent ( TQMouseEvent * e );
+ virtual void contentsWheelEvent( TQWheelEvent *e );
+ virtual bool acceptDrag( TQDropEvent* e ) const;
+ virtual void contentsDropEvent( TQDropEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual TQRect drawItemHighlighter(TQPainter *painter, TQListViewItem *item);
virtual void startDrag() { op()->startDrag(); }
- virtual bool event( QEvent *e );
- virtual bool eventFilter( QObject * watched, QEvent * e );
+ virtual bool event( TQEvent *e );
+ virtual bool eventFilter( TQObject * watched, TQEvent * e );
protected slots:
- void rename( QListViewItem *item, int c );
- void slotClicked( QListViewItem *item );
- void slotDoubleClicked( QListViewItem *item );
- void slotItemDescription( QListViewItem *item );
- void slotCurrentChanged( QListViewItem *item );
- void handleContextMenu( QListViewItem*, const QPoint&, int );
+ void rename( TQListViewItem *item, int c );
+ void slotClicked( TQListViewItem *item );
+ void slotDoubleClicked( TQListViewItem *item );
+ void slotItemDescription( TQListViewItem *item );
+ void slotCurrentChanged( TQListViewItem *item );
+ void handleContextMenu( TQListViewItem*, const TQPoint&, int );
virtual void renameCurrentItem();
virtual void showContextMenu( );
- void inplaceRenameFinished( QListViewItem *it, int col );
- void setNameToMakeCurrent( QListViewItem *it );
+ void inplaceRenameFinished( TQListViewItem *it, int col );
+ void setNameToMakeCurrent( TQListViewItem *it );
void sortOrderChanged(int);
- void slotRightButtonPressed(QListViewItem*, const QPoint& point, int);
+ void slotRightButtonPressed(TQListViewItem*, const TQPoint& point, int);
void slotSortOrderChanged(int col);
- void transformCurrentChanged( QListViewItem * item ) { emit currentChanged( dynamic_cast<KrViewItem *>(item ) ); }
+ void transformCurrentChanged( TQListViewItem * item ) { emit currentChanged( dynamic_cast<KrViewItem *>(item ) ); }
/**
* used internally to produce the signal middleButtonClicked()
*/
- void slotMouseClicked( int button, QListViewItem * item, const QPoint & pos, int c );
- inline void slotExecuted( QListViewItem* i ) {
- QString tmp = dynamic_cast<KrViewItem*>( i ) ->name();
+ void slotMouseClicked( int button, TQListViewItem * item, const TQPoint & pos, int c );
+ inline void slotExecuted( TQListViewItem* i ) {
+ TQString tmp = dynamic_cast<KrViewItem*>( i ) ->name();
op()->emitExecuted( tmp );
}
public slots:
void refreshColors();
- void quickSearch( const QString &, int = 0 );
- void stopQuickSearch( QKeyEvent* );
- void handleQuickSearchEvent( QKeyEvent* );
+ void quickSearch( const TQString &, int = 0 );
+ void stopQuickSearch( TQKeyEvent* );
+ void handleQuickSearchEvent( TQKeyEvent* );
private:
- static QString ColumnName[ KrDetailedViewProperties::MAX_COLUMNS ];
+ static TQString ColumnName[ KrDetailedViewProperties::MAX_COLUMNS ];
bool swushSelects;
- QPoint dragStartPos;
- QListViewItem *lastSwushPosition;
+ TQPoint dragStartPos;
+ TQListViewItem *lastSwushPosition;
bool caseSensitiveSort;
KrViewItem *_currDragItem;
bool singleClicked;
bool modifierPressed;
- QTime clickTime;
- QListViewItem *clickedItem;
- QTimer renameTimer;
- QTimer contextMenuTimer;
- QPoint contextMenuPoint;
- QListViewItem *currentlyRenamedItem;
- QListViewItem *pressedItem;
+ TQTime clickTime;
+ TQListViewItem *clickedItem;
+ TQTimer renameTimer;
+ TQTimer contextMenuTimer;
+ TQPoint contextMenuPoint;
+ TQListViewItem *currentlyRenamedItem;
+ TQListViewItem *pressedItem;
};
#endif /* KRDETAILEDVIEW_H */
diff --git a/krusader/Panel/krdetailedviewitem.cpp b/krusader/Panel/krdetailedviewitem.cpp
index 4d37854..9f2a4e5 100644
--- a/krusader/Panel/krdetailedviewitem.cpp
+++ b/krusader/Panel/krdetailedviewitem.cpp
@@ -39,11 +39,11 @@
#include "../VFS/krpermhandler.h"
#include <sys/types.h>
#include <time.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <pwd.h>
#include <grp.h>
#include <stdlib.h>
-#include <qpalette.h>
+#include <tqpalette.h>
#include <kdebug.h>
#include <kmimetype.h>
@@ -57,8 +57,8 @@
int KrDetailedViewItem::expHeight = 0;
#endif // FASTER
-KrDetailedViewItem::KrDetailedViewItem(KrDetailedView *parent, QListViewItem *after, vfile *vf):
- KListViewItem(parent, after), KrViewItem(vf, parent->properties()) {
+KrDetailedViewItem::KrDetailedViewItem(KrDetailedView *tqparent, TQListViewItem *after, vfile *vf):
+ KListViewItem(tqparent, after), KrViewItem(vf, tqparent->properties()) {
#ifdef FASTER
initiated = false;
// get the expected height of an item - should be done only once
@@ -72,7 +72,7 @@ KrDetailedViewItem::KrDetailedViewItem(KrDetailedView *parent, QListViewItem *af
// in that case, create a special vfile for that item, and delete it, if needed
if (!_vf) {
dummyVfile = true;
- _vf = new vfile("..", 0, "drw-r--r--", 0, false, 0, 0, QString::null, QString::null, 0);
+ _vf = new vfile("..", 0, "drw-r--r--", 0, false, 0, 0, TQString(), TQString(), 0);
setText(COLUMN(Name), "..");
setText(COLUMN(Size), i18n("<DIR>") );
@@ -84,7 +84,7 @@ KrDetailedViewItem::KrDetailedViewItem(KrDetailedView *parent, QListViewItem *af
#endif
}
- repaintItem();
+ tqrepaintItem();
}
#ifdef FASTER
@@ -97,9 +97,9 @@ void KrDetailedViewItem::setup() {
}
#endif
-void KrDetailedViewItem::repaintItem() {
+void KrDetailedViewItem::tqrepaintItem() {
if ( dummyVfile ) return;
- QString tmp;
+ TQString tmp;
// set text in columns, according to what columns are available
int id = KrDetailedViewProperties::Unused;
if ((id = COLUMN(Mime)) != -1) {
@@ -116,7 +116,7 @@ void KrDetailedViewItem::repaintItem() {
setText(id, dateTime());
if ((id = COLUMN(KrPermissions)) != -1) {
// first, build the krusader permissions
- tmp=QString::null;
+ tmp=TQString();
switch (_vf->vfile_isReadable()){
case ALLOWED_PERM: tmp+='r'; break;
case UNKNOWN_PERM: tmp+='?'; break;
@@ -146,7 +146,7 @@ void KrDetailedViewItem::repaintItem() {
setText(id, _vf->vfile_getGroup());
}
// if we've got an extention column, clip the name accordingly
- QString name = this->name(), ext = "";
+ TQString name = this->name(), ext = "";
if ((id = COLUMN(Extention)) != -1 && !_vf->vfile_isDir()) {
ext = this->extension();
name = this->name(false); // request name without extension
@@ -160,13 +160,13 @@ void KrDetailedViewItem::repaintItem() {
#endif
}
-QString num2qstring(KIO::filesize_t num){
- QString buf;
+TQString num2qstring(KIO::filesize_t num){
+ TQString buf;
buf.sprintf("%025llu",num);
return buf;
}
-void KrDetailedViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align) {
+void KrDetailedViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) {
#ifdef FASTER
if (!initiated && !dummyVfile) {
// display an icon if needed
@@ -177,26 +177,26 @@ void KrDetailedViewItem::paintCell(QPainter *p, const QColorGroup &cg, int colum
}
#endif
- QColorGroup _cg(cg);
+ TQColorGroup _cg(cg);
// This is ugly! I had to dublicate KListViewItem::paintCell() code, as the
// KListViewItem::paintCell() overwrites my color settings. So KrDetailedViewItem::paintCell
// must dublicate the KListViewItem::paintCell() code, do the required color settings
- // and call QListViewItem::paintCell() afterwards (the base class of KListViewItem).
+ // and call TQListViewItem::paintCell() afterwards (the base class of KListViewItem).
// This tabooed in the object oriented heaven, but necessary here. Blame the KDE team for
// this really poor paintCell implementation!
- const QPixmap *pm = listView()->viewport()->backgroundPixmap();
+ const TQPixmap *pm = listView()->viewport()->backgroundPixmap();
if (pm && !pm->isNull())
{
- _cg.setBrush(QColorGroup::Base, QBrush(backgroundColor(), *pm));
+ _cg.setBrush(TQColorGroup::Base, TQBrush(backgroundColor(), *pm));
p->setBrushOrigin( -listView()->contentsX(), -listView()->contentsY() );
}
else if (isAlternate())
- if (listView()->viewport()->backgroundMode()==Qt::FixedColor)
- _cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground());
+ if (listView()->viewport()->backgroundMode()==TQt::FixedColor)
+ _cg.setColor(TQColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground());
else
- _cg.setColor(QColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground());
+ _cg.setColor(TQColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground());
// end of uglyness
@@ -221,19 +221,19 @@ void KrDetailedViewItem::paintCell(QPainter *p, const QColorGroup &cg, int colum
KrColorCache::getColorCache().getColors(_cg, colorItemType);
// center the <DIR> thing if needed
if(column != COLUMN(Size))
- QListViewItem::paintCell(p, _cg, column, width, align);
+ TQListViewItem::paintCell(p, _cg, column, width, align);
else {
if (dummyVfile) {
- QListViewItem::paintCell(p, _cg, column, width, Qt::AlignHCenter); // updir
+ TQListViewItem::paintCell(p, _cg, column, width, TQt::AlignHCenter); // updir
} else {
if (_vf->vfile_isDir() && _vf->vfile_getSize()<=0)
- QListViewItem::paintCell(p, _cg, column, width, Qt::AlignHCenter);
- else QListViewItem::paintCell(p, _cg, column, width, align); // size
+ TQListViewItem::paintCell(p, _cg, column, width, TQt::AlignHCenter);
+ else TQListViewItem::paintCell(p, _cg, column, width, align); // size
}
}
}
-const QColor & KrDetailedViewItem::setColorIfContrastIsSufficient(const QColor & background, const QColor & color1, const QColor & color2)
+const TQColor & KrDetailedViewItem::setColorIfContrastIsSufficient(const TQColor & background, const TQColor & color1, const TQColor & color2)
{
#define sqr(x) ((x)*(x))
int contrast = sqr(color1.red() - background.red()) + sqr(color1.green() - background.green()) + sqr(color1.blue() - background.blue());
@@ -244,7 +244,7 @@ const QColor & KrDetailedViewItem::setColorIfContrastIsSufficient(const QColor &
return color1;
}
-int KrDetailedViewItem::compare(QListViewItem *i,int col,bool ascending ) const {
+int KrDetailedViewItem::compare(TQListViewItem *i,int col,bool ascending ) const {
bool ignoreCase = (PROPS->sortMode & KrViewProperties::IgnoreCase);
bool alwaysSortDirsByName = (PROPS->sortMode & KrViewProperties::AlwaysSortDirsByName);
int asc = ( ascending ? -1 : 1 );
@@ -264,8 +264,8 @@ int KrDetailedViewItem::compare(QListViewItem *i,int col,bool ascending ) const
if (col == COLUMN(Name) ||
(alwaysSortDirsByName && thisDir && otherDir )) {
// localeAwareCompare doesn't handle names that start with a dot
- QString text0 = name();
- QString itext0 = other->name();
+ TQString text0 = name();
+ TQString itext0 = other->name();
if( ignoreCase )
{
@@ -279,8 +279,8 @@ int KrDetailedViewItem::compare(QListViewItem *i,int col,bool ascending ) const
if (!ignoreCase && !PROPS->localeAwareCompareIsCaseSensitive) {
// sometimes, localeAwareCompare is not case sensative. in that case,
// we need to fallback to a simple string compare (KDE bug #40131)
- return QString::compare(text0, itext0);
- } else return QString::localeAwareCompare(text0,itext0);
+ return TQString::compare(text0, itext0);
+ } else return TQString::localeAwareCompare(text0,itext0);
} else if (col == COLUMN(Size) ) {
if( VF->vfile_getSize() == other->VF->vfile_getSize() )
return 0;
@@ -296,13 +296,13 @@ int KrDetailedViewItem::compare(QListViewItem *i,int col,bool ascending ) const
return 0;
return ((thisPerm > otherPerm) ? 1 : -1);
} else {
- QString e1 = (!ignoreCase ? text(col) : text(col).lower());
- QString e2 = (!ignoreCase ? i->text(col) : i->text(col).lower());
+ TQString e1 = (!ignoreCase ? text(col) : text(col).lower());
+ TQString e2 = (!ignoreCase ? i->text(col) : i->text(col).lower());
if (!ignoreCase && !PROPS->localeAwareCompareIsCaseSensitive) {
// sometimes, localeAwareCompare is not case sensative. in that case,
// we need to fallback to a simple string compare (KDE bug #40131)
- return QString::compare(e1, e2);
- } else return QString::localeAwareCompare(e1, e2);
+ return TQString::compare(e1, e2);
+ } else return TQString::localeAwareCompare(e1, e2);
}
}
diff --git a/krusader/Panel/krdetailedviewitem.h b/krusader/Panel/krdetailedviewitem.h
index 3ef9fcf..179a43f 100644
--- a/krusader/Panel/krdetailedviewitem.h
+++ b/krusader/Panel/krdetailedviewitem.h
@@ -35,23 +35,23 @@
#include <sys/types.h>
#include "../VFS/vfile.h"
#include <klistview.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#define FASTER
-class QPixmap;
+class TQPixmap;
class KrDetailedView;
class KrDetailedViewItem : public KListViewItem, public KrViewItem {
friend class KrDetailedView;
friend class KrCalcSpaceDialog;
public:
- KrDetailedViewItem(KrDetailedView *parent, QListViewItem *after, vfile *vf);
+ KrDetailedViewItem(KrDetailedView *tqparent, TQListViewItem *after, vfile *vf);
inline bool isSelected() const { return KListViewItem::isSelected(); }
inline void setSelected(bool s) { KListViewItem::setSelected(s); }
- int compare(QListViewItem *i,int col,bool ascending ) const;
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
- void repaintItem();
+ int compare(TQListViewItem *i,int col,bool ascending ) const;
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
+ void tqrepaintItem();
static void itemHeightChanged(); // force the items to resize when icon/font size change
#ifdef FASTER
virtual void setup(); // called when listview needs to know the height of the item
@@ -60,10 +60,10 @@ public:
protected:
// text() was made protected in order to catch every place where text(x) is used
// to gain unlawful information on the object
- virtual inline QString text(int column) const { return KListViewItem::text(column); }
+ virtual inline TQString text(int column) const { return KListViewItem::text(column); }
private:
- static const QColor & setColorIfContrastIsSufficient(const QColor & background, const QColor & color1, const QColor & color2);
+ static const TQColor & setColorIfContrastIsSufficient(const TQColor & background, const TQColor & color1, const TQColor & color2);
#ifdef FASTER
bool initiated;
static int expHeight;
diff --git a/krusader/Panel/krdrag.cpp b/krusader/Panel/krdrag.cpp
index 5e80b36..f015143 100644
--- a/krusader/Panel/krdrag.cpp
+++ b/krusader/Panel/krdrag.cpp
@@ -31,10 +31,10 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#include "krdrag.h"
#include <kurldrag.h>
-KRDrag * KRDrag::newDrag( const KURL::List & urls, bool move, QWidget * dragSource, const char* name )
+KRDrag * KRDrag::newDrag( const KURL::List & urls, bool move, TQWidget * dragSource, const char* name )
{
// See KURLDrag::newDrag
- QStrList uris;
+ TQStrList uris;
KURL::List::ConstIterator uit = urls.begin();
KURL::List::ConstIterator uEnd = urls.end();
// Get each URL encoded in utf8 - and since we get it in escaped
@@ -44,8 +44,8 @@ KRDrag * KRDrag::newDrag( const KURL::List & urls, bool move, QWidget * dragSour
return new KRDrag( uris, move, dragSource, name );
}
-KRDrag::KRDrag( const QStrList & urls, bool move, QWidget * dragSource, const char* name )
- : QUriDrag( urls, dragSource, name ),
+KRDrag::KRDrag( const TQStrList & urls, bool move, TQWidget * dragSource, const char* name )
+ : TQUriDrag( urls, dragSource, name ),
m_bCutSelection( move ), m_urls( urls )
{}
@@ -60,23 +60,23 @@ const char* KRDrag::format( int i ) const
else return 0;
}
-QByteArray KRDrag::encodedData( const char* mime ) const
+TQByteArray KRDrag::tqencodedData( const char* mime ) const
{
- QByteArray a;
- QCString mimetype( mime );
+ TQByteArray a;
+ TQCString mimetype( mime );
if ( mimetype == "text/uri-list" )
- return QUriDrag::encodedData( mime );
+ return TQUriDrag::tqencodedData( mime );
else if ( mimetype == "application/x-kde-cutselection" ) {
- QCString s ( m_bCutSelection ? "1" : "0" );
+ TQCString s ( m_bCutSelection ? "1" : "0" );
a.resize( s.length() + 1 ); // trailing zero
memcpy( a.data(), s.data(), s.length() + 1 );
}
else if ( mimetype == "text/plain" )
{
- QStringList uris;
- for (QStrListIterator it(m_urls); *it; ++it)
+ TQStringList uris;
+ for (TQStrListIterator it(m_urls); *it; ++it)
uris.append(KURLDrag::stringToUrl(*it).prettyURL());
- QCString s = uris.join( "\n" ).local8Bit();
+ TQCString s = uris.join( "\n" ).local8Bit();
if( uris.count() > 1 )
s.append( "\n" );
a.resize( s.length() + 1 ); // trailing zero
@@ -89,9 +89,9 @@ QByteArray KRDrag::encodedData( const char* mime ) const
// Used for KonqIconDrag too
-bool KRDrag::decodeIsCutSelection( const QMimeSource *e )
+bool KRDrag::decodeIsCutSelection( const TQMimeSource *e )
{
- QByteArray a = e->encodedData( "application/x-kde-cutselection" );
+ TQByteArray a = e->tqencodedData( "application/x-kde-cutselection" );
if ( a.isEmpty() )
return false;
else
diff --git a/krusader/Panel/krdrag.h b/krusader/Panel/krdrag.h
index 1aa264f..11f87ac 100644
--- a/krusader/Panel/krdrag.h
+++ b/krusader/Panel/krdrag.h
@@ -31,32 +31,33 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#ifndef KRDRAG_H
#define KRDRAG_H
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include <kurl.h>
-class KRDrag : public QUriDrag
+class KRDrag : public TQUriDrag
{
Q_OBJECT
+ TQ_OBJECT
public:
- static KRDrag * newDrag( const KURL::List & urls, bool move, QWidget * dragSource = 0, const char* name = 0 );
+ static KRDrag * newDrag( const KURL::List & urls, bool move, TQWidget * dragSource = 0, const char* name = 0 );
protected:
- KRDrag( const QStrList & urls, bool move, QWidget * dragSource, const char* name );
+ KRDrag( const TQStrList & urls, bool move, TQWidget * dragSource, const char* name );
public:
virtual ~KRDrag() {}
virtual const char* format( int i ) const;
- virtual QByteArray encodedData( const char* mime ) const;
+ virtual TQByteArray tqencodedData( const char* mime ) const;
void setMoveSelection( bool move ) { m_bCutSelection = move; }
// Returns true if the data was cut (used for KonqIconDrag too)
- static bool decodeIsCutSelection( const QMimeSource *e );
+ static bool decodeIsCutSelection( const TQMimeSource *e );
protected:
bool m_bCutSelection;
- QStrList m_urls;
+ TQStrList m_urls;
};
#endif /* KRDRAG_H */
diff --git a/krusader/Panel/krpopupmenu.cpp b/krusader/Panel/krpopupmenu.cpp
index fda6296..ca440df 100644
--- a/krusader/Panel/krpopupmenu.cpp
+++ b/krusader/Panel/krpopupmenu.cpp
@@ -32,15 +32,15 @@
#include "../krusaderview.h"
#include "../panelmanager.h"
-void KrPopupMenu::run(const QPoint &pos, ListPanel *panel) {
+void KrPopupMenu::run(const TQPoint &pos, ListPanel *panel) {
KrPopupMenu menu(panel);
int result = menu.exec(pos);
menu.performAction(result);
}
-KrPopupMenu::KrPopupMenu(ListPanel *thePanel, QWidget *parent) : KPopupMenu(parent), panel(thePanel), empty(false),
+KrPopupMenu::KrPopupMenu(ListPanel *thePanel, TQWidget *tqparent) : KPopupMenu(tqparent), panel(thePanel), empty(false),
multipleSelections(false),actions(0) {
-#ifdef __LIBKONQ__
+#ifdef __LIBKONTQ__
konqMenu = 0;
#endif
@@ -70,20 +70,20 @@ KrPopupMenu::KrPopupMenu(ListPanel *thePanel, QWidget *parent) : KPopupMenu(pare
// ------------- Preview - normal vfs only ?
if ( panel->func->files()->vfs_getType() == vfs::NORMAL ) {
// create the preview popup
- QStringList names;
+ TQStringList names;
panel->getSelectedNames( &names );
preview.setUrls( panel->func->files() ->vfs_getFiles( &names ) );
insertItem( i18n("Preview"), &preview, PREVIEW_ID );
}
- // -------------- Open with: try to find-out which apps can open the file
+ // -------------- Open with: try to tqfind-out which apps can open the file
// this too, is meaningful only if one file is selected or if all the files
// have the same mimetype !
- QString mime = panel->func->getVFile(item)->vfile_getMime();
+ TQString mime = panel->func->getVFile(item)->vfile_getMime();
// check if all the list have the same mimetype
for ( unsigned int i = 1; i < items.size(); ++i ) {
if ( panel->func->getVFile(( *items.at( i ) )) ->vfile_getMime() != mime ) {
- mime = QString::null;
+ mime = TQString();
break;
}
}
@@ -100,7 +100,7 @@ KrPopupMenu::KrPopupMenu(ListPanel *thePanel, QWidget *parent) : KPopupMenu(pare
if ( vf->vfile_isDir() )
openWith.insertItem( krLoader->loadIcon( "konsole", KIcon::Small ), i18n( "Terminal" ), OPEN_TERM_ID );
openWith.insertItem( i18n( "Other..." ), CHOOSE_ID );
- insertItem( QPixmap(), &openWith, OPEN_WITH_ID );
+ insertItem( TQPixmap(), &openWith, OPEN_WITH_ID );
changeItem( OPEN_WITH_ID, i18n( "Open With" ) );
insertSeparator();
}
@@ -114,13 +114,13 @@ KrPopupMenu::KrPopupMenu(ListPanel *thePanel, QWidget *parent) : KPopupMenu(pare
_items.append( new KFileItem( url, file->vfile_getMime(), file->vfile_getMode() ) );
}
-#ifdef __LIBKONQ__
+#ifdef __LIBKONTQ__
// -------------- konqueror menu
actions = new KActionCollection(this);
konqMenu = new KonqPopupMenu( KonqBookmarkManager::self(), _items, panel->func->files()->vfs_getOrigin(), *actions, 0, this,
KonqPopupMenu::NoFlags, KParts::BrowserExtension::DefaultPopupItems );
- insertItem( QPixmap(), konqMenu, KONQ_MENU_ID );
- changeItem( KONQ_MENU_ID, i18n( "Konqueror Menu" ) );
+ insertItem( TQPixmap(), konqMenu, KONTQ_MENU_ID );
+ changeItem( KONTQ_MENU_ID, i18n( "Konqueror Menu" ) );
#endif
// ------------- 'create new' submenu
@@ -157,7 +157,7 @@ KrPopupMenu::KrPopupMenu(ListPanel *thePanel, QWidget *parent) : KPopupMenu(pare
linkPopup.insertItem( i18n( "New Hardlink..." ), NEW_LINK_ID );
if ( panel->func->getVFile(item)->vfile_isSymLink() )
linkPopup.insertItem( i18n( "Redirect Link..." ), REDIRECT_LINK_ID);
- insertItem( QPixmap(), &linkPopup, LINK_HANDLING_ID );
+ insertItem( TQPixmap(), &linkPopup, LINK_HANDLING_ID );
changeItem( LINK_HANDLING_ID, i18n( "Link Handling" ) );
}
insertSeparator();
@@ -168,16 +168,16 @@ KrPopupMenu::KrPopupMenu(ListPanel *thePanel, QWidget *parent) : KPopupMenu(pare
// ---------- mount/umount/eject
if ( panel->func->files() ->vfs_getType() == vfs::NORMAL && vf->vfile_isDir() && !multipleSelections ) {
- if ( krMtMan.getStatus( panel->func->files() ->vfs_getFile( item->name() ).path( -1 ) ) == KMountMan::MOUNTED )
+ if ( krMtMan.gettqStatus( panel->func->files() ->vfs_getFile( item->name() ).path( -1 ) ) == KMountMan::MOUNTED )
insertItem( i18n( "Unmount" ), UNMOUNT_ID );
- else if ( krMtMan.getStatus( panel->func->files() ->vfs_getFile( item->name() ).path( -1 ) ) == KMountMan::NOT_MOUNTED )
+ else if ( krMtMan.gettqStatus( panel->func->files() ->vfs_getFile( item->name() ).path( -1 ) ) == KMountMan::NOT_MOUNTED )
insertItem( i18n( "Mount" ), MOUNT_ID );
if ( krMtMan.ejectable( panel->func->files() ->vfs_getFile( item->name() ).path( -1 ) ) )
insertItem( i18n( "Eject" ), EJECT_ID );
}
// --------- send by mail
- if ( Krusader::supportedTools().contains( "MAIL" ) && !vf->vfile_isDir() ) {
+ if ( Krusader::supportedTools().tqcontains( "MAIL" ) && !vf->vfile_isDir() ) {
insertItem( i18n( "Send by Email" ), SEND_BY_EMAIL_ID );
}
@@ -202,7 +202,7 @@ KrPopupMenu::KrPopupMenu(ListPanel *thePanel, QWidget *parent) : KPopupMenu(pare
KrPopupMenu::~KrPopupMenu() {
if (actions) delete actions;
-#ifdef __LIBKONQ__
+#ifdef __LIBKONTQ__
if (konqMenu) delete konqMenu;
#endif
}
@@ -215,7 +215,7 @@ void KrPopupMenu::addCreateNewMenu() {
createNewPopup.insertItem( krLoader->loadIcon( "folder", KIcon::Small ), i18n("Folder..."), MKDIR_ID);
createNewPopup.insertItem( krLoader->loadIcon( "txt", KIcon::Small ), i18n("Text File..."), NEW_TEXT_FILE_ID);
- insertItem( QPixmap(), &createNewPopup, CREATE_NEW_ID);
+ insertItem( TQPixmap(), &createNewPopup, CREATE_NEW_ID);
changeItem( CREATE_NEW_ID, i18n( "Create New" ) );
}
@@ -258,11 +258,11 @@ void KrPopupMenu::performAction(int id) {
break;
case SHRED_ID :
if ( KMessageBox::warningContinueCancel( krApp,
- i18n("<qt>Do you really want to shred <b>%1</b>? Once shred, the file is gone forever!</qt>").arg(item->name()),
- QString::null, KStdGuiItem::cont(), "Shred" ) == KMessageBox::Continue )
+ i18n("<qt>Do you really want to shred <b>%1</b>? Once shred, the file is gone forever!</qt>").tqarg(item->name()),
+ TQString(), KStdGuiItem::cont(), "Shred" ) == KMessageBox::Continue )
KShred::shred( panel->func->files() ->vfs_getFile( item->name() ).path( -1 ) );
break;
- case OPEN_KONQ_ID :
+ case OPEN_KONTQ_ID :
kapp->startServiceByDesktopName( "konqueror", panel->func->files() ->vfs_getFile( item->name() ).url() );
break;
case CHOOSE_ID : // open-with dialog
@@ -305,7 +305,7 @@ void KrPopupMenu::performAction(int id) {
break;
case SYNC_SELECTED_ID :
{
- QStringList selectedNames;
+ TQStringList selectedNames;
for ( KrViewItemList::Iterator it = items.begin(); it != items.end(); ++it )
selectedNames.append( ( *it ) ->name() );
if( panel->otherPanel->view->numSelected() ) {
@@ -313,8 +313,8 @@ void KrPopupMenu::performAction(int id) {
panel->otherPanel->view->getSelectedKrViewItems( &otherItems );
for ( KrViewItemList::Iterator it2 = otherItems.begin(); it2 != otherItems.end(); ++it2 ) {
- QString name = ( *it2 ) ->name();
- if( !selectedNames.contains( name ) )
+ TQString name = ( *it2 ) ->name();
+ if( !selectedNames.tqcontains( name ) )
selectedNames.append( name );
}
}
@@ -322,21 +322,21 @@ void KrPopupMenu::performAction(int id) {
}
break;
case OPEN_TERM_ID :
- QString save = getcwd( 0, 0 );
+ TQString save = getcwd( 0, 0 );
chdir( panel->func->files() ->vfs_getFile( item->name() ).path( -1 ).local8Bit() );
KProcess proc;
{
KConfigGroupSaver saver(krConfig, "General");
- QString term = krConfig->readEntry( "Terminal", _Terminal );
+ TQString term = krConfig->readEntry( "Terminal", _Terminal );
proc << KrServices::separateArgs( term );
if ( !panel->func->getVFile(item)->vfile_isDir() ) proc << "-e" << item->name();
- if ( term.contains( "konsole" ) ) { /* KDE 3.2 bug (konsole is killed by pressing Ctrl+C) */
+ if ( term.tqcontains( "konsole" ) ) { /* KDE 3.2 bug (konsole is killed by pressing Ctrl+C) */
/* Please remove the patch if the bug is corrected */
proc << "&";
proc.setUseShell( true );
}
if ( !proc.start( KProcess::DontCare ) )
- KMessageBox::sorry( krApp, i18n( "Can't open \"%1\"" ).arg(term) );
+ KMessageBox::sorry( krApp, i18n( "Can't open \"%1\"" ).tqarg(term) );
} // group-saver is blown out of scope here
chdir( save.local8Bit() );
break;
@@ -344,7 +344,7 @@ void KrPopupMenu::performAction(int id) {
// check if something from the open-with-offered-services was selected
if ( id >= SERVICE_LIST_ID ) {
- QStringList names;
+ TQStringList names;
panel->getSelectedNames( &names );
KRun::run( *( offers[ id - SERVICE_LIST_ID ].service() ),
*( panel->func->files() ->vfs_getFiles( &names ) ) );
diff --git a/krusader/Panel/krpopupmenu.h b/krusader/Panel/krpopupmenu.h
index 13157b4..8274a11 100644
--- a/krusader/Panel/krpopupmenu.h
+++ b/krusader/Panel/krpopupmenu.h
@@ -7,7 +7,7 @@
#include "listpanel.h"
#include "krpreviewpopup.h"
#include "../UserAction/useractionpopupmenu.h"
-#ifdef __LIBKONQ__
+#ifdef __LIBKONTQ__
#include <konq_popupmenu.h>
#include <konqbookmarkmanager.h>
#endif
@@ -15,11 +15,12 @@
// should be renamed to KrContextMenu or similar
class KrPopupMenu : public KPopupMenu {
Q_OBJECT
+ TQ_OBJECT
public:
- static void run(const QPoint &pos, ListPanel *panel);
+ static void run(const TQPoint &pos, ListPanel *panel);
protected:
- KrPopupMenu(ListPanel *thePanel, QWidget *parent=0);
+ KrPopupMenu(ListPanel *thePanel, TQWidget *tqparent=0);
~KrPopupMenu();
void performAction(int id);
void addEmptyMenuEntries(); // adds the choices for a menu without selected items
@@ -28,11 +29,11 @@ protected:
enum ID {
OPEN_ID,
OPEN_WITH_ID,
- OPEN_KONQ_ID,
+ OPEN_KONTQ_ID,
OPEN_TERM_ID,
OPEN_TAB_ID,
PREVIEW_ID,
- KONQ_MENU_ID,
+ KONTQ_MENU_ID,
CHOOSE_ID,
DELETE_ID,
COPY_ID,
@@ -68,8 +69,8 @@ private:
KrViewItemList items; // list of selected items
KrViewItem *item; // the (first) selected item
KFileItemList _items;
- QValueList<KServiceOffer> offers;
-#ifdef __LIBKONQ__
+ TQValueList<KServiceOffer> offers;
+#ifdef __LIBKONTQ__
KonqPopupMenu *konqMenu;
#endif
};
diff --git a/krusader/Panel/krpreviewpopup.cpp b/krusader/Panel/krpreviewpopup.cpp
index 53f4afd..ac86cc0 100644
--- a/krusader/Panel/krpreviewpopup.cpp
+++ b/krusader/Panel/krpreviewpopup.cpp
@@ -24,7 +24,7 @@
#include "../krusader.h"
KrPreviewPopup::KrPreviewPopup(): id(1),noPreview(true){
- connect(this,SIGNAL(activated(int)),this,SLOT(view(int)));
+ connect(this,TQT_SIGNAL(activated(int)),this,TQT_SLOT(view(int)));
}
void KrPreviewPopup::setUrls(const KURL::List* urls){
@@ -32,7 +32,7 @@ void KrPreviewPopup::setUrls(const KURL::List* urls){
insertItem(i18n("Preview not available"),0);
KIO::PreviewJob* pjob;
- QStringList plugins = KIO::PreviewJob::availablePlugins();
+ TQStringList plugins = KIO::PreviewJob::availablePlugins();
for( unsigned int i=0; i< urls->count(); ++i){
KFileItem* kfi = new KFileItem(KFileItem::Unknown,KFileItem::Unknown,*(urls->at(i)));
@@ -40,13 +40,13 @@ void KrPreviewPopup::setUrls(const KURL::List* urls){
}
pjob = new KIO::PreviewJob(files,200,200,200,1,true,true,0);
- connect(pjob,SIGNAL(gotPreview(const KFileItem*,const QPixmap&)),
- this,SLOT(addPreview(const KFileItem*,const QPixmap&)));
+ connect(pjob,TQT_SIGNAL(gotPreview(const KFileItem*,const TQPixmap&)),
+ this,TQT_SLOT(addPreview(const KFileItem*,const TQPixmap&)));
}
KrPreviewPopup::~KrPreviewPopup(){}
-void KrPreviewPopup::addPreview(const KFileItem* file,const QPixmap& preview){
+void KrPreviewPopup::addPreview(const KFileItem* file,const TQPixmap& preview){
if(noPreview){
removeItem(0);
noPreview = false;
diff --git a/krusader/Panel/krpreviewpopup.h b/krusader/Panel/krpreviewpopup.h
index 91b852c..6aafeaf 100644
--- a/krusader/Panel/krpreviewpopup.h
+++ b/krusader/Panel/krpreviewpopup.h
@@ -18,8 +18,8 @@
#ifndef KRPREVIEWPOPUP_H
#define KRPREVIEWPOPUP_H
-#include <qpopupmenu.h>
-#include <qpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqpixmap.h>
#include <kfileitem.h>
#include <kurl.h>
@@ -27,15 +27,16 @@
*@author Shie Erlich & Rafi Yanai
*/
-class KrPreviewPopup : public QPopupMenu {
+class KrPreviewPopup : public TQPopupMenu {
Q_OBJECT
+ TQ_OBJECT
public:
KrPreviewPopup();
~KrPreviewPopup();
void setUrls(const KURL::List* urls);
public slots:
- void addPreview(const KFileItem* file,const QPixmap& preview);
+ void addPreview(const KFileItem* file,const TQPixmap& preview);
void view(int id);
protected:
diff --git a/krusader/Panel/krselectionmode.cpp b/krusader/Panel/krselectionmode.cpp
index 02d95b1..9cca248 100644
--- a/krusader/Panel/krselectionmode.cpp
+++ b/krusader/Panel/krselectionmode.cpp
@@ -16,7 +16,7 @@ KrSelectionMode* KrSelectionMode::getSelectionHandler()
return __currentSelectionMode;
} else { // nothing yet, set the correct one
krConfig->setGroup( "Look&Feel" );
- QString mode = krConfig->readEntry("Mouse Selection", "");
+ TQString mode = krConfig->readEntry("Mouse Selection", "");
switch (mode.toInt()) {
case 0:
__currentSelectionMode = &originalSelectionMode;
@@ -46,7 +46,7 @@ void KrSelectionMode::resetSelectionHandler() {
void UserSelectionMode::init() {
krConfig->setGroup("Custom Selection Mode");
- _useQTSelection = krConfig->readBoolEntry("QT Selection", _QtSelection);
+ _useTQTSelection = krConfig->readBoolEntry("QT Selection", _TQtSelection);
_leftButtonSelects = krConfig->readBoolEntry("Left Selects", _LeftSelects);
_leftButtonPreservesSelection = krConfig->readBoolEntry("Left Preserves", _LeftPreserves);
_shiftCtrlLeftButtonSelects = krConfig->readBoolEntry("ShiftCtrl Left Selects", _ShiftCtrlLeft);
diff --git a/krusader/Panel/krselectionmode.h b/krusader/Panel/krselectionmode.h
index 4f9de2e..1e6770a 100644
--- a/krusader/Panel/krselectionmode.h
+++ b/krusader/Panel/krselectionmode.h
@@ -17,7 +17,7 @@ public:
static void resetSelectionHandler();
virtual void init() = 0; // everyone must implement this in order to be a selection mode
- inline bool useQTSelection() { return _useQTSelection; }
+ inline bool useTQTSelection() { return _useTQTSelection; }
inline bool spaceMovesDown() { return _spaceMovesDown; }
inline bool insertMovesDown() { return _insertMovesDown; }
inline bool spaceCalculatesDiskSpace() { return _spaceCalculatesDiskSpace; }
@@ -32,7 +32,7 @@ public:
virtual ~KrSelectionMode() {}
protected:
- bool _useQTSelection, _spaceMovesDown, _insertMovesDown, _spaceCalculatesDiskSpace;
+ bool _useTQTSelection, _spaceMovesDown, _insertMovesDown, _spaceCalculatesDiskSpace;
bool _rightButtonSelects, _leftButtonSelects, _rightButtonPreservesSelection;
bool _leftButtonPreservesSelection, _shiftCtrlRightButtonSelects, _shiftCtrlLeftButtonSelects;
int _showContextMenu;
@@ -41,7 +41,7 @@ protected:
class KonqSelectionMode : public KrSelectionMode {
public:
void init() {
- _useQTSelection = true;
+ _useTQTSelection = true;
_spaceMovesDown = false;
_insertMovesDown = true;
_spaceCalculatesDiskSpace = false;
@@ -58,7 +58,7 @@ public:
class OriginalSelectionMode : public KrSelectionMode {
public:
void init() {
- _useQTSelection = false;
+ _useTQTSelection = false;
_spaceMovesDown = true;
_insertMovesDown = true;
_spaceCalculatesDiskSpace = true;
@@ -75,7 +75,7 @@ public:
class TCSelectionMode : public KrSelectionMode {
public:
void init() {
- _useQTSelection = false;
+ _useTQTSelection = false;
_spaceMovesDown = false;
_insertMovesDown = true;
_spaceCalculatesDiskSpace = true;
diff --git a/krusader/Panel/krview.cpp b/krusader/Panel/krview.cpp
index c44bcb6..4eaf330 100644
--- a/krusader/Panel/krview.cpp
+++ b/krusader/Panel/krview.cpp
@@ -32,10 +32,10 @@
#include "../defaults.h"
#include "../VFS/krpermhandler.h"
#include "krviewitem.h"
-#include <qnamespace.h>
-#include <qpixmapcache.h>
-#include <qdir.h>
-#include <qbitmap.h>
+#include <tqnamespace.h>
+#include <tqpixmapcache.h>
+#include <tqdir.h>
+#include <tqbitmap.h>
#include <kmimetype.h>
#include <klocale.h>
#include <kinputdialog.h>
@@ -45,18 +45,18 @@
// ----------------------------- operator
-KrViewOperator::KrViewOperator(KrView *view, QWidget *widget): _view(view), _widget(widget) {
+KrViewOperator::KrViewOperator(KrView *view, TQWidget *widget): _view(view), _widget(widget) {
}
KrViewOperator::~KrViewOperator() {
}
void KrViewOperator::startDrag() {
- QStringList items;
+ TQStringList items;
_view->getSelectedItems( &items );
if ( items.empty() )
return ; // don't drag an empty thing
- QPixmap px;
+ TQPixmap px;
if ( items.count() > 1 )
px = FL_LOADICON( "queue" ); // how much are we dragging
else
@@ -66,8 +66,8 @@ void KrViewOperator::startDrag() {
// ----------------------------- krview
-KrView::KrView( KConfig *cfg ) : _config( cfg ), _widget(0), _nameToMakeCurrent( QString::null ), _nameToMakeCurrentIfAdded( QString::null ),
-_numSelected( 0 ), _count( 0 ), _numDirs( 0 ), _countSize( 0 ), _selectedSize( 0 ), _properties(0), _focused( false ), _nameInKConfig(QString::null) {
+KrView::KrView( KConfig *cfg ) : _config( cfg ), _widget(0), _nameToMakeCurrent( TQString() ), _nameToMakeCurrentIfAdded( TQString() ),
+_numSelected( 0 ), _count( 0 ), _numDirs( 0 ), _countSize( 0 ), _selectedSize( 0 ), _properties(0), _focused( false ), _nameInKConfig(TQString()) {
}
KrView::~KrView() {
@@ -89,26 +89,26 @@ void KrView::init() {
setup();
}
-QPixmap KrView::getIcon( vfile *vf /*, KRListItem::cmpColor color*/ ) {
+TQPixmap KrView::getIcon( vfile *vf /*, KRListItem::cmpColor color*/ ) {
//krConfig->setGroup("Advanced");
//////////////////////////////
- QPixmap icon;
- QString icon_name = vf->vfile_getIcon();
- //QPixmapCache::setCacheLimit( krConfig->readNumEntry("Icon Cache Size",_IconCacheSize) );
+ TQPixmap icon;
+ TQString icon_name = vf->vfile_getIcon();
+ //TQPixmapCache::setCacheLimit( krConfig->readNumEntry("Icon Cache Size",_IconCacheSize) );
if( icon_name.isNull() )
icon_name="";
// first try the cache
- if ( !QPixmapCache::find( icon_name, icon ) ) {
+ if ( !TQPixmapCache::tqfind( icon_name, icon ) ) {
icon = FL_LOADICON( icon_name );
// insert it into the cache
- QPixmapCache::insert( icon_name, icon );
+ TQPixmapCache::insert( icon_name, icon );
}
// if it's a symlink - add an arrow overlay
if ( vf->vfile_isSymLink() ) {
- QPixmap link( link_xpm );
- bitBlt ( &icon, 0, icon.height() - 11, &link, 0, 21, 10, 11, Qt::CopyROP, false );
+ TQPixmap link( link_xpm );
+ bitBlt ( TQT_TQPAINTDEVICE(&icon), 0, icon.height() - 11, TQT_TQPAINTDEVICE(&link), 0, 21, 10, 11, TQt::CopyROP, false );
icon.setMask( icon.createHeuristicMask( false ) );
}
@@ -119,10 +119,10 @@ QPixmap KrView::getIcon( vfile *vf /*, KRListItem::cmpColor color*/ ) {
* this function ADDs a list of selected item names into 'names'.
* it assumes the list is ready and doesn't initialize it, or clears it
*/
-void KrView::getItemsByMask( QString mask, QStringList* names, bool dirs, bool files ) {
+void KrView::getItemsByMask( TQString tqmask, TQStringList* names, bool dirs, bool files ) {
for ( KrViewItem * it = getFirst(); it != 0; it = getNext( it ) ) {
- if ( ( it->name() == ".." ) || !QDir::match( mask, it->name() ) ) continue;
- // if we got here, than the item fits the mask
+ if ( ( it->name() == ".." ) || !TQDir::match( tqmask, it->name() ) ) continue;
+ // if we got here, than the item fits the tqmask
if ( it->getVfile()->vfile_isDir() && !dirs ) continue; // do we need to skip folders?
if ( !it->getVfile()->vfile_isDir() && !files ) continue; // do we need to skip files
names->append( it->name() );
@@ -133,13 +133,13 @@ void KrView::getItemsByMask( QString mask, QStringList* names, bool dirs, bool f
* this function ADDs a list of selected item names into 'names'.
* it assumes the list is ready and doesn't initialize it, or clears it
*/
-void KrView::getSelectedItems( QStringList *names ) {
+void KrView::getSelectedItems( TQStringList *names ) {
for ( KrViewItem * it = getFirst(); it != 0; it = getNext( it ) )
if ( it->isSelected() && ( it->name() != ".." ) ) names->append( it->name() );
// if all else fails, take the current item
- QString item = getCurrentItem();
- if ( names->empty() && item!=QString::null && item!=".." ) names->append( item );
+ TQString item = getCurrentItem();
+ if ( names->empty() && item!=TQString() && item!=".." ) names->append( item );
}
void KrView::getSelectedKrViewItems( KrViewItemList *items ) {
@@ -147,11 +147,11 @@ void KrView::getSelectedKrViewItems( KrViewItemList *items ) {
if ( it->isSelected() && ( it->name() != ".." ) ) items->append( it );
// if all else fails, take the current item
- QString item = getCurrentItem();
- if ( items->empty() && item!=QString::null && item!=".." ) items->append( getCurrentKrViewItem() );
+ TQString item = getCurrentItem();
+ if ( items->empty() && item!=TQString() && item!=".." ) items->append( getCurrentKrViewItem() );
}
-QString KrView::statistics() {
+TQString KrView::statistics() {
_countSize = _numSelected = _selectedSize = 0;
for ( KrViewItem * it = getFirst(); it != 0; it = getNext( it ) ){
@@ -162,10 +162,10 @@ QString KrView::statistics() {
if (it->getVfile()->vfile_getSize() > 0)
_countSize += it->getVfile()->vfile_getSize();
}
- QString tmp = QString(i18n("%1 out of %2, %3 (%4) out of %5 (%6)"))
- .arg( _numSelected ).arg( _count ).arg( KIO::convertSize( _selectedSize ) )
- .arg( KRpermHandler::parseSize(_selectedSize) )
- .arg( KIO::convertSize( _countSize ) ).arg( KRpermHandler::parseSize(_countSize) );
+ TQString tmp = TQString(i18n("%1 out of %2, %3 (%4) out of %5 (%6)"))
+ .tqarg( _numSelected ).tqarg( _count ).tqarg( KIO::convertSize( _selectedSize ) )
+ .tqarg( KRpermHandler::parseSize(_selectedSize) )
+ .tqarg( KIO::convertSize( _countSize ) ).tqarg( KRpermHandler::parseSize(_countSize) );
// notify if we're running a filtered view
if (filter() != KrViewProperties::All)
tmp = ">> [ " + filterMask().nameFilter() + " ] "+tmp;
@@ -225,7 +225,7 @@ void KrView::invertSelection() {
makeItemVisible( temp );
}
-QString KrView::firstUnmarkedBelowCurrent() {
+TQString KrView::firstUnmarkedBelowCurrent() {
KrViewItem * iterator = getNext( getCurrentKrViewItem() );
while ( iterator && iterator->isSelected() )
iterator = getNext( iterator );
@@ -234,11 +234,11 @@ QString KrView::firstUnmarkedBelowCurrent() {
while ( iterator && iterator->isSelected() )
iterator = getPrev( iterator );
}
- if ( !iterator ) return QString::null;
+ if ( !iterator ) return TQString();
return iterator->name();
}
-void KrView::delItem(const QString &name) {
+void KrView::delItem(const TQString &name) {
KrViewItem * it = _dict[ name ];
if ( !it ) {
krOut << "got signal deletedVfile(" << name << ") but can't find KrViewItem" << endl;
@@ -275,7 +275,7 @@ KrViewItem *KrView::addItem( vfile *vf ) {
}
if (item->name() == nameToMakeCurrentIfAdded() ) {
setCurrentItem(item->name());
- setNameToMakeCurrentIfAdded(QString::null);
+ setNameToMakeCurrentIfAdded(TQString());
makeItemVisible( item );
}
@@ -312,7 +312,7 @@ void KrView::clear() {
// good old dialog box
void KrView::renameCurrentItem() {
- QString newName, fileName;
+ TQString newName, fileName;
KrViewItem *it = getCurrentKrViewItem();
if ( it ) fileName = it->name();
diff --git a/krusader/Panel/krview.h b/krusader/Panel/krview.h
index a7c0932..eb8b398 100644
--- a/krusader/Panel/krview.h
+++ b/krusader/Panel/krview.h
@@ -30,9 +30,9 @@
#ifndef KRVIEW_H
#define KRVIEW_H
-#include <qpixmap.h>
-#include <qvariant.h>
-#include <qdict.h>
+#include <tqpixmap.h>
+#include <tqvariant.h>
+#include <tqdict.h>
#include "../krusader.h"
#include "../VFS/vfile.h"
#include "../VFS/vfs.h"
@@ -42,7 +42,7 @@
class KrView;
class KrViewItem;
-typedef QValueList<KrViewItem*> KrViewItemList;
+typedef TQValueList<KrViewItem*> KrViewItemList;
// KrViewProperties
// This class is an interface class between KrView and KrViewItem
@@ -65,7 +65,7 @@ public:
KRQuery filterMask; // what items to show (*.cpp, *.h etc)
bool localeAwareCompareIsCaseSensitive; // mostly, it is not! depends on LC_COLLATE
bool humanReadableSize; // display size as KB, MB or just as a long number
- QStringList atomicExtensions; // list of strings, which will be treated as one extension. Must start with a dot.
+ TQStringList atomicExtensions; // list of strings, which will be treated as one extension. Must start with a dot.
};
// operator can handle two ways of doing things:
@@ -73,41 +73,42 @@ public:
// 2. if the view HAS A widget (a krview-son has a member of klistview)
// this is done by specifying the view and the widget in the constructor,
// even if they are actually the same object (specify it twice in that case)
-class KrViewOperator: public QObject {
+class KrViewOperator: public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- KrViewOperator(KrView *view, QWidget *widget);
+ KrViewOperator(KrView *view, TQWidget *widget);
~KrViewOperator();
KrView *view() const { return _view; }
- QWidget *widget() const { return _widget; }
+ TQWidget *widget() const { return _widget; }
void startDrag();
void emitSelectionChanged() { emit selectionChanged(); }
- void emitGotDrop(QDropEvent *e) { emit gotDrop(e); }
- void emitLetsDrag(QStringList items, QPixmap icon ) { emit letsDrag(items, icon); }
- void emitItemDescription(QString &desc) { emit itemDescription(desc); }
- void emitContextMenu(const QPoint &point) { emit contextMenu(point); }
- void emitEmptyContextMenu(const QPoint &point) { emit emptyContextMenu(point); }
- void emitRenameItem(const QString &oldName, const QString &newName) { emit renameItem(oldName, newName); }
- void emitExecuted( QString &name ) { emit executed(name); }
+ void emitGotDrop(TQDropEvent *e) { emit gotDrop(e); }
+ void emitLetsDrag(TQStringList items, TQPixmap icon ) { emit letsDrag(items, icon); }
+ void emitItemDescription(TQString &desc) { emit itemDescription(desc); }
+ void emitContextMenu(const TQPoint &point) { emit contextMenu(point); }
+ void emitEmptyContextMenu(const TQPoint &point) { emit emptyContextMenu(point); }
+ void emitRenameItem(const TQString &oldName, const TQString &newName) { emit renameItem(oldName, newName); }
+ void emitExecuted( TQString &name ) { emit executed(name); }
void emitNeedFocus() { emit needFocus(); }
signals:
void selectionChanged();
- void gotDrop( QDropEvent *e );
- void letsDrag( QStringList items, QPixmap icon );
- void itemDescription( QString &desc );
- void contextMenu( const QPoint &point );
- void emptyContextMenu( const QPoint& point );
- void renameItem( const QString &oldName, const QString &newName );
- void executed( QString &name );
+ void gotDrop( TQDropEvent *e );
+ void letsDrag( TQStringList items, TQPixmap icon );
+ void itemDescription( TQString &desc );
+ void contextMenu( const TQPoint &point );
+ void emptyContextMenu( const TQPoint& point );
+ void renameItem( const TQString &oldName, const TQString &newName );
+ void executed( TQString &name );
void needFocus();
protected:
// never delete those
KrView *_view;
- QWidget *_widget;
+ TQWidget *_widget;
};
/****************************************************************************
@@ -121,13 +122,13 @@ protected:
* The functions you'd usually want:
* 1) getSelectedItems - returns all selected items, or (if none) the current item.
* it never returns anything which includes the "..", and thus can return an empty list!
- * 2) getSelectedKrViewItems - the same as (1), but returns a QValueList with KrViewItems
- * 3) getCurrentItem, setCurrentItem - work with QString
+ * 2) getSelectedKrViewItems - the same as (1), but returns a TQValueList with KrViewItems
+ * 3) getCurrentItem, setCurrentItem - work with TQString
* 4) getFirst, getNext, getPrev, getCurrentKrViewItem - all work with KrViewItems, and
* used to iterate through a list of items. note that getNext and getPrev accept a pointer
* to the current item (used in detailedview for safe iterating), thus your loop should be:
* for (KrViewItem *it = view->getFirst(); it!=0; it = view->getNext(it)) { blah; }
- * 5) nameToMakeCurrent(), setNameToMakeCurrent() - work with QString
+ * 5) nameToMakeCurrent(), setNameToMakeCurrent() - work with TQString
*
* IMPORTANT NOTE: every one who subclasses this must call initProperties() in the constructor !!!
*/
@@ -155,11 +156,11 @@ public:
virtual KrViewItem *getNext(KrViewItem *current) = 0;
virtual KrViewItem *getPrev(KrViewItem *current) = 0;
virtual KrViewItem *getCurrentKrViewItem() = 0;
- virtual KrViewItem *getKrViewItemAt(const QPoint &vp) = 0;
- virtual KrViewItem *findItemByName(const QString &name) = 0;
+ virtual KrViewItem *getKrViewItemAt(const TQPoint &vp) = 0;
+ virtual KrViewItem *findItemByName(const TQString &name) = 0;
virtual void addItems(vfs* v, bool addUpDir = true) = 0; // kill me, kill me now
- virtual QString getCurrentItem() const = 0;
- virtual void setCurrentItem(const QString& name) = 0;
+ virtual TQString getCurrentItem() const = 0;
+ virtual void setCurrentItem(const TQString& name) = 0;
virtual void makeItemVisible(const KrViewItem *item) = 0;
virtual void clear();
virtual void updateView() = 0;
@@ -170,7 +171,7 @@ public:
virtual void prepareForActive() { _focused = true; }
virtual void prepareForPassive() { _focused = false; }
virtual void renameCurrentItem(); // Rename current item. returns immediatly
- virtual QString nameInKConfig() const { return _nameInKConfig; }
+ virtual TQString nameInKConfig() const { return _nameInKConfig; }
protected:
virtual KrViewItem *preAddItem(vfile *vf) = 0;
@@ -183,26 +184,26 @@ public:
//////////////////////////////////////////////////////
virtual KrViewItem *addItem(vfile *vf);
virtual void updateItem(vfile *vf);
- virtual void delItem(const QString &name);
+ virtual void delItem(const TQString &name);
virtual uint numSelected() const { return _numSelected; }
virtual KIO::filesize_t selectedSize() const { return _selectedSize; }
virtual uint numFiles() const { return _count-_numDirs; }
virtual uint numDirs() const { return _numDirs; }
virtual uint count() const { return _count; }
virtual KIO::filesize_t countSize() const { return _countSize; }
- virtual void getSelectedItems(QStringList* names);
- virtual void getItemsByMask(QString mask, QStringList* names, bool dirs = true, bool files = true);
+ virtual void getSelectedItems(TQStringList* names);
+ virtual void getItemsByMask(TQString tqmask, TQStringList* names, bool dirs = true, bool files = true);
virtual void getSelectedKrViewItems(KrViewItemList *items);
virtual void selectAllIncludingDirs() { changeSelection( KRQuery( "*" ), true, true); }
virtual void select( const KRQuery& filter = KRQuery( "*" ) ) { changeSelection(filter, true); }
virtual void unselect(const KRQuery& filter = KRQuery( "*" ) ) { changeSelection(filter, false); }
virtual void invertSelection();
- virtual QString nameToMakeCurrent() const { return _nameToMakeCurrent; }
- virtual void setNameToMakeCurrent(const QString name) { _nameToMakeCurrent = name; }
- virtual QString nameToMakeCurrentIfAdded() const { return _nameToMakeCurrentIfAdded; }
- virtual void setNameToMakeCurrentIfAdded(const QString name) { _nameToMakeCurrentIfAdded = name; }
- virtual QString firstUnmarkedBelowCurrent();
- virtual QString statistics();
+ virtual TQString nameToMakeCurrent() const { return _nameToMakeCurrent; }
+ virtual void setNameToMakeCurrent(const TQString name) { _nameToMakeCurrent = name; }
+ virtual TQString nameToMakeCurrentIfAdded() const { return _nameToMakeCurrentIfAdded; }
+ virtual void setNameToMakeCurrentIfAdded(const TQString name) { _nameToMakeCurrentIfAdded = name; }
+ virtual TQString firstUnmarkedBelowCurrent();
+ virtual TQString statistics();
virtual const KrViewProperties* properties() const { return _properties; }
virtual KrViewOperator* op() const { return _operator; }
@@ -214,32 +215,32 @@ public:
virtual KrViewProperties::SortSpec sortMode() const { return _properties->sortMode; }
virtual void setFilter(KrViewProperties::FilterSpec filter) { _properties->filter = filter; }
virtual KrViewProperties::FilterSpec filter() const { return _properties->filter; }
- virtual void setFilterMask( KRQuery mask ) { _properties->filterMask = mask; }
+ virtual void setFilterMask( KRQuery tqmask ) { _properties->filterMask = tqmask; }
virtual const KRQuery& filterMask() const { return _properties->filterMask; }
- inline QWidget *widget() { return _widget; }
- inline void setWidget(QWidget *w) { _widget = w; }
+ inline TQWidget *widget() { return _widget; }
+ inline void setWidget(TQWidget *w) { _widget = w; }
// todo: what about selection modes ???
virtual ~KrView();
protected:
KrView(KConfig *cfg = krConfig);
- static QPixmap getIcon(vfile *vf);
+ static TQPixmap getIcon(vfile *vf);
void changeSelection(const KRQuery& filter, bool select, bool includeDirs = false);
protected:
KConfig *_config;
- QWidget *_widget;
- QString _nameToMakeCurrent;
- QString _nameToMakeCurrentIfAdded;
+ TQWidget *_widget;
+ TQString _nameToMakeCurrent;
+ TQString _nameToMakeCurrentIfAdded;
uint _numSelected, _count, _numDirs;
KIO::filesize_t _countSize, _selectedSize;
bool _left;
KrViewProperties *_properties;
KrViewOperator *_operator;
- QDict<KrViewItem> _dict;
+ TQDict<KrViewItem> _dict;
bool _focused;
- QString _nameInKConfig;
+ TQString _nameInKConfig;
};
#endif /* KRVIEW_H */
diff --git a/krusader/Panel/krviewitem.cpp b/krusader/Panel/krviewitem.cpp
index 28500d4..fe82c0c 100644
--- a/krusader/Panel/krviewitem.cpp
+++ b/krusader/Panel/krviewitem.cpp
@@ -8,21 +8,21 @@
#define PROPS static_cast<const KrViewProperties*>(_viewProperties)
-QString atomicExtensions[] = {
+TQString atomicExtensions[] = {
".tar.gz",
".tar.bz2",
- ".moc.cpp"
+ ".tqmoc.cpp"
};
KrViewItem::KrViewItem(vfile *vf, const KrViewProperties* properties):
_vf(vf), dummyVfile(false), _viewProperties(properties), _hasExtension(false), _hidden(false), _extension("") {
if (vf) {
// check if the file has an extension
- const QString& vfName = vf->vfile_getName();
- int loc = vfName.findRev('.');
+ const TQString& vfName = vf->vfile_getName();
+ int loc = vfName.tqfindRev('.');
if (loc>0) { // avoid mishandling of .bashrc and friend
// check if it has one of the predefined 'atomic extensions'
- for (QStringList::const_iterator i = PROPS->atomicExtensions.begin(); i != PROPS->atomicExtensions.end(); ++i) {
+ for (TQStringList::const_iterator i = PROPS->atomicExtensions.begin(); i != PROPS->atomicExtensions.end(); ++i) {
if (vfName.endsWith(*i)){
loc = vfName.length() - (*i).length();
break;
@@ -38,34 +38,34 @@ KrViewItem::KrViewItem(vfile *vf, const KrViewProperties* properties):
}
}
-const QString& KrViewItem::name(bool withExtension) const {
+const TQString& KrViewItem::name(bool withExtension) const {
if (!withExtension && _hasExtension) return _name;
else return _vf->vfile_getName();
}
-QString KrViewItem::description() const {
+TQString KrViewItem::description() const {
if (dummyVfile) return i18n("Climb up the directory tree");
// else is implied
- QString text = _vf->vfile_getName();
- QString comment = KMimeType::mimeType(_vf->vfile_getMime())->comment(text, false);
- QString myLinkDest = _vf->vfile_getSymDest();
+ TQString text = _vf->vfile_getName();
+ TQString comment = KMimeType::mimeType(_vf->vfile_getMime())->comment(text, false);
+ TQString myLinkDest = _vf->vfile_getSymDest();
KIO::filesize_t mySize = _vf->vfile_getSize();
- QString text2 = text.copy();
+ TQString text2 = text.copy();
mode_t m_fileMode = _vf->vfile_getMode();
if (_vf->vfile_isSymLink() ){
- QString tmp;
+ TQString tmp;
if ( comment.isEmpty() ) tmp = i18n ( "Symbolic Link" ) ;
else if( _vf->vfile_getMime() == "Broken Link !" ) tmp = i18n("(broken link !)");
- else tmp = i18n("%1 (Link)").arg(comment);
+ else tmp = i18n("%1 (Link)").tqarg(comment);
text += "->";
text += myLinkDest;
text += " ";
text += tmp;
} else if ( S_ISREG( m_fileMode ) ){
- text = QString("%1 (%2)").arg(text2).arg( PROPS->humanReadableSize ?
+ text = TQString("%1 (%2)").tqarg(text2).tqarg( PROPS->humanReadableSize ?
KRpermHandler::parseSize(_vf->vfile_getSize()) : KIO::convertSize( mySize ) );
text += " ";
text += comment;
@@ -79,27 +79,27 @@ QString KrViewItem::description() const {
return text;
}
-QString KrViewItem::dateTime() const {
+TQString KrViewItem::dateTime() const {
// convert the time_t to struct tm
time_t time = _vf->vfile_getTime_t();
struct tm* t=localtime((time_t *)&time);
- QDateTime tmp(QDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), QTime(t->tm_hour, t->tm_min));
+ TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min));
return KGlobal::locale()->formatDateTime(tmp);
}
-QPixmap KrViewItem::icon() {
+TQPixmap KrViewItem::icon() {
#if 0
- QPixmap *p;
+ TQPixmap *p;
// This is bad - very bad. the function must return a valid reference,
- // This is an interface flow - shie please fix it with a function that return QPixmap*
+ // This is an interface flow - shie please fix it with a function that return TQPixmap*
// this way we can return 0 - and do our error checking...
// shie answers: why? what's the difference? if we return an empty pixmap, others can use it as it
// is, without worrying or needing to do error checking. empty pixmap displays nothing
#endif
if (dummyVfile || !_viewProperties->displayIcons)
- return QPixmap();
+ return TQPixmap();
else return KrView::getIcon(_vf);
}
diff --git a/krusader/Panel/krviewitem.h b/krusader/Panel/krviewitem.h
index 2294b28..ad4c56b 100644
--- a/krusader/Panel/krviewitem.h
+++ b/krusader/Panel/krviewitem.h
@@ -35,21 +35,21 @@
#include "../VFS/vfile.h"
#include "krview.h"
-class QString;
-class QPixmap;
+class TQString;
+class TQPixmap;
class KrViewItem {
friend class KrView;
public:
- virtual const QString& name(bool withExtension=true) const;
+ virtual const TQString& name(bool withExtension=true) const;
virtual inline bool hasExtension() const { return _hasExtension; }
- virtual inline const QString& extension() const { return _extension; }
- virtual QString dateTime() const;
- virtual QString description() const;
+ virtual inline const TQString& extension() const { return _extension; }
+ virtual TQString dateTime() const;
+ virtual TQString description() const;
virtual bool isSelected() const = 0;
virtual void setSelected( bool s ) = 0;
- virtual QPixmap icon();
+ virtual TQPixmap icon();
KrViewItem(vfile *vf, const KrViewProperties* properties);
virtual ~KrViewItem() { if (dummyVfile) delete _vf; }
@@ -69,8 +69,8 @@ protected:
const KrViewProperties* _viewProperties;
bool _hasExtension;
bool _hidden;
- QString _name;
- QString _extension;
+ TQString _name;
+ TQString _extension;
};
#endif
diff --git a/krusader/Panel/listpanel.cpp b/krusader/Panel/listpanel.cpp
index 5972eaf..3640d48 100644
--- a/krusader/Panel/listpanel.cpp
+++ b/krusader/Panel/listpanel.cpp
@@ -31,15 +31,15 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#include <unistd.h>
#include <sys/param.h>
// QT includes
-#include <qbitmap.h>
-#include <qwhatsthis.h>
-#include <qstringlist.h>
-#include <qstrlist.h>
+#include <tqbitmap.h>
+#include <tqwhatsthis.h>
+#include <tqstringlist.h>
+#include <tqstrlist.h>
#include <kurldrag.h>
-#include <qheader.h>
-#include <qtimer.h>
-#include <qregexp.h>
-#include <qsplitter.h>
+#include <tqheader.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
+#include <tqsplitter.h>
// KDE includes
#include <kpopupmenu.h>
#include <kprocess.h>
@@ -55,10 +55,10 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#include <kmessagebox.h>
#include <kstandarddirs.h>
#include <kglobalsettings.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kdeversion.h>
-#include <qimage.h>
-#include <qtabbar.h>
+#include <tqimage.h>
+#include <tqtabbar.h>
#include <kdebug.h>
#include <kurlrequester.h>
#include <kurl.h>
@@ -95,88 +95,88 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#include "../Dialogs/popularurls.h"
#include "krpopupmenu.h"
-#ifdef __LIBKONQ__
+#ifdef __LIBKONTQ__
#include <konq_popupmenu.h>
#include <konqbookmarkmanager.h>
#endif
-typedef QValueList<KServiceOffer> OfferList;
+typedef TQValueList<KServiceOffer> OfferList;
#define URL(X) KURL::fromPathOrURL(X)
/////////////////////////////////////////////////////
// The list panel constructor //
/////////////////////////////////////////////////////
-ListPanel::ListPanel( QString typeIn, QWidget *parent, bool &left, const char *name ) :
- QWidget( parent, name ), panelType( typeIn ), colorMask( 255 ), compareMode( false ), currDragItem( 0 ), statsAgent( 0 ),
+ListPanel::ListPanel( TQString typeIn, TQWidget *tqparent, bool &left, const char *name ) :
+ TQWidget( tqparent, name ), panelType( typeIn ), colorMask( 255 ), compareMode( false ), currDragItem( 0 ), statsAgent( 0 ),
quickSearch( 0 ), cdRootButton( 0 ), cdUpButton( 0 ), popupBtn(0), popup(0),inlineRefreshJob(0), _left( left ) {
func = new ListPanelFunc( this );
setAcceptDrops( true );
- layout = new QGridLayout( this, 3, 3 );
+ tqlayout = new TQGridLayout( this, 3, 3 );
mediaButton = new MediaButton( this, "mediaButton" );
- connect( mediaButton, SIGNAL( pressed() ), this, SLOT( slotFocusOnMe() ) );
- connect( mediaButton, SIGNAL( openUrl( const KURL& ) ), func, SLOT( openUrl( const KURL& ) ) );
+ connect( mediaButton, TQT_SIGNAL( pressed() ), this, TQT_SLOT( slotFocusOnMe() ) );
+ connect( mediaButton, TQT_SIGNAL( openUrl( const KURL& ) ), func, TQT_SLOT( openUrl( const KURL& ) ) );
status = new KrSqueezedTextLabel( this );
krConfig->setGroup( "Look&Feel" );
status->setFont( krConfig->readFontEntry( "Filelist Font", _FilelistFont ) );
status->setBackgroundMode( PaletteBackground );
- status->setFrameStyle( QFrame::Box | QFrame::Raised );
+ status->setFrameStyle( TQFrame::Box | TQFrame::Raised );
status->setLineWidth( 1 ); // a nice 3D touch :-)
status->setText( "" ); // needed for initialization code!
status->enableDrops( true );
- int sheight = QFontMetrics( status->font() ).height() + 4;
+ int sheight = TQFontMetrics( status->font() ).height() + 4;
status->setMaximumHeight( sheight );
- QWhatsThis::add
+ TQWhatsThis::add
( status, i18n( "The statusbar displays information about the FILESYSTEM "
"which holds your current directory: Total size, free space, "
"type of filesystem, etc." ) );
- connect( status, SIGNAL( clicked() ), this, SLOT( slotFocusOnMe() ) );
- connect( status, SIGNAL( dropped( QDropEvent *) ), this, SLOT( handleDropOnStatus(QDropEvent *) ) );
+ connect( status, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotFocusOnMe() ) );
+ connect( status, TQT_SIGNAL( dropped( TQDropEvent *) ), this, TQT_SLOT( handleDropOntqStatus(TQDropEvent *) ) );
// ... create the history button
dirHistoryQueue = new DirHistoryQueue( this );
historyButton = new DirHistoryButton( dirHistoryQueue, this, "historyButton" );
- connect( historyButton, SIGNAL( pressed() ), this, SLOT( slotFocusOnMe() ) );
- connect( historyButton, SIGNAL( openUrl( const KURL& ) ), func, SLOT( openUrl( const KURL& ) ) );
+ connect( historyButton, TQT_SIGNAL( pressed() ), this, TQT_SLOT( slotFocusOnMe() ) );
+ connect( historyButton, TQT_SIGNAL( openUrl( const KURL& ) ), func, TQT_SLOT( openUrl( const KURL& ) ) );
bookmarksButton = new KrBookmarkButton(this);
- connect( bookmarksButton, SIGNAL( pressed() ), this, SLOT( slotFocusOnMe() ) );
- connect( bookmarksButton, SIGNAL( openUrl( const KURL& ) ), func, SLOT( openUrl( const KURL& ) ) );
- QWhatsThis::add
+ connect( bookmarksButton, TQT_SIGNAL( pressed() ), this, TQT_SLOT( slotFocusOnMe() ) );
+ connect( bookmarksButton, TQT_SIGNAL( openUrl( const KURL& ) ), func, TQT_SLOT( openUrl( const KURL& ) ) );
+ TQWhatsThis::add
( bookmarksButton, i18n( "Open menu with bookmarks. You can also add "
"current location to the list, edit bookmarks "
"or add subfolder to the list." ) );
- QHBoxLayout *totalsLayout = new QHBoxLayout;
+ TQHBoxLayout *totalsLayout = new TQHBoxLayout;
totals = new KrSqueezedTextLabel( this );
krConfig->setGroup( "Look&Feel" );
totals->setFont( krConfig->readFontEntry( "Filelist Font", _FilelistFont ) );
- totals->setFrameStyle( QFrame::Box | QFrame::Raised );
+ totals->setFrameStyle( TQFrame::Box | TQFrame::Raised );
totals->setBackgroundMode( PaletteBackground );
totals->setLineWidth( 1 ); // a nice 3D touch :-)
totals->setMaximumHeight( sheight );
totals->enableDrops( true );
- QWhatsThis::add
+ TQWhatsThis::add
( totals, i18n( "The totals bar shows how many files exist, "
"how many selected and the bytes math" ) );
- connect( totals, SIGNAL( clicked() ), this, SLOT( slotFocusOnMe() ) );
- connect( totals, SIGNAL( dropped( QDropEvent *) ), this, SLOT( handleDropOnTotals(QDropEvent *) ) );
+ connect( totals, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotFocusOnMe() ) );
+ connect( totals, TQT_SIGNAL( dropped( TQDropEvent *) ), this, TQT_SLOT( handleDropOnTotals(TQDropEvent *) ) );
// a cancel button for the inplace refresh mechanism
inlineRefreshCancelButton = new KPushButton(this);
inlineRefreshCancelButton->setFixedSize( 22, 20 );
inlineRefreshCancelButton->setPixmap(krLoader->loadIcon("cancel", KIcon::Toolbar, 16));
- connect(inlineRefreshCancelButton, SIGNAL(clicked()), this, SLOT(inlineRefreshCancel()));
+ connect(inlineRefreshCancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(inlineRefreshCancel()));
// a quick button to open the popup panel
- popupBtn = new QToolButton( this, "popupbtn" );
+ popupBtn = new TQToolButton( this, "popupbtn" );
popupBtn->setFixedSize( 22, 20 );
popupBtn->setPixmap(krLoader->loadIcon("1uparrow", KIcon::Toolbar, 16));
- connect(popupBtn, SIGNAL(clicked()), this, SLOT(togglePanelPopup()));
- QToolTip::add( popupBtn, i18n( "Open the popup panel" ) );
+ connect(popupBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(togglePanelPopup()));
+ TQToolTip::add( popupBtn, i18n( "Open the popup panel" ) );
totalsLayout->addWidget(totals);
totalsLayout->addWidget(inlineRefreshCancelButton); inlineRefreshCancelButton->hide();
totalsLayout->addWidget(popupBtn);
@@ -184,107 +184,107 @@ ListPanel::ListPanel( QString typeIn, QWidget *parent, bool &left, const char *n
quickSearch = new KrQuickSearch( this );
krConfig->setGroup( "Look&Feel" );
quickSearch->setFont( krConfig->readFontEntry( "Filelist Font", _FilelistFont ) );
- quickSearch->setFrameStyle( QFrame::Box | QFrame::Raised );
+ quickSearch->setFrameStyle( TQFrame::Box | TQFrame::Raised );
quickSearch->setLineWidth( 1 ); // a nice 3D touch :-)
quickSearch->setMaximumHeight( sheight );
- QHBox * hbox = new QHBox( this );
+ TQHBox * hbox = new TQHBox( this );
// clear-origin button
bool clearButton = krConfig->readBoolEntry("Clear Location Bar Visible", _ClearLocation);
if (clearButton){
- clearOrigin = new QToolButton(hbox, "clearorigin");
+ clearOrigin = new TQToolButton(hbox, "clearorigin");
clearOrigin->setPixmap(krLoader->loadIcon("locationbar_erase", KIcon::Toolbar, 16));
- QToolTip::add( clearOrigin, i18n( "Clear the location bar" ) );
+ TQToolTip::add( clearOrigin, i18n( "Clear the location bar" ) );
}
QuickNavLineEdit *qnle = new QuickNavLineEdit(this);
origin = new KURLRequester( qnle, hbox );
- QPixmap pixMap = origin->button() ->iconSet() ->pixmap( QIconSet::Small, QIconSet::Normal );
+ TQPixmap pixMap = origin->button() ->iconSet() ->pixmap( TQIconSet::Small, TQIconSet::Normal );
origin->button() ->setFixedSize( pixMap.width() + 4, pixMap.height() + 4 );
- QWhatsThis::add
+ TQWhatsThis::add
( origin, i18n( "Use superb KDE file dialog to choose location. " ) );
origin->setShowLocalProtocol( false );
origin->lineEdit() ->setURLDropsEnabled( true );
origin->lineEdit() ->installEventFilter( this );
- QWhatsThis::add
+ TQWhatsThis::add
( origin->lineEdit(), i18n( "Name of directory where you are. You can also "
"enter name of desired location to move there. "
"Use of Net protocols like ftp or fish is possible." ) );
origin->setMode( KFile::Directory | KFile::ExistingOnly );
- connect( origin, SIGNAL( returnPressed( const QString& ) ), func, SLOT( openUrl( const QString& ) ) );
- connect( origin, SIGNAL( returnPressed( const QString& ) ), this, SLOT( slotFocusOnMe() ) );
- connect( origin, SIGNAL( urlSelected( const QString& ) ), func, SLOT( openUrl( const QString& ) ) );
- connect( origin, SIGNAL( urlSelected( const QString& ) ), this, SLOT( slotFocusOnMe() ) );
+ connect( origin, TQT_SIGNAL( returnPressed( const TQString& ) ), func, TQT_SLOT( openUrl( const TQString& ) ) );
+ connect( origin, TQT_SIGNAL( returnPressed( const TQString& ) ), this, TQT_SLOT( slotFocusOnMe() ) );
+ connect( origin, TQT_SIGNAL( urlSelected( const TQString& ) ), func, TQT_SLOT( openUrl( const TQString& ) ) );
+ connect( origin, TQT_SIGNAL( urlSelected( const TQString& ) ), this, TQT_SLOT( slotFocusOnMe() ) );
// this is here on purpose, do not move up!
if (clearButton) {
clearOrigin->setFixedSize( 20, origin->button() ->height() );
- connect(clearOrigin, SIGNAL(clicked()), origin->lineEdit(), SLOT(clear()));
- connect(clearOrigin, SIGNAL(clicked()), origin->lineEdit(), SLOT(setFocus()));
+ connect(clearOrigin, TQT_SIGNAL(clicked()), origin->lineEdit(), TQT_SLOT(clear()));
+ connect(clearOrigin, TQT_SIGNAL(clicked()), origin->lineEdit(), TQT_SLOT(setFocus()));
}
//
- cdOtherButton = new QToolButton( hbox, "cdOtherButton" );
+ cdOtherButton = new TQToolButton( hbox, "cdOtherButton" );
cdOtherButton->setFixedSize( 20, origin->button() ->height() );
cdOtherButton->setText( i18n( "=" ) );
- QToolTip::add( cdOtherButton, i18n( "Equal" ) );
- connect( cdOtherButton, SIGNAL( clicked() ), this, SLOT( slotFocusAndCDOther() ) );
+ TQToolTip::add( cdOtherButton, i18n( "Equal" ) );
+ connect( cdOtherButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotFocusAndCDOther() ) );
- cdUpButton = new QToolButton( hbox, "cdUpButton" );
+ cdUpButton = new TQToolButton( hbox, "cdUpButton" );
cdUpButton->setFixedSize( 20, origin->button() ->height() );
cdUpButton->setText( i18n( ".." ) );
- QToolTip::add( cdUpButton, i18n( "Up" ) );
- connect( cdUpButton, SIGNAL( clicked() ), this, SLOT( slotFocusAndCDup() ) );
+ TQToolTip::add( cdUpButton, i18n( "Up" ) );
+ connect( cdUpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotFocusAndCDup() ) );
- cdHomeButton = new QToolButton( hbox, "cdHomeButton" );
+ cdHomeButton = new TQToolButton( hbox, "cdHomeButton" );
cdHomeButton->setFixedSize( 20, origin->button() ->height() );
cdHomeButton->setText( i18n( "~" ) );
- QToolTip::add( cdHomeButton, i18n( "Home" ) );
- connect( cdHomeButton, SIGNAL( clicked() ), this, SLOT( slotFocusAndCDHome() ) );
+ TQToolTip::add( cdHomeButton, i18n( "Home" ) );
+ connect( cdHomeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotFocusAndCDHome() ) );
- cdRootButton = new QToolButton( hbox, "cdRootButton" );
+ cdRootButton = new TQToolButton( hbox, "cdRootButton" );
cdRootButton->setFixedSize( 20, origin->button() ->height() );
cdRootButton->setText( i18n( "/" ) );
- QToolTip::add( cdRootButton, i18n( "Root" ) );
- connect( cdRootButton, SIGNAL( clicked() ), this, SLOT( slotFocusAndCDRoot() ) );
+ TQToolTip::add( cdRootButton, i18n( "Root" ) );
+ connect( cdRootButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotFocusAndCDRoot() ) );
// ... creates the button for sync-browsing
syncBrowseButton = new SyncBrowseButton( hbox );
setPanelToolbar();
- header = new QHeader( this );
+ header = new TQHeader( this );
header->hide();
// create a splitter to hold the view and the popup
splt = new PercentalSplitter(this);
splt->setChildrenCollapsible(true);
- splt->setOrientation(QObject::Vertical);
+ splt->setOrientation(Qt::Vertical);
createView();
// make sure that a focus/path change reflects in the command line and activePanel
- connect( this, SIGNAL( cmdLineUpdate( QString ) ), SLOTS, SLOT( slotCurrentChanged( QString ) ) );
- connect( this, SIGNAL( activePanelChanged( ListPanel * ) ), SLOTS, SLOT( slotSetActivePanel( ListPanel * ) ) );
+ connect( this, TQT_SIGNAL( cmdLineUpdate( TQString ) ), SLOTS, TQT_SLOT( slotCurrentChanged( TQString ) ) );
+ connect( this, TQT_SIGNAL( activePanelChanged( ListPanel * ) ), SLOTS, TQT_SLOT( slotSetActivePanel( ListPanel * ) ) );
// add a popup
popup = new PanelPopup(splt, left);
- connect(popup, SIGNAL(selection(const KURL&)), SLOTS, SLOT(refresh(const KURL&)));
- connect(popup, SIGNAL(hideMe()), this, SLOT(togglePanelPopup()));
+ connect(popup, TQT_SIGNAL(selection(const KURL&)), SLOTS, TQT_SLOT(refresh(const KURL&)));
+ connect(popup, TQT_SIGNAL(hideMe()), this, TQT_SLOT(togglePanelPopup()));
popup->hide();
- // finish the layout
- layout->addMultiCellWidget( hbox, 0, 0, 0, 3 );
- layout->addWidget( mediaButton, 1, 0 );
- layout->addWidget( status, 1, 1 );
- layout->addWidget( historyButton, 1, 2 );
- layout->addWidget( bookmarksButton, 1, 3 );
- layout->addMultiCellWidget( header, 2, 2, 0, 3 );
- layout->addMultiCellWidget( splt, 3, 3, 0, 3 );
- layout->addMultiCellWidget( quickSearch, 4, 4, 0, 3 );
+ // finish the tqlayout
+ tqlayout->addMultiCellWidget( hbox, 0, 0, 0, 3 );
+ tqlayout->addWidget( mediaButton, 1, 0 );
+ tqlayout->addWidget( status, 1, 1 );
+ tqlayout->addWidget( historyButton, 1, 2 );
+ tqlayout->addWidget( bookmarksButton, 1, 3 );
+ tqlayout->addMultiCellWidget( header, 2, 2, 0, 3 );
+ tqlayout->addMultiCellWidget( splt, 3, 3, 0, 3 );
+ tqlayout->addMultiCellWidget( quickSearch, 4, 4, 0, 3 );
quickSearch->hide();
- layout->addMultiCellLayout( totalsLayout, 5, 5, 0, 3 );
+ tqlayout->addMultiCellLayout( totalsLayout, 5, 5, 0, 3 );
//filter = ALL;
}
@@ -296,51 +296,51 @@ void ListPanel::createView()
view = new KrBriefView( header, splt, _left, krConfig );
view->init();
- connect( dynamic_cast<KrBriefView*>( view ), SIGNAL( middleButtonClicked( KrViewItem * ) ), SLOTS, SLOT( newTab( KrViewItem * ) ) );
- connect( dynamic_cast<KrBriefView*>( view ), SIGNAL( currentChanged( KrViewItem * ) ),
- SLOTS, SLOT( updatePopupPanel( KrViewItem* ) ) );
+ connect( dynamic_cast<KrBriefView*>( view ), TQT_SIGNAL( middleButtonClicked( KrViewItem * ) ), SLOTS, TQT_SLOT( newTab( KrViewItem * ) ) );
+ connect( dynamic_cast<KrBriefView*>( view ), TQT_SIGNAL( currentChanged( KrViewItem * ) ),
+ SLOTS, TQT_SLOT( updatePopupPanel( KrViewItem* ) ) );
// connect quicksearch
- connect( quickSearch, SIGNAL( textChanged( const QString& ) ),
- dynamic_cast<KrBriefView*>( view ), SLOT( quickSearch( const QString& ) ) );
- connect( quickSearch, SIGNAL( otherMatching( const QString&, int ) ),
- dynamic_cast<KrBriefView*>( view ), SLOT( quickSearch( const QString& , int ) ) );
- connect( quickSearch, SIGNAL( stop( QKeyEvent* ) ),
- dynamic_cast<KrBriefView*>( view ), SLOT( stopQuickSearch( QKeyEvent* ) ) );
- connect( quickSearch, SIGNAL( process( QKeyEvent* ) ),
- dynamic_cast<KrBriefView*>( view ), SLOT( handleQuickSearchEvent( QKeyEvent* ) ) );
+ connect( quickSearch, TQT_SIGNAL( textChanged( const TQString& ) ),
+ dynamic_cast<KrBriefView*>( view ), TQT_SLOT( quickSearch( const TQString& ) ) );
+ connect( quickSearch, TQT_SIGNAL( otherMatching( const TQString&, int ) ),
+ dynamic_cast<KrBriefView*>( view ), TQT_SLOT( quickSearch( const TQString& , int ) ) );
+ connect( quickSearch, TQT_SIGNAL( stop( TQKeyEvent* ) ),
+ dynamic_cast<KrBriefView*>( view ), TQT_SLOT( stopQuickSearch( TQKeyEvent* ) ) );
+ connect( quickSearch, TQT_SIGNAL( process( TQKeyEvent* ) ),
+ dynamic_cast<KrBriefView*>( view ), TQT_SLOT( handleQuickSearchEvent( TQKeyEvent* ) ) );
} else { /* Detailed */
panelType = "Detailed";
view = new KrDetailedView( splt, _left, krConfig );
view->init();
- connect( dynamic_cast<KrDetailedView*>( view ), SIGNAL( middleButtonClicked( KrViewItem * ) ), SLOTS, SLOT( newTab( KrViewItem * ) ) );
- connect( dynamic_cast<KrDetailedView*>( view ), SIGNAL( currentChanged( KrViewItem * ) ),
- SLOTS, SLOT( updatePopupPanel( KrViewItem * ) ) );
+ connect( dynamic_cast<KrDetailedView*>( view ), TQT_SIGNAL( middleButtonClicked( KrViewItem * ) ), SLOTS, TQT_SLOT( newTab( KrViewItem * ) ) );
+ connect( dynamic_cast<KrDetailedView*>( view ), TQT_SIGNAL( currentChanged( KrViewItem * ) ),
+ SLOTS, TQT_SLOT( updatePopupPanel( KrViewItem * ) ) );
// connect quicksearch
- connect( quickSearch, SIGNAL( textChanged( const QString& ) ),
- dynamic_cast<KrDetailedView*>( view ), SLOT( quickSearch( const QString& ) ) );
- connect( quickSearch, SIGNAL( otherMatching( const QString&, int ) ),
- dynamic_cast<KrDetailedView*>( view ), SLOT( quickSearch( const QString& , int ) ) );
- connect( quickSearch, SIGNAL( stop( QKeyEvent* ) ),
- dynamic_cast<KrDetailedView*>( view ), SLOT( stopQuickSearch( QKeyEvent* ) ) );
- connect( quickSearch, SIGNAL( process( QKeyEvent* ) ),
- dynamic_cast<KrDetailedView*>( view ), SLOT( handleQuickSearchEvent( QKeyEvent* ) ) );
+ connect( quickSearch, TQT_SIGNAL( textChanged( const TQString& ) ),
+ dynamic_cast<KrDetailedView*>( view ), TQT_SLOT( quickSearch( const TQString& ) ) );
+ connect( quickSearch, TQT_SIGNAL( otherMatching( const TQString&, int ) ),
+ dynamic_cast<KrDetailedView*>( view ), TQT_SLOT( quickSearch( const TQString& , int ) ) );
+ connect( quickSearch, TQT_SIGNAL( stop( TQKeyEvent* ) ),
+ dynamic_cast<KrDetailedView*>( view ), TQT_SLOT( stopQuickSearch( TQKeyEvent* ) ) );
+ connect( quickSearch, TQT_SIGNAL( process( TQKeyEvent* ) ),
+ dynamic_cast<KrDetailedView*>( view ), TQT_SLOT( handleQuickSearchEvent( TQKeyEvent* ) ) );
}
- connect( view->op(), SIGNAL( renameItem( const QString &, const QString & ) ),
- func, SLOT( rename( const QString &, const QString & ) ) );
- connect( view->op(), SIGNAL( executed( QString& ) ), func, SLOT( execute( QString& ) ) );
- connect( view->op(), SIGNAL( needFocus() ), this, SLOT( slotFocusOnMe() ) );
- connect( view->op(), SIGNAL( selectionChanged() ), this, SLOT( slotUpdateTotals() ) );
- connect( view->op(), SIGNAL( itemDescription( QString& ) ), krApp, SLOT( statusBarUpdate( QString& ) ) );
- connect( view->op(), SIGNAL( contextMenu( const QPoint & ) ), this, SLOT( popRightClickMenu( const QPoint & ) ) );
- connect( view->op(), SIGNAL( emptyContextMenu( const QPoint &) ),
- this, SLOT( popEmptyRightClickMenu( const QPoint & ) ) );
- connect( view->op(), SIGNAL( letsDrag( QStringList, QPixmap ) ), this, SLOT( startDragging( QStringList, QPixmap ) ) );
- connect( view->op(), SIGNAL( gotDrop( QDropEvent * ) ), this, SLOT( handleDropOnView( QDropEvent * ) ) );
+ connect( view->op(), TQT_SIGNAL( renameItem( const TQString &, const TQString & ) ),
+ func, TQT_SLOT( rename( const TQString &, const TQString & ) ) );
+ connect( view->op(), TQT_SIGNAL( executed( TQString& ) ), func, TQT_SLOT( execute( TQString& ) ) );
+ connect( view->op(), TQT_SIGNAL( needFocus() ), this, TQT_SLOT( slotFocusOnMe() ) );
+ connect( view->op(), TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateTotals() ) );
+ connect( view->op(), TQT_SIGNAL( itemDescription( TQString& ) ), krApp, TQT_SLOT( statusBarUpdate( TQString& ) ) );
+ connect( view->op(), TQT_SIGNAL( contextMenu( const TQPoint & ) ), this, TQT_SLOT( popRightClickMenu( const TQPoint & ) ) );
+ connect( view->op(), TQT_SIGNAL( emptyContextMenu( const TQPoint &) ),
+ this, TQT_SLOT( popEmptyRightClickMenu( const TQPoint & ) ) );
+ connect( view->op(), TQT_SIGNAL( letsDrag( TQStringList, TQPixmap ) ), this, TQT_SLOT( startDragging( TQStringList, TQPixmap ) ) );
+ connect( view->op(), TQT_SIGNAL( gotDrop( TQDropEvent * ) ), this, TQT_SLOT( handleDropOnView( TQDropEvent * ) ) );
}
-void ListPanel::changeType( const QString & type )
+void ListPanel::changeType( const TQString & type )
{
if( panelType != type )
{
@@ -370,7 +370,7 @@ ListPanel::~ListPanel() {
delete cdUpButton;
delete cdOtherButton;
delete syncBrowseButton;
- delete layout;
+ delete tqlayout;
}
int ListPanel::getProperties()
@@ -389,9 +389,9 @@ void ListPanel::setProperties( int prop )
syncBrowseButton->setOn( false );
}
-bool ListPanel::eventFilter ( QObject * watched, QEvent * e ) {
- if( e->type() == QEvent::KeyPress && origin->lineEdit() == watched ) {
- QKeyEvent *ke = (QKeyEvent *)e;
+bool ListPanel::eventFilter ( TQObject * watched, TQEvent * e ) {
+ if( e->type() == TQEvent::KeyPress && TQT_BASE_OBJECT(origin->lineEdit()) == TQT_BASE_OBJECT(watched) ) {
+ TQKeyEvent *ke = (TQKeyEvent *)e;
if( ( ke->key() == Key_Down ) && ( ke->state() == ControlButton ) ) {
slotFocusOnMe();
@@ -405,26 +405,26 @@ bool ListPanel::eventFilter ( QObject * watched, QEvent * e ) {
void ListPanel::togglePanelPopup() {
if (popup->isHidden()) {
if (popupSizes.count() > 0) {
- dynamic_cast<QSplitter*>(popup->parent())->setSizes(popupSizes);
+ dynamic_cast<TQSplitter*>(popup->tqparent())->setSizes(popupSizes);
} else { // on the first time, resize to 50%
- QValueList<int> lst;
+ TQValueList<int> lst;
lst << height()/2 << height()/2;
- dynamic_cast<QSplitter*>(popup->parent())->setSizes(lst);
+ dynamic_cast<TQSplitter*>(popup->tqparent())->setSizes(lst);
}
popup->show();
popupBtn->setPixmap(krLoader->loadIcon("1downarrow", KIcon::Toolbar, 16));
- QToolTip::add( popupBtn, i18n( "Close the popup panel" ) );
+ TQToolTip::add( popupBtn, i18n( "Close the popup panel" ) );
} else {
popupSizes.clear();
- popupSizes = dynamic_cast<QSplitter*>(popup->parent())->sizes();
+ popupSizes = dynamic_cast<TQSplitter*>(popup->tqparent())->sizes();
popup->hide();
popupBtn->setPixmap(krLoader->loadIcon("1uparrow", KIcon::Toolbar, 16));
- QToolTip::add( popupBtn, i18n( "Open the popup panel" ) );
+ TQToolTip::add( popupBtn, i18n( "Open the popup panel" ) );
- QValueList<int> lst;
+ TQValueList<int> lst;
lst << height() << 0;
- dynamic_cast<QSplitter*>(popup->parent())->setSizes(lst);
+ dynamic_cast<TQSplitter*>(popup->tqparent())->setSizes(lst);
if( ACTIVE_PANEL )
ACTIVE_PANEL->slotFocusOnMe();
}
@@ -434,7 +434,7 @@ KURL ListPanel::virtualPath() const {
return func->files()->vfs_getOrigin();
}
-QString ListPanel::realPath() const {
+TQString ListPanel::realPath() const {
return _realPath.path();
}
@@ -487,7 +487,7 @@ void ListPanel::slotFocusAndCDOther() {
void ListPanel::slotFocusAndCDHome() {
slotFocusOnMe();
- func->openUrl( QString( "~" ), QString::null );
+ func->openUrl( TQString( "~" ), TQString() );
}
void ListPanel::slotFocusAndCDup() {
@@ -497,7 +497,7 @@ void ListPanel::slotFocusAndCDup() {
void ListPanel::slotFocusAndCDRoot() {
slotFocusOnMe();
- func->openUrl( QString( "/" ), QString::null );
+ func->openUrl( TQString( "/" ), TQString() );
}
void ListPanel::select( KRQuery query, bool select) {
@@ -593,18 +593,18 @@ void ListPanel::slotFocusOnMe() {
krConfig->setGroup( "Look&Feel" );
// take care of the 'otherpanel'
- QPalette q( otherPanel->status->palette() );
- q.setColor( QColorGroup::Foreground, KGlobalSettings::textColor() );
- q.setColor( QColorGroup::Background, KGlobalSettings::baseColor() );
+ TQPalette q( otherPanel->status->palette() );
+ q.setColor( TQColorGroup::Foreground, KGlobalSettings::textColor() );
+ q.setColor( TQColorGroup::Background, KGlobalSettings::baseColor() );
otherPanel->status->setPalette( q );
otherPanel->totals->setPalette( q );
otherPanel->view->prepareForPassive();
// now, take care of this panel
- QPalette p( status->palette() );
- p.setColor( QColorGroup::Foreground, KGlobalSettings::highlightedTextColor() );
- p.setColor( QColorGroup::Background, KGlobalSettings::highlightColor() );
+ TQPalette p( status->palette() );
+ p.setColor( TQColorGroup::Foreground, KGlobalSettings::highlightedTextColor() );
+ p.setColor( TQColorGroup::Background, KGlobalSettings::highlightColor() );
status->setPalette( p );
totals->setPalette( p );
@@ -699,12 +699,12 @@ void ListPanel::slotStartUpdate() {
void ListPanel::slotUpdate() {
// if we are not at the root add the ".." entery
- QString protocol = func->files() ->vfs_getOrigin().protocol();
+ TQString protocol = func->files() ->vfs_getOrigin().protocol();
bool isFtp = ( protocol == "ftp" || protocol == "smb" || protocol == "sftp" || protocol == "fish" );
- QString origin = virtualPath().prettyURL(-1);
+ TQString origin = virtualPath().prettyURL(-1);
if ( origin.right( 1 ) != "/" && !( ( func->files() ->vfs_getType() == vfs::FTP ) && isFtp &&
- origin.find( '/', origin.find( ":/" ) + 3 ) == -1 ) ) {
+ origin.tqfind( '/', origin.tqfind( ":/" ) + 3 ) == -1 ) ) {
view->addItems( func->files() );
} else
view->addItems( func->files(), false );
@@ -720,7 +720,7 @@ void ListPanel::slotGetStats( const KURL& url ) {
}
// check for special filesystems;
- QString path = url.path(); // must be local url
+ TQString path = url.path(); // must be local url
if ( path.left(4) == "/dev") {
status->setText(i18n( "No space information on [dev]" ));
return;
@@ -739,11 +739,11 @@ void ListPanel::slotGetStats( const KURL& url ) {
status->setText( i18n( "Mt.Man: working ..." ) );
statsAgent = KDiskFreeSp::findUsageInfo( path );
- connect( statsAgent, SIGNAL( foundMountPoint( const QString &, unsigned long, unsigned long, unsigned long ) ),
- this, SLOT( gotStats( const QString &, unsigned long, unsigned long, unsigned long ) ) );
+ connect( statsAgent, TQT_SIGNAL( foundMountPoint( const TQString &, unsigned long, unsigned long, unsigned long ) ),
+ this, TQT_SLOT( gotStats( const TQString &, unsigned long, unsigned long, unsigned long ) ) );
}
-void ListPanel::gotStats( const QString &mountPoint, unsigned long kBSize,
+void ListPanel::gotStats( const TQString &mountPoint, unsigned long kBSize,
unsigned long, unsigned long kBAvail ) {
int perc = 0;
if (kBSize != 0) { // make sure that if totalsize==0, then perc=0
@@ -751,7 +751,7 @@ void ListPanel::gotStats( const QString &mountPoint, unsigned long kBSize,
}
// mount point information - find it in the list first
KMountPoint::List lst = KMountPoint::currentMountPoints();
- QString fstype = i18n("unknown");
+ TQString fstype = i18n("unknown");
for (KMountPoint::List::iterator it = lst.begin(); it != lst.end(); ++it) {
if ((*it)->mountPoint() == mountPoint) {
fstype = (*it)->mountType();
@@ -759,22 +759,22 @@ void ListPanel::gotStats( const QString &mountPoint, unsigned long kBSize,
}
}
- QString stats = i18n( "%1 free out of %2 (%3%) on %4 [ (%5) ]" )
- .arg( KIO::convertSizeFromKB( kBAvail ) )
- .arg( KIO::convertSizeFromKB( kBSize ) ).arg( perc )
- .arg( mountPoint ).arg( fstype );
+ TQString stats = i18n( "%1 free out of %2 (%3%) on %4 [ (%5) ]" )
+ .tqarg( KIO::convertSizeFromKB( kBAvail ) )
+ .tqarg( KIO::convertSizeFromKB( kBSize ) ).tqarg( perc )
+ .tqarg( mountPoint ).tqarg( fstype );
status->setText( stats );
}
-void ListPanel::handleDropOnTotals( QDropEvent *e ) {
+void ListPanel::handleDropOnTotals( TQDropEvent *e ) {
handleDropOnView( e, totals );
}
-void ListPanel::handleDropOnStatus( QDropEvent *e ) {
+void ListPanel::handleDropOntqStatus( TQDropEvent *e ) {
handleDropOnView( e, status );
}
-void ListPanel::handleDropOnView( QDropEvent *e, QWidget *widget ) {
+void ListPanel::handleDropOnView( TQDropEvent *e, TQWidget *widget ) {
// if copyToPanel is true, then we call a simple vfs_addfiles
bool copyToDirInPanel = false;
bool dragFromOtherPanel = false;
@@ -842,7 +842,7 @@ void ListPanel::handleDropOnView( QDropEvent *e, QWidget *widget ) {
// the KURL::List is finished, let's go
// --> display the COPY/MOVE/LINK menu
- QPopupMenu popup( this );
+ TQPopupMenu popup( this );
popup.insertItem( i18n( "Copy Here" ), 1 );
if ( func->files() ->vfs_isWritable() )
popup.insertItem( i18n( "Move Here" ), 2 );
@@ -850,7 +850,7 @@ void ListPanel::handleDropOnView( QDropEvent *e, QWidget *widget ) {
isLocal )
popup.insertItem( i18n( "Link Here" ), 3 );
popup.insertItem( i18n( "Cancel" ), 4 );
- QPoint tmp = widget->mapToGlobal( e->pos() );
+ TQPoint tmp = widget->mapToGlobal( e->pos() );
int result = popup.exec( tmp );
switch ( result ) {
case 1 :
@@ -867,15 +867,15 @@ void ListPanel::handleDropOnView( QDropEvent *e, QWidget *widget ) {
return ; // cancel was pressed;
}
- QString dir = "";
+ TQString dir = "";
if ( copyToDirInPanel ) {
dir = i->name();
}
- QWidget *notify = ( !e->source() ? 0 : e->source() );
- tempFiles->vfs_addFiles( &URLs, mode, notify, dir );
+ TQWidget *notify = ( !e->source() ? 0 : e->source() );
+ tempFiles->vfs_addFiles( &URLs, mode, TQT_TQOBJECT(notify), dir );
}
-void ListPanel::startDragging( QStringList names, QPixmap px ) {
+void ListPanel::startDragging( TQStringList names, TQPixmap px ) {
KURL::List * urls = func->files() ->vfs_getFiles( &names );
if ( urls->isEmpty() ) { // avoid draging empty urls
@@ -884,20 +884,20 @@ void ListPanel::startDragging( QStringList names, QPixmap px ) {
}
KURLDrag *d = new KURLDrag(*urls, this);
- d->setPixmap( px, QPoint( -7, 0 ) );
+ d->setPixmap( px, TQPoint( -7, 0 ) );
d->dragCopy();
delete urls; // free memory
}
// pops a right-click menu for items
-void ListPanel::popRightClickMenu( const QPoint &loc ) {
+void ListPanel::popRightClickMenu( const TQPoint &loc ) {
// run it, on the mouse location
- int j = QFontMetrics( font() ).height() * 2;
- KrPopupMenu::run(QPoint( loc.x() + 5, loc.y() + j ), this);
+ int j = TQFontMetrics( font() ).height() * 2;
+ KrPopupMenu::run(TQPoint( loc.x() + 5, loc.y() + j ), this);
}
-void ListPanel::popEmptyRightClickMenu( const QPoint &loc ) {
+void ListPanel::popEmptyRightClickMenu( const TQPoint &loc ) {
KrPopupMenu::run(loc, this);
}
@@ -917,23 +917,23 @@ void ListPanel::setFilter( KrViewProperties::FilterSpec f ) {
return ;
}
view->setFilter( f ); // do that in any case
- func->files()->vfs_invalidate();
+ func->files()->vfs_tqinvalidate();
func->refresh();
}
-QString ListPanel::getCurrentName() {
- QString name = view->getCurrentItem();
+TQString ListPanel::getCurrentName() {
+ TQString name = view->getCurrentItem();
if ( name != ".." )
return name;
else
- return QString::null;
+ return TQString();
}
void ListPanel::prepareToDelete() {
view->setNameToMakeCurrent( view->firstUnmarkedBelowCurrent() );
}
-void ListPanel::keyPressEvent( QKeyEvent *e ) {
+void ListPanel::keyPressEvent( TQKeyEvent *e ) {
switch ( e->key() ) {
case Key_Enter :
case Key_Return :
@@ -996,7 +996,7 @@ void ListPanel::keyPressEvent( QKeyEvent *e ) {
default:
// if we got this, it means that the view is not doing
// the quick search thing, so send the characters to the commandline, if normal key
- if ( e->state() == NoButton )
+ if ( e->state() == Qt::NoButton )
MAIN_VIEW->cmdLine->addText( e->text() );
//e->ignore();
@@ -1007,7 +1007,7 @@ void ListPanel::slotItemAdded(vfile *vf) {
view->addItem(vf);
}
-void ListPanel::slotItemDeleted(const QString& name) {
+void ListPanel::slotItemDeleted(const TQString& name) {
view->delItem(name);
}
@@ -1019,14 +1019,14 @@ void ListPanel::slotCleared() {
view->clear();
}
-void ListPanel::showEvent( QShowEvent *e ) {
+void ListPanel::showEvent( TQShowEvent *e ) {
panelActive();
- QWidget::showEvent(e);
+ TQWidget::showEvent(e);
}
-void ListPanel::hideEvent( QHideEvent *e ) {
+void ListPanel::hideEvent( TQHideEvent *e ) {
panelInactive();
- QWidget::hideEvent(e);
+ TQWidget::hideEvent(e);
}
void ListPanel::panelActive() {
@@ -1054,14 +1054,14 @@ void ListPanel::slotJobStarted(KIO::Job* job) {
syncBrowseButton->setEnabled(false);
// connect to the job interface to provide in-panel refresh notification
- connect( job, SIGNAL( infoMessage( KIO::Job*, const QString & ) ),
- SLOT( inlineRefreshInfoMessage( KIO::Job*, const QString & ) ) );
- connect( job, SIGNAL( percent( KIO::Job*, unsigned long ) ),
- SLOT( inlineRefreshPercent( KIO::Job*, unsigned long ) ) );
- connect(job,SIGNAL(result(KIO::Job*)),
- this,SLOT(inlineRefreshListResult(KIO::Job*)));
- connect(job,SIGNAL(canceled(KIO::Job*)),
- this,SLOT(inlineRefreshListResult(KIO::Job*)));
+ connect( job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString & ) ),
+ TQT_SLOT( inlineRefreshInfoMessage( KIO::Job*, const TQString & ) ) );
+ connect( job, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
+ TQT_SLOT( inlineRefreshPercent( KIO::Job*, unsigned long ) ) );
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),
+ this,TQT_SLOT(inlineRefreshListResult(KIO::Job*)));
+ connect(job,TQT_SIGNAL(canceled(KIO::Job*)),
+ this,TQT_SLOT(inlineRefreshListResult(KIO::Job*)));
inlineRefreshJob = job;
@@ -1077,11 +1077,11 @@ void ListPanel::inlineRefreshCancel() {
}
void ListPanel::inlineRefreshPercent( KIO::Job*, unsigned long perc) {
- QString msg = QString(">> %1: %2 % complete...").arg(i18n("Reading")).arg(perc);
+ TQString msg = TQString(">> %1: %2 % complete...").tqarg(i18n("Reading")).tqarg(perc);
totals->setText(msg);
}
-void ListPanel::inlineRefreshInfoMessage( KIO::Job*, const QString &msg ) {
+void ListPanel::inlineRefreshInfoMessage( KIO::Job*, const TQString &msg ) {
totals->setText(">> " + i18n("Reading: ") + msg);
}
diff --git a/krusader/Panel/listpanel.h b/krusader/Panel/listpanel.h
index 088fdfd..763074b 100644
--- a/krusader/Panel/listpanel.h
+++ b/krusader/Panel/listpanel.h
@@ -36,21 +36,21 @@
#include <kpropsdlg.h>
#include <kfileitem.h>
#include <kurl.h>
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qtoolbutton.h>
-#include <qpopupmenu.h>
-#include <qdir.h>
-#include <qpixmapcache.h>
-#include <qiconset.h>
-#include <qptrstack.h>
-#include <qtextbrowser.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqtoolbutton.h>
+#include <tqpopupmenu.h>
+#include <tqdir.h>
+#include <tqpixmapcache.h>
+#include <tqiconset.h>
+#include <tqptrstack.h>
+#include <tqtextbrowser.h>
#include <keditcl.h>
#include <klineedit.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include "krview.h"
#include "../Dialogs/krsqueezedtextlabel.h"
@@ -74,26 +74,27 @@ class SyncBrowseButton;
class KrBookmarkButton;
class KPushButton;
class ListPanelFunc;
-class QHeader;
+class TQHeader;
-class ListPanel : public QWidget {
+class ListPanel : public TQWidget {
friend class ListPanelFunc;
Q_OBJECT
+ TQ_OBJECT
public:
#define ITEM2VFILE(PANEL_PTR, KRVIEWITEM) PANEL_PTR->func->files()->vfs_search(KRVIEWITEM->name())
#define NAME2VFILE(PANEL_PTR, STRING_NAME) PANEL_PTR->func->files()->vfs_search(STRING_NAME)
// constructor create the panel, but DOESN'T fill it with data, use start()
- ListPanel( QString panelType, QWidget *parent, bool &left, const char *name = 0 );
+ ListPanel( TQString panelType, TQWidget *tqparent, bool &left, const char *name = 0 );
~ListPanel();
void start( KURL url = KURL(), bool immediate = false );
- const QString & getType() { return panelType; }
- void changeType( const QString & );
+ const TQString & getType() { return panelType; }
+ void changeType( const TQString & );
KURL virtualPath() const;
- QString realPath() const;
- QString getCurrentName();
- void getSelectedNames( QStringList* fileNames ) {
+ TQString realPath() const;
+ TQString getCurrentName();
+ void getSelectedNames( TQStringList* fileNames ) {
view->getSelectedItems( fileNames );
}
void setPanelToolbar();
@@ -105,9 +106,9 @@ public:
void setProperties( int );
public slots:
- void gotStats( const QString &mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail); // displays filesystem status
- void popRightClickMenu( const QPoint& );
- void popEmptyRightClickMenu( const QPoint & );
+ void gotStats( const TQString &mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail); // displays filesystem status
+ void popRightClickMenu( const TQPoint& );
+ void popEmptyRightClickMenu( const TQPoint & );
void select( KRQuery query, bool select);
void select( bool, bool ); // see doc in ListPanel
void invertSelection(); // see doc in ListPanel
@@ -125,7 +126,7 @@ public slots:
void togglePanelPopup();
// for signals from vfs' dirwatch
void slotItemAdded(vfile *vf);
- void slotItemDeleted(const QString& name);
+ void slotItemDeleted(const TQString& name);
void slotItemUpdated(vfile *vf);
void slotCleared();
void panelActive(); // called when the panel becomes active
@@ -139,34 +140,34 @@ public slots:
void prepareToDelete(); // internal use only
protected:
- virtual void keyPressEvent( QKeyEvent *e );
- virtual void showEvent( QShowEvent * );
- virtual void hideEvent( QHideEvent * );
- virtual bool eventFilter ( QObject * watched, QEvent * e );
+ virtual void keyPressEvent( TQKeyEvent *e );
+ virtual void showEvent( TQShowEvent * );
+ virtual void hideEvent( TQHideEvent * );
+ virtual bool eventFilter ( TQObject * watched, TQEvent * e );
void createView();
protected slots:
- void handleDropOnView(QDropEvent *, QWidget *destWidget=0); // handles drops on the view only
- void handleDropOnTotals( QDropEvent * ); // handles drops on the totals line
- void handleDropOnStatus( QDropEvent * ); // handles drops on the status line
- void startDragging( QStringList, QPixmap );
+ void handleDropOnView(TQDropEvent *, TQWidget *destWidget=0); // handles drops on the view only
+ void handleDropOnTotals( TQDropEvent * ); // handles drops on the totals line
+ void handleDropOntqStatus( TQDropEvent * ); // handles drops on the status line
+ void startDragging( TQStringList, TQPixmap );
// those handle the in-panel refresh notifications
void slotJobStarted(KIO::Job* job);
- void inlineRefreshInfoMessage( KIO::Job* job, const QString &msg );
+ void inlineRefreshInfoMessage( KIO::Job* job, const TQString &msg );
void inlineRefreshListResult(KIO::Job* job);
void inlineRefreshPercent( KIO::Job*, unsigned long );
void inlineRefreshCancel();
signals:
- void signalStatus( QString msg ); // emmited when we need to update the status bar
- void cmdLineUpdate( QString p ); // emitted when we need to update the command line
+ void signaltqStatus( TQString msg ); // emmited when we need to update the status bar
+ void cmdLineUpdate( TQString p ); // emitted when we need to update the command line
void pathChanged( ListPanel *panel );
void activePanelChanged( ListPanel *p ); // emitted when the user changes panels
void finishedDragging(); // currently
public:
- QString panelType;
+ TQString panelType;
ListPanelFunc *func;
KrView *view;
ListPanel *otherPanel;
@@ -174,19 +175,19 @@ public:
bool compareMode;
//FilterSpec filter;
KRQuery filterMask;
- QPixmap currDragPix;
- QListViewItem *currDragItem;
+ TQPixmap currDragPix;
+ TQListViewItem *currDragItem;
KDiskFreeSp* statsAgent;
KrSqueezedTextLabel *status, *totals;
KrQuickSearch *quickSearch;
KURLRequester *origin;
- QGridLayout *layout;
- QToolButton *cdRootButton;
- QToolButton *cdHomeButton;
- QToolButton *cdUpButton;
- QToolButton *cdOtherButton;
- QToolButton *popupBtn;
- QToolButton *clearOrigin;
+ TQGridLayout *tqlayout;
+ TQToolButton *cdRootButton;
+ TQToolButton *cdHomeButton;
+ TQToolButton *cdUpButton;
+ TQToolButton *cdOtherButton;
+ TQToolButton *popupBtn;
+ TQToolButton *clearOrigin;
PanelPopup *popup;
KrBookmarkButton *bookmarksButton;
DirHistoryQueue* dirHistoryQueue;
@@ -195,8 +196,8 @@ public:
SyncBrowseButton *syncBrowseButton;
KPushButton *inlineRefreshCancelButton;
KIO::Job *inlineRefreshJob;
- QSplitter *splt;
- QHeader * header;
+ TQSplitter *splt;
+ TQHeader * header;
protected:
KURL _realPath; // named with _ to keep realPath() compatability
@@ -205,7 +206,7 @@ protected:
private:
bool &_left;
- QValueList<int> popupSizes;
+ TQValueList<int> popupSizes;
};
#endif
diff --git a/krusader/Panel/panelfunc.cpp b/krusader/Panel/panelfunc.cpp
index 735a0cf..4871279 100755
--- a/krusader/Panel/panelfunc.cpp
+++ b/krusader/Panel/panelfunc.cpp
@@ -28,11 +28,11 @@ A
* *
***************************************************************************/
#include <unistd.h>
-// Qt Includes
-#include <qdir.h>
-#include <qtextstream.h>
-#include <qeventloop.h>
-#include <qclipboard.h>
+// TQt Includes
+#include <tqdir.h>
+#include <tqtextstream.h>
+#include <tqeventloop.h>
+#include <tqclipboard.h>
// KDE Includes
#include <klocale.h>
#include <kprocess.h>
@@ -84,13 +84,13 @@ A
////// ---------- List Panel ------------- ////////
//////////////////////////////////////////////////////////
-ListPanelFunc::ListPanelFunc( ListPanel *parent ) :
-panel( parent ), inRefresh( false ), vfsP( 0 ) {
+ListPanelFunc::ListPanelFunc( ListPanel *tqparent ) :
+panel( tqparent ), inRefresh( false ), vfsP( 0 ) {
urlStack.push( "file:/" );
- connect( &delayTimer, SIGNAL( timeout() ), this, SLOT( doOpenUrl() ) );
+ connect( &delayTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( doOpenUrl() ) );
}
-void ListPanelFunc::openUrl( const QString& url, const QString& nameToMakeCurrent ) {
+void ListPanelFunc::openUrl( const TQString& url, const TQString& nameToMakeCurrent ) {
openUrl( vfs::fromPathOrURL(
// KURLRequester is buggy: it should return a string containing "/home/shie/downloads"
// but it returns "~/downloads" which is parsed incorrectly by vfs::fromPathOrURL.
@@ -107,7 +107,7 @@ void ListPanelFunc::immediateOpenUrl( const KURL& urlIn ) {
// you may call openUrl or vfs_refresh()
if ( !url.isValid() ) {
if ( url.url() == "~" ) {
- return openUrl( QDir::homeDirPath() );
+ return openUrl( TQDir::homeDirPath() );
} else if ( !url.url().startsWith( "/" ) ) {
// possible relative URL - translate to full URL
url = files() ->vfs_getOrigin();
@@ -148,14 +148,14 @@ void ListPanelFunc::immediateOpenUrl( const KURL& urlIn ) {
KURL u = urlStack.pop();
//u.adjustPath(-1); // remove trailing "/"
u.cleanPath(); // Resolves "." and ".." components in path.
- v = KrVfsHandler::getVfs( u, panel, files() );
+ v = KrVfsHandler::getVfs( u, TQT_TQOBJECT(panel), files() );
if ( !v )
continue; //this should not happen !
if ( v != vfsP ) {
if( vfsP->vfs_canDelete() )
delete vfsP;
else {
- connect( vfsP, SIGNAL( deleteAllowed() ), vfsP, SLOT( deleteLater() ) );
+ connect( vfsP, TQT_SIGNAL( deleteAllowed() ), vfsP, TQT_SLOT( deleteLater() ) );
vfsP->vfs_requestDelete();
}
vfsP = v; // v != 0 so this is safe
@@ -167,8 +167,8 @@ void ListPanelFunc::immediateOpenUrl( const KURL& urlIn ) {
return;
}
}
- connect( files(), SIGNAL(startJob(KIO::Job* )),
- panel, SLOT(slotJobStarted(KIO::Job* )));
+ connect( files(), TQT_SIGNAL(startJob(KIO::Job* )),
+ panel, TQT_SLOT(slotJobStarted(KIO::Job* )));
if ( vfsP->vfs_refresh( u ) ) {
break; // we have a valid refreshed URL now
}
@@ -191,19 +191,19 @@ void ListPanelFunc::immediateOpenUrl( const KURL& urlIn ) {
urlStack.push( files() ->vfs_getOrigin() );
}
// disconnect older signals
- disconnect( files(), SIGNAL( addedVfile( vfile* ) ), 0, 0 );
- disconnect( files(), SIGNAL( updatedVfile( vfile* ) ), 0, 0 );
- disconnect( files(), SIGNAL( deletedVfile( const QString& ) ), 0, 0 );
- disconnect( files(), SIGNAL( cleared() ), 0, 0 );
+ disconnect( files(), TQT_SIGNAL( addedVfile( vfile* ) ), 0, 0 );
+ disconnect( files(), TQT_SIGNAL( updatedVfile( vfile* ) ), 0, 0 );
+ disconnect( files(), TQT_SIGNAL( deletedVfile( const TQString& ) ), 0, 0 );
+ disconnect( files(), TQT_SIGNAL( cleared() ), 0, 0 );
// connect to the vfs's dirwatch signals
- connect( files(), SIGNAL( addedVfile( vfile* ) ),
- panel, SLOT( slotItemAdded( vfile* ) ) );
- connect( files(), SIGNAL( updatedVfile( vfile* ) ),
- panel, SLOT( slotItemUpdated( vfile* ) ) );
- connect( files(), SIGNAL( deletedVfile( const QString& ) ),
- panel, SLOT( slotItemDeleted( const QString& ) ) );
- connect( files(), SIGNAL( cleared() ),
- panel, SLOT( slotCleared() ) );
+ connect( files(), TQT_SIGNAL( addedVfile( vfile* ) ),
+ panel, TQT_SLOT( slotItemAdded( vfile* ) ) );
+ connect( files(), TQT_SIGNAL( updatedVfile( vfile* ) ),
+ panel, TQT_SLOT( slotItemUpdated( vfile* ) ) );
+ connect( files(), TQT_SIGNAL( deletedVfile( const TQString& ) ),
+ panel, TQT_SLOT( slotItemDeleted( const TQString& ) ) );
+ connect( files(), TQT_SIGNAL( cleared() ),
+ panel, TQT_SLOT( slotCleared() ) );
// on local file system change the working directory
if ( files() ->vfs_getType() == vfs::NORMAL )
@@ -217,7 +217,7 @@ void ListPanelFunc::immediateOpenUrl( const KURL& urlIn ) {
}
}
-void ListPanelFunc::openUrl( const KURL& url, const QString& nameToMakeCurrent ) {
+void ListPanelFunc::openUrl( const KURL& url, const TQString& nameToMakeCurrent ) {
panel->inlineRefreshCancel();
// first the other dir, then the active! Else the focus changes and the other becomes active
if ( panel->syncBrowseButton->state() == SYNCBROWSE_CD ) {
@@ -242,7 +242,7 @@ void ListPanelFunc::openUrl( const KURL& url, const QString& nameToMakeCurrent )
}
this->nameToMakeCurrent = nameToMakeCurrent;
delayURL = url; /* this function is useful for FTP url-s and bookmarks */
- delayTimer.start( 0, true ); /* to avoid qApp->processEvents() deadlock situaltion */
+ delayTimer.start( 0, true ); /* to avoid tqApp->processEvents() deadlock situaltion */
}
void ListPanelFunc::refresh() {
@@ -275,8 +275,8 @@ void ListPanelFunc::redirectLink() {
if ( !vf )
return ;
- QString file = files() ->vfs_getFile( vf->vfile_getName() ).path( -1 );
- QString currentLink = vf->vfile_getSymDest();
+ TQString file = files() ->vfs_getFile( vf->vfile_getName() ).path( -1 );
+ TQString currentLink = vf->vfile_getSymDest();
if ( currentLink.isEmpty() ) {
KMessageBox::sorry( krApp, i18n( "The current file is not a link, so I can't redirect it." ) );
return ;
@@ -284,7 +284,7 @@ void ListPanelFunc::redirectLink() {
// ask the user for a new destination
bool ok = false;
- QString newLink =
+ TQString newLink =
KInputDialog::getText( i18n( "Link Redirection" ),
i18n( "Please enter the new link destination:" ), currentLink, &ok, krApp );
@@ -309,11 +309,11 @@ void ListPanelFunc::krlink( bool sym ) {
return ;
}
- QString name = panel->getCurrentName();
+ TQString name = panel->getCurrentName();
// ask the new link name..
bool ok = false;
- QString linkName =
+ TQString linkName =
KInputDialog::getText( i18n( "New link" ), i18n( "Create a new link to: " ) + name, name, &ok, krApp );
// if the user canceled - quit
@@ -329,7 +329,7 @@ void ListPanelFunc::krlink( bool sym ) {
if ( linkName.left( 1 ) != "/" )
linkName = files() ->vfs_workingDir() + "/" + linkName;
- if ( linkName.contains( "/" ) )
+ if ( linkName.tqcontains( "/" ) )
name = files() ->vfs_getFile( name ).path( -1 );
if ( sym ) {
@@ -344,7 +344,7 @@ void ListPanelFunc::krlink( bool sym ) {
}
void ListPanelFunc::view() {
- QString fileName = panel->getCurrentName();
+ TQString fileName = panel->getCurrentName();
if ( fileName.isNull() )
return ;
@@ -362,28 +362,28 @@ void ListPanelFunc::view() {
}
void ListPanelFunc::terminal() {
- QString save = getcwd( 0, 0 );
+ TQString save = getcwd( 0, 0 );
chdir( panel->realPath().local8Bit() );
KProcess proc;
krConfig->setGroup( "General" );
- QString term = krConfig->readEntry( "Terminal", _Terminal );
+ TQString term = krConfig->readEntry( "Terminal", _Terminal );
proc << KrServices::separateArgs( term );
- if ( term.contains( "konsole" ) ) /* KDE 3.2 bug (konsole is killed by pressing Ctrl+C) */
+ if ( term.tqcontains( "konsole" ) ) /* KDE 3.2 bug (konsole is killed by pressing Ctrl+C) */
{ /* Please remove the patch if the bug is corrected */
proc << "&";
proc.setUseShell( true );
}
if ( !proc.start( KProcess::DontCare ) )
- KMessageBox::sorry( krApp, i18n( "<qt>Can't open <b>%1</b></qt>" ).arg(term) );
+ KMessageBox::sorry( krApp, i18n( "<qt>Can't open <b>%1</b></qt>" ).tqarg(term) );
chdir( save.local8Bit() );
}
void ListPanelFunc::editFile() {
- QString name = panel->getCurrentName();
+ TQString name = panel->getCurrentName();
if ( name.isNull() )
return ;
@@ -403,7 +403,7 @@ void ListPanelFunc::editFile() {
void ListPanelFunc::moveFiles() {
PreserveMode pmode = PM_DEFAULT;
- QStringList fileNames;
+ TQStringList fileNames;
panel->getSelectedNames( &fileNames );
if ( fileNames.isEmpty() )
return ; // safety
@@ -411,7 +411,7 @@ void ListPanelFunc::moveFiles() {
KURL dest = panel->otherPanel->virtualPath();
KURL virtualBaseURL;
- QString destProtocol = dest.protocol();
+ TQString destProtocol = dest.protocol();
if ( destProtocol == "krarc" || destProtocol == "tar" || destProtocol == "zip" ) {
KMessageBox::sorry( krApp, i18n( "Moving into archive is disabled" ) );
return ;
@@ -420,10 +420,10 @@ void ListPanelFunc::moveFiles() {
krConfig->setGroup( "Advanced" );
if ( krConfig->readBoolEntry( "Confirm Move", _ConfirmMove ) ) {
bool preserveAttrs = krConfig->readBoolEntry( "PreserveAttributes", _PreserveAttributes );
- QString s;
+ TQString s;
if( fileNames.count() == 1 )
- s = i18n("Move %1 to:").arg(fileNames.first());
+ s = i18n("Move %1 to:").tqarg(fileNames.first());
else
s = i18n("Move %n file to:", "Move %n files to:", fileNames.count());
@@ -449,9 +449,9 @@ void ListPanelFunc::moveFiles() {
if( !virtualBaseURL.isEmpty() ) {
// keep the directory structure for virtual paths
VirtualCopyJob *vjob = new VirtualCopyJob( &fileNames, files(), dest, virtualBaseURL, pmode, KIO::CopyJob::Move, false, true );
- connect( vjob, SIGNAL( result( KIO::Job* ) ), this, SLOT( refresh() ) );
+ connect( vjob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( refresh() ) );
if ( dest.equals( panel->otherPanel->virtualPath(), true ) )
- connect( vjob, SIGNAL( result( KIO::Job* ) ), panel->otherPanel->func, SLOT( refresh() ) );
+ connect( vjob, TQT_SIGNAL( result( KIO::Job* ) ), panel->otherPanel->func, TQT_SLOT( refresh() ) );
}
// if we are not moving to the other panel :
else if ( !dest.equals( panel->otherPanel->virtualPath(), true ) ) {
@@ -461,10 +461,10 @@ void ListPanelFunc::moveFiles() {
KIO::Job* job = PreservingCopyJob::createCopyJob( pmode, *fileUrls, dest, KIO::CopyJob::Move, false, true );
job->setAutoErrorHandlingEnabled( true );
// refresh our panel when done
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( refresh() ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( refresh() ) );
// and if needed the other panel as well
if ( dest.equals( panel->otherPanel->virtualPath(), true ) )
- connect( job, SIGNAL( result( KIO::Job* ) ), panel->otherPanel->func, SLOT( refresh() ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), panel->otherPanel->func, TQT_SLOT( refresh() ) );
} else { // let the other panel do the dirty job
//check if copy is supported
@@ -483,7 +483,7 @@ void ListPanelFunc::rename() {
}
// called by signal itemRenamed() from the view to complete the renaming process
-void ListPanelFunc::rename( const QString &oldname, const QString &newname ) {
+void ListPanelFunc::rename( const TQString &oldname, const TQString &newname ) {
if ( oldname == newname )
return ; // do nothing
panel->view->setNameToMakeCurrentIfAdded( newname );
@@ -494,16 +494,16 @@ void ListPanelFunc::rename( const QString &oldname, const QString &newname ) {
void ListPanelFunc::mkdir() {
// ask the new dir name..
bool ok = false;
- QString dirName =
+ TQString dirName =
KInputDialog::getText( i18n( "New directory" ), i18n( "Directory's name:" ), "", &ok, krApp );
// if the user canceled - quit
if ( !ok || dirName.isEmpty() )
return ;
- QStringList dirTree = QStringList::split( "/", dirName );
+ TQStringList dirTree = TQStringList::split( "/", dirName );
- for ( QStringList::Iterator it = dirTree.begin(); it != dirTree.end(); ++it ) {
+ for ( TQStringList::Iterator it = dirTree.begin(); it != dirTree.end(); ++it ) {
// check if the name is already taken
if ( files() ->vfs_search( *it ) ) {
// if it is the last dir to be created - quit
@@ -530,7 +530,7 @@ KURL ListPanelFunc::getVirtualBaseURL() {
if( files()->vfs_getType() != vfs::VIRT || otherFunc()->files()->vfs_getType() == vfs::VIRT )
return KURL();
- QStringList fileNames;
+ TQStringList fileNames;
panel->getSelectedNames( &fileNames );
KURL::List* fileUrls = files() ->vfs_getFiles( &fileNames );
@@ -563,7 +563,7 @@ KURL ListPanelFunc::getVirtualBaseURL() {
void ListPanelFunc::copyFiles() {
PreserveMode pmode = PM_DEFAULT;
- QStringList fileNames;
+ TQStringList fileNames;
panel->getSelectedNames( &fileNames );
if ( fileNames.isEmpty() )
return ; // safety
@@ -575,10 +575,10 @@ void ListPanelFunc::copyFiles() {
krConfig->setGroup( "Advanced" );
if ( krConfig->readBoolEntry( "Confirm Copy", _ConfirmCopy ) ) {
bool preserveAttrs = krConfig->readBoolEntry( "PreserveAttributes", _PreserveAttributes );
- QString s;
+ TQString s;
if( fileNames.count() == 1 )
- s = i18n("Copy %1 to:").arg(fileNames.first());
+ s = i18n("Copy %1 to:").tqarg(fileNames.first());
else
s = i18n("Copy %n file to:", "Copy %n files to:", fileNames.count());
@@ -597,9 +597,9 @@ void ListPanelFunc::copyFiles() {
if( !virtualBaseURL.isEmpty() ) {
// keep the directory structure for virtual paths
VirtualCopyJob *vjob = new VirtualCopyJob( &fileNames, files(), dest, virtualBaseURL, pmode, KIO::CopyJob::Copy, false, true );
- connect( vjob, SIGNAL( result( KIO::Job* ) ), this, SLOT( refresh() ) );
+ connect( vjob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( refresh() ) );
if ( dest.equals( panel->otherPanel->virtualPath(), true ) )
- connect( vjob, SIGNAL( result( KIO::Job* ) ), panel->otherPanel->func, SLOT( refresh() ) );
+ connect( vjob, TQT_SIGNAL( result( KIO::Job* ) ), panel->otherPanel->func, TQT_SLOT( refresh() ) );
}
// if we are not copying to the other panel :
else if ( !dest.equals( panel->otherPanel->virtualPath(), true ) ) {
@@ -611,7 +611,7 @@ void ListPanelFunc::copyFiles() {
if ( dest.equals( panel->virtualPath(), true ) ||
dest.upURL().equals( panel->virtualPath(), true ) )
// refresh our panel when done
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( refresh() ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( refresh() ) );
// let the other panel do the dirty job
} else {
//check if copy is supported
@@ -632,7 +632,7 @@ void ListPanelFunc::deleteFiles(bool reallyDelete) {
}
// first get the selected file names list
- QStringList fileNames;
+ TQStringList fileNames;
panel->getSelectedNames( &fileNames );
if ( fileNames.isEmpty() )
return ;
@@ -642,7 +642,7 @@ void ListPanelFunc::deleteFiles(bool reallyDelete) {
// now ask the user if he want to delete:
krConfig->setGroup( "Advanced" );
if ( krConfig->readBoolEntry( "Confirm Delete", _ConfirmDelete ) ) {
- QString s, b;
+ TQString s, b;
if ( !reallyDelete && trash && files() ->vfs_getType() == vfs::NORMAL ) {
s = i18n( "Do you really want to move this item to the trash?", "Do you really want to move these %n items to the trash?", fileNames.count() );
@@ -670,17 +670,17 @@ void ListPanelFunc::deleteFiles(bool reallyDelete) {
bool emptyDirVerify = krConfig->readBoolEntry( "Confirm Unempty Dir", _ConfirmUnemptyDir );
emptyDirVerify = ( ( emptyDirVerify ) && ( files() ->vfs_getType() == vfs::NORMAL ) );
- QDir dir;
- for ( QStringList::Iterator name = fileNames.begin(); name != fileNames.end(); ) {
+ TQDir dir;
+ for ( TQStringList::Iterator name = fileNames.begin(); name != fileNames.end(); ) {
vfile * vf = files() ->vfs_search( *name );
// verify non-empty dirs delete... (only for normal vfs)
if ( emptyDirVerify && vf->vfile_isDir() && !vf->vfile_isSymLink() ) {
dir.setPath( panel->virtualPath().path() + "/" + ( *name ) );
- if ( dir.entryList(QDir::All | QDir::System | QDir::Hidden ).count() > 2 ) {
+ if ( dir.entryList(TQDir::All | TQDir::System | TQDir::Hidden ).count() > 2 ) {
switch ( KMessageBox::warningYesNoCancel( krApp,
- i18n( "<qt><p>Directory <b>%1</b> is not empty!</p><p>Skip this one or Delete All?</p></qt>" ).arg(*name),
- QString::null, i18n( "&Skip" ), i18n( "&Delete All" ) ) ) {
+ i18n( "<qt><p>Directory <b>%1</b> is not empty!</p><p>Skip this one or Delete All?</p></qt>" ).tqarg(*name),
+ TQString(), i18n( "&Skip" ), i18n( "&Delete All" ) ) ) {
case KMessageBox::Cancel :
return ;
case KMessageBox::No :
@@ -716,7 +716,7 @@ void ListPanelFunc::deleteFiles(bool reallyDelete) {
}
// this is done when you double click on a file
-void ListPanelFunc::execute( QString& name ) {
+void ListPanelFunc::execute( TQString& name ) {
if ( name == ".." ) {
dirUp();
return ;
@@ -728,18 +728,18 @@ void ListPanelFunc::execute( QString& name ) {
KURL origin = files() ->vfs_getOrigin();
- QString protocol = origin.isLocalFile() ? KrServices::registerdProtocol( vf->vfile_getMime() ) : "";
+ TQString protocol = origin.isLocalFile() ? KrServices::registerdProtocol( vf->vfile_getMime() ) : "";
if ( protocol == "tar" || protocol == "krarc" ) {
bool encrypted;
- QString type = KRarcHandler::getType( encrypted, vf->vfile_getUrl().path(), vf->vfile_getMime(), false );
+ TQString type = KRarcHandler::getType( encrypted, vf->vfile_getUrl().path(), vf->vfile_getMime(), false );
if ( !KRarcHandler::arcHandled( type ) ) // if the specified archive is disabled delete the protocol
protocol = "";
}
if ( vf->vfile_isDir() ) {
origin = files() ->vfs_getFile( name );
- panel->view->setNameToMakeCurrent( QString::null );
+ panel->view->setNameToMakeCurrent( TQString() );
openUrl( origin );
} else if ( !protocol.isEmpty() ) {
KURL path = files() ->vfs_getFile( vf->vfile_getName() );
@@ -757,7 +757,7 @@ void ListPanelFunc::dirUp() {
}
void ListPanelFunc::pack() {
- QStringList fileNames;
+ TQStringList fileNames;
panel->getSelectedNames( &fileNames );
if ( fileNames.isEmpty() )
return ; // safety
@@ -766,22 +766,22 @@ void ListPanelFunc::pack() {
return ; // nothing to pack
// choose the default name
- QString defaultName = panel->virtualPath().fileName();
+ TQString defaultName = panel->virtualPath().fileName();
if ( defaultName == "" )
defaultName = "pack";
if ( fileNames.count() == 1 )
defaultName = fileNames.first();
// ask the user for archive name and packer
new PackGUI( defaultName, vfs::pathOrURL( panel->otherPanel->virtualPath(), -1 ), fileNames.count(), fileNames.first() );
- if ( PackGUI::type == QString::null )
+ if ( PackGUI::type == TQString() )
return ; // the user canceled
// check for partial URLs
- if( !PackGUI::destination.contains(":/") && !PackGUI::destination.startsWith("/") ){
+ if( !PackGUI::destination.tqcontains(":/") && !PackGUI::destination.startsWith("/") ){
PackGUI::destination = panel->virtualPath().prettyURL()+"/"+PackGUI::destination;
}
- QString destDir = PackGUI::destination;
+ TQString destDir = PackGUI::destination;
if( !destDir.endsWith( "/" ) )
destDir += "/";
@@ -790,7 +790,7 @@ void ListPanelFunc::pack() {
// on remote URL-s first pack into a temp file then copy to its right place
KURL destURL = vfs::fromPathOrURL( destDir + PackGUI::filename + "." + PackGUI::type );
KTempFile *tempDestFile = 0;
- QString arcFile;
+ TQString arcFile;
if ( destURL.isLocalFile() )
arcFile = destURL.path();
else if( destURL.protocol() == "virt" ) {
@@ -798,19 +798,19 @@ void ListPanelFunc::pack() {
return;
}
else {
- tempDestFile = new KTempFile( QString::null, "." + PackGUI::type );
+ tempDestFile = new KTempFile( TQString(), "." + PackGUI::type );
tempDestFile->setAutoDelete( true );
arcFile = tempDestFile->name();
- QFile::remove
+ TQFile::remove
( arcFile );
}
- if ( QFileInfo( arcFile ).exists() ) {
- QString msg = i18n( "<qt><p>The archive <b>%1.%2</b> already exists. Do you want to overwrite it?</p><p>All data in the previous archive will be lost!</p></qt>").arg(PackGUI::filename).arg(PackGUI::type);
+ if ( TQFileInfo( arcFile ).exists() ) {
+ TQString msg = i18n( "<qt><p>The archive <b>%1.%2</b> already exists. Do you want to overwrite it?</p><p>All data in the previous archive will be lost!</p></qt>").tqarg(PackGUI::filename).tqarg(PackGUI::type);
if( PackGUI::type == "zip" ) {
- msg = i18n( "<qt><p>The archive <b>%1.%2</b> already exists. Do you want to overwrite it?</p><p>Zip will replace identically named entries in the zip archive or add entries for new names.</p></qt>").arg(PackGUI::filename).arg(PackGUI::type);
+ msg = i18n( "<qt><p>The archive <b>%1.%2</b> already exists. Do you want to overwrite it?</p><p>Zip will replace identically named entries in the zip archive or add entries for new names.</p></qt>").tqarg(PackGUI::filename).tqarg(PackGUI::type);
}
- if ( KMessageBox::warningContinueCancel( krApp,msg,QString::null,i18n( "&Overwrite" ))
+ if ( KMessageBox::warningContinueCancel( krApp,msg,TQString(),i18n( "&Overwrite" ))
== KMessageBox::Cancel )
return ; // stop operation
}
@@ -826,7 +826,7 @@ void ListPanelFunc::pack() {
return;
// download remote URL-s if necessary
- QString arcDir;
+ TQString arcDir;
KTempDir *tempDir = 0;
if ( files() ->vfs_getOrigin().isLocalFile() )
@@ -842,7 +842,7 @@ void ListPanelFunc::pack() {
// pack the files
// we must chdir() first because we supply *names* not URL's
- QString save = getcwd( 0, 0 );
+ TQString save = getcwd( 0, 0 );
chdir( arcDir.local8Bit() );
KRarcHandler::pack( fileNames, PackGUI::type, arcFile, totalFiles + totalDirs, PackGUI::extraProps );
chdir( save.local8Bit() );
@@ -862,18 +862,18 @@ void ListPanelFunc::pack() {
}
void ListPanelFunc::testArchive() {
- QString arcName = panel->getCurrentName();
+ TQString arcName = panel->getCurrentName();
if ( arcName.isNull() )
return ;
if ( arcName == ".." )
return ; // safety
KURL arcURL = files() ->vfs_getFile( arcName );
- QString url = QString::null;
+ TQString url = TQString();
// download the file if it's on a remote filesystem
if ( !arcURL.isLocalFile() ) {
- url = locateLocal( "tmp", QString( arcName ) );
+ url = locateLocal( "tmp", TQString( arcName ) );
if ( !KIO::NetAccess::download( arcURL, url, 0 ) ) {
KMessageBox::sorry( krApp, i18n( "Krusader is unable to download: " ) + arcURL.fileName() );
return ;
@@ -881,39 +881,39 @@ void ListPanelFunc::testArchive() {
} else
url = arcURL.path( -1 );
- QString mime = files() ->vfs_search( arcName ) ->vfile_getMime();
+ TQString mime = files() ->vfs_search( arcName ) ->vfile_getMime();
bool encrypted = false;
- QString type = KRarcHandler::getType( encrypted, url, mime );
+ TQString type = KRarcHandler::getType( encrypted, url, mime );
// check we that archive is supported
if ( !KRarcHandler::arcSupported( type ) ) {
- KMessageBox::sorry( krApp, i18n( "%1, unknown archive type." ).arg( arcName ) );
+ KMessageBox::sorry( krApp, i18n( "%1, unknown archive type." ).tqarg( arcName ) );
return ;
}
- QString password = encrypted ? KRarcHandler::getPassword( url ) : QString::null;
+ TQString password = encrypted ? KRarcHandler::getPassword( url ) : TQString();
// test the archive
if ( KRarcHandler::test( url, type, password ) )
- KMessageBox::information( krApp, i18n( "%1, test passed." ).arg( arcName ) );
+ KMessageBox::information( krApp, i18n( "%1, test passed." ).tqarg( arcName ) );
else
- KMessageBox::error( krApp, i18n( "%1, test failed!" ).arg( arcName ) );
+ KMessageBox::error( krApp, i18n( "%1, test failed!" ).tqarg( arcName ) );
// remove the downloaded file if necessary
if ( url != arcURL.path( -1 ) )
- QFile( url ).remove();
+ TQFile( url ).remove();
}
void ListPanelFunc::unpack() {
- QStringList fileNames;
+ TQStringList fileNames;
panel->getSelectedNames( &fileNames );
if ( fileNames.isEmpty() )
return ; // safety
- QString s;
+ TQString s;
if(fileNames.count() == 1)
- s = i18n("Unpack %1 to:").arg(fileNames[0]);
+ s = i18n("Unpack %1 to:").tqarg(fileNames[0]);
else
s = i18n("Unpack %n file to:", "Unpack %n files to:", fileNames.count());
@@ -924,7 +924,7 @@ void ListPanelFunc::unpack() {
bool packToOtherPanel = ( dest.equals( panel->otherPanel->virtualPath(), true ) );
for ( unsigned int i = 0; i < fileNames.count(); ++i ) {
- QString arcName = fileNames[ i ];
+ TQString arcName = fileNames[ i ];
if ( arcName.isNull() )
return ;
if ( arcName == ".." )
@@ -932,9 +932,9 @@ void ListPanelFunc::unpack() {
// download the file if it's on a remote filesystem
KURL arcURL = files() ->vfs_getFile( arcName );
- QString url = QString::null;
+ TQString url = TQString();
if ( !arcURL.isLocalFile() ) {
- url = locateLocal( "tmp", QString( arcName ) );
+ url = locateLocal( "tmp", TQString( arcName ) );
if ( !KIO::NetAccess::download( arcURL, url, 0 ) ) {
KMessageBox::sorry( krApp, i18n( "Krusader is unable to download: " ) + arcURL.fileName() );
continue;
@@ -955,28 +955,28 @@ void ListPanelFunc::unpack() {
}
// determining the type
- QString mime = files() ->vfs_search( arcName ) ->vfile_getMime();
+ TQString mime = files() ->vfs_search( arcName ) ->vfile_getMime();
bool encrypted = false;
- QString type = KRarcHandler::getType( encrypted, url, mime );
+ TQString type = KRarcHandler::getType( encrypted, url, mime );
// check we that archive is supported
if ( !KRarcHandler::arcSupported( type ) ) {
- KMessageBox::sorry( krApp, i18n( "%1, unknown archive type" ).arg( arcName ) );
+ KMessageBox::sorry( krApp, i18n( "%1, unknown archive type" ).tqarg( arcName ) );
continue;
}
- QString password = encrypted ? KRarcHandler::getPassword( url ) : QString::null;
+ TQString password = encrypted ? KRarcHandler::getPassword( url ) : TQString();
// unpack the files
KRarcHandler::unpack( url, type, password, dest.path( -1 ) );
// remove the downloaded file if necessary
if ( url != arcURL.path( -1 ) )
- QFile( url ).remove();
+ TQFile( url ).remove();
// copy files to the destination directory at remote files
if ( tempDir ) {
- QStringList nameList = QDir( dest.path( -1 ) ).entryList();
+ TQStringList nameList = TQDir( dest.path( -1 ) ).entryList();
KURL::List urlList;
for ( unsigned int i = 0; i != nameList.count(); i++ )
if ( nameList[ i ] != "." && nameList[ i ] != ".." )
@@ -992,7 +992,7 @@ void ListPanelFunc::unpack() {
// a small ugly function, used to prevent duplication of EVERY line of
// code (maybe except 3) from createChecksum and matchChecksum
-static void checksum_wrapper(ListPanel *panel, QStringList& args, bool &folders) {
+static void checksum_wrapper(ListPanel *panel, TQStringList& args, bool &folders) {
KrViewItemList items;
panel->view->getSelectedKrViewItems( &items );
if ( items.isEmpty() ) return ; // nothing to do
@@ -1007,25 +1007,25 @@ static void checksum_wrapper(ListPanel *panel, QStringList& args, bool &folders)
}
void ListPanelFunc::createChecksum() {
- QStringList args;
+ TQStringList args;
bool folders;
checksum_wrapper(panel, args, folders);
CreateChecksumDlg dlg(args, folders, panel->realPath());
}
void ListPanelFunc::matchChecksum() {
- QStringList args;
+ TQStringList args;
bool folders;
checksum_wrapper(panel, args, folders);
- QValueList<vfile*> checksumFiles = files()->vfs_search(
+ TQValueList<vfile*> checksumFiles = files()->vfs_search(
KRQuery(MatchChecksumDlg::checksumTypesFilter)
);
MatchChecksumDlg dlg(args, folders, panel->realPath(),
- (checksumFiles.size()==1 ? checksumFiles[0]->vfile_getUrl().prettyURL() : QString::null));
+ (checksumFiles.size()==1 ? checksumFiles[0]->vfile_getUrl().prettyURL() : TQString()));
}
void ListPanelFunc::calcSpace() {
- QStringList items;
+ TQStringList items;
panel->view->getSelectedItems( &items );
if ( items.isEmpty() ) {
panel->view->selectAllIncludingDirs();
@@ -1036,7 +1036,7 @@ void ListPanelFunc::calcSpace() {
KrCalcSpaceDialog calc( krApp, panel, items, false );
calc.exec();
- for ( QStringList::ConstIterator it = items.begin(); it != items.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it ) {
KrViewItem *viewItem = panel->view->findItemByName( *it );
if ( viewItem )
panel->view->updateItem(viewItem);
@@ -1044,7 +1044,7 @@ void ListPanelFunc::calcSpace() {
panel->slotUpdateTotals();
}
-bool ListPanelFunc::calcSpace( const QStringList & items, KIO::filesize_t & totalSize, unsigned long & totalFiles, unsigned long & totalDirs ) {
+bool ListPanelFunc::calcSpace( const TQStringList & items, KIO::filesize_t & totalSize, unsigned long & totalFiles, unsigned long & totalDirs ) {
KrCalcSpaceDialog calc( krApp, panel, items, true );
calc.exec();
totalSize = calc.getTotalSize();
@@ -1057,7 +1057,7 @@ void ListPanelFunc::FTPDisconnect() {
// you can disconnect only if connected !
if ( files() ->vfs_getType() == vfs::FTP ) {
krFTPDiss->setEnabled( false );
- panel->view->setNameToMakeCurrent( QString::null );
+ panel->view->setNameToMakeCurrent( TQString() );
openUrl( panel->realPath() ); // open the last local URL
}
}
@@ -1073,7 +1073,7 @@ void ListPanelFunc::newFTPconnection() {
}
void ListPanelFunc::properties() {
- QStringList names;
+ TQStringList names;
panel->getSelectedNames( &names );
if ( names.isEmpty() )
return ; // no names...
@@ -1093,7 +1093,7 @@ void ListPanelFunc::properties() {
// Show the properties dialog
KPropertiesDialog *dlg = new KPropertiesDialog( fi );
- connect( dlg, SIGNAL( applied() ), SLOTS, SLOT( refresh() ) );
+ connect( dlg, TQT_SIGNAL( applied() ), SLOTS, TQT_SLOT( refresh() ) );
}
void ListPanelFunc::refreshActions() {
@@ -1127,7 +1127,7 @@ ListPanelFunc::~ListPanelFunc() {
if( vfsP->vfs_canDelete() )
delete vfsP;
else {
- connect( vfsP, SIGNAL( deleteAllowed() ), vfsP, SLOT( deleteLater() ) );
+ connect( vfsP, TQT_SIGNAL( deleteAllowed() ), vfsP, TQT_SLOT( deleteLater() ) );
vfsP->vfs_requestDelete();
}
}
@@ -1136,7 +1136,7 @@ ListPanelFunc::~ListPanelFunc() {
vfs* ListPanelFunc::files() {
if ( !vfsP )
- vfsP = KrVfsHandler::getVfs( "/", panel, 0 );
+ vfsP = KrVfsHandler::getVfs( "/", TQT_TQOBJECT(panel), 0 );
return vfsP;
}
@@ -1150,7 +1150,7 @@ void ListPanelFunc::copyToClipboard( bool move ) {
return;
}
- QStringList fileNames;
+ TQStringList fileNames;
panel->getSelectedNames( &fileNames );
if ( fileNames.isEmpty() )
@@ -1159,7 +1159,7 @@ void ListPanelFunc::copyToClipboard( bool move ) {
KURL::List* fileUrls = files() ->vfs_getFiles( &fileNames );
if ( fileUrls ) {
KRDrag * urlData = KRDrag::newDrag( *fileUrls, move, krApp->mainView, "krusader" );
- QApplication::clipboard() ->setData( urlData );
+ TQApplication::tqclipboard() ->setData( urlData );
if( move && files()->vfs_getType() == vfs::VIRT )
( static_cast<virt_vfs*>( files() ) )->vfs_removeFiles( &fileNames );
@@ -1169,8 +1169,8 @@ void ListPanelFunc::copyToClipboard( bool move ) {
}
void ListPanelFunc::pasteFromClipboard() {
- QClipboard * cb = QApplication::clipboard();
- QMimeSource * data = cb->data();
+ TQClipboard * cb = TQApplication::tqclipboard();
+ TQMimeSource * data = cb->data();
KURL::List urls;
if ( KURLDrag::canDecode( data ) ) {
KURLDrag::decode( data, urls );
diff --git a/krusader/Panel/panelfunc.h b/krusader/Panel/panelfunc.h
index 1274e11..e27040e 100644
--- a/krusader/Panel/panelfunc.h
+++ b/krusader/Panel/panelfunc.h
@@ -34,26 +34,27 @@
#define PANELFUNC_H
#include "listpanel.h"
#include "krviewitem.h"
-#include <qobject.h>
-#include <qvaluestack.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqvaluestack.h>
+#include <tqtimer.h>
-class ListPanelFunc : public QObject{
+class ListPanelFunc : public TQObject{
friend class ListPanel;
Q_OBJECT
+ TQ_OBJECT
public slots:
inline vfile* getVFile(KrViewItem *item) { return files()->vfs_search(item->name()); }
- inline vfile* getVFile(const QString& name) { return files()->vfs_search(name); }
- void execute(QString&);
- void openUrl(const KURL& path, const QString& nameToMakeCurrent = QString::null);
- void openUrl(const QString& path, const QString& nameToMakeCurrent = QString::null);
+ inline vfile* getVFile(const TQString& name) { return files()->vfs_search(name); }
+ void execute(TQString&);
+ void openUrl(const KURL& path, const TQString& nameToMakeCurrent = TQString());
+ void openUrl(const TQString& path, const TQString& nameToMakeCurrent = TQString());
void immediateOpenUrl( const KURL& path);
void doOpenUrl();
void refresh();
- void rename(const QString &oldname, const QString &newname);
+ void rename(const TQString &oldname, const TQString &newname);
public:
- ListPanelFunc(class ListPanel *parent);
+ ListPanelFunc(class ListPanel *tqparent);
~ListPanelFunc();
vfs* files(); // return a pointer to the vfs
@@ -84,7 +85,7 @@ public:
// calculate the occupied space. A dialog appears, if calculation lasts more than 3 seconds
// and disappears, if the calculation is done. Returns true, if the result is ok and false
// otherwise (Cancel was pressed).
- bool calcSpace(const QStringList & items,KIO::filesize_t & totalSize,unsigned long & totalFiles,unsigned long & totalDirs);
+ bool calcSpace(const TQStringList & items,KIO::filesize_t & totalSize,unsigned long & totalFiles,unsigned long & totalDirs);
void FTPDisconnect();
void newFTPconnection();
inline ListPanelFunc* otherFunc(){ return panel->otherPanel->func; }
@@ -94,12 +95,12 @@ private:
protected:
ListPanel* panel; // our ListPanel
- QValueStack<KURL> urlStack; // Path stack for the "back" button
+ TQValueStack<KURL> urlStack; // Path stack for the "back" button
bool inRefresh; // true when we are in refresh()
vfs* vfsP; // pointer to vfs.
- QTimer delayTimer;
+ TQTimer delayTimer;
KURL delayURL;
- QString nameToMakeCurrent;
+ TQString nameToMakeCurrent;
};
#endif
diff --git a/krusader/Panel/panelpopup.cpp b/krusader/Panel/panelpopup.cpp
index deaec38..2e98357 100644
--- a/krusader/Panel/panelpopup.cpp
+++ b/krusader/Panel/panelpopup.cpp
@@ -5,15 +5,15 @@
#include "../defaults.h"
#include "../krslots.h"
#include "panelfunc.h"
-#include <qtooltip.h>
-#include <qbuttongroup.h>
-#include <qtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqbuttongroup.h>
+#include <tqtoolbutton.h>
#include <kfiletreeview.h>
#include <klocale.h>
-#include <qcursor.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qheader.h>
+#include <tqcursor.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqheader.h>
#include <krview.h>
#include <krviewitem.h>
#include <klineedit.h>
@@ -22,10 +22,10 @@
#include "../KViewer/panelviewer.h"
#include "../KViewer/diskusageviewer.h"
-PanelPopup::PanelPopup( QSplitter *parent, bool left ) : QWidget( parent ),
+PanelPopup::PanelPopup( TQSplitter *tqparent, bool left ) : TQWidget( tqparent ),
_left( left ), _hidden(true), stack( 0 ), viewer( 0 ), pjob( 0 ), splitterSizes() {
- splitter = parent;
- QGridLayout * layout = new QGridLayout(this, 1, 1);
+ splitter = tqparent;
+ TQGridLayout * tqlayout = new TQGridLayout(this, 1, 1);
// loading the splitter sizes
krConfig->setGroup( "Private" );
@@ -43,80 +43,80 @@ PanelPopup::PanelPopup( QSplitter *parent, bool left ) : QWidget( parent ),
// create the label+buttons setup
dataLine = new KrSqueezedTextLabel(this);
dataLine->setText("blah blah");
- connect( dataLine, SIGNAL( clicked() ), this, SLOT( setFocus() ) );
+ connect( dataLine, TQT_SIGNAL( clicked() ), this, TQT_SLOT( setFocus() ) );
krConfig->setGroup( "Look&Feel" );
dataLine->setFont( krConfig->readFontEntry( "Filelist Font", _FilelistFont ) );
// --- hack: setup colors to be the same as an inactive panel
dataLine->setBackgroundMode( PaletteBackground );
- QPalette q( dataLine->palette() );
- q.setColor( QColorGroup::Foreground, KGlobalSettings::textColor() );
- q.setColor( QColorGroup::Background, KGlobalSettings::baseColor() );
+ TQPalette q( dataLine->palette() );
+ q.setColor( TQColorGroup::Foreground, KGlobalSettings::textColor() );
+ q.setColor( TQColorGroup::Background, KGlobalSettings::baseColor() );
dataLine->setPalette( q );
- dataLine->setFrameStyle( QFrame::Box | QFrame::Raised );
+ dataLine->setFrameStyle( TQFrame::Box | TQFrame::Raised );
dataLine->setLineWidth( 1 ); // a nice 3D touch :-)
- int sheight = QFontMetrics( dataLine->font() ).height() + 4;
+ int sheight = TQFontMetrics( dataLine->font() ).height() + 4;
dataLine->setMaximumHeight( sheight );
- btns = new QButtonGroup(this);
+ btns = new TQButtonGroup(this);
btns->setExclusive(true);
btns->hide(); // it should be invisible
- connect(btns, SIGNAL(clicked(int)), this, SLOT(tabSelected(int)));
+ connect(btns, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(tabSelected(int)));
- treeBtn = new QToolButton(this);
- QToolTip::add(treeBtn, i18n("Tree Panel: a tree view of the local file system"));
+ treeBtn = new TQToolButton(this);
+ TQToolTip::add(treeBtn, i18n("Tree Panel: a tree view of the local file system"));
treeBtn->setPixmap(krLoader->loadIcon( "view_tree", KIcon::Toolbar, 16 ));
treeBtn->setFixedSize(20, 20);
treeBtn->setToggleButton(true);
btns->insert(treeBtn, Tree);
- previewBtn = new QToolButton(this);
- QToolTip::add(previewBtn, i18n("Preview Panel: display a preview of the current file"));
+ previewBtn = new TQToolButton(this);
+ TQToolTip::add(previewBtn, i18n("Preview Panel: display a preview of the current file"));
previewBtn->setPixmap(krLoader->loadIcon( "thumbnail", KIcon::Toolbar, 16 ));
previewBtn->setFixedSize(20, 20);
previewBtn->setToggleButton(true);
btns->insert(previewBtn, Preview);
- quickBtn = new QToolButton(this);
- QToolTip::add(quickBtn, i18n("Quick Panel: quick way to perform actions"));
+ quickBtn = new TQToolButton(this);
+ TQToolTip::add(quickBtn, i18n("Quick Panel: quick way to perform actions"));
quickBtn->setPixmap(krLoader->loadIcon( "misc", KIcon::Toolbar, 16 ));
quickBtn->setFixedSize(20, 20);
quickBtn->setToggleButton(true);
btns->insert(quickBtn, QuickPanel);
- viewerBtn = new QToolButton(this);
- QToolTip::add(viewerBtn, i18n("View Panel: view the current file"));
+ viewerBtn = new TQToolButton(this);
+ TQToolTip::add(viewerBtn, i18n("View Panel: view the current file"));
viewerBtn->setPixmap(krLoader->loadIcon( "viewmag", KIcon::Toolbar, 16 ));
viewerBtn->setFixedSize(20, 20);
viewerBtn->setToggleButton(true);
btns->insert(viewerBtn, View);
- duBtn = new QToolButton(this);
- QToolTip::add(duBtn, i18n("Disk Usage Panel: view the usage of a directory"));
+ duBtn = new TQToolButton(this);
+ TQToolTip::add(duBtn, i18n("Disk Usage Panel: view the usage of a directory"));
duBtn->setPixmap(krLoader->loadIcon( "kr_diskusage", KIcon::Toolbar, 16 ));
duBtn->setFixedSize(20, 20);
duBtn->setToggleButton(true);
btns->insert(duBtn, DskUsage);
- layout->addWidget(dataLine,0,0);
- layout->addWidget(treeBtn,0,1);
- layout->addWidget(previewBtn,0,2);
- layout->addWidget(quickBtn,0,3);
- layout->addWidget(viewerBtn,0,4);
- layout->addWidget(duBtn,0,5);
+ tqlayout->addWidget(dataLine,0,0);
+ tqlayout->addWidget(treeBtn,0,1);
+ tqlayout->addWidget(previewBtn,0,2);
+ tqlayout->addWidget(quickBtn,0,3);
+ tqlayout->addWidget(viewerBtn,0,4);
+ tqlayout->addWidget(duBtn,0,5);
// create a widget stack on which to put the parts
- stack = new QWidgetStack( this );
+ stack = new TQWidgetStack( this );
// create the tree part ----------
tree = new KFileTreeView( stack );
tree->setAcceptDrops(true);
- connect(tree, SIGNAL(dropped (QWidget *, QDropEvent *, KURL::List &, KURL &)),
- this, SLOT(slotDroppedOnTree(QWidget *, QDropEvent *, KURL::List&, KURL& )));
+ connect(tree, TQT_SIGNAL(dropped (TQWidget *, TQDropEvent *, KURL::List &, KURL &)),
+ this, TQT_SLOT(slotDroppedOnTree(TQWidget *, TQDropEvent *, KURL::List&, KURL& )));
stack->addWidget( tree, Tree );
tree->addColumn( "" );
// add ~
- tree->addBranch( QDir::home().absPath(), i18n("Home"));
+ tree->addBranch( TQDir::home().absPath(), i18n("Home"));
tree->setDirOnlyMode( tree->branch(i18n("Home")), true);
tree->branch(i18n("Home"))->setChildRecurse(false);
// add /
@@ -126,7 +126,7 @@ PanelPopup::PanelPopup( QSplitter *parent, bool left ) : QWidget( parent ),
tree->branch( i18n( "Root" ) ) ->setChildRecurse(false);
tree->branch( i18n( "Root" ) ) ->setOpen( true );
tree->header() ->setHidden( true );
- connect(tree, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(treeSelection(QListViewItem*)));
+ connect(tree, TQT_SIGNAL(doubleClicked(TQListViewItem*)), this, TQT_SLOT(treeSelection(TQListViewItem*)));
// start listing the tree
tree->branch( i18n( "Root" ) ) ->root();
tree->branch( i18n( "Home" ) ) ->root();
@@ -139,61 +139,61 @@ PanelPopup::PanelPopup( QSplitter *parent, bool left ) : QWidget( parent ),
panelviewer = new PanelViewer(stack);
stack->addWidget(panelviewer, View);
- connect(panelviewer, SIGNAL(openURLRequest(const KURL &)), this, SLOT(handleOpenURLRequest(const KURL &)));
+ connect(panelviewer, TQT_SIGNAL(openURLRequest(const KURL &)), this, TQT_SLOT(handleOpenURLRequest(const KURL &)));
// create the disk usage view
diskusage = new DiskUsageViewer( stack );
diskusage->setStatusLabel( dataLine, i18n("Disk Usage: ") );
stack->addWidget( diskusage, DskUsage );
- connect(diskusage, SIGNAL(openURLRequest(const KURL &)), this, SLOT(handleOpenURLRequest(const KURL &)));
+ connect(diskusage, TQT_SIGNAL(openURLRequest(const KURL &)), this, TQT_SLOT(handleOpenURLRequest(const KURL &)));
// create the quick-panel part ----
- QWidget *quickPanel = new QWidget(stack);
- QGridLayout *qlayout = new QGridLayout(quickPanel);
+ TQWidget *quickPanel = new TQWidget(stack);
+ TQGridLayout *qtqlayout = new TQGridLayout(quickPanel);
// --- quick select
- QLabel *selectLabel = new QLabel(i18n("Quick Select"), quickPanel);
+ TQLabel *selectLabel = new TQLabel(i18n("Quick Select"), quickPanel);
quickSelectCombo = new KComboBox( quickPanel );
quickSelectCombo->setEditable( true );
krConfig->setGroup( "Private" );
- QStrList lst;
+ TQStrList lst;
int i = krConfig->readListEntry( "Predefined Selections", lst );
if ( i > 0 )
quickSelectCombo->insertStrList( lst );
quickSelectCombo->setCurrentText( "*" );
- quickSelectCombo->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ) );
+ quickSelectCombo->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) );
- connect(quickSelectCombo, SIGNAL(returnPressed(const QString& )),
- this, SLOT(quickSelect(const QString& )));
+ connect(quickSelectCombo, TQT_SIGNAL(returnPressed(const TQString& )),
+ this, TQT_SLOT(quickSelect(const TQString& )));
- QToolButton *qselectBtn = new QToolButton(quickPanel);
+ TQToolButton *qselectBtn = new TQToolButton(quickPanel);
qselectBtn->setPixmap(krLoader->loadIcon( "kr_selectall", KIcon::Toolbar, 16 ));
qselectBtn->setFixedSize(20, 20);
- QToolTip::add( qselectBtn, i18n("apply the selection") );
- connect(qselectBtn, SIGNAL(clicked()), this, SLOT(quickSelect()));
+ TQToolTip::add( qselectBtn, i18n("apply the selection") );
+ connect(qselectBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(quickSelect()));
- QToolButton *qstoreBtn = new QToolButton(quickPanel);
+ TQToolButton *qstoreBtn = new TQToolButton(quickPanel);
qstoreBtn->setPixmap(krLoader->loadIcon( "filesave", KIcon::Toolbar, 16 ));
qstoreBtn->setFixedSize(20, 20);
- QToolTip::add( qstoreBtn, i18n("store the current selection") );
- connect(qstoreBtn, SIGNAL(clicked()), this, SLOT(quickSelectStore()));
+ TQToolTip::add( qstoreBtn, i18n("store the current selection") );
+ connect(qstoreBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(quickSelectStore()));
- QToolButton *qsettingsBtn = new QToolButton(quickPanel);
+ TQToolButton *qsettingsBtn = new TQToolButton(quickPanel);
qsettingsBtn->setPixmap(krLoader->loadIcon( "configure", KIcon::Toolbar, 16 ));
qsettingsBtn->setFixedSize(20, 20);
- QToolTip::add( qsettingsBtn, i18n("select group dialog") );
- connect(qsettingsBtn, SIGNAL(clicked()), krSelect, SLOT(activate()));
+ TQToolTip::add( qsettingsBtn, i18n("select group dialog") );
+ connect(qsettingsBtn, TQT_SIGNAL(clicked()), krSelect, TQT_SLOT(activate()));
- qlayout->addWidget(selectLabel,0,0);
- qlayout->addWidget(quickSelectCombo,0,1);
- qlayout->addWidget(qselectBtn,0,2);
- qlayout->addWidget(qstoreBtn,0,3);
- qlayout->addWidget(qsettingsBtn,0,4);
+ qtqlayout->addWidget(selectLabel,0,0);
+ qtqlayout->addWidget(quickSelectCombo,0,1);
+ qtqlayout->addWidget(qselectBtn,0,2);
+ qtqlayout->addWidget(qstoreBtn,0,3);
+ qtqlayout->addWidget(qsettingsBtn,0,4);
stack->addWidget(quickPanel, QuickPanel);
- // -------- finish the layout (General one)
- layout->addMultiCellWidget(stack,1,1,0,5);
+ // -------- finish the tqlayout (General one)
+ tqlayout->addMultiCellWidget(stack,1,1,0,5);
// set the wanted widget
// ugly: are we left or right?
@@ -213,7 +213,7 @@ PanelPopup::PanelPopup( QSplitter *parent, bool left ) : QWidget( parent ),
PanelPopup::~PanelPopup() {}
void PanelPopup::show() {
- QWidget::show();
+ TQWidget::show();
if( _hidden )
splitter->setSizes( splitterSizes );
_hidden = false;
@@ -224,7 +224,7 @@ void PanelPopup::show() {
void PanelPopup::hide() {
if( !_hidden )
splitterSizes = splitter->sizes();
- QWidget::hide();
+ TQWidget::hide();
_hidden = true;
if (stack->id(stack->visibleWidget()) == View) panelviewer->closeURL();
if (stack->id(stack->visibleWidget()) == DskUsage) diskusage->closeURL();
@@ -342,7 +342,7 @@ void PanelPopup::update( KURL url ) {
// ------------------- tree
-void PanelPopup::treeSelection(QListViewItem*) {
+void PanelPopup::treeSelection(TQListViewItem*) {
emit selection(tree->currentURL());
//emit hideMe();
}
@@ -353,32 +353,32 @@ void PanelPopup::quickSelect() {
SLOTS->markGroup(quickSelectCombo->currentText(), true);
}
-void PanelPopup::quickSelect(const QString &mask) {
- SLOTS->markGroup(mask, true);
+void PanelPopup::quickSelect(const TQString &tqmask) {
+ SLOTS->markGroup(tqmask, true);
}
void PanelPopup::quickSelectStore() {
krConfig->setGroup( "Private" );
- QStringList lst = krConfig->readListEntry( "Predefined Selections" );
- if ( lst.find(quickSelectCombo->currentText()) == lst.end() )
+ TQStringList lst = krConfig->readListEntry( "Predefined Selections" );
+ if ( lst.tqfind(quickSelectCombo->currentText()) == lst.end() )
lst.append( quickSelectCombo->currentText() );
krConfig->writeEntry( "Predefined Selections", lst );
}
-void PanelPopup::slotDroppedOnTree(QWidget *widget, QDropEvent *e, KURL::List &lst, KURL &) {
+void PanelPopup::slotDroppedOnTree(TQWidget *widget, TQDropEvent *e, KURL::List &lst, KURL &) {
// KFileTreeView is buggy: when dropped, it might not give us the correct
- // destination, but actually, it's parent. workaround: don't use
+ // destination, but actually, it's tqparent. workaround: don't use
// the destination in the signal, but take the current item
KURL dest = tree->currentURL();
// ask the user what to do: copy, move or link?
- QPopupMenu popup( this );
+ TQPopupMenu popup( this );
popup.insertItem( i18n( "Copy Here" ), 1 );
popup.insertItem( i18n( "Move Here" ), 2 );
popup.insertItem( i18n( "Link Here" ), 3 );
popup.insertItem( i18n( "Cancel" ), 4 );
- QPoint tmp = widget->mapToGlobal( e->pos() );
- int result = popup.exec( QCursor::pos() );
+ TQPoint tmp = widget->mapToGlobal( e->pos() );
+ int result = popup.exec( TQCursor::pos() );
KIO::CopyJob *job;
switch ( result ) {
diff --git a/krusader/Panel/panelpopup.h b/krusader/Panel/panelpopup.h
index 3c09a0b..b41294e 100644
--- a/krusader/Panel/panelpopup.h
+++ b/krusader/Panel/panelpopup.h
@@ -1,21 +1,21 @@
#ifndef _PANELPOPUP_H
#define _PANELPOPUP_H
-#include <qwidget.h>
-#include <qwidgetstack.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <tqwidget.h>
+#include <tqwidgetstack.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
#include <kfileitem.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kio/previewjob.h>
#include <kurl.h>
-class QButtonGroup;
-class QLabel;
-class QListViewItem;
-class QSplitter;
+class TQButtonGroup;
+class TQLabel;
+class TQListViewItem;
+class TQSplitter;
class KFileTreeView;
-class QToolButton;
+class TQToolButton;
class KrSqueezedTextLabel;
class KLineEdit;
class KComboBox;
@@ -23,11 +23,12 @@ class KrusaderImageFilePreview;
class PanelViewer;
class DiskUsageViewer;
-class PanelPopup: public QWidget {
+class PanelPopup: public TQWidget {
Q_OBJECT
+ TQ_OBJECT
enum Parts { Tree, Preview, QuickPanel, View, DskUsage, Last=0xFF };
public:
- PanelPopup( QSplitter *splitter, bool left );
+ PanelPopup( TQSplitter *splitter, bool left );
~PanelPopup();
inline int currentPage() const { return stack->id(stack->visibleWidget()); }
@@ -45,29 +46,29 @@ signals:
protected slots:
virtual void setFocus();
void tabSelected(int id);
- void treeSelection(QListViewItem*);
- void slotDroppedOnTree(QWidget *widget, QDropEvent *e, KURL::List &lst, KURL &);
+ void treeSelection(TQListViewItem*);
+ void slotDroppedOnTree(TQWidget *widget, TQDropEvent *e, KURL::List &lst, KURL &);
void handleOpenURLRequest(const KURL &url);
void quickSelect();
- void quickSelect(const QString &);
+ void quickSelect(const TQString &);
void quickSelectStore();
protected:
bool _left;
bool _hidden;
- QWidgetStack *stack;
+ TQWidgetStack *stack;
KrusaderImageFilePreview *viewer;
KrSqueezedTextLabel *dataLine;
- QGuardedPtr<KIO::PreviewJob> pjob;
+ TQGuardedPtr<KIO::PreviewJob> pjob;
KFileTreeView *tree;
- QToolButton *treeBtn, *previewBtn, *quickBtn, *viewerBtn, *duBtn;
- QButtonGroup *btns;
+ TQToolButton *treeBtn, *previewBtn, *quickBtn, *viewerBtn, *duBtn;
+ TQButtonGroup *btns;
KLineEdit *quickFilter;
KComboBox *quickSelectCombo;
PanelViewer *panelviewer;
DiskUsageViewer *diskusage;
- QValueList<int> splitterSizes;
- QSplitter *splitter;
+ TQValueList<int> splitterSizes;
+ TQSplitter *splitter;
};
#endif // _PANELPOPUP_H
diff --git a/krusader/Queue/queue.cpp b/krusader/Queue/queue.cpp
index 3232778..da891ee 100644
--- a/krusader/Queue/queue.cpp
+++ b/krusader/Queue/queue.cpp
@@ -1,6 +1,6 @@
#include "queue.h"
-Queue::Queue(const QString& name): _name(name)
+Queue::Queue(const TQString& name): _name(name)
{
}
diff --git a/krusader/Queue/queue.h b/krusader/Queue/queue.h
index 093998a..c054260 100644
--- a/krusader/Queue/queue.h
+++ b/krusader/Queue/queue.h
@@ -1,9 +1,9 @@
-#ifndef QUEUE_H
-#define QUEUE_H
+#ifndef TQUEUE_H
+#define TQUEUE_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/jobclasses.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
/**
* Queue can hold anything which inherits KIO::Job, and schedule it, start it, stop etc...
@@ -12,21 +12,22 @@
* to start it, or queue it.
*
*/
-class Queue: public QObject
+class Queue: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- Queue(const QString& name);
+ Queue(const TQString& name);
virtual ~Queue();
- inline const QString& name() const { return _name; }
+ inline const TQString& name() const { return _name; }
void enqueue(KIO::Job *job);
protected:
void dumpQueue();
- QString _name;
- QPtrList<KIO::Job> _jobs;
+ TQString _name;
+ TQPtrList<KIO::Job> _jobs;
};
-#endif // QUEUE_H
+#endif // TQUEUE_H
diff --git a/krusader/Queue/queue_mgr.cpp b/krusader/Queue/queue_mgr.cpp
index 875f9cc..507260c 100644
--- a/krusader/Queue/queue_mgr.cpp
+++ b/krusader/Queue/queue_mgr.cpp
@@ -1,7 +1,7 @@
#include "queue_mgr.h"
-const QString QueueManager::defaultName="default";
-QMap<QString, Queue*> QueueManager::_queues;
+const TQString QueueManager::defaultName="default";
+TQMap<TQString, Queue*> QueueManager::_queues;
QueueManager::QueueManager()
{
@@ -11,20 +11,20 @@ QueueManager::QueueManager()
QueueManager::~QueueManager()
{
- QMap<QString, Queue*>::iterator it;
+ TQMap<TQString, Queue*>::iterator it;
for (it = _queues.begin(); it != _queues.end(); ++it )
delete it.data();
_queues.clear();
}
-Queue* QueueManager::queue(const QString& queueName)
+Queue* QueueManager::queue(const TQString& queueName)
{
- if (!_queues.contains(queueName))
+ if (!_queues.tqcontains(queueName))
return 0;
return _queues[queueName];
}
-QValueList<QString> QueueManager::queues() const
+TQValueList<TQString> QueueManager::queues() const
{
return _queues.keys();
}
diff --git a/krusader/Queue/queue_mgr.h b/krusader/Queue/queue_mgr.h
index 7bc474f..615579d 100644
--- a/krusader/Queue/queue_mgr.h
+++ b/krusader/Queue/queue_mgr.h
@@ -1,8 +1,8 @@
-#ifndef QUEUE_MGR_H
-#define QUEUE_MGR_H
+#ifndef TQUEUE_MGR_H
+#define TQUEUE_MGR_H
#include "queue.h"
-#include <qmap.h>
+#include <tqmap.h>
/**
* QueueManager holds multiple queues and has a static
@@ -11,16 +11,16 @@
*/
class QueueManager
{
- static const QString defaultName;
+ static const TQString defaultName;
public:
QueueManager();
~QueueManager();
- static Queue* queue(const QString& queueName=defaultName);
- QValueList<QString> queues() const;
+ static Queue* queue(const TQString& queueName=defaultName);
+ TQValueList<TQString> queues() const;
protected:
- static QMap<QString, Queue*> _queues;
+ static TQMap<TQString, Queue*> _queues;
};
-#endif // QUEUE_MGR_H
+#endif // TQUEUE_MGR_H
diff --git a/krusader/Queue/queuewidget.h b/krusader/Queue/queuewidget.h
index aa58477..43aa61e 100644
--- a/krusader/Queue/queuewidget.h
+++ b/krusader/Queue/queuewidget.h
@@ -1,14 +1,15 @@
-#ifndef QUEUE_WIDGET_H
-#define QUEUE_WIDGET_H
+#ifndef TQUEUE_WIDGET_H
+#define TQUEUE_WIDGET_H
#include <ktabwidget.h>
class QueueWidget: public KTabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
QueueWidget();
~QueueWidget();
};
-#endif // QUEUE_WIDGET_H
+#endif // TQUEUE_WIDGET_H
diff --git a/krusader/RemoteMan/remoteman.cpp b/krusader/RemoteMan/remoteman.cpp
index 848bba6..b17be0f 100644
--- a/krusader/RemoteMan/remoteman.cpp
+++ b/krusader/RemoteMan/remoteman.cpp
@@ -34,43 +34,43 @@
#include "../kicons.h"
#include "../resources.h"
#include "../krusader.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <klocale.h>
-#include <qpixmap.h>
-#include <qspinbox.h>
-#include <qmultilineedit.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qmessagebox.h>
-#include <qcheckbox.h>
+#include <tqpixmap.h>
+#include <tqspinbox.h>
+#include <tqmultilineedit.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqmessagebox.h>
+#include <tqcheckbox.h>
#include <kstandarddirs.h>
-QString remoteMan::url=QString::null;
+TQString remoteMan::url=TQString();
remoteMan::remoteMan() : remoteManBase(0,0,true), currentItem(0) {
// Read the connection list from the configuration file and re-create the tree
config2tree();
sessions->setCurrentItem(sessions->firstChild());
// some minor fixes, left out of the designer - do again in next version !
- password->setEchoMode(QLineEdit::Password);
+ password->setEchoMode(TQLineEdit::Password);
// ===> should be moved to remoteManBase <=====
- connect( hostName, SIGNAL( textChanged(const QString&) ),
- this, SLOT( updateConnect(const QString&) ) );
- connect( sessions, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(connection()));
- connect( sessions, SIGNAL(returnPressed(QListViewItem *)), this, SLOT(connection()));
+ connect( hostName, TQT_SIGNAL( textChanged(const TQString&) ),
+ this, TQT_SLOT( updateConnect(const TQString&) ) );
+ connect( sessions, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(connection()));
+ connect( sessions, TQT_SIGNAL(returnPressed(TQListViewItem *)), this, TQT_SLOT(connection()));
// execute the main dialog
exec();
}
-void remoteMan::expandDecos(QListViewItem* i) {
+void remoteMan::expandDecos(TQListViewItem* i) {
if (i->text(1)!="SESSION") i->setPixmap(0,LOADICON("folder_open"));
}
-void remoteMan::collapseDecos(QListViewItem* i) {
+void remoteMan::collapseDecos(TQListViewItem* i) {
if (i->text(1)!="SESSION") i->setPixmap(0,LOADICON("folder_open"));
}
// This is the static memeber, you'd want to call this directly !
-QString remoteMan::getHost() {
+TQString remoteMan::getHost() {
remoteMan *p=new remoteMan();
delete p;
return url;
@@ -78,13 +78,13 @@ QString remoteMan::getHost() {
// adds a new group submenu
void remoteMan::addGroup() {
- QListViewItem *i=0,*current;
+ TQListViewItem *i=0,*current;
current=sessions->currentItem();
if (!current) // no item is current, or the list is empty (shouldn't happen)
- i=new QListViewItem(sessions,i18n("New group"),"GROUP"); // insert into the backplane
+ i=new TQListViewItem(sessions,i18n("New group"),"GROUP"); // insert into the backplane
else
if (current->text(1).left(5)=="GROUP")
- i=new QListViewItem(current,i18n("New group"),"GROUP"); // insert under the current item
+ i=new TQListViewItem(current,i18n("New group"),"GROUP"); // insert under the current item
else return; // cannot create a new group under an item
// set an open folder pixmap for the group
i->setPixmap(0,LOADICON("folder_open"));
@@ -94,13 +94,13 @@ void remoteMan::addGroup() {
// add an actual session
void remoteMan::addSession() {
- QListViewItem *i=0,*current;
+ TQListViewItem *i=0,*current;
current=sessions->currentItem();
// if we are pointing to a session, then the new session will be
- // created under the current session's parent group
- if (current->text(1)=="SESSION") current=current->parent();
+ // created under the current session's tqparent group
+ if (current->text(1)=="SESSION") current=current->tqparent();
// create a new item and give it the appropriate pixmap
- i=new QListViewItem(current,i18n("New session"),"SESSION");
+ i=new TQListViewItem(current,i18n("New session"),"SESSION");
i->setPixmap(0,LOADICON("kr_ftp_new"));
// make the new item current and refresh the view
sessions->setCurrentItem(i); sessions->ensureItemVisible(i);
@@ -119,28 +119,28 @@ void remoteMan::refreshData() {
currentItem->setText(8,protocol->currentText());
// we have to check if there's another brother-session with
// the same name, if so, we add a <2> to it
- QListViewItem *i;
- if (currentItem->parent()) i=currentItem->parent()->firstChild();
+ TQListViewItem *i;
+ if (currentItem->tqparent()) i=currentItem->tqparent()->firstChild();
else i=sessions->firstChild();
while (i) {
if (i->text(0)==currentItem->text(0) && i!=currentItem) {
- QString temp=currentItem->text(0).right(4);
+ TQString temp=currentItem->text(0).right(4);
if (temp.left(1)=="<" && temp.right(1)==">") {
int h=temp.mid(1,1).toInt();
int l=temp.mid(2,1).toInt();
if ((++l)==10) { ++h; l=0; }
- temp=QString("<%1%2>").arg(h).arg(l);
- temp=currentItem->text(0).replace(currentItem->text(0).length()-4,4,temp);
+ temp=TQString("<%1%2>").tqarg(h).tqarg(l);
+ temp=currentItem->text(0).tqreplace(currentItem->text(0).length()-4,4,temp);
currentItem->setText(0,temp);
} else currentItem->setText(0,currentItem->text(0)+"<02>");
- i=currentItem->parent()->firstChild();
+ i=currentItem->tqparent()->firstChild();
} else i=i->nextSibling();
}
}
// here begins the actual function
removeBtn->setEnabled(true); // just incase we turned it off last time
connectBtn->setEnabled(true);
- QListViewItem *current=sessions->currentItem();
+ TQListViewItem *current=sessions->currentItem();
if (!current) return; // if no item is current yet
if (current->text(1).left(5)=="GROUP") { // disable all that don't belong to a group
// first, disable all the fields a user cannot change
@@ -188,12 +188,12 @@ void remoteMan::refreshData() {
// called when we are changing the session/group name, so that remoteMan
// is able to change it in the corrosponding listview at the same time
-void remoteMan::updateName(const QString &text) {
- QListViewItem *i=sessions->currentItem();
+void remoteMan::updateName(const TQString &text) {
+ TQListViewItem *i=sessions->currentItem();
i->setText(0,text);
}
-void remoteMan::updateConnect(const QString &) {
+void remoteMan::updateConnect(const TQString &) {
// disable connect button if no host name is defined
if (hostName->text().simplifyWhiteSpace().isEmpty())
connectBtn->setEnabled(false);
@@ -202,39 +202,39 @@ void remoteMan::updateConnect(const QString &) {
// take an item, and create a "connection", built of the full
// path of folders to the item, seperated by the ` character
-QString item2connection(QListViewItem *item) {
- QString con=item->text(0);
- QListViewItem *iterator=item->parent();
+TQString item2connection(TQListViewItem *item) {
+ TQString con=item->text(0);
+ TQListViewItem *iterator=item->tqparent();
while (iterator!=0) {
//////////////////////// explanation: ///////////////////////////
// since the` char is special to us, we use it to seperate items
// in the connection, we cannot allow it to be inside a name, so
// we find it (if it exists) and replace it with a ' character
- QString temp=iterator->text(0);
- int i=temp.find('`'); // are there any ` in the name ?
+ TQString temp=iterator->text(0);
+ int i=temp.tqfind('`'); // are there any ` in the name ?
while (i>-1) { // if so, change them until none are left
- temp.replace(i,1,QChar('\''));
- i=temp.find('`');
+ temp.tqreplace(i,1,TQChar('\''));
+ i=temp.tqfind('`');
}
con=temp+'`'+con;
- iterator=iterator->parent();
+ iterator=iterator->tqparent();
}
return con;
}
// find an item with a specific path - if the path doesn't exist, create it
-QListViewItem* remoteMan::findItem(const QString &name, QListViewItem *p) {
- QListViewItem *it;
+TQListViewItem* remoteMan::findItem(const TQString &name, TQListViewItem *p) {
+ TQListViewItem *it;
if (name.isEmpty()) return p; // the end of the recursion has been reached!!!
if (p==0) it=sessions->firstChild(); else it=p->firstChild();
- int loc=name.find('`');
+ int loc=name.tqfind('`');
while (it) {
if (it->text(0)==name.left(loc)) break;
it=it->nextSibling();
}
if (!it) // item has not been found, create it
- if (!p) it=new QListViewItem(sessions,name.left(loc),"GROUP");
- else it=new QListViewItem(p,name.left(loc),"GROUP");
+ if (!p) it=new TQListViewItem(sessions,name.left(loc),"GROUP");
+ else it=new TQListViewItem(p,name.left(loc),"GROUP");
// now, it points to the item we want, so let's go down one level
it=findItem(name.mid(loc+1),it);
return it;
@@ -244,40 +244,40 @@ QListViewItem* remoteMan::findItem(const QString &name, QListViewItem *p) {
void remoteMan::config2tree() {
// attempt to read the tree from krusader's config file
krConfig->setGroup("RemoteMan");
- QStringList lst=krConfig->readListEntry("Connections");
+ TQStringList lst=krConfig->readListEntry("Connections");
if (lst.count()<1) { // no such list in the config file - create the basics
// add the default groups
- QListViewItem *i;
- i=new QListViewItem(sessions,i18n("Sessions"),"GROUP!");
+ TQListViewItem *i;
+ i=new TQListViewItem(sessions,i18n("Sessions"),"GROUP!");
// the GROUP text signifies a group (duh), the GROUP! signifies a group
// that the user cannot change
i->setPixmap(0,LOADICON("folder_open"));
sessions->setCurrentItem(i);
-//# i=new QListViewItem(sessions,i18n("Samba sessions (comming soon)"),"GROUP!");
+//# i=new TQListViewItem(sessions,i18n("Samba sessions (comming soon)"),"GROUP!");
//# i->setPixmap(0,LOADICON("folder"));
return;
}
// if we got here, we have a connection entry in the config file
// let's work on it...
- QStringList::Iterator it;
- QListViewItem *item=0;
+ TQStringList::Iterator it;
+ TQListViewItem *item=0;
for( it = lst.begin(); it != lst.end(); ++it ) {
- QString t=(*it); // easier to work with
+ TQString t=(*it); // easier to work with
// this part creates the path to the session
- int loc=t.findRev('`');
+ int loc=t.tqfindRev('`');
if (loc>-1) item=findItem(t.left(loc+1),0);
// at this point we have the complete path to the object
// let's keep only the item's name
t=t.mid(loc+1);
// now, we are left with only the session name itself
// so, we create it as a son of the active item
- QStringList newLst=krConfig->readListEntry(*it); // and fill in
+ TQStringList newLst=krConfig->readListEntry(*it); // and fill in
bool group=(newLst[1]!="SESSION");
- QListViewItem *newItem;
+ TQListViewItem *newItem;
if (item==0) // if this item originating from the backplane
- newItem=new QListViewItem(sessions,t,group ? "GROUP" : "SESSION");
+ newItem=new TQListViewItem(sessions,t,group ? "GROUP" : "SESSION");
else
- newItem=new QListViewItem(item,t,group ? "GROUP" : "SESSION");
+ newItem=new TQListViewItem(item,t,group ? "GROUP" : "SESSION");
newItem->setPixmap(0,group ? LOADICON("folder") : LOADICON("kr_ftp_new")); // update a pixmap
newItem->setText(0,t);
// expand the item, if needed
@@ -291,14 +291,14 @@ void remoteMan::config2tree() {
void remoteMan::tree2config() {
// first, set the stage
krConfig->setGroup("RemoteMan");
- QStringList lst;
- QListViewItemIterator it(sessions);
+ TQStringList lst;
+ TQListViewItemIterator it(sessions);
while (it.current()) { // while there are still items in the tree
- QString temp=item2connection((it.current()));
+ TQString temp=item2connection((it.current()));
lst.append(temp); // write the connection into the "connection-index"
if (it.current()->isOpen())
lst.append("expanded"); else lst.append("collapsed");
- QStringList data;
+ TQStringList data;
for (int i=0; i<9; ++i) data.append((it.current())->text(i));
// write the specific entry into the config file
krConfig->writeEntry(temp,data);
@@ -311,15 +311,15 @@ void remoteMan::tree2config() {
void remoteMan::connection() {
// if clicked on a group...
- QListViewItem *i=sessions->currentItem();
+ TQListViewItem *i=sessions->currentItem();
if (i->text(1)!="SESSION") {
i->setOpen(i->isOpen());
return;
}
// build a url
if (anonymous->isChecked()) {
- userName->setText(QString::null);
- password->setText(QString::null);
+ userName->setText(TQString());
+ password->setText(TQString());
} else {
userName->setText(userName->text().simplifyWhiteSpace());
password->setText(password->text().simplifyWhiteSpace());
@@ -331,7 +331,7 @@ void remoteMan::connection() {
if ( !remoteDir->text().isEmpty() && remoteDir->text().left(1)!="/")
remoteDir->setText("/"+remoteDir->text());
- QString port="";
+ TQString port="";
if (protocol->currentText()=="ftp://" && portNum->value()!=21 )
port=":"+portNum->cleanText();
@@ -354,13 +354,13 @@ void remoteMan::connection() {
// remove a connection or a group of connections
void remoteMan::removeSession() {
- QListViewItem *it=sessions->currentItem();
+ TQListViewItem *it=sessions->currentItem();
if (!it) return; // don't do anything if no item is selected
- switch( QMessageBox::warning( this, i18n("RemoteMan"),
+ switch( TQMessageBox::warning( this, i18n("RemoteMan"),
i18n("Are you sure you want to delete this item ???"),
- QMessageBox::Yes,
- QMessageBox::No | QMessageBox::Default | QMessageBox::Escape)) {
- case QMessageBox::No : return;
+ TQMessageBox::Yes,
+ TQMessageBox::No | TQMessageBox::Default | TQMessageBox::Escape)) {
+ case TQMessageBox::No : return;
}
// since we're here, the user must have pressed YES, let's delete
delete it;
@@ -371,14 +371,14 @@ void remoteMan::removeSession() {
void remoteMan::accept() {
refreshData(); // make sure all is updated
tree2config(); // write the sessions to a configuration file
- url=QString::null; // this signals getHost() we didn't click CONNECT
+ url=TQString(); // this signals getHost() we didn't click CONNECT
remoteManBase::accept(); // tidy up
}
void remoteMan::reject() {
refreshData(); // make sure all is updated
tree2config(); // write the sessions to a configuration file
- url=QString::null; // this signals getHost() we didn't click CONNECT
+ url=TQString(); // this signals getHost() we didn't click CONNECT
remoteManBase::reject();
}
diff --git a/krusader/RemoteMan/remoteman.h b/krusader/RemoteMan/remoteman.h
index 385ef86..9e19347 100644
--- a/krusader/RemoteMan/remoteman.h
+++ b/krusader/RemoteMan/remoteman.h
@@ -34,37 +34,38 @@
#define REMOTEMAN_H
#include "remotemanbase.h"
-#include <qlistview.h>
+#include <tqlistview.h>
class remoteMan : public remoteManBase {
Q_OBJECT
+ TQ_OBJECT
public:
remoteMan();
- static QString getHost(); // we call remoteMan mainly with this function
+ static TQString getHost(); // we call remoteMan mainly with this function
protected:
void config2tree(); // internal
void tree2config(); // internal
- QListViewItem *findItem(const QString &name, QListViewItem *p);
+ TQListViewItem *findItem(const TQString &name, TQListViewItem *p);
public slots:
void addGroup();
void refreshData() ; // called whenver the current session changes
- void updateName(const QString&); // update the session/group name in real-time
- void updateConnect(const QString&); // enable/disable the connect button in real-time
+ void updateName(const TQString&); // update the session/group name in real-time
+ void updateConnect(const TQString&); // enable/disable the connect button in real-time
void addSession();
void connection();
void removeSession();
- void expandDecos(QListViewItem*);
- void collapseDecos(QListViewItem*);
+ void expandDecos(TQListViewItem*);
+ void collapseDecos(TQListViewItem*);
protected slots:
void accept();
void reject();
private:
- QListViewItem *currentItem;
- static QString url;
+ TQListViewItem *currentItem;
+ static TQString url;
};
#endif
diff --git a/krusader/RemoteMan/remotemanbase.cpp b/krusader/RemoteMan/remotemanbase.cpp
index 2baf3d6..c9256f2 100644
--- a/krusader/RemoteMan/remotemanbase.cpp
+++ b/krusader/RemoteMan/remotemanbase.cpp
@@ -9,67 +9,67 @@
#include "remotemanbase.h"
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qmultilineedit.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqmultilineedit.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kprotocolinfo.h>
/*
- * Constructs a remoteManBase which is a child of 'parent', with the
+ * Constructs a remoteManBase which is a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-remoteManBase::remoteManBase( QWidget* parent, const char* name, bool modal, WFlags fl )
- : QDialog( parent, name, modal, fl )
+remoteManBase::remoteManBase( TQWidget* tqparent, const char* name, bool modal, WFlags fl )
+ : TQDialog( tqparent, name, modal, fl )
{
if ( !name )
setName( "remoteManBase" );
resize( 670, 502 );
setCaption( i18n( "RemoteMan: Connection Manager" ) );
setSizeGripEnabled( TRUE );
- remoteManBaseLayout = new QGridLayout( this );
+ remoteManBaseLayout = new TQGridLayout( this );
remoteManBaseLayout->setSpacing( 6 );
remoteManBaseLayout->setMargin( 11 );
- Layout23 = new QVBoxLayout;
+ Layout23 = new TQVBoxLayout;
Layout23->setSpacing( 6 );
Layout23->setMargin( 0 );
- TextLabel1 = new QLabel( this, "TextLabel1" );
+ TextLabel1 = new TQLabel( this, "TextLabel1" );
TextLabel1->setText( i18n( "Session name:" ) );
Layout23->addWidget( TextLabel1 );
- sessionName = new QLineEdit( this, "sessionName" );
+ sessionName = new TQLineEdit( this, "sessionName" );
Layout23->addWidget( sessionName );
remoteManBaseLayout->addLayout( Layout23, 0, 1 );
- Layout12 = new QHBoxLayout;
+ Layout12 = new TQHBoxLayout;
Layout12->setSpacing( 6 );
Layout12->setMargin( 0 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
Layout12->addItem( spacer );
- moreBtn = new QPushButton( this, "moreBtn" );
+ moreBtn = new TQPushButton( this, "moreBtn" );
moreBtn->setText( i18n( "&More" ) );
moreBtn->setAutoDefault( FALSE );
moreBtn->setDefault( FALSE );
Layout12->addWidget( moreBtn );
- closeBtn = new QPushButton( this, "closeBtn" );
+ closeBtn = new TQPushButton( this, "closeBtn" );
closeBtn->setText( i18n( "&Close" ) );
closeBtn->setAutoDefault( FALSE );
closeBtn->setDefault( FALSE );
@@ -77,182 +77,182 @@ remoteManBase::remoteManBase( QWidget* parent, const char* name, bool modal, WF
remoteManBaseLayout->addMultiCellLayout( Layout12, 7, 7, 0, 1 );
- sessions = new QListView( this, "sessions" );
+ sessions = new TQListView( this, "sessions" );
sessions->addColumn( i18n( "Sessions" ) );
sessions->header()->setClickEnabled( FALSE, sessions->header()->count() - 1 );
sessions->header()->setResizeEnabled( FALSE, sessions->header()->count() - 1 );
- sessions->setMinimumSize( QSize( 300, 400 ) );
- sessions->setVScrollBarMode( QListView::AlwaysOn );
- sessions->setHScrollBarMode( QListView::Auto );
+ sessions->setMinimumSize( TQSize( 300, 400 ) );
+ sessions->setVScrollBarMode( TQListView::AlwaysOn );
+ sessions->setHScrollBarMode( TQListView::Auto );
sessions->setRootIsDecorated( TRUE );
remoteManBaseLayout->addMultiCellWidget( sessions, 0, 6, 0, 0 );
- Layout9 = new QVBoxLayout;
+ Layout9 = new TQVBoxLayout;
Layout9->setSpacing( 6 );
Layout9->setMargin( 0 );
- Layout10 = new QGridLayout;
+ Layout10 = new TQGridLayout;
Layout10->setSpacing( 6 );
Layout10->setMargin( 0 );
- TextLabel1_3_3 = new QLabel( this, "TextLabel1_3_3" );
+ TextLabel1_3_3 = new TQLabel( this, "TextLabel1_3_3" );
TextLabel1_3_3->setText( i18n( "Password:" ) );
Layout10->addWidget( TextLabel1_3_3, 0, 1 );
- password = new QLineEdit( this, "password" );
+ password = new TQLineEdit( this, "password" );
Layout10->addWidget( password, 1, 1 );
- TextLabel1_3 = new QLabel( this, "TextLabel1_3" );
+ TextLabel1_3 = new TQLabel( this, "TextLabel1_3" );
TextLabel1_3->setText( i18n( "User name:" ) );
Layout10->addWidget( TextLabel1_3, 0, 0 );
- userName = new QLineEdit( this, "userName" );
+ userName = new TQLineEdit( this, "userName" );
Layout10->addWidget( userName, 1, 0 );
Layout9->addLayout( Layout10 );
- anonymous = new QCheckBox( this, "anonymous" );
+ anonymous = new TQCheckBox( this, "anonymous" );
anonymous->setText( i18n( "Anonymous" ) );
Layout9->addWidget( anonymous );
remoteManBaseLayout->addLayout( Layout9, 2, 1 );
- Layout26 = new QVBoxLayout;
+ Layout26 = new TQVBoxLayout;
Layout26->setSpacing( 6 );
Layout26->setMargin( 0 );
- TextLabel1_3_2 = new QLabel( this, "TextLabel1_3_2" );
+ TextLabel1_3_2 = new TQLabel( this, "TextLabel1_3_2" );
TextLabel1_3_2->setText( i18n( "Remote directory:" ) );
Layout26->addWidget( TextLabel1_3_2 );
- remoteDir = new QLineEdit( this, "remoteDir" );
+ remoteDir = new TQLineEdit( this, "remoteDir" );
Layout26->addWidget( remoteDir );
remoteManBaseLayout->addLayout( Layout26, 4, 1 );
- Layout27 = new QVBoxLayout;
+ Layout27 = new TQVBoxLayout;
Layout27->setSpacing( 6 );
Layout27->setMargin( 0 );
- TextLabel1_3_2_2 = new QLabel( this, "TextLabel1_3_2_2" );
+ TextLabel1_3_2_2 = new TQLabel( this, "TextLabel1_3_2_2" );
TextLabel1_3_2_2->setText( i18n( "Description:" ) );
Layout27->addWidget( TextLabel1_3_2_2 );
- description = new QMultiLineEdit( this, "description" );
+ description = new TQMultiLineEdit( this, "description" );
Layout27->addWidget( description );
remoteManBaseLayout->addLayout( Layout27, 5, 1 );
- layout = new QGridLayout;
- layout->setSpacing( 6 );
- layout->setMargin( 0 );
+ tqlayout = new TQGridLayout;
+ tqlayout->setSpacing( 6 );
+ tqlayout->setMargin( 0 );
- removeBtn = new QPushButton( this, "removeBtn" );
+ removeBtn = new TQPushButton( this, "removeBtn" );
removeBtn->setText( i18n( "&Remove" ) );
removeBtn->setAutoDefault( FALSE );
removeBtn->setDefault( FALSE );
- layout->addWidget( removeBtn, 0, 2 );
+ tqlayout->addWidget( removeBtn, 0, 2 );
- connectBtn = new QPushButton( this, "connectBtn" );
+ connectBtn = new TQPushButton( this, "connectBtn" );
connectBtn->setText( i18n( "Co&nnect" ) );
connectBtn->setAutoDefault( FALSE );
connectBtn->setDefault( FALSE );
- layout->addMultiCellWidget( connectBtn, 1, 1, 0, 2 );
+ tqlayout->addMultiCellWidget( connectBtn, 1, 1, 0, 2 );
- newGroupBtn = new QPushButton( this, "newGroupBtn" );
+ newGroupBtn = new TQPushButton( this, "newGroupBtn" );
newGroupBtn->setEnabled( TRUE );
newGroupBtn->setText( i18n( "New &Group" ) );
newGroupBtn->setAutoDefault( FALSE );
newGroupBtn->setDefault( FALSE );
newGroupBtn->setFlat( FALSE );
- layout->addWidget( newGroupBtn, 0, 0 );
+ tqlayout->addWidget( newGroupBtn, 0, 0 );
- addBtn = new QPushButton( this, "addBtn" );
+ addBtn = new TQPushButton( this, "addBtn" );
addBtn->setEnabled( TRUE );
addBtn->setText( i18n( "New Connec&tion" ) );
addBtn->setAutoDefault( FALSE );
addBtn->setDefault( FALSE );
addBtn->setFlat( FALSE );
- layout->addWidget( addBtn, 0, 1 );
+ tqlayout->addWidget( addBtn, 0, 1 );
- remoteManBaseLayout->addLayout( layout, 6, 1 );
+ remoteManBaseLayout->addLayout( tqlayout, 6, 1 );
- Layout11 = new QGridLayout;
+ Layout11 = new TQGridLayout;
Layout11->setSpacing( 6 );
Layout11->setMargin( 0 );
- TextLabel1_2 = new QLabel( this, "TextLabel1_2" );
+ TextLabel1_2 = new TQLabel( this, "TextLabel1_2" );
TextLabel1_2->setText( i18n( "Host:" ) );
Layout11->addMultiCellWidget( TextLabel1_2, 0, 0, 0, 1 );
- QStringList protocols = KProtocolInfo::protocols();
+ TQStringList protocols = KProtocolInfo::protocols();
- protocol = new QComboBox( FALSE, this, "protocol" );
- if( protocols.contains("ftp") )
+ protocol = new TQComboBox( FALSE, this, "protocol" );
+ if( protocols.tqcontains("ftp") )
protocol->insertItem( i18n( "ftp://" ) );
- if( protocols.contains("smb") )
+ if( protocols.tqcontains("smb") )
protocol->insertItem( i18n( "smb://" ) );
- if( protocols.contains("fish") )
+ if( protocols.tqcontains("fish") )
protocol->insertItem( i18n( "fish://" ));
- if( protocols.contains("sftp") )
+ if( protocols.tqcontains("sftp") )
protocol->insertItem( i18n( "sftp://" ));
- protocol->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, protocol->sizePolicy().hasHeightForWidth() ) );
+ protocol->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, protocol->sizePolicy().hasHeightForWidth() ) );
Layout11->addWidget( protocol, 1, 0 );
- hostName = new QLineEdit( this, "hostName" );
- hostName->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, hostName->sizePolicy().hasHeightForWidth() ) );
- hostName->setMinimumSize( QSize( 0, 0 ) );
+ hostName = new TQLineEdit( this, "hostName" );
+ hostName->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, hostName->sizePolicy().hasHeightForWidth() ) );
+ hostName->setMinimumSize( TQSize( 0, 0 ) );
Layout11->addWidget( hostName, 1, 1 );
- portNum = new QSpinBox( this, "portNum" );
+ portNum = new TQSpinBox( this, "portNum" );
portNum->setMaxValue( 99999 );
portNum->setValue( 21 );
Layout11->addWidget( portNum, 1, 2 );
- TextLabel1_2_2 = new QLabel( this, "TextLabel1_2_2" );
+ TextLabel1_2_2 = new TQLabel( this, "TextLabel1_2_2" );
TextLabel1_2_2->setText( i18n( "Port: " ) );
Layout11->addWidget( TextLabel1_2_2, 0, 2 );
remoteManBaseLayout->addLayout( Layout11, 1, 1 );
- TextLabel1_4 = new QLabel( this, "TextLabel1_4" );
- QFont TextLabel1_4_font( TextLabel1_4->font() );
+ TextLabel1_4 = new TQLabel( this, "TextLabel1_4" );
+ TQFont TextLabel1_4_font( TextLabel1_4->font() );
TextLabel1_4_font.setPointSize( 10 );
TextLabel1_4->setFont( TextLabel1_4_font );
TextLabel1_4->setText( i18n( "* Warning: Storing your password is not secure !!!" ) );
- TextLabel1_4->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
+ TextLabel1_4->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
remoteManBaseLayout->addWidget( TextLabel1_4, 3, 1 );
// signals and slots connections
- connect( closeBtn, SIGNAL( clicked() ), this, SLOT( accept() ) );
- connect( addBtn, SIGNAL( clicked() ), this, SLOT( addSession() ) );
- connect( removeBtn, SIGNAL( clicked() ), this, SLOT( removeSession() ) );
- connect( sessions, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( refreshData() ) );
- connect( sessions, SIGNAL( selectionChanged() ), this, SLOT( refreshData() ) );
- connect( sessions, SIGNAL( expanded(QListViewItem*) ), this, SLOT( refreshData() ) );
- connect( sessions, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( refreshData() ) );
- connect( sessions, SIGNAL( mouseButtonClicked(int,QListViewItem*,const
-QPoint&,int) ), this, SLOT( refreshData() ) );
- connect( sessions, SIGNAL( collapsed(QListViewItem*) ), this, SLOT( refreshData() ) );
- connect( connectBtn, SIGNAL( clicked() ), this, SLOT( connection() ) );
- connect( sessionName, SIGNAL( textChanged(const QString&) ), this, SLOT( updateName(const QString&) ) );
- connect( newGroupBtn, SIGNAL( clicked() ), this, SLOT( addGroup() ) );
- connect( anonymous, SIGNAL( clicked() ), this, SLOT( refreshData() ) );
- connect( protocol, SIGNAL(activated(int)), this, SLOT(refreshData()));
+ connect( closeBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) );
+ connect( addBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addSession() ) );
+ connect( removeBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeSession() ) );
+ connect( sessions, TQT_SIGNAL( selectionChanged(TQListViewItem*) ), this, TQT_SLOT( refreshData() ) );
+ connect( sessions, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( refreshData() ) );
+ connect( sessions, TQT_SIGNAL( expanded(TQListViewItem*) ), this, TQT_SLOT( refreshData() ) );
+ connect( sessions, TQT_SIGNAL( currentChanged(TQListViewItem*) ), this, TQT_SLOT( refreshData() ) );
+ connect( sessions, TQT_SIGNAL( mouseButtonClicked(int,TQListViewItem*,const
+TQPoint&,int) ), this, TQT_SLOT( refreshData() ) );
+ connect( sessions, TQT_SIGNAL( collapsed(TQListViewItem*) ), this, TQT_SLOT( refreshData() ) );
+ connect( connectBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( connection() ) );
+ connect( sessionName, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( updateName(const TQString&) ) );
+ connect( newGroupBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addGroup() ) );
+ connect( anonymous, TQT_SIGNAL( clicked() ), this, TQT_SLOT( refreshData() ) );
+ connect( protocol, TQT_SIGNAL(activated(int)), this, TQT_SLOT(refreshData()));
// tab order
setTabOrder( sessionName, hostName );
@@ -275,18 +275,18 @@ QPoint&,int) ), this, SLOT( refreshData() ) );
*/
remoteManBase::~remoteManBase()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
/*
* Main event handler. Reimplemented to handle application
* font changes
*/
-bool remoteManBase::event( QEvent* ev )
+bool remoteManBase::event( TQEvent* ev )
{
- bool ret = QDialog::event( ev );
- if ( ev->type() == QEvent::ApplicationFontChange ) {
- QFont TextLabel1_4_font( TextLabel1_4->font() );
+ bool ret = TQDialog::event( ev );
+ if ( ev->type() == TQEvent::ApplicationFontChange ) {
+ TQFont TextLabel1_4_font( TextLabel1_4->font() );
TextLabel1_4_font.setPointSize( 10 );
TextLabel1_4->setFont( TextLabel1_4_font );
}
@@ -323,9 +323,9 @@ void remoteManBase::removeSession()
qWarning( "remoteManBase::removeSession(): Not implemented yet!" );
}
-void remoteManBase::updateName(const QString&)
+void remoteManBase::updateName(const TQString&)
{
- qWarning( "remoteManBase::updateName(const QString&): Not implemented yet!" );
+ qWarning( "remoteManBase::updateName(const TQString&): Not implemented yet!" );
}
#include "remotemanbase.moc"
diff --git a/krusader/RemoteMan/remotemanbase.h b/krusader/RemoteMan/remotemanbase.h
index 7fcc65e..527cd7c 100644
--- a/krusader/RemoteMan/remotemanbase.h
+++ b/krusader/RemoteMan/remotemanbase.h
@@ -9,53 +9,54 @@
#ifndef REMOTEMANBASE_H
#define REMOTEMANBASE_H
-#include <qvariant.h>
-#include <qdialog.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QCheckBox;
-class QComboBox;
-class QLabel;
-class QLineEdit;
-class QListView;
-class QListViewItem;
-class QMultiLineEdit;
-class QPushButton;
-class QSpinBox;
+#include <tqvariant.h>
+#include <tqdialog.h>
+class TQVBoxLayout;
+class TQHBoxLayout;
+class TQGridLayout;
+class TQCheckBox;
+class TQComboBox;
+class TQLabel;
+class TQLineEdit;
+class TQListView;
+class TQListViewItem;
+class TQMultiLineEdit;
+class TQPushButton;
+class TQSpinBox;
-class remoteManBase : public QDialog
+class remoteManBase : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- remoteManBase( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ remoteManBase( TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~remoteManBase();
- QLabel* TextLabel1;
- QLineEdit* sessionName;
- QPushButton* moreBtn;
- QPushButton* closeBtn;
- QListView* sessions;
- QLabel* TextLabel1_3_3;
- QLineEdit* password;
- QLabel* TextLabel1_3;
- QLineEdit* userName;
- QCheckBox* anonymous;
- QLabel* TextLabel1_3_2;
- QLineEdit* remoteDir;
- QLabel* TextLabel1_3_2_2;
- QMultiLineEdit* description;
- QPushButton* removeBtn;
- QPushButton* connectBtn;
- QPushButton* newGroupBtn;
- QPushButton* addBtn;
- QLabel* TextLabel1_2;
- QComboBox* protocol;
- QLineEdit* hostName;
- QSpinBox* portNum;
- QLabel* TextLabel1_2_2;
- QLabel* TextLabel1_4;
+ TQLabel* TextLabel1;
+ TQLineEdit* sessionName;
+ TQPushButton* moreBtn;
+ TQPushButton* closeBtn;
+ TQListView* sessions;
+ TQLabel* TextLabel1_3_3;
+ TQLineEdit* password;
+ TQLabel* TextLabel1_3;
+ TQLineEdit* userName;
+ TQCheckBox* anonymous;
+ TQLabel* TextLabel1_3_2;
+ TQLineEdit* remoteDir;
+ TQLabel* TextLabel1_3_2_2;
+ TQMultiLineEdit* description;
+ TQPushButton* removeBtn;
+ TQPushButton* connectBtn;
+ TQPushButton* newGroupBtn;
+ TQPushButton* addBtn;
+ TQLabel* TextLabel1_2;
+ TQComboBox* protocol;
+ TQLineEdit* hostName;
+ TQSpinBox* portNum;
+ TQLabel* TextLabel1_2_2;
+ TQLabel* TextLabel1_4;
public slots:
virtual void addSession();
@@ -64,19 +65,19 @@ public slots:
virtual void addGroup();
virtual void refreshData();
virtual void removeSession();
- virtual void updateName(const QString&);
+ virtual void updateName(const TQString&);
protected:
- QGridLayout* remoteManBaseLayout;
- QVBoxLayout* Layout23;
- QHBoxLayout* Layout12;
- QVBoxLayout* Layout9;
- QGridLayout* Layout10;
- QVBoxLayout* Layout26;
- QVBoxLayout* Layout27;
- QGridLayout* layout;
- QGridLayout* Layout11;
- bool event( QEvent* );
+ TQGridLayout* remoteManBaseLayout;
+ TQVBoxLayout* Layout23;
+ TQHBoxLayout* Layout12;
+ TQVBoxLayout* Layout9;
+ TQGridLayout* Layout10;
+ TQVBoxLayout* Layout26;
+ TQVBoxLayout* Layout27;
+ TQGridLayout* tqlayout;
+ TQGridLayout* Layout11;
+ bool event( TQEvent* );
};
#endif // REMOTEMANBASE_H
diff --git a/krusader/Search/krsearchdialog.cpp b/krusader/Search/krsearchdialog.cpp
index 632b78e..2422f6b 100644
--- a/krusader/Search/krsearchdialog.cpp
+++ b/krusader/Search/krsearchdialog.cpp
@@ -42,20 +42,20 @@
#include "krsearchdialog.h"
#include <kinputdialog.h>
-#include <qregexp.h>
-#include <qfontmetrics.h>
+#include <tqregexp.h>
+#include <tqfontmetrics.h>
#include <kmessagebox.h>
#include <kpopupmenu.h>
-#include <qcursor.h>
-#include <qclipboard.h>
-#include <qheader.h>
+#include <tqcursor.h>
+#include <tqclipboard.h>
+#include <tqheader.h>
#include <kurldrag.h>
#include <../kicons.h>
-class SearchListView : public QListView
+class SearchListView : public TQListView
{
public:
- SearchListView( QWidget * parent, const char * name ) : QListView( parent, name )
+ SearchListView( TQWidget * tqparent, const char * name ) : TQListView( tqparent, name )
{
}
@@ -63,12 +63,12 @@ public:
{
KURL::List urls;
- QListViewItem * item = firstChild();
+ TQListViewItem * item = firstChild();
while( item )
{
if( item->isSelected() )
{
- QString name = item->text(1);
+ TQString name = item->text(1);
name += (name.endsWith( "/" ) ? item->text(0) : "/" + item->text(0) );
urls.push_back( vfs::fromPathOrURL( name ) );
}
@@ -79,7 +79,7 @@ public:
return;
KURLDrag *d = new KURLDrag(urls, this);
- d->setPixmap( FL_LOADICON( "file" ), QPoint( -7, 0 ) );
+ d->setPixmap( FL_LOADICON( "file" ), TQPoint( -7, 0 ) );
d->dragCopy();
}
};
@@ -88,7 +88,7 @@ public:
KrSearchDialog *KrSearchDialog::SearchDialog = 0;
-QString KrSearchDialog::lastSearchText = "*";
+TQString KrSearchDialog::lastSearchText = "*";
int KrSearchDialog::lastSearchType = 0;
bool KrSearchDialog::lastSearchForCase = false;
bool KrSearchDialog::lastRemoteContentSearch = false;
@@ -99,43 +99,43 @@ bool KrSearchDialog::lastSearchInArchives = false;
bool KrSearchDialog::lastFollowSymLinks = false;
// class starts here /////////////////////////////////////////
-KrSearchDialog::KrSearchDialog( QString profile, QWidget* parent, const char* name, bool modal, WFlags fl )
- : QDialog( parent, name, modal, fl ), query(0), searcher(0)
+KrSearchDialog::KrSearchDialog( TQString profile, TQWidget* tqparent, const char* name, bool modal, WFlags fl )
+ : TQDialog( tqparent, name, modal, fl ), query(0), searcher(0)
{
setCaption( i18n( "Krusader::Search" ) );
- QGridLayout* searchBaseLayout = new QGridLayout( this );
+ TQGridLayout* searchBaseLayout = new TQGridLayout( this );
searchBaseLayout->setSpacing( 6 );
searchBaseLayout->setMargin( 11 );
// creating the dialog buttons ( Search, Stop, Close )
- QHBoxLayout* buttonsLayout = new QHBoxLayout();
+ TQHBoxLayout* buttonsLayout = new TQHBoxLayout();
buttonsLayout->setSpacing( 6 );
buttonsLayout->setMargin( 0 );
profileManager = new ProfileManager( "SearcherProfile", this, "profileManager" );
buttonsLayout->addWidget( profileManager );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
buttonsLayout->addItem( spacer );
- mainFeedToListBoxBtn = new QPushButton( this, "mainFeedToListBoxBtn" );
+ mainFeedToListBoxBtn = new TQPushButton( this, "mainFeedToListBoxBtn" );
mainFeedToListBoxBtn->setText( i18n( "Feed to listbox" ) );
mainFeedToListBoxBtn->setEnabled(false);
buttonsLayout->addWidget( mainFeedToListBoxBtn );
- mainSearchBtn = new QPushButton( this, "mainSearchBtn" );
+ mainSearchBtn = new TQPushButton( this, "mainSearchBtn" );
mainSearchBtn->setText( i18n( "Search" ) );
mainSearchBtn->setDefault(true);
buttonsLayout->addWidget( mainSearchBtn );
- mainStopBtn = new QPushButton( this, "mainStopBtn" );
+ mainStopBtn = new TQPushButton( this, "mainStopBtn" );
mainStopBtn->setEnabled( false );
mainStopBtn->setText( i18n( "Stop" ) );
buttonsLayout->addWidget( mainStopBtn );
- mainCloseBtn = new QPushButton( this, "mainCloseBtn" );
+ mainCloseBtn = new TQPushButton( this, "mainCloseBtn" );
mainCloseBtn->setText( i18n( "Close" ) );
buttonsLayout->addWidget( mainCloseBtn );
@@ -143,32 +143,32 @@ KrSearchDialog::KrSearchDialog( QString profile, QWidget* parent, const char* n
// creating the searcher tabs
- searcherTabs = new QTabWidget( this, "searcherTabs" );
+ searcherTabs = new TQTabWidget( this, "searcherTabs" );
filterTabs = FilterTabs::addTo( searcherTabs, FilterTabs::Default | FilterTabs::HasRemoteContentSearch );
generalFilter = (GeneralFilter *)filterTabs->get( "GeneralFilter" );
- resultTab = new QWidget( searcherTabs, "resultTab" );
- resultLayout = new QGridLayout( resultTab );
+ resultTab = new TQWidget( searcherTabs, "resultTab" );
+ resultLayout = new TQGridLayout( resultTab );
resultLayout->setSpacing( 6 );
resultLayout->setMargin( 11 );
// creating the result tab
- QHBoxLayout* resultLabelLayout = new QHBoxLayout();
+ TQHBoxLayout* resultLabelLayout = new TQHBoxLayout();
resultLabelLayout->setSpacing( 6 );
resultLabelLayout->setMargin( 0 );
- foundLabel = new QLabel( resultTab, "foundLabel" );
- foundLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, foundLabel->sizePolicy().hasHeightForWidth() ) );
- foundLabel->setFrameShape( QLabel::StyledPanel );
- foundLabel->setFrameShadow( QLabel::Sunken );
+ foundLabel = new TQLabel( resultTab, "foundLabel" );
+ foundLabel->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, foundLabel->sizePolicy().hasHeightForWidth() ) );
+ foundLabel->setFrameShape( TQLabel::StyledPanel );
+ foundLabel->setFrameShadow( TQLabel::Sunken );
foundLabel->setText( i18n( "Found 0 matches." ) );
resultLabelLayout->addWidget( foundLabel );
searchingLabel = new KSqueezedTextLabel( resultTab, "searchingLabel" );
- searchingLabel->setFrameShape( QLabel::StyledPanel );
- searchingLabel->setFrameShadow( QLabel::Sunken );
+ searchingLabel->setFrameShape( TQLabel::StyledPanel );
+ searchingLabel->setFrameShadow( TQLabel::Sunken );
searchingLabel->setText( "" );
resultLabelLayout->addWidget( searchingLabel );
@@ -184,20 +184,20 @@ KrSearchDialog::KrSearchDialog( QString profile, QWidget* parent, const char* n
resultsList->addColumn( i18n( "Permissions" ) );
resultsList->setSorting(1); // sort by location
- resultsList->setSelectionMode( QListView::Extended );
+ resultsList->setSelectionMode( TQListView::Extended );
// fix the results list
// => make the results font smaller
- QFont resultsFont( resultsList->font() );
+ TQFont resultsFont( resultsList->font() );
resultsFont.setPointSize(resultsFont.pointSize()-1);
resultsList->setFont(resultsFont);
resultsList->setAllColumnsShowFocus(true);
for (int i=0; i<5; ++i) // don't let it resize automatically
- resultsList->setColumnWidthMode(i, QListView::Manual);
+ resultsList->setColumnWidthMode(i, TQListView::Manual);
- int i=QFontMetrics(resultsList->font()).width("W");
- int j=QFontMetrics(resultsList->font()).width("0");
+ int i=TQFontMetrics(resultsList->font()).width("W");
+ int j=TQFontMetrics(resultsList->font()).width("0");
j=(i>j ? i : j);
resultsList->setColumnWidth(0, krConfig->readNumEntry("Name Width", j*14) );
@@ -211,20 +211,20 @@ KrSearchDialog::KrSearchDialog( QString profile, QWidget* parent, const char* n
resultLayout->addWidget( resultsList, 0, 0 );
- QHBoxLayout* foundTextLayout = new QHBoxLayout();
+ TQHBoxLayout* foundTextLayout = new TQHBoxLayout();
foundTextLayout->setSpacing( 6 );
foundTextLayout->setMargin( 0 );
- QLabel *l1 = new QLabel(resultTab);
- l1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, l1->sizePolicy().hasHeightForWidth() ) );
- l1->setFrameShape( QLabel::StyledPanel );
- l1->setFrameShadow( QLabel::Sunken );
+ TQLabel *l1 = new TQLabel(resultTab);
+ l1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, l1->sizePolicy().hasHeightForWidth() ) );
+ l1->setFrameShape( TQLabel::StyledPanel );
+ l1->setFrameShadow( TQLabel::Sunken );
l1->setText(i18n("Text found:"));
foundTextLayout->addWidget( l1 );
foundTextLabel = new KrSqueezedTextLabel(resultTab);
- foundTextLabel->setFrameShape( QLabel::StyledPanel );
- foundTextLabel->setFrameShadow( QLabel::Sunken );
+ foundTextLabel->setFrameShape( TQLabel::StyledPanel );
+ foundTextLabel->setFrameShadow( TQLabel::Sunken );
foundTextLabel->setText("");
foundTextLayout->addWidget( foundTextLabel );
resultLayout->addLayout(foundTextLayout, 1, 0);
@@ -235,22 +235,22 @@ KrSearchDialog::KrSearchDialog( QString profile, QWidget* parent, const char* n
// signals and slots connections
- connect( mainSearchBtn, SIGNAL( clicked() ), this, SLOT( startSearch() ) );
- connect( mainStopBtn, SIGNAL( clicked() ), this, SLOT( stopSearch() ) );
- connect( resultsList, SIGNAL( returnPressed(QListViewItem*) ), this,
- SLOT( resultDoubleClicked(QListViewItem*) ) );
- connect( resultsList, SIGNAL( doubleClicked(QListViewItem*) ), this,
- SLOT( resultDoubleClicked(QListViewItem*) ) );
- connect( resultsList, SIGNAL( currentChanged(QListViewItem*) ), this,
- SLOT( resultClicked(QListViewItem*) ) );
- connect( resultsList, SIGNAL( clicked(QListViewItem*) ), this,
- SLOT( resultClicked(QListViewItem*) ) );
- connect( resultsList, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), this, SLOT( rightClickMenu(QListViewItem*, const QPoint&, int) ) );
- connect( mainCloseBtn, SIGNAL( clicked() ), this, SLOT( closeDialog() ) );
- connect( mainFeedToListBoxBtn, SIGNAL( clicked() ), this, SLOT( feedToListBox() ) );
-
- connect( profileManager, SIGNAL( loadFromProfile( QString ) ), filterTabs, SLOT( loadFromProfile( QString ) ) );
- connect( profileManager, SIGNAL( saveToProfile( QString ) ), filterTabs, SLOT( saveToProfile( QString ) ) );
+ connect( mainSearchBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( startSearch() ) );
+ connect( mainStopBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( stopSearch() ) );
+ connect( resultsList, TQT_SIGNAL( returnPressed(TQListViewItem*) ), this,
+ TQT_SLOT( resultDoubleClicked(TQListViewItem*) ) );
+ connect( resultsList, TQT_SIGNAL( doubleClicked(TQListViewItem*) ), this,
+ TQT_SLOT( resultDoubleClicked(TQListViewItem*) ) );
+ connect( resultsList, TQT_SIGNAL( currentChanged(TQListViewItem*) ), this,
+ TQT_SLOT( resultClicked(TQListViewItem*) ) );
+ connect( resultsList, TQT_SIGNAL( clicked(TQListViewItem*) ), this,
+ TQT_SLOT( resultClicked(TQListViewItem*) ) );
+ connect( resultsList, TQT_SIGNAL( rightButtonClicked(TQListViewItem*,const TQPoint&,int) ), this, TQT_SLOT( rightClickMenu(TQListViewItem*, const TQPoint&, int) ) );
+ connect( mainCloseBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeDialog() ) );
+ connect( mainFeedToListBoxBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( feedToListBox() ) );
+
+ connect( profileManager, TQT_SIGNAL( loadFromProfile( TQString ) ), filterTabs, TQT_SLOT( loadFromProfile( TQString ) ) );
+ connect( profileManager, TQT_SIGNAL( saveToProfile( TQString ) ), filterTabs, TQT_SLOT( saveToProfile( TQString ) ) );
// tab order
@@ -331,9 +331,9 @@ void KrSearchDialog::closeDialog( bool isAccept )
SearchDialog = 0;
if( isAccept )
- QDialog::accept();
+ TQDialog::accept();
else
- QDialog::reject();
+ TQDialog::reject();
this->deleteLater();
}
@@ -342,7 +342,7 @@ void KrSearchDialog::reject() {
closeDialog( false );
}
-void KrSearchDialog::resizeEvent( QResizeEvent *e )
+void KrSearchDialog::resizeEvent( TQResizeEvent *e )
{
if( !isMaximized() )
{
@@ -351,13 +351,13 @@ void KrSearchDialog::resizeEvent( QResizeEvent *e )
}
}
-void KrSearchDialog::found(QString what, QString where, KIO::filesize_t size, time_t mtime, QString perm, QString foundText){
+void KrSearchDialog::found(TQString what, TQString where, KIO::filesize_t size, time_t mtime, TQString perm, TQString foundText){
// convert the time_t to struct tm
struct tm* t=localtime((time_t *)&mtime);
- QDateTime tmp(QDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), QTime(t->tm_hour, t->tm_min));
+ TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min));
ResultListViewItem *it =new ResultListViewItem(resultsList, what,
- where.replace(QRegExp("\\\\"),"#"), size, tmp, perm);
- QString totals = QString(i18n("Found %1 matches.")).arg(resultsList->childCount());
+ where.tqreplace(TQRegExp("\\\\"),"#"), size, tmp, perm);
+ TQString totals = TQString(i18n("Found %1 matches.")).tqarg(resultsList->childCount());
foundLabel->setText(totals);
if (!foundText.isEmpty()) it->setFoundText(foundText);
@@ -395,7 +395,7 @@ void KrSearchDialog::startSearch() {
foundLabel->setText(i18n("Found 0 matches."));
searcherTabs->setCurrentPage(2); // show the results page
foundTextLabel->setText("");
- qApp->processEvents();
+ tqApp->processEvents();
// start the search.
if (searcher != 0) {
@@ -403,11 +403,11 @@ void KrSearchDialog::startSearch() {
searcher = 0;
}
searcher = new KRSearchMod(query);
- connect(searcher, SIGNAL(searching(const QString&)),
- searchingLabel, SLOT(setText(const QString&)));
- connect(searcher, SIGNAL(found(QString,QString,KIO::filesize_t,time_t,QString,QString)),
- this, SLOT(found(QString,QString,KIO::filesize_t,time_t,QString,QString)));
- connect(searcher, SIGNAL(finished()), this, SLOT(stopSearch()));
+ connect(searcher, TQT_SIGNAL(searching(const TQString&)),
+ searchingLabel, TQT_SLOT(setText(const TQString&)));
+ connect(searcher, TQT_SIGNAL(found(TQString,TQString,KIO::filesize_t,time_t,TQString,TQString)),
+ this, TQT_SLOT(found(TQString,TQString,KIO::filesize_t,time_t,TQString,TQString)));
+ connect(searcher, TQT_SIGNAL(finished()), this, TQT_SLOT(stopSearch()));
isSearching = true;
searcher->start();
@@ -433,37 +433,37 @@ void KrSearchDialog::stopSearch() {
searchingLabel->setText(i18n("Finished searching."));
}
-void KrSearchDialog::resultDoubleClicked(QListViewItem* i) {
+void KrSearchDialog::resultDoubleClicked(TQListViewItem* i) {
ACTIVE_FUNC->openUrl(vfs::fromPathOrURL(i->text(1)),i->text(0));
showMinimized();
}
-void KrSearchDialog::resultClicked(QListViewItem* i) {
+void KrSearchDialog::resultClicked(TQListViewItem* i) {
ResultListViewItem *it = dynamic_cast<ResultListViewItem*>(i);
if( it == 0 )
return;
if (!it->foundText().isEmpty()) {
// ugly hack: find the <b> and </b> in the text, then
// use it to set the are which we don't want squeezed
- int idx = it->foundText().find("<b>")-4; // take "<qt>" into account
- int length = it->foundText().find("</b>")-idx+4;
+ int idx = it->foundText().tqfind("<b>")-4; // take "<qt>" into account
+ int length = it->foundText().tqfind("</b>")-idx+4;
foundTextLabel->setText(it->foundText(), idx, length);
}
}
-void KrSearchDialog::closeEvent(QCloseEvent *e)
+void KrSearchDialog::closeEvent(TQCloseEvent *e)
{ /* if searching is in progress we must not close the window */
- if( isSearching ) /* because qApp->processEvents() is called by the searcher and */
+ if( isSearching ) /* because tqApp->processEvents() is called by the searcher and */
{ /* at window desruction, the searcher object will be deleted */
stopSearch(); /* instead we stop searching */
closed = true; /* and after stopping: startSearch can close the window */
e->ignore(); /* ignoring the close event */
}
else
- QDialog::closeEvent( e ); /* if no searching, let QDialog handle the event */
+ TQDialog::closeEvent( e ); /* if no searching, let TQDialog handle the event */
}
-void KrSearchDialog::keyPressEvent(QKeyEvent *e)
+void KrSearchDialog::keyPressEvent(TQKeyEvent *e)
{
KKey pressedKey( e );
@@ -476,15 +476,15 @@ void KrSearchDialog::keyPressEvent(QKeyEvent *e)
{
if( e->key() == Key_F4 )
{
- if (!generalFilter->containsText->currentText().isEmpty() && QApplication::clipboard()->text() != generalFilter->containsText->currentText())
- QApplication::clipboard()->setText(generalFilter->containsText->currentText());
+ if (!generalFilter->containsText->currentText().isEmpty() && TQApplication::tqclipboard()->text() != generalFilter->containsText->currentText())
+ TQApplication::tqclipboard()->setText(generalFilter->containsText->currentText());
editCurrent();
return;
}
else if( e->key() == Key_F3 )
{
- if (!generalFilter->containsText->currentText().isEmpty() && QApplication::clipboard()->text() != generalFilter->containsText->currentText())
- QApplication::clipboard()->setText(generalFilter->containsText->currentText());
+ if (!generalFilter->containsText->currentText().isEmpty() && TQApplication::tqclipboard()->text() != generalFilter->containsText->currentText())
+ TQApplication::tqclipboard()->setText(generalFilter->containsText->currentText());
viewCurrent();
return;
}
@@ -495,15 +495,15 @@ void KrSearchDialog::keyPressEvent(QKeyEvent *e)
}
}
- QDialog::keyPressEvent( e );
+ TQDialog::keyPressEvent( e );
}
void KrSearchDialog::editCurrent()
{
- QListViewItem *current = resultsList->currentItem();
+ TQListViewItem *current = resultsList->currentItem();
if( current )
{
- QString name = current->text(1);
+ TQString name = current->text(1);
name += (name.endsWith( "/" ) ? current->text(0) : "/" + current->text(0) );
KURL url = vfs::fromPathOrURL( name );
KrViewer::edit( url, this );
@@ -512,17 +512,17 @@ void KrSearchDialog::editCurrent()
void KrSearchDialog::viewCurrent()
{
- QListViewItem *current = resultsList->currentItem();
+ TQListViewItem *current = resultsList->currentItem();
if( current )
{
- QString name = current->text(1);
+ TQString name = current->text(1);
name += (name.endsWith( "/" ) ? current->text(0) : "/" + current->text(0) );
KURL url = vfs::fromPathOrURL( name );
KrViewer::view( url, this );
}
}
-void KrSearchDialog::rightClickMenu(QListViewItem *item, const QPoint&, int)
+void KrSearchDialog::rightClickMenu(TQListViewItem *item, const TQPoint&, int)
{
// these are the values that will exist in the menu
#define EDIT_FILE_ID 110
@@ -540,7 +540,7 @@ void KrSearchDialog::rightClickMenu(QListViewItem *item, const QPoint&, int)
popup.insertItem(i18n("Edit File (F4)"), EDIT_FILE_ID);
popup.insertItem(i18n("Copy selected to clipboard"),COPY_SELECTED_TO_CLIPBOARD);
- int result=popup.exec(QCursor::pos());
+ int result=popup.exec(TQCursor::pos());
// check out the user's option
switch (result)
@@ -566,9 +566,9 @@ void KrSearchDialog::feedToListBox()
krConfig->setGroup( "Search" );
int listBoxNum = krConfig->readNumEntry( "Feed To Listbox Counter", 1 );
- QString queryName;
+ TQString queryName;
do {
- queryName = i18n("Search results")+QString( " %1" ).arg( listBoxNum++ );
+ queryName = i18n("Search results")+TQString( " %1" ).tqarg( listBoxNum++ );
}while( v.vfs_search( queryName ) != 0 );
krConfig->writeEntry( "Feed To Listbox Counter", listBoxNum );
@@ -585,15 +585,15 @@ void KrSearchDialog::feedToListBox()
}
KURL::List urlList;
- QListViewItem * item = resultsList->firstChild();
+ TQListViewItem * item = resultsList->firstChild();
while( item )
{
- QString name = item->text(1);
+ TQString name = item->text(1);
name += (name.endsWith( "/" ) ? item->text(0) : "/" + item->text(0) );
urlList.push_back( vfs::fromPathOrURL( name ) );
item = item->nextSibling();
}
- KURL url = KURL::fromPathOrURL( QString("virt:/") + queryName );
+ KURL url = KURL::fromPathOrURL( TQString("virt:/") + queryName );
v.vfs_refresh( url );
v.vfs_addFiles( &urlList, KIO::CopyJob::Copy, 0 );
//ACTIVE_FUNC->openUrl(url);
@@ -605,12 +605,12 @@ void KrSearchDialog::copyToClipBoard()
{
KURL::List urls;
- QListViewItem * item = resultsList->firstChild();
+ TQListViewItem * item = resultsList->firstChild();
while( item )
{
if( item->isSelected() )
{
- QString name = item->text(1);
+ TQString name = item->text(1);
name += (name.endsWith( "/" ) ? item->text(0) : "/" + item->text(0) );
urls.push_back( vfs::fromPathOrURL( name ) );
}
@@ -621,8 +621,8 @@ void KrSearchDialog::copyToClipBoard()
return;
KURLDrag *d = new KURLDrag(urls, this);
- d->setPixmap( FL_LOADICON( "file" ), QPoint( -7, 0 ) );
- QApplication::clipboard()->setData( d );
+ d->setPixmap( FL_LOADICON( "file" ), TQPoint( -7, 0 ) );
+ TQApplication::tqclipboard()->setData( d );
}
#include "krsearchdialog.moc"
diff --git a/krusader/Search/krsearchdialog.h b/krusader/Search/krsearchdialog.h
index 7bd78c0..dbe14f3 100644
--- a/krusader/Search/krsearchdialog.h
+++ b/krusader/Search/krsearchdialog.h
@@ -40,22 +40,23 @@
#include "krsearchmod.h"
#include "../GUI/profilemanager.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <ksqueezedtextlabel.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <sys/types.h>
#include <time.h>
-#include <qstring.h>
-#include <qtabwidget.h>
-#include <qlistview.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqtabwidget.h>
+#include <tqlistview.h>
+#include <tqstringlist.h>
#include <kglobal.h>
#include <klocale.h>
-class KrSearchDialog : public QDialog {
+class KrSearchDialog : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- KrSearchDialog(QString profile = 0, QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
+ KrSearchDialog(TQString profile = 0, TQWidget* tqparent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
void prepareGUI();
@@ -66,15 +67,15 @@ public slots:
void stopSearch();
void feedToListBox();
void copyToClipBoard();
- void found(QString what, QString where, KIO::filesize_t size, time_t mtime, QString perm, QString foundText);
+ void found(TQString what, TQString where, KIO::filesize_t size, time_t mtime, TQString perm, TQString foundText);
void closeDialog( bool isAccept = true );
- void resultDoubleClicked(QListViewItem*);
- void resultClicked(QListViewItem*);
+ void resultDoubleClicked(TQListViewItem*);
+ void resultClicked(TQListViewItem*);
- virtual void keyPressEvent(QKeyEvent *e);
- virtual void closeEvent(QCloseEvent *e);
- virtual void rightClickMenu(QListViewItem*, const QPoint&, int);
- virtual void resizeEvent( QResizeEvent *e );
+ virtual void keyPressEvent(TQKeyEvent *e);
+ virtual void closeEvent(TQCloseEvent *e);
+ virtual void rightClickMenu(TQListViewItem*, const TQPoint&, int);
+ virtual void resizeEvent( TQResizeEvent *e );
protected slots:
void reject();
@@ -90,28 +91,28 @@ private:
FilterTabs * filterTabs;
GeneralFilter * generalFilter;
- QPushButton* mainHelpBtn;
- QPushButton* mainSearchBtn;
- QPushButton* mainStopBtn;
- QPushButton* mainCloseBtn;
- QPushButton* mainFeedToListBoxBtn;
+ TQPushButton* mainHelpBtn;
+ TQPushButton* mainSearchBtn;
+ TQPushButton* mainStopBtn;
+ TQPushButton* mainCloseBtn;
+ TQPushButton* mainFeedToListBoxBtn;
- QTabWidget* searcherTabs;
- QWidget* resultTab;
- QGridLayout* resultLayout;
- QLabel* foundLabel;
+ TQTabWidget* searcherTabs;
+ TQWidget* resultTab;
+ TQGridLayout* resultLayout;
+ TQLabel* foundLabel;
KrSqueezedTextLabel *foundTextLabel;
KSqueezedTextLabel *searchingLabel;
- QListView* resultsList;
+ TQListView* resultsList;
KRQuery *query;
KRSearchMod *searcher;
- QStringList savedSearches;
+ TQStringList savedSearches;
bool isSearching;
bool closed;
- static QString lastSearchText;
+ static TQString lastSearchText;
static int lastSearchType;
static bool lastSearchForCase;
static bool lastRemoteContentSearch;
@@ -125,11 +126,11 @@ private:
int sizeY;
};
-class ResultListViewItem : public QListViewItem
+class ResultListViewItem : public TQListViewItem
{
public:
- ResultListViewItem( QListView *resultsList, QString name, QString where, KIO::filesize_t size,
- QDateTime date, QString perm ) : QListViewItem( resultsList, name, where,
+ ResultListViewItem( TQListView *resultsList, TQString name, TQString where, KIO::filesize_t size,
+ TQDateTime date, TQString perm ) : TQListViewItem( resultsList, name, where,
KRpermHandler::parseSize(size),
KGlobal::locale()->formatDateTime( date ), perm )
{
@@ -138,10 +139,10 @@ public:
setDragEnabled( true );
}
- void setFoundText(QString text) { _foundText=text; }
- const QString& foundText() const { return _foundText; }
+ void setFoundText(TQString text) { _foundText=text; }
+ const TQString& foundText() const { return _foundText; }
- virtual int compare(QListViewItem *i,int col,bool ascending ) const
+ virtual int compare(TQListViewItem *i,int col,bool ascending ) const
{
if( col == 2 ) {
ResultListViewItem *other = (ResultListViewItem *)i;
@@ -155,7 +156,7 @@ public:
}
if( col == 3 ) {
ResultListViewItem *other = (ResultListViewItem *)i;
- QDateTime otherDate = other->getDate();
+ TQDateTime otherDate = other->getDate();
if( fileDate == otherDate )
return 0;
@@ -163,21 +164,21 @@ public:
return 1;
return -1;
}
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
}
KIO::filesize_t getSize() {
return fileSize;
}
- QDateTime getDate() {
+ TQDateTime getDate() {
return fileDate;
}
private:
KIO::filesize_t fileSize;
- QDateTime fileDate;
- QString _foundText;
+ TQDateTime fileDate;
+ TQString _foundText;
};
#endif
diff --git a/krusader/Search/krsearchmod.cpp b/krusader/Search/krsearchmod.cpp
index c4e8fdd..9d42662 100644
--- a/krusader/Search/krsearchmod.cpp
+++ b/krusader/Search/krsearchmod.cpp
@@ -37,14 +37,14 @@
#include "../VFS/krarchandler.h"
#include <klocale.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <sys/types.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <klargefile.h>
#include <kurlrequesterdlg.h>
@@ -56,10 +56,10 @@ KRSearchMod::KRSearchMod( const KRQuery* q )
{
stopSearch = false; /// ===> added
query = new KRQuery( *q );
- connect( query, SIGNAL( status( const QString & ) ),
- this, SIGNAL( searching(const QString&) ) );
- connect( query, SIGNAL( processEvents( bool & ) ),
- this, SLOT ( slotProcessEvents( bool & ) ) );
+ connect( query, TQT_SIGNAL( status( const TQString & ) ),
+ this, TQT_SIGNAL( searching(const TQString&) ) );
+ connect( query, TQT_SIGNAL( processEvents( bool & ) ),
+ this, TQT_SLOT ( slotProcessEvents( bool & ) ) );
remote_vfs = 0;
virtual_vfs = 0;
@@ -106,11 +106,11 @@ void KRSearchMod::scanURL( KURL url )
if( stopSearch ) return;
if( query->isExcluded( urlToCheck ) ) {
- if( !query->searchInDirs().contains( urlToCheck ) )
+ if( !query->searchInDirs().tqcontains( urlToCheck ) )
continue;
}
- if( scannedUrls.contains( urlToCheck ) )
+ if( scannedUrls.tqcontains( urlToCheck ) )
continue;
scannedUrls.push( urlToCheck );
@@ -125,7 +125,7 @@ void KRSearchMod::scanURL( KURL url )
void KRSearchMod::scanLocalDir( KURL urlToScan )
{
- QString dir = urlToScan.path( 1 );
+ TQString dir = urlToScan.path( 1 );
DIR* d = opendir( dir.local8Bit() );
if ( !d ) return ;
@@ -134,7 +134,7 @@ void KRSearchMod::scanLocalDir( KURL urlToScan )
while ( ( dirEnt = readdir( d ) ) != NULL )
{
- QString name = QString::fromLocal8Bit( dirEnt->d_name );
+ TQString name = TQString::fromLocal8Bit( dirEnt->d_name );
// we dont scan the ".",".." enteries
if ( name == "." || name == ".." ) continue;
@@ -144,12 +144,12 @@ void KRSearchMod::scanLocalDir( KURL urlToScan )
KURL url = vfs::fromPathOrURL( dir + name );
- QString mime = QString::null;
+ TQString mime = TQString();
if ( query->searchInArchives() || !query->hasMimeType() )
mime = KMimeType::findByURL( url, stat_p.st_mode, true, false ) ->name();
// creating a vfile object for matching with krquery
- vfile * vf = new vfile(name, (KIO::filesize_t)stat_p.st_size, KRpermHandler::mode2QString(stat_p.st_mode),
+ vfile * vf = new vfile(name, (KIO::filesize_t)stat_p.st_size, KRpermHandler::mode2TQString(stat_p.st_mode),
stat_p.st_mtime, S_ISLNK(stat_p.st_mode), stat_p.st_uid, stat_p.st_gid,
mime, "", stat_p.st_mode);
vf->vfile_setUrl( url );
@@ -157,20 +157,20 @@ void KRSearchMod::scanLocalDir( KURL urlToScan )
if ( query->isRecursive() )
{
if ( S_ISLNK( stat_p.st_mode ) && query->followLinks() )
- unScannedUrls.push( vfs::fromPathOrURL( QDir( dir + name ).canonicalPath() ) );
+ unScannedUrls.push( vfs::fromPathOrURL( TQDir( dir + name ).canonicalPath() ) );
else if ( S_ISDIR( stat_p.st_mode ) )
unScannedUrls.push( url );
}
if ( query->searchInArchives() )
{
- QString type = mime.right( 4 );
- if ( mime.contains( "-rar" ) ) type = "-rar";
+ TQString type = mime.right( 4 );
+ if ( mime.tqcontains( "-rar" ) ) type = "-rar";
if ( KRarcHandler::arcSupported( type ) )
{
KURL archiveURL = url;
bool encrypted;
- QString realType = KRarcHandler::getType( encrypted, url.path(), mime );
+ TQString realType = KRarcHandler::getType( encrypted, url.path(), mime );
if( !encrypted ) {
if ( realType == "-tbz" || realType == "-tgz" || realType == "tarz" || realType == "-tar" )
@@ -187,12 +187,12 @@ void KRSearchMod::scanLocalDir( KURL urlToScan )
{
// if we got here - we got a winner
results.append( dir + name );
- emit found( name, dir, ( KIO::filesize_t ) stat_p.st_size, stat_p.st_mtime, KRpermHandler::mode2QString( stat_p.st_mode ), query->foundText() );
+ emit found( name, dir, ( KIO::filesize_t ) stat_p.st_size, stat_p.st_mtime, KRpermHandler::mode2TQString( stat_p.st_mode ), query->foundText() );
}
delete vf;
if( timer.elapsed() >= EVENT_PROCESS_DELAY ) {
- qApp->processEvents();
+ tqApp->processEvents();
timer.start();
if( stopSearch ) return;
}
@@ -223,7 +223,7 @@ void KRSearchMod::scanRemoteDir( KURL url )
for ( vfile * vf = vfs_->vfs_getFirstFile(); vf != 0 ; vf = vfs_->vfs_getNextFile() )
{
- QString name = vf->vfile_getName();
+ TQString name = vf->vfile_getName();
KURL fileURL = vfs_->vfs_getFile( name );
if ( query->isRecursive() && (( vf->vfile_isSymLink() && query->followLinks() ) || vf->vfile_isDir() ) )
@@ -238,7 +238,7 @@ void KRSearchMod::scanRemoteDir( KURL url )
}
if( timer.elapsed() >= EVENT_PROCESS_DELAY ) {
- qApp->processEvents();
+ tqApp->processEvents();
timer.start();
if( stopSearch ) return;
}
@@ -246,7 +246,7 @@ void KRSearchMod::scanRemoteDir( KURL url )
}
void KRSearchMod::slotProcessEvents( bool & stopped ) {
- qApp->processEvents();
+ tqApp->processEvents();
stopped = stopSearch;
}
diff --git a/krusader/Search/krsearchmod.h b/krusader/Search/krsearchmod.h
index 8d66df4..640b614 100644
--- a/krusader/Search/krsearchmod.h
+++ b/krusader/Search/krsearchmod.h
@@ -33,10 +33,10 @@
#ifndef KRSEARCHMOD_H
#define KRSEARCHMOD_H
-#include <qobject.h>
-#include <qvaluestack.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqvaluestack.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#include <time.h>
#include <kio/global.h>
#include <kurl.h>
@@ -47,8 +47,9 @@
class KRQuery;
class ftp_vfs;
-class KRSearchMod : public QObject {
+class KRSearchMod : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
KRSearchMod(const KRQuery *q);
~KRSearchMod();
@@ -63,23 +64,23 @@ private:
signals:
void finished();
- void searching(const QString&);
- void found(QString what, QString where, KIO::filesize_t size, time_t mtime, QString perm, QString textFound);
+ void searching(const TQString&);
+ void found(TQString what, TQString where, KIO::filesize_t size, time_t mtime, TQString perm, TQString textFound);
private slots:
void slotProcessEvents( bool & stopped );
private:
bool stopSearch;
- QValueStack<KURL> scannedUrls;
- QValueStack<KURL> unScannedUrls;
+ TQValueStack<KURL> scannedUrls;
+ TQValueStack<KURL> unScannedUrls;
KRQuery *query;
- QStringList results;
+ TQStringList results;
ftp_vfs *remote_vfs;
virt_vfs *virtual_vfs;
- QTime timer;
+ TQTime timer;
};
#endif
diff --git a/krusader/Splitter/combiner.cpp b/krusader/Splitter/combiner.cpp
index e32db05..32529b8 100644
--- a/krusader/Splitter/combiner.cpp
+++ b/krusader/Splitter/combiner.cpp
@@ -34,10 +34,10 @@
#include <kmessagebox.h>
#include <kfileitem.h>
#include <kio/job.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
-Combiner::Combiner( QWidget* parent, KURL baseURLIn, KURL destinationURLIn, bool unixNamingIn ) :
- QProgressDialog( parent, "Krusader::Combiner", true, 0 ), baseURL( baseURLIn ), destinationURL( destinationURLIn ),
+Combiner::Combiner( TQWidget* tqparent, KURL baseURLIn, KURL destinationURLIn, bool unixNamingIn ) :
+ TQProgressDialog( tqparent, "Krusader::Combiner", true, 0 ), baseURL( baseURLIn ), destinationURL( destinationURLIn ),
hasValidSplitFile( false ), fileCounter ( 0 ), permissions( -1 ), receivedSize( 0 ),
combineReadJob( 0 ), combineWriteJob( 0 ), unixNaming( unixNamingIn )
{
@@ -59,7 +59,7 @@ Combiner::~Combiner()
void Combiner::combine()
{
setCaption( i18n("Krusader::Combining...") );
- setLabelText( i18n("Combining the file %1...").arg( vfs::pathOrURL( baseURL ) ));
+ setLabelText( i18n("Combining the file %1...").tqarg( vfs::pathOrURL( baseURL ) ));
/* check whether the .crc file exists */
splURL = baseURL;
@@ -71,7 +71,7 @@ void Combiner::combine()
{
int ret = KMessageBox::questionYesNo(0, i18n("The CRC information file (%1) is missing!\n"
"Validity checking is impossible without it. Continue combining?")
- .arg( vfs::pathOrURL( splURL ) ) );
+ .tqarg( vfs::pathOrURL( splURL ) ) );
if( ret == KMessageBox::No )
{
@@ -83,45 +83,45 @@ void Combiner::combine()
}
else
{
- permissions = file.permissions() | QFileInfo::WriteUser;
+ permissions = file.permissions() | TQFileInfo::WriteUser;
combineReadJob = KIO::get( splURL, false, false );
- connect(combineReadJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(combineSplitFileDataReceived(KIO::Job *, const QByteArray &)));
- connect(combineReadJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(combineSplitFileFinished(KIO::Job *)));
+ connect(combineReadJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(combineSplitFileDataReceived(KIO::Job *, const TQByteArray &)));
+ connect(combineReadJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(combineSplitFileFinished(KIO::Job *)));
}
exec();
}
-void Combiner::combineSplitFileDataReceived(KIO::Job *, const QByteArray &byteArray)
+void Combiner::combineSplitFileDataReceived(KIO::Job *, const TQByteArray &byteArray)
{
- splitFile += QString( byteArray );
+ splitFile += TQString( byteArray );
}
void Combiner::combineSplitFileFinished(KIO::Job *job)
{
combineReadJob = 0;
- QString error;
+ TQString error;
if( job->error() )
- error = i18n("Error at reading the CRC file (%1)!").arg( vfs::pathOrURL( splURL ) );
+ error = i18n("Error at reading the CRC file (%1)!").tqarg( vfs::pathOrURL( splURL ) );
else
{
splitFile.remove( '\r' ); // Windows compatibility
- QStringList splitFileContent = QStringList::split( '\n', splitFile );
+ TQStringList splitFileContent = TQStringList::split( '\n', splitFile );
bool hasFileName = false, hasSize = false, hasCrc = false;
for(unsigned int i = 0; i != splitFileContent.count(); i++ )
{
- int ndx = splitFileContent[i].find( '=' );
+ int ndx = splitFileContent[i].tqfind( '=' );
if( ndx == -1 )
continue;
- QString token = splitFileContent[i].left( ndx ).stripWhiteSpace();
- QString value = splitFileContent[i].mid( ndx + 1 );
+ TQString token = splitFileContent[i].left( ndx ).stripWhiteSpace();
+ TQString value = splitFileContent[i].mid( ndx + 1 );
if( token == "filename" )
{
@@ -168,28 +168,28 @@ void Combiner::openNextFile()
readURL = baseURL;
else
{
- QString name = readURL.fileName();
+ TQString name = readURL.fileName();
int pos = name.length()-1;
- QChar ch;
+ TQChar ch;
do
{
- ch = name.at( pos ).latin1() + 1;
- if( ch == QChar( 'Z' + 1 ) )
+ ch = name.tqat( pos ).latin1() + 1;
+ if( ch == TQChar( 'Z' + 1 ) )
ch = 'A';
- if( ch == QChar( 'z' + 1 ) )
+ if( ch == TQChar( 'z' + 1 ) )
ch = 'a';
name[ pos ] = ch;
pos--;
- } while( pos >=0 && ch.upper() == QChar( 'A' ) );
+ } while( pos >=0 && ch.upper() == TQChar( 'A' ) );
readURL.setFileName( name );
}
}
else
{
- QString index( "%1" ); /* determining the filename */
- index = index.arg(++fileCounter).rightJustify( 3, '0' );
+ TQString index( "%1" ); /* determining the filename */
+ index = index.tqarg(++fileCounter).rightJustify( 3, '0' );
readURL = baseURL;
readURL.setFileName( baseURL.fileName() + "." + index );
}
@@ -197,17 +197,17 @@ void Combiner::openNextFile()
/* creating a write job */
combineReadJob = KIO::get( readURL, false, false );
- connect(combineReadJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(combineDataReceived(KIO::Job *, const QByteArray &)));
- connect(combineReadJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(combineReceiveFinished(KIO::Job *)));
+ connect(combineReadJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(combineDataReceived(KIO::Job *, const TQByteArray &)));
+ connect(combineReadJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(combineReceiveFinished(KIO::Job *)));
if( hasValidSplitFile )
- connect(combineReadJob, SIGNAL(percent (KIO::Job *, unsigned long)),
- this, SLOT(combineWritePercent(KIO::Job *, unsigned long)));
+ connect(combineReadJob, TQT_SIGNAL(percent (KIO::Job *, unsigned long)),
+ this, TQT_SLOT(combineWritePercent(KIO::Job *, unsigned long)));
}
-void Combiner::combineDataReceived(KIO::Job *, const QByteArray &byteArray)
+void Combiner::combineDataReceived(KIO::Job *, const TQByteArray &byteArray)
{
if( byteArray.size() == 0 )
return;
@@ -228,10 +228,10 @@ void Combiner::combineDataReceived(KIO::Job *, const QByteArray &byteArray)
combineWriteJob = KIO::put( writeURL, permissions, true, false, false );
- connect(combineWriteJob, SIGNAL(dataReq(KIO::Job *, QByteArray &)),
- this, SLOT(combineDataSend(KIO::Job *, QByteArray &)));
- connect(combineWriteJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(combineSendFinished(KIO::Job *)));
+ connect(combineWriteJob, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray &)),
+ this, TQT_SLOT(combineDataSend(KIO::Job *, TQByteArray &)));
+ connect(combineWriteJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(combineSendFinished(KIO::Job *)));
}
if( combineWriteJob )
@@ -254,14 +254,14 @@ void Combiner::combineReceiveFinished(KIO::Job *job)
{
combineAbortJobs();
KMessageBox::questionYesNo(0, i18n("Can't open the first split file of %1!")
- .arg( vfs::pathOrURL( baseURL ) ) );
+ .tqarg( vfs::pathOrURL( baseURL ) ) );
emit reject();
return;
}
if( hasValidSplitFile )
{
- QString crcResult = QString( "%1" ).arg( crcContext->result(), 0, 16 ).upper().stripWhiteSpace()
+ TQString crcResult = TQString( "%1" ).tqarg( crcContext->result(), 0, 16 ).upper().stripWhiteSpace()
.rightJustify(8, '0');
if( receivedSize != expectedSize )
@@ -274,10 +274,10 @@ void Combiner::combineReceiveFinished(KIO::Job *job)
openNextFile();
}
-void Combiner::combineDataSend(KIO::Job *, QByteArray &byteArray)
+void Combiner::combineDataSend(KIO::Job *, TQByteArray &byteArray)
{
byteArray = transferArray;
- transferArray = QByteArray();
+ transferArray = TQByteArray();
if( combineReadJob )
{
@@ -293,7 +293,7 @@ void Combiner::combineSendFinished(KIO::Job *job)
if( job->error() ) /* any error occurred? */
{
combineAbortJobs();
- KMessageBox::error(0, i18n("Error writing file %1!").arg( vfs::pathOrURL( writeURL ) ) );
+ KMessageBox::error(0, i18n("Error writing file %1!").tqarg( vfs::pathOrURL( writeURL ) ) );
emit reject();
return;
}
diff --git a/krusader/Splitter/combiner.h b/krusader/Splitter/combiner.h
index e1eaac6..a50573a 100644
--- a/krusader/Splitter/combiner.h
+++ b/krusader/Splitter/combiner.h
@@ -32,14 +32,15 @@
#define __COMBINER_H__
#include "crc32.h"
-#include <qstring.h>
-#include <qprogressdialog.h>
+#include <tqstring.h>
+#include <tqprogressdialog.h>
#include <kurl.h>
#include <kio/jobclasses.h>
-class Combiner : public QProgressDialog
+class Combiner : public TQProgressDialog
{
Q_OBJECT
+ TQ_OBJECT
private:
KURL splURL;
@@ -49,16 +50,16 @@ private:
KURL baseURL;
KURL destinationURL;
CRC32 *crcContext;
- QByteArray transferArray;
+ TQByteArray transferArray;
- QString splitFile;
- QString error;
+ TQString splitFile;
+ TQString error;
bool hasValidSplitFile;
- QString expectedFileName;
+ TQString expectedFileName;
KIO::filesize_t expectedSize;
- QString expectedCrcSum;
+ TQString expectedCrcSum;
int fileCounter;
int permissions;
@@ -70,17 +71,17 @@ private:
bool unixNaming;
public:
- Combiner( QWidget* parent, KURL baseURLIn, KURL destinationURLIn, bool unixNamingIn=false );
+ Combiner( TQWidget* tqparent, KURL baseURLIn, KURL destinationURLIn, bool unixNamingIn=false );
~Combiner();
void combine();
public slots:
- void combineSplitFileDataReceived(KIO::Job *, const QByteArray &byteArray);
+ void combineSplitFileDataReceived(KIO::Job *, const TQByteArray &byteArray);
void combineSplitFileFinished(KIO::Job *job);
- void combineDataReceived(KIO::Job *, const QByteArray &);
+ void combineDataReceived(KIO::Job *, const TQByteArray &);
void combineReceiveFinished(KIO::Job *);
- void combineDataSend(KIO::Job *, QByteArray &);
+ void combineDataSend(KIO::Job *, TQByteArray &);
void combineSendFinished(KIO::Job *);
void combineWritePercent(KIO::Job *, unsigned long);
diff --git a/krusader/Splitter/splitter.cpp b/krusader/Splitter/splitter.cpp
index 5543d64..141fc17 100644
--- a/krusader/Splitter/splitter.cpp
+++ b/krusader/Splitter/splitter.cpp
@@ -30,15 +30,15 @@
#include "splitter.h"
#include "../VFS/vfs.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kio/job.h>
#include <kfileitem.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
-Splitter::Splitter( QWidget* parent, KURL fileNameIn, KURL destinationDirIn ) :
- QProgressDialog( parent, "Krusader::Splitter", true, 0 ), splitSize( 0 )
+Splitter::Splitter( TQWidget* tqparent, KURL fileNameIn, KURL destinationDirIn ) :
+ TQProgressDialog( tqparent, "Krusader::Splitter", true, 0 ), splitSize( 0 )
{
fileName = fileNameIn;
@@ -62,12 +62,12 @@ void Splitter::split( KIO::filesize_t splitSizeIn )
KFileItem file(KFileItem::Unknown, KFileItem::Unknown, fileName );
file.refresh();
- permissions = file.permissions() | QFileInfo::WriteUser;
+ permissions = file.permissions() | TQFileInfo::WriteUser;
splitSize = splitSizeIn;
setCaption( i18n("Krusader::Splitting...") );
- setLabelText( i18n("Splitting the file %1...").arg( vfs::pathOrURL( fileName ) ) );
+ setLabelText( i18n("Splitting the file %1...").tqarg( vfs::pathOrURL( fileName ) ) );
if( file.isDir() )
{
@@ -80,12 +80,12 @@ void Splitter::split( KIO::filesize_t splitSizeIn )
splitReadJob = KIO::get( fileName, false, false );
- connect(splitReadJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(splitDataReceived(KIO::Job *, const QByteArray &)));
- connect(splitReadJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(splitReceiveFinished(KIO::Job *)));
- connect(splitReadJob, SIGNAL(percent (KIO::Job *, unsigned long)),
- this, SLOT(splitReceivePercent(KIO::Job *, unsigned long)));
+ connect(splitReadJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(splitDataReceived(KIO::Job *, const TQByteArray &)));
+ connect(splitReadJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(splitReceiveFinished(KIO::Job *)));
+ connect(splitReadJob, TQT_SIGNAL(percent (KIO::Job *, unsigned long)),
+ this, TQT_SLOT(splitReceivePercent(KIO::Job *, unsigned long)));
splitWriteJob = 0;
noValidWriteJob = true;
@@ -93,7 +93,7 @@ void Splitter::split( KIO::filesize_t splitSizeIn )
exec();
}
-void Splitter::splitDataReceived(KIO::Job *, const QByteArray &byteArray)
+void Splitter::splitDataReceived(KIO::Job *, const TQByteArray &byteArray)
{
if( byteArray.size() == 0 )
return;
@@ -122,17 +122,17 @@ void Splitter::splitReceiveFinished(KIO::Job *job)
if( job->error() ) /* any error occurred? */
{
splitAbortJobs();
- KMessageBox::error(0, i18n("Error reading file %1!").arg( vfs::pathOrURL( fileName ) ) );
+ KMessageBox::error(0, i18n("Error reading file %1!").tqarg( vfs::pathOrURL( fileName ) ) );
emit reject();
return;
}
- QString crcResult = QString( "%1" ).arg( crcContext->result(), 0, 16 ).upper().stripWhiteSpace()
+ TQString crcResult = TQString( "%1" ).tqarg( crcContext->result(), 0, 16 ).upper().stripWhiteSpace()
.rightJustify(8, '0');
- splitFile = QString( "filename=%1\n" ).arg( fileName.fileName() )+
- QString( "size=%1\n" ) .arg( KIO::number( fileSize ) )+
- QString( "crc32=%1\n" ) .arg( crcResult );
+ splitFile = TQString( "filename=%1\n" ).tqarg( fileName.fileName() )+
+ TQString( "size=%1\n" ) .tqarg( KIO::number( fileSize ) )+
+ TQString( "crc32=%1\n" ) .tqarg( crcResult );
}
void Splitter::splitReceivePercent (KIO::Job *, unsigned long percent)
@@ -142,9 +142,9 @@ void Splitter::splitReceivePercent (KIO::Job *, unsigned long percent)
void Splitter::splitCreateWriteJob()
{
- QString index( "%1" ); /* making the splitted filename */
- index = index.arg(++fileNumber).rightJustify( 3, '0' );
- QString outFileName = fileName.fileName() + "." + index;
+ TQString index( "%1" ); /* making the splitted filename */
+ index = index.tqarg(++fileNumber).rightJustify( 3, '0' );
+ TQString outFileName = fileName.fileName() + "." + index;
writeURL = destinationDir;
writeURL.addPath( outFileName );
@@ -152,20 +152,20 @@ void Splitter::splitCreateWriteJob()
/* creating a write job */
splitWriteJob = KIO::put( writeURL, permissions, true, false, false );
outputFileSize = 0;
- connect(splitWriteJob, SIGNAL(dataReq(KIO::Job *, QByteArray &)),
- this, SLOT(splitDataSend(KIO::Job *, QByteArray &)));
- connect(splitWriteJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(splitSendFinished(KIO::Job *)));
+ connect(splitWriteJob, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray &)),
+ this, TQT_SLOT(splitDataSend(KIO::Job *, TQByteArray &)));
+ connect(splitWriteJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(splitSendFinished(KIO::Job *)));
noValidWriteJob = false;
}
-void Splitter::splitDataSend(KIO::Job *, QByteArray &byteArray)
+void Splitter::splitDataSend(KIO::Job *, TQByteArray &byteArray)
{
int bufferLen = transferArray.size();
if( noValidWriteJob ) /* splitted file should be closed ? */
{
- byteArray = QByteArray(); /* giving empty buffer which indicates closing */
+ byteArray = TQByteArray(); /* giving empty buffer which indicates closing */
}
else if( outputFileSize + bufferLen > splitSize ) /* maximum length reached? */
{
@@ -181,7 +181,7 @@ void Splitter::splitDataSend(KIO::Job *, QByteArray &byteArray)
outputFileSize += bufferLen; /* write the whole buffer out to the split file */
byteArray = transferArray;
- transferArray = QByteArray();
+ transferArray = TQByteArray();
if(splitReadJob)
{
@@ -198,7 +198,7 @@ void Splitter::splitSendFinished(KIO::Job *job)
if( job->error() ) /* any error occurred? */
{
splitAbortJobs();
- KMessageBox::error(0, i18n("Error writing file %1!").arg( vfs::pathOrURL( writeURL ) ) );
+ KMessageBox::error(0, i18n("Error writing file %1!").tqarg( vfs::pathOrURL( writeURL ) ) );
emit reject();
return;
}
@@ -211,10 +211,10 @@ void Splitter::splitSendFinished(KIO::Job *job)
writeURL = destinationDir;
writeURL.addPath( fileName.fileName() + ".crc" );
splitWriteJob = KIO::put( writeURL, permissions, true, false, false );
- connect(splitWriteJob, SIGNAL(dataReq(KIO::Job *, QByteArray &)),
- this, SLOT(splitFileSend(KIO::Job *, QByteArray &)));
- connect(splitWriteJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(splitFileFinished(KIO::Job *)));
+ connect(splitWriteJob, TQT_SIGNAL(dataReq(KIO::Job *, TQByteArray &)),
+ this, TQT_SLOT(splitFileSend(KIO::Job *, TQByteArray &)));
+ connect(splitWriteJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(splitFileFinished(KIO::Job *)));
}
}
@@ -228,7 +228,7 @@ void Splitter::splitAbortJobs()
splitReadJob = splitWriteJob = 0;
}
-void Splitter::splitFileSend(KIO::Job *, QByteArray &byteArray)
+void Splitter::splitFileSend(KIO::Job *, TQByteArray &byteArray)
{
const char *content = splitFile.ascii();
byteArray.duplicate( content, strlen ( content ) );
@@ -241,7 +241,7 @@ void Splitter::splitFileFinished(KIO::Job *job)
if( job->error() ) /* any error occurred? */
{
- KMessageBox::error(0, i18n("Error at writing file %1!").arg( vfs::pathOrURL( writeURL ) ) );
+ KMessageBox::error(0, i18n("Error at writing file %1!").tqarg( vfs::pathOrURL( writeURL ) ) );
emit reject();
return;
}
diff --git a/krusader/Splitter/splitter.h b/krusader/Splitter/splitter.h
index fd19c68..01dd94a 100644
--- a/krusader/Splitter/splitter.h
+++ b/krusader/Splitter/splitter.h
@@ -32,14 +32,15 @@
#define __SPLITTER_H__
#include "crc32.h"
-#include <qstring.h>
-#include <qprogressdialog.h>
+#include <tqstring.h>
+#include <tqprogressdialog.h>
#include <kurl.h>
#include <kio/jobclasses.h>
-class Splitter : public QProgressDialog
+class Splitter : public TQProgressDialog
{
Q_OBJECT
+ TQ_OBJECT
private:
KURL fileName;
@@ -48,20 +49,20 @@ private:
KIO::filesize_t fileSize;
int permissions;
- QString splitFile;
+ TQString splitFile;
KURL writeURL;
int fileNumber;
KIO::filesize_t outputFileSize;
bool noValidWriteJob;
CRC32 *crcContext;
- QByteArray transferArray;
+ TQByteArray transferArray;
KIO::TransferJob *splitReadJob;
KIO::TransferJob *splitWriteJob;
public:
- Splitter( QWidget* parent, KURL fileNameIn, KURL destinationDirIn );
+ Splitter( TQWidget* tqparent, KURL fileNameIn, KURL destinationDirIn );
~Splitter();
void split( KIO::filesize_t splitSizeIn );
@@ -71,12 +72,12 @@ private:
void splitAbortJobs();
public slots:
- void splitDataReceived(KIO::Job *, const QByteArray &);
- void splitDataSend(KIO::Job *, QByteArray &);
+ void splitDataReceived(KIO::Job *, const TQByteArray &);
+ void splitDataSend(KIO::Job *, TQByteArray &);
void splitSendFinished(KIO::Job *);
void splitReceiveFinished(KIO::Job *);
void splitReceivePercent (KIO::Job *, unsigned long);
- void splitFileSend(KIO::Job *, QByteArray &);
+ void splitFileSend(KIO::Job *, TQByteArray &);
void splitFileFinished(KIO::Job *);
};
diff --git a/krusader/Splitter/splittergui.cpp b/krusader/Splitter/splittergui.cpp
index 39a8e4f..a2e122b 100644
--- a/krusader/Splitter/splittergui.cpp
+++ b/krusader/Splitter/splittergui.cpp
@@ -31,8 +31,8 @@
#include "splittergui.h"
#include "../VFS/vfs.h"
#include <klocale.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kmessagebox.h>
PredefinedDevice SplitterGUI::predefinedDevices[] = {
@@ -46,18 +46,18 @@ PredefinedDevice SplitterGUI::predefinedDevices[] = {
{i18n( "700 MB (CD-R)" ), 700*0x100000}
};
-SplitterGUI::SplitterGUI( QWidget* parent, KURL fileURL, KURL defaultDir ) :
- QDialog( parent, "Krusader::SplitterGUI", true, 0 ),
- userDefinedSize ( 0x100000 ), lastSelectedDevice( 0 ), resultCode( QDialog::Rejected )
+SplitterGUI::SplitterGUI( TQWidget* tqparent, KURL fileURL, KURL defaultDir ) :
+ TQDialog( tqparent, "Krusader::SplitterGUI", true, 0 ),
+ userDefinedSize ( 0x100000 ), lastSelectedDevice( 0 ), resultCode( TQDialog::Rejected )
{
predefinedDeviceNum = sizeof( predefinedDevices ) / sizeof( PredefinedDevice );
- QGridLayout *grid = new QGridLayout( this );
+ TQGridLayout *grid = new TQGridLayout( this );
grid->setSpacing( 6 );
grid->setMargin( 11 );
- QLabel *splitterLabel = new QLabel( this, "SplitterLabel" );
- splitterLabel->setText( i18n( "Split the file %1 to directory:" ).arg( vfs::pathOrURL( fileURL ) ) );
+ TQLabel *splitterLabel = new TQLabel( this, "SplitterLabel" );
+ splitterLabel->setText( i18n( "Split the file %1 to directory:" ).tqarg( vfs::pathOrURL( fileURL ) ) );
splitterLabel->setMinimumWidth( 400 );
grid->addWidget( splitterLabel,0 ,0 );
@@ -66,25 +66,25 @@ SplitterGUI::SplitterGUI( QWidget* parent, KURL fileURL, KURL defaultDir ) :
urlReq->setMode( KFile::Directory );
grid->addWidget( urlReq, 1 ,0 );
- QHBox *splitSizeLine = new QHBox( this, "splitSizeLine" );
+ TQHBox *splitSizeLine = new TQHBox( this, "splitSizeLine" );
- deviceCombo = new QComboBox( splitSizeLine, "deviceCombo" );
+ deviceCombo = new TQComboBox( splitSizeLine, "deviceCombo" );
for( int i=0; i != predefinedDeviceNum; i++ )
deviceCombo->insertItem( predefinedDevices[i].name );
deviceCombo->insertItem( i18n( "User Defined" ) );
- QLabel *spacer = new QLabel( splitSizeLine );
+ TQLabel *spacer = new TQLabel( splitSizeLine );
spacer->setText( " " );
- spacer->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum );
+ spacer->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
- QLabel *bytesPerFile = new QLabel( splitSizeLine, "BytesPerFile" );
+ TQLabel *bytesPerFile = new TQLabel( splitSizeLine, "BytesPerFile" );
bytesPerFile->setText( i18n( "Max file size:" ) );
spinBox = new SplitterSpinBox( splitSizeLine, "spinbox" );
spinBox->setMinimumWidth( 85 );
spinBox->setEnabled( false );
- sizeCombo = new QComboBox( splitSizeLine, "sizeCombo" );
+ sizeCombo = new TQComboBox( splitSizeLine, "sizeCombo" );
sizeCombo->insertItem( i18n( "Byte" ) );
sizeCombo->insertItem( i18n( "kByte" ) );
sizeCombo->insertItem( i18n( "MByte" ) );
@@ -92,24 +92,24 @@ SplitterGUI::SplitterGUI( QWidget* parent, KURL fileURL, KURL defaultDir ) :
grid->addWidget( splitSizeLine,2 ,0 );
- QFrame *separator = new QFrame( this, "separatorLine" );
- separator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
- separator->setFixedHeight( separator->sizeHint().height() );
+ TQFrame *separator = new TQFrame( this, "separatorLine" );
+ separator->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
+ separator->setFixedHeight( separator->tqsizeHint().height() );
grid->addWidget( separator,3 ,0 );
- QHBoxLayout *splitButtons = new QHBoxLayout;
+ TQHBoxLayout *splitButtons = new TQHBoxLayout;
splitButtons->setSpacing( 6 );
splitButtons->setMargin( 0 );
- QSpacerItem* spacer2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer2 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
splitButtons->addItem( spacer2 );
- QPushButton *splitBtn = new QPushButton( this, "splitBtn" );
+ TQPushButton *splitBtn = new TQPushButton( this, "splitBtn" );
splitBtn->setText( i18n("&Split") );
splitButtons->addWidget( splitBtn );
- QPushButton *cancelBtn = new QPushButton( this, "cancelBtn" );
+ TQPushButton *cancelBtn = new TQPushButton( this, "cancelBtn" );
cancelBtn->setText( i18n("&Cancel") );
splitButtons->addWidget( cancelBtn );
@@ -117,10 +117,10 @@ SplitterGUI::SplitterGUI( QWidget* parent, KURL fileURL, KURL defaultDir ) :
setCaption(i18n("Krusader::Splitter"));
- connect( sizeCombo, SIGNAL( activated(int) ), this, SLOT( sizeComboActivated( int ) ) );
- connect( deviceCombo, SIGNAL( activated(int) ), this, SLOT( predefinedComboActivated( int ) ) );
- connect( cancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
- connect( splitBtn , SIGNAL( clicked() ), this, SLOT( splitPressed() ) );
+ connect( sizeCombo, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( sizeComboActivated( int ) ) );
+ connect( deviceCombo, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( predefinedComboActivated( int ) ) );
+ connect( cancelBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) );
+ connect( splitBtn , TQT_SIGNAL( clicked() ), this, TQT_SLOT( splitPressed() ) );
predefinedComboActivated( 0 );
resultCode = exec();
@@ -197,7 +197,7 @@ void SplitterGUI::splitPressed()
emit accept();
}
-void SplitterGUI::keyPressEvent( QKeyEvent *e )
+void SplitterGUI::keyPressEvent( TQKeyEvent *e )
{
switch ( e->key() )
{
@@ -206,7 +206,7 @@ void SplitterGUI::keyPressEvent( QKeyEvent *e )
emit splitPressed();
return;
default:
- QDialog::keyPressEvent( e );
+ TQDialog::keyPressEvent( e );
}
}
diff --git a/krusader/Splitter/splittergui.h b/krusader/Splitter/splittergui.h
index fa5953c..23822b6 100644
--- a/krusader/Splitter/splittergui.h
+++ b/krusader/Splitter/splittergui.h
@@ -31,11 +31,11 @@
#ifndef __SPLITTERGUI_H__
#define __SPLITTERGUI_H__
-#include <qdialog.h>
-#include <qstring.h>
-#include <qspinbox.h>
-#include <qvalidator.h>
-#include <qcombobox.h>
+#include <tqdialog.h>
+#include <tqstring.h>
+#include <tqspinbox.h>
+#include <tqvalidator.h>
+#include <tqcombobox.h>
#include <kurlrequester.h>
#include <kio/global.h>
@@ -43,58 +43,24 @@
struct PredefinedDevice
{
- QString name;
+ TQString name;
KIO::filesize_t capacity;
};
-class SplitterGUI : QDialog
-{
- Q_OBJECT
-
-public:
- class SplitterSpinBox;
-
-private:
- int predefinedDeviceNum;
- KIO::filesize_t userDefinedSize;
- int lastSelectedDevice;
- int resultCode;
-
- static PredefinedDevice predefinedDevices[];
-
- SplitterSpinBox *spinBox;
- QComboBox *deviceCombo;
- QComboBox *sizeCombo;
- KURLRequester *urlReq;
-
-public:
- SplitterGUI( QWidget* parent, KURL fileURL, KURL defaultDir );
-
- KURL getDestinationDir() {return vfs::fromPathOrURL( urlReq->url() );}
- KIO::filesize_t getSplitSize() {return spinBox->longValue();}
- int result() {return resultCode;}
-
-public slots:
- virtual void sizeComboActivated( int item );
- virtual void predefinedComboActivated( int item );
- virtual void splitPressed();
-
-protected:
- virtual void keyPressEvent( QKeyEvent *e );
-
-public:
- class SplitterSpinBox : public QSpinBox
+ class SplitterSpinBox : public TQSpinBox
{
+ Q_OBJECT
+ TQ_OBJECT
private:
KIO::filesize_t division;
KIO::filesize_t value;
public:
- SplitterSpinBox ( QWidget * parent = 0, const char * name = 0 ) : QSpinBox( parent, name ), division( 1 ), value( 1 )
+ SplitterSpinBox ( TQWidget * tqparent = 0, const char * name = 0 ) : TQSpinBox( tqparent, name ), division( 1 ), value( 1 )
{
setMaxValue( 0x7FFFFFFF ); /* setting the minimum and maximum values */
setMinValue( 1 );
- QDoubleValidator *dval = new QDoubleValidator( this );
+ TQDoubleValidator *dval = new TQDoubleValidator( TQT_TQOBJECT(this) );
setValidator ( dval );
}
@@ -112,9 +78,9 @@ public:
return val;
}
- QString mapValueToText( int )
+ TQString mapValueToText( int )
{
- QString frac("");
+ TQString frac("");
KIO::filesize_t int_part = value / division;
KIO::filesize_t frac_mod = value % division;
@@ -125,14 +91,14 @@ public:
if( frac_part )
{
- frac = QString( "%1" ).arg( frac_part ).rightJustify( 3, '0' );
+ frac = TQString( "%1" ).tqarg( frac_part ).rightJustify( 3, '0' );
frac = "." + frac;
while( frac.endsWith("0") )
frac.truncate( frac.length() - 1 );
}
}
- return QString( "%1%2" ).arg( int_part ).arg( frac );
+ return TQString( "%1%2" ).tqarg( int_part ).tqarg( frac );
}
int mapTextToValue( bool * )
@@ -173,6 +139,42 @@ public:
updateDisplay();
}
};
+
+class SplitterGUI : TQDialog
+{
+ Q_OBJECT
+ TQ_OBJECT
+
+private:
+ int predefinedDeviceNum;
+ KIO::filesize_t userDefinedSize;
+ int lastSelectedDevice;
+ int resultCode;
+
+ static PredefinedDevice predefinedDevices[];
+
+ SplitterSpinBox *spinBox;
+ TQComboBox *deviceCombo;
+ TQComboBox *sizeCombo;
+ KURLRequester *urlReq;
+
+public:
+ SplitterGUI( TQWidget* tqparent, KURL fileURL, KURL defaultDir );
+
+ KURL getDestinationDir() {return vfs::fromPathOrURL( urlReq->url() );}
+ KIO::filesize_t getSplitSize() {return spinBox->longValue();}
+ int result() {return resultCode;}
+
+public slots:
+ virtual void sizeComboActivated( int item );
+ virtual void predefinedComboActivated( int item );
+ virtual void splitPressed();
+
+protected:
+ virtual void keyPressEvent( TQKeyEvent *e );
+
+public:
+
};
#endif /* __SPLITTERGUI_H__ */
diff --git a/krusader/Synchronizer/feedtolistboxdialog.cpp b/krusader/Synchronizer/feedtolistboxdialog.cpp
index b1bec38..b635875 100644
--- a/krusader/Synchronizer/feedtolistboxdialog.cpp
+++ b/krusader/Synchronizer/feedtolistboxdialog.cpp
@@ -38,20 +38,20 @@
#include "../panelmanager.h"
#include <klocale.h>
#include <kmessagebox.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qcombobox.h>
-#include <qframe.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqcombobox.h>
+#include <tqframe.h>
#define S_LEFT 0
#define S_RIGHT 1
#define S_BOTH 2
-FeedToListBoxDialog::FeedToListBoxDialog(QWidget *parent, const char *name, Synchronizer *sync,
- QListView *syncL, bool equOK) : KDialogBase( parent, name, true, i18n( "Krusader::Feed to listbox" ),
+FeedToListBoxDialog::FeedToListBoxDialog(TQWidget *tqparent, const char *name, Synchronizer *sync,
+ TQListView *syncL, bool equOK) : KDialogBase( tqparent, name, true, i18n( "Krusader::Feed to listbox" ),
KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::User1, Ok, true, KStdGuiItem::clear() ),
synchronizer( sync ), syncList( syncL ), equalAllowed( equOK ), accepted( false ) {
@@ -62,7 +62,7 @@ FeedToListBoxDialog::FeedToListBoxDialog(QWidget *parent, const char *name, Syn
int leftExistingNum = 0;
int rightExistingNum = 0;
- QListViewItemIterator it( syncList );
+ TQListViewItemIterator it( syncList );
while( it.current() ) {
SynchronizerGUI::SyncViewItem *item = (SynchronizerGUI::SyncViewItem *) it.current();
SynchronizerFileItem *syncItem = item->synchronizerItemRef();
@@ -84,7 +84,7 @@ FeedToListBoxDialog::FeedToListBoxDialog(QWidget *parent, const char *name, Syn
if( itemNum == 0 ) {
hide();
- KMessageBox::error( parent, i18n( "No elements to feed!" ) );
+ KMessageBox::error( tqparent, i18n( "No elements to feed!" ) );
return;
}
@@ -96,32 +96,32 @@ FeedToListBoxDialog::FeedToListBoxDialog(QWidget *parent, const char *name, Syn
krConfig->setGroup( "Synchronize" );
int listBoxNum = krConfig->readNumEntry( "Feed To Listbox Counter", 1 );
- QString queryName;
+ TQString queryName;
do {
- queryName = i18n("Synchronize results")+QString( " %1" ).arg( listBoxNum++ );
+ queryName = i18n("Synchronize results")+TQString( " %1" ).tqarg( listBoxNum++ );
}while( v.vfs_search( queryName ) != 0 );
krConfig->writeEntry( "Feed To Listbox Counter", listBoxNum );
// creating the widget
- QWidget *widget=new QWidget(this, "feedToListBoxMainWidget");
- QVBoxLayout *layout = new QVBoxLayout( widget, 0, 10, "FeedToListBoxDialogLayout" );
+ TQWidget *widget=new TQWidget(this, "feedToListBoxMainWidget");
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( widget, 0, 10, "FeedToListBoxDialogLayout" );
- QLabel *label = new QLabel( i18n("Here you can name the file collection"), widget, "fbLabel" );
- layout->addWidget( label );
+ TQLabel *label = new TQLabel( i18n("Here you can name the file collection"), widget, "fbLabel" );
+ tqlayout->addWidget( label );
- lineEdit = new QLineEdit( widget, "fbLineEdit" );
+ lineEdit = new TQLineEdit( widget, "fbLineEdit" );
lineEdit->setText( queryName );
lineEdit->selectAll();
- layout->addWidget( lineEdit );
+ tqlayout->addWidget( lineEdit );
- QHBox *hbox = new QHBox( widget, "fbHBox" );
+ TQHBox *hbox = new TQHBox( widget, "fbHBox" );
- QLabel *label2 = new QLabel( i18n( "Side to feed:" ), hbox, "fbSideLabel" );
- label2->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQLabel *label2 = new TQLabel( i18n( "Side to feed:" ), hbox, "fbSideLabel" );
+ label2->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
- sideCombo = new QComboBox( hbox, "fbSideCombo" );
- sideCombo->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ sideCombo = new TQComboBox( hbox, "fbSideCombo" );
+ sideCombo->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
sideCombo->insertItem( i18n( "Left" ) );
sideCombo->insertItem( i18n( "Right" ) );
sideCombo->insertItem( i18n( "Both" ) );
@@ -134,16 +134,16 @@ FeedToListBoxDialog::FeedToListBoxDialog(QWidget *parent, const char *name, Syn
} else
sideCombo->setCurrentItem( 2 );
- QFrame *line = new QFrame( hbox, "fbVLine" );
- line->setFrameStyle( QFrame::VLine | QFrame::Sunken );
- line->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+ TQFrame *line = new TQFrame( hbox, "fbVLine" );
+ line->setFrameStyle( TQFrame::VLine | TQFrame::Sunken );
+ line->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
- cbSelected = new QCheckBox( i18n( "Selected files only" ), hbox, "cbSelected" );
- cbSelected->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ cbSelected = new TQCheckBox( i18n( "Selected files only" ), hbox, "cbSelected" );
+ cbSelected->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
cbSelected->setEnabled( selectedNum != 0 );
cbSelected->setChecked( selectedNum != 0 );
- layout->addWidget( hbox );
+ tqlayout->addWidget( hbox );
setMainWidget(widget);
@@ -157,10 +157,10 @@ void FeedToListBoxDialog::slotUser1() {
void FeedToListBoxDialog::slotOk() {
int side = sideCombo->currentItem();
bool selected = cbSelected->isChecked();
- QString name = lineEdit->text();
+ TQString name = lineEdit->text();
KURL::List urlList;
- QListViewItemIterator it( syncList );
+ TQListViewItemIterator it( syncList );
for( ;it.current(); it++ ) {
SynchronizerGUI::SyncViewItem *item = (SynchronizerGUI::SyncViewItem *) it.current();
SynchronizerFileItem *syncItem = item->synchronizerItemRef();
@@ -173,22 +173,22 @@ void FeedToListBoxDialog::slotOk() {
continue;
if( ( side == S_BOTH || side == S_LEFT ) && syncItem->existsInLeft() ) {
- QString leftDirName = syncItem->leftDirectory().isEmpty() ? "" : syncItem->leftDirectory() + "/";
+ TQString leftDirName = syncItem->leftDirectory().isEmpty() ? "" : syncItem->leftDirectory() + "/";
KURL leftURL = vfs::fromPathOrURL( synchronizer->leftBaseDirectory() + leftDirName + syncItem->leftName() );
urlList.push_back( leftURL );
}
if( ( side == S_BOTH || side == S_RIGHT ) && syncItem->existsInRight() ) {
- QString rightDirName = syncItem->rightDirectory().isEmpty() ? "" : syncItem->rightDirectory() + "/";
+ TQString rightDirName = syncItem->rightDirectory().isEmpty() ? "" : syncItem->rightDirectory() + "/";
KURL leftURL = vfs::fromPathOrURL( synchronizer->rightBaseDirectory() + rightDirName + syncItem->rightName() );
urlList.push_back( leftURL );
}
}
- KURL url = KURL::fromPathOrURL(QString("virt:/")+ name);
+ KURL url = KURL::fromPathOrURL(TQString("virt:/")+ name);
virt_vfs v(0,true);
if( !v.vfs_refresh( url ) ) {
- KMessageBox::error( parentWidget(), i18n( "Cannot open %1!" ).arg( url.prettyURL() ) );
+ KMessageBox::error( tqparentWidget(), i18n( "Cannot open %1!" ).tqarg( url.prettyURL() ) );
return;
}
v.vfs_addFiles( &urlList, KIO::CopyJob::Copy, 0 );
diff --git a/krusader/Synchronizer/feedtolistboxdialog.h b/krusader/Synchronizer/feedtolistboxdialog.h
index 40de3d5..f8b4d40 100644
--- a/krusader/Synchronizer/feedtolistboxdialog.h
+++ b/krusader/Synchronizer/feedtolistboxdialog.h
@@ -34,16 +34,17 @@
#include <kdialogbase.h>
class Synchronizer;
-class QCheckBox;
-class QLineEdit;
-class QComboBox;
-class QListView;
+class TQCheckBox;
+class TQLineEdit;
+class TQComboBox;
+class TQListView;
class FeedToListBoxDialog : public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- FeedToListBoxDialog( QWidget*, const char*, Synchronizer *, QListView *, bool);
+ FeedToListBoxDialog( TQWidget*, const char*, Synchronizer *, TQListView *, bool);
virtual ~FeedToListBoxDialog() {};
bool isAccepted() {return accepted;};
@@ -54,10 +55,10 @@ class FeedToListBoxDialog : public KDialogBase {
private:
Synchronizer * synchronizer;
- QListView * syncList;
- QCheckBox * cbSelected;
- QLineEdit * lineEdit;
- QComboBox * sideCombo;
+ TQListView * syncList;
+ TQCheckBox * cbSelected;
+ TQLineEdit * lineEdit;
+ TQComboBox * sideCombo;
bool equalAllowed;
bool accepted;
};
diff --git a/krusader/Synchronizer/synchronizedialog.cpp b/krusader/Synchronizer/synchronizedialog.cpp
index 41d4d92..aa98c34 100755
--- a/krusader/Synchronizer/synchronizedialog.cpp
+++ b/krusader/Synchronizer/synchronizedialog.cpp
@@ -32,14 +32,14 @@
#include "../VFS/krpermhandler.h"
#include "../krusader.h"
#include "../defaults.h"
-#include <qlayout.h>
-#include <qhbox.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
#include <klocale.h>
-SynchronizeDialog::SynchronizeDialog( QWidget* parent, const char* name, bool modal, WFlags fl,
+SynchronizeDialog::SynchronizeDialog( TQWidget* tqparent, const char* name, bool modal, WFlags fl,
Synchronizer *sync, int pleftCopyNr, KIO::filesize_t pleftCopySize,
int prightCopyNr, KIO::filesize_t prightCopySize, int pdeleteNr,
- KIO::filesize_t pdeleteSize, int parThreads ) : QDialog( parent, name, modal, fl ),
+ KIO::filesize_t pdeleteSize, int parThreads ) : TQDialog( tqparent, name, modal, fl ),
synchronizer( sync ), leftCopyNr ( pleftCopyNr ),
leftCopySize( pleftCopySize ), rightCopyNr ( prightCopyNr ),
rightCopySize( prightCopySize ), deleteNr( pdeleteNr ),
@@ -48,79 +48,79 @@ SynchronizeDialog::SynchronizeDialog( QWidget* parent, const char* name, bool m
{
setCaption( i18n("Krusader::Synchronize") );
- QVBoxLayout *layout = new QVBoxLayout( this, 11, 6, "SynchronizeDialogLayout" );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( this, 11, 6, "SynchronizeDialogLayout" );
- cbRightToLeft = new QCheckBox( i18n( "Right to left: Copy 1 file", "Right to left: Copy %n files", leftCopyNr) + " " +
+ cbRightToLeft = new TQCheckBox( i18n( "Right to left: Copy 1 file", "Right to left: Copy %n files", leftCopyNr) + " " +
i18n( "(1 byte)", "(%n bytes)", KRpermHandler::parseSize( leftCopySize ).stripWhiteSpace().toInt() ),
this, "labelRightToLeft" );
cbRightToLeft->setChecked( leftCopyNr != 0 );
cbRightToLeft->setEnabled( leftCopyNr != 0 );
- layout->addWidget( cbRightToLeft );
+ tqlayout->addWidget( cbRightToLeft );
- lbRightToLeft = new QLabel( "\t" + i18n( "Ready: %1/1 file, %3/%4", "Ready: %1/%n files, %3/%4", leftCopyNr).arg( 0 )
- .arg( 0 ).arg( KRpermHandler::parseSize( leftCopySize ).stripWhiteSpace() ),
+ lbRightToLeft = new TQLabel( "\t" + i18n( "Ready: %1/1 file, %3/%4", "Ready: %1/%n files, %3/%4", leftCopyNr).tqarg( 0 )
+ .tqarg( 0 ).tqarg( KRpermHandler::parseSize( leftCopySize ).stripWhiteSpace() ),
this, "lbRightToLeft" );
lbRightToLeft->setEnabled( leftCopyNr != 0 );
- layout->addWidget( lbRightToLeft );
+ tqlayout->addWidget( lbRightToLeft );
- cbLeftToRight = new QCheckBox( i18n( "Left to right: Copy 1 file", "Left to right: Copy %n files", rightCopyNr) + " " +
+ cbLeftToRight = new TQCheckBox( i18n( "Left to right: Copy 1 file", "Left to right: Copy %n files", rightCopyNr) + " " +
i18n( "(1 byte)", "(%n bytes)", KRpermHandler::parseSize( rightCopySize ).stripWhiteSpace().toInt() ),
this, "cbLeftToRight" );
cbLeftToRight->setChecked( rightCopyNr != 0 );
cbLeftToRight->setEnabled( rightCopyNr != 0 );
- layout->addWidget( cbLeftToRight );
+ tqlayout->addWidget( cbLeftToRight );
- lbLeftToRight = new QLabel( "\t" + i18n( "Ready: %1/1 file, %3/%4", "Ready: %1/%n files, %3/%4", rightCopyNr ).arg( 0 )
- .arg( 0 ).arg( KRpermHandler::parseSize( rightCopySize ).stripWhiteSpace() ),
+ lbLeftToRight = new TQLabel( "\t" + i18n( "Ready: %1/1 file, %3/%4", "Ready: %1/%n files, %3/%4", rightCopyNr ).tqarg( 0 )
+ .tqarg( 0 ).tqarg( KRpermHandler::parseSize( rightCopySize ).stripWhiteSpace() ),
this, "lbLeftToRight" );
lbLeftToRight->setEnabled( rightCopyNr != 0 );
- layout->addWidget( lbLeftToRight );
+ tqlayout->addWidget( lbLeftToRight );
- cbDeletable = new QCheckBox( i18n( "Left: Delete 1 file", "Left: Delete %n files", deleteNr) + " " +
+ cbDeletable = new TQCheckBox( i18n( "Left: Delete 1 file", "Left: Delete %n files", deleteNr) + " " +
i18n( "(1 byte)", "(%n bytes)", KRpermHandler::parseSize( deleteSize ).stripWhiteSpace().toInt() ),
this, "cbDeletable" );
cbDeletable->setChecked( deleteNr != 0 );
cbDeletable->setEnabled( deleteNr != 0 );
- layout->addWidget( cbDeletable );
+ tqlayout->addWidget( cbDeletable );
- lbDeletable = new QLabel( "\t" + i18n( "Ready: %1/1 file, %3/%4", "Ready: %1/%n files, %3/%4", deleteNr ).arg( 0 )
- .arg( 0 ).arg( KRpermHandler::parseSize( deleteSize ).stripWhiteSpace() ),
+ lbDeletable = new TQLabel( "\t" + i18n( "Ready: %1/1 file, %3/%4", "Ready: %1/%n files, %3/%4", deleteNr ).tqarg( 0 )
+ .tqarg( 0 ).tqarg( KRpermHandler::parseSize( deleteSize ).stripWhiteSpace() ),
this, "lbDeletable" );
lbDeletable->setEnabled( deleteNr != 0 );
- layout->addWidget( lbDeletable );
+ tqlayout->addWidget( lbDeletable );
- progress = new QProgressBar(1000, this);
+ progress = new TQProgressBar(1000, this);
progress->setCenterIndicator(true);
progress->setProgress( 0 );
progress->setMinimumWidth( 400 );
- layout->addWidget( progress );
+ tqlayout->addWidget( progress );
- QHBox *hbox = new QHBox( this, "SynchronizeDialogHBox" );
+ TQHBox *hbox = new TQHBox( this, "SynchronizeDialogHBox" );
hbox->setSpacing( 6 );
- cbOverwrite = new QCheckBox( i18n( "Confirm overwrites" ), this, "cbOverWrite" );
+ cbOverwrite = new TQCheckBox( i18n( "Confirm overwrites" ), this, "cbOverWrite" );
krConfig->setGroup("Synchronize");
cbOverwrite->setChecked( krConfig->readBoolEntry( "Confirm overwrites", _ConfirmOverWrites ) );
- layout->addWidget( cbOverwrite );
+ tqlayout->addWidget( cbOverwrite );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- hbox->layout()->addItem( spacer );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ hbox->tqlayout()->addItem( spacer );
- btnStart = new QPushButton( hbox, "btnStart" );
+ btnStart = new TQPushButton( hbox, "btnStart" );
btnStart->setText( i18n( "&Start" ) );
- btnPause = new QPushButton( hbox, "btnPause" );
+ btnPause = new TQPushButton( hbox, "btnPause" );
btnPause->setEnabled( false );
btnPause->setText( i18n( "&Pause" ) );
- QPushButton *btnClose = new QPushButton( hbox, "btnClose" );
+ TQPushButton *btnClose = new TQPushButton( hbox, "btnClose" );
btnClose->setText( i18n( "&Close" ) );
- layout->addWidget( hbox );
+ tqlayout->addWidget( hbox );
- connect( btnStart, SIGNAL( clicked() ), this, SLOT( startSynchronization() ) );
- connect( btnPause, SIGNAL( clicked() ), this, SLOT( pauseOrResume() ) );
- connect( btnClose, SIGNAL( clicked() ), this, SLOT( reject() ) );
+ connect( btnStart, TQT_SIGNAL( clicked() ), this, TQT_SLOT( startSynchronization() ) );
+ connect( btnPause, TQT_SIGNAL( clicked() ), this, TQT_SLOT( pauseOrResume() ) );
+ connect( btnClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) );
exec();
}
@@ -134,10 +134,10 @@ void SynchronizeDialog::startSynchronization()
{
btnStart->setEnabled( false );
btnPause->setEnabled( syncStarted = true );
- connect( synchronizer, SIGNAL( synchronizationFinished() ), this, SLOT( synchronizationFinished() ) );
- connect( synchronizer, SIGNAL( processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t ) ),
- this, SLOT( processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t) ) );
- connect( synchronizer, SIGNAL( pauseAccepted() ), this, SLOT( pauseAccepted() ) );
+ connect( synchronizer, TQT_SIGNAL( synchronizationFinished() ), this, TQT_SLOT( synchronizationFinished() ) );
+ connect( synchronizer, TQT_SIGNAL( processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t ) ),
+ this, TQT_SLOT( processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t) ) );
+ connect( synchronizer, TQT_SIGNAL( pauseAccepted() ), this, TQT_SLOT( pauseAccepted() ) );
if( !cbRightToLeft->isChecked() ) leftCopySize = 0;
if( !cbLeftToRight->isChecked() ) rightCopySize = 0;
@@ -149,21 +149,21 @@ void SynchronizeDialog::startSynchronization()
void SynchronizeDialog::synchronizationFinished()
{
- QDialog::reject();
+ TQDialog::reject();
}
void SynchronizeDialog::processedSizes( int leftNr, KIO::filesize_t leftSize, int rightNr,
KIO::filesize_t rightSize, int delNr, KIO::filesize_t delSize )
{
- lbRightToLeft->setText( i18n( "\tReady: %1/%2 files, %3/%4" ).arg( leftNr ).arg( leftCopyNr )
- .arg( KRpermHandler::parseSize( leftSize ).stripWhiteSpace() )
- .arg( KRpermHandler::parseSize( leftCopySize ).stripWhiteSpace() ) );
- lbLeftToRight->setText( i18n( "\tReady: %1/%2 files, %3/%4" ).arg( rightNr ).arg( rightCopyNr )
- .arg( KRpermHandler::parseSize( rightSize ).stripWhiteSpace() )
- .arg( KRpermHandler::parseSize( rightCopySize ).stripWhiteSpace() ) );
- lbDeletable->setText ( i18n( "\tReady: %1/%2 files, %3/%4" ).arg( delNr ).arg( deleteNr )
- .arg( KRpermHandler::parseSize( delSize ).stripWhiteSpace() )
- .arg( KRpermHandler::parseSize( deleteSize ).stripWhiteSpace() ) );
+ lbRightToLeft->setText( i18n( "\tReady: %1/%2 files, %3/%4" ).tqarg( leftNr ).tqarg( leftCopyNr )
+ .tqarg( KRpermHandler::parseSize( leftSize ).stripWhiteSpace() )
+ .tqarg( KRpermHandler::parseSize( leftCopySize ).stripWhiteSpace() ) );
+ lbLeftToRight->setText( i18n( "\tReady: %1/%2 files, %3/%4" ).tqarg( rightNr ).tqarg( rightCopyNr )
+ .tqarg( KRpermHandler::parseSize( rightSize ).stripWhiteSpace() )
+ .tqarg( KRpermHandler::parseSize( rightCopySize ).stripWhiteSpace() ) );
+ lbDeletable->setText ( i18n( "\tReady: %1/%2 files, %3/%4" ).tqarg( delNr ).tqarg( deleteNr )
+ .tqarg( KRpermHandler::parseSize( delSize ).stripWhiteSpace() )
+ .tqarg( KRpermHandler::parseSize( deleteSize ).stripWhiteSpace() ) );
KIO::filesize_t totalSum = leftCopySize + rightCopySize + deleteSize;
KIO::filesize_t processedSum = leftSize + rightSize + delSize;
diff --git a/krusader/Synchronizer/synchronizedialog.h b/krusader/Synchronizer/synchronizedialog.h
index 7c21aef..244dfab 100755
--- a/krusader/Synchronizer/synchronizedialog.h
+++ b/krusader/Synchronizer/synchronizedialog.h
@@ -33,18 +33,19 @@
#include "../VFS/vfs.h"
#include "synchronizer.h"
-#include <qdialog.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
+#include <tqdialog.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
-class SynchronizeDialog : QDialog
+class SynchronizeDialog : TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- SynchronizeDialog( QWidget*, const char*, bool, WFlags, Synchronizer *sync,
+ SynchronizeDialog( TQWidget*, const char*, bool, WFlags, Synchronizer *sync,
int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t, int);
~SynchronizeDialog();
@@ -58,20 +59,20 @@ class SynchronizeDialog : QDialog
void pauseAccepted();
private:
- QProgressBar *progress;
+ TQProgressBar *progress;
- QCheckBox *cbRightToLeft;
- QCheckBox *cbLeftToRight;
- QCheckBox *cbDeletable;
+ TQCheckBox *cbRightToLeft;
+ TQCheckBox *cbLeftToRight;
+ TQCheckBox *cbDeletable;
- QLabel *lbRightToLeft;
- QLabel *lbLeftToRight;
- QLabel *lbDeletable;
+ TQLabel *lbRightToLeft;
+ TQLabel *lbLeftToRight;
+ TQLabel *lbDeletable;
- QCheckBox *cbOverwrite;
+ TQCheckBox *cbOverwrite;
- QPushButton *btnStart;
- QPushButton *btnPause;
+ TQPushButton *btnStart;
+ TQPushButton *btnPause;
Synchronizer *synchronizer;
diff --git a/krusader/Synchronizer/synchronizer.cpp b/krusader/Synchronizer/synchronizer.cpp
index 1568f60..0428bc6 100755
--- a/krusader/Synchronizer/synchronizer.cpp
+++ b/krusader/Synchronizer/synchronizer.cpp
@@ -38,23 +38,23 @@
#include <kurl.h>
#include <kmessagebox.h>
#include <klocale.h>
-#include <qapplication.h>
-#include <qregexp.h>
-#include <qdir.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqtimer.h>
#include <kio/job.h>
#include <kdialogbase.h>
#include <kio/observer.h>
#include <kio/renamedlg.h>
#include <kio/skipdlg.h>
#include <unistd.h>
-#include <qeventloop.h>
-#include <qpushbutton.h>
-#include <qdatetime.h>
+#include <tqeventloop.h>
+#include <tqpushbutton.h>
+#include <tqdatetime.h>
#include <kprocess.h>
#include <kdialogbase.h>
#include <kprogress.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kurlcompletion.h>
#include <sys/types.h>
@@ -62,7 +62,7 @@
#include <utime.h>
#include <pwd.h>
#include <grp.h>
-#include <qlabel.h>
+#include <tqlabel.h>
@@ -78,7 +78,7 @@
Synchronizer::Synchronizer() : displayUpdateCount( 0 ), markEquals( true ),
markDiffers ( true ), markCopyToLeft( true ), markCopyToRight( true ), markDeletable( true ),
- stack(), jobMap(), receivedMap(), parentWidget( 0 )
+ stack(), jobMap(), receivedMap(), tqparentWidget( 0 )
{
resultList.setAutoDelete( true );
stack.setAutoDelete( true );
@@ -95,15 +95,15 @@ void Synchronizer::reset()
leftCopyNr = rightCopyNr = deleteNr = 0;
leftCopySize = rightCopySize = deleteSize = 0;
comparedDirs = fileCount = 0;
- leftBaseDir = rightBaseDir = QString::null;
+ leftBaseDir = rightBaseDir = TQString();
resultList.clear();
temporaryList.clear();
stack.clear();
}
-int Synchronizer::compare( QString leftURL, QString rightURL, KRQuery *query, bool subDirs,
+int Synchronizer::compare( TQString leftURL, TQString rightURL, KRQuery *query, bool subDirs,
bool symLinks, bool igDate, bool asymm, bool cmpByCnt, bool igCase,
- bool autoSc, QStringList &selFiles, int equThres, int timeOffs, int parThreads, bool hiddenFiles )
+ bool autoSc, TQStringList &selFiles, int equThres, int timeOffs, int parThreads, bool hiddenFiles )
{
resultList.clear();
temporaryList.clear();
@@ -154,7 +154,7 @@ int Synchronizer::compare( QString leftURL, QString rightURL, KRQuery *query, bo
if( !autoScroll )
refresh( true );
- emit statusInfo( i18n( "Number of files: %1" ).arg( fileCount ) );
+ emit statusInfo( i18n( "Number of files: %1" ).tqarg( fileCount ) );
return fileCount;
}
@@ -164,16 +164,16 @@ void Synchronizer::compareLoop() {
SynchronizerTask * entry = stack.at( thread );
if( entry->state() == ST_STATE_NEW )
- entry->start( parentWidget );
+ entry->start( tqparentWidget );
if( entry->inherits("CompareTask") ) {
if( entry->state() == ST_STATE_READY ) {
CompareTask *ctentry = (CompareTask *) entry;
if( ctentry->isDuplicate() )
- compareDirectory( ctentry->parent(), ctentry->leftDirList(), ctentry->rightDirList(),
+ compareDirectory( ctentry->tqparent(), ctentry->leftDirList(), ctentry->rightDirList(),
ctentry->leftDir(), ctentry->rightDir() );
else
- addSingleDirectory( ctentry->parent(), ctentry->dirList(), ctentry->dir(),
+ addSingleDirectory( ctentry->tqparent(), ctentry->dirList(), ctentry->dir(),
ctentry->isLeft() );
}
if( entry->state() == ST_STATE_READY || entry->state() == ST_STATE_ERROR )
@@ -185,7 +185,7 @@ void Synchronizer::compareLoop() {
break;
case ST_STATE_READY:
case ST_STATE_ERROR:
- emit statusInfo( i18n( "Number of compared directories: %1" ).arg( comparedDirs ) );
+ emit statusInfo( i18n( "Number of compared directories: %1" ).tqarg( comparedDirs ) );
stack.removeRef( entry );
continue;
default:
@@ -193,21 +193,21 @@ void Synchronizer::compareLoop() {
}
}
if( !stack.isEmpty() )
- qApp->processEvents();
+ tqApp->processEvents();
}
stack.clear();
}
-void Synchronizer::compareDirectory( SynchronizerFileItem *parent, SynchronizerDirList * left_directory,
- SynchronizerDirList * right_directory, const QString &leftDir,
- const QString &rightDir )
+void Synchronizer::compareDirectory( SynchronizerFileItem *tqparent, SynchronizerDirList * left_directory,
+ SynchronizerDirList * right_directory, const TQString &leftDir,
+ const TQString &rightDir )
{
- const QString &leftURL = left_directory->url();
- const QString &rightURL = right_directory->url();
+ const TQString &leftURL = left_directory->url();
+ const TQString &rightURL = right_directory->url();
vfile * left_file;
vfile * right_file;
- QString file_name;
+ TQString file_name;
bool checkIfSelected = false;
if( leftDir.isEmpty() && rightDir.isEmpty() && selectedFiles.count() )
@@ -222,14 +222,14 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *parent, SynchronizerD
file_name = left_file->vfile_getName();
- if( checkIfSelected && !selectedFiles.contains( file_name ) )
+ if( checkIfSelected && !selectedFiles.tqcontains( file_name ) )
continue;
if( !query->match( left_file ) )
continue;
if( (right_file = right_directory->search( file_name, ignoreCase )) == 0 )
- addLeftOnlyItem( parent, file_name, leftDir, left_file->vfile_getSize(), left_file->vfile_getTime_t(),
+ addLeftOnlyItem( tqparent, file_name, leftDir, left_file->vfile_getSize(), left_file->vfile_getTime_t(),
readLink( left_file ), left_file->vfile_getOwner(), left_file->vfile_getGroup(),
left_file->vfile_getMode(), left_file->vfile_getACL() );
else
@@ -237,7 +237,7 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *parent, SynchronizerD
if( isDir( right_file ) )
continue;
- addDuplicateItem( parent, file_name, right_file->vfile_getName(), leftDir, rightDir, left_file->vfile_getSize(), right_file->vfile_getSize(),
+ addDuplicateItem( tqparent, file_name, right_file->vfile_getName(), leftDir, rightDir, left_file->vfile_getSize(), right_file->vfile_getSize(),
left_file->vfile_getTime_t(), right_file->vfile_getTime_t(), readLink( left_file ),
readLink( right_file ), left_file->vfile_getOwner(), right_file->vfile_getOwner(),
left_file->vfile_getGroup(), right_file->vfile_getGroup(),
@@ -255,14 +255,14 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *parent, SynchronizerD
file_name = right_file->vfile_getName();
- if( checkIfSelected && !selectedFiles.contains( file_name ) )
+ if( checkIfSelected && !selectedFiles.tqcontains( file_name ) )
continue;
if( !query->match( right_file ) )
continue;
if( left_directory->search( file_name, ignoreCase ) == 0 )
- addRightOnlyItem( parent, file_name, rightDir, right_file->vfile_getSize(), right_file->vfile_getTime_t(),
+ addRightOnlyItem( tqparent, file_name, rightDir, right_file->vfile_getSize(), right_file->vfile_getTime_t(),
readLink( right_file ), right_file->vfile_getOwner(), right_file->vfile_getGroup(),
right_file->vfile_getMode(), right_file->vfile_getACL() );
}
@@ -275,12 +275,12 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *parent, SynchronizerD
{
if ( left_file->vfile_isDir() && ( followSymLinks || !left_file->vfile_isSymLink()) )
{
- QString left_file_name = left_file->vfile_getName();
+ TQString left_file_name = left_file->vfile_getName();
- if( checkIfSelected && !selectedFiles.contains( left_file_name ) )
+ if( checkIfSelected && !selectedFiles.tqcontains( left_file_name ) )
continue;
- if( excludedPaths.contains( leftDir.isEmpty() ? left_file_name : leftDir+"/"+left_file_name ) )
+ if( excludedPaths.tqcontains( leftDir.isEmpty() ? left_file_name : leftDir+"/"+left_file_name ) )
continue;
if( !query->matchDirName( left_file_name ) )
@@ -288,7 +288,7 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *parent, SynchronizerD
if( (right_file = right_directory->search( left_file_name, ignoreCase )) == 0 )
{
- SynchronizerFileItem *me = addLeftOnlyItem( parent, left_file_name, leftDir, 0,
+ SynchronizerFileItem *me = addLeftOnlyItem( tqparent, left_file_name, leftDir, 0,
left_file->vfile_getTime_t(), readLink( left_file ),
left_file->vfile_getOwner(), left_file->vfile_getGroup(),
left_file->vfile_getMode(), left_file->vfile_getACL(),
@@ -296,8 +296,8 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *parent, SynchronizerD
stack.append( new CompareTask( me, leftURL+left_file_name+"/",
leftDir.isEmpty() ? left_file_name : leftDir+"/"+left_file_name, true, ignoreHidden ) );
} else {
- QString right_file_name = right_file->vfile_getName();
- SynchronizerFileItem *me = addDuplicateItem( parent, left_file_name, right_file_name,
+ TQString right_file_name = right_file->vfile_getName();
+ SynchronizerFileItem *me = addDuplicateItem( tqparent, left_file_name, right_file_name,
leftDir, rightDir, 0, 0,
left_file->vfile_getTime_t(), right_file->vfile_getTime_t(),
readLink( left_file ), readLink( right_file ),
@@ -321,10 +321,10 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *parent, SynchronizerD
{
file_name = right_file->vfile_getName();
- if( checkIfSelected && !selectedFiles.contains( file_name ) )
+ if( checkIfSelected && !selectedFiles.tqcontains( file_name ) )
continue;
- if( excludedPaths.contains( rightDir.isEmpty() ? file_name : rightDir+"/"+file_name ) )
+ if( excludedPaths.tqcontains( rightDir.isEmpty() ? file_name : rightDir+"/"+file_name ) )
continue;
if( !query->matchDirName( file_name ) )
@@ -332,7 +332,7 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *parent, SynchronizerD
if( left_directory->search( file_name, ignoreCase ) == 0 )
{
- SynchronizerFileItem *me = addRightOnlyItem( parent, file_name, rightDir, 0,
+ SynchronizerFileItem *me = addRightOnlyItem( tqparent, file_name, rightDir, 0,
right_file->vfile_getTime_t(), readLink( right_file ),
right_file->vfile_getOwner(), right_file->vfile_getGroup(),
right_file->vfile_getMode(), right_file->vfile_getACL(),
@@ -345,34 +345,34 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *parent, SynchronizerD
}
}
-QString Synchronizer::getTaskTypeName( TaskType taskType )
+TQString Synchronizer::getTaskTypeName( TaskType taskType )
{
- static QString names[] = {"=","!=","<-","->","DEL","?","?","?","?","?"};
+ static TQString names[] = {"=","!=","<-","->","DEL","?","?","?","?","?"};
return names[taskType];
}
-SynchronizerFileItem * Synchronizer::addItem( SynchronizerFileItem *parent, const QString &leftFile,
- const QString &rightFile, const QString &leftDir,
- const QString &rightDir, bool existsLeft, bool existsRight,
+SynchronizerFileItem * Synchronizer::addItem( SynchronizerFileItem *tqparent, const TQString &leftFile,
+ const TQString &rightFile, const TQString &leftDir,
+ const TQString &rightDir, bool existsLeft, bool existsRight,
KIO::filesize_t leftSize, KIO::filesize_t rightSize,
- time_t leftDate, time_t rightDate, const QString &leftLink,
- const QString &rightLink, const QString &leftOwner,
- const QString &rightOwner, const QString &leftGroup,
- const QString &rightGroup, mode_t leftMode, mode_t rightMode,
- const QString &leftACL, const QString &rightACL, TaskType tsk,
+ time_t leftDate, time_t rightDate, const TQString &leftLink,
+ const TQString &rightLink, const TQString &leftOwner,
+ const TQString &rightOwner, const TQString &leftGroup,
+ const TQString &rightGroup, mode_t leftMode, mode_t rightMode,
+ const TQString &leftACL, const TQString &rightACL, TaskType tsk,
bool isDir, bool isTemp )
{
bool marked = autoScroll ? !isTemp && isMarked( tsk, existsLeft && existsRight ) : false;
SynchronizerFileItem *item = new SynchronizerFileItem( leftFile, rightFile, leftDir, rightDir, marked,
existsLeft, existsRight, leftSize, rightSize, leftDate, rightDate, leftLink, rightLink,
leftOwner, rightOwner, leftGroup, rightGroup, leftMode, rightMode, leftACL, rightACL, tsk, isDir,
- isTemp, parent );
+ isTemp, tqparent );
if( !isTemp )
{
- while( parent && parent->isTemporary() )
- setPermanent( parent );
+ while( tqparent && tqparent->isTemporary() )
+ setPermanent( tqparent );
bool doRefresh = false;
@@ -390,7 +390,7 @@ SynchronizerFileItem * Synchronizer::addItem( SynchronizerFileItem *parent, cons
refresh( true );
if( marked && (displayUpdateCount++ % DISPLAY_UPDATE_PERIOD == (DISPLAY_UPDATE_PERIOD-1) ) )
- qApp->processEvents();
+ tqApp->processEvents();
}
else
temporaryList.append( item );
@@ -411,45 +411,45 @@ void Synchronizer::compareContentResult( SynchronizerFileItem * item, bool res )
void Synchronizer::setPermanent( SynchronizerFileItem *item )
{
- if( item->parent() && item->parent()->isTemporary() )
- setPermanent( item->parent() );
+ if( item->tqparent() && item->tqparent()->isTemporary() )
+ setPermanent( item->tqparent() );
item->setPermanent();
resultList.append( item );
emit comparedFileData( item );
}
-SynchronizerFileItem * Synchronizer::addLeftOnlyItem( SynchronizerFileItem *parent,
- const QString &file_name, const QString &dir, KIO::filesize_t size,
- time_t date, const QString &link, const QString &owner,
- const QString &group, mode_t mode, const QString &acl, bool isDir,
+SynchronizerFileItem * Synchronizer::addLeftOnlyItem( SynchronizerFileItem *tqparent,
+ const TQString &file_name, const TQString &dir, KIO::filesize_t size,
+ time_t date, const TQString &link, const TQString &owner,
+ const TQString &group, mode_t mode, const TQString &acl, bool isDir,
bool isTemp )
{
- return addItem( parent, file_name, file_name, dir, dir, true, false, size, 0, date, 0, link, QString::null,
- owner, QString::null, group, QString::null, mode, (mode_t)-1, acl, QString::null,
+ return addItem( tqparent, file_name, file_name, dir, dir, true, false, size, 0, date, 0, link, TQString(),
+ owner, TQString(), group, TQString(), mode, (mode_t)-1, acl, TQString(),
asymmetric ? TT_DELETE : TT_COPY_TO_RIGHT, isDir, isTemp );
}
-SynchronizerFileItem * Synchronizer::addRightOnlyItem( SynchronizerFileItem *parent,
- const QString &file_name, const QString &dir, KIO::filesize_t size,
- time_t date, const QString &link, const QString &owner,
- const QString &group, mode_t mode, const QString &acl, bool isDir,
+SynchronizerFileItem * Synchronizer::addRightOnlyItem( SynchronizerFileItem *tqparent,
+ const TQString &file_name, const TQString &dir, KIO::filesize_t size,
+ time_t date, const TQString &link, const TQString &owner,
+ const TQString &group, mode_t mode, const TQString &acl, bool isDir,
bool isTemp )
{
- return addItem( parent, file_name, file_name, dir, dir, false, true, 0, size, 0, date, QString::null, link,
- QString::null, owner, QString::null, group, (mode_t)-1, mode, QString::null, acl,
+ return addItem( tqparent, file_name, file_name, dir, dir, false, true, 0, size, 0, date, TQString(), link,
+ TQString(), owner, TQString(), group, (mode_t)-1, mode, TQString(), acl,
TT_COPY_TO_LEFT, isDir, isTemp );
}
-SynchronizerFileItem * Synchronizer::addDuplicateItem( SynchronizerFileItem *parent,
- const QString &leftName, const QString &rightName,
- const QString &leftDir, const QString &rightDir,
+SynchronizerFileItem * Synchronizer::addDuplicateItem( SynchronizerFileItem *tqparent,
+ const TQString &leftName, const TQString &rightName,
+ const TQString &leftDir, const TQString &rightDir,
KIO::filesize_t leftSize, KIO::filesize_t rightSize, time_t leftDate, time_t rightDate,
- const QString &leftLink, const QString &rightLink,
- const QString &leftOwner, const QString &rightOwner,
- const QString &leftGroup, const QString &rightGroup,
+ const TQString &leftLink, const TQString &rightLink,
+ const TQString &leftOwner, const TQString &rightOwner,
+ const TQString &leftGroup, const TQString &rightGroup,
mode_t leftMode, mode_t rightMode,
- const QString &leftACL, const QString &rightACL,
+ const TQString &leftACL, const TQString &rightACL,
bool isDir, bool isTemp )
{
TaskType task;
@@ -499,7 +499,7 @@ SynchronizerFileItem * Synchronizer::addDuplicateItem( SynchronizerFileItem *par
}while( false );
- SynchronizerFileItem * item = addItem( parent, leftName, rightName, leftDir, rightDir, true, true,
+ SynchronizerFileItem * item = addItem( tqparent, leftName, rightName, leftDir, rightDir, true, true,
leftSize, rightSize, leftDate, rightDate, leftLink, rightLink,
leftOwner, rightOwner, leftGroup, rightGroup,
leftMode, rightMode, leftACL, rightACL,
@@ -514,12 +514,12 @@ SynchronizerFileItem * Synchronizer::addDuplicateItem( SynchronizerFileItem *par
return item;
}
-void Synchronizer::addSingleDirectory( SynchronizerFileItem *parent, SynchronizerDirList *directory,
- const QString &dirName, bool isLeft )
+void Synchronizer::addSingleDirectory( SynchronizerFileItem *tqparent, SynchronizerDirList *directory,
+ const TQString &dirName, bool isLeft )
{
- const QString &url = directory->url();
+ const TQString &url = directory->url();
vfile * file;
- QString file_name;
+ TQString file_name;
/* walking through the directory files */
for( file=directory->first(); file != 0 && !stopped; file = directory->next() )
@@ -533,10 +533,10 @@ void Synchronizer::addSingleDirectory( SynchronizerFileItem *parent, Synchronize
continue;
if( isLeft )
- addLeftOnlyItem( parent, file_name, dirName, file->vfile_getSize(), file->vfile_getTime_t(), readLink( file ),
+ addLeftOnlyItem( tqparent, file_name, dirName, file->vfile_getSize(), file->vfile_getTime_t(), readLink( file ),
file->vfile_getOwner(), file->vfile_getGroup(), file->vfile_getMode(), file->vfile_getACL() );
else
- addRightOnlyItem( parent, file_name, dirName, file->vfile_getSize(), file->vfile_getTime_t(), readLink( file ),
+ addRightOnlyItem( tqparent, file_name, dirName, file->vfile_getSize(), file->vfile_getTime_t(), readLink( file ),
file->vfile_getOwner(), file->vfile_getGroup(), file->vfile_getMode(), file->vfile_getACL() );
}
@@ -547,7 +547,7 @@ void Synchronizer::addSingleDirectory( SynchronizerFileItem *parent, Synchronize
{
file_name = file->vfile_getName();
- if( excludedPaths.contains( dirName.isEmpty() ? file_name : dirName+"/"+file_name ) )
+ if( excludedPaths.tqcontains( dirName.isEmpty() ? file_name : dirName+"/"+file_name ) )
continue;
if( !query->matchDirName( file_name ) )
@@ -556,11 +556,11 @@ void Synchronizer::addSingleDirectory( SynchronizerFileItem *parent, Synchronize
SynchronizerFileItem *me;
if( isLeft )
- me = addLeftOnlyItem( parent, file_name, dirName, 0, file->vfile_getTime_t(), readLink( file ),
+ me = addLeftOnlyItem( tqparent, file_name, dirName, 0, file->vfile_getTime_t(), readLink( file ),
file->vfile_getOwner(), file->vfile_getGroup(), file->vfile_getMode(),
file->vfile_getACL(), true, !query->match( file ) );
else
- me = addRightOnlyItem( parent, file_name, dirName, 0, file->vfile_getTime_t(), readLink( file ),
+ me = addRightOnlyItem( tqparent, file_name, dirName, 0, file->vfile_getTime_t(), readLink( file ),
file->vfile_getOwner(), file->vfile_getGroup(), file->vfile_getMode(),
file->vfile_getACL(), true, !query->match( file ) );
stack.append( new CompareTask( me, url+file_name+"/",
@@ -605,15 +605,15 @@ bool Synchronizer::isMarked( TaskType task, bool isDuplicate )
bool Synchronizer::markParentDirectories( SynchronizerFileItem *item )
{
- if( item->parent() == 0 || item->parent()->isMarked() )
+ if( item->tqparent() == 0 || item->tqparent()->isMarked() )
return false;
- markParentDirectories( item->parent() );
+ markParentDirectories( item->tqparent() );
- item->parent()->setMarked( true );
+ item->tqparent()->setMarked( true );
fileCount++;
- emit markChanged( item->parent(), false );
+ emit markChanged( item->tqparent(), false );
return true;
}
@@ -645,7 +645,7 @@ int Synchronizer::refresh(bool nostatus)
}
if( !nostatus )
- emit statusInfo( i18n( "Number of files: %1" ).arg( fileCount ) );
+ emit statusInfo( i18n( "Number of files: %1" ).tqarg( fileCount ) );
return fileCount;
}
@@ -657,9 +657,9 @@ void Synchronizer::operate( SynchronizerFileItem *item,
if( item->isDir() )
{
- QString leftDirName = ( item->leftDirectory() == "" ) ?
+ TQString leftDirName = ( item->leftDirectory() == "" ) ?
item->leftName() : item->leftDirectory() + "/" + item->leftName() ;
- QString rightDirName = ( item->rightDirectory() == "" ) ?
+ TQString rightDirName = ( item->rightDirectory() == "" ) ?
item->rightName() : item->rightDirectory() + "/" + item->rightName() ;
item = resultList.first();
@@ -681,8 +681,8 @@ void Synchronizer::excludeOperation( SynchronizerFileItem *item )
void Synchronizer::exclude( SynchronizerFileItem *item )
{
- if( !item->parent() || item->parent()->task() != TT_DELETE )
- operate( item, excludeOperation ); /* exclude only if the parent task is not DEL */
+ if( !item->tqparent() || item->tqparent()->task() != TT_DELETE )
+ operate( item, excludeOperation ); /* exclude only if the tqparent task is not DEL */
}
void Synchronizer::restoreOperation( SynchronizerFileItem *item )
@@ -694,12 +694,12 @@ void Synchronizer::restore( SynchronizerFileItem *item )
{
operate( item, restoreOperation );
- while( ( item = item->parent() ) != 0 ) /* in case of restore, the parent directories */
+ while( ( item = item->tqparent() ) != 0 ) /* in case of restore, the tqparent directories */
{ /* must be changed for being consistent */
if( item->task() != TT_DIFFERS )
break;
- if( item->originalTask() == TT_DELETE ) /* if the parent original task is delete */
+ if( item->originalTask() == TT_DELETE ) /* if the tqparent original task is delete */
break; /* don't touch it */
item->restoreOriginalTask(); /* restore */
@@ -753,7 +753,7 @@ void Synchronizer::copyToLeft( SynchronizerFileItem *item )
{
operate( item, copyToLeftOperation );
- while( ( item = item->parent() ) != 0 )
+ while( ( item = item->tqparent() ) != 0 )
{
if( item->task() != TT_DIFFERS )
break;
@@ -785,7 +785,7 @@ void Synchronizer::copyToRight( SynchronizerFileItem *item )
{
operate( item, copyToRightOperation );
- while( ( item = item->parent() ) != 0 )
+ while( ( item = item->tqparent() ) != 0 )
{
if( item->task() != TT_DIFFERS && item->task() != TT_DELETE )
break;
@@ -840,7 +840,7 @@ bool Synchronizer::totalSizes( int * leftCopyNr, KIO::filesize_t *leftCopySize,
void Synchronizer::swapSides()
{
- QString leftTmp = leftBaseDir;
+ TQString leftTmp = leftBaseDir;
leftBaseDir = rightBaseDir;
rightBaseDir = leftTmp;
@@ -863,7 +863,7 @@ void Synchronizer::setScrolling( bool scroll )
}
}
-void Synchronizer::synchronize( QWidget *syncWdg, bool leftCopyEnabled, bool rightCopyEnabled,
+void Synchronizer::synchronize( TQWidget *syncWdg, bool leftCopyEnabled, bool rightCopyEnabled,
bool deleteEnabled, bool overWrite, int parThreads )
{
this->leftCopyEnabled = leftCopyEnabled;
@@ -938,10 +938,10 @@ SynchronizerFileItem * Synchronizer::getNextTask() {
void Synchronizer::executeTask( SynchronizerFileItem * task )
{
- QString leftDirName = task->leftDirectory();
+ TQString leftDirName = task->leftDirectory();
if( !leftDirName.isEmpty() )
leftDirName += "/";
- QString rightDirName = task->rightDirectory();
+ TQString rightDirName = task->rightDirectory();
if( !rightDirName.isEmpty() )
rightDirName += "/";
@@ -954,7 +954,7 @@ void Synchronizer::executeTask( SynchronizerFileItem * task )
if( task->isDir() )
{
KIO::SimpleJob *job = KIO::mkdir( leftURL );
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(slotTaskFinished(KIO::Job*)));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*)));
jobMap[ job ] = task;
disableNewTasks = true;
}
@@ -967,14 +967,14 @@ void Synchronizer::executeTask( SynchronizerFileItem * task )
if( task->rightLink().isNull() ) {
KIO::FileCopyJob *job = KIO::file_copy(rightURL, destURL, -1,
overWrite || task->overWrite(), false, false );
- connect(job,SIGNAL(processedSize (KIO::Job *, KIO::filesize_t )), this,
- SLOT (slotProcessedSize (KIO::Job *, KIO::filesize_t )));
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(slotTaskFinished(KIO::Job*)));
+ connect(job,TQT_SIGNAL(processedSize (KIO::Job *, KIO::filesize_t )), this,
+ TQT_SLOT (slotProcessedSize (KIO::Job *, KIO::filesize_t )));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*)));
jobMap[ job ] = task;
} else {
KIO::SimpleJob *job = KIO::symlink( task->rightLink(), destURL,
overWrite || task->overWrite(), false );
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(slotTaskFinished(KIO::Job*)));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*)));
jobMap[ job ] = task;
}
}
@@ -983,7 +983,7 @@ void Synchronizer::executeTask( SynchronizerFileItem * task )
if( task->isDir() )
{
KIO::SimpleJob *job = KIO::mkdir( rightURL );
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(slotTaskFinished(KIO::Job*)));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*)));
jobMap[ job ] = task;
disableNewTasks = true;
}
@@ -996,14 +996,14 @@ void Synchronizer::executeTask( SynchronizerFileItem * task )
if( task->leftLink().isNull() ) {
KIO::FileCopyJob *job = KIO::file_copy(leftURL, destURL, -1,
overWrite || task->overWrite(), false, false );
- connect(job,SIGNAL(processedSize (KIO::Job *, KIO::filesize_t )), this,
- SLOT (slotProcessedSize (KIO::Job *, KIO::filesize_t )));
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(slotTaskFinished(KIO::Job*)));
+ connect(job,TQT_SIGNAL(processedSize (KIO::Job *, KIO::filesize_t )), this,
+ TQT_SLOT (slotProcessedSize (KIO::Job *, KIO::filesize_t )));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*)));
jobMap[ job ] = task;
} else {
KIO::SimpleJob *job = KIO::symlink( task->leftLink(), destURL,
overWrite || task->overWrite(), false );
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(slotTaskFinished(KIO::Job*)));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*)));
jobMap[ job ] = task;
}
}
@@ -1011,7 +1011,7 @@ void Synchronizer::executeTask( SynchronizerFileItem * task )
case TT_DELETE:
{
KIO::DeleteJob *job = KIO::del( leftURL, false );
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(slotTaskFinished(KIO::Job*)));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotTaskFinished(KIO::Job*)));
jobMap[ job ] = task;
}
break;
@@ -1029,7 +1029,7 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
KIO::filesize_t receivedSize = 0;
- if( receivedMap.contains( job ) ) {
+ if( receivedMap.tqcontains( job ) ) {
receivedSize = receivedMap[ job ];
receivedMap.remove( job );
}
@@ -1037,8 +1037,8 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
if( disableNewTasks && item == lastTask )
disableNewTasks = false; // the blocker task finished
- QString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
- QString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
+ TQString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
+ TQString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
KURL leftURL = vfs::fromPathOrURL( leftBaseDir + leftDirName + item->leftName() );
KURL rightURL = vfs::fromPathOrURL( rightBaseDir + rightDirName + item->rightName() );
@@ -1060,14 +1060,14 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
uid_t newOwnerID = (uid_t)-1; // chown(2) : -1 means no change
if ( !item->rightOwner().isEmpty() )
{
- struct passwd* pw = getpwnam(QFile::encodeName(item->rightOwner()));
+ struct passwd* pw = getpwnam(TQFile::encodeName(item->rightOwner()));
if ( pw != 0L )
newOwnerID = pw->pw_uid;
}
gid_t newGroupID = (gid_t)-1; // chown(2) : -1 means no change
if ( !item->rightGroup().isEmpty() )
{
- struct group* g = getgrnam(QFile::encodeName(item->rightGroup()));
+ struct group* g = getgrnam(TQFile::encodeName(item->rightGroup()));
if ( g != 0L )
newGroupID = g->gr_gid;
}
@@ -1101,14 +1101,14 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
uid_t newOwnerID = (uid_t)-1; // chown(2) : -1 means no change
if ( !item->leftOwner().isEmpty() )
{
- struct passwd* pw = getpwnam(QFile::encodeName(item->leftOwner()));
+ struct passwd* pw = getpwnam(TQFile::encodeName(item->leftOwner()));
if ( pw != 0L )
newOwnerID = pw->pw_uid;
}
gid_t newGroupID = (gid_t)-1; // chown(2) : -1 means no change
if ( !item->leftGroup().isEmpty() )
{
- struct group* g = getgrnam(QFile::encodeName(item->leftGroup()));
+ struct group* g = getgrnam(TQFile::encodeName(item->leftGroup()));
if ( g != 0L )
newGroupID = g->gr_gid;
}
@@ -1138,15 +1138,15 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
if( job->error() == KIO::ERR_FILE_ALREADY_EXIST && item->task() != TT_DELETE )
{
KIO::RenameDlg_Result result;
- QString newDest;
+ TQString newDest;
if( autoSkip )
break;
if ( item->task() == TT_COPY_TO_LEFT )
{
- QWidget *mainWidget = qApp->mainWidget(); // WORKAROUND, don't give focus to the main widget
- qApp->setMainWidget( syncDlgWidget );
+ TQWidget *mainWidget = tqApp->mainWidget(); // WORKAROUND, don't give focus to the main widget
+ tqApp->setMainWidget( syncDlgWidget );
result = Observer::self()->open_RenameDlg ( job, i18n("File Already Exists"),
vfs::pathOrURL( rightURL ), vfs::pathOrURL( leftURL ),
@@ -1154,12 +1154,12 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
item->rightSize(), item->leftSize(), (time_t)-1, (time_t)-1,
item->rightDate(), item->leftDate());
- qApp->setMainWidget( mainWidget );
+ tqApp->setMainWidget( mainWidget );
}
else
{
- QWidget *mainWidget = qApp->mainWidget(); // WORKAROUND, don't give focus to the main widget
- qApp->setMainWidget( syncDlgWidget );
+ TQWidget *mainWidget = tqApp->mainWidget(); // WORKAROUND, don't give focus to the main widget
+ tqApp->setMainWidget( syncDlgWidget );
result = Observer::self()->open_RenameDlg ( job, i18n("File Already Exists"),
vfs::pathOrURL( leftURL ), vfs::pathOrURL( rightURL ),
@@ -1167,7 +1167,7 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
item->leftSize(), item->rightSize(), (time_t)-1, (time_t)-1,
item->leftDate(), item->rightDate());
- qApp->setMainWidget( mainWidget );
+ tqApp->setMainWidget( mainWidget );
}
switch ( result )
@@ -1201,33 +1201,33 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
if( autoSkip )
break;
- QString error;
+ TQString error;
switch( item->task() )
{
case TT_COPY_TO_LEFT:
error = i18n("Error at copying file %1 to %2!")
- .arg( vfs::pathOrURL( rightURL ) )
- .arg( vfs::pathOrURL( leftURL ) );
+ .tqarg( vfs::pathOrURL( rightURL ) )
+ .tqarg( vfs::pathOrURL( leftURL ) );
break;
case TT_COPY_TO_RIGHT:
error = i18n("Error at copying file %1 to %2!")
- .arg( vfs::pathOrURL( leftURL ) )
- .arg( vfs::pathOrURL( rightURL ) );
+ .tqarg( vfs::pathOrURL( leftURL ) )
+ .tqarg( vfs::pathOrURL( rightURL ) );
break;
case TT_DELETE:
- error = i18n("Error at deleting file %1!").arg( vfs::pathOrURL( leftURL ) );
+ error = i18n("Error at deleting file %1!").tqarg( vfs::pathOrURL( leftURL ) );
break;
default:
break;
}
- QWidget *mainWidget = qApp->mainWidget(); // WORKAROUND, don't give focus to the main widget
- qApp->setMainWidget( syncDlgWidget );
+ TQWidget *mainWidget = tqApp->mainWidget(); // WORKAROUND, don't give focus to the main widget
+ tqApp->setMainWidget( syncDlgWidget );
KIO::SkipDlg_Result result = Observer::self()->open_SkipDlg( job, true, error );
- qApp->setMainWidget( mainWidget );
+ tqApp->setMainWidget( mainWidget );
switch( result )
{
@@ -1278,7 +1278,7 @@ void Synchronizer::slotProcessedSize( KIO::Job * job , KIO::filesize_t size)
SynchronizerFileItem * item = jobMap[ job ];
KIO::filesize_t lastProcessedSize = 0;
- if( receivedMap.contains( job ) )
+ if( receivedMap.tqcontains( job ) )
lastProcessedSize = receivedMap[ job ];
receivedMap[ job ] = size;
@@ -1312,12 +1312,12 @@ void Synchronizer::resume()
synchronizeLoop();
}
-QString Synchronizer::leftBaseDirectory()
+TQString Synchronizer::leftBaseDirectory()
{
return leftBaseDir;
}
-QString Synchronizer::rightBaseDirectory()
+TQString Synchronizer::rightBaseDirectory()
{
return rightBaseDir;
}
@@ -1325,20 +1325,20 @@ QString Synchronizer::rightBaseDirectory()
class KgetProgressDialog : public KDialogBase
{
public:
- KgetProgressDialog( QWidget *parent=0, const char *name=0, const QString &caption=QString::null,
- const QString &text=QString::null, bool modal=false) : KDialogBase( KDialogBase::Plain,
- caption, KDialogBase::User1 | KDialogBase::Cancel, KDialogBase::Cancel, parent, name, modal )
+ KgetProgressDialog( TQWidget *tqparent=0, const char *name=0, const TQString &caption=TQString(),
+ const TQString &text=TQString(), bool modal=false) : KDialogBase( KDialogBase::Plain,
+ caption, KDialogBase::User1 | KDialogBase::Cancel, KDialogBase::Cancel, tqparent, name, modal )
{
showButton(KDialogBase::Close, false);
- QFrame* mainWidget = plainPage();
- QVBoxLayout* layout = new QVBoxLayout(mainWidget, 10);
+ TQFrame* mainWidget = plainPage();
+ TQVBoxLayout* tqlayout = new TQVBoxLayout(mainWidget, 10);
- QLabel *mLabel = new QLabel(text, mainWidget);
- layout->addWidget(mLabel);
+ TQLabel *mLabel = new TQLabel(text, mainWidget);
+ tqlayout->addWidget(mLabel);
mProgressBar = new KProgress(mainWidget);
- layout->addWidget(mProgressBar);
+ tqlayout->addWidget(mProgressBar);
setButtonText( KDialogBase::User1, i18n( "Pause" ) );
@@ -1389,9 +1389,9 @@ void Synchronizer::synchronizeWithKGet()
if( item->isMarked() )
{
KURL downloadURL, destURL;
- QString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
- QString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
- QString destDir;
+ TQString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
+ TQString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
+ TQString destDir;
if( progDlg == 0 )
{
@@ -1399,7 +1399,7 @@ void Synchronizer::synchronizeWithKGet()
i18n( "Feeding the URLs to Kget" ), true );
progDlg->progressBar()->setTotalSteps( totalCount );
progDlg->show();
- qApp->processEvents();
+ tqApp->processEvents();
}
if( item->task() == TT_COPY_TO_RIGHT && !isLeftLocal )
@@ -1422,22 +1422,22 @@ void Synchronizer::synchronizeWithKGet()
}
// creating the directory system
- for( int i=0; i >= 0 ; i= destDir.find('/',i+1) )
- if( !QDir( destDir.left(i) ).exists() )
- QDir().mkdir( destDir.left(i) );
+ for( int i=0; i >= 0 ; i= destDir.tqfind('/',i+1) )
+ if( !TQDir( destDir.left(i) ).exists() )
+ TQDir().mkdir( destDir.left(i) );
if( !item->isDir() && !downloadURL.isEmpty() )
{
- if( QFile( destURL.path() ).exists() )
- QFile( destURL.path() ).remove();
+ if( TQFile( destURL.path() ).exists() )
+ TQFile( destURL.path() ).remove();
- QString source = downloadURL.prettyURL();
- if( source.contains( '@' ) >= 2 ) /* is this an ftp proxy URL? */
+ TQString source = downloadURL.prettyURL();
+ if( source.tqcontains( '@' ) >= 2 ) /* is this an ftp proxy URL? */
{
- int lastAt = source.findRev( '@' );
- QString startString = source.left( lastAt );
- QString endString = source.mid( lastAt );
- startString.replace( "@", "%40" );
+ int lastAt = source.tqfindRev( '@' );
+ TQString startString = source.left( lastAt );
+ TQString endString = source.mid( lastAt );
+ startString.tqreplace( "@", "%40" );
source = startString+endString;
}
@@ -1445,7 +1445,7 @@ void Synchronizer::synchronizeWithKGet()
p << KrServices::fullPathName( "kget" ) << source << destURL.path();
if (!p.start(KProcess::Block))
- KMessageBox::error(parentWidget,i18n("Error executing ")+KrServices::fullPathName( "kget" )+" !");
+ KMessageBox::error(tqparentWidget,i18n("Error executing ")+KrServices::fullPathName( "kget" )+" !");
else
p.detach();
}
@@ -1454,7 +1454,7 @@ void Synchronizer::synchronizeWithKGet()
do
{
- qApp->processEvents();
+ tqApp->processEvents();
if( progDlg->wasCancelled() )
break;
@@ -1483,11 +1483,11 @@ bool Synchronizer::isDir( const vfile * file ) {
}
}
-QString Synchronizer::readLink( const vfile * file ) {
+TQString Synchronizer::readLink( const vfile * file ) {
if( file->vfile_isSymLink() )
return file->vfile_getSymDest();
else
- return QString::null;
+ return TQString();
}
#include "synchronizer.moc"
diff --git a/krusader/Synchronizer/synchronizer.h b/krusader/Synchronizer/synchronizer.h
index ac4e338..ef9cdb7 100755
--- a/krusader/Synchronizer/synchronizer.h
+++ b/krusader/Synchronizer/synchronizer.h
@@ -33,39 +33,40 @@
#include "synchronizertask.h"
#include "synchronizerfileitem.h"
-#include <qobject.h>
-#include <qptrvector.h>
-#include <qmap.h>
-#include <qcolor.h>
+#include <tqobject.h>
+#include <tqptrvector.h>
+#include <tqmap.h>
+#include <tqcolor.h>
#include <kio/job.h>
class KRQuery;
class vfile;
-#define DECLARE_COLOR_NAME_ARRAY QString COLOR_NAMES[] = { "Equals", "Differs", "LeftCopy", "RightCopy", "Delete", \
+#define DECLARE_COLOR_NAME_ARRAY TQString COLOR_NAMES[] = { "Equals", "Differs", "LeftCopy", "RightCopy", "Delete", \
"Equals", "Equals", "Equals", "Equals", "Equals" }
-#define DECLARE_BACKGROUND_DFLTS QColor BCKG_DFLTS[] = { QColor(), QColor(), QColor(), QColor(), Qt::red, \
- QColor(), QColor(), QColor(), QColor(), QColor() }
-#define DECLARE_FOREGROUND_DFLTS QColor FORE_DFLTS[] = { Qt::black, Qt::red, Qt::blue, Qt::darkGreen, Qt::white, \
- Qt::black, Qt::black, Qt::black, Qt::black, Qt::black }
+#define DECLARE_BACKGROUND_DFLTS TQColor BCKG_DFLTS[] = { TQColor(), TQColor(), TQColor(), TQColor(), TQt::red, \
+ TQColor(), TQColor(), TQColor(), TQColor(), TQColor() }
+#define DECLARE_FOREGROUND_DFLTS TQColor FORE_DFLTS[] = { TQt::black, TQt::red, TQt::blue, TQt::darkGreen, TQt::white, \
+ TQt::black, TQt::black, TQt::black, TQt::black, TQt::black }
-class Synchronizer : public QObject
+class Synchronizer : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
private:
int displayUpdateCount; // the display is refreshed after every x-th change
public:
Synchronizer();
- int compare( QString leftURL, QString rightURL, KRQuery *query, bool subDirs, bool symLinks,
- bool igDate, bool asymm, bool cmpByCnt, bool igCase, bool autoSc, QStringList &selFiles,
+ int compare( TQString leftURL, TQString rightURL, KRQuery *query, bool subDirs, bool symLinks,
+ bool igDate, bool asymm, bool cmpByCnt, bool igCase, bool autoSc, TQStringList &selFiles,
int equThres, int timeOffs, int parThreads, bool hiddenFiles );
void stop() {stopped = true;}
void setMarkFlags( bool left, bool equal, bool differs, bool right, bool dup, bool sing, bool del );
int refresh( bool nostatus=false );
bool totalSizes( int *, KIO::filesize_t *, int *, KIO::filesize_t *, int *, KIO::filesize_t * );
- void synchronize( QWidget *,bool leftCopyEnabled, bool rightCopyEnabled, bool deleteEnabled,
+ void synchronize( TQWidget *,bool leftCopyEnabled, bool rightCopyEnabled, bool deleteEnabled,
bool overWrite, int parThreads );
void synchronizeWithKGet();
void setScrolling( bool scroll );
@@ -81,13 +82,13 @@ class Synchronizer : public QObject
void copyToRight( SynchronizerFileItem * );
void deleteLeft( SynchronizerFileItem * );
- QString leftBaseDirectory();
- QString rightBaseDirectory();
- static QString getTaskTypeName( TaskType taskType );
+ TQString leftBaseDirectory();
+ TQString rightBaseDirectory();
+ static TQString getTaskTypeName( TaskType taskType );
SynchronizerFileItem *getItemAt( unsigned ndx ) {return resultList.at(ndx);}
- void setParentWidget( QWidget * widget ) {parentWidget = widget;}
+ void setParentWidget( TQWidget * widget ) {tqparentWidget = widget;}
void compareContentResult( SynchronizerFileItem * item, bool result );
signals:
@@ -96,7 +97,7 @@ class Synchronizer : public QObject
void synchronizationFinished();
void processedSizes( int, KIO::filesize_t, int, KIO::filesize_t, int, KIO::filesize_t );
void pauseAccepted();
- void statusInfo( QString );
+ void statusInfo( TQString );
public slots:
void slotTaskFinished(KIO::Job*);
@@ -104,28 +105,28 @@ class Synchronizer : public QObject
private:
bool isDir( const vfile * file );
- QString readLink( const vfile * file );
+ TQString readLink( const vfile * file );
void compareDirectory( SynchronizerFileItem *,SynchronizerDirList *, SynchronizerDirList *,
- const QString &leftDir, const QString &rightDir );
- void addSingleDirectory( SynchronizerFileItem *, SynchronizerDirList *, const QString &, bool );
- SynchronizerFileItem * addItem( SynchronizerFileItem *, const QString &, const QString &,
- const QString &, const QString &, bool, bool, KIO::filesize_t,
- KIO::filesize_t, time_t, time_t, const QString &, const QString &,
- const QString &, const QString &, const QString &, const QString &,
- mode_t, mode_t, const QString &, const QString &, TaskType, bool, bool);
- SynchronizerFileItem * addLeftOnlyItem( SynchronizerFileItem *, const QString &, const QString &,
- KIO::filesize_t, time_t, const QString &, const QString &,
- const QString &, mode_t, const QString &, bool isDir = false, bool isTemp = false );
- SynchronizerFileItem * addRightOnlyItem( SynchronizerFileItem *, const QString &, const QString &,
- KIO::filesize_t, time_t, const QString &, const QString &,
- const QString &, mode_t, const QString &, bool isDir = false, bool isTemp = false );
- SynchronizerFileItem * addDuplicateItem( SynchronizerFileItem *, const QString &, const QString &,
- const QString &, const QString &, KIO::filesize_t,
- KIO::filesize_t, time_t, time_t, const QString &,
- const QString &, const QString &, const QString &,
- const QString &, const QString &, mode_t, mode_t, const QString &,
- const QString &, bool isDir = false, bool isTemp = false );
+ const TQString &leftDir, const TQString &rightDir );
+ void addSingleDirectory( SynchronizerFileItem *, SynchronizerDirList *, const TQString &, bool );
+ SynchronizerFileItem * addItem( SynchronizerFileItem *, const TQString &, const TQString &,
+ const TQString &, const TQString &, bool, bool, KIO::filesize_t,
+ KIO::filesize_t, time_t, time_t, const TQString &, const TQString &,
+ const TQString &, const TQString &, const TQString &, const TQString &,
+ mode_t, mode_t, const TQString &, const TQString &, TaskType, bool, bool);
+ SynchronizerFileItem * addLeftOnlyItem( SynchronizerFileItem *, const TQString &, const TQString &,
+ KIO::filesize_t, time_t, const TQString &, const TQString &,
+ const TQString &, mode_t, const TQString &, bool isDir = false, bool isTemp = false );
+ SynchronizerFileItem * addRightOnlyItem( SynchronizerFileItem *, const TQString &, const TQString &,
+ KIO::filesize_t, time_t, const TQString &, const TQString &,
+ const TQString &, mode_t, const TQString &, bool isDir = false, bool isTemp = false );
+ SynchronizerFileItem * addDuplicateItem( SynchronizerFileItem *, const TQString &, const TQString &,
+ const TQString &, const TQString &, KIO::filesize_t,
+ KIO::filesize_t, time_t, time_t, const TQString &,
+ const TQString &, const TQString &, const TQString &,
+ const TQString &, const TQString &, mode_t, mode_t, const TQString &,
+ const TQString &, bool isDir = false, bool isTemp = false );
bool isMarked( TaskType task, bool dupl );
bool markParentDirectories( SynchronizerFileItem * );
void synchronizeLoop();
@@ -150,11 +151,11 @@ class Synchronizer : public QObject
bool cmpByContent; // compare the files by content
bool ignoreCase; // case insensitive synchronization for Windows fs
bool autoScroll; // automatic update of the directory
- QPtrList<SynchronizerFileItem> resultList; // the found files
- QPtrList<SynchronizerFileItem> temporaryList; // temporary files
- QString leftBaseDir; // the left-side base directory
- QString rightBaseDir; // the right-side base directory
- QStringList excludedPaths; // list of the excluded paths
+ TQPtrList<SynchronizerFileItem> resultList; // the found files
+ TQPtrList<SynchronizerFileItem> temporaryList; // temporary files
+ TQString leftBaseDir; // the left-side base directory
+ TQString rightBaseDir; // the right-side base directory
+ TQStringList excludedPaths; // list of the excluded paths
KRQuery *query; // the filter used for the query
bool stopped; // 'Stop' button was pressed
@@ -190,15 +191,15 @@ class Synchronizer : public QObject
int fileCount; // the number of counted files
private:
- QPtrList<SynchronizerTask> stack; // stack for comparing
- QMap<KIO::Job *,SynchronizerFileItem *> jobMap; // job maps
- QMap<KIO::Job *,KIO::filesize_t> receivedMap; // the received file size
+ TQPtrList<SynchronizerTask> stack; // stack for comparing
+ TQMap<KIO::Job *,SynchronizerFileItem *> jobMap; // job maps
+ TQMap<KIO::Job *,KIO::filesize_t> receivedMap; // the received file size
SynchronizerFileItem *lastTask; // reference to the last stack
int inTaskFinished; // counter of quasy 'threads' in slotTaskFinished
- QStringList selectedFiles; // the selected files to compare
- QWidget *parentWidget; // the parent widget
- QWidget *syncDlgWidget; // the synchronizer dialog widget
+ TQStringList selectedFiles; // the selected files to compare
+ TQWidget *tqparentWidget; // the tqparent widget
+ TQWidget *syncDlgWidget; // the synchronizer dialog widget
};
#endif /* __SYNCHRONIZER_H__ */
diff --git a/krusader/Synchronizer/synchronizerdirlist.cpp b/krusader/Synchronizer/synchronizerdirlist.cpp
index 67decd6..906d0a1 100644
--- a/krusader/Synchronizer/synchronizerdirlist.cpp
+++ b/krusader/Synchronizer/synchronizerdirlist.cpp
@@ -36,8 +36,8 @@
#include <kmessagebox.h>
#include <kfileitem.h>
#include <klargefile.h>
-#include <qapplication.h>
-#include <qdir.h>
+#include <tqapplication.h>
+#include <tqdir.h>
#include <kdeversion.h>
@@ -48,8 +48,8 @@
#endif
#endif
-SynchronizerDirList::SynchronizerDirList( QWidget *w, bool hidden ) : QObject(), QDict<vfile>(), fileIterator( 0 ),
- parentWidget( w ), busy( false ), result( false ), ignoreHidden( hidden ), currentUrl() {
+SynchronizerDirList::SynchronizerDirList( TQWidget *w, bool hidden ) : TQObject(), TQDict<vfile>(), fileIterator( 0 ),
+ tqparentWidget( w ), busy( false ), result( false ), ignoreHidden( hidden ), currentUrl() {
setAutoDelete( true );
}
@@ -58,12 +58,12 @@ SynchronizerDirList::~SynchronizerDirList() {
delete fileIterator;
}
-vfile * SynchronizerDirList::search( const QString &name, bool ignoreCase ) {
+vfile * SynchronizerDirList::search( const TQString &name, bool ignoreCase ) {
if( !ignoreCase )
return (*this)[ name ];
vfile *item = first();
- QString file = name.lower();
+ TQString file = name.lower();
while( item )
{
@@ -82,7 +82,7 @@ vfile * SynchronizerDirList::next() {
return ++(*fileIterator);
}
-bool SynchronizerDirList::load( const QString &urlIn, bool wait ) {
+bool SynchronizerDirList::load( const TQString &urlIn, bool wait ) {
if( busy )
return false;
@@ -90,37 +90,37 @@ bool SynchronizerDirList::load( const QString &urlIn, bool wait ) {
KURL url = vfs::fromPathOrURL( urlIn );
if( fileIterator == 0 )
- fileIterator = new QDictIterator<vfile> ( *this );
+ fileIterator = new TQDictIterator<vfile> ( *this );
clear();
if( url.isLocalFile() ) {
- QString path = url.path( -1 );
+ TQString path = url.path( -1 );
DIR* dir = opendir(path.local8Bit());
if(!dir) {
- KMessageBox::error(parentWidget, i18n("Can't open the %1 directory!").arg( path ), i18n("Error"));
+ KMessageBox::error(tqparentWidget, i18n("Can't open the %1 directory!").tqarg( path ), i18n("Error"));
emit finished( result = false );
return false;
}
struct dirent* dirEnt;
- QString name;
+ TQString name;
while( (dirEnt=readdir(dir)) != NULL ){
- name = QString::fromLocal8Bit(dirEnt->d_name);
+ name = TQString::fromLocal8Bit(dirEnt->d_name);
if (name=="." || name == "..") continue;
if (ignoreHidden && name.startsWith( "." ) ) continue;
- QString fullName = path + "/" + name;
+ TQString fullName = path + "/" + name;
KDE_struct_stat stat_p;
KDE_lstat(fullName.local8Bit(),&stat_p);
- QString perm = KRpermHandler::mode2QString(stat_p.st_mode);
+ TQString perm = KRpermHandler::mode2TQString(stat_p.st_mode);
bool symLink= S_ISLNK(stat_p.st_mode);
- QString symlinkDest;
+ TQString symlinkDest;
if( symLink ){ // who the link is pointing to ?
char symDest[256];
@@ -128,17 +128,17 @@ bool SynchronizerDirList::load( const QString &urlIn, bool wait ) {
int endOfName=0;
endOfName=readlink(fullName.local8Bit(),symDest,256);
if ( endOfName != -1 ) {
- QString absSymDest = symlinkDest = QString::fromLocal8Bit( symDest );
+ TQString absSymDest = symlinkDest = TQString::fromLocal8Bit( symDest );
if( !absSymDest.startsWith( "/" ) )
- absSymDest = QDir::cleanDirPath( path + "/" + absSymDest );
+ absSymDest = TQDir::cleanDirPath( path + "/" + absSymDest );
- if ( QDir( absSymDest ).exists() )
+ if ( TQDir( absSymDest ).exists() )
perm[0] = 'd';
}
}
- QString mime = QString::null;
+ TQString mime = TQString();
KURL fileURL = KURL::fromPathOrURL( fullName );
@@ -154,17 +154,17 @@ bool SynchronizerDirList::load( const QString &urlIn, bool wait ) {
return true;
} else {
KIO::Job *job = KIO::listDir( url, false, true );
- connect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- this, SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotListResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
+ this, TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotListResult( KIO::Job* ) ) );
busy = true;
if( !wait )
return true;
while( busy )
- qApp->processEvents();
+ tqApp->processEvents();
return result;
}
}
@@ -175,7 +175,7 @@ void SynchronizerDirList::slotEntries( KIO::Job * job, const KIO::UDSEntryList&
KIO::UDSEntryListConstIterator end = entries.end();
int rwx = -1;
- QString prot = (( KIO::ListJob *)job )->url().protocol();
+ TQString prot = (( KIO::ListJob *)job )->url().protocol();
if( prot == "krarc" || prot == "tar" || prot == "zip" )
rwx = PERM_ALL;
@@ -183,10 +183,10 @@ void SynchronizerDirList::slotEntries( KIO::Job * job, const KIO::UDSEntryList&
while( it != end )
{
KFileItem kfi( *it, (( KIO::ListJob *)job )->url(), true, true );
- QString key = kfi.text();
+ TQString key = kfi.text();
if( key != "." && key != ".." && (!ignoreHidden || !key.startsWith(".") ) ) {
mode_t mode = kfi.mode() | kfi.permissions();
- QString perm = KRpermHandler::mode2QString( mode );
+ TQString perm = KRpermHandler::mode2TQString( mode );
if ( kfi.isDir() )
perm[ 0 ] = 'd';
@@ -206,7 +206,7 @@ void SynchronizerDirList::slotEntries( KIO::Job * job, const KIO::UDSEntryList&
void SynchronizerDirList::slotListResult( KIO::Job *job ) {
busy = false;
if ( job && job->error() ) {
- job->showErrorDialog( parentWidget );
+ job->showErrorDialog( tqparentWidget );
emit finished( result = false );
return;
}
diff --git a/krusader/Synchronizer/synchronizerdirlist.h b/krusader/Synchronizer/synchronizerdirlist.h
index 5cccd5c..e81eaf3 100644
--- a/krusader/Synchronizer/synchronizerdirlist.h
+++ b/krusader/Synchronizer/synchronizerdirlist.h
@@ -31,26 +31,27 @@
#ifndef __SYNCHRONIZER_DIR_LIST_H__
#define __SYNCHRONIZER_DIR_LIST_H__
-#include <qobject.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqdict.h>
#include "../VFS/vfile.h"
#include <kio/job.h>
-class SynchronizerDirList : public QObject, public QDict<vfile>
+class SynchronizerDirList : public TQObject, public TQDict<vfile>
{
Q_OBJECT
+ TQ_OBJECT
public:
- SynchronizerDirList( QWidget *w, bool ignoreHidden );
+ SynchronizerDirList( TQWidget *w, bool ignoreHidden );
~SynchronizerDirList();
- vfile * search( const QString &name, bool ignoreCase = false );
+ vfile * search( const TQString &name, bool ignoreCase = false );
vfile * first();
vfile * next();
- inline const QString & url() { return currentUrl; }
- bool load( const QString &urlIn, bool wait=false );
+ inline const TQString & url() { return currentUrl; }
+ bool load( const TQString &urlIn, bool wait=false );
public slots:
@@ -61,12 +62,12 @@ signals:
void finished( bool err );
private:
- QDictIterator<vfile> *fileIterator; //< Point to a dictionary of virtual files (vfile).
- QWidget *parentWidget;
+ TQDictIterator<vfile> *fileIterator; //< Point to a dictionary of virtual files (vfile).
+ TQWidget *tqparentWidget;
bool busy;
bool result;
bool ignoreHidden;
- QString currentUrl;
+ TQString currentUrl;
};
#endif /* __SYNCHRONIZER_DIR_LIST_H__ */
diff --git a/krusader/Synchronizer/synchronizerfileitem.h b/krusader/Synchronizer/synchronizerfileitem.h
index 0a2268a..9846ac3 100644
--- a/krusader/Synchronizer/synchronizerfileitem.h
+++ b/krusader/Synchronizer/synchronizerfileitem.h
@@ -31,7 +31,7 @@
#ifndef __SYNCHRONIZER_FILE_ITEM_H__
#define __SYNCHRONIZER_FILE_ITEM_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <kio/global.h>
typedef enum
@@ -64,10 +64,10 @@ typedef enum
class SynchronizerFileItem
{
private:
- QString m_leftName; // the left file name
- QString m_rightName; // the right file name
- QString m_leftDirectory;// the left relative directory path from the base
- QString m_rightDirectory;// the left relative directory path from the base
+ TQString m_leftName; // the left file name
+ TQString m_rightName; // the right file name
+ TQString m_leftDirectory;// the left relative directory path from the base
+ TQString m_rightDirectory;// the left relative directory path from the base
bool m_marked; // flag, indicates to show the file
bool m_existsLeft; // flag, the file exists in the left directory
bool m_existsRight; // flag, the file exists in the right directory
@@ -75,49 +75,49 @@ class SynchronizerFileItem
KIO::filesize_t m_rightSize; // the file size at the right directory
time_t m_leftDate; // the file date at the left directory
time_t m_rightDate; // the file date at the left directory
- QString m_leftLink; // the left file's symbolic link destination
- QString m_rightLink; // the right file's symbolic link destination
- QString m_leftOwner; // the left file's owner
- QString m_rightOwner; // the right file's owner
- QString m_leftGroup; // the left file's group
- QString m_rightGroup; // the right file's group
+ TQString m_leftLink; // the left file's symbolic link destination
+ TQString m_rightLink; // the right file's symbolic link destination
+ TQString m_leftOwner; // the left file's owner
+ TQString m_rightOwner; // the right file's owner
+ TQString m_leftGroup; // the left file's group
+ TQString m_rightGroup; // the right file's group
mode_t m_leftMode; // mode for left
mode_t m_rightMode; // mode for right
- QString m_leftACL; // ACL of the left file
- QString m_rightACL; // ACL of the right file
+ TQString m_leftACL; // ACL of the left file
+ TQString m_rightACL; // ACL of the right file
TaskType m_task; // the task with the file
bool m_isDir; // flag, indicates that the file is a directory
- SynchronizerFileItem *m_parent; // pointer to the parent directory item or 0
+ SynchronizerFileItem *m_parent; // pointer to the tqparent directory item or 0
void *m_userData; // user data
bool m_overWrite; // overwrite flag
- QString m_destination; // the destination URL at rename
+ TQString m_destination; // the destination URL at rename
bool m_temporary; // flag indicates temporary directory
TaskType m_originalTask; // the original task type
public:
- SynchronizerFileItem(const QString &leftNam, const QString &rightNam, const QString &leftDir,
- const QString &rightDir, bool mark, bool exL, bool exR, KIO::filesize_t leftSize,
+ SynchronizerFileItem(const TQString &leftNam, const TQString &rightNam, const TQString &leftDir,
+ const TQString &rightDir, bool mark, bool exL, bool exR, KIO::filesize_t leftSize,
KIO::filesize_t rightSize, time_t leftDate, time_t rightDate,
- const QString &leftLink, const QString &rightLink, const QString &leftOwner,
- const QString &rightOwner, const QString &leftGroup, const QString &rightGroup,
- mode_t leftMode, mode_t rightMode, const QString &leftACL, const QString &rightACL,
- TaskType tsk, bool isDir, bool tmp, SynchronizerFileItem *parent ) :
+ const TQString &leftLink, const TQString &rightLink, const TQString &leftOwner,
+ const TQString &rightOwner, const TQString &leftGroup, const TQString &rightGroup,
+ mode_t leftMode, mode_t rightMode, const TQString &leftACL, const TQString &rightACL,
+ TaskType tsk, bool isDir, bool tmp, SynchronizerFileItem *tqparent ) :
m_leftName( leftNam ), m_rightName( rightNam ), m_leftDirectory( leftDir ), m_rightDirectory( rightDir ),
m_marked( mark ), m_existsLeft( exL ), m_existsRight( exR ), m_leftSize( leftSize ),
m_rightSize( rightSize ), m_leftDate( leftDate ), m_rightDate( rightDate ),
m_leftLink( leftLink ), m_rightLink( rightLink ), m_leftOwner( leftOwner ),
m_rightOwner( rightOwner ), m_leftGroup( leftGroup ), m_rightGroup( rightGroup ),
m_leftMode( leftMode ), m_rightMode( rightMode ), m_leftACL( leftACL ),
- m_rightACL( rightACL ), m_task( tsk ), m_isDir( isDir ), m_parent(parent),
- m_userData( 0 ), m_overWrite( false ), m_destination( QString::null ),
+ m_rightACL( rightACL ), m_task( tsk ), m_isDir( isDir ), m_parent(tqparent),
+ m_userData( 0 ), m_overWrite( false ), m_destination( TQString() ),
m_temporary( tmp ), m_originalTask( tsk ) {}
inline bool isMarked() {return m_marked;}
inline void setMarked( bool flag ) {m_marked = flag;}
- inline const QString & leftName() {return m_leftName;}
- inline const QString & rightName() {return m_rightName;}
- inline const QString & leftDirectory() {return m_leftDirectory;}
- inline const QString & rightDirectory() {return m_rightDirectory;}
+ inline const TQString & leftName() {return m_leftName;}
+ inline const TQString & rightName() {return m_rightName;}
+ inline const TQString & leftDirectory() {return m_leftDirectory;}
+ inline const TQString & rightDirectory() {return m_rightDirectory;}
inline bool existsInLeft() {return m_existsLeft;}
inline bool existsInRight() {return m_existsRight;}
inline bool overWrite() {return m_overWrite;}
@@ -125,16 +125,16 @@ class SynchronizerFileItem
inline KIO::filesize_t rightSize() {return m_rightSize;}
inline time_t leftDate() {return m_leftDate;}
inline time_t rightDate() {return m_rightDate;}
- inline const QString & leftLink() {return m_leftLink;}
- inline const QString & rightLink() {return m_rightLink;}
- inline const QString & leftOwner() {return m_leftOwner;}
- inline const QString & rightOwner() {return m_rightOwner;}
- inline const QString & leftGroup() {return m_leftGroup;}
- inline const QString & rightGroup() {return m_rightGroup;}
+ inline const TQString & leftLink() {return m_leftLink;}
+ inline const TQString & rightLink() {return m_rightLink;}
+ inline const TQString & leftOwner() {return m_leftOwner;}
+ inline const TQString & rightOwner() {return m_rightOwner;}
+ inline const TQString & leftGroup() {return m_leftGroup;}
+ inline const TQString & rightGroup() {return m_rightGroup;}
inline mode_t leftMode() {return m_leftMode;}
inline mode_t rightMode() {return m_rightMode;}
- inline const QString & leftACL() {return m_leftACL;}
- inline const QString & rightACL() {return m_rightACL;}
+ inline const TQString & leftACL() {return m_leftACL;}
+ inline const TQString & rightACL() {return m_rightACL;}
inline TaskType task() {return m_task;}
inline void compareContentResult( bool res )
{if( res == true )
@@ -143,26 +143,26 @@ class SynchronizerFileItem
m_task = m_originalTask = (TaskType)(m_originalTask - TT_UNKNOWN);
}
inline bool isDir() {return m_isDir;}
- inline SynchronizerFileItem * parent() {return m_parent;}
+ inline SynchronizerFileItem * tqparent() {return m_parent;}
inline void * userData() {return m_userData;}
inline void setUserData( void *ud) {m_userData = ud;}
inline void setOverWrite() {m_overWrite = true;}
- inline const QString & destination() {return m_destination;}
- inline void setDestination(QString d) {m_destination = d;}
+ inline const TQString & destination() {return m_destination;}
+ inline void setDestination(TQString d) {m_destination = d;}
inline bool isTemporary() {return m_temporary;}
inline void setPermanent() {m_temporary = false;}
inline TaskType originalTask() {return m_originalTask;}
inline void restoreOriginalTask() {m_task = m_originalTask;}
inline void setTask( TaskType t ) {m_task = t;}
inline void swap( bool asym=false ) {SWAP( m_existsLeft, m_existsRight, bool );
- SWAP( m_leftName, m_rightName, QString );
- SWAP( m_leftDirectory, m_rightDirectory, QString );
+ SWAP( m_leftName, m_rightName, TQString );
+ SWAP( m_leftDirectory, m_rightDirectory, TQString );
SWAP( m_leftSize, m_rightSize, KIO::filesize_t );
SWAP( m_leftDate, m_rightDate, time_t );
- SWAP( m_leftLink, m_rightLink, QString );
- SWAP( m_leftOwner, m_rightOwner, QString );
- SWAP( m_leftGroup, m_rightGroup, QString );
- SWAP( m_leftACL, m_rightACL, QString );
+ SWAP( m_leftLink, m_rightLink, TQString );
+ SWAP( m_leftOwner, m_rightOwner, TQString );
+ SWAP( m_leftGroup, m_rightGroup, TQString );
+ SWAP( m_leftACL, m_rightACL, TQString );
REVERSE_TASK( m_originalTask, asym );
REVERSE_TASK( m_task, asym );}
};
diff --git a/krusader/Synchronizer/synchronizergui.cpp b/krusader/Synchronizer/synchronizergui.cpp
index 639b568..adc68f6 100755
--- a/krusader/Synchronizer/synchronizergui.cpp
+++ b/krusader/Synchronizer/synchronizergui.cpp
@@ -40,23 +40,23 @@
#include "../kicons.h"
#include "synchronizedialog.h"
#include "feedtolistboxdialog.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kurlrequester.h>
#include <klocale.h>
-#include <qgrid.h>
+#include <tqgrid.h>
#include <kpopupmenu.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include <time.h>
#include <kmessagebox.h>
#include <kio/netaccess.h>
-#include <qeventloop.h>
-#include <qwhatsthis.h>
-#include <qregexp.h>
-#include <qheader.h>
-#include <qspinbox.h>
+#include <tqeventloop.h>
+#include <tqwhatsthis.h>
+#include <tqregexp.h>
+#include <tqheader.h>
+#include <tqspinbox.h>
#include <kinputdialog.h>
#include <kurldrag.h>
-#include <qclipboard.h>
+#include <tqclipboard.h>
static const char * const right_arrow_button_data[] = {
"18 18 97 2",
@@ -1010,21 +1010,21 @@ static const char * const swap_sides_data[] = {
" ",
" "};
-class SynchronizerListView : public QListView
+class SynchronizerListView : public TQListView
{
private:
Synchronizer *synchronizer;
bool isLeft;
public:
- SynchronizerListView( Synchronizer * sync, QWidget * parent ) : QListView( parent ), synchronizer( sync )
+ SynchronizerListView( Synchronizer * sync, TQWidget * tqparent ) : TQListView( tqparent ), synchronizer( sync )
{
}
- void contentsMouseMoveEvent ( QMouseEvent * e )
+ void contentsMouseMoveEvent ( TQMouseEvent * e )
{
isLeft = (( e->state() & ShiftButton ) == 0 );
- QListView::contentsMouseMoveEvent( e );
+ TQListView::contentsMouseMoveEvent( e );
}
void startDrag()
{
@@ -1045,13 +1045,13 @@ public:
{
if( isLeft && item->existsInLeft() )
{
- QString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
+ TQString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
KURL leftURL = vfs::fromPathOrURL( synchronizer->leftBaseDirectory() + leftDirName + item->leftName() );
urls.push_back( leftURL );
}
else if( !isLeft && item->existsInRight() )
{
- QString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
+ TQString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
KURL rightURL = vfs::fromPathOrURL( synchronizer->rightBaseDirectory() + rightDirName + item->rightName() );
urls.push_back( rightURL );
}
@@ -1062,22 +1062,22 @@ public:
return;
KURLDrag *d = new KURLDrag(urls, this);
- d->setPixmap( FL_LOADICON( isLeft ? "2leftarrow" : "2rightarrow" ), QPoint( -7, 0 ) );
+ d->setPixmap( FL_LOADICON( isLeft ? "2leftarrow" : "2rightarrow" ), TQPoint( -7, 0 ) );
d->dragCopy();
}
};
-SynchronizerGUI::SynchronizerGUI(QWidget* parent, KURL leftURL, KURL rightURL, QStringList selList ) :
- QDialog( parent, "Krusader::SynchronizerGUI", false, 0 ) {
- initGUI( parent, QString::null, leftURL, rightURL, selList );
+SynchronizerGUI::SynchronizerGUI(TQWidget* tqparent, KURL leftURL, KURL rightURL, TQStringList selList ) :
+ TQDialog( tqparent, "Krusader::SynchronizerGUI", false, 0 ) {
+ initGUI( tqparent, TQString(), leftURL, rightURL, selList );
}
-SynchronizerGUI::SynchronizerGUI(QWidget* parent, QString profile ) :
- QDialog( parent, "Krusader::SynchronizerGUI", false, 0 ) {
- initGUI( parent, profile, KURL(), KURL(), QStringList() );
+SynchronizerGUI::SynchronizerGUI(TQWidget* tqparent, TQString profile ) :
+ TQDialog( tqparent, "Krusader::SynchronizerGUI", false, 0 ) {
+ initGUI( tqparent, profile, KURL(), KURL(), TQStringList() );
}
-void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL leftURL, KURL rightURL, QStringList selList) {
+void SynchronizerGUI::initGUI(TQWidget* /* tqparent */, TQString profileName, KURL leftURL, KURL rightURL, TQStringList selList) {
selectedFiles = selList;
isComparing = wasClosed = wasSync = false;
firstResize = true;
@@ -1091,44 +1091,44 @@ void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL l
rightURL = KURL("/");
setCaption( i18n("Krusader::Synchronize Directories") );
- QGridLayout *synchGrid = new QGridLayout( this );
+ TQGridLayout *synchGrid = new TQGridLayout( this );
synchGrid->setSpacing( 6 );
synchGrid->setMargin( 11 );
- folderIcon = QPixmap( ( const char** ) folder_data );
- fileIcon = QPixmap( ( const char** ) file_data );
+ folderIcon = TQPixmap( ( const char** ) folder_data );
+ fileIcon = TQPixmap( ( const char** ) file_data );
- synchronizerTabs = new QTabWidget( this, "synchronizerTabs" );
+ synchronizerTabs = new TQTabWidget( this, "synchronizerTabs" );
/* ============================== Compare groupbox ============================== */
- QWidget *synchronizerTab = new QWidget( this, "syncronizerTab" );
- QGridLayout *synchronizerGrid = new QGridLayout( synchronizerTab );
+ TQWidget *synchronizerTab = new TQWidget( this, "syncronizerTab" );
+ TQGridLayout *synchronizerGrid = new TQGridLayout( synchronizerTab );
synchronizerGrid->setSpacing( 6 );
synchronizerGrid->setMargin( 11 );
- QGroupBox *compareDirs = new QGroupBox( synchronizerTab, "SyncCompareDirectories" );
- compareDirs->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed);
+ TQGroupBox *compareDirs = new TQGroupBox( synchronizerTab, "SyncCompareDirectories" );
+ compareDirs->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed);
compareDirs->setTitle( i18n( "Directory Comparison" ) );
compareDirs->setColumnLayout(0, Qt::Vertical );
- compareDirs->layout()->setSpacing( 0 );
- compareDirs->layout()->setMargin( 0 );
+ compareDirs->tqlayout()->setSpacing( 0 );
+ compareDirs->tqlayout()->setMargin( 0 );
- QGridLayout *grid = new QGridLayout( compareDirs->layout() );
+ TQGridLayout *grid = new TQGridLayout( compareDirs->tqlayout() );
grid->setSpacing( 6 );
grid->setMargin( 11 );
- leftDirLabel = new QLabel( compareDirs, "leftDirLabel" );
- leftDirLabel->setAlignment( Qt::AlignHCenter );
+ leftDirLabel = new TQLabel( compareDirs, "leftDirLabel" );
+ leftDirLabel->tqsetAlignment( TQt::AlignHCenter );
grid->addWidget( leftDirLabel, 0 ,0 );
- QLabel *filterLabel = new QLabel( compareDirs, "filterLabel" );
+ TQLabel *filterLabel = new TQLabel( compareDirs, "filterLabel" );
filterLabel->setText( i18n( "File &Filter:" ) );
- filterLabel->setAlignment( Qt::AlignHCenter );
+ filterLabel->tqsetAlignment( TQt::AlignHCenter );
grid->addWidget( filterLabel, 0 ,1 );
- rightDirLabel = new QLabel( compareDirs, "rightDirLabel" );
- rightDirLabel->setAlignment( Qt::AlignHCenter );
+ rightDirLabel = new TQLabel( compareDirs, "rightDirLabel" );
+ rightDirLabel->tqsetAlignment( TQt::AlignHCenter );
grid->addWidget( rightDirLabel, 0 ,2 );
krConfig->setGroup("Synchronize");
@@ -1137,15 +1137,15 @@ void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL l
leftLocation->setMaxCount(25); // remember 25 items
leftLocation->setDuplicatesEnabled( false );
leftLocation->setEditable( true );
- leftLocation->setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Fixed);
- QStringList list = krConfig->readListEntry("Left Directory History");
+ leftLocation->tqsetSizePolicy(TQSizePolicy::Ignored,TQSizePolicy::Fixed);
+ TQStringList list = krConfig->readListEntry("Left Directory History");
leftLocation->setHistoryItems(list);
KURLRequester *leftUrlReq = new KURLRequester( leftLocation, compareDirs, "LeftDirectory" );
leftUrlReq->setURL( vfs::pathOrURL( leftURL ) );
leftUrlReq->setMode( KFile::Directory );
leftUrlReq->setMinimumWidth( 250 );
grid->addWidget( leftUrlReq, 1 ,0 );
- QWhatsThis::add( leftLocation, i18n( "The left base directory used during the synchronisation process." ) );
+ TQWhatsThis::add( leftLocation, i18n( "The left base directory used during the synchronisation process." ) );
leftUrlReq->setEnabled( !hasSelectedFiles );
leftLocation->setEnabled( !hasSelectedFiles );
leftDirLabel->setBuddy( leftLocation );
@@ -1155,22 +1155,22 @@ void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL l
fileFilter->setDuplicatesEnabled( false );
fileFilter->setMinimumWidth( 100 );
fileFilter->setMaximumWidth( 100 );
- fileFilter->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
+ fileFilter->tqsetSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Fixed);
list = krConfig->readListEntry("File Filter");
fileFilter->setHistoryItems(list);
fileFilter->setEditText("*");
grid->addWidget( fileFilter, 1 ,1 );
filterLabel->setBuddy( fileFilter );
- QString wtFilter = "<p><img src='toolbar|find'></p>" + i18n("<p>The filename filtering criteria is defined here.</p><p>You can make use of wildcards. Multiple patterns are separated by space (means logical OR) and patterns are excluded from the search using the pipe symbol.</p><p>If the pattern is ended with a slash (<code>*pattern*/</code>), that means that pattern relates to recursive search of directories.<ul><li><code>pattern</code> - means to search those files/directories that name is <code>pattern</code>, recursive search goes through all subdirectories independently of the value of <code>pattern</code></li><li><code>pattern/</code> - means to search all files/directories, but recursive search goes through/excludes the directories that name is <code>pattern</code></li></ul><p></p><p>It's allowed to use quotation marks for names that contain space. Filter <code>\"Program&nbsp;Files\"</code> searches out those files/directories that name is <code>Program&nbsp;Files</code>.</p><p>Examples:<ul><code><li>*.o</li><li>*.h *.c\?\?</li><li>*.cpp *.h | *.moc.cpp</li><li>* | CVS/ .svn/</li></code></ul><b>Note</b>: the search term '<code>text</code>' is equivalent to '<code>*text*</code>'.</p>");
- QWhatsThis::add(fileFilter, wtFilter);
- QWhatsThis::add(filterLabel, wtFilter);
+ TQString wtFilter = "<p><img src='toolbar|tqfind'></p>" + i18n("<p>The filename filtering criteria is defined here.</p><p>You can make use of wildcards. Multiple patterns are separated by space (means logical OR) and patterns are excluded from the search using the pipe symbol.</p><p>If the pattern is ended with a slash (<code>*pattern*/</code>), that means that pattern relates to recursive search of directories.<ul><li><code>pattern</code> - means to search those files/directories that name is <code>pattern</code>, recursive search goes through all subdirectories independently of the value of <code>pattern</code></li><li><code>pattern/</code> - means to search all files/directories, but recursive search goes through/excludes the directories that name is <code>pattern</code></li></ul><p></p><p>It's allowed to use quotation marks for names that contain space. Filter <code>\"Program&nbsp;Files\"</code> searches out those files/directories that name is <code>Program&nbsp;Files</code>.</p><p>Examples:<ul><code><li>*.o</li><li>*.h *.c\?\?</li><li>*.cpp *.h | *.tqmoc.cpp</li><li>* | CVS/ .svn/</li></code></ul><b>Note</b>: the search term '<code>text</code>' is equivalent to '<code>*text*</code>'.</p>");
+ TQWhatsThis::add(fileFilter, wtFilter);
+ TQWhatsThis::add(filterLabel, wtFilter);
rightLocation = new KHistoryCombo(compareDirs, "SynchronizerHistoryRight");
rightLocation->setMaxCount(25); // remember 25 items
rightLocation->setDuplicatesEnabled( false );
rightLocation->setEditable( true );
- rightLocation->setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Fixed);
+ rightLocation->tqsetSizePolicy(TQSizePolicy::Ignored,TQSizePolicy::Fixed);
list = krConfig->readListEntry("Right Directory History");
rightLocation->setHistoryItems(list);
KURLRequester *rightUrlReq = new KURLRequester( rightLocation, compareDirs, "RightDirectory" );
@@ -1178,110 +1178,110 @@ void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL l
rightUrlReq->setMode( KFile::Directory );
rightUrlReq->setMinimumWidth( 250 );
grid->addWidget( rightUrlReq, 1 ,2 );
- QWhatsThis::add( rightLocation, i18n( "The right base directory used during the synchronisation process." ) );
+ TQWhatsThis::add( rightLocation, i18n( "The right base directory used during the synchronisation process." ) );
rightUrlReq->setEnabled( !hasSelectedFiles );
rightLocation->setEnabled( !hasSelectedFiles );
rightDirLabel->setBuddy( rightLocation );
- QHBox *optionBox = new QHBox( compareDirs );
- QGrid *optionGrid = new QGrid( 3, optionBox );
- cbSubdirs = new QCheckBox( i18n( "Recurse subdirectories" ), optionGrid, "cbSubdirs" );
+ TQHBox *optionBox = new TQHBox( compareDirs );
+ TQGrid *optionGrid = new TQGrid( 3, optionBox );
+ cbSubdirs = new TQCheckBox( i18n( "Recurse subdirectories" ), optionGrid, "cbSubdirs" );
cbSubdirs->setChecked( krConfig->readBoolEntry( "Recurse Subdirectories", _RecurseSubdirs ) );
- QWhatsThis::add( cbSubdirs, i18n( "Compare not only the base directories but their subdirectories as well." ) );
- cbSymlinks = new QCheckBox( i18n( "Follow symlinks" ), optionGrid, "cbSymlinks" );
+ TQWhatsThis::add( cbSubdirs, i18n( "Compare not only the base directories but their subdirectories as well." ) );
+ cbSymlinks = new TQCheckBox( i18n( "Follow symlinks" ), optionGrid, "cbSymlinks" );
cbSymlinks->setChecked( krConfig->readBoolEntry( "Follow Symlinks", _FollowSymlinks ) );
cbSymlinks->setEnabled( cbSubdirs->isChecked() );
- QWhatsThis::add( cbSymlinks, i18n( "Follow symbolic links during the compare process." ) );
- cbByContent = new QCheckBox( i18n( "Compare by content" ), optionGrid, "cbByContent" );
+ TQWhatsThis::add( cbSymlinks, i18n( "Follow symbolic links during the compare process." ) );
+ cbByContent = new TQCheckBox( i18n( "Compare by content" ), optionGrid, "cbByContent" );
cbByContent->setChecked( krConfig->readBoolEntry( "Compare By Content", _CompareByContent ) );
- QWhatsThis::add( cbByContent, i18n( "Compare duplicated files with same size by content." ) );
- cbIgnoreDate = new QCheckBox( i18n( "Ignore Date" ), optionGrid, "cbIgnoreDate" );
+ TQWhatsThis::add( cbByContent, i18n( "Compare duplicated files with same size by content." ) );
+ cbIgnoreDate = new TQCheckBox( i18n( "Ignore Date" ), optionGrid, "cbIgnoreDate" );
cbIgnoreDate->setChecked( krConfig->readBoolEntry( "Ignore Date", _IgnoreDate ) );
- QWhatsThis::add( cbIgnoreDate, i18n( "<p>Ignore date information during the compare process.</p><p><b>Note</b>: useful if the files are located on network filesystems or in archives.</p>" ) );
- cbAsymmetric = new QCheckBox( i18n( "Asymmetric" ), optionGrid, "cbAsymmetric" );
+ TQWhatsThis::add( cbIgnoreDate, i18n( "<p>Ignore date information during the compare process.</p><p><b>Note</b>: useful if the files are located on network filesystems or in archives.</p>" ) );
+ cbAsymmetric = new TQCheckBox( i18n( "Asymmetric" ), optionGrid, "cbAsymmetric" );
cbAsymmetric->setChecked( krConfig->readBoolEntry( "Asymmetric", _Asymmetric ) );
- QWhatsThis::add( cbAsymmetric, i18n( "<p><b>Asymmetric mode</b></p><p>The left side is the destination, the right is the source directory. Files existing only in the left directory will be deleted, the other differing ones will be copied from right to left.</p><p><b>Note</b>: useful when updating a directory from a file server.</p>" ) );
- cbIgnoreCase = new QCheckBox( i18n( "Ignore Case" ), optionGrid, "cbIgnoreCase" );
+ TQWhatsThis::add( cbAsymmetric, i18n( "<p><b>Asymmetric mode</b></p><p>The left side is the destination, the right is the source directory. Files existing only in the left directory will be deleted, the other differing ones will be copied from right to left.</p><p><b>Note</b>: useful when updating a directory from a file server.</p>" ) );
+ cbIgnoreCase = new TQCheckBox( i18n( "Ignore Case" ), optionGrid, "cbIgnoreCase" );
cbIgnoreCase->setChecked( krConfig->readBoolEntry( "Ignore Case", _IgnoreCase ) );
- QWhatsThis::add( cbIgnoreCase, i18n( "<p>Case insensitive filename compare.</p><p><b>Note</b>: useful when synchronizing Windows filesystems.</p>" ) );
+ TQWhatsThis::add( cbIgnoreCase, i18n( "<p>Case insensitive filename compare.</p><p><b>Note</b>: useful when synchronizing Windows filesystems.</p>" ) );
/* =========================== Show options groupbox ============================= */
- QGroupBox *showOptions = new QGroupBox( optionBox, "SyncOptionBox" );
+ TQGroupBox *showOptions = new TQGroupBox( optionBox, "SyncOptionBox" );
showOptions->setTitle( i18n( "S&how options" ) );
- showOptions->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed);
+ showOptions->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed);
showOptions->setColumnLayout(0, Qt::Vertical );
- showOptions->layout()->setSpacing( 0 );
- showOptions->layout()->setMargin( 0 );
- QGridLayout *showOptionsLayout = new QGridLayout( showOptions->layout() );
+ showOptions->tqlayout()->setSpacing( 0 );
+ showOptions->tqlayout()->setMargin( 0 );
+ TQGridLayout *showOptionsLayout = new TQGridLayout( showOptions->tqlayout() );
showOptionsLayout->setSpacing( 6 );
showOptionsLayout->setMargin( 11 );
- QPixmap showLeftToRight( ( const char** ) right_arrow_button_data );
- QPixmap showEquals ( ( const char** ) equals_button_data );
- QPixmap showDifferents ( ( const char** ) differents_button_data );
- QPixmap showRightToLeft( ( const char** ) left_arrow_button_data );
- QPixmap showDeletable ( ( const char** ) trash_button_data );
+ TQPixmap showLeftToRight( ( const char** ) right_arrow_button_data );
+ TQPixmap showEquals ( ( const char** ) equals_button_data );
+ TQPixmap showDifferents ( ( const char** ) differents_button_data );
+ TQPixmap showRightToLeft( ( const char** ) left_arrow_button_data );
+ TQPixmap showDeletable ( ( const char** ) trash_button_data );
- btnLeftToRight = new QPushButton( showOptions, "btnLeftToRight" );
+ btnLeftToRight = new TQPushButton( showOptions, "btnLeftToRight" );
btnLeftToRight->setText( "" );
btnLeftToRight->setPixmap( showLeftToRight );
btnLeftToRight->setToggleButton( true );
btnLeftToRight->setOn( krConfig->readBoolEntry( "LeftToRight Button", _BtnLeftToRight ) );
btnLeftToRight->setAccel( CTRL + Key_L );
- QWhatsThis::add( btnLeftToRight, i18n( "Show files marked to <i>Copy from left to right</i> (CTRL+L)." ) );
+ TQWhatsThis::add( btnLeftToRight, i18n( "Show files marked to <i>Copy from left to right</i> (CTRL+L)." ) );
showOptionsLayout->addWidget( btnLeftToRight, 0, 0);
- btnEquals = new QPushButton( showOptions, "btnEquals" );
+ btnEquals = new TQPushButton( showOptions, "btnEquals" );
btnEquals->setText( "" );
btnEquals->setPixmap( showEquals );
btnEquals->setToggleButton( true );
btnEquals->setOn( krConfig->readBoolEntry( "Equals Button", _BtnEquals ) );
btnEquals->setAccel( CTRL + Key_E );
- QWhatsThis::add( btnEquals, i18n( "Show files considered to be identical (CTRL+E)." ) );
+ TQWhatsThis::add( btnEquals, i18n( "Show files considered to be identical (CTRL+E)." ) );
showOptionsLayout->addWidget( btnEquals, 0, 1);
- btnDifferents = new QPushButton( showOptions, "btnDifferents" );
+ btnDifferents = new TQPushButton( showOptions, "btnDifferents" );
btnDifferents->setText( "" );
btnDifferents->setPixmap( showDifferents );
btnDifferents->setToggleButton( true );
btnDifferents->setOn( krConfig->readBoolEntry( "Differents Button", _BtnDifferents ) );
btnDifferents->setAccel( CTRL + Key_D );
- QWhatsThis::add( btnDifferents, i18n( "Show excluded files (CTRL+D)." ) );
+ TQWhatsThis::add( btnDifferents, i18n( "Show excluded files (CTRL+D)." ) );
showOptionsLayout->addWidget( btnDifferents, 0, 2);
- btnRightToLeft = new QPushButton( showOptions, "btnRightToLeft" );
+ btnRightToLeft = new TQPushButton( showOptions, "btnRightToLeft" );
btnRightToLeft->setText( "" );
btnRightToLeft->setPixmap( showRightToLeft );
btnRightToLeft->setToggleButton( true );
btnRightToLeft->setOn( krConfig->readBoolEntry( "RightToLeft Button", _BtnRightToLeft ) );
btnRightToLeft->setAccel( CTRL + Key_R );
- QWhatsThis::add( btnRightToLeft, i18n( "Show files marked to <i>Copy from right to left</i> (CTRL+R)." ) );
+ TQWhatsThis::add( btnRightToLeft, i18n( "Show files marked to <i>Copy from right to left</i> (CTRL+R)." ) );
showOptionsLayout->addWidget( btnRightToLeft, 0, 3);
- btnDeletable = new QPushButton( showOptions, "btnDeletable" );
+ btnDeletable = new TQPushButton( showOptions, "btnDeletable" );
btnDeletable->setText( "" );
btnDeletable->setPixmap( showDeletable );
btnDeletable->setToggleButton( true );
btnDeletable->setOn( krConfig->readBoolEntry( "Deletable Button", _BtnDeletable ) );
btnDeletable->setAccel( CTRL + Key_T );
- QWhatsThis::add( btnDeletable, i18n( "Show files marked to delete. (CTRL+T)" ) );
+ TQWhatsThis::add( btnDeletable, i18n( "Show files marked to delete. (CTRL+T)" ) );
showOptionsLayout->addWidget( btnDeletable, 0, 4);
- btnDuplicates = new QPushButton( showOptions, "btnDuplicates" );
+ btnDuplicates = new TQPushButton( showOptions, "btnDuplicates" );
btnDuplicates->setText( i18n("Duplicates") );
btnDuplicates->setMinimumHeight( btnLeftToRight->height() );
btnDuplicates->setToggleButton( true );
btnDuplicates->setOn( krConfig->readBoolEntry( "Duplicates Button", _BtnDuplicates ) );
- QWhatsThis::add( btnDuplicates, i18n( "Show files that exist on both sides." ) );
+ TQWhatsThis::add( btnDuplicates, i18n( "Show files that exist on both sides." ) );
showOptionsLayout->addWidget( btnDuplicates, 0, 5);
- btnSingles = new QPushButton( showOptions, "btnSingles" );
+ btnSingles = new TQPushButton( showOptions, "btnSingles" );
btnSingles->setText( i18n("Singles") );
btnSingles->setMinimumHeight( btnLeftToRight->height() );
btnSingles->setToggleButton( true );
btnSingles->setOn( krConfig->readBoolEntry( "Singles Button", _BtnSingles ) );
- QWhatsThis::add( btnSingles, i18n( "Show files that exist on one side only." ) );
+ TQWhatsThis::add( btnSingles, i18n( "Show files that exist on one side only." ) );
showOptionsLayout->addWidget( btnSingles, 0, 6);
grid->addMultiCellWidget( optionBox, 2, 2, 0, 2 );
@@ -1290,22 +1290,22 @@ void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL l
/* ========================= Synchronization list view ========================== */
syncList=new SynchronizerListView( &synchronizer, synchronizerTab ); // create the main container
- QWhatsThis::add( syncList, i18n( "The compare results of the synchronizer (CTRL+M)." ) );
+ TQWhatsThis::add( syncList, i18n( "The compare results of the synchronizer (CTRL+M)." ) );
krConfig->setGroup("Look&Feel");
syncList->setFont(krConfig->readFontEntry("Filelist Font",_FilelistFont));
syncList->setAllColumnsShowFocus(true);
syncList->setMultiSelection(true);
- syncList->setSelectionMode(QListView::Extended);
- syncList->setVScrollBarMode(QScrollView::Auto);
- syncList->setHScrollBarMode(QScrollView::Auto);
+ syncList->setSelectionMode(TQListView::Extended);
+ syncList->setVScrollBarMode(TQScrollView::Auto);
+ syncList->setHScrollBarMode(TQScrollView::Auto);
syncList->setShowSortIndicator(false);
syncList->setSorting(-1);
syncList->setRootIsDecorated( true );
syncList->setTreeStepSize( 10 );
- int i=QFontMetrics(syncList->font()).width("W");
- int j=QFontMetrics(syncList->font()).width("0");
+ int i=TQFontMetrics(syncList->font()).width("W");
+ int j=TQFontMetrics(syncList->font()).width("0");
j=(i>j ? i : j);
int typeWidth = j*7/2;
@@ -1326,16 +1326,16 @@ void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL l
syncList->addColumn(i18n("Date"),rightDateWidth);
syncList->addColumn(i18n("Size"),rightSizeWidth);
syncList->addColumn(i18n("Name"),rightNameWidth);
- syncList->setColumnWidthMode(0,QListView::Manual);
- syncList->setColumnWidthMode(1,QListView::Manual);
- syncList->setColumnWidthMode(2,QListView::Manual);
- syncList->setColumnWidthMode(3,QListView::Manual);
- syncList->setColumnWidthMode(4,QListView::Manual);
- syncList->setColumnWidthMode(5,QListView::Manual);
- syncList->setColumnWidthMode(6,QListView::Manual);
- syncList->setColumnAlignment(1, Qt::AlignRight );
- syncList->setColumnAlignment(3, Qt::AlignHCenter );
- syncList->setColumnAlignment(5, Qt::AlignRight );
+ syncList->setColumnWidthMode(0,TQListView::Manual);
+ syncList->setColumnWidthMode(1,TQListView::Manual);
+ syncList->setColumnWidthMode(2,TQListView::Manual);
+ syncList->setColumnWidthMode(3,TQListView::Manual);
+ syncList->setColumnWidthMode(4,TQListView::Manual);
+ syncList->setColumnWidthMode(5,TQListView::Manual);
+ syncList->setColumnWidthMode(6,TQListView::Manual);
+ syncList->setColumnAlignment(1, TQt::AlignRight );
+ syncList->setColumnAlignment(3, TQt::AlignHCenter );
+ syncList->setColumnAlignment(5, TQt::AlignRight );
syncList->header()->setStretchEnabled( true, 0 );
@@ -1351,19 +1351,19 @@ void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL l
// creating the time shift, equality threshold, hidden files options
- QGroupBox *optionsGroup = new QGroupBox( generalFilter, "options" );
+ TQGroupBox *optionsGroup = new TQGroupBox( generalFilter, "options" );
optionsGroup->setTitle( i18n( "&Options" ) );
optionsGroup->setColumnLayout(0, Qt::Vertical );
- optionsGroup->layout()->setSpacing( 0 );
- optionsGroup->layout()->setMargin( 0 );
- QGridLayout *optionsLayout = new QGridLayout( optionsGroup->layout() );
- optionsLayout->setAlignment( Qt::AlignTop );
+ optionsGroup->tqlayout()->setSpacing( 0 );
+ optionsGroup->tqlayout()->setMargin( 0 );
+ TQGridLayout *optionsLayout = new TQGridLayout( optionsGroup->tqlayout() );
+ optionsLayout->tqsetAlignment( TQt::AlignTop );
optionsLayout->setSpacing( 6 );
optionsLayout->setMargin( 11 );
- QLabel * parallelThreadsLabel = new QLabel( i18n( "Parallel threads:" ), optionsGroup );
+ TQLabel * parallelThreadsLabel = new TQLabel( i18n( "Parallel threads:" ), optionsGroup );
optionsLayout->addWidget( parallelThreadsLabel, 0, 0 );
- parallelThreadsSpinBox = new QSpinBox( optionsGroup, "parallelThreadsSpinBox" );
+ parallelThreadsSpinBox = new TQSpinBox( optionsGroup, "parallelThreadsSpinBox" );
parallelThreadsSpinBox->setMinValue( 1 );
parallelThreadsSpinBox->setMaxValue( 15 );
krConfig->setGroup( "Synchronize" );
@@ -1372,40 +1372,40 @@ void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL l
optionsLayout->addWidget( parallelThreadsSpinBox, 0, 1 );
- QLabel * equalityLabel = new QLabel( i18n( "Equality threshold:" ), optionsGroup );
+ TQLabel * equalityLabel = new TQLabel( i18n( "Equality threshold:" ), optionsGroup );
optionsLayout->addWidget( equalityLabel, 1, 0 );
- equalitySpinBox = new QSpinBox( optionsGroup, "equalitySpinBox" );
+ equalitySpinBox = new TQSpinBox( optionsGroup, "equalitySpinBox" );
equalitySpinBox->setMaxValue( 9999 );
optionsLayout->addWidget( equalitySpinBox, 1, 1 );
- equalityUnitCombo = new QComboBox( optionsGroup, "equalityUnitCombo" );
+ equalityUnitCombo = new TQComboBox( optionsGroup, "equalityUnitCombo" );
equalityUnitCombo->insertItem( i18n( "sec" ) );
equalityUnitCombo->insertItem( i18n( "min" ) );
equalityUnitCombo->insertItem( i18n( "hour" ) );
equalityUnitCombo->insertItem( i18n( "day" ) );
optionsLayout->addWidget( equalityUnitCombo, 1, 2 );
- QLabel * timeShiftLabel = new QLabel( i18n( "Time shift (right-left):" ), optionsGroup );
+ TQLabel * timeShiftLabel = new TQLabel( i18n( "Time shift (right-left):" ), optionsGroup );
optionsLayout->addWidget( timeShiftLabel, 2, 0 );
- timeShiftSpinBox = new QSpinBox( optionsGroup, "timeShiftSpinBox" );
+ timeShiftSpinBox = new TQSpinBox( optionsGroup, "timeShiftSpinBox" );
timeShiftSpinBox->setMinValue( -9999 );
timeShiftSpinBox->setMaxValue( 9999 );
optionsLayout->addWidget( timeShiftSpinBox, 2, 1 );
- timeShiftUnitCombo = new QComboBox( optionsGroup, "timeShiftUnitCombo" );
+ timeShiftUnitCombo = new TQComboBox( optionsGroup, "timeShiftUnitCombo" );
timeShiftUnitCombo->insertItem( i18n( "sec" ) );
timeShiftUnitCombo->insertItem( i18n( "min" ) );
timeShiftUnitCombo->insertItem( i18n( "hour" ) );
timeShiftUnitCombo->insertItem( i18n( "day" ) );
optionsLayout->addWidget( timeShiftUnitCombo, 2, 2 );
- QFrame *line = new QFrame( optionsGroup );
- line->setFrameStyle( QFrame::HLine | QFrame::Sunken );
+ TQFrame *line = new TQFrame( optionsGroup );
+ line->setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
optionsLayout->addMultiCellWidget( line, 3, 3, 0, 2 );
- ignoreHiddenFilesCB = new QCheckBox( i18n( "Ignore hidden files" ), optionsGroup );
+ ignoreHiddenFilesCB = new TQCheckBox( i18n( "Ignore hidden files" ), optionsGroup );
optionsLayout->addMultiCellWidget( ignoreHiddenFilesCB, 4, 4, 0, 2 );
generalFilter->middleLayout->addWidget( optionsGroup );
@@ -1413,35 +1413,35 @@ void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL l
/* ================================== Buttons =================================== */
- QHBoxLayout *buttons = new QHBoxLayout;
+ TQHBoxLayout *buttons = new TQHBoxLayout;
buttons->setSpacing( 6 );
buttons->setMargin( 0 );
profileManager = new ProfileManager( "SynchronizerProfile", this, "profileManager" );
profileManager->setAccel( CTRL + Key_P );
- QWhatsThis::add( profileManager, i18n( "Profile manager (Ctrl+P)." ) );
+ TQWhatsThis::add( profileManager, i18n( "Profile manager (Ctrl+P)." ) );
buttons->addWidget( profileManager );
- QPixmap swapSides( ( const char** ) swap_sides_data );
- btnSwapSides = new QPushButton( this, "btnSwapSides" );
+ TQPixmap swapSides( ( const char** ) swap_sides_data );
+ btnSwapSides = new TQPushButton( this, "btnSwapSides" );
btnSwapSides->setPixmap( swapSides );
btnSwapSides->setAccel( CTRL + Key_S );
- QWhatsThis::add( btnSwapSides, i18n( "Swap sides (Ctrl+S)." ) );
+ TQWhatsThis::add( btnSwapSides, i18n( "Swap sides (Ctrl+S)." ) );
buttons->addWidget( btnSwapSides );
- statusLabel = new QLabel( this, "statusLabel" );
+ statusLabel = new TQLabel( this, "statusLabel" );
buttons->addWidget( statusLabel );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
buttons->addItem( spacer );
- btnCompareDirs = new QPushButton( this, "btnCompareDirs" );
+ btnCompareDirs = new TQPushButton( this, "btnCompareDirs" );
btnCompareDirs->setText( i18n( "Compare" ) );
btnCompareDirs->setDefault(true);
buttons->addWidget( btnCompareDirs );
krConfig->setGroup("Synchronize");
- btnScrollResults = new QPushButton( this, "btnSynchronize" );
+ btnScrollResults = new TQPushButton( this, "btnSynchronize" );
btnScrollResults->setToggleButton( true );
btnScrollResults->setOn( krConfig->readBoolEntry( "Scroll Results", _ScrollResults ) );
btnScrollResults->hide();
@@ -1451,23 +1451,23 @@ void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL l
btnScrollResults->setText( i18n( "Scroll Results" ) );
buttons->addWidget( btnScrollResults );
- btnStopComparing = new QPushButton( this, "btnStopComparing" );
+ btnStopComparing = new TQPushButton( this, "btnStopComparing" );
btnStopComparing->setText( i18n( "Stop" ) );
btnStopComparing->setEnabled(false);
buttons->addWidget( btnStopComparing );
- btnFeedToListBox = new QPushButton( this, "btnFeedToListBox" );
+ btnFeedToListBox = new TQPushButton( this, "btnFeedToListBox" );
btnFeedToListBox->setText( i18n( "Feed to listbox" ) );
btnFeedToListBox->setEnabled(false);
btnFeedToListBox->hide();
buttons->addWidget( btnFeedToListBox );
- btnSynchronize = new QPushButton( this, "btnSynchronize" );
+ btnSynchronize = new TQPushButton( this, "btnSynchronize" );
btnSynchronize->setText( i18n( "Synchronize" ) );
btnSynchronize->setEnabled(false);
buttons->addWidget( btnSynchronize );
- QPushButton *btnCloseSync = new QPushButton( this, "btnCloseSync" );
+ TQPushButton *btnCloseSync = new TQPushButton( this, "btnCloseSync" );
btnCloseSync->setText( i18n( "Close" ) );
buttons->addWidget( btnCloseSync );
@@ -1475,50 +1475,50 @@ void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL l
/* =============================== Connect table ================================ */
- connect( syncList,SIGNAL(rightButtonPressed(QListViewItem *, const QPoint &, int)),
- this, SLOT(rightMouseClicked(QListViewItem *)));
- connect( syncList,SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)),
- this, SLOT(doubleClicked(QListViewItem *)));
+ connect( syncList,TQT_SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT(rightMouseClicked(TQListViewItem *)));
+ connect( syncList,TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT(doubleClicked(TQListViewItem *)));
- connect( syncList,SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),
- this, SLOT(rightMouseClicked(QListViewItem *)));
+ connect( syncList,TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT(rightMouseClicked(TQListViewItem *)));
- connect( profileManager, SIGNAL( loadFromProfile( QString ) ), this, SLOT( loadFromProfile( QString ) ) );
- connect( profileManager, SIGNAL( saveToProfile( QString ) ), this, SLOT( saveToProfile( QString ) ) );
-
- connect( btnSwapSides, SIGNAL( clicked() ), this, SLOT( swapSides() ) );
- connect( btnCompareDirs, SIGNAL( clicked() ), this, SLOT( compare() ) );
- connect( btnStopComparing, SIGNAL( clicked() ), this, SLOT( stop() ) );
- connect( btnFeedToListBox, SIGNAL( clicked() ), this, SLOT( feedToListBox() ) );
- connect( btnSynchronize, SIGNAL( clicked() ), this, SLOT( synchronize() ) );
- connect( btnScrollResults, SIGNAL( toggled(bool) ), this, SLOT( setScrolling(bool) ) );
- connect( btnCloseSync, SIGNAL( clicked() ), this, SLOT( closeDialog() ) );
-
- connect( cbSubdirs, SIGNAL( toggled(bool) ), this, SLOT( subdirsChecked( bool ) ) );
- connect( cbAsymmetric, SIGNAL( toggled(bool) ), this, SLOT( setPanelLabels() ) );
-
- connect( &synchronizer, SIGNAL( comparedFileData( SynchronizerFileItem * ) ), this,
- SLOT( addFile( SynchronizerFileItem * ) ) );
- connect( &synchronizer, SIGNAL( markChanged( SynchronizerFileItem *, bool ) ), this,
- SLOT( markChanged( SynchronizerFileItem *, bool ) ) );
- connect( &synchronizer, SIGNAL( statusInfo( QString ) ), this, SLOT( statusInfo( QString ) ) );
-
- connect( btnLeftToRight, SIGNAL( toggled(bool) ), this, SLOT( refresh() ) );
- connect( btnEquals, SIGNAL( toggled(bool) ), this, SLOT( refresh() ) );
- connect( btnDifferents, SIGNAL( toggled(bool) ), this, SLOT( refresh() ) );
- connect( btnRightToLeft, SIGNAL( toggled(bool) ), this, SLOT( refresh() ) );
- connect( btnDeletable, SIGNAL( toggled(bool) ), this, SLOT( refresh() ) );
- connect( btnDuplicates, SIGNAL( toggled(bool) ), this, SLOT( refresh() ) );
- connect( btnSingles, SIGNAL( toggled(bool) ), this, SLOT( refresh() ) );
-
- connect( fileFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( connectFilters( const QString & ) ) );
- connect( generalFilter->searchFor, SIGNAL( textChanged( const QString & ) ), this, SLOT( connectFilters( const QString & ) ) );
- connect( generalFilter->searchFor, SIGNAL( textChanged( const QString & ) ), this, SLOT( setCompletion() ) );
- connect( generalFilter->dontSearchIn, SIGNAL( checkValidity( QString &, QString & ) ),
- this, SLOT( checkExcludeURLValidity( QString &, QString & ) ) );
-
- connect( profileManager, SIGNAL( loadFromProfile( QString ) ), filterTabs, SLOT( loadFromProfile( QString ) ) );
- connect( profileManager, SIGNAL( saveToProfile( QString ) ), filterTabs, SLOT( saveToProfile( QString ) ) );
+ connect( profileManager, TQT_SIGNAL( loadFromProfile( TQString ) ), this, TQT_SLOT( loadFromProfile( TQString ) ) );
+ connect( profileManager, TQT_SIGNAL( saveToProfile( TQString ) ), this, TQT_SLOT( saveToProfile( TQString ) ) );
+
+ connect( btnSwapSides, TQT_SIGNAL( clicked() ), this, TQT_SLOT( swapSides() ) );
+ connect( btnCompareDirs, TQT_SIGNAL( clicked() ), this, TQT_SLOT( compare() ) );
+ connect( btnStopComparing, TQT_SIGNAL( clicked() ), this, TQT_SLOT( stop() ) );
+ connect( btnFeedToListBox, TQT_SIGNAL( clicked() ), this, TQT_SLOT( feedToListBox() ) );
+ connect( btnSynchronize, TQT_SIGNAL( clicked() ), this, TQT_SLOT( synchronize() ) );
+ connect( btnScrollResults, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( setScrolling(bool) ) );
+ connect( btnCloseSync, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeDialog() ) );
+
+ connect( cbSubdirs, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( subdirsChecked( bool ) ) );
+ connect( cbAsymmetric, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( setPanelLabels() ) );
+
+ connect( &synchronizer, TQT_SIGNAL( comparedFileData( SynchronizerFileItem * ) ), this,
+ TQT_SLOT( addFile( SynchronizerFileItem * ) ) );
+ connect( &synchronizer, TQT_SIGNAL( markChanged( SynchronizerFileItem *, bool ) ), this,
+ TQT_SLOT( markChanged( SynchronizerFileItem *, bool ) ) );
+ connect( &synchronizer, TQT_SIGNAL( statusInfo( TQString ) ), this, TQT_SLOT( statusInfo( TQString ) ) );
+
+ connect( btnLeftToRight, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( refresh() ) );
+ connect( btnEquals, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( refresh() ) );
+ connect( btnDifferents, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( refresh() ) );
+ connect( btnRightToLeft, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( refresh() ) );
+ connect( btnDeletable, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( refresh() ) );
+ connect( btnDuplicates, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( refresh() ) );
+ connect( btnSingles, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( refresh() ) );
+
+ connect( fileFilter, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( connectFilters( const TQString & ) ) );
+ connect( generalFilter->searchFor, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( connectFilters( const TQString & ) ) );
+ connect( generalFilter->searchFor, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( setCompletion() ) );
+ connect( generalFilter->dontSearchIn, TQT_SIGNAL( checkValidity( TQString &, TQString & ) ),
+ this, TQT_SLOT( checkExcludeURLValidity( TQString &, TQString & ) ) );
+
+ connect( profileManager, TQT_SIGNAL( loadFromProfile( TQString ) ), filterTabs, TQT_SLOT( loadFromProfile( TQString ) ) );
+ connect( profileManager, TQT_SIGNAL( saveToProfile( TQString ) ), filterTabs, TQT_SLOT( saveToProfile( TQString ) ) );
setPanelLabels();
setCompletion();
@@ -1532,16 +1532,16 @@ void SynchronizerGUI::initGUI(QWidget* /* parent */, QString profileName, KURL l
DECLARE_FOREGROUND_DFLTS;
for( int clr = 0; clr != TT_MAX; clr ++ ) {
- QString foreEntry = QString( "Synchronizer " ) + COLOR_NAMES[ clr ] + QString( " Foreground" );
- QString bckgEntry = QString( "Synchronizer " ) + COLOR_NAMES[ clr ] + QString( " Background" );
+ TQString foreEntry = TQString( "Synchronizer " ) + COLOR_NAMES[ clr ] + TQString( " Foreground" );
+ TQString bckgEntry = TQString( "Synchronizer " ) + COLOR_NAMES[ clr ] + TQString( " Background" );
if( krConfig->readEntry( foreEntry ) == "KDE default" )
- foreGrounds[ clr ] = QColor();
+ foreGrounds[ clr ] = TQColor();
else
foreGrounds[ clr ] = krConfig->readColorEntry( foreEntry, &FORE_DFLTS[ clr ] );
if( krConfig->readEntry( bckgEntry ) == "KDE default" )
- backGrounds[ clr ] = QColor();
+ backGrounds[ clr ] = TQColor();
else
backGrounds[ clr ] = krConfig->readColorEntry( bckgEntry, &BCKG_DFLTS[ clr ] );
}
@@ -1600,13 +1600,13 @@ void SynchronizerGUI::setCompletion()
generalFilter->dontSearchIn->setCompletionDir( rightLocation->currentText() );
}
-void SynchronizerGUI::checkExcludeURLValidity( QString &text, QString &error )
+void SynchronizerGUI::checkExcludeURLValidity( TQString &text, TQString &error )
{
KURL url = vfs::fromPathOrURL( text );
if( KURL::isRelativeURL( url.url() ) )
return;
- QString leftBase = leftLocation->currentText();
+ TQString leftBase = leftLocation->currentText();
if( !leftBase.endsWith( "/" ) )
leftBase += "/";
KURL leftBaseURL = vfs::fromPathOrURL( leftBase );
@@ -1616,7 +1616,7 @@ void SynchronizerGUI::checkExcludeURLValidity( QString &text, QString &error )
return;
}
- QString rightBase = rightLocation->currentText();
+ TQString rightBase = rightLocation->currentText();
if( !rightBase.endsWith( "/" ) )
rightBase += "/";
KURL rightBaseURL = vfs::fromPathOrURL( rightBase );
@@ -1629,7 +1629,7 @@ void SynchronizerGUI::checkExcludeURLValidity( QString &text, QString &error )
error = i18n("URL must be the descendant of either the left or the right base URL!");
}
-void SynchronizerGUI::doubleClicked(QListViewItem *itemIn)
+void SynchronizerGUI::doubleClicked(TQListViewItem *itemIn)
{
if (!itemIn)
return;
@@ -1638,8 +1638,8 @@ void SynchronizerGUI::doubleClicked(QListViewItem *itemIn)
SynchronizerFileItem *item = syncItem->synchronizerItemRef();
if( item && item->existsInLeft() && item->existsInRight() && !item->isDir() )
{
- QString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
- QString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
+ TQString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
+ TQString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
KURL leftURL = vfs::fromPathOrURL( synchronizer.leftBaseDirectory() + leftDirName + item->leftName() );
KURL rightURL = vfs::fromPathOrURL( synchronizer.rightBaseDirectory() + rightDirName + item->rightName() );
@@ -1647,7 +1647,7 @@ void SynchronizerGUI::doubleClicked(QListViewItem *itemIn)
}
}
-void SynchronizerGUI::rightMouseClicked(QListViewItem *itemIn)
+void SynchronizerGUI::rightMouseClicked(TQListViewItem *itemIn)
{
// these are the values that will exist in the menu
#define EXCLUDE_ID 90
@@ -1677,8 +1677,8 @@ void SynchronizerGUI::rightMouseClicked(QListViewItem *itemIn)
bool isDuplicate = item->existsInLeft() && item->existsInRight();
bool isDir = item->isDir();
- QString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
- QString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
+ TQString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
+ TQString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
KURL leftURL = vfs::fromPathOrURL( synchronizer.leftBaseDirectory() + leftDirName + item->leftName() );
KURL rightURL = vfs::fromPathOrURL( synchronizer.rightBaseDirectory() + rightDirName + item->rightName() );
@@ -1735,7 +1735,7 @@ void SynchronizerGUI::rightMouseClicked(QListViewItem *itemIn)
popup.setItemEnabled(SYNCH_WITH_KGET_ID, true );
}
- int result=popup.exec(QCursor::pos());
+ int result=popup.exec(TQCursor::pos());
// check out the user's option
switch (result)
@@ -1842,7 +1842,7 @@ void SynchronizerGUI::closeDialog()
return;
}
- QStringList list = leftLocation->historyItems();
+ TQStringList list = leftLocation->historyItems();
krConfig->setGroup("Synchronize");
krConfig->writeEntry("Left Directory History", list);
list = rightLocation->historyItems();
@@ -1880,7 +1880,7 @@ void SynchronizerGUI::closeDialog()
krConfig->writeEntry("Right Size Width", syncList->columnWidth( 5 ) );
krConfig->writeEntry("Right Name Width", syncList->columnWidth( 6 ) );
- QDialog::reject();
+ TQDialog::reject();
this->deleteLater();
@@ -1970,11 +1970,11 @@ void SynchronizerGUI::reject()
void SynchronizerGUI::addFile( SynchronizerFileItem *item )
{
- QString leftName="", rightName="", leftDate="", rightDate="", leftSize="", rightSize="";
+ TQString leftName="", rightName="", leftDate="", rightDate="", leftSize="", rightSize="";
bool isDir = item->isDir();
- QColor textColor = foreGrounds[ item->task() ];
- QColor baseColor = backGrounds[ item->task() ];
+ TQColor textColor = foreGrounds[ item->task() ];
+ TQColor baseColor = backGrounds[ item->task() ];
if( item->existsInLeft() )
{
@@ -1993,7 +1993,7 @@ void SynchronizerGUI::addFile( SynchronizerFileItem *item )
SyncViewItem *listItem = 0;
SyncViewItem *dirItem;
- if( item->parent() == 0 )
+ if( item->tqparent() == 0 )
{
listItem = new SyncViewItem(item, textColor, baseColor, syncList, lastItem, leftName, leftSize,
leftDate, Synchronizer::getTaskTypeName( item->task() ), rightDate,
@@ -2002,7 +2002,7 @@ void SynchronizerGUI::addFile( SynchronizerFileItem *item )
}
else
{
- dirItem = (SyncViewItem *)item->parent()->userData();
+ dirItem = (SyncViewItem *)item->tqparent()->userData();
if( dirItem )
{
dirItem->setOpen( true );
@@ -2032,7 +2032,7 @@ void SynchronizerGUI::markChanged( SynchronizerFileItem *item, bool ensureVisibl
if( !item->isMarked() ) {
listItem->setVisible( false );
} else {
- QString leftName="", rightName="", leftDate="", rightDate="", leftSize="", rightSize="";
+ TQString leftName="", rightName="", leftDate="", rightDate="", leftSize="", rightSize="";
bool isDir = item->isDir();
if( item->existsInLeft() )
@@ -2092,12 +2092,12 @@ void SynchronizerGUI::enableMarkButtons()
btnSingles->setEnabled( true );
}
-QString SynchronizerGUI::convertTime(time_t time) const
+TQString SynchronizerGUI::convertTime(time_t time) const
{
// convert the time_t to struct tm
struct tm* t=localtime((time_t *)&time);
- QDateTime tmp(QDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), QTime(t->tm_hour, t->tm_min));
+ TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min));
return KGlobal::locale()->formatDateTime(tmp);
}
@@ -2140,7 +2140,7 @@ void SynchronizerGUI::synchronize()
if( !synchronizer.totalSizes( &copyToLeftNr, &copyToLeftSize, &copyToRightNr, &copyToRightSize,
&deleteNr, &deleteSize ) )
{
- KMessageBox::sorry(parentWidget(), i18n("Synchronizer has nothing to do!"));
+ KMessageBox::sorry(tqparentWidget(), i18n("Synchronizer has nothing to do!"));
return;
}
@@ -2156,7 +2156,7 @@ void SynchronizerGUI::synchronize()
closeDialog();
}
-void SynchronizerGUI::resizeEvent( QResizeEvent *e )
+void SynchronizerGUI::resizeEvent( TQResizeEvent *e )
{
if( !isMaximized() )
{
@@ -2175,20 +2175,20 @@ void SynchronizerGUI::resizeEvent( QResizeEvent *e )
syncList->header()->adjustHeaderSize();
}
firstResize = false;
- QDialog::resizeEvent( e );
+ TQDialog::resizeEvent( e );
}
-void SynchronizerGUI::statusInfo( QString info )
+void SynchronizerGUI::statusInfo( TQString info )
{
statusLabel->setText( info );
- qApp->processEvents();
+ tqApp->processEvents();
}
void SynchronizerGUI::swapSides()
{
if( btnCompareDirs->isEnabled() )
{
- QString leftCurrent = leftLocation->currentText();
+ TQString leftCurrent = leftLocation->currentText();
leftLocation->setCurrentText( rightLocation->currentText() );
rightLocation->setCurrentText( leftCurrent );
synchronizer.swapSides();
@@ -2196,7 +2196,7 @@ void SynchronizerGUI::swapSides()
}
}
-void SynchronizerGUI::keyPressEvent( QKeyEvent *e )
+void SynchronizerGUI::keyPressEvent( TQKeyEvent *e )
{
switch ( e->key() )
{
@@ -2213,15 +2213,15 @@ void SynchronizerGUI::keyPressEvent( QKeyEvent *e )
case Key_F4 :
{
e->accept();
- QListViewItem *listItem = syncList->currentItem();
+ TQListViewItem *listItem = syncList->currentItem();
if( listItem == 0 )
break;
bool isedit = e->key() == Key_F4;
SynchronizerFileItem *item = ((SyncViewItem *)listItem)->synchronizerItemRef();
- QString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
- QString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
+ TQString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
+ TQString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
if( item->isDir() )
return;
@@ -2258,7 +2258,7 @@ void SynchronizerGUI::keyPressEvent( QKeyEvent *e )
{
e->accept();
- QListViewItem *listItem = syncList->currentItem();
+ TQListViewItem *listItem = syncList->currentItem();
if( listItem == 0 || !listItem->isVisible() )
return;
@@ -2292,15 +2292,15 @@ void SynchronizerGUI::keyPressEvent( QKeyEvent *e )
if( result != KMessageBox::Yes )
return;
}
- QDialog::reject();
+ TQDialog::reject();
}
return;
}
- QDialog::keyPressEvent( e );
+ TQDialog::keyPressEvent( e );
}
-void SynchronizerGUI::loadFromProfile( QString profile )
+void SynchronizerGUI::loadFromProfile( TQString profile )
{
syncList->clear();
synchronizer.reset();
@@ -2355,7 +2355,7 @@ void SynchronizerGUI::loadFromProfile( QString profile )
refresh();
}
-void SynchronizerGUI::saveToProfile( QString profile )
+void SynchronizerGUI::saveToProfile( TQString profile )
{
krConfig->setGroup( profile );
@@ -2387,7 +2387,7 @@ void SynchronizerGUI::saveToProfile( QString profile )
krConfig->writeEntry( "Ignore Hidden Files", ignoreHiddenFilesCB->isChecked() );
}
-void SynchronizerGUI::connectFilters( const QString &newString )
+void SynchronizerGUI::connectFilters( const TQString &newString )
{
if( synchronizerTabs->currentPageIndex() )
fileFilter->setEditText( newString );
@@ -2454,13 +2454,13 @@ void SynchronizerGUI::copyToClipboard( bool isLeft )
{
if( isLeft && item->existsInLeft() )
{
- QString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
+ TQString leftDirName = item->leftDirectory().isEmpty() ? "" : item->leftDirectory() + "/";
KURL leftURL = vfs::fromPathOrURL( synchronizer.leftBaseDirectory() + leftDirName + item->leftName() );
urls.push_back( leftURL );
}
else if( !isLeft && item->existsInRight() )
{
- QString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
+ TQString rightDirName = item->rightDirectory().isEmpty() ? "" : item->rightDirectory() + "/";
KURL rightURL = vfs::fromPathOrURL( synchronizer.rightBaseDirectory() + rightDirName + item->rightName() );
urls.push_back( rightURL );
}
@@ -2471,8 +2471,8 @@ void SynchronizerGUI::copyToClipboard( bool isLeft )
return;
KURLDrag *d = new KURLDrag(urls, this);
- d->setPixmap( FL_LOADICON( isLeft ? "2leftarrow" : "2rightarrow" ), QPoint( -7, 0 ) );
- QApplication::clipboard()->setData( d );
+ d->setPixmap( FL_LOADICON( isLeft ? "2leftarrow" : "2rightarrow" ), TQPoint( -7, 0 ) );
+ TQApplication::tqclipboard()->setData( d );
}
#include "synchronizergui.moc"
diff --git a/krusader/Synchronizer/synchronizergui.h b/krusader/Synchronizer/synchronizergui.h
index 90f2042..46e7bb4 100755
--- a/krusader/Synchronizer/synchronizergui.h
+++ b/krusader/Synchronizer/synchronizergui.h
@@ -35,47 +35,48 @@
#include "../GUI/profilemanager.h"
#include "../Filter/filtertabs.h"
#include "../Filter/generalfilter.h"
-#include <qdialog.h>
-#include <qlistview.h>
+#include <tqdialog.h>
+#include <tqlistview.h>
#include <kcombobox.h>
-#include <qpixmap.h>
-#include <qcheckbox.h>
-#include <qmap.h>
-#include <qlabel.h>
-#include <qtabwidget.h>
+#include <tqpixmap.h>
+#include <tqcheckbox.h>
+#include <tqmap.h>
+#include <tqlabel.h>
+#include <tqtabwidget.h>
-class QSpinBox;
+class TQSpinBox;
-class SynchronizerGUI : QDialog
+class SynchronizerGUI : TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- class SyncViewItem : public QListViewItem
+ class SyncViewItem : public TQListViewItem
{
private:
SynchronizerFileItem *syncItemRef;
SyncViewItem *lastItemRef;
- QColor textColor;
- QColor baseColor;
+ TQColor textColor;
+ TQColor baseColor;
public:
- SyncViewItem( SynchronizerFileItem *item, QColor txt, QColor base, QListView * parent, QListViewItem *after, QString label1,
- QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null,
- QString label5 = QString::null, QString label6 = QString::null,
- QString label7 = QString::null, QString label8 = QString::null ) :
- QListViewItem( parent, after, label1, label2, label3, label4, label5, label6,
+ SyncViewItem( SynchronizerFileItem *item, TQColor txt, TQColor base, TQListView * tqparent, TQListViewItem *after, TQString label1,
+ TQString label2 = TQString(), TQString label3 = TQString(), TQString label4 = TQString(),
+ TQString label5 = TQString(), TQString label6 = TQString(),
+ TQString label7 = TQString(), TQString label8 = TQString() ) :
+ TQListViewItem( tqparent, after, label1, label2, label3, label4, label5, label6,
label7, label8 ), syncItemRef( item ), lastItemRef( 0 ), textColor( txt ), baseColor( base )
{
item->setUserData( (void *)this );
setDragEnabled( true );
}
- SyncViewItem( SynchronizerFileItem *item, QColor txt, QColor base, QListViewItem * parent, QListViewItem *after, QString label1,
- QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null,
- QString label5 = QString::null, QString label6 = QString::null,
- QString label7 = QString::null, QString label8 = QString::null ) :
- QListViewItem( parent, after, label1, label2, label3, label4, label5, label6,
+ SyncViewItem( SynchronizerFileItem *item, TQColor txt, TQColor base, TQListViewItem * tqparent, TQListViewItem *after, TQString label1,
+ TQString label2 = TQString(), TQString label3 = TQString(), TQString label4 = TQString(),
+ TQString label5 = TQString(), TQString label6 = TQString(),
+ TQString label7 = TQString(), TQString label8 = TQString() ) :
+ TQListViewItem( tqparent, after, label1, label2, label3, label4, label5, label6,
label7, label8 ), syncItemRef( item ), lastItemRef( 0 ), textColor( txt ), baseColor( base )
{
item->setUserData( (void *)this );
@@ -91,33 +92,33 @@ public:
inline SyncViewItem * lastItem() {return lastItemRef;}
inline void setLastItem(SyncViewItem*s) {lastItemRef = s;}
- void setColors( QColor fore, QColor back ) {
+ void setColors( TQColor fore, TQColor back ) {
textColor = fore;
baseColor = back;
}
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align)
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align)
{
- QColorGroup _cg = cg;
+ TQColorGroup _cg = cg;
if( textColor.isValid() )
- _cg.setColor(QColorGroup::Text, textColor );
+ _cg.setColor(TQColorGroup::Text, textColor );
if( baseColor.isValid() )
- _cg.setColor(QColorGroup::Base, baseColor );
- QListViewItem::paintCell( p, _cg, column, width, align );
+ _cg.setColor(TQColorGroup::Base, baseColor );
+ TQListViewItem::paintCell( p, _cg, column, width, align );
};
};
public:
// if rightDirectory is null, leftDirectory is actually the profile name to load
- SynchronizerGUI(QWidget* parent, KURL leftDirectory, KURL rightDirectory = QString::null, QStringList selList = QStringList() );
- SynchronizerGUI(QWidget* parent, QString profile );
+ SynchronizerGUI(TQWidget* tqparent, KURL leftDirectory, KURL rightDirectory = TQString(), TQStringList selList = TQStringList() );
+ SynchronizerGUI(TQWidget* tqparent, TQString profile );
~SynchronizerGUI();
inline bool wasSynchronization() {return wasSync;}
public slots:
- void rightMouseClicked(QListViewItem *);
- void doubleClicked(QListViewItem *);
+ void rightMouseClicked(TQListViewItem *);
+ void doubleClicked(TQListViewItem *);
void compare();
void synchronize();
void stop();
@@ -125,25 +126,25 @@ public slots:
void closeDialog();
void refresh();
void swapSides();
- void loadFromProfile( QString );
- void saveToProfile( QString );
+ void loadFromProfile( TQString );
+ void saveToProfile( TQString );
protected slots:
void reject();
void addFile( SynchronizerFileItem * );
void markChanged( SynchronizerFileItem *, bool );
void setScrolling( bool );
- void statusInfo( QString );
+ void statusInfo( TQString );
void subdirsChecked( bool );
void setPanelLabels();
void setCompletion();
- void checkExcludeURLValidity( QString &text, QString &error );
- void connectFilters( const QString & );
+ void checkExcludeURLValidity( TQString &text, TQString &error );
+ void connectFilters( const TQString & );
private:
- void initGUI(QWidget* parent, QString profile, KURL leftURL, KURL rightURL, QStringList selList);
+ void initGUI(TQWidget* tqparent, TQString profile, KURL leftURL, KURL rightURL, TQStringList selList);
- QString convertTime(time_t time) const;
+ TQString convertTime(time_t time) const;
void setMarkFlags();
void disableMarkButtons();
void enableMarkButtons();
@@ -153,60 +154,60 @@ private:
void convertFromSeconds( int &time, int &unit, int second );
protected:
- virtual void keyPressEvent( QKeyEvent * );
- virtual void resizeEvent( QResizeEvent *e );
+ virtual void keyPressEvent( TQKeyEvent * );
+ virtual void resizeEvent( TQResizeEvent *e );
ProfileManager *profileManager;
FilterTabs *filterTabs;
GeneralFilter *generalFilter;
- QTabWidget *synchronizerTabs;
+ TQTabWidget *synchronizerTabs;
KHistoryCombo *leftLocation;
KHistoryCombo *rightLocation;
KHistoryCombo *fileFilter;
- QListView *syncList;
+ TQListView *syncList;
Synchronizer synchronizer;
- QCheckBox *cbSubdirs;
- QCheckBox *cbSymlinks;
- QCheckBox *cbByContent;
- QCheckBox *cbIgnoreDate;
- QCheckBox *cbAsymmetric;
- QCheckBox *cbIgnoreCase;
+ TQCheckBox *cbSubdirs;
+ TQCheckBox *cbSymlinks;
+ TQCheckBox *cbByContent;
+ TQCheckBox *cbIgnoreDate;
+ TQCheckBox *cbAsymmetric;
+ TQCheckBox *cbIgnoreCase;
- QPushButton *btnSwapSides;
- QPushButton *btnCompareDirs;
- QPushButton *btnStopComparing;
- QPushButton *btnSynchronize;
- QPushButton *btnFeedToListBox;
- QPushButton *btnScrollResults;
+ TQPushButton *btnSwapSides;
+ TQPushButton *btnCompareDirs;
+ TQPushButton *btnStopComparing;
+ TQPushButton *btnSynchronize;
+ TQPushButton *btnFeedToListBox;
+ TQPushButton *btnScrollResults;
- QPushButton *btnLeftToRight;
- QPushButton *btnEquals;
- QPushButton *btnDifferents;
- QPushButton *btnRightToLeft;
- QPushButton *btnDeletable;
- QPushButton *btnDuplicates;
- QPushButton *btnSingles;
-
- QLabel *statusLabel;
- QLabel *leftDirLabel;
- QLabel *rightDirLabel;
+ TQPushButton *btnLeftToRight;
+ TQPushButton *btnEquals;
+ TQPushButton *btnDifferents;
+ TQPushButton *btnRightToLeft;
+ TQPushButton *btnDeletable;
+ TQPushButton *btnDuplicates;
+ TQPushButton *btnSingles;
+
+ TQLabel *statusLabel;
+ TQLabel *leftDirLabel;
+ TQLabel *rightDirLabel;
- QStringList selectedFiles;
+ TQStringList selectedFiles;
- QSpinBox *parallelThreadsSpinBox;
- QSpinBox *equalitySpinBox;
- QComboBox *equalityUnitCombo;
- QSpinBox *timeShiftSpinBox;
- QComboBox *timeShiftUnitCombo;
- QCheckBox *ignoreHiddenFilesCB;
+ TQSpinBox *parallelThreadsSpinBox;
+ TQSpinBox *equalitySpinBox;
+ TQComboBox *equalityUnitCombo;
+ TQSpinBox *timeShiftSpinBox;
+ TQComboBox *timeShiftUnitCombo;
+ TQCheckBox *ignoreHiddenFilesCB;
private:
- QPixmap fileIcon;
- QPixmap folderIcon;
+ TQPixmap fileIcon;
+ TQPixmap folderIcon;
bool isComparing;
bool wasClosed;
bool wasSync;
@@ -217,8 +218,8 @@ private:
int sizeX;
int sizeY;
- QColor foreGrounds[ TT_MAX ];
- QColor backGrounds[ TT_MAX ];
+ TQColor foreGrounds[ TT_MAX ];
+ TQColor backGrounds[ TT_MAX ];
};
#endif /* __SYNCHRONIZERGUI_H__ */
diff --git a/krusader/Synchronizer/synchronizertask.cpp b/krusader/Synchronizer/synchronizertask.cpp
index 2e07eb0..bf95642 100644
--- a/krusader/Synchronizer/synchronizertask.cpp
+++ b/krusader/Synchronizer/synchronizertask.cpp
@@ -32,24 +32,24 @@
#include "synchronizertask.h"
#include "synchronizerfileitem.h"
#include "synchronizerdirlist.h"
-#include <qtimer.h>
-#include <qfile.h>
+#include <tqtimer.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kmessagebox.h>
#include "../VFS/vfs.h"
-CompareTask::CompareTask( SynchronizerFileItem *parentIn, const QString &leftURL,
- const QString &rightURL, const QString &leftDir,
- const QString &rightDir, bool hidden ) : SynchronizerTask (), m_parent( parentIn ),
+CompareTask::CompareTask( SynchronizerFileItem *tqparentIn, const TQString &leftURL,
+ const TQString &rightURL, const TQString &leftDir,
+ const TQString &rightDir, bool hidden ) : SynchronizerTask (), m_parent( tqparentIn ),
m_url( leftURL ), m_dir( leftDir ), m_otherUrl( rightURL ),
m_otherDir( rightDir ), m_duplicate( true ),
m_dirList( 0 ), m_otherDirList( 0 ) {
ignoreHidden = hidden;
}
-CompareTask::CompareTask( SynchronizerFileItem *parentIn, const QString &urlIn,
- const QString &dirIn, bool isLeftIn, bool hidden ) : SynchronizerTask (),
- m_parent( parentIn ), m_url( urlIn ), m_dir( dirIn ),
+CompareTask::CompareTask( SynchronizerFileItem *tqparentIn, const TQString &urlIn,
+ const TQString &dirIn, bool isLeftIn, bool hidden ) : SynchronizerTask (),
+ m_parent( tqparentIn ), m_url( urlIn ), m_dir( dirIn ),
m_isLeft( isLeftIn ), m_duplicate( false ),
m_dirList( 0 ), m_otherDirList( 0 ) {
ignoreHidden = hidden;
@@ -71,13 +71,13 @@ void CompareTask::start() {
m_state = ST_STATE_PENDING;
m_loadFinished = m_otherLoadFinished = false;
- m_dirList = new SynchronizerDirList( parentWidget, ignoreHidden );
- connect( m_dirList, SIGNAL( finished( bool ) ), this, SLOT( slotFinished( bool ) ));
+ m_dirList = new SynchronizerDirList( tqparentWidget, ignoreHidden );
+ connect( m_dirList, TQT_SIGNAL( finished( bool ) ), this, TQT_SLOT( slotFinished( bool ) ));
m_dirList->load( m_url, false );
if( m_duplicate ) {
- m_otherDirList = new SynchronizerDirList( parentWidget, ignoreHidden );
- connect( m_otherDirList, SIGNAL( finished( bool ) ), this, SLOT( slotOtherFinished( bool ) ));
+ m_otherDirList = new SynchronizerDirList( tqparentWidget, ignoreHidden );
+ connect( m_otherDirList, TQT_SIGNAL( finished( bool ) ), this, TQT_SLOT( slotOtherFinished( bool ) ));
m_otherDirList->load( m_otherUrl, false );
}
}
@@ -129,22 +129,22 @@ void CompareContentTask::start() {
m_state = ST_STATE_PENDING;
if( leftURL.isLocalFile() && rightURL.isLocalFile() ) {
- leftFile = new QFile( leftURL.path() );
+ leftFile = new TQFile( leftURL.path() );
if( !leftFile->open( IO_ReadOnly ) ) {
- KMessageBox::error(parentWidget, i18n("Error at opening %1!").arg( leftURL.path() ));
+ KMessageBox::error(tqparentWidget, i18n("Error at opening %1!").tqarg( leftURL.path() ));
m_state = ST_STATE_ERROR;
return;
}
- rightFile = new QFile( rightURL.path() );
+ rightFile = new TQFile( rightURL.path() );
if( !rightFile->open( IO_ReadOnly ) ) {
- KMessageBox::error(parentWidget, i18n("Error at opening %1!").arg( rightURL.path() ));
+ KMessageBox::error(tqparentWidget, i18n("Error at opening %1!").tqarg( rightURL.path() ));
m_state = ST_STATE_ERROR;
return;
}
- timer = new QTimer( this );
- connect( timer, SIGNAL(timeout()), this, SLOT(sendStatusMessage()) );
+ timer = new TQTimer( this );
+ connect( timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(sendStatusMessage()) );
timer->start( 1000, true );
localFileCompareCycle();
@@ -152,19 +152,19 @@ void CompareContentTask::start() {
leftReadJob = KIO::get( leftURL, false, false );
rightReadJob = KIO::get( rightURL, false, false );
- connect(leftReadJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotDataReceived(KIO::Job *, const QByteArray &)));
- connect(rightReadJob, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotDataReceived(KIO::Job *, const QByteArray &)));
- connect(leftReadJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotFinished(KIO::Job *)));
- connect(rightReadJob, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotFinished(KIO::Job *)));
+ connect(leftReadJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotDataReceived(KIO::Job *, const TQByteArray &)));
+ connect(rightReadJob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotDataReceived(KIO::Job *, const TQByteArray &)));
+ connect(leftReadJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotFinished(KIO::Job *)));
+ connect(rightReadJob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotFinished(KIO::Job *)));
rightReadJob->suspend();
- timer = new QTimer( this );
- connect( timer, SIGNAL(timeout()), this, SLOT(sendStatusMessage()) );
+ timer = new TQTimer( this );
+ connect( timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(sendStatusMessage()) );
timer->start( 1000, true );
}
}
@@ -176,7 +176,7 @@ void CompareContentTask::localFileCompareCycle() {
char leftBuffer[ 1440 ];
char rightBuffer[ 1440 ];
- QTime timer;
+ TQTime timer;
timer.start();
int cnt = 0;
@@ -217,11 +217,11 @@ void CompareContentTask::localFileCompareCycle() {
return;
}
- QTimer::singleShot( 0, this, SLOT( localFileCompareCycle() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( localFileCompareCycle() ) );
}
-void CompareContentTask::slotDataReceived(KIO::Job *job, const QByteArray &data)
+void CompareContentTask::slotDataReceived(KIO::Job *job, const TQByteArray &data)
{
int bufferLen = compareArray.size();
int dataLen = data.size();
@@ -299,9 +299,9 @@ void CompareContentTask::slotFinished(KIO::Job *job)
if( job->error() && job->error() != KIO::ERR_USER_CANCELED && !errorPrinted )
{
errorPrinted = true;
- KMessageBox::error(parentWidget, i18n("IO error at comparing file %1 with %2!")
- .arg( vfs::pathOrURL( leftURL ) )
- .arg( vfs::pathOrURL( rightURL ) ) );
+ KMessageBox::error(tqparentWidget, i18n("IO error at comparing file %1 with %2!")
+ .tqarg( vfs::pathOrURL( leftURL ) )
+ .tqarg( vfs::pathOrURL( rightURL ) ) );
}
if( leftReadJob == 0 && rightReadJob == 0 )
@@ -335,8 +335,8 @@ void CompareContentTask::sendStatusMessage()
{
double perc = (size == 0) ? 1. : (double)received / (double)size;
int percent = (int)(perc * 10000. + 0.5);
- QString statstr = QString( "%1.%2%3" ).arg( percent / 100 ).arg( ( percent / 10 )%10 ).arg( percent % 10 ) + "%";
- setStatusMessage( i18n( "Comparing file %1 (%2)..." ).arg( leftURL.fileName() ).arg( statstr ) );
+ TQString statstr = TQString( "%1.%2%3" ).tqarg( percent / 100 ).tqarg( ( percent / 10 )%10 ).tqarg( percent % 10 ) + "%";
+ setStatusMessage( i18n( "Comparing file %1 (%2)..." ).tqarg( leftURL.fileName() ).tqarg( statstr ) );
timer->start( 500, true );
}
diff --git a/krusader/Synchronizer/synchronizertask.h b/krusader/Synchronizer/synchronizertask.h
index 015f792..72261b1 100644
--- a/krusader/Synchronizer/synchronizertask.h
+++ b/krusader/Synchronizer/synchronizertask.h
@@ -31,15 +31,15 @@
#ifndef __SYNCHRONIZER_TASK_H__
#define __SYNCHRONIZER_TASK_H__
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/job.h>
class Synchronizer;
class SynchronizerDirList;
class SynchronizerFileItem;
-class QProgressDialog;
-class QTimer;
-class QFile;
+class TQProgressDialog;
+class TQTimer;
+class TQFile;
#define ST_STATE_NEW 0
#define ST_STATE_PENDING 1
@@ -47,59 +47,61 @@ class QFile;
#define ST_STATE_READY 3
#define ST_STATE_ERROR 4
-class SynchronizerTask : public QObject {
+class SynchronizerTask : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- SynchronizerTask() : QObject(), m_state( ST_STATE_NEW ), m_statusMessage( QString::null ) {}
+ SynchronizerTask() : TQObject(), m_state( ST_STATE_NEW ), m_statusMessage( TQString() ) {}
virtual ~SynchronizerTask() {};
- inline int start( QWidget *parentWidget ) { this->parentWidget = parentWidget; start(); return state(); }
+ inline int start( TQWidget *tqparentWidget ) { this->tqparentWidget = tqparentWidget; start(); return state(); }
inline int state() { return m_state; }
- void setStatusMessage( const QString & statMsg ) {
+ void setStatusMessage( const TQString & statMsg ) {
if( m_state == ST_STATE_PENDING || m_state == ST_STATE_STATUS )
m_state = ST_STATE_STATUS;
m_statusMessage = statMsg;
}
- QString status() {
+ TQString status() {
if( m_state == ST_STATE_STATUS ) {
m_state = ST_STATE_PENDING;
return m_statusMessage;
}
- return QString::null;
+ return TQString();
}
protected:
virtual void start() {};
int m_state;
- QString m_statusMessage;
- QWidget *parentWidget;
+ TQString m_statusMessage;
+ TQWidget *tqparentWidget;
};
class CompareTask : public SynchronizerTask {
Q_OBJECT
+ TQ_OBJECT
public:
- CompareTask( SynchronizerFileItem *parentIn, const QString &leftURL,
- const QString &rightURL, const QString &leftDir,
- const QString &rightDir, bool ignoreHidden );
- CompareTask( SynchronizerFileItem *parentIn, const QString &urlIn,
- const QString &dirIn, bool isLeftIn, bool ignoreHidden );
+ CompareTask( SynchronizerFileItem *tqparentIn, const TQString &leftURL,
+ const TQString &rightURL, const TQString &leftDir,
+ const TQString &rightDir, bool ignoreHidden );
+ CompareTask( SynchronizerFileItem *tqparentIn, const TQString &urlIn,
+ const TQString &dirIn, bool isLeftIn, bool ignoreHidden );
virtual ~CompareTask();
inline bool isDuplicate() { return m_duplicate; }
inline bool isLeft() { return !m_duplicate && m_isLeft; }
- inline const QString & leftURL() { return m_url; }
- inline const QString & rightURL() { return m_otherUrl; }
- inline const QString & leftDir() { return m_dir; }
- inline const QString & rightDir() { return m_otherDir; }
- inline const QString & url() { return m_url; }
- inline const QString & dir() { return m_dir; }
- inline SynchronizerFileItem * parent() { return m_parent; }
+ inline const TQString & leftURL() { return m_url; }
+ inline const TQString & rightURL() { return m_otherUrl; }
+ inline const TQString & leftDir() { return m_dir; }
+ inline const TQString & rightDir() { return m_otherDir; }
+ inline const TQString & url() { return m_url; }
+ inline const TQString & dir() { return m_dir; }
+ inline SynchronizerFileItem * tqparent() { return m_parent; }
inline SynchronizerDirList * leftDirList() { return m_dirList; }
inline SynchronizerDirList * rightDirList() { return m_otherDirList; }
inline SynchronizerDirList * dirList() { return m_dirList; }
@@ -111,10 +113,10 @@ protected slots:
private:
SynchronizerFileItem * m_parent;
- QString m_url;
- QString m_dir;
- QString m_otherUrl;
- QString m_otherDir;
+ TQString m_url;
+ TQString m_dir;
+ TQString m_otherUrl;
+ TQString m_otherDir;
bool m_isLeft;
bool m_duplicate;
SynchronizerDirList * m_dirList;
@@ -127,13 +129,14 @@ private:
class CompareContentTask : public SynchronizerTask {
Q_OBJECT
+ TQ_OBJECT
public:
CompareContentTask( Synchronizer *, SynchronizerFileItem *, const KURL &, const KURL &, KIO::filesize_t );
virtual ~CompareContentTask();
public slots:
- void slotDataReceived(KIO::Job *job, const QByteArray &data);
+ void slotDataReceived(KIO::Job *job, const TQByteArray &data);
void slotFinished(KIO::Job *job);
void sendStatusMessage();
@@ -153,12 +156,12 @@ private:
bool errorPrinted; // flag indicates error
KIO::TransferJob *leftReadJob; // compare left read job
KIO::TransferJob *rightReadJob; // compare right read job
- QByteArray compareArray; // the array for comparing
+ TQByteArray compareArray; // the array for comparing
SynchronizerFileItem *item; // the item for content compare
- QTimer *timer; // timer to show the process dialog at compare by content
+ TQTimer *timer; // timer to show the process dialog at compare by content
- QFile *leftFile; // the left side local file
- QFile *rightFile; // the right side local file
+ TQFile *leftFile; // the left side local file
+ TQFile *rightFile; // the right side local file
KIO::filesize_t received; // the received size
Synchronizer *sync;
diff --git a/krusader/UserAction/expander.cpp b/krusader/UserAction/expander.cpp
index e18cfe2..fc4aab9 100644
--- a/krusader/UserAction/expander.cpp
+++ b/krusader/UserAction/expander.cpp
@@ -36,41 +36,41 @@
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include <ktempfile.h>
-#include <qstringlist.h>
-#include <qclipboard.h>
+#include <tqstringlist.h>
+#include <tqclipboard.h>
#include <functional>
using namespace std;
-#define NEED_PANEL if (panel==0) { panelMissingError(_expression,exp); return QString::null; }
+#define NEED_PANEL if (panel==0) { panelMissingError(_expression,exp); return TQString(); }
#include "tstring.h"
-QValueList<const exp_placeholder*>& Expander::_placeholder()
+TQValueList<const exp_placeholder*>& Expander::_placeholder()
{
- static QValueList<const exp_placeholder*> ret;
+ static TQValueList<const exp_placeholder*> ret;
return ret;
}
-void exp_placeholder::panelMissingError(const QString &s, Expander& exp)
+void exp_placeholder::panelMissingError(const TQString &s, Expander& exp)
{
- exp.setError( Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Needed panel specification missing in expander %1").arg(s)) );
+ exp.setError( Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Needed panel specification missing in expander %1").tqarg(s)) );
}
-QStringList exp_placeholder::fileList(const ListPanel* const panel,const QString& type,const QString& mask,const bool ommitPath,const bool useUrl,Expander& exp,const QString& error)
+TQStringList exp_placeholder::fileList(const ListPanel* const panel,const TQString& type,const TQString& tqmask,const bool ommitPath,const bool useUrl,Expander& exp,const TQString& error)
{
- QStringList items;
+ TQStringList items;
if ( type.isEmpty() || type == "all" )
- panel->view->getItemsByMask( mask, &items );
+ panel->view->getItemsByMask( tqmask, &items );
else if ( type == "files" )
- panel->view->getItemsByMask( mask, &items, false, true );
+ panel->view->getItemsByMask( tqmask, &items, false, true );
else if ( type == "dirs" )
- panel->view->getItemsByMask( mask, &items, true, false );
+ panel->view->getItemsByMask( tqmask, &items, true, false );
else if ( type == "selected" )
panel->view->getSelectedItems( &items );
else {
- setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: Bad argument to %1: %2 is not valid item specifier").arg(error,type) ) );
- return QString::null;
+ setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: Bad argument to %1: %2 is not valid item specifier").tqarg(error,type) ) );
+ return TQString();
}
if ( !ommitPath ) { // add the current path
// translate to urls using vfs
@@ -92,7 +92,7 @@ class exp_simpleplaceholder : public exp_placeholder
{
public:
EXP_FUNC;
- virtual TagString expFunc ( const ListPanel*, const QStringList&, const bool&, Expander& ) const=0;
+ virtual TagString expFunc ( const ListPanel*, const TQStringList&, const bool&, Expander& ) const=0;
};
/**
@@ -176,7 +176,7 @@ public:
};
/**
- * This selects all items by the mask given with the first Parameter
+ * This selects all items by the tqmask given with the first Parameter
*/
class exp_Select : public exp_simpleplaceholder {
static const exp_Select instance;
@@ -329,22 +329,22 @@ const exp_Path exp_Path::instance;
* @param s String to manipulate
* @return escaped string
*/
-QString bashquote( QString s ) {
+TQString bashquote( TQString s ) {
/*
// we _can_not_ use this function because it _encloses_ the sting in single-quots!
// In this case quotes strings could not be concaternated anymore
return KrServices::quote(s);
*/
- static const QString evilstuff = "\\\"'`()[]{}!?;$&<>| \t\r\n"; // stuff that should get escaped
+ static const TQString evilstuff = "\\\"'`()[]{}!?;$&<>| \t\r\n"; // stuff that should get escaped
for ( unsigned int i = 0; i < evilstuff.length(); ++i )
- s.replace( evilstuff[ i ], ('\\' + evilstuff[ i ]) );
+ s.tqreplace( evilstuff[ i ], (TQString('\\') + evilstuff[ i ]) );
return s;
}
-QString separateAndQuote(QStringList list,const QString& separator,const bool quote)
+TQString separateAndQuote(TQStringList list,const TQString& separator,const bool quote)
{
if(quote)
transform(list.begin(),list.end(),list.begin(),bashquote);
@@ -361,10 +361,10 @@ exp_Path::exp_Path() {
addParameter( exp_parameter( i18n("Automatically escape spaces"), "__yes", false ) );
}
-TagString exp_Path::expFunc( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, Expander& exp ) const {
+TagString exp_Path::expFunc( const ListPanel* panel, const TQStringList& parameter, const bool& useUrl, Expander& exp ) const {
NEED_PANEL
- QString result;
+ TQString result;
if ( useUrl )
result = panel->func->files()->vfs_getOrigin().url() + "/";
@@ -384,7 +384,7 @@ exp_Count::exp_Count() {
addParameter( exp_parameter( i18n("Count:"), "__choose:All;Files;Dirs;Selected", false ) );
}
-TagString exp_Count::expFunc( const ListPanel* panel, const QStringList& parameter, const bool&, Expander& exp ) const {
+TagString exp_Count::expFunc( const ListPanel* panel, const TQStringList& parameter, const bool&, Expander& exp ) const {
NEED_PANEL
int n = -1;
@@ -397,11 +397,11 @@ TagString exp_Count::expFunc( const ListPanel* panel, const QStringList& paramet
else if ( parameter[ 0 ].lower() == "selected" )
n = panel->view->numSelected();
else {
- setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: Bad argument to Count: %1 is not valid item specifier").arg(parameter[0]) ));
- return QString::null;
+ setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: Bad argument to Count: %1 is not valid item specifier").tqarg(parameter[0]) ));
+ return TQString();
}
- return TagString(QString("%1").arg( n ));
+ return TagString(TQString("%1").tqarg( n ));
}
exp_Filter::exp_Filter() {
@@ -409,7 +409,7 @@ exp_Filter::exp_Filter() {
_description = i18n("Filter Mask (*.h, *.cpp, etc.)");
_needPanel = true;
}
-TagString exp_Filter::expFunc( const ListPanel* panel, const QStringList&, const bool&, Expander& exp ) const {
+TagString exp_Filter::expFunc( const ListPanel* panel, const TQStringList&, const bool&, Expander& exp ) const {
NEED_PANEL
return panel->view->filterMask().nameFilter();
@@ -423,12 +423,12 @@ exp_Current::exp_Current() {
addParameter( exp_parameter( i18n("Omit the current path (optional)"), "__no", false ) );
addParameter( exp_parameter( i18n("Automatically escape spaces"), "__yes", false ) );
}
-TagString exp_Current::expFunc( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, Expander& exp ) const {
+TagString exp_Current::expFunc( const ListPanel* panel, const TQStringList& parameter, const bool& useUrl, Expander& exp ) const {
NEED_PANEL
- QString item = panel->view->getCurrentItem();
+ TQString item = panel->view->getCurrentItem();
- QString result;
+ TQString result;
if ( parameter[0].lower() == "yes" ) // ommit the current path
result = item;
@@ -457,22 +457,22 @@ exp_List::exp_List() {
addParameter( exp_parameter( i18n("Mask (optional, all but 'Selected'):"), "__select", false ) );
addParameter( exp_parameter( i18n("Automatically escape spaces"), "__yes", false ) );
}
-TagString exp_List::expFunc( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, Expander& exp ) const {
+TagString exp_List::expFunc( const ListPanel* panel, const TQStringList& parameter, const bool& useUrl, Expander& exp ) const {
NEED_PANEL
// get selected items from view
- QStringList items;
- QString mask;
+ TQStringList items;
+ TQString tqmask;
if ( parameter.count() <= 3 || parameter[3].isEmpty() )
- mask = "*";
+ tqmask = "*";
else
- mask = parameter[3];
+ tqmask = parameter[3];
return separateAndQuote(
fileList(panel,
- parameter.empty() ? QString::null : parameter[0].lower(),
- mask, parameter.count() > 2 ? parameter[2].lower()=="yes" : false,
+ parameter.empty() ? TQString() : parameter[0].lower(),
+ tqmask, parameter.count() > 2 ? parameter[2].lower()=="yes" : false,
useUrl, exp, "List"),
parameter.count() > 1 ? parameter[1] : " ",
parameter.count() > 4 ? parameter[4].lower()=="yes" : true);
@@ -489,29 +489,29 @@ exp_ListFile::exp_ListFile() {
addParameter( exp_parameter( i18n("Mask (optional, all but 'Selected'):"), "__select", false ) );
addParameter( exp_parameter( i18n("Automatically escape spaces"), "__no", false ) );
}
-TagString exp_ListFile::expFunc( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, Expander& exp ) const {
+TagString exp_ListFile::expFunc( const ListPanel* panel, const TQStringList& parameter, const bool& useUrl, Expander& exp ) const {
NEED_PANEL
// get selected items from view
- QStringList items;
- QString mask;
+ TQStringList items;
+ TQString tqmask;
if ( parameter.count() <= 3 || parameter[3].isEmpty() )
- mask = "*";
+ tqmask = "*";
else
- mask = parameter[3];
+ tqmask = parameter[3];
KTempFile tmpFile( locateLocal("tmp", "krusader"), ".itemlist" );
if ( tmpFile.status() != 0 ) {
- setError(exp, Error(Error::S_FATAL,Error::C_WORLD, i18n("Expander: tempfile couldn't be opened (%1)" ).arg(strerror( tmpFile.status() )) ));
- return QString::null;
+ setError(exp, Error(Error::S_FATAL,Error::C_WORLD, i18n("Expander: tempfile couldn't be opened (%1)" ).tqarg(strerror( tmpFile.status() )) ));
+ return TQString();
}
- QTextStream stream( tmpFile.file() );
+ TQTextStream stream( tmpFile.file() );
stream << separateAndQuote(
fileList(panel,
- parameter.empty() ? QString::null : parameter[0].lower(),
- mask, parameter.count()>2 ? parameter[2].lower()=="yes" : false,
+ parameter.empty() ? TQString() : parameter[0].lower(),
+ tqmask, parameter.count()>2 ? parameter[2].lower()=="yes" : false,
useUrl, exp, "ListFile"),
parameter.count() > 1 ? parameter[1] : "\n",
parameter.count() > 4 ? parameter[4].lower()=="yes" : true)
@@ -526,28 +526,28 @@ exp_Select::exp_Select() {
_description = i18n("Manipulate the Selection...");
_needPanel = true;
- addParameter( exp_parameter( i18n("Selection mask:"), "__select", true ) );
+ addParameter( exp_parameter( i18n("Selection tqmask:"), "__select", true ) );
addParameter( exp_parameter( i18n("Manipulate in which way:"), "__choose:Set;Add;Remove", false ) );
}
-TagString exp_Select::expFunc( const ListPanel* panel, const QStringList& parameter, const bool& , Expander& exp) const {
+TagString exp_Select::expFunc( const ListPanel* panel, const TQStringList& parameter, const bool& , Expander& exp) const {
NEED_PANEL
- KRQuery mask;
+ KRQuery tqmask;
if ( parameter.count() <= 0 || parameter[0].isEmpty() )
- mask = KRQuery( "*" );
+ tqmask = KRQuery( "*" );
else
- mask = KRQuery( parameter[0] );
+ tqmask = KRQuery( parameter[0] );
if ( parameter[1].lower() == "add")
- panel->view->select( mask );
+ panel->view->select( tqmask );
else if ( parameter[1].lower() == "remove")
- panel->view->unselect( mask );
+ panel->view->unselect( tqmask );
else { // parameter[1].lower() == "set" or isEmpty() or whatever
panel->view->unselect( KRQuery( "*" ) );
- panel->view->select( mask );
+ panel->view->select( tqmask );
}
- return QString::null; // this doesn't return anything, that's normal!
+ return TQString(); // this doesn't return anything, that's normal!
}
exp_Goto::exp_Goto() {
@@ -558,7 +558,7 @@ exp_Goto::exp_Goto() {
addParameter( exp_parameter( i18n("Choose a path:"), "__goto", true ) );
addParameter( exp_parameter( i18n("Open location in a new tab"), "__no", false ) );
}
-TagString exp_Goto::expFunc( const ListPanel* panel, const QStringList& parameter, const bool&, Expander& exp ) const {
+TagString exp_Goto::expFunc( const ListPanel* panel, const TQStringList& parameter, const bool&, Expander& exp ) const {
NEED_PANEL
bool newTab = false;
@@ -576,7 +576,7 @@ TagString exp_Goto::expFunc( const ListPanel* panel, const QStringList& paramete
const_cast<ListPanel*>(panel)->slotFocusOnMe();
}
- return QString::null; // this doesn't return anything, that's normal!
+ return TQString(); // this doesn't return anything, that's normal!
}
/*
@@ -599,15 +599,15 @@ exp_Ask::exp_Ask() {
addParameter( exp_parameter( i18n("Preset (optional):"), "", false ) );
addParameter( exp_parameter( i18n("Caption (optional):"), "", false ) );
}
-TagString exp_Ask::expFunc( const ListPanel*, const QStringList& parameter, const bool&, Expander& exp ) const {
- QString caption, preset, result;
+TagString exp_Ask::expFunc( const ListPanel*, const TQStringList& parameter, const bool&, Expander& exp ) const {
+ TQString caption, preset, result;
if ( parameter.count() <= 2 || parameter[2].isEmpty() )
caption = i18n("User Action");
else
caption = parameter[2];
if ( parameter.count() <= 1 || parameter[1].isEmpty() )
- preset = QString::null;
+ preset = TQString();
else
preset = parameter[1];
@@ -622,7 +622,7 @@ TagString exp_Ask::expFunc( const ListPanel*, const QStringList& parameter, cons
return result;
else {
setError(exp, Error(Error::S_ERROR,Error::C_USER,"User cancelled") );
- return QString::null;
+ return TQString();
}
}
@@ -635,18 +635,18 @@ exp_Clipboard::exp_Clipboard() {
addParameter( exp_parameter( i18n("Append to current clipboard content with this separator (optional):"), "", false ) );
}
TagString exp_Clipboard::expFunc( const ListPanel*, const TagStringList& parameter, const bool&, Expander& exp ) const {
-// kdDebug() << "Expander::exp_Clipboard, parameter[0]: '" << parameter[0] << "', Clipboard: " << KApplication::clipboard()->text() << endl;
- QStringList lst=splitEach(parameter[0]);
+// kdDebug() << "Expander::exp_Clipboard, parameter[0]: '" << parameter[0] << "', Clipboard: " << KApplication::tqclipboard()->text() << endl;
+ TQStringList lst=splitEach(parameter[0]);
if(!parameter[1].isSimple()) {
setError(exp,Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Expander: %Each% may not be in the second argument of %Clipboard%")));
- return QString::null;
+ return TQString();
}
- if ( parameter.count() <= 1 || parameter[1].string().isEmpty() || KApplication::clipboard()->text().isEmpty() )
- KApplication::clipboard()->setText( lst.join("\n") );
+ if ( parameter.count() <= 1 || parameter[1].string().isEmpty() || KApplication::tqclipboard()->text().isEmpty() )
+ KApplication::tqclipboard()->setText( lst.join("\n") );
else
- KApplication::clipboard()->setText( KApplication::clipboard()->text() + parameter[1].string() + lst.join("\n") );
+ KApplication::tqclipboard()->setText( KApplication::tqclipboard()->text() + parameter[1].string() + lst.join("\n") );
- return QString::null; // this doesn't return anything, that's normal!
+ return TQString(); // this doesn't return anything, that's normal!
}
exp_Copy::exp_Copy() {
@@ -660,25 +660,25 @@ exp_Copy::exp_Copy() {
TagString exp_Copy::expFunc( const ListPanel*, const TagStringList& parameter, const bool&, Expander& exp ) const {
// basically the parameter can already be used as URL, but since KURL has problems with ftp-proxy-urls (like ftp://username@proxyusername@url...) this is neccesary:
- QStringList lst=splitEach( parameter[0] );
+ TQStringList lst=splitEach( parameter[0] );
if(!parameter[1].isSimple()) {
setError(exp,Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Expander: %Each% may not be in the second argument of %Copy%")));
- return QString::null;
+ return TQString();
}
KURL::List src;
- for(QStringList::const_iterator it=lst.begin(),end=lst.end();it!=end;++it)
+ for(TQStringList::const_iterator it=lst.begin(),end=lst.end();it!=end;++it)
src.push_back(vfs::fromPathOrURL( *it ));
// or transform(...) ?
KURL dest = vfs::fromPathOrURL( parameter[1].string() );
if ( !dest.isValid() || find_if(src.constBegin(),src.constEnd(),not1(mem_fun_ref(&KURL::isValid) ))!=src.end()) {
setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: invalid URL's in %_Copy(\"src\", \"dest\")%") ));
- return QString::null;
+ return TQString();
}
PreservingCopyJob::createCopyJob( PM_DEFAULT, src, dest, KIO::CopyJob::Copy, false, true );
- return QString::null; // this doesn't return everything, that's normal!
+ return TQString(); // this doesn't return everything, that's normal!
}
exp_Move::exp_Move() {
@@ -691,25 +691,25 @@ exp_Move::exp_Move() {
}
TagString exp_Move::expFunc( const ListPanel*, const TagStringList& parameter, const bool& , Expander& exp ) const {
// basically the parameter can already be used as URL, but since KURL has problems with ftp-proxy-urls (like ftp://username@proxyusername@url...) this is neccesary:
- QStringList lst=splitEach( parameter[0] );
+ TQStringList lst=splitEach( parameter[0] );
if(!parameter[1].isSimple()) {
setError(exp,Error(Error::S_FATAL,Error::C_SYNTAX,i18n("%Each% may not be in the second argument of %Move%")));
- return QString::null;
+ return TQString();
}
KURL::List src;
- for(QStringList::const_iterator it=lst.begin(),end=lst.end();it!=end;++it)
+ for(TQStringList::const_iterator it=lst.begin(),end=lst.end();it!=end;++it)
src.push_back(vfs::fromPathOrURL( *it ));
// or transform(...) ?
KURL dest = vfs::fromPathOrURL( parameter[1].string() );
if ( !dest.isValid() || find_if(src.constBegin(),src.constEnd(),not1(mem_fun_ref(&KURL::isValid) ))!=src.end()) {
setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: invalid URL's in %_Move(\"src\", \"dest\")%") ));
- return QString::null;
+ return TQString();
}
PreservingCopyJob::createCopyJob( PM_DEFAULT, src, dest, KIO::CopyJob::Move, false, true );
- return QString::null; // this doesn't return anything, that's normal!
+ return TQString(); // this doesn't return anything, that's normal!
}
exp_Sync::exp_Sync() {
@@ -719,15 +719,15 @@ exp_Sync::exp_Sync() {
addParameter( exp_parameter( i18n("Choose a profile:"), "__syncprofile", true ) );
}
-TagString exp_Sync::expFunc( const ListPanel*, const QStringList& parameter, const bool&, Expander& exp ) const {
+TagString exp_Sync::expFunc( const ListPanel*, const TQStringList& parameter, const bool&, Expander& exp ) const {
if ( parameter[0].isEmpty() ) {
setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: no profile specified for %_Sync(profile)%") ));
- return QString::null;
+ return TQString();
}
new SynchronizerGUI( 0, parameter[0] );
- return QString::null; // this doesn't return everything, that's normal!
+ return TQString(); // this doesn't return everything, that's normal!
}
exp_NewSearch::exp_NewSearch() {
@@ -737,15 +737,15 @@ exp_NewSearch::exp_NewSearch() {
addParameter( exp_parameter( i18n("Choose a profile:"), "__searchprofile", true ) );
}
-TagString exp_NewSearch::expFunc( const ListPanel*, const QStringList& parameter, const bool&, Expander& exp ) const {
+TagString exp_NewSearch::expFunc( const ListPanel*, const TQStringList& parameter, const bool&, Expander& exp ) const {
if ( parameter[0].isEmpty() ) {
setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: no profile specified for %_NewSearch(profile)%") ));
- return QString::null;
+ return TQString();
}
new KrSearchDialog( parameter[0], krApp );
- return QString::null; // this doesn't return everything, that's normal!
+ return TQString(); // this doesn't return everything, that's normal!
}
exp_Profile::exp_Profile() {
@@ -755,15 +755,15 @@ exp_Profile::exp_Profile() {
addParameter( exp_parameter( i18n("Choose a profile:"), "__panelprofile", true ) );
}
-TagString exp_Profile::expFunc( const ListPanel*, const QStringList& parameter, const bool&, Expander& exp ) const {
+TagString exp_Profile::expFunc( const ListPanel*, const TQStringList& parameter, const bool&, Expander& exp ) const {
if ( parameter[0].isEmpty() ) {
setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: no profile specified for %_Profile(profile)%; abort...") ));
- return QString::null;
+ return TQString();
}
MAIN_VIEW->profiles( parameter[0] );
- return QString::null; // this doesn't return everything, that's normal!
+ return TQString(); // this doesn't return everything, that's normal!
}
exp_Each::exp_Each() {
@@ -776,19 +776,19 @@ exp_Each::exp_Each() {
addParameter( exp_parameter( i18n("Mask (optional, all but 'Selected'):"), "__select", false ) );
addParameter( exp_parameter( i18n("Automatically escape spaces"), "__yes", false ) );
}
-TagString exp_Each::expFunc( const ListPanel* panel, const QStringList& parameter, const bool& useUrl, Expander& exp ) const {
+TagString exp_Each::expFunc( const ListPanel* panel, const TQStringList& parameter, const bool& useUrl, Expander& exp ) const {
NEED_PANEL
- QString mask;
+ TQString tqmask;
if ( parameter.count() <= 2 || parameter[2].isEmpty() )
- mask = "*";
+ tqmask = "*";
else
- mask = parameter[2];
+ tqmask = parameter[2];
TagString ret;
- QStringList l = fileList(panel,
- parameter.empty() ? QString::null : parameter[0].lower(),
- mask, parameter.count() > 1 && parameter[1].lower()=="yes",
+ TQStringList l = fileList(panel,
+ parameter.empty() ? TQString() : parameter[0].lower(),
+ tqmask, parameter.count() > 1 && parameter[1].lower()=="yes",
useUrl, exp, "Each");
if(!(parameter.count()<=3 || parameter[3].lower()!="yes"))
@@ -806,12 +806,12 @@ exp_ColSort::exp_ColSort() {
addParameter( exp_parameter( i18n("Choose a column:"), "__choose:Name;Ext;Type;Size;Modified;Perms;rwx;Owner;Group", true ) );
addParameter( exp_parameter( i18n("Choose a sort sequence:"), "__choose:Toggle;Asc;Desc", false ) );
}
-TagString exp_ColSort::expFunc( const ListPanel* panel, const QStringList& parameter, const bool&, Expander& exp ) const {
+TagString exp_ColSort::expFunc( const ListPanel* panel, const TQStringList& parameter, const bool&, Expander& exp ) const {
NEED_PANEL
if ( parameter[0].isEmpty() ) {
setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: no column specified for %_ColSort(column)%") ));
- return QString::null;
+ return TQString();
}
int mode = (int) panel->view->sortMode();
@@ -832,7 +832,7 @@ TagString exp_ColSort::expFunc( const ListPanel* panel, const QStringList& param
*/
// krOut << "start: exp_ColSort::expFunc" << endl;
- #define MODE_OUT krOut << QString( "mode: %1" ).arg( mode, 0, 2 ) << endl; // displays mode in base-2
+ #define MODE_OUT krOut << TQString( "mode: %1" ).tqarg( mode, 0, 2 ) << endl; // displays mode in base-2
//MODE_OUT
if ( parameter.count() <= 1 || ( parameter[1].lower() != "asc" && parameter[1].lower() != "desc" ) ) { //default == toggle
@@ -882,14 +882,14 @@ TagString exp_ColSort::expFunc( const ListPanel* panel, const QStringList& param
if ( parameter[0].lower() == "group" ) {
mode |= KrViewProperties::Group;
} else {
- setError(exp, Error(Error::S_WARNING,Error::C_ARGUMENT,i18n("Expander: unknown column specified for %_ColSort(%1)%").arg(parameter[0]) ));
- return QString::null;
+ setError(exp, Error(Error::S_WARNING,Error::C_ARGUMENT,i18n("Expander: unknown column specified for %_ColSort(%1)%").tqarg(parameter[0]) ));
+ return TQString();
}
//MODE_OUT
panel->view->setSortMode( (KrViewProperties::SortSpec)mode );
// krOut << "end: exp_ColSort::expFunc" << endl;
- return QString::null; // this doesn't return anything, that's normal!
+ return TQString(); // this doesn't return anything, that's normal!
}
exp_PanelSize::exp_PanelSize() {
@@ -899,7 +899,7 @@ exp_PanelSize::exp_PanelSize() {
addParameter( exp_parameter( i18n("Set the new size in percent:"), "__int:0;100;5;50", true ) );
}
-TagString exp_PanelSize::expFunc( const ListPanel* panel, const QStringList& parameter, const bool&, Expander& exp ) const {
+TagString exp_PanelSize::expFunc( const ListPanel* panel, const TQStringList& parameter, const bool&, Expander& exp ) const {
NEED_PANEL
int newSize;
@@ -909,11 +909,11 @@ TagString exp_PanelSize::expFunc( const ListPanel* panel, const QStringList& par
newSize = parameter[0].toInt();
if ( newSize < 0 || newSize > 100 ) {
- setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: Value %1 out of range for %_PanelSize(percent)%. The first parameter has to be >0 and <100").arg(newSize)) );
- return QString::null;
+ setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: Value %1 out of range for %_PanelSize(percent)%. The first parameter has to be >0 and <100").tqarg(newSize)) );
+ return TQString();
}
- QValueList<int> panelSizes = MAIN_VIEW->horiz_splitter->sizes();
+ TQValueList<int> panelSizes = MAIN_VIEW->horiz_splitter->sizes();
int totalSize = panelSizes[0] + panelSizes[1];
if ( panel == LEFT_PANEL ) {
@@ -927,7 +927,7 @@ TagString exp_PanelSize::expFunc( const ListPanel* panel, const QStringList& par
MAIN_VIEW->horiz_splitter->setSizes( panelSizes );
- return QString::null; // this doesn't return everything, that's normal!
+ return TQString(); // this doesn't return everything, that's normal!
}
#ifdef __KJSEMBED__
@@ -939,14 +939,14 @@ exp_Script::exp_Script() {
addParameter( exp_parameter( i18n("Location of the script"), "", true ) );
addParameter( exp_parameter( i18n("Set some variables for the execution (optional).\ni.e. \"return=return_var;foo=bar\", consult the handbook for more information"), "", false ) );
}
-TagString exp_Script::expFunc( const ListPanel*, const QStringList& parameter, const bool&, Expander& exp ) const {
+TagString exp_Script::expFunc( const ListPanel*, const TQStringList& parameter, const bool&, Expander& exp ) const {
if ( parameter[0].isEmpty() ) {
setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: no script specified for %_Script(script)%")) );
- return QString::null;
+ return TQString();
}
- QString filename = parameter[0];
- if ( filename.find('/') && KURL::isRelativeURL(filename) ) {
+ TQString filename = parameter[0];
+ if ( filename.tqfind('/') && KURL::isRelativeURL(filename) ) {
// this return the local version of the file if this exists. else the global one is returnd
filename = locate( "data", "krusader/js/"+filename );
}
@@ -956,13 +956,13 @@ TagString exp_Script::expFunc( const ListPanel*, const QStringList& parameter, c
KJS::ExecState *exec = krJS->globalExec();
- QString jsReturn = QString::null;
+ TQString jsReturn = TQString();
if ( parameter[1].lower() == "yes" ) // to stay compatible with the old-style parameter
jsReturn = "cmd";
else {
- QStringList jsVariables = QStringList::split( ';', parameter[1] );
- QString jsVariable, jsValue;
- for ( QStringList::Iterator it = jsVariables.begin(); it != jsVariables.end(); ++it ) {
+ TQStringList jsVariables = TQStringList::split( ';', parameter[1] );
+ TQString jsVariable, jsValue;
+ for ( TQStringList::Iterator it = jsVariables.begin(); it != jsVariables.end(); ++it ) {
jsVariable = (*it).section('=', 0, 0).stripWhiteSpace();
jsValue = (*it).section('=', 1);
if ( jsVariable == "return" )
@@ -977,7 +977,7 @@ TagString exp_Script::expFunc( const ListPanel*, const QStringList& parameter, c
if ( ! jsReturn.isEmpty() )
return krJS->getValue( jsReturn ).toString( krJS->globalExec() ).qstring();
else
- return QString::null;
+ return TQString();
}
#endif
@@ -992,13 +992,13 @@ exp_View::exp_View() {
//TODO: window-mode 'panel' should open the file in the third-hand viewer
addParameter( exp_parameter( i18n("Choose a window mode:"), "__choose:tab;window", false ) );
}
-TagString exp_View::expFunc( const ListPanel*, const QStringList& parameter, const bool&, Expander& exp ) const {
+TagString exp_View::expFunc( const ListPanel*, const TQStringList& parameter, const bool&, Expander& exp ) const {
if ( parameter[0].isEmpty() ) {
setError(exp, Error(Error::S_FATAL,Error::C_ARGUMENT,i18n("Expander: no file to view in %_View(filename)%")) );
- return QString::null;
+ return TQString();
}
- QString viewMode, windowMode;
+ TQString viewMode, windowMode;
if ( parameter.count() <= 1 || parameter[1].isEmpty() )
viewMode = "generic";
else
@@ -1017,7 +1017,7 @@ TagString exp_View::expFunc( const ListPanel*, const QStringList& parameter, con
//TODO: Call the viewer with viewMode and windowMode. Filename is in parameter[0].
// It would be nice if parameter[0] could also be a space-separated filename-list (provided if the first parameter is %aList(selected)%)
- return QString::null; // this doesn't return everything, that's normal!
+ return TQString(); // this doesn't return everything, that's normal!
}
/////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1026,13 +1026,13 @@ TagString exp_View::expFunc( const ListPanel*, const QStringList& parameter, con
TagString exp_simpleplaceholder::expFunc( const ListPanel* p, const TagStringList& parameter, const bool& useUrl, Expander& exp) const
{
- QStringList lst;
+ TQStringList lst;
for(TagStringList::const_iterator it=parameter.begin(),end=parameter.end();it!=end;++it)
if((*it).isSimple())
lst.push_back((*it).string());
else {
- setError(exp,Error(Error::S_FATAL,Error::C_SYNTAX,i18n("%Each% is not allowed in parameter to %1").arg(description())));
- return QString::null;
+ setError(exp,Error(Error::S_FATAL,Error::C_SYNTAX,i18n("%Each% is not allowed in parameter to %1").tqarg(description())));
+ return TQString();
}
return expFunc(p,lst,useUrl,exp);
}
@@ -1052,12 +1052,12 @@ ListPanel* Expander::getPanel( const char panelIndicator, const exp_placeholder*
case '_':
return 0;
default:
- exp.setError(Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Expander: Bad panel specifier %1 in placeholder %2").arg(panelIndicator).arg(pl->description())));
+ exp.setError(Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Expander: Bad panel specifier %1 in placeholder %2").tqarg(panelIndicator).tqarg(pl->description())));
return 0;
}
}
-void Expander::expand( const QString& stringToExpand, bool useUrl ) {
+void Expander::expand( const TQString& stringToExpand, bool useUrl ) {
TagString result = expandCurrent( stringToExpand, useUrl );
if ( error() )
return;
@@ -1070,19 +1070,19 @@ void Expander::expand( const QString& stringToExpand, bool useUrl ) {
// krOut << resultList[0] << endl;
}
-TagString Expander::expandCurrent( const QString& stringToExpand, bool useUrl ) {
+TagString Expander::expandCurrent( const TQString& stringToExpand, bool useUrl ) {
TagString result;
- QString exp = QString::null;
+ TQString exp = TQString();
TagString tmpResult;
int begin, end, i;
// int brackets = 0;
// bool inQuotes = false;
unsigned int idx = 0;
while ( idx < stringToExpand.length() ) {
- if ( ( begin = stringToExpand.find( '%', idx ) ) == -1 ) break;
+ if ( ( begin = stringToExpand.tqfind( '%', idx ) ) == -1 ) break;
if ( ( end = findEnd( stringToExpand, begin ) ) == -1 ) {
setError(Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Error: unterminated % in Expander::expandCurrent")) );
- return QString::null;
+ return TQString();
}
result += stringToExpand.mid( idx, begin - idx ); // copy until the start of %exp%
@@ -1091,19 +1091,19 @@ TagString Expander::expandCurrent( const QString& stringToExpand, bool useUrl )
exp = stringToExpand.mid( begin + 1, end - begin - 1 );
// kdDebug() << "------------- exp: '" << exp << "'" << endl;
if ( exp == "" )
- result += QString(QChar('%'));
+ result += TQString(TQChar('%'));
else {
TagStringList parameter = separateParameter( &exp, useUrl );
if ( error() )
- return QString::null;
+ return TQString();
char panelIndicator = exp.lower()[0].latin1();
- exp.replace( 0, 1, "" );
+ exp.tqreplace( 0, 1, "" );
for ( i = 0; i < placeholderCount(); ++i )
if ( exp == placeholder( i )->expression() ) {
// kdDebug() << "---------------------------------------" << endl;
tmpResult = placeholder( i )->expFunc( getPanel( panelIndicator,placeholder(i),*this ), parameter, useUrl, *this );
if ( error() ) {
- return QString::null;
+ return TQString();
}
else
result += tmpResult;
@@ -1111,8 +1111,8 @@ TagString Expander::expandCurrent( const QString& stringToExpand, bool useUrl )
break;
}
if ( i == placeholderCount() ) { // didn't find an expander
- setError(Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Error: unrecognized %%%1%2%% in Expander::expand").arg(panelIndicator).arg(exp)) );
- return QString::null;
+ setError(Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Error: unrecognized %%%1%2%% in Expander::expand").tqarg(panelIndicator).tqarg(exp)) );
+ return TQString();
}
} //else
idx = end + 1;
@@ -1123,15 +1123,15 @@ TagString Expander::expandCurrent( const QString& stringToExpand, bool useUrl )
return result;
}
-QStringList Expander::splitEach( TagString stringToSplit ) {
+TQStringList Expander::splitEach( TagString stringToSplit ) {
if(stringToSplit.isSimple()) {
// krOut << stringToSplit.string() << endl;
return stringToSplit.string();
}
- pair<uint,QStringList> pl=*stringToSplit.tagsBegin();
+ pair<uint,TQStringList> pl=*stringToSplit.tagsBegin();
stringToSplit.eraseTag(stringToSplit.tagsBegin());
- QStringList ret;
- for(QStringList::const_iterator it=pl.second.begin(),end=pl.second.end();it!=end;++it) {
+ TQStringList ret;
+ for(TQStringList::const_iterator it=pl.second.begin(),end=pl.second.end();it!=end;++it) {
TagString s=stringToSplit;
s.insert(pl.first,*it);
ret+=splitEach(s);
@@ -1140,13 +1140,13 @@ QStringList Expander::splitEach( TagString stringToSplit ) {
// kdDebug() << "stringToSplit: " << stringToSplit << endl;
}
-TagStringList Expander::separateParameter( QString* const exp, bool useUrl ) {
+TagStringList Expander::separateParameter( TQString* const exp, bool useUrl ) {
TagStringList parameter;
- QStringList parameter1;
- QString result;
+ TQStringList parameter1;
+ TQString result;
int begin, end;
- if ( ( begin = exp->find( '(' ) ) != -1 ) {
- if ( ( end = exp->findRev( ')' ) ) == -1 ) {
+ if ( ( begin = exp->tqfind( '(' ) ) != -1 ) {
+ if ( ( end = exp->tqfindRev( ')' ) ) == -1 ) {
setError(Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Error: missing ')' in Expander::separateParameter") ));
return TagStringList();
}
@@ -1159,7 +1159,7 @@ TagStringList Expander::separateParameter( QString* const exp, bool useUrl ) {
while ( idx < result.length() ) {
if ( result[ idx ].latin1() == '\\' ) {
if ( result[ idx+1 ].latin1() == '"')
- result.replace( idx, 1, "" );
+ result.tqreplace( idx, 1, "" );
}
if ( result[ idx ].latin1() == '"' )
inQuotes = !inQuotes;
@@ -1172,7 +1172,7 @@ TagStringList Expander::separateParameter( QString* const exp, bool useUrl ) {
}
parameter1.append( result.mid( begin, idx - begin) ); //don't forget the last one
- for (QStringList::Iterator it = parameter1.begin(); it != parameter1.end(); ++it) {
+ for (TQStringList::Iterator it = parameter1.begin(); it != parameter1.end(); ++it) {
*it = (*it).stripWhiteSpace();
if ( (*it).left(1) == "\"" )
*it = (*it).mid(1, (*it).length() - 2 );
@@ -1186,11 +1186,11 @@ TagStringList Expander::separateParameter( QString* const exp, bool useUrl ) {
return parameter;
}
-int Expander::findEnd( const QString& str, int start ) {
- int end = str.find( '%', start + 1 );
+int Expander::findEnd( const TQString& str, int start ) {
+ int end = str.tqfind( '%', start + 1 );
if ( end == -1 )
return end;
- int bracket = str.find( '(', start + 1 );
+ int bracket = str.tqfind( '(', start + 1 );
if ( end < bracket || bracket == -1 )
return end;
diff --git a/krusader/UserAction/expander.h b/krusader/UserAction/expander.h
index 3d9cf72..a8b3156 100644
--- a/krusader/UserAction/expander.h
+++ b/krusader/UserAction/expander.h
@@ -13,18 +13,18 @@
#ifndef EXPANDER_H
#define EXPANDER_H
-// class QString;
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+// class TQString;
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include "tstring.h"
-// #include <qstringlist.h>
+// #include <tqstringlist.h>
class ListPanel;
class Expander;
class Error;
-typedef TagString_t<QStringList> TagString;
-typedef QValueList<TagString> TagStringList;
+typedef TagString_t<TQStringList> TagString;
+typedef TQValueList<TagString> TagStringList;
/**
* This holds informations about each parameter
@@ -32,23 +32,23 @@ typedef QValueList<TagString> TagStringList;
class exp_parameter {
public:
exp_parameter() {}
- inline exp_parameter( QString desc, QString pre, bool ness)
+ inline exp_parameter( TQString desc, TQString pre, bool ness)
{ _description = desc; _preset = pre; _nessesary = ness; }
- inline QString description() const ///< A description of the parameter
+ inline TQString description() const ///< A description of the parameter
{ return _description; }
- inline QString preset() const ///< the default of the parameter
+ inline TQString preset() const ///< the default of the parameter
{ return _preset; }
inline bool nessesary() const ///< false if the parameter is optional
{ return _nessesary; }
private:
- QString _description;
- QString _preset;
+ TQString _description;
+ TQString _preset;
bool _nessesary;
};
#define EXP_FUNC virtual TagString expFunc ( const ListPanel*, const TagStringList&, const bool&, Expander& ) const
-#define SIMPLE_EXP_FUNC virtual TagString expFunc ( const ListPanel*, const QStringList&, const bool&, Expander& ) const
+#define SIMPLE_EXP_FUNC virtual TagString expFunc ( const ListPanel*, const TQStringList&, const bool&, Expander& ) const
/**
* Abstract baseclass for all expander-functions (which replace placeholder).
* A Placeholder is an entry containing the expression, its expanding function and Parameter.
@@ -59,9 +59,9 @@ private:
*/
class exp_placeholder {
public:
- inline QString expression() const ///< The placeholder (without '%' or panel-prefix)
+ inline TQString expression() const ///< The placeholder (without '%' or panel-prefix)
{ return _expression; }
- inline QString description() const ///< A description of the placeholder
+ inline TQString description() const ///< A description of the placeholder
{ return _description; }
inline bool needPanel() const ///< true if the placeholder needs a panel to operate on
{ return _needPanel; }
@@ -75,15 +75,15 @@ public:
EXP_FUNC = 0;
protected:
static void setError(Expander& exp,const Error& e) ;
- static void panelMissingError(const QString &s, Expander& exp);
- static QStringList splitEach(const TagString& s);
- static QStringList fileList(const ListPanel* const panel,const QString& type,const QString& mask,const bool ommitPath,const bool useUrl,Expander&,const QString&);
+ static void panelMissingError(const TQString &s, Expander& exp);
+ static TQStringList splitEach(const TagString& s);
+ static TQStringList fileList(const ListPanel* const panel,const TQString& type,const TQString& tqmask,const bool ommitPath,const bool useUrl,Expander&,const TQString&);
exp_placeholder();
exp_placeholder(const exp_placeholder& p);
~exp_placeholder() { }
- QString _expression;
- QString _description;
- QValueList <exp_parameter> _parameter;
+ TQString _expression;
+ TQString _description;
+ TQValueList <exp_parameter> _parameter;
bool _needPanel;
};
@@ -97,14 +97,14 @@ protected:
S_OK, S_WARNING, S_ERROR, S_FATAL
};
Error() : s_(S_OK) {}
- Error(Severity s,Cause c,QString d) : s_(s), c_(c), desc_(d) {}
+ Error(Severity s,Cause c,TQString d) : s_(s), c_(c), desc_(d) {}
Cause cause() const { return c_; }
operator bool() const { return s_!=S_OK; }
- const QString& what() const { return desc_; }
+ const TQString& what() const { return desc_; }
private:
Severity s_;
Cause c_;
- QString desc_;
+ TQString desc_;
};
@@ -120,7 +120,7 @@ protected:
* - @em Count is replaced by a nomber of
* -# Either "All", "Files", "Dirs", "Selected"
* .
- * - @em Filter is preplaced by the panels filter-mask (ex: "*.cpp *.h")
+ * - @em Filter is preplaced by the panels filter-tqmask (ex: "*.cpp *.h")
* - @em Current is replaced by the current item or, in case of onmultiple="call_each", by each selected item.
* -# If "yes", only the filename (without path) is returned
* .
@@ -128,12 +128,12 @@ protected:
* -# Either "All", "Files", "Dirs", "Selected"
* -# A seperator between the items (default: " " [one space])
* -# If "yes", only the filename (without path) is returned
- * -# (for all but "Selected") a filter-mask (default: "*")
+ * -# (for all but "Selected") a filter-tqmask (default: "*")
* .
* .
* - Access to panel-dependent, krusader-internal, parameter-needed functions (panel-indicator has to be 'a', 'o', 'r' or 'l')
* - @em Select manipulates the selection of the panel
- * -# A filter-mask (nessesary)
+ * -# A filter-tqmask (nessesary)
* -# Either "Add", "Remove", "Set" (default)
* .
* - @em Bookmark manipulates the selection of the panel
@@ -172,7 +172,7 @@ public:
* @param useUrl true iff the path's should be expanded to an URL instead of an local path
* @return a list of all commands
*/
- void expand( const QString& stringToExpand, bool useUrl );
+ void expand( const TQString& stringToExpand, bool useUrl );
/**
* Returns the list of all commands to be executed, provided that #expand was called
@@ -180,7 +180,7 @@ public:
*
* @return The list of commands to be executed
*/
- const QStringList& result() const { assert(!error()); return resultList; }
+ const TQStringList& result() const { assert(!error()); return resultList; }
/**
* Returns the error object of this Expander. You can test whether there was
@@ -203,14 +203,14 @@ protected:
* @param useUrl true if the path's should be expanded to an URL instead of an local path
* @return the expanded commanline for the current item
*/
- TagString expandCurrent( const QString& stringToExpand, bool useUrl );
+ TagString expandCurrent( const TQString& stringToExpand, bool useUrl );
/**
* This function searches for "@EACH"-marks to splitt the string in a list for each %_Each%-item
*
* @param stringToSplit the string which should be splitted
* @return the splitted list
*/
- static QStringList splitEach( TagString stringToSplit );
+ static TQStringList splitEach( TagString stringToSplit );
/**
* @param panelIndicator either '_' for panel-independent placeholders, 'a', 'o', 'r', or 'l' for the active, other (inactive), right or left panel
* @return a pointer to the right panel or NULL if no panel is needed.
@@ -222,24 +222,24 @@ protected:
* @param useUrl true if the path's should be expanded to an URL instead of an local path
* @return a list of all parameter
*/
- TagStringList separateParameter( QString* const exp, bool useUrl );
+ TagStringList separateParameter( TQString* const exp, bool useUrl );
/**
* This finds the end of a placeholder, taking care of the parameter
* @return the position where the placeholder ends
*/
- int findEnd( const QString& str, int start );
+ int findEnd( const TQString& str, int start );
void setError(const Error &e) { _err=e; }
friend class exp_placeholder;
private:
- static QValueList <const exp_placeholder*>& _placeholder();
+ static TQValueList <const exp_placeholder*>& _placeholder();
Error _err;
- QStringList resultList;
+ TQStringList resultList;
};
inline void exp_placeholder::setError(Expander& exp,const Error& e) { exp.setError(e); }
-inline QStringList exp_placeholder::splitEach(const TagString& s) { return Expander::splitEach(s); }
+inline TQStringList exp_placeholder::splitEach(const TagString& s) { return Expander::splitEach(s); }
inline exp_placeholder::exp_placeholder() { Expander::_placeholder().push_back(this); }
#endif // ifndef EXPANDER_H
diff --git a/krusader/UserAction/kraction.cpp b/krusader/UserAction/kraction.cpp
index 9c9c89f..47aa222 100644
--- a/krusader/UserAction/kraction.cpp
+++ b/krusader/UserAction/kraction.cpp
@@ -14,14 +14,14 @@
#include <kdebug.h>
#include <klocale.h>
#include <kinputdialog.h>
-#include <qtextedit.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qsplitter.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qlabel.h>
+#include <tqtextedit.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqsplitter.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqlabel.h>
#include <kaction.h>
#include <kurl.h>
#include <kmessagebox.h>
@@ -35,15 +35,15 @@
//for the availabilitycheck:
#include <kmimetype.h>
-#include <qregexp.h>
+#include <tqregexp.h>
//////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////// KrActionProcDlg /////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
-#include <qlayout.h>
-KrActionProcDlg::KrActionProcDlg( QString caption, bool enableStderr, QWidget *parent ) :
-KDialogBase( parent, 0, false, caption, KDialogBase::User1 | KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Cancel ),
+#include <tqlayout.h>
+KrActionProcDlg::KrActionProcDlg( TQString caption, bool enableStderr, TQWidget *tqparent ) :
+KDialogBase( tqparent, 0, false, caption, KDialogBase::User1 | KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Cancel ),
_stdout(0), _stderr(0), _currentTextEdit(0) {
setButtonOK( i18n( "Close" ) );
@@ -53,36 +53,36 @@ _stdout(0), _stderr(0), _currentTextEdit(0) {
setButtonText(KDialogBase::User1, i18n("Save as") );
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
// do we need to separate stderr and stdout?
if ( enableStderr ) {
- QSplitter *splitt = new QSplitter( QSplitter::Vertical, page );
+ TQSplitter *splitt = new TQSplitter( Qt::Vertical, page );
// create stdout
- QVBox *stdoutBox = new QVBox( splitt, "stdout VBox" );
+ TQVBox *stdoutBox = new TQVBox( splitt, "stdout VBox" );
stdoutBox->setSpacing( 6 );
- new QLabel( i18n( "Standard Output (stdout)" ), stdoutBox );
- _stdout = new QTextEdit( stdoutBox );
+ new TQLabel( i18n( "Standard Output (stdout)" ), stdoutBox );
+ _stdout = new TQTextEdit( stdoutBox );
_stdout->setReadOnly( true );
_stdout->setMinimumWidth( fontMetrics().maxWidth() * 40 );
// create stderr
- QVBox *stderrBox = new QVBox( splitt, "stderr VBox" );
+ TQVBox *stderrBox = new TQVBox( splitt, "stderr VBox" );
stderrBox->setSpacing( 6 );
- new QLabel( i18n( "Standard Error (stderr)" ), stderrBox );
- _stderr = new QTextEdit( stderrBox );
+ new TQLabel( i18n( "Standard Error (stderr)" ), stderrBox );
+ _stderr = new TQTextEdit( stderrBox );
_stderr->setReadOnly( true );
_stderr->setMinimumWidth( fontMetrics().maxWidth() * 40 );
} else {
// create stdout
- new QLabel( i18n( "Output" ), page );
- _stdout = new QTextEdit( page );
+ new TQLabel( i18n( "Output" ), page );
+ _stdout = new TQTextEdit( page );
_stdout->setReadOnly( true );
_stdout->setMinimumWidth( fontMetrics().maxWidth() * 40 );
}
_currentTextEdit = _stdout;
- connect( _stdout, SIGNAL( clicked(int, int) ), SLOT( currentTextEditChanged() ) );
+ connect( _stdout, TQT_SIGNAL( clicked(int, int) ), TQT_SLOT( currentTextEditChanged() ) );
if (_stderr)
- connect( _stderr, SIGNAL( clicked(int, int) ), SLOT( currentTextEditChanged() ) );
+ connect( _stderr, TQT_SIGNAL( clicked(int, int) ), TQT_SLOT( currentTextEditChanged() ) );
krConfig->setGroup( "UserActions" );
normalFont = krConfig->readFontEntry( "Normal Font", _UserActions_NormalFont );
@@ -90,29 +90,29 @@ _stdout(0), _stderr(0), _currentTextEdit(0) {
bool startupState = krConfig->readBoolEntry( "Use Fixed Font", _UserActions_UseFixedFont );
toggleFixedFont( startupState );
- // HACK This fetches the layout of the buttonbox from KDialogBase, although it is not accessable with KDialogBase's API
+ // HACK This fetches the tqlayout of the buttonbox from KDialogBase, although it is not accessable with KDialogBase's API
// None the less it's quite save to use since this implementation hasn't changed since KDE-3.3 (I haven't looked at earlier
// versions since we don't support them) and now all work is done in KDE-4.
- QWidget* buttonBox = static_cast<QWidget*>( actionButton(KDialogBase::Ok)->parent() );
- QBoxLayout* buttonBoxLayout = static_cast<QBoxLayout*>( buttonBox->layout() );
- QCheckBox* useFixedFont = new QCheckBox( i18n("Use font with fixed width"), buttonBox );
+ TQWidget* buttonBox = TQT_TQWIDGET( actionButton(KDialogBase::Ok)->tqparent() );
+ TQBoxLayout* buttonBoxLayout = static_cast<TQBoxLayout*>( buttonBox->tqlayout() );
+ TQCheckBox* useFixedFont = new TQCheckBox( i18n("Use font with fixed width"), buttonBox );
buttonBoxLayout->insertWidget( 0, useFixedFont );
useFixedFont->setChecked( startupState );
- connect( useFixedFont, SIGNAL( toggled(bool) ), SLOT( toggleFixedFont(bool) ) );
+ connect( useFixedFont, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleFixedFont(bool) ) );
}
void KrActionProcDlg::addStderr( KProcess *, char *buffer, int buflen ) {
if (_stderr)
- _stderr->append( QString::fromLatin1( buffer, buflen ) );
+ _stderr->append( TQString::tqfromLatin1( buffer, buflen ) );
else {
_stdout->setItalic(true);
- _stdout->append( QString::fromLatin1( buffer, buflen ) );
+ _stdout->append( TQString::tqfromLatin1( buffer, buflen ) );
_stdout->setItalic(false);
}
}
void KrActionProcDlg::addStdout( KProcess *, char *buffer, int buflen ) {
- _stdout->append( QString::fromLatin1( buffer, buflen ) );
+ _stdout->append( TQString::tqfromLatin1( buffer, buflen ) );
}
void KrActionProcDlg::toggleFixedFont( bool state ) {
@@ -129,13 +129,13 @@ void KrActionProcDlg::toggleFixedFont( bool state ) {
}
void KrActionProcDlg::slotUser1() {
- QString filename = KFileDialog::getSaveFileName(QString::null, i18n("*.txt|Text files\n*|all files"), this);
+ TQString filename = KFileDialog::getSaveFileName(TQString(), i18n("*.txt|Text files\n*|all files"), this);
if ( filename.isEmpty() )
return;
- QFile file( filename );
+ TQFile file( filename );
int answer = KMessageBox::Yes;
if ( file.exists() )
- answer = KMessageBox::warningYesNoCancel( this, //parent
+ answer = KMessageBox::warningYesNoCancel( this, //tqparent
i18n("This file already exists.\nDo you want to overwrite it or append the output?"), //text
i18n("Overwrite or append?"), //caption
i18n("Overwrite"), //label for Yes-Button
@@ -151,13 +151,13 @@ void KrActionProcDlg::slotUser1() {
if ( ! open ) {
KMessageBox::error( this,
- i18n("Can't open %1 for writing!\nNothing exported.").arg(filename),
+ i18n("Can't open %1 for writing!\nNothing exported.").tqarg(filename),
i18n("Export failed!")
);
return;
}
- QTextStream stream( &file );
+ TQTextStream stream( &file );
stream << _currentTextEdit->text();
file.close();
}
@@ -173,25 +173,25 @@ void KrActionProcDlg::currentTextEditChanged() {
//////////////////////////////////// KrActionProc ////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
-KrActionProc::KrActionProc( KrActionBase* action ) : QObject(), _action( action ), _proc( new KProcess(this) ), _output( 0 ) {
+KrActionProc::KrActionProc( KrActionBase* action ) : TQObject(), _action( action ), _proc( new KProcess(this) ), _output( 0 ) {
_proc->setUseShell( true );
- connect( _proc, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( processExited( KProcess* ) ) ) ;
+ connect( _proc, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( processExited( KProcess* ) ) ) ;
}
KrActionProc::~KrActionProc() {
delete _proc;
}
-void KrActionProc::start( QString cmdLine ) {
- QStringList list = cmdLine;
+void KrActionProc::start( TQString cmdLine ) {
+ TQStringList list = cmdLine;
start( list );
}
-void KrActionProc::start( QStringList cmdLineList ) {
+void KrActionProc::start( TQStringList cmdLineList ) {
_proc->clearArguments();
- QString cmd;
+ TQString cmd;
if ( ! _action->startpath().isEmpty() )
_proc->setWorkingDirectory( _action->startpath() );
@@ -208,7 +208,7 @@ void KrActionProc::start( QStringList cmdLineList ) {
|| ( _action->execType() == KrAction::RunInTE && MAIN_VIEW->konsole_part && MAIN_VIEW->konsole_part->widget() )
) { // not collect output
//TODO option to run them in paralell (not available for: collect output)
- for ( QStringList::Iterator it = cmdLineList.begin(); it != cmdLineList.end(); ++it) {
+ for ( TQStringList::Iterator it = cmdLineList.begin(); it != cmdLineList.end(); ++it) {
if ( ! cmd.isEmpty() )
cmd += " ; "; //TODO make this separator configurable (users may want && or || for spec. actions)
cmd += *it;
@@ -216,13 +216,13 @@ void KrActionProc::start( QStringList cmdLineList ) {
//run in TE
if ( _action->execType() == KrAction::RunInTE ) {
//send the commandline contents to the terminal emulator
- QKeyEvent keyEvent( QEvent::KeyPress, 0, -1, 0, cmd+"\n");
- QApplication::sendEvent( MAIN_VIEW->konsole_part->widget(), &keyEvent );
+ TQKeyEvent keyEvent( TQEvent::KeyPress, 0, -1, 0, cmd+"\n");
+ TQApplication::sendEvent( MAIN_VIEW->konsole_part->widget(), &keyEvent );
} else { // will start a new process
// run in terminal
if ( _action->execType() == KrAction::Terminal ) {
krConfig->setGroup( "UserActions" );
- QString term = krConfig->readEntry( "Terminal", _UserActions_Terminal );
+ TQString term = krConfig->readEntry( "Terminal", _UserActions_Terminal );
if ( _action->user().isEmpty() )
( *_proc ) << term << cmd;
@@ -244,11 +244,11 @@ void KrActionProc::start( QStringList cmdLineList ) {
separateStderr = true;
_output = new KrActionProcDlg( _action->text(), separateStderr );
// connect the output to the dialog
- connect( _proc, SIGNAL( receivedStderr( KProcess*, char*, int ) ), _output, SLOT( addStderr( KProcess*, char *, int ) ) );
- connect( _proc, SIGNAL( receivedStdout( KProcess*, char*, int ) ), _output, SLOT( addStdout( KProcess*, char *, int ) ) );
- connect( _output, SIGNAL( cancelClicked() ), this, SLOT( kill() ) );
+ connect( _proc, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), _output, TQT_SLOT( addStderr( KProcess*, char *, int ) ) );
+ connect( _proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), _output, TQT_SLOT( addStdout( KProcess*, char *, int ) ) );
+ connect( _output, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( kill() ) );
_output->show();
- for ( QStringList::Iterator it = cmdLineList.begin(); it != cmdLineList.end(); ++it) {
+ for ( TQStringList::Iterator it = cmdLineList.begin(); it != cmdLineList.end(); ++it) {
if ( ! cmd.isEmpty() )
cmd += " ; "; //TODO make this separator configurable (users may want && or ||)
//TODO: read header fom config or action-properties and place it on top of each command
@@ -280,8 +280,8 @@ void KrActionProc::processExited( KProcess * ) {
/////////////////////////////////////// KrAction ///////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
-KrAction::KrAction( KActionCollection *parent, const char* name ) : KAction( parent, name ) {
- connect(this, SIGNAL(activated()), this, SLOT(exec()) );
+KrAction::KrAction( KActionCollection *tqparent, const char* name ) : KAction( tqparent, name ) {
+ connect(this, TQT_SIGNAL(activated()), this, TQT_SLOT(exec()) );
}
KrAction::~KrAction() {
@@ -295,7 +295,7 @@ bool KrAction::isAvailable( const KURL& currentURL ) {
//check protocol
if ( ! _showonlyProtocol.empty() ) {
available = false;
- for ( QStringList::Iterator it = _showonlyProtocol.begin(); it != _showonlyProtocol.end(); ++it ) {
+ for ( TQStringList::Iterator it = _showonlyProtocol.begin(); it != _showonlyProtocol.end(); ++it ) {
//kdDebug() << "KrAction::isAvailable currendProtocol: " << currentURL.protocol() << " =?= " << *it << endl;
if ( currentURL.protocol() == *it ) { // FIXME remove trailing slashes at the xml-parsing (faster because done only once)
available = true;
@@ -307,9 +307,9 @@ bool KrAction::isAvailable( const KURL& currentURL ) {
//check the Path-list:
if ( ! _showonlyPath.empty() ) {
available = false;
- for ( QStringList::Iterator it = _showonlyPath.begin(); it != _showonlyPath.end(); ++it ) {
+ for ( TQStringList::Iterator it = _showonlyPath.begin(); it != _showonlyPath.end(); ++it ) {
if ( (*it).right(1) == "*" ){
- if ( currentURL.path().find( (*it).left( (*it).length() - 1 ) ) == 0 ) {
+ if ( currentURL.path().tqfind( (*it).left( (*it).length() - 1 ) ) == 0 ) {
available = true;
break;
}
@@ -325,15 +325,15 @@ bool KrAction::isAvailable( const KURL& currentURL ) {
if ( ! _showonlyMime.empty() ) {
available = false;
KMimeType::Ptr mime = KMimeType::findByURL( currentURL );
- for ( QStringList::Iterator it = _showonlyMime.begin(); it != _showonlyMime.end(); ++it ) {
- if ( (*it).contains("/") ) {
+ for ( TQStringList::Iterator it = _showonlyMime.begin(); it != _showonlyMime.end(); ++it ) {
+ if ( (*it).tqcontains("/") ) {
if ( mime->is( *it ) ) { // don't use ==; use 'is()' instead, which is aware of inheritence (ie: text/x-makefile is also text/plain)
available = true;
break;
}
}
else {
- if ( mime->name().find( *it ) == 0 ) { // 0 is the beginning, -1 is not found
+ if ( mime->name().tqfind( *it ) == 0 ) { // 0 is the beginning, -1 is not found
available = true;
break;
}
@@ -344,8 +344,8 @@ bool KrAction::isAvailable( const KURL& currentURL ) {
//check filename
if ( ! _showonlyFile.empty() ) {
available = false;
- for ( QStringList::Iterator it = _showonlyFile.begin(); it != _showonlyFile.end(); ++it ) {
- QRegExp regex = QRegExp( *it, false, true ); // case-sensitive = false; wildcards = true
+ for ( TQStringList::Iterator it = _showonlyFile.begin(); it != _showonlyFile.end(); ++it ) {
+ TQRegExp regex = TQRegExp( *it, false, true ); // case-sensitive = false; wildcards = true
if ( regex.exactMatch( currentURL.fileName() ) ) {
available = true;
break;
@@ -357,7 +357,7 @@ bool KrAction::isAvailable( const KURL& currentURL ) {
}
-bool KrAction::xmlRead( const QDomElement& element ) {
+bool KrAction::xmlRead( const TQDomElement& element ) {
/*
This has to be done elsewhere!!
@@ -369,8 +369,8 @@ bool KrAction::xmlRead( const QDomElement& element ) {
setName( element.attribute( "name" ).latin1() );
*/
- for ( QDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- QDomElement e = node.toElement();
+ for ( TQDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling() ) {
+ TQDomElement e = node.toElement();
if ( e.isNull() )
continue; // this should skip nodes which are not elements ( i.e. comments, <!-- -->, or text nodes)
@@ -406,18 +406,18 @@ bool KrAction::xmlRead( const QDomElement& element ) {
if ( ! e.tagName().isEmpty() )
krOut << "KrAction::xmlRead() - unrecognized tag found: <action name=\"" << name() << "\"><" << e.tagName() << ">" << endl;
- } // for ( QDomNode node = action->firstChild(); !node.isNull(); node = node.nextSibling() )
+ } // for ( TQDomNode node = action->firstChild(); !node.isNull(); node = node.nextSibling() )
return true;
} //KrAction::xmlRead
-QDomElement KrAction::xmlDump( QDomDocument& doc ) const {
- QDomElement actionElement = doc.createElement("action");
+TQDomElement KrAction::xmlDump( TQDomDocument& doc ) const {
+ TQDomElement actionElement = doc.createElement("action");
actionElement.setAttribute( "name", name() );
#define TEXT_ELEMENT( TAGNAME, TEXT ) \
{ \
- QDomElement e = doc.createElement( TAGNAME ); \
+ TQDomElement e = doc.createElement( TAGNAME ); \
e.appendChild( doc.createTextNode( TEXT ) ); \
actionElement.appendChild( e ); \
}
@@ -441,7 +441,7 @@ QDomElement KrAction::xmlDump( QDomDocument& doc ) const {
if ( ! startpath().isEmpty() )
TEXT_ELEMENT( "startpath", startpath() )
- QDomElement availabilityElement = dumpAvailability( doc );
+ TQDomElement availabilityElement = dumpAvailability( doc );
if ( availabilityElement.hasChildNodes() )
actionElement.appendChild( availabilityElement );
@@ -451,8 +451,8 @@ QDomElement KrAction::xmlDump( QDomDocument& doc ) const {
return actionElement;
} //KrAction::xmlDump
-void KrAction::readCommand( const QDomElement& element ) {
- QString attr;
+void KrAction::readCommand( const TQDomElement& element ) {
+ TQString attr;
attr = element.attribute( "executionmode", "normal" ); // default: "normal"
if ( attr == "normal")
@@ -487,8 +487,8 @@ void KrAction::readCommand( const QDomElement& element ) {
} //KrAction::readCommand
-QDomElement KrAction::dumpCommand( QDomDocument& doc ) const {
- QDomElement commandElement = doc.createElement("command");
+TQDomElement KrAction::dumpCommand( TQDomDocument& doc ) const {
+ TQDomElement commandElement = doc.createElement("command");
switch ( execType() ) {
case Terminal:
@@ -519,13 +519,13 @@ QDomElement KrAction::dumpCommand( QDomDocument& doc ) const {
return commandElement;
} //KrAction::dumpCommand
-void KrAction::readAvailability( const QDomElement& element ) {
- for ( QDomNode node = element.firstChild(); ! node.isNull(); node = node.nextSibling() ) {
- QDomElement e = node.toElement();
+void KrAction::readAvailability( const TQDomElement& element ) {
+ for ( TQDomNode node = element.firstChild(); ! node.isNull(); node = node.nextSibling() ) {
+ TQDomElement e = node.toElement();
if ( e.isNull() )
continue; // this should skip nodes which are not elements ( i.e. comments, <!-- -->, or text nodes)
- QStringList* showlist = 0;
+ TQStringList* showlist = 0;
if ( e.tagName() == "protocol" )
showlist = &_showonlyProtocol;
@@ -544,8 +544,8 @@ void KrAction::readAvailability( const QDomElement& element ) {
}
if ( showlist ) {
- for ( QDomNode subnode = e.firstChild(); ! subnode.isNull(); subnode = subnode.nextSibling() ) {
- QDomElement subelement = subnode.toElement();
+ for ( TQDomNode subnode = e.firstChild(); ! subnode.isNull(); subnode = subnode.nextSibling() ) {
+ TQDomElement subelement = subnode.toElement();
if ( subelement.tagName() == "show" )
showlist->append( subelement.text() );
} // for
@@ -554,14 +554,14 @@ void KrAction::readAvailability( const QDomElement& element ) {
} // for
} //KrAction::readAvailability
-QDomElement KrAction::dumpAvailability( QDomDocument& doc ) const {
- QDomElement availabilityElement = doc.createElement("command");
+TQDomElement KrAction::dumpAvailability( TQDomDocument& doc ) const {
+ TQDomElement availabilityElement = doc.createElement("command");
# define LIST_ELEMENT( TAGNAME, LIST ) \
{ \
- QDomElement e = doc.createElement( TAGNAME ); \
- for ( QStringList::const_iterator it = LIST.constBegin(); it != LIST.constEnd(); ++it ) { \
- QDomElement show = doc.createElement( "show" ); \
+ TQDomElement e = doc.createElement( TAGNAME ); \
+ for ( TQStringList::const_iterator it = LIST.constBegin(); it != LIST.constEnd(); ++it ) { \
+ TQDomElement show = doc.createElement( "show" ); \
show.appendChild( doc.createTextNode( *it ) ); \
e.appendChild( show ); \
} \
diff --git a/krusader/UserAction/kraction.h b/krusader/UserAction/kraction.h
index 2d8b81b..dec91e1 100644
--- a/krusader/UserAction/kraction.h
+++ b/krusader/UserAction/kraction.h
@@ -19,10 +19,10 @@
#include "kractionbase.h"
class UserActionProperties;
-class QTextEdit;
+class TQTextEdit;
class KActionCollection;
-class QDomElement;
-class QDomDocument;
+class TQDomElement;
+class TQDomDocument;
/**
* This subclass of KAction extends it with an individual executor and a struct UserActionProperties. It is used to integrate useractions into KDE's KAction-System
@@ -30,8 +30,9 @@ class QDomDocument;
*/
class KrAction: public KAction, public KrActionBase {
Q_OBJECT
+ TQ_OBJECT
public:
- KrAction( KActionCollection *parent, const char* name );
+ KrAction( KActionCollection *tqparent, const char* name );
~KrAction();
/**
@@ -41,22 +42,22 @@ class KrAction: public KAction, public KrActionBase {
*/
bool isAvailable( const KURL& currentURL );
- bool xmlRead( const QDomElement& element );
- QDomElement xmlDump( QDomDocument& doc ) const;
+ bool xmlRead( const TQDomElement& element );
+ TQDomElement xmlDump( TQDomDocument& doc ) const;
void setName( const char* ) { /* empty reimplementation to prevent a name-change */ };
- QString category() const { return _category; };
- void setCategory( const QString& category ) { _category = category; };
+ TQString category() const { return _category; };
+ void setCategory( const TQString& category ) { _category = category; };
- QString command() const { return _command; };
- void setCommand( const QString& command ) { _command = command; };
+ TQString command() const { return _command; };
+ void setCommand( const TQString& command ) { _command = command; };
- QString user() const { return _user; };
- void setUser( const QString& user ) { _user = user; };
+ TQString user() const { return _user; };
+ void setUser( const TQString& user ) { _user = user; };
- QString startpath() const { return _startpath; };
- void setStartpath( const QString& startpath ) { _startpath = startpath; };
+ TQString startpath() const { return _startpath; };
+ void setStartpath( const TQString& startpath ) { _startpath = startpath; };
ExecType execType() const { return _execType; };
void setExecType( ExecType execType ) { _execType = execType; };
@@ -67,23 +68,23 @@ class KrAction: public KAction, public KrActionBase {
bool confirmExecution() const { return _confirmExecution; };
void setConfirmExecution(const bool& confirmExecution) { _confirmExecution = confirmExecution; };
- QStringList showonlyProtocol() const { return _showonlyProtocol; };
- void setShowonlyProtocol( const QStringList& showonlyProtocol ) { _showonlyProtocol = showonlyProtocol; };
+ TQStringList showonlyProtocol() const { return _showonlyProtocol; };
+ void setShowonlyProtocol( const TQStringList& showonlyProtocol ) { _showonlyProtocol = showonlyProtocol; };
- QStringList showonlyPath() const { return _showonlyPath; };
- void setShowonlyPath( const QStringList& showonlyPath ) { _showonlyPath = showonlyPath; };
+ TQStringList showonlyPath() const { return _showonlyPath; };
+ void setShowonlyPath( const TQStringList& showonlyPath ) { _showonlyPath = showonlyPath; };
- QStringList showonlyMime() const { return _showonlyMime; };
- void setShowonlyMime( const QStringList& showonlyMime ) { _showonlyMime = showonlyMime; };
+ TQStringList showonlyMime() const { return _showonlyMime; };
+ void setShowonlyMime( const TQStringList& showonlyMime ) { _showonlyMime = showonlyMime; };
- QStringList showonlyFile() const { return _showonlyFile; };
- void setShowonlyFile( const QStringList& showonlyFile ) { _showonlyFile = showonlyFile; };
+ TQStringList showonlyFile() const { return _showonlyFile; };
+ void setShowonlyFile( const TQStringList& showonlyFile ) { _showonlyFile = showonlyFile; };
bool doSubstitution() const {
return true;
}
- QString text() const {
+ TQString text() const {
return KAction::text();
}
@@ -94,35 +95,36 @@ class KrAction: public KAction, public KrActionBase {
private:
- void readCommand( const QDomElement& element );
- QDomElement dumpCommand( QDomDocument& doc ) const;
+ void readCommand( const TQDomElement& element );
+ TQDomElement dumpCommand( TQDomDocument& doc ) const;
- void readAvailability( const QDomElement& element );
- QDomElement dumpAvailability( QDomDocument& doc ) const;
+ void readAvailability( const TQDomElement& element );
+ TQDomElement dumpAvailability( TQDomDocument& doc ) const;
- QString _category;
- QString _command;
- QString _user;
- QString _startpath;
+ TQString _category;
+ TQString _command;
+ TQString _user;
+ TQString _startpath;
ExecType _execType;
bool _acceptURLs;
bool _confirmExecution;
- QStringList _showonlyProtocol;
- QStringList _showonlyPath;
- QStringList _showonlyMime;
- QStringList _showonlyFile;
+ TQStringList _showonlyProtocol;
+ TQStringList _showonlyPath;
+ TQStringList _showonlyMime;
+ TQStringList _showonlyFile;
};
-class QFont;
+class TQFont;
/**
* This displays the output of a process
* @author Shie Erlich, Jonas Bähr
*/
class KrActionProcDlg: public KDialogBase {
Q_OBJECT
+ TQ_OBJECT
public:
- KrActionProcDlg( QString caption, bool enableStderr = false, QWidget *parent = 0 );
+ KrActionProcDlg( TQString caption, bool enableStderr = false, TQWidget *tqparent = 0 );
protected slots:
void addStderr( KProcess *proc, char *buffer, int buflen );
@@ -131,8 +133,8 @@ class KrActionProcDlg: public KDialogBase {
void slotUser1(); ///< This is used to save the buffer to disc
private:
- QTextEdit *_stdout, *_stderr, *_currentTextEdit;
- QFont normalFont, fixedFont;
+ TQTextEdit *_stdout, *_stderr, *_currentTextEdit;
+ TQFont normalFont, fixedFont;
private slots:
void currentTextEditChanged();
};
@@ -142,14 +144,15 @@ class KrActionProcDlg: public KDialogBase {
* @author Shie Erlich, Jonas Bähr
* @todo jonas: call a list of commands separately (I began it but it doesn't work)
*/
-class KrActionProc: public QObject {
+class KrActionProc: public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
KrActionProc( KrActionBase* action );
virtual ~KrActionProc();
- void start( QString cmdLine );
- void start( QStringList cmdLineList );
+ void start( TQString cmdLine );
+ void start( TQStringList cmdLineList );
protected slots:
void kill() { _proc->kill( SIGINT ); }
@@ -158,8 +161,8 @@ class KrActionProc: public QObject {
private:
KrActionBase* _action;
KProcess *_proc;
- QString _stdout;
- QString _stderr;
+ TQString _stdout;
+ TQString _stderr;
KrActionProcDlg *_output;
};
diff --git a/krusader/UserAction/kractionbase.cpp b/krusader/UserAction/kractionbase.cpp
index 233a218..b13166e 100644
--- a/krusader/UserAction/kractionbase.cpp
+++ b/krusader/UserAction/kractionbase.cpp
@@ -13,7 +13,7 @@
#include <kinputdialog.h>
#include <klocale.h>
-#include <qerrormessage.h>
+#include <tqerrormessage.h>
#include "kraction.h"
#include "expander.h"
@@ -26,8 +26,8 @@ KrActionBase::~KrActionBase()
void KrActionBase::exec() {
KrActionProc *proc;
- // replace %% and prepare string
- QStringList commandList;
+ // tqreplace %% and prepare string
+ TQStringList commandList;
if(doSubstitution()) {
Expander exp;
exp.expand(command(),acceptURLs());
@@ -45,7 +45,7 @@ void KrActionBase::exec() {
return;
if ( confirmExecution() ) {
- for ( QStringList::iterator it = commandList.begin(); it != commandList.end(); ++it ) {
+ for ( TQStringList::iterator it = commandList.begin(); it != commandList.end(); ++it ) {
bool exec = true;
*it = KInputDialog::getText(
i18n( "Confirm execution" ),
@@ -68,7 +68,7 @@ void KrActionBase::exec() {
void KrActionBase::handleError(const Error& err)
{
- QErrorMessage::qtHandler()->message(err.what());
+ TQErrorMessage::qtHandler()->message(err.what());
}
KrActionProc* KrActionBase::actionProcFactoryMethod()
diff --git a/krusader/UserAction/kractionbase.h b/krusader/UserAction/kractionbase.h
index 271dfb7..6691a06 100644
--- a/krusader/UserAction/kractionbase.h
+++ b/krusader/UserAction/kractionbase.h
@@ -12,7 +12,7 @@
#ifndef KRACTIONBASE_H
#define KRACTIONBASE_H
-#include <qstring.h>
+#include <tqstring.h>
#include "expander.h"
class KrActionProc;
@@ -44,7 +44,7 @@ public:
*
* @return The command to execute
*/
- virtual QString command() const =0;
+ virtual TQString command() const =0;
/** \brief Execution type of the action
*
* @see #ExecType
@@ -55,19 +55,19 @@ public:
* @return The working directory of the command. May be \a null,
* in which case the command is executed in current directory
*/
- virtual QString startpath() const =0;
+ virtual TQString startpath() const =0;
/** \brief Username under which the command is run
*
* @return The username of the command. May be \a null,
* in which case the command is executed under the current user
*/
- virtual QString user() const=0;
+ virtual TQString user() const=0;
/** \brief Name of the action
*
* @return The name of the action which will be shown to the user
* eg. any string will do
*/
- virtual QString text() const=0;
+ virtual TQString text() const=0;
/** \brief Does the command accept URLs as filenames (like KDE apps)?
*
* @return \a true iff it does
diff --git a/krusader/UserAction/tstring.h b/krusader/UserAction/tstring.h
index 2ddd80c..b479e59 100644
--- a/krusader/UserAction/tstring.h
+++ b/krusader/UserAction/tstring.h
@@ -10,28 +10,28 @@
#ifndef __TAGSTRING__H
#define __TAGSTRING__H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <utility>
#include <cassert>
template <class T>
class TagString_t
{
- QString str;
- typedef QValueList<std::pair<uint,T> > taglist; // may change
+ TQString str;
+ typedef TQValueList<std::pair<uint,T> > taglist; // may change
taglist tags;
public:
- TagString_t(const QString& s) : str(s) {}
+ TagString_t(const TQString& s) : str(s) {}
TagString_t() {}
bool isSimple() const { return tags.empty(); }
- const QString& string() const { return str; }
+ const TQString& string() const { return str; }
unsigned length() const { return str.length(); }
TagString_t mid(unsigned idx,unsigned len=~0) const;
TagString_t left(unsigned) const;
TagString_t right(unsigned) const;
- void insert(uint,const QString& s);
- int find ( QChar c, int index = 0, bool cs = TRUE ) const {
- return str.find(c,index,cs);
+ void insert(uint,const TQString& s);
+ int tqfind ( TQChar c, int index = 0, bool cs = TRUE ) const {
+ return str.tqfind(c,index,cs);
}
TagString_t& operator+=(const TagString_t& s);
typename taglist::const_iterator tagsBegin() const { return tags.begin(); }
@@ -40,7 +40,7 @@ public:
typename taglist::iterator tagsEnd() { return tags.end(); }
void insertTag(uint pos,const T& t);
void eraseTag(const typename taglist::iterator& which) { tags.erase(which); }
-/* void insert(uint idx,const QString&);
+/* void insert(uint idx,const TQString&);
void insert(uint idx,const char*);
void addTag(uint);
void remove(uint start,uint len);*/
@@ -82,7 +82,7 @@ TagString_t<T> TagString_t<T>::right(unsigned len) const
}
template <class T>
-void TagString_t<T>::insert(uint idx,const QString& s)
+void TagString_t<T>::insert(uint idx,const TQString& s)
{
str.insert(idx,s);
const unsigned disp=s.length();
diff --git a/krusader/UserAction/useraction.cpp b/krusader/UserAction/useraction.cpp
index f1a9a4b..5bf59fa 100644
--- a/krusader/UserAction/useraction.cpp
+++ b/krusader/UserAction/useraction.cpp
@@ -16,8 +16,8 @@
#include <kstandarddirs.h>
#include <kmessagebox.h>
-#include <qstring.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdom.h>
#include "useraction.h"
#include "kraction.h"
@@ -56,18 +56,18 @@ void UserAction::populateMenu( KPopupMenu* menu ) {
action->plug( menu );
}
-QStringList UserAction::allCategories() {
- QStringList actionCategories;
+TQStringList UserAction::allCategories() {
+ TQStringList actionCategories;
for ( KrAction* action = _actions.first(); action; action = _actions.next() )
- if ( actionCategories.find( action->category() ) == actionCategories.end() )
+ if ( actionCategories.tqfind( action->category() ) == actionCategories.end() )
actionCategories.append( action->category() );
return actionCategories;
}
-QStringList UserAction::allNames() {
- QStringList actionNames;
+TQStringList UserAction::allNames() {
+ TQStringList actionNames;
for ( KrAction* action = _actions.first(); action; action = _actions.next() )
actionNames.append( action->name() );
@@ -76,7 +76,7 @@ QStringList UserAction::allNames() {
}
void UserAction::readAllFiles() {
- QString filename = locate( "data", ACTION_XML ); // locate returns the local file if it exists, else the global one is retrieved.
+ TQString filename = locate( "data", ACTION_XML ); // locate returns the local file if it exists, else the global one is retrieved.
if ( ! filename.isEmpty() )
readFromFile( locate( "data", ACTION_XML ), renameDoublicated );
@@ -85,9 +85,9 @@ void UserAction::readAllFiles() {
readFromFile( locate( "data", ACTION_XML_EXAMPLES ), ignoreDoublicated ); // ignore samples which are already in the normal file
}
-void UserAction::readFromFile( const QString& filename, ReadMode mode, KrActionList* list ) {
- QDomDocument* doc = new QDomDocument( ACTION_DOCTYPE );
- QFile file( filename );
+void UserAction::readFromFile( const TQString& filename, ReadMode mode, KrActionList* list ) {
+ TQDomDocument* doc = new TQDomDocument( ACTION_DOCTYPE );
+ TQFile file( filename );
if( file.open( IO_ReadOnly ) ) {
//kdDebug() << "UserAction::readFromFile - " << filename << "could be opened" << endl;
if( ! doc->setContent( &file ) ) {
@@ -97,18 +97,18 @@ void UserAction::readFromFile( const QString& filename, ReadMode mode, KrActionL
file.close();
delete doc; doc = 0;
KMessageBox::error( MAIN_VIEW,
- i18n( "The file %1 does not contain valid UserActions.\n" ).arg( filename ), // text
+ i18n( "The file %1 does not contain valid UserActions.\n" ).tqarg( filename ), // text
i18n("UserActions - can't read from file!") // caption
);
}
file.close();
if ( doc ) {
- QDomElement root = doc->documentElement();
+ TQDomElement root = doc->documentElement();
// check if the file got the right root-element (ACTION_ROOT) - this finds out if the xml-file read to the DOM is realy an krusader useraction-file
if( root.tagName() != ACTION_ROOT ) {
KMessageBox::error( MAIN_VIEW,
- i18n( "The actionfile's root-element isn't called "ACTION_ROOT", using %1").arg( filename ),
+ i18n( "The actionfile's root-element isn't called "ACTION_ROOT", using %1").tqarg( filename ),
i18n( "UserActions - can't read from file!" )
);
delete doc; doc = 0;
@@ -120,21 +120,21 @@ void UserAction::readFromFile( const QString& filename, ReadMode mode, KrActionL
} // if ( file.open( IO_ReadOnly ) )
else {
KMessageBox::error( MAIN_VIEW,
- i18n( "Unable to open actionfile %1").arg( filename ),
+ i18n( "Unable to open actionfile %1").tqarg( filename ),
i18n( "UserActions - can't read from file!" )
);
}
}
-void UserAction::readFromElement( const QDomElement& element, ReadMode mode, KrActionList* list ) {
- for ( QDomNode node = element.firstChild(); ! node.isNull(); node = node.nextSibling() ) {
- QDomElement e = node.toElement();
+void UserAction::readFromElement( const TQDomElement& element, ReadMode mode, KrActionList* list ) {
+ for ( TQDomNode node = element.firstChild(); ! node.isNull(); node = node.nextSibling() ) {
+ TQDomElement e = node.toElement();
if ( e.isNull() )
continue; // this should skip nodes which are not elements ( i.e. comments, <!-- -->, or text nodes)
if ( e.tagName() == "action" ) {
- QString name = e.attribute( "name" );
+ TQString name = e.attribute( "name" );
if ( name.isEmpty() ) {
KMessageBox::error( MAIN_VIEW,
i18n( "Action without name detected. This action will not be imported!\nThis is an error in the file, you may want to correct it." ),
@@ -146,11 +146,11 @@ void UserAction::readFromElement( const QDomElement& element, ReadMode mode, KrA
if ( mode == ignoreDoublicated && krApp->actionCollection()->action( name.latin1() ) )
continue;
- QString basename = name + "_%1";
+ TQString basename = name + "_%1";
int i = 0;
// appent a counter till the name is unique... (this checks every action, not only useractions)
while ( krApp->actionCollection()->action( name.latin1() ) )
- name = basename.arg( ++i );
+ name = basename.tqarg( ++i );
KrAction* act = new KrAction( krApp->actionCollection(), name.latin1() );
if ( act->xmlRead( e ) ) {
@@ -164,8 +164,8 @@ void UserAction::readFromElement( const QDomElement& element, ReadMode mode, KrA
} // for
}
-QDomDocument UserAction::createEmptyDoc() {
- QDomDocument doc = QDomDocument( ACTION_DOCTYPE );
+TQDomDocument UserAction::createEmptyDoc() {
+ TQDomDocument doc = TQDomDocument( ACTION_DOCTYPE );
// adding: <?xml version="1.0" encoding="UTF-8" ?>
doc.appendChild( doc.createProcessingInstruction( "xml", ACTION_PROCESSINSTR ) );
//adding root-element
@@ -174,30 +174,30 @@ QDomDocument UserAction::createEmptyDoc() {
}
bool UserAction::writeActionFile() {
- QString filename = locateLocal( "data", ACTION_XML );
+ TQString filename = locateLocal( "data", ACTION_XML );
- QDomDocument doc = createEmptyDoc();
- QDomElement root = doc.documentElement();
+ TQDomDocument doc = createEmptyDoc();
+ TQDomElement root = doc.documentElement();
for ( KrAction* action = _actions.first(); action; action = _actions.next() )
root.appendChild( action->xmlDump( doc ) );
return writeToFile( doc, filename );
}
-bool UserAction::writeToFile( const QDomDocument& doc, const QString& filename ) {
- QFile file( filename );
+bool UserAction::writeToFile( const TQDomDocument& doc, const TQString& filename ) {
+ TQFile file( filename );
if( ! file.open( IO_WriteOnly ) )
return false;
/* // This is not needed, because each DomDocument created with UserAction::createEmptyDoc already contains the processinstruction
if ( ! doc.firstChild().isProcessingInstruction() ) {
// adding: <?xml version="1.0" encoding="UTF-8" ?> if not already present
- QDomProcessingInstruction instr = doc.createProcessingInstruction( "xml", ACTION_PROCESSINSTR );
+ TQDomProcessingInstruction instr = doc.createProcessingInstruction( "xml", ACTION_PROCESSINSTR );
doc.insertBefore( instr, doc.firstChild() );
}
*/
- QTextStream ts( &file );
+ TQTextStream ts( &file );
ts.setEncoding(ts.UnicodeUTF8);
ts << doc.toString();
diff --git a/krusader/UserAction/useraction.h b/krusader/UserAction/useraction.h
index cfdeee8..8cd5691 100644
--- a/krusader/UserAction/useraction.h
+++ b/krusader/UserAction/useraction.h
@@ -13,12 +13,12 @@
#ifndef USERACTION_H
#define USERACTION_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
-class QDomDocument;
-class QDomElement;
-class QString;
-class QStringList;
+class TQDomDocument;
+class TQDomElement;
+class TQString;
+class TQStringList;
class KrAction;
class KURL;
class KPopupMenu;
@@ -42,7 +42,7 @@ class KPopupMenu;
class UserAction {
public:
- typedef QPtrList<KrAction> KrActionList;
+ typedef TQPtrList<KrAction> KrActionList;
enum ReadMode { renameDoublicated, ignoreDoublicated };
@@ -91,8 +91,8 @@ public:
*/
void populateMenu(KPopupMenu* menu);
- QStringList allCategories();
- QStringList allNames();
+ TQStringList allCategories();
+ TQStringList allNames();
/**
* reads all predefined useractionfiles.
@@ -106,26 +106,26 @@ public:
* Reads UserActions from a xml-file.
* @param list If provided, all new actions will also be added to this list
*/
- void readFromFile( const QString& filename, ReadMode mode = renameDoublicated, KrActionList* list = 0 );
+ void readFromFile( const TQString& filename, ReadMode mode = renameDoublicated, KrActionList* list = 0 );
/**
* Reads UserActions from a XML-Element.
* @param element a container with action-elements
* @param list If provided, all new actions will also be added to this list
*/
- void readFromElement( const QDomElement& element, ReadMode mode = renameDoublicated, KrActionList* list = 0 );
+ void readFromElement( const TQDomElement& element, ReadMode mode = renameDoublicated, KrActionList* list = 0 );
/**
- * creates an empty QDomDocument for the UserActions
+ * creates an empty TQDomDocument for the UserActions
*/
- static QDomDocument createEmptyDoc();
+ static TQDomDocument createEmptyDoc();
/**
- * Writes a QDomDocument to an UTF-8 encodes text-file
+ * Writes a TQDomDocument to an UTF-8 encodes text-file
* @param doc the XML-Tree
* @param filename the filename where to save
* @return true on success, false otherwise
* @warning any existing file will get overwritten!
*/
- static bool writeToFile( const QDomDocument& doc, const QString& filename );
+ static bool writeToFile( const TQDomDocument& doc, const TQString& filename );
private:
KrActionList _actions;
diff --git a/krusader/UserAction/useractionpopupmenu.cpp b/krusader/UserAction/useractionpopupmenu.cpp
index 0b70647..4339e78 100644
--- a/krusader/UserAction/useractionpopupmenu.cpp
+++ b/krusader/UserAction/useractionpopupmenu.cpp
@@ -18,7 +18,7 @@
#include "useraction.h"
#include "kraction.h"
-UserActionPopupMenu::UserActionPopupMenu( KURL currentURL, QWidget *parent ) : KPopupMenu( parent, "useraction popupmenu" ) {
+UserActionPopupMenu::UserActionPopupMenu( KURL currentURL, TQWidget *tqparent ) : KPopupMenu( tqparent, "useraction popupmenu" ) {
UserAction::KrActionList list = krUserAction->actionList();
for ( KrAction* action = list.first(); action; action = list.next() )
if ( action->isAvailable( currentURL ) )
diff --git a/krusader/UserAction/useractionpopupmenu.h b/krusader/UserAction/useractionpopupmenu.h
index 8bf36ba..4453dfd 100644
--- a/krusader/UserAction/useractionpopupmenu.h
+++ b/krusader/UserAction/useractionpopupmenu.h
@@ -19,7 +19,7 @@ class KURL;
class UserActionPopupMenu : public KPopupMenu {
public:
- UserActionPopupMenu( KURL currentURL, QWidget *parent = 0 );
+ UserActionPopupMenu( KURL currentURL, TQWidget *tqparent = 0 );
};
#endif // ifndef USERACTIONPOPUPMENU_H
diff --git a/krusader/UserMenu/usermenu.cpp b/krusader/UserMenu/usermenu.cpp
index ee403f0..8d1f3bf 100644
--- a/krusader/UserMenu/usermenu.cpp
+++ b/krusader/UserMenu/usermenu.cpp
@@ -29,7 +29,7 @@ void UserMenu::exec() {
_popup->run();
}
-UserMenu::UserMenu( QWidget * parent, const char * name ) : QWidget( parent, name ) {
+UserMenu::UserMenu( TQWidget * tqparent, const char * name ) : TQWidget( tqparent, name ) {
_popup = new UserMenuGui(this);
}
@@ -41,7 +41,7 @@ void UserMenu::update() {
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
-UserMenuGui::UserMenuGui( UserMenu *, QWidget * parent ) : KPopupMenu( parent ) {
+UserMenuGui::UserMenuGui( UserMenu *, TQWidget * tqparent ) : KPopupMenu( tqparent ) {
createMenu();
}
diff --git a/krusader/UserMenu/usermenu.h b/krusader/UserMenu/usermenu.h
index f69e0a9..29af08e 100644
--- a/krusader/UserMenu/usermenu.h
+++ b/krusader/UserMenu/usermenu.h
@@ -20,12 +20,12 @@ email :
#include <kpopupmenu.h>
-class QWidget;
+class TQWidget;
class UserMenu;
class UserMenuGui: public KPopupMenu {
public:
- UserMenuGui( UserMenu* menu, QWidget *parent = 0 );
+ UserMenuGui( UserMenu* menu, TQWidget *tqparent = 0 );
void run();
void createMenu();
@@ -33,9 +33,9 @@ class UserMenuGui: public KPopupMenu {
void readEntries();
};
-class UserMenu : public QWidget {
+class UserMenu : public TQWidget {
public:
- UserMenu( QWidget *parent = 0, const char *name = 0 );
+ UserMenu( TQWidget *tqparent = 0, const char *name = 0 );
void exec();
void update();
diff --git a/krusader/VFS/arc_vfs.cpp b/krusader/VFS/arc_vfs.cpp
index 97e32df..80a2df4 100755
--- a/krusader/VFS/arc_vfs.cpp
+++ b/krusader/VFS/arc_vfs.cpp
@@ -34,16 +34,16 @@
#include <dirent.h>
#include <time.h>
// QT includes
-#include <qregexp.h>
-#include <qdir.h>
-#include <qdatetime.h>
-#include <qfileinfo.h>
+#include <tqregexp.h>
+#include <tqdir.h>
+#include <tqdatetime.h>
+#include <tqfileinfo.h>
// KDE includes
#include <kmessagebox.h>
#include <klocale.h>
#include <kprocess.h>
#include <kio/jobclasses.h>
-#include <qprogressdialog.h>
+#include <tqprogressdialog.h>
#include <kglobalsettings.h>
#include <kmimetype.h>
#include <kcursor.h>
@@ -60,7 +60,7 @@
#define MAX_FILES 500
//constructor
-arc_vfs::arc_vfs(QString origin,QString type,QObject* panel,bool write):
+arc_vfs::arc_vfs(TQString origin,TQString type,TQObject* panel,bool write):
vfs(panel),arcFile(origin),changed(false),prefix(""),ignoreLines(0){
if ( type == "tarz" ) type = "-tgz";
@@ -81,7 +81,7 @@ arc_vfs::arc_vfs(QString origin,QString type,QObject* panel,bool write):
return;
}
- QString password = QString::null;
+ TQString password = TQString();
krConfig->setGroup("Archives");
// fill the command options
if( type == "gzip" ){
@@ -129,7 +129,7 @@ arc_vfs::arc_vfs(QString origin,QString type,QObject* panel,bool write):
password = KRarcHandler::getPassword(arcFile,type);
cmd = KrServices::fullPathName( "unzip" );
listCmd = "-ZTs ";
- QString zipcmd = KrServices::fullPathName( "zip" );
+ TQString zipcmd = KrServices::fullPathName( "zip" );
delCmd = zipcmd+" -d";
addCmd = zipcmd+" -ry";
getCmd = " -o";
@@ -143,8 +143,8 @@ arc_vfs::arc_vfs(QString origin,QString type,QObject* panel,bool write):
}
// "-rpm" is used only to list the rpm - to extract files use "+rpm"
if(type == "-rpm"){
- //rpm can't handle files with " " in them so replace " " with "\ "
- arcFile.replace(QRegExp(" "),"\\ ");
+ //rpm can't handle files with " " in them so tqreplace " " with "\ "
+ arcFile.tqreplace(TQRegExp(" "),"\\ ");
cmd = KrServices::fullPathName( "rpm" );
listCmd = " --dump -lpq ";
@@ -173,7 +173,7 @@ arc_vfs::arc_vfs(QString origin,QString type,QObject* panel,bool write):
cmd = KrServices::fullPathName( "unrar" );
listCmd = " -c- v ";
delCmd = "";
- addCmd = (doRar ? QString(KrServices::fullPathName( "rar" ) + " -r a ") : QString("")) ;
+ addCmd = (doRar ? TQString(KrServices::fullPathName( "rar" ) + " -r a ") : TQString("")) ;
getCmd = " x -y ";
ignoreLines = 8;
isWritable = (doRar && isWritable );
@@ -185,11 +185,11 @@ arc_vfs::arc_vfs(QString origin,QString type,QObject* panel,bool write):
}
// return the working dir
-QString arc_vfs::vfs_workingDir(){
+TQString arc_vfs::vfs_workingDir(){
// get the path inside the archive
- QString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
+ TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1);
if(path.left(1) != "/") path = "/"+path;
- QDir().mkdir(tmpDir+path);
+ TQDir().mkdir(tmpDir+path);
return tmpDir+path;
}
@@ -215,7 +215,7 @@ bool arc_vfs::getDirs(){
proc.start(KProcess::Block);
if( !proc.normalExit() || !proc.exitStatus() == 0 ){
if (!quietMode) KMessageBox::error(krApp, i18n("<qt>Can't read <b>%1</b>. Archive "
- "might be corrupted!</qt>").arg(arcFile.mid(arcFile.findRev('/')+1)));
+ "might be corrupted!</qt>").tqarg(arcFile.mid(arcFile.tqfindRev('/')+1)));
error = true;
return false;
}
@@ -229,24 +229,24 @@ bool arc_vfs::getDirs(){
dirList.append(tempdir);
// parse the temp file
- QFile temp(tmpDir+"/tempfilelist");
+ TQFile temp(tmpDir+"/tempfilelist");
temp.open(IO_ReadOnly);
char buf[1000];
- QString line;
+ TQString line;
if(vfs_type == "gzip" || vfs_type == "-zip" )
temp.readLine(line,10000); // skip the first line - it's garbage
if( vfs_type == "-rar" ){
while(temp.readLine(line,10000) != -1)
- if ( line.contains("----------") ) break;
+ if ( line.tqcontains("----------") ) break;
}
while(temp.readLine(buf,1000) != -1){
- line = QString::fromLocal8Bit(buf);
- if ( line.contains("----------") ) break;
+ line = TQString::fromLocal8Bit(buf);
+ if ( line.tqcontains("----------") ) break;
parseLine(line.stripWhiteSpace(),&temp);
}
temp.close();
- QDir().remove(tmpDir+"/tempfilelist");
+ TQDir().remove(tmpDir+"/tempfilelist");
}
else { // bzip2
// clear the dir list
@@ -264,18 +264,18 @@ bool arc_vfs::getDirs(){
// copy a file to the vfs (physical)
-void arc_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir, PreserveMode /*pmode*/ ){
+void arc_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir, PreserveMode /*pmode*/ ){
if ( addCmd.isEmpty() ) return;
// get the path inside the archive
- QString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
+ TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1);
path = path+"/";
if(dir != "" ) dir = "/"+dir;
if(path.left(1) != "/") path = "/"+path;
// make sure the destination exist
- for( int i=0; i >= 0 ; i= QString(tmpDir+path+dir).find('/',i+1) ){
- QDir().mkdir(QString(tmpDir+path+dir).left(i));
+ for( int i=0; i >= 0 ; i= TQString(tmpDir+path+dir).tqfind('/',i+1) ){
+ TQDir().mkdir(TQString(tmpDir+path+dir).left(i));
}
changed = true; //rescan the archive
@@ -284,14 +284,14 @@ void arc_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObj
dest.setPath(tmpDir+path+dir);
KIO::Job* job = new KIO::CopyJob(*fileUrls,dest,mode,false,true);
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(vfs_refresh(KIO::Job*)) );
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*)) );
if(mode == KIO::CopyJob::Move) // notify the other panel
- connect(job,SIGNAL(result(KIO::Job*)),toNotify,SLOT(vfs_refresh(KIO::Job*)) );
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),toNotify,TQT_SLOT(vfs_refresh(KIO::Job*)) );
}
// remove a file from the vfs (physical)
-void arc_vfs::vfs_delFiles(QStringList *fileNames){
+void arc_vfs::vfs_delFiles(TQStringList *fileNames){
if ( delCmd.isEmpty() ) return;
// if we move to trash - just extract files and move them to trash -
// the repack() will delete them for us
@@ -301,27 +301,27 @@ void arc_vfs::vfs_delFiles(QStringList *fileNames){
changed = true;
KIO::Job *job = new KIO::CopyJob(*filesUrls,KGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true );
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(vfs_refresh(KIO::Job*)));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*)));
}
// else we have to delete the files from both the archive and the temp dir
else {
// change dir to the temp dir
- QString save = getcwd(0,0);
+ TQString save = getcwd(0,0);
chdir(tmpDir.local8Bit());
- QStringList files;
+ TQStringList files;
KIO::filesize_t totalSizeVal = 0;
unsigned long totalFilesVal = 0;
// names -> urls
- for(QStringList::Iterator name = fileNames->begin(); name != fileNames->end(); ++name )
+ for(TQStringList::Iterator name = fileNames->begin(); name != fileNames->end(); ++name )
processName(*name,&files,&totalSizeVal,&totalFilesVal);
KShellProcess proc1 , proc2;
krApp->startWaiting(i18n("Deleting Files..."),files.count()+ignoreLines);
- connect(&proc1,SIGNAL(receivedStdout(KProcess*,char*,int)),
- krApp, SLOT(incProgress(KProcess*,char*,int)) );
+ connect(&proc1,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ krApp, TQT_SLOT(incProgress(KProcess*,char*,int)) );
proc1 << delCmd << "\""+arcFile+"\"";
proc2 << "rm -rf";
@@ -332,7 +332,7 @@ void arc_vfs::vfs_delFiles(QStringList *fileNames){
if ( i%MAX_FILES==0 || i==files.count() ){
proc1.start(KProcess::NotifyOnExit,KProcess::AllOutput);
proc2.start();
- while( proc1.isRunning() || proc2.isRunning() ) qApp->processEvents(); // busy wait - need to find something better...
+ while( proc1.isRunning() || proc2.isRunning() ) tqApp->processEvents(); // busy wait - need to find something better...
proc1.clearArguments() ; proc2.clearArguments();
proc1 << delCmd << "\""+arcFile+"\"";
proc2 << "rm -rf";
@@ -347,47 +347,47 @@ void arc_vfs::vfs_delFiles(QStringList *fileNames){
}
// return a path to the file
-QString arc_vfs::vfs_getFile(QString name){
+TQString arc_vfs::vfs_getFile(TQString name){
// get the current file path
- QString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
+ TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1);
if(path.left(1)=="/") path.remove(0,1);
if(path != "") path = path+"/";
- QStringList temp(name);
+ TQStringList temp(name);
vfs_getFiles(&temp);
return tmpDir+"/"+path+name;
}
-KURL::List* arc_vfs::vfs_getFiles(QStringList* names){
+KURL::List* arc_vfs::vfs_getFiles(TQStringList* names){
KURL url;
KURL::List* urls = new KURL::List();
// get the current file path
- QString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
+ TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1);
if(path.left(1)=="/") path.remove(0,1);
if(path != "") path = path+"/";
// change dir to the temp dir
- QString save = getcwd(0,0);
+ TQString save = getcwd(0,0);
chdir(tmpDir.local8Bit());
// names -> urls
- QStringList files;
+ TQStringList files;
KIO::filesize_t totalSize = 0;
unsigned long totalFiles = 0;
- for(QStringList::Iterator name = names->begin(); name != names->end(); ++name ){
+ for(TQStringList::Iterator name = names->begin(); name != names->end(); ++name ){
processName(*name,&files,&totalSize,&totalFiles);
url.setPath(tmpDir+"/"+path+(*name));
urls->append(url);
}
// check the urls for unpacked files and directories
- for(QStringList::Iterator file = files.begin(); file != files.end(); ++file ){
+ for(TQStringList::Iterator file = files.begin(); file != files.end(); ++file ){
if ( (*file).right(1)=="/" ){
- QDir(tmpDir).mkdir(*file);
+ TQDir(tmpDir).mkdir(*file);
if( vfs_type == "-rar" ) file = files.remove(file--);
}
// don't unpack the same file twice
- else if( extFiles.contains(*file) ){
+ else if( extFiles.tqcontains(*file) ){
file = files.remove(file--);
}
}
@@ -395,8 +395,8 @@ KURL::List* arc_vfs::vfs_getFiles(QStringList* names){
if ( files.count() > 0 ){
krApp->startWaiting(i18n("Unpacking Files"),files.count()+ignoreLines);
KShellProcess proc;
- connect(&proc,SIGNAL(receivedStdout(KProcess*,char*,int)),
- krApp, SLOT(incProgress(KProcess*,char*,int)) );
+ connect(&proc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ krApp, TQT_SLOT(incProgress(KProcess*,char*,int)) );
proc << cmd << getCmd << "\""+arcFile+"\"";
if( vfs_type == "gzip" || vfs_type == "zip2" ) proc << ">";
@@ -404,7 +404,7 @@ KURL::List* arc_vfs::vfs_getFiles(QStringList* names){
proc << (prefix+*files.at(i++));
if ( i%MAX_FILES==0 || i==files.count() ){
proc.start(KProcess::NotifyOnExit,KProcess::AllOutput);
- while( proc.isRunning() ) qApp->processEvents();
+ while( proc.isRunning() ) tqApp->processEvents();
proc.clearArguments();
proc << cmd << getCmd << "\""+arcFile+"\"";
}
@@ -419,35 +419,35 @@ KURL::List* arc_vfs::vfs_getFiles(QStringList* names){
}
// make dir
-void arc_vfs::vfs_mkdir(QString name){
- QString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
+void arc_vfs::vfs_mkdir(TQString name){
+ TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1);
if(path.left(1)=="/") path.remove(0,1);
if(path != "") path = path+"/";
- QDir(tmpDir).mkdir(path+name);
+ TQDir(tmpDir).mkdir(path+name);
changed = true; //rescan the archive
vfs_refresh(vfs_origin);
}
// rename file
-void arc_vfs::vfs_rename(QString fileName,QString newName){
+void arc_vfs::vfs_rename(TQString fileName,TQString newName){
KURL::List temp;
temp.append(vfs_getFile(fileName));
- QString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
+ TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1);
if(path.left(1)=="/") path.remove(0,1);
if(path != "") path = path+"/";
- QDir(tmpDir).mkdir(path);
+ TQDir(tmpDir).mkdir(path);
changed = true; //rescan the archive
KURL dest;
dest.setPath(tmpDir+path+"/"+newName);
KIO::Job* job = new KIO::CopyJob(temp,dest,KIO::CopyJob::Move,false,false);
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(vfs_refresh(KIO::Job*)) );
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*)) );
}
-bool arc_vfs::vfs_refresh(QString origin){
+bool arc_vfs::vfs_refresh(TQString origin){
if ( error ) return false;
if ( changed || origin == vfs_origin ){
@@ -461,7 +461,7 @@ bool arc_vfs::vfs_refresh(QString origin){
vfs_origin = origin;
// get the directory...
- QString path = origin.right((origin.length()-origin.findRev('\\'))-1);
+ TQString path = origin.right((origin.length()-origin.tqfindRev('\\'))-1);
if(path.left(1) =="/") path.remove(0,1);
vfs_filesP = findDir(path);
@@ -471,15 +471,15 @@ bool arc_vfs::vfs_refresh(QString origin){
}
// service functions
-QString arc_vfs::nextWord(QString &s,char d) {
+TQString arc_vfs::nextWord(TQString &s,char d) {
s=s.stripWhiteSpace();
- int j=s.find(d,0);
- QString temp=s.left(j); // find the leftmost word.
+ int j=s.tqfind(d,0);
+ TQString temp=s.left(j); // find the leftmost word.
s.remove(0,j);
return temp;
}
-void arc_vfs::getFilesToPack(QStringList* filesToPack,QString dir_name){
+void arc_vfs::getFilesToPack(TQStringList* filesToPack,TQString dir_name){
bool newDir = false;
vfileDict *vfs_filesP_backup = vfs_filesP; // save vfs_filesP
@@ -492,7 +492,7 @@ void arc_vfs::getFilesToPack(QStringList* filesToPack,QString dir_name){
if(!dir) return ;
register struct dirent* dirEnt;
- QString name;
+ TQString name;
KDE_struct_stat stat_p;
while( (dirEnt=readdir(dir)) != NULL ){
name = dirEnt->d_name;
@@ -503,7 +503,7 @@ void arc_vfs::getFilesToPack(QStringList* filesToPack,QString dir_name){
if( S_ISDIR(stat_p.st_mode) ){ // recurse on all sub dirs
if( !findDir(dir_name+name) ){
// add to the list only new && empty dirs
- if( newDir && QDir(dir_name+name).entryList(QDir::All | QDir::AccessMask).count() <= 2 )
+ if( newDir && TQDir(dir_name+name).entryList(TQDir::All | TQDir::AccessMask).count() <= 2 )
filesToPack->append( dir_name+name);
}
getFilesToPack(filesToPack,dir_name+name);
@@ -511,11 +511,11 @@ void arc_vfs::getFilesToPack(QStringList* filesToPack,QString dir_name){
}
// if the file don't exist add it to the archive and to the extFiles
- if( newDir || !extFiles.contains( dir_name+name ) ){
+ if( newDir || !extFiles.tqcontains( dir_name+name ) ){
filesToPack->append( dir_name+name );
extFiles.append( temp );
} // else if the file exist but was modified - repack it;
- else if( !extFiles.contains( temp ) ){
+ else if( !extFiles.tqcontains( temp ) ){
filesToPack->append( dir_name+name );
extFiles.remove( dir_name+name );
extFiles.append( temp );
@@ -524,9 +524,9 @@ void arc_vfs::getFilesToPack(QStringList* filesToPack,QString dir_name){
vfs_filesP = vfs_filesP_backup; // restore vfs_filesP
}
-void arc_vfs::getFilesToDelete(QStringList* filesToDelete,QString){
+void arc_vfs::getFilesToDelete(TQStringList* filesToDelete,TQString){
// sync the extFiles - and find out which files were deleted
- QString file;
+ TQString file;
for(unsigned int i=0 ; i<extFiles.count(); ){
file = tmpDir+"/"+(*extFiles.at(i)).url;
if( !KRpermHandler::fileExist(file) ){
@@ -537,7 +537,7 @@ void arc_vfs::getFilesToDelete(QStringList* filesToDelete,QString){
}
}
-void arc_vfs::getExtFiles(QString dir_name){
+void arc_vfs::getExtFiles(TQString dir_name){
register DIR* dir = opendir(tmpDir.local8Bit()+"/"+dir_name.local8Bit());
if(!dir){
kdWarning() << "faild to opendir(): " << tmpDir.local8Bit()+"/"+dir_name.local8Bit() << endl;
@@ -547,7 +547,7 @@ void arc_vfs::getExtFiles(QString dir_name){
if( dir_name != "") dir_name = dir_name+"/";
register struct dirent* dirEnt;
- QString name;
+ TQString name;
KDE_struct_stat stat_p;
while( (dirEnt=readdir(dir)) != NULL ){
name = dirEnt->d_name;
@@ -560,32 +560,32 @@ void arc_vfs::getExtFiles(QString dir_name){
}
// if the file is not in extFiles - it is newly extracted.
// note: getFilesToPack() updates time + size !
- else if( !extFiles.contains( dir_name+name ) ){
+ else if( !extFiles.tqcontains( dir_name+name ) ){
extFiles.append( temp );
}
}
}
void arc_vfs::repack(){
- QString save = getcwd(0,0);
+ TQString save = getcwd(0,0);
chdir(tmpDir.local8Bit());
// delete from the archive files that were unpacked and deleted
if( vfs_isWritable() ){
- QStringList filesToDelete;
+ TQStringList filesToDelete;
getFilesToDelete(&filesToDelete);
if( !filesToDelete.isEmpty() ){
KShellProcess delProc;
krApp->startWaiting(i18n("Deleting Files..."),filesToDelete.count()+ignoreLines);
- connect(&delProc,SIGNAL(receivedStdout(KProcess*,char*,int)),
- krApp, SLOT(incProgress(KProcess*,char*,int)) );
+ connect(&delProc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ krApp, TQT_SLOT(incProgress(KProcess*,char*,int)) );
delProc << delCmd << "\""+arcFile+"\"";
for( unsigned int i=0 ; i < filesToDelete.count() ;){
delProc << (*filesToDelete.at(i++));
if( i%MAX_FILES==0 || i==filesToDelete.count() ){
delProc.start(KProcess::NotifyOnExit,KProcess::AllOutput);
- while( delProc.isRunning() ) qApp->processEvents();
+ while( delProc.isRunning() ) tqApp->processEvents();
delProc.clearArguments();
delProc << delCmd << "\""+arcFile+"\"";
}
@@ -596,18 +596,18 @@ void arc_vfs::repack(){
// finaly repack tmpDir
if( vfs_isWritable() || vfs_type=="gzip" || vfs_type=="zip2" ){
- QStringList filesToPack;
+ TQStringList filesToPack;
getFilesToPack(&filesToPack);
if( !filesToPack.isEmpty() ){
KShellProcess addProc;
krApp->startWaiting(i18n("Repacking..."),filesToPack.count()+ignoreLines);
- connect(&addProc,SIGNAL(receivedStdout(KProcess*,char*,int)),
- krApp, SLOT(incProgress(KProcess*,char*,int)) );
+ connect(&addProc,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ krApp, TQT_SLOT(incProgress(KProcess*,char*,int)) );
if( vfs_type=="gzip" || vfs_type=="zip2" ){
addProc << addCmd << *filesToPack.at(0)<< ">" << "\""+arcFile+"\"";
addProc.start(KProcess::NotifyOnExit);
- while( addProc.isRunning() ) qApp->processEvents();
+ while( addProc.isRunning() ) tqApp->processEvents();
}
else {
addProc << addCmd << "\""+arcFile+"\"";
@@ -615,7 +615,7 @@ void arc_vfs::repack(){
addProc << "\""+prefix+(*filesToPack.at(i++))+"\"";
if( i%MAX_FILES==0 || i==filesToPack.count() ){
addProc.start(KProcess::NotifyOnExit,KProcess::AllOutput);
- while( addProc.isRunning() ) qApp->processEvents(); // busy wait - need to find something better...
+ while( addProc.isRunning() ) tqApp->processEvents(); // busy wait - need to find something better...
addProc.clearArguments();
addProc << addCmd << "\""+arcFile+"\"";
}
@@ -627,40 +627,40 @@ void arc_vfs::repack(){
chdir(save.local8Bit());
}
-vfileDict* arc_vfs::findDir(QString name){
+vfileDict* arc_vfs::findDir(TQString name){
for(arc_dir* temp = dirList.first();temp != 0 ; temp = dirList.next()){
if(temp->name == name) return &(temp->entries);
}
return 0;
}
-arc_vfs::arc_dir* arc_vfs::findArcDir(QString name){
+arc_vfs::arc_dir* arc_vfs::findArcDir(TQString name){
for(arc_dir* temp = dirList.first();temp != 0 ; temp = dirList.next()){
if(temp->name == name) return temp;
}
return 0;
}
-QString arc_vfs::changeDir(QString name){
+TQString arc_vfs::changeDir(TQString name){
if(name.left(2) == "./") {
prefix = "./";
name.remove(0,2);
}
- if(!name.contains('/')){
+ if(!name.tqcontains('/')){
vfs_filesP = findDir("");
return name;
}
// seperate the path from the name
- QString path = name.left(name.findRev('/'));
- name = name.mid(name.findRev('/')+1);
+ TQString path = name.left(name.tqfindRev('/'));
+ name = name.mid(name.tqfindRev('/')+1);
// see if the path exists
if ((vfs_filesP=findDir(path)) == 0){
//create a new dir entry
- QString Pname = path.mid(path.findRev('/')+1);
+ TQString Pname = path.mid(path.tqfindRev('/')+1);
if(Pname.isEmpty()) return name;
- QString tempName = arcFile;
- QFileInfo qfi(tempName.replace(QRegExp("\\"),""));
+ TQString tempName = arcFile;
+ TQFileInfo qfi(tempName.tqreplace(TQRegExp("\\"),""));
vfile* vf=new vfile(Pname,0,"drwxr-xr-x",qfi.lastModified().toTime_t(),false,
qfi.owner(),qfi.group(),"inode/directory","",0 );
// add dirs if needed
@@ -678,12 +678,12 @@ QString arc_vfs::changeDir(QString name){
}
// calculate space
-void arc_vfs::vfs_calcSpace(QString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs,bool* stop){
+void arc_vfs::vfs_calcSpace(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs,bool* stop){
if ( *stop ) return;
vfile* vf = vfs_search(name);
// get the path inside the archive
- QString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
+ TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1);
path = path+"/";
if(path.left(1) == "/") path.remove(0,1);
@@ -694,7 +694,7 @@ void arc_vfs::vfs_calcSpace(QString name ,KIO::filesize_t *totalSize,unsigned lo
else { // handle directories : (
++(*totalDirs);
- QString origin_backup = vfs_origin; // backup the vfs origin
+ TQString origin_backup = vfs_origin; // backup the vfs origin
vfs_origin = vfs_origin+"/"+name;
vfileDict* vfs_filesP_backup = vfs_filesP; // backup the vfs_filesP
vfs_filesP = findDir(path+name);
@@ -710,12 +710,12 @@ void arc_vfs::vfs_calcSpace(QString name ,KIO::filesize_t *totalSize,unsigned lo
}
}
-void arc_vfs::processName(const QString& name, QStringList *urls,KIO::filesize_t *totalSize,unsigned long *totalFiles ){
+void arc_vfs::processName(const TQString& name, TQStringList *urls,KIO::filesize_t *totalSize,unsigned long *totalFiles ){
vfile* vf = vfs_search(name);
if ( vf == 0 ) return;
// get the path inside the archive
- QString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
+ TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1);
path = path+"/";
if(path.left(1) == "/") path.remove(0,1);
@@ -725,7 +725,7 @@ void arc_vfs::processName(const QString& name, QStringList *urls,KIO::filesize_t
urls->append(path+name);
} else { // handle directories : (
urls->append(path+name+"/");
- QString origin_backup = vfs_origin; // backup the vfs origin
+ TQString origin_backup = vfs_origin; // backup the vfs origin
vfs_origin = vfs_origin+"/"+name;
vfileDict* vfs_filesP_backup = vfs_filesP; // backup the vfs_filesP
vfs_filesP = findDir(path+name);
@@ -739,16 +739,16 @@ void arc_vfs::processName(const QString& name, QStringList *urls,KIO::filesize_t
}
}
-void arc_vfs::parseLine(QString line, QFile* temp){
- QString name;
+void arc_vfs::parseLine(TQString line, TQFile* temp){
+ TQString name;
KIO::filesize_t size = 0;
- QString perm;
- QFileInfo qfi(arcFile);
+ TQString perm;
+ TQFileInfo qfi(arcFile);
time_t mtime = qfi.lastModified().toTime_t();
bool link = false;
uid_t owner = getuid();
gid_t group = getgid();
- QString dest = "";
+ TQString dest = "";
mode_t mode = 0;
@@ -761,8 +761,8 @@ void arc_vfs::parseLine(QString line, QFile* temp){
size = nextWord(line).toLong();
nextWord(line);
name = nextWord(line,'\n');
- if(name.contains('/')) name = name.mid(name.findRev('/')+1,name.length());
- perm = KRpermHandler::mode2QString(stat_p.st_mode) ;
+ if(name.tqcontains('/')) name = name.mid(name.tqfindRev('/')+1,name.length());
+ perm = KRpermHandler::mode2TQString(stat_p.st_mode) ;
owner = KRpermHandler::user2uid(qfi.owner());
group = KRpermHandler::group2gid(qfi.group());
mode = stat_p.st_mode;
@@ -774,9 +774,9 @@ void arc_vfs::parseLine(QString line, QFile* temp){
KDE_stat(arcFile.local8Bit(),&stat_p);
name = qfi.fileName();
- name = name.left(name.findRev('.'));
+ name = name.left(name.tqfindRev('.'));
//long size = qfi.size();
- perm = KRpermHandler::mode2QString(stat_p.st_mode) ;
+ perm = KRpermHandler::mode2TQString(stat_p.st_mode) ;
owner = KRpermHandler::user2uid(qfi.owner());
group = KRpermHandler::group2gid(qfi.group());
mode = stat_p.st_mode;
@@ -785,18 +785,18 @@ void arc_vfs::parseLine(QString line, QFile* temp){
// parse tar files
if(vfs_type == "-tar" || vfs_type == "-tbz" || vfs_type == "-tgz" ){
perm = nextWord(line);
- QString temp = nextWord(line);
- owner = temp.left(temp.findRev('/')).toInt();
- group = temp.mid(temp.find('/')+1,temp.length()).toInt();
+ TQString temp = nextWord(line);
+ owner = temp.left(temp.tqfindRev('/')).toInt();
+ group = temp.mid(temp.tqfind('/')+1,temp.length()).toInt();
size = nextWord(line).toLong();
temp = nextWord(line);
name = nextWord(line,'\n');
if (name.startsWith("/")) // fix full-paths problem in tar (thanks to Heiner!)
name.remove(0, 1);
- if( name.contains(" -> ") ){
+ if( name.tqcontains(" -> ") ){
link = true;
- dest = name.mid(name.find(" -> ")+4);
- name = name.left(name.find(" -> "));
+ dest = name.mid(name.tqfind(" -> ")+4);
+ name = name.left(name.tqfind(" -> "));
}
}
@@ -805,11 +805,11 @@ void arc_vfs::parseLine(QString line, QFile* temp){
perm = nextWord(line);
if(perm.length() != 10)
perm = (perm.at(0)=='d')? "drwxr-xr-x" : "-rw-r--r--" ;
- if (nextWord(line).contains("file")) return;
+ if (nextWord(line).tqcontains("file")) return;
nextWord(line);
size = nextWord(line).toLong();
nextWord(line);nextWord(line);
- QString temp = nextWord(line);
+ TQString temp = nextWord(line);
name = nextWord(line,'\n');
}
@@ -819,14 +819,14 @@ void arc_vfs::parseLine(QString line, QFile* temp){
nextWord(line);nextWord(line);nextWord(line);
size = nextWord(line).toLong();
nextWord(line);nextWord(line);nextWord(line);
- QString tempName = arcFile;
- QFileInfo qfi(tempName.replace(QRegExp("\\"),""));
+ TQString tempName = arcFile;
+ TQFileInfo qfi(tempName.tqreplace(TQRegExp("\\"),""));
name = nextWord(line,'\n');
if ( name.left(1) == "/" ) name.remove(0,1);
- if( name.contains(" -> ") ){
+ if( name.tqcontains(" -> ") ){
link = true;
- dest = name.mid(name.find(" -> ")+4);
- name = name.left(name.find(" -> "));
+ dest = name.mid(name.tqfind(" -> ")+4);
+ name = name.left(name.tqfind(" -> "));
}
}
// parse rared files
@@ -847,7 +847,7 @@ void arc_vfs::parseLine(QString line, QFile* temp){
size = nextWord(line).toLong();
mtime = nextWord(line).toLong();
nextWord(line);
- perm = KRpermHandler::mode2QString(nextWord(line).toLong());
+ perm = KRpermHandler::mode2TQString(nextWord(line).toLong());
perm = (perm.at(0)=='d')? "drwxr-xr-x" : "-rw-r--r--" ;
}
@@ -856,7 +856,7 @@ void arc_vfs::parseLine(QString line, QFile* temp){
if(name.length() < 1) return;
- QString mime = KMimeType::findByURL( "/"+name,0,true,true)->name();
+ TQString mime = KMimeType::findByURL( "/"+name,0,true,true)->name();
vfile* vf=new vfile(name,size,perm,mtime,link,owner,group,mime,dest,mode);
vfile* vf2 = vfs_search(name);
if(vf2 != 0) vfs_removeFromList(vf2);
diff --git a/krusader/VFS/arc_vfs.h b/krusader/VFS/arc_vfs.h
index b4adf9b..ccc1ef5 100644
--- a/krusader/VFS/arc_vfs.h
+++ b/krusader/VFS/arc_vfs.h
@@ -33,65 +33,66 @@
#include <sys/types.h>
#include "vfs.h"
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
#include <kprocess.h>
-#include <qfile.h>
-#include <qprogressdialog.h>
+#include <tqfile.h>
+#include <tqprogressdialog.h>
class arc_vfs : public vfs {
Q_OBJECT
+ TQ_OBJECT
class arc_dir;
class extFile;
public:
- arc_vfs(QString origin,QString type,QObject* panel,bool write);
+ arc_vfs(TQString origin,TQString type,TQObject* panel,bool write);
~arc_vfs();
// copy a file to the vfs (physical)
- void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify=0,QString dir = "", PreserveMode pmode = PM_DEFAULT );
+ void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify=0,TQString dir = "", PreserveMode pmode = PM_DEFAULT );
// remove a file from the vfs (physical)
- void vfs_delFiles(QStringList *fileNames);
+ void vfs_delFiles(TQStringList *fileNames);
// return a path to the file
- QString vfs_getFile(QString name);
- KURL::List* vfs_getFiles(QStringList* names);
+ TQString vfs_getFile(TQString name);
+ KURL::List* vfs_getFiles(TQStringList* names);
// make dir
- void vfs_mkdir(QString name);
+ void vfs_mkdir(TQString name);
// rename file
- void vfs_rename(QString fileName,QString newName);
+ void vfs_rename(TQString fileName,TQString newName);
// calculate space
- void vfs_calcSpace(QString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool* stop);
+ void vfs_calcSpace(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool* stop);
// return the working dir
- QString vfs_workingDir();
+ TQString vfs_workingDir();
public slots:
// actually reads files and stats
- bool vfs_refresh(QString origin);
+ bool vfs_refresh(TQString origin);
void repack();
protected:
- QString tmpDir; // the temp directory tha archive is using
- QString arcFile; // the archive file URL
+ TQString tmpDir; // the temp directory tha archive is using
+ TQString arcFile; // the archive file URL
bool changed; // true if repack changed the archive
- QList<arc_dir> dirList;
- QValueList<extFile> extFiles; // the name, time & size of files unpacked from this archive
+ TQList<arc_dir> dirList;
+ TQValueList<extFile> extFiles; // the name, time & size of files unpacked from this archive
- void processName(const QString& name,QStringList *urls,KIO::filesize_t *totalSize,unsigned long *totalFiles );
+ void processName(const TQString& name,TQStringList *urls,KIO::filesize_t *totalSize,unsigned long *totalFiles );
bool getDirs(); // fill the dir list
- vfileDict* findDir(QString name);
- arc_dir* findArcDir(QString name);
- void getFilesToPack (QStringList* filesToPack,QString dir_name = "");
- void getFilesToDelete(QStringList* filesToDelete,QString dir_name = "");
- void getExtFiles( QString dir_name="" );
- QString nextWord( QString &s, char d=' ' );
- QString changeDir(QString name);
-
- void parseLine(QString line,QFile* temp);
-
- QString prefix;
- QString cmd; // the archiver main command
- QString listCmd; // the file listing option
- QString delCmd; // the delete option
- QString addCmd; // the add files option
- QString getCmd; // the extract files option
+ vfileDict* findDir(TQString name);
+ arc_dir* findArcDir(TQString name);
+ void getFilesToPack (TQStringList* filesToPack,TQString dir_name = "");
+ void getFilesToDelete(TQStringList* filesToDelete,TQString dir_name = "");
+ void getExtFiles( TQString dir_name="" );
+ TQString nextWord( TQString &s, char d=' ' );
+ TQString changeDir(TQString name);
+
+ void parseLine(TQString line,TQFile* temp);
+
+ TQString prefix;
+ TQString cmd; // the archiver main command
+ TQString listCmd; // the file listing option
+ TQString delCmd; // the delete option
+ TQString addCmd; // the add files option
+ TQString getCmd; // the extract files option
// the interl progress bar variale
int ignoreLines; // no of lines to ignore on stdout
@@ -99,26 +100,26 @@ protected:
private:
class arc_dir{
public:
- arc_dir(QString _name){
+ arc_dir(TQString _name){
name = _name;
entries.setAutoDelete(true);
}
- QString name; // the name of the dir
+ TQString name; // the name of the dir
vfileDict entries; // the file and dir in this dir
};
class extFile{
public:
extFile(): url(""),time(0),size(0){}
- extFile(QString u): url(u),time(0),size(0){}
- extFile(QString u,time_t t,off_t s): url(u),time(t),size(s){}
+ extFile(TQString u): url(u),time(0),size(0){}
+ extFile(TQString u,time_t t,off_t s): url(u),time(t),size(s){}
bool operator==(const extFile& ef) const{
if( url != ef.url ) return false;
if( size*ef.size && size!=ef.size )return false;
if( time*ef.time && time!=ef.time )return false;
return true;
}
- QString url;
+ TQString url;
time_t time;
off_t size;
};
diff --git a/krusader/VFS/ftp_vfs.cpp b/krusader/VFS/ftp_vfs.cpp
index 1cfb394..90684b7 100644
--- a/krusader/VFS/ftp_vfs.cpp
+++ b/krusader/VFS/ftp_vfs.cpp
@@ -36,10 +36,10 @@
#include <sys/types.h>
#endif
// QT includes
-#include <qdir.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qeventloop.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqeventloop.h>
// KDE includes
#include <kio/jobclasses.h>
#include <klocale.h>
@@ -56,7 +56,7 @@
#include "../defaults.h"
#include "../resources.h"
-ftp_vfs::ftp_vfs( QObject* panel ) : vfs( panel ), busy( false ) {
+ftp_vfs::ftp_vfs( TQObject* panel ) : vfs( panel ), busy( false ) {
// set the writable attribute
isWritable = true;
vfs_type = FTP;
@@ -69,7 +69,7 @@ ftp_vfs::~ftp_vfs() {
void ftp_vfs::slotAddFiles( KIO::Job *, const KIO::UDSEntryList& entries ) {
int rwx = -1;
- QString prot = vfs_origin.protocol();
+ TQString prot = vfs_origin.protocol();
if( prot == "krarc" || prot == "tar" || prot == "zip" )
rwx = PERM_ALL;
@@ -82,7 +82,7 @@ void ftp_vfs::slotAddFiles( KIO::Job *, const KIO::UDSEntryList& entries ) {
vfile *temp;
// get file statistics
- QString name = kfi.text();
+ TQString name = kfi.text();
// ignore un-needed entries
if ( name.isEmpty() || name == "." || name == ".." ) continue;
@@ -90,10 +90,10 @@ void ftp_vfs::slotAddFiles( KIO::Job *, const KIO::UDSEntryList& entries ) {
time_t mtime = kfi.time( KIO::UDS_MODIFICATION_TIME );
bool symLink = kfi.isLink();
mode_t mode = kfi.mode() | kfi.permissions();
- QString perm = KRpermHandler::mode2QString( mode );
+ TQString perm = KRpermHandler::mode2TQString( mode );
// set the mimetype
- QString mime = kfi.mimetype();
- QString symDest = "";
+ TQString mime = kfi.mimetype();
+ TQString symDest = "";
if ( symLink ) {
symDest = kfi.linkDest();
if ( kfi.isDir() ) perm[ 0 ] = 'd';
@@ -103,14 +103,14 @@ void ftp_vfs::slotAddFiles( KIO::Job *, const KIO::UDSEntryList& entries ) {
if ( kfi.user().isEmpty() )
temp = new vfile( name, size, perm, mtime, symLink, getuid(), getgid(), mime, symDest, mode, rwx );
else {
- QString currentUser = vfs_origin.user();
- if ( currentUser.contains( "@" ) ) /* remove the FTP proxy tags from the username */
- currentUser.truncate( currentUser.find( '@' ) );
+ TQString currentUser = vfs_origin.user();
+ if ( currentUser.tqcontains( "@" ) ) /* remove the FTP proxy tags from the username */
+ currentUser.truncate( currentUser.tqfind( '@' ) );
if ( currentUser.isEmpty() ) {
if( vfs_origin.host().isEmpty() )
currentUser = KRpermHandler::uid2user( getuid() );
else {
- currentUser = ""; // empty, but not QString::null
+ currentUser = ""; // empty, but not TQString()
}
}
#if KDE_IS_VERSION(3,5,0)
@@ -159,14 +159,14 @@ void ftp_vfs::slotListResult( KIO::Job *job ) {
}
bool ftp_vfs::populateVfsList( const KURL& origin, bool showHidden ) {
- QString errorMsg = QString::null;
+ TQString errorMsg = TQString();
if ( !origin.isValid() )
- errorMsg = i18n( "Malformed URL:\n%1" ).arg( origin.url() );
+ errorMsg = i18n( "Malformed URL:\n%1" ).tqarg( origin.url() );
if ( !KProtocolInfo::supportsListing( origin ) ) {
if( origin.protocol() == "ftp" && KProtocolInfo::supportsReading( origin ) )
errorMsg = i18n( "Krusader doesn't support FTP access via HTTP.\nIf it is not the case, please check and change the Proxy settings in kcontrol." );
else
- errorMsg = i18n( "Protocol not supported by Krusader:\n%1" ).arg( origin.url() );
+ errorMsg = i18n( "Protocol not supported by Krusader:\n%1" ).tqarg( origin.url() );
}
if ( !errorMsg.isEmpty() ) {
@@ -179,21 +179,21 @@ bool ftp_vfs::populateVfsList( const KURL& origin, bool showHidden ) {
vfs_origin = origin;
vfs_origin.adjustPath(-1);
- //QTimer::singleShot( 0,this,SLOT(startLister()) );
+ //TQTimer::singleShot( 0,this,TQT_SLOT(startLister()) );
listError = false;
// Open the directory marked by origin
krConfig->setGroup( "Look&Feel" );
//vfs_origin.adjustPath(+1);
KIO::Job *job = KIO::listDir( vfs_origin, false, showHidden );
- connect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- this, SLOT( slotAddFiles( KIO::Job*, const KIO::UDSEntryList& ) ) );
- connect( job, SIGNAL( redirection( KIO::Job*, const KURL& ) ),
- this, SLOT( slotRedirection( KIO::Job*, const KURL& ) ) );
- connect( job, SIGNAL( permanentRedirection( KIO::Job*, const KURL&, const KURL& ) ),
- this, SLOT( slotPermanentRedirection( KIO::Job*, const KURL&, const KURL& ) ) );
+ connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
+ this, TQT_SLOT( slotAddFiles( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ connect( job, TQT_SIGNAL( redirection( KIO::Job*, const KURL& ) ),
+ this, TQT_SLOT( slotRedirection( KIO::Job*, const KURL& ) ) );
+ connect( job, TQT_SIGNAL( permanentRedirection( KIO::Job*, const KURL&, const KURL& ) ),
+ this, TQT_SLOT( slotPermanentRedirection( KIO::Job*, const KURL&, const KURL& ) ) );
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( slotListResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( slotListResult( KIO::Job* ) ) );
job->setWindow( krApp );
@@ -211,7 +211,7 @@ bool ftp_vfs::populateVfsList( const KURL& origin, bool showHidden ) {
// copy a file to the vfs (physical)
-void ftp_vfs::vfs_addFiles( KURL::List *fileUrls, KIO::CopyJob::CopyMode mode, QObject* toNotify, QString dir, PreserveMode /*pmode*/ ) {
+void ftp_vfs::vfs_addFiles( KURL::List *fileUrls, KIO::CopyJob::CopyMode mode, TQObject* toNotify, TQString dir, PreserveMode /*pmode*/ ) {
KURL destUrl = vfs_origin;
if ( dir != "" ) {
@@ -219,38 +219,38 @@ void ftp_vfs::vfs_addFiles( KURL::List *fileUrls, KIO::CopyJob::CopyMode mode, Q
destUrl.cleanPath(); // removes the '..', '.' and extra slashes from the URL.
if ( destUrl.protocol() == "tar" || destUrl.protocol() == "zip" || destUrl.protocol() == "krarc" ) {
- if ( QDir( destUrl.path( -1 ) ).exists() )
+ if ( TQDir( destUrl.path( -1 ) ).exists() )
destUrl.setProtocol( "file" ); // if we get out from the archive change the protocol
}
}
KIO::Job* job = new KIO::CopyJob( *fileUrls, destUrl, mode, false, true );
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( vfs_refresh( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) );
if ( mode == KIO::CopyJob::Move ) // notify the other panel
- connect( job, SIGNAL( result( KIO::Job* ) ), toNotify, SLOT( vfs_refresh( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), toNotify, TQT_SLOT( vfs_refresh( KIO::Job* ) ) );
}
// remove a file from the vfs (physical)
-void ftp_vfs::vfs_delFiles( QStringList *fileNames ) {
+void ftp_vfs::vfs_delFiles( TQStringList *fileNames ) {
KURL::List filesUrls;
KURL url;
// names -> urls
for ( uint i = 0 ; i < fileNames->count(); ++i ) {
- QString filename = ( *fileNames ) [ i ];
+ TQString filename = ( *fileNames ) [ i ];
url = vfs_origin;
url.addPath( filename );
filesUrls.append( url );
}
KIO::Job *job = new KIO::DeleteJob( filesUrls, false, true );
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( vfs_refresh( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) );
}
-KURL::List* ftp_vfs::vfs_getFiles( QStringList* names ) {
+KURL::List* ftp_vfs::vfs_getFiles( TQStringList* names ) {
KURL url;
KURL::List* urls = new KURL::List();
- for ( QStringList::Iterator name = names->begin(); name != names->end(); ++name ) {
+ for ( TQStringList::Iterator name = names->begin(); name != names->end(); ++name ) {
url = vfs_getFile( *name );
urls->append( url );
}
@@ -259,7 +259,7 @@ KURL::List* ftp_vfs::vfs_getFiles( QStringList* names ) {
// return a path to the file
-KURL ftp_vfs::vfs_getFile( const QString& name ) {
+KURL ftp_vfs::vfs_getFile( const TQString& name ) {
vfile * vf = vfs_search( name );
if ( !vf ) return KURL(); // empty
@@ -268,15 +268,15 @@ KURL ftp_vfs::vfs_getFile( const QString& name ) {
return url;
}
-void ftp_vfs::vfs_mkdir( const QString& name ) {
+void ftp_vfs::vfs_mkdir( const TQString& name ) {
KURL url = vfs_origin;
url.addPath( name );
KIO::SimpleJob* job = KIO::mkdir( url );
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( vfs_refresh( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) );
}
-void ftp_vfs::vfs_rename( const QString& fileName, const QString& newName ) {
+void ftp_vfs::vfs_rename( const TQString& fileName, const TQString& newName ) {
KURL::List fileUrls;
KURL oldUrl = vfs_origin;
oldUrl.addPath( fileName ) ;
@@ -287,10 +287,10 @@ void ftp_vfs::vfs_rename( const QString& fileName, const QString& newName ) {
newUrl.addPath( newName );
KIO::Job *job = new KIO::CopyJob( fileUrls, newUrl, KIO::CopyJob::Move, true, true );
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( vfs_refresh( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) );
}
-QString ftp_vfs::vfs_workingDir() {
+TQString ftp_vfs::vfs_workingDir() {
return vfs_origin.url( -1 );
}
diff --git a/krusader/VFS/ftp_vfs.h b/krusader/VFS/ftp_vfs.h
index 14387a8..f165ee4 100644
--- a/krusader/VFS/ftp_vfs.h
+++ b/krusader/VFS/ftp_vfs.h
@@ -39,25 +39,26 @@
class ftp_vfs : public vfs{
Q_OBJECT
+ TQ_OBJECT
public:
// the constructor simply uses the inherited constructor
- ftp_vfs(QObject* panel);
+ ftp_vfs(TQObject* panel);
~ftp_vfs();
/// Copy a file to the vfs (physical).
- virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = "", PreserveMode pmode = PM_DEFAULT );
+ virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir = "", PreserveMode pmode = PM_DEFAULT );
/// Remove a file from the vfs (physical)
- virtual void vfs_delFiles(QStringList *fileNames);
+ virtual void vfs_delFiles(TQStringList *fileNames);
/// Return a list of URLs for multiple files
- virtual KURL::List* vfs_getFiles(QStringList* names);
+ virtual KURL::List* vfs_getFiles(TQStringList* names);
/// Return a URL to a single file
- virtual KURL vfs_getFile(const QString& name);
+ virtual KURL vfs_getFile(const TQString& name);
/// Create a new directory
- virtual void vfs_mkdir(const QString& name);
+ virtual void vfs_mkdir(const TQString& name);
/// Rename file
- virtual void vfs_rename(const QString& fileName,const QString& newName);
+ virtual void vfs_rename(const TQString& fileName,const TQString& newName);
/// Return the VFS working dir
- QString vfs_workingDir();
+ TQString vfs_workingDir();
public slots:
/// Handles new files from the dir lister
diff --git a/krusader/VFS/krarchandler.cpp b/krusader/VFS/krarchandler.cpp
index 2d4f0b6..2b1a3ab 100644
--- a/krusader/VFS/krarchandler.cpp
+++ b/krusader/VFS/krarchandler.cpp
@@ -28,14 +28,14 @@
* *
***************************************************************************/
// QT includes
-#include <qtextstream.h>
+#include <tqtextstream.h>
// KDE includes
#include <kprocess.h>
#include <ktempfile.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kio/passdlg.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kstandarddirs.h>
#include <ktar.h>
#include <kio/global.h>
@@ -46,12 +46,12 @@
#include "../krservices.h"
#include "../Dialogs/krpleasewait.h"
-static QStringList arcProtocols = QStringList::split(";", "tar;bzip;bzip2;gzip;krarc;zip");
+static TQStringList arcProtocols = TQStringList::split(";", "tar;bzip;bzip2;gzip;krarc;zip");
KWallet::Wallet * KRarcHandler::wallet = 0;
-QStringList KRarcHandler::supportedPackers() {
- QStringList packers;
+TQStringList KRarcHandler::supportedPackers() {
+ TQStringList packers;
// we will simply try to find the packers here..
if ( KrServices::cmdExist( "tar" ) ) packers.append( "tar" );
@@ -70,53 +70,53 @@ QStringList KRarcHandler::supportedPackers() {
if ( KrServices::cmdExist( "7z" ) || KrServices::cmdExist( "7za" ) ) packers.append( "7z" );
if ( KrServices::cmdExist( "rpm" ) && KrServices::cmdExist( "rpm2cpio" ) ) packers.append( "rpm" );
// kdDebug() << "Supported Packers:" << endl;
- //QStringList::Iterator it;
+ //TQStringList::Iterator it;
//for( it = packers.begin(); it != packers.end(); ++it )
// kdDebug() << *it << endl;
return packers;
}
-bool KRarcHandler::arcSupported( QString type ) {
+bool KRarcHandler::arcSupported( TQString type ) {
// lst will contain the supported unpacker list...
krConfig->setGroup( "Archives" );
- QStringList lst = krConfig->readListEntry( "Supported Packers" );
+ TQStringList lst = krConfig->readListEntry( "Supported Packers" );
- if ( type == "-zip" && lst.contains( "unzip" ) )
+ if ( type == "-zip" && lst.tqcontains( "unzip" ) )
return true;
- else if ( type == "-tar" && lst.contains( "tar" ) )
+ else if ( type == "-tar" && lst.tqcontains( "tar" ) )
return true;
- else if ( type == "-tbz" && lst.contains( "tar" ) )
+ else if ( type == "-tbz" && lst.tqcontains( "tar" ) )
return true;
- else if ( type == "-tgz" && lst.contains( "tar" ) )
+ else if ( type == "-tgz" && lst.tqcontains( "tar" ) )
return true;
- else if ( type == "tarz" && lst.contains( "tar" ) )
+ else if ( type == "tarz" && lst.tqcontains( "tar" ) )
return true;
- else if ( type == "gzip" && lst.contains( "gzip" ) )
+ else if ( type == "gzip" && lst.tqcontains( "gzip" ) )
return true;
- else if ( type == "zip2" && lst.contains( "bzip2" ) )
+ else if ( type == "zip2" && lst.tqcontains( "bzip2" ) )
return true;
- else if ( type == "-lha" && lst.contains( "lha" ) )
+ else if ( type == "-lha" && lst.tqcontains( "lha" ) )
return true;
- else if ( type == "-ace" && lst.contains( "unace" ) )
+ else if ( type == "-ace" && lst.tqcontains( "unace" ) )
return true;
- else if ( type == "-rpm" && lst.contains( "cpio" ) )
+ else if ( type == "-rpm" && lst.tqcontains( "cpio" ) )
return true;
- else if ( type == "cpio" && lst.contains( "cpio" ) )
+ else if ( type == "cpio" && lst.tqcontains( "cpio" ) )
return true;
- else if ( type == "-rar" && ( lst.contains( "unrar" ) || lst.contains( "rar" ) ) )
+ else if ( type == "-rar" && ( lst.tqcontains( "unrar" ) || lst.tqcontains( "rar" ) ) )
return true;
- else if ( type == "-arj" && ( lst.contains( "unarj" ) || lst.contains( "arj" ) ) )
+ else if ( type == "-arj" && ( lst.tqcontains( "unarj" ) || lst.tqcontains( "arj" ) ) )
return true;
- else if ( type == "-deb" && ( lst.contains( "dpkg" ) && lst.contains( "tar" ) ) )
+ else if ( type == "-deb" && ( lst.tqcontains( "dpkg" ) && lst.tqcontains( "tar" ) ) )
return true;
- else if ( type == "-7z" && lst.contains( "7z" ) )
+ else if ( type == "-7z" && lst.tqcontains( "7z" ) )
return true;
// not supported : (
return false;
}
-bool KRarcHandler::arcHandled( QString type ) {
+bool KRarcHandler::arcHandled( TQString type ) {
// first check if supported
if ( !arcSupported( type ) ) return false;
@@ -142,7 +142,7 @@ bool KRarcHandler::arcHandled( QString type ) {
}
-long KRarcHandler::arcFileCount( QString archive, QString type, QString password ) {
+long KRarcHandler::arcFileCount( TQString archive, TQString type, TQString password ) {
int divideWith = 1;
// first check if supported
@@ -152,7 +152,7 @@ long KRarcHandler::arcFileCount( QString archive, QString type, QString password
if ( type == "zip2" || type == "gzip" ) return 1L;
// set the right lister to do the job
- QString lister;
+ TQString lister;
if ( type == "-zip" ) lister = KrServices::fullPathName( "unzip" ) + " -ZTs";
else if ( type == "-tar" ) lister = KrServices::fullPathName( "tar" ) + " -tvf";
@@ -185,15 +185,15 @@ long KRarcHandler::arcFileCount( QString archive, QString type, QString password
// count the number of files in the archive
long count = 1;
- KTempFile tmpFile( /*"tmp"*/ QString::null, "krusader-unpack" ); // commented out as it created files in the current dir!
+ KTempFile tmpFile( /*"tmp"*/ TQString(), "krusader-unpack" ); // commented out as it created files in the current dir!
KrShellProcess list;
list << lister << KrServices::quote( archive ) << ">" << tmpFile.name() ;
- if( type == "-ace" && QFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
+ if( type == "-ace" && TQFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
list<< "<" << "/dev/ptmx";
list.start( KProcess::NotifyOnExit, KProcess::AllOutput );
while ( list.isRunning() ) {
usleep( 1000 );
- qApp->processEvents();
+ tqApp->processEvents();
if( krApp->wasWaitingCancelled() )
list.kill();
}
@@ -201,14 +201,14 @@ long KRarcHandler::arcFileCount( QString archive, QString type, QString password
krApp->stopWait();
- if( !list.normalExit() || !checkStatus( type, list.exitStatus() ) ) {
- KMessageBox::detailedError (krApp, i18n( "Failed to list the content of the archive (%1)!" ).arg( archive ),
+ if( !list.normalExit() || !checktqStatus( type, list.exitStatus() ) ) {
+ KMessageBox::detailedError (krApp, i18n( "Failed to list the content of the archive (%1)!" ).tqarg( archive ),
list.getErrorMsg(), i18n("Error" ) );
return 0;
}
- QTextStream *stream = tmpFile.textStream();
- while ( stream && stream->readLine() != QString::null ) ++count;
+ TQTextStream *stream = tmpFile.textStream();
+ while ( stream && stream->readLine() != TQString() ) ++count;
tmpFile.unlink();
//make sure you call stopWait after this function return...
@@ -217,7 +217,7 @@ long KRarcHandler::arcFileCount( QString archive, QString type, QString password
return count / divideWith;
}
-bool KRarcHandler::unpack( QString archive, QString type, QString password, QString dest ) {
+bool KRarcHandler::unpack( TQString archive, TQString type, TQString password, TQString dest ) {
krConfig->setGroup( "Archives" );
if ( krConfig->readBoolEntry( "Test Before Unpack", _TestBeforeUnpack ) ) {
// test first - or be sorry later...
@@ -233,7 +233,7 @@ bool KRarcHandler::unpack( QString archive, QString type, QString password, QStr
if ( count == 1 ) count = 0 ;
// choose the right packer for the job
- QString packer, cpioName = QString::null;
+ TQString packer, cpioName = TQString();
// set the right packer to do the job
if ( type == "-zip" ) packer = KrServices::fullPathName( "unzip" ) + " -o" ;
@@ -251,15 +251,15 @@ bool KRarcHandler::unpack( QString archive, QString type, QString password, QStr
KrServices::fullPathName( "unarj" ) + " x";
else if ( type == "-7z" ) packer = KrServices::fullPathName( "7z" ) + " -y x";
else if ( type == "-rpm" ) {
- QString tempDir = locateLocal("tmp",QString::null);
+ TQString tempDir = locateLocal("tmp",TQString());
cpioName = tempDir+"/contents.cpio";
KrShellProcess cpio;
cpio << KrServices::fullPathName( "rpm2cpio" ) << " " + KrServices::quote( archive ) << " > " << cpioName;
cpio.start(KProcess::Block, KProcess::AllOutput );
- if( !cpio.normalExit() || !checkStatus( "cpio", cpio.exitStatus() ) ) {
- KMessageBox::detailedError (krApp, i18n( "Failed to convert rpm (%1) to cpio!" ).arg( archive ),
+ if( !cpio.normalExit() || !checktqStatus( "cpio", cpio.exitStatus() ) ) {
+ KMessageBox::detailedError (krApp, i18n( "Failed to convert rpm (%1) to cpio!" ).tqarg( archive ),
cpio.getErrorMsg(), i18n("Error" ) );
return 0;
}
@@ -268,15 +268,15 @@ bool KRarcHandler::unpack( QString archive, QString type, QString password, QStr
packer = KrServices::fullPathName( "cpio" ) + " --force-local --no-absolute-filenames -iuvdF";
}
else if ( type == "-deb" ) {
- QString tempDir = locateLocal("tmp",QString::null);
+ TQString tempDir = locateLocal("tmp",TQString());
cpioName = tempDir+"/contents.tar";
KrShellProcess dpkg;
dpkg << KrServices::fullPathName( "dpkg" ) << " --fsys-tarfile " + KrServices::quote( archive ) << " > " << cpioName;
dpkg.start(KProcess::Block, KProcess::AllOutput );
- if( !dpkg.normalExit() || !checkStatus( "-deb", dpkg.exitStatus() ) ) {
- KMessageBox::detailedError (krApp, i18n( "Failed to convert deb (%1) to tar!" ).arg( archive ),
+ if( !dpkg.normalExit() || !checktqStatus( "-deb", dpkg.exitStatus() ) ) {
+ KMessageBox::detailedError (krApp, i18n( "Failed to convert deb (%1) to tar!" ).tqarg( archive ),
dpkg.getErrorMsg(), i18n("Error" ) );
return 0;
}
@@ -299,31 +299,31 @@ bool KRarcHandler::unpack( QString archive, QString type, QString password, QStr
KrShellProcess proc;
proc << packer << " " + KrServices::quote( archive );
if( type == "zip2" || type=="gzip" ){
- QString arcname = archive.mid(archive.findRev("/")+1);
- if( arcname.contains(".") ) arcname = arcname.left(arcname.findRev("."));
+ TQString arcname = archive.mid(archive.tqfindRev("/")+1);
+ if( arcname.tqcontains(".") ) arcname = arcname.left(arcname.tqfindRev("."));
proc << ">" << KrServices::quote( dest+"/"+arcname );
}
- if( type == "-ace" && QFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
+ if( type == "-ace" && TQFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
proc << "<" << "/dev/ptmx";
- QString save = getcwd( 0, 0 );
+ TQString save = getcwd( 0, 0 );
chdir( dest.local8Bit() );
// tell the user to wait
krApp->startWaiting( i18n( "Unpacking File(s)" ), count, true );
if ( count != 0 ) {
- connect( &proc, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- krApp, SLOT( incProgress( KProcess*, char*, int ) ) );
+ connect( &proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ krApp, TQT_SLOT( incProgress( KProcess*, char*, int ) ) );
if( type == "-rpm" )
- connect( &proc, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- krApp, SLOT( incProgress( KProcess*, char*, int ) ) );
+ connect( &proc, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ krApp, TQT_SLOT( incProgress( KProcess*, char*, int ) ) );
}
// start the unpacking process
proc.start( KProcess::NotifyOnExit, KProcess::AllOutput );
while ( proc.isRunning() ) {
usleep( 1000 );
- qApp->processEvents();
+ tqApp->processEvents();
if( krApp->wasWaitingCancelled() )
proc.kill();
}
@@ -332,11 +332,11 @@ bool KRarcHandler::unpack( QString archive, QString type, QString password, QStr
chdir( save.local8Bit() );
if( !cpioName.isEmpty() )
- QFile( cpioName ).remove(); /* remove the cpio file */
+ TQFile( cpioName ).remove(); /* remove the cpio file */
// check the return value
- if ( !proc.normalExit() || !checkStatus( type, proc.exitStatus() ) ) {
- KMessageBox::detailedError (krApp, i18n( "Failed to unpack %1!" ).arg( archive ),
+ if ( !proc.normalExit() || !checktqStatus( type, proc.exitStatus() ) ) {
+ KMessageBox::detailedError (krApp, i18n( "Failed to unpack %1!" ).tqarg( archive ),
krApp->wasWaitingCancelled() ? i18n( "User cancelled." ) :
proc.getErrorMsg(), i18n("Error" ) );
return false;
@@ -344,9 +344,9 @@ bool KRarcHandler::unpack( QString archive, QString type, QString password, QStr
return true; // SUCCESS
}
-bool KRarcHandler::test( QString archive, QString type, QString password, long count ) {
+bool KRarcHandler::test( TQString archive, TQString type, TQString password, long count ) {
// choose the right packer for the job
- QString packer;
+ TQString packer;
// set the right packer to do the job
if ( type == "-zip" ) packer = KrServices::fullPathName( "unzip" ) + " -t";
@@ -377,19 +377,19 @@ bool KRarcHandler::test( QString archive, QString type, QString password, long c
KrShellProcess proc;
proc << packer << KrServices::quote( archive );
- if( type == "-ace" && QFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
+ if( type == "-ace" && TQFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
proc << "<" << "/dev/ptmx";
// tell the user to wait
krApp->startWaiting( i18n( "Testing Archive" ), count, true );
- if ( count != 0 ) connect( &proc, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- krApp, SLOT( incProgress( KProcess*, char*, int ) ) );
+ if ( count != 0 ) connect( &proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ krApp, TQT_SLOT( incProgress( KProcess*, char*, int ) ) );
// start the unpacking process
proc.start( KProcess::NotifyOnExit, KProcess::AllOutput );
while ( proc.isRunning() ) {
usleep( 1000 );
- qApp->processEvents();
+ tqApp->processEvents();
if( krApp->wasWaitingCancelled() )
proc.kill();
}
@@ -397,15 +397,15 @@ bool KRarcHandler::test( QString archive, QString type, QString password, long c
krApp->stopWait();
// check the return value
- if ( !proc.normalExit() || !checkStatus( type, proc.exitStatus() ) )
+ if ( !proc.normalExit() || !checktqStatus( type, proc.exitStatus() ) )
return false;
return true; // SUCCESS
}
-bool KRarcHandler::pack( QStringList fileNames, QString type, QString dest, long count, QMap<QString,QString> extraProps ) {
+bool KRarcHandler::pack( TQStringList fileNames, TQString type, TQString dest, long count, TQMap<TQString,TQString> extraProps ) {
// set the right packer to do the job
- QString packer;
+ TQString packer;
if ( type == "zip" ) { packer = KrServices::fullPathName( "zip" ) + " -ry"; type = "-zip"; }
else if ( type == "tar" ) { packer = KrServices::fullPathName( "tar" ) + " -cvf"; type = "-tar"; }
@@ -417,7 +417,7 @@ bool KRarcHandler::pack( QStringList fileNames, QString type, QString dest, long
else if ( type == "7z" ) { packer = KrServices::fullPathName( "7z" ) + " -y a"; type = "-7z"; }
else return false;
- QString password = QString::null;
+ TQString password = TQString();
if( extraProps.count( "Password" ) > 0 ) {
password = extraProps[ "Password" ];
@@ -436,17 +436,17 @@ bool KRarcHandler::pack( QStringList fileNames, QString type, QString dest, long
packer += " -p'" + password + "'";
}
else
- password = QString::null;
+ password = TQString();
}
}
if( extraProps.count( "VolumeSize" ) > 0 ) {
- QString sizeStr = extraProps[ "VolumeSize" ];
+ TQString sizeStr = extraProps[ "VolumeSize" ];
KIO::filesize_t size = sizeStr.toLongLong();
if( size >= 10000 ) {
if( type == "-arj" || type == "-rar" )
- packer += QString( " -v%1b" ).arg( sizeStr );
+ packer += TQString( " -v%1b" ).tqarg( sizeStr );
}
}
@@ -459,44 +459,44 @@ bool KRarcHandler::pack( QStringList fileNames, QString type, QString dest, long
if( type == "-rar" ) {
static const int rarLevels[] = { 0, 1, 2, 2, 3, 3, 4, 4, 5 };
- packer += QString( " -m%1" ).arg( rarLevels[ level ] );
+ packer += TQString( " -m%1" ).tqarg( rarLevels[ level ] );
}
else if( type == "-arj" ) {
static const int arjLevels[] = { 0, 4, 4, 3, 3, 2, 2, 1, 1 };
- packer += QString( " -m%1" ).arg( arjLevels[ level ] );
+ packer += TQString( " -m%1" ).tqarg( arjLevels[ level ] );
}
else if( type == "-zip" ) {
static const int zipLevels[] = { 0, 1, 2, 4, 5, 6, 7, 8, 9 };
- packer += QString( " -%1" ).arg( zipLevels[ level ] );
+ packer += TQString( " -%1" ).tqarg( zipLevels[ level ] );
}
else if( type == "-7z" ) {
static const int sevenZipLevels[] = { 0, 1, 2, 4, 5, 6, 7, 8, 9 };
- packer += QString( " -mx%1" ).arg( sevenZipLevels[ level ] );
+ packer += TQString( " -mx%1" ).tqarg( sevenZipLevels[ level ] );
}
}
if( extraProps.count( "CommandLineSwitches" ) > 0 )
- packer += QString( " %1" ).arg( extraProps[ "CommandLineSwitches" ] );
+ packer += TQString( " %1" ).tqarg( extraProps[ "CommandLineSwitches" ] );
// prepare to pack
KrShellProcess proc;
proc << packer << KrServices::quote( dest );
- for ( QStringList::Iterator file = fileNames.begin(); file != fileNames.end(); ++file ) {
+ for ( TQStringList::Iterator file = fileNames.begin(); file != fileNames.end(); ++file ) {
proc << KrServices::quote( *file );
}
// tell the user to wait
krApp->startWaiting( i18n( "Packing File(s)" ), count, true );
if ( count != 0 )
- connect( &proc, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- krApp, SLOT( incProgress( KProcess*, char*, int ) ) );
+ connect( &proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ krApp, TQT_SLOT( incProgress( KProcess*, char*, int ) ) );
// start the packing process
proc.start( KProcess::NotifyOnExit, KProcess::AllOutput );
while ( proc.isRunning() ) {
usleep( 1000 );
- qApp->processEvents();
+ tqApp->processEvents();
if( krApp->wasWaitingCancelled() )
proc.kill();
}
@@ -504,8 +504,8 @@ bool KRarcHandler::pack( QStringList fileNames, QString type, QString dest, long
krApp->stopWait();
// check the return value
- if ( !proc.normalExit() || !checkStatus( type, proc.exitStatus() ) ) {
- KMessageBox::detailedError (krApp, i18n( "Failed to pack %1!" ).arg( dest ),
+ if ( !proc.normalExit() || !checktqStatus( type, proc.exitStatus() ) ) {
+ KMessageBox::detailedError (krApp, i18n( "Failed to pack %1!" ).tqarg( dest ),
krApp->wasWaitingCancelled() ? i18n( "User cancelled." ) : proc.getErrorMsg(),
i18n("Error" ) );
return false;
@@ -520,10 +520,10 @@ bool KRarcHandler::pack( QStringList fileNames, QString type, QString dest, long
return true; // SUCCESS
}
-QString KRarcHandler::getPassword( QString path ) {
- QString password;
+TQString KRarcHandler::getPassword( TQString path ) {
+ TQString password;
- QString key = "krarc-" + path;
+ TQString key = "krarc-" + path;
if( !KWallet::Wallet::keyDoesNotExist(KWallet::Wallet::NetworkWallet(), KWallet::Wallet::PasswordFolder(), key ) ) {
if( !KWallet::Wallet::isOpen( KWallet::Wallet::NetworkWallet() ) && wallet != 0 ) {
@@ -534,9 +534,9 @@ QString KRarcHandler::getPassword( QString path ) {
wallet = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet() );
if ( wallet && wallet->hasFolder( KWallet::Wallet::PasswordFolder() ) ) {
wallet->setFolder( KWallet::Wallet::PasswordFolder() );
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
if ( wallet->readMap( key, map ) == 0 ) {
- QMap<QString, QString>::ConstIterator it = map.find( "password" );
+ TQMap<TQString, TQString>::ConstIterator it = map.tqfind( "password" );
if ( it != map.end() )
password = it.data();
}
@@ -544,7 +544,7 @@ QString KRarcHandler::getPassword( QString path ) {
}
bool keep = true;
- QString user = "archive";
+ TQString user = "archive";
KIO::PasswordDialog passDlg( i18n("This archive is encrypted, please supply the password:"),
user, true );
passDlg.setPassword( password );
@@ -563,7 +563,7 @@ QString KRarcHandler::getPassword( QString path ) {
ok = wallet->createFolder( KWallet::Wallet::PasswordFolder() );
if ( ok ) {
wallet->setFolder( KWallet::Wallet::PasswordFolder() );
- QMap<QString,QString> map;
+ TQMap<TQString,TQString> map;
map.insert( "login", "archive" );
map.insert( "password", password );
wallet->writeMap( key, map );
@@ -577,14 +577,14 @@ QString KRarcHandler::getPassword( QString path ) {
}
bool KRarcHandler::isArchive(const KURL& url) {
- QString protocol = url.protocol();
- if (arcProtocols.find(protocol) != arcProtocols.end())
+ TQString protocol = url.protocol();
+ if (arcProtocols.tqfind(protocol) != arcProtocols.end())
return true;
else return false;
}
-QString KRarcHandler::getType( bool &encrypted, QString fileName, QString mime, bool checkEncrypted ) {
- QString result = detectArchive( encrypted, fileName, checkEncrypted );
+TQString KRarcHandler::getType( bool &encrypted, TQString fileName, TQString mime, bool checkEncrypted ) {
+ TQString result = detectArchive( encrypted, fileName, checkEncrypted );
if( result.isNull() )
result = mime;
else
@@ -597,7 +597,7 @@ QString KRarcHandler::getType( bool &encrypted, QString fileName, QString mime,
}
-bool KRarcHandler::checkStatus( QString type, int exitCode ) {
+bool KRarcHandler::checktqStatus( TQString type, int exitCode ) {
if( type == "-zip" || type == "-rar" || type == "-7z" )
return exitCode == 0 || exitCode == 1;
else if( type == "-ace" || type == "zip2" || type == "-lha" || type == "-rpm" || type == "cpio" ||
@@ -611,12 +611,12 @@ bool KRarcHandler::checkStatus( QString type, int exitCode ) {
}
struct AutoDetectParams {
- QString type;
+ TQString type;
int location;
- QString detectionString;
+ TQString detectionString;
};
-QString KRarcHandler::detectArchive( bool &encrypted, QString fileName, bool checkEncrypted ) {
+TQString KRarcHandler::detectArchive( bool &encrypted, TQString fileName, bool checkEncrypted ) {
static AutoDetectParams autoDetectParams[] = {{"zip", 0, "PK\x03\x04"},
{"rar", 0, "Rar!\x1a" },
{"arj", 0, "\x60\xea" },
@@ -630,14 +630,14 @@ QString KRarcHandler::detectArchive( bool &encrypted, QString fileName, bool che
encrypted = false;
- QFile arcFile( fileName );
+ TQFile arcFile( fileName );
if ( arcFile.open( IO_ReadOnly ) ) {
char buffer[ 1024 ];
long sizeMax = arcFile.readBlock( buffer, sizeof( buffer ) );
arcFile.close();
for( int i=0; i < autoDetectElems; i++ ) {
- QString detectionString = autoDetectParams[ i ].detectionString;
+ TQString detectionString = autoDetectParams[ i ].detectionString;
int location = autoDetectParams[ i ].location;
int endPtr = detectionString.length() + location;
@@ -653,7 +653,7 @@ QString KRarcHandler::detectArchive( bool &encrypted, QString fileName, bool che
}
if( j == detectionString.length() ) {
- QString type = autoDetectParams[ i ].type;
+ TQString type = autoDetectParams[ i ].type;
if( type == "bzip2" || type == "gzip" ) {
KTar tapeArchive( fileName );
if( tapeArchive.open( IO_ReadOnly ) ) {
@@ -749,7 +749,7 @@ QString KRarcHandler::detectArchive( bool &encrypted, QString fileName, bool che
}
}
}
- return QString::null;
+ return TQString();
}
#include "krarchandler.moc"
diff --git a/krusader/VFS/krarchandler.h b/krusader/VFS/krarchandler.h
index 3d3606d..1ed9301 100644
--- a/krusader/VFS/krarchandler.h
+++ b/krusader/VFS/krarchandler.h
@@ -30,55 +30,57 @@
#ifndef KRARCHANDLER_H
#define KRARCHANDLER_H
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
#include <kprocess.h>
#include <kurl.h>
#include <kwallet.h>
-class KRarcHandler: public QObject {
+class KRarcHandler: public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
// return the number of files in the archive
- static long arcFileCount(QString archive, QString type, QString password);
+ static long arcFileCount(TQString archive, TQString type, TQString password);
// unpack an archive to destination directory
- static bool unpack(QString archive, QString type, QString password, QString dest );
+ static bool unpack(TQString archive, TQString type, TQString password, TQString dest );
// pack an archive to destination directory
- static bool pack(QStringList fileNames, QString type, QString dest, long count, QMap<QString,QString> extraProps );
+ static bool pack(TQStringList fileNames, TQString type, TQString dest, long count, TQMap<TQString,TQString> extraProps );
// test an archive
- static bool test(QString archive, QString type, QString password, long count = 0L );
+ static bool test(TQString archive, TQString type, TQString password, long count = 0L );
// true - if the right unpacker exist in the system
- static bool arcSupported(QString type);
+ static bool arcSupported(TQString type);
// true - if supported and the user want us to handle this kind of archive
- static bool arcHandled(QString type);
+ static bool arcHandled(TQString type);
// return the a list of supported packers
- static QStringList supportedPackers();
+ static TQStringList supportedPackers();
// true - if the url is an archive (ie: tar:/home/test/file.tar.bz2)
static bool isArchive(const KURL& url);
// used to determine the type of the archive
- static QString getType( bool &encrypted, QString fileName, QString mime, bool checkEncrypted = true );
+ static TQString getType( bool &encrypted, TQString fileName, TQString mime, bool checkEncrypted = true );
// queries the password from the user
- static QString getPassword( QString path );
+ static TQString getPassword( TQString path );
// detects the archive type
- static QString detectArchive( bool &encrypted, QString fileName, bool checkEncrypted = true );
+ static TQString detectArchive( bool &encrypted, TQString fileName, bool checkEncrypted = true );
private:
// checks if the returned status is correct
- static bool checkStatus( QString type, int exitCode );
+ static bool checktqStatus( TQString type, int exitCode );
static KWallet::Wallet * wallet;
};
class KrShellProcess : public KShellProcess {
Q_OBJECT
+ TQ_OBJECT
public:
- KrShellProcess() : KShellProcess(), errorMsg( QString::null ), outputMsg( QString::null ) {
- connect(this,SIGNAL(receivedStderr(KProcess*,char*,int)),
- this,SLOT(receivedErrorMsg(KProcess*,char*,int)) );
- connect(this,SIGNAL(receivedStdout(KProcess*,char*,int)),
- this,SLOT(receivedOutputMsg(KProcess*,char*,int)) );
+ KrShellProcess() : KShellProcess(), errorMsg( TQString() ), outputMsg( TQString() ) {
+ connect(this,TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ this,TQT_SLOT(receivedErrorMsg(KProcess*,char*,int)) );
+ connect(this,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this,TQT_SLOT(receivedOutputMsg(KProcess*,char*,int)) );
}
- QString getErrorMsg() {
+ TQString getErrorMsg() {
if( errorMsg.stripWhiteSpace().isEmpty() )
return outputMsg.right( 500 );
else
@@ -87,52 +89,53 @@ public:
public slots:
void receivedErrorMsg(KProcess*, char *buf, int len) {
- errorMsg += QString::fromLocal8Bit( buf, len );
+ errorMsg += TQString::fromLocal8Bit( buf, len );
if( errorMsg.length() > 500 )
errorMsg = errorMsg.right( 500 );
receivedOutputMsg( 0, buf, len );
}
void receivedOutputMsg(KProcess*, char *buf, int len) {
- outputMsg += QString::fromLocal8Bit( buf, len );
+ outputMsg += TQString::fromLocal8Bit( buf, len );
if( outputMsg.length() > 500 )
outputMsg = outputMsg.right( 500 );
}
private:
- QString errorMsg;
- QString outputMsg;
+ TQString errorMsg;
+ TQString outputMsg;
};
class Kr7zEncryptionChecker : public KrShellProcess {
Q_OBJECT
+ TQ_OBJECT
public:
Kr7zEncryptionChecker() : KrShellProcess(), encrypted( false ), lastData() {
- connect(this,SIGNAL(receivedStdout(KProcess*,char*,int)),
- this,SLOT(processStdout(KProcess*,char*,int)) );
+ connect(this,TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this,TQT_SLOT(processStdout(KProcess*,char*,int)) );
}
public slots:
void processStdout( KProcess *proc,char *buf,int len ) {
- QByteArray d(len);
+ TQByteArray d(len);
d.setRawData(buf,len);
- QString data = QString( d );
+ TQString data = TQString( d );
d.resetRawData(buf,len);
- QString checkable = lastData + data;
+ TQString checkable = lastData + data;
- QStringList lines = QStringList::split( '\n', checkable );
+ TQStringList lines = TQStringList::split( '\n', checkable );
lastData = lines[ lines.count() - 1 ];
for( unsigned i=0; i != lines.count(); i++ ) {
- QString line = lines[ i ].stripWhiteSpace().lower();
- int ndx = line.find( "testing" );
+ TQString line = lines[ i ].stripWhiteSpace().lower();
+ int ndx = line.tqfind( "testing" );
if( ndx >=0 )
line.truncate( ndx );
if( line.isEmpty() )
continue;
- if( line.contains( "password" ) && line.contains( "enter" ) ) {
+ if( line.tqcontains( "password" ) && line.tqcontains( "enter" ) ) {
encrypted = true;
proc->kill();
}
@@ -142,7 +145,7 @@ public slots:
bool isEncrypted() { return encrypted; }
private:
bool encrypted;
- QString lastData;
+ TQString lastData;
};
#endif
diff --git a/krusader/VFS/krdirwatch.cpp b/krusader/VFS/krdirwatch.cpp
index 96ec185..4f5c93d 100644
--- a/krusader/VFS/krdirwatch.cpp
+++ b/krusader/VFS/krdirwatch.cpp
@@ -32,14 +32,14 @@
#include <sys/types.h>
#include <kdebug.h>
#include "krpermhandler.h"
-#include "qstringlist.h"
-#include <qdir.h>
+#include "tqstringlist.h"
+#include <tqdir.h>
KRdirWatch::KRdirWatch(int msec,bool dirOnly):
delay(msec),t(this), changed(false) {
- if(dirOnly) dir.setFilter( QDir::Dirs | QDir::Hidden | QDir::NoSymLinks );
+ if(dirOnly) dir.setFilter( TQDir::Dirs | TQDir::Hidden | TQDir::NoSymLinks );
watched.setAutoDelete(true);
- connect(&t,SIGNAL(timeout()),this, SLOT(checkDirs()));
+ connect(&t,TQT_SIGNAL(timeout()),this, TQT_SLOT(checkDirs()));
startScan();
}
@@ -48,7 +48,7 @@ KRdirWatch::~KRdirWatch(){
stopScan();
}
-void KRdirWatch::removeDir(QString path){
+void KRdirWatch::removeDir(TQString path){
t.stop();
for ( it = watched.first(); it != 0; )
if (it->path == path) watched.remove();
@@ -56,7 +56,7 @@ void KRdirWatch::removeDir(QString path){
if (!stopped) startScan();
}
-void KRdirWatch::addDir(QString path, bool checkPermissions){
+void KRdirWatch::addDir(TQString path, bool checkPermissions){
t.stop();
krDirEntry* temp = new krDirEntry;
@@ -78,7 +78,7 @@ void KRdirWatch::addDir(QString path, bool checkPermissions){
qfi.setFile(path);
temp->path = dir.path();
- temp->count = dir.entryList(QDir::All | QDir::AccessMask).count();
+ temp->count = dir.entryList(TQDir::All | TQDir::AccessMask).count();
temp->lastModified = qfi.lastModified();
watched.append(temp);
@@ -89,9 +89,9 @@ void KRdirWatch::addDir(QString path, bool checkPermissions){
void KRdirWatch::checkDirs(){
t.stop();
- QString path;
+ TQString path;
unsigned long count;
- QDateTime dt;
+ TQDateTime dt;
for ( it = watched.first(); it != 0; it = watched.next() ){
path = it->path;
@@ -102,7 +102,7 @@ void KRdirWatch::checkDirs(){
return;
}
dt = qfi.lastModified();
- count = dir.entryList(QDir::All | QDir::AccessMask).count();
+ count = dir.entryList(TQDir::All | TQDir::AccessMask).count();
// check for changes
if(it->lastModified!=dt || it->count!=count){
changed = true;
diff --git a/krusader/VFS/krdirwatch.h b/krusader/VFS/krdirwatch.h
index e897eeb..dff9532 100644
--- a/krusader/VFS/krdirwatch.h
+++ b/krusader/VFS/krdirwatch.h
@@ -33,27 +33,28 @@
#ifndef KRDIRWATCH_H
#define KRDIRWATCH_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qdir.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqdir.h>
typedef struct krDirEntry_s{
- QString path;
+ TQString path;
unsigned long count; // number of files
- QDateTime lastModified;
+ TQDateTime lastModified;
} krDirEntry ;
-class KRdirWatch : public QObject {
+class KRdirWatch : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
KRdirWatch(int msec = 250 , bool dirOnly = false );
~KRdirWatch();
- void addDir(QString path,bool checkPermissions = true );
- void removeDir(QString path);
+ void addDir(TQString path,bool checkPermissions = true );
+ void removeDir(TQString path);
inline void clearList(){watched.clear();}
inline void startScan(){t.start(delay);stopped=false;}
@@ -67,10 +68,10 @@ signals:
protected:
int delay; // time in msec between updates
- QList<krDirEntry> watched;
- QTimer t;
- QDir dir;
- QFileInfo qfi;
+ TQList<krDirEntry> watched;
+ TQTimer t;
+ TQDir dir;
+ TQFileInfo qfi;
krDirEntry* it;
bool changed; // true if something happend to the watched dirs
bool stopped; // true if the watcher is stopped
diff --git a/krusader/VFS/krpermhandler.cpp b/krusader/VFS/krpermhandler.cpp
index fd8e52c..3ef93c3 100644
--- a/krusader/VFS/krpermhandler.cpp
+++ b/krusader/VFS/krpermhandler.cpp
@@ -41,21 +41,21 @@
#include <klocale.h>
#include <kglobal.h>
#include <klargefile.h>
-// Qt includes
-#include <qdatetime.h>
-#include <qdir.h>
+// TQt includes
+#include <tqdatetime.h>
+#include <tqdir.h>
// krusader includes
#include <kdeversion.h>
#include "krpermhandler.h"
#include "../resources.h"
-QDict<uid_t> *KRpermHandler::passwdCache = 0L;
-QDict<gid_t> *KRpermHandler::groupCache = 0L;
-QIntDict<char> *KRpermHandler::currentGroups = 0L;
-QIntDict<QString> *KRpermHandler::uidCache = 0L;
-QIntDict<QString> *KRpermHandler::gidCache = 0L;
+TQDict<uid_t> *KRpermHandler::passwdCache = 0L;
+TQDict<gid_t> *KRpermHandler::groupCache = 0L;
+TQIntDict<char> *KRpermHandler::currentGroups = 0L;
+TQIntDict<TQString> *KRpermHandler::uidCache = 0L;
+TQIntDict<TQString> *KRpermHandler::gidCache = 0L;
-char KRpermHandler::writeable( QString perm, gid_t gid, uid_t uid, int rwx ) {
+char KRpermHandler::writeable( TQString perm, gid_t gid, uid_t uid, int rwx ) {
if( rwx != -1 )
return ( rwx & W_OK ) ? ALLOWED_PERM : NO_PERM;
// root override
@@ -64,7 +64,7 @@ char KRpermHandler::writeable( QString perm, gid_t gid, uid_t uid, int rwx ) {
// first check other permissions.
if ( perm[ 8 ] != '-' ) return ALLOWED_PERM;
// now check group permission
- if ( ( perm[ 5 ] != '-' ) && ( currentGroups->find( gid ) ) )
+ if ( ( perm[ 5 ] != '-' ) && ( currentGroups->tqfind( gid ) ) )
return ALLOWED_PERM;
// the last chance - user permissions
if ( ( perm[ 2 ] != '-' ) && ( uid == getuid() ) )
@@ -73,7 +73,7 @@ char KRpermHandler::writeable( QString perm, gid_t gid, uid_t uid, int rwx ) {
return NO_PERM;
}
-char KRpermHandler::readable( QString perm, gid_t gid, uid_t uid, int rwx ) {
+char KRpermHandler::readable( TQString perm, gid_t gid, uid_t uid, int rwx ) {
if( rwx != -1 )
return ( rwx & R_OK ) ? ALLOWED_PERM : NO_PERM;
// root override
@@ -82,7 +82,7 @@ char KRpermHandler::readable( QString perm, gid_t gid, uid_t uid, int rwx ) {
// first check other permissions.
if ( perm[ 7 ] != '-' ) return ALLOWED_PERM;
// now check group permission
- if ( ( perm[ 4 ] != '-' ) && ( currentGroups->find( gid ) ) )
+ if ( ( perm[ 4 ] != '-' ) && ( currentGroups->tqfind( gid ) ) )
return ALLOWED_PERM;
// the last chance - user permissions
if ( ( perm[ 1 ] != '-' ) && ( uid == getuid() ) )
@@ -91,13 +91,13 @@ char KRpermHandler::readable( QString perm, gid_t gid, uid_t uid, int rwx ) {
return NO_PERM;
}
-char KRpermHandler::executable( QString perm, gid_t gid, uid_t uid, int rwx ) {
+char KRpermHandler::executable( TQString perm, gid_t gid, uid_t uid, int rwx ) {
if( rwx != -1 )
return ( rwx & X_OK ) ? ALLOWED_PERM : NO_PERM;
// first check other permissions.
if ( perm[ 9 ] != '-' ) return ALLOWED_PERM;
// now check group permission
- if ( ( perm[ 6 ] != '-' ) && ( currentGroups->find( gid ) ) )
+ if ( ( perm[ 6 ] != '-' ) && ( currentGroups->tqfind( gid ) ) )
return ALLOWED_PERM;
// the last chance - user permissions
if ( ( perm[ 3 ] != '-' ) && ( uid == getuid() ) )
@@ -106,31 +106,31 @@ char KRpermHandler::executable( QString perm, gid_t gid, uid_t uid, int rwx ) {
return NO_PERM;
}
-bool KRpermHandler::fileWriteable( QString localFile ) {
+bool KRpermHandler::fileWriteable( TQString localFile ) {
KDE_struct_stat stat_p;
if ( KDE_stat( localFile.local8Bit(), &stat_p ) == -1 ) return false;
mode_t m = stat_p.st_mode;
- QString perm = mode2QString( m );
+ TQString perm = mode2TQString( m );
return writeable( perm, stat_p.st_gid, stat_p.st_uid );
}
-bool KRpermHandler::fileReadable( QString localFile ) {
+bool KRpermHandler::fileReadable( TQString localFile ) {
KDE_struct_stat stat_p;
if ( KDE_stat( localFile.local8Bit(), &stat_p ) == -1 ) return false;
mode_t m = stat_p.st_mode;
- QString perm = mode2QString( m );
+ TQString perm = mode2TQString( m );
return readable( perm, stat_p.st_gid, stat_p.st_uid );
}
-bool KRpermHandler::fileExecutable( QString localFile ) {
+bool KRpermHandler::fileExecutable( TQString localFile ) {
KDE_struct_stat stat_p;
if ( KDE_stat( localFile.local8Bit(), &stat_p ) == -1 ) return false;
mode_t m = stat_p.st_mode;
- QString perm = mode2QString( m );
+ TQString perm = mode2TQString( m );
return executable( perm, stat_p.st_gid, stat_p.st_uid );
}
-QString KRpermHandler::mode2QString( mode_t m ) {
+TQString KRpermHandler::mode2TQString( mode_t m ) {
char perm[ 11 ];
for( int i=0; i != 10; i++ )
perm[ i ] = '-';
@@ -155,7 +155,7 @@ QString KRpermHandler::mode2QString( mode_t m ) {
if ( m & 0001 ) perm[ 9 ] = 'x';
if ( m & 01000 ) perm[ 9 ] = 't';
- return QString( perm );
+ return TQString( perm );
}
void KRpermHandler::init() {
@@ -167,11 +167,11 @@ void KRpermHandler::init() {
int groupNo = getgroups( 50, groupList );
// init the groups and user caches
- passwdCache = new QDict<uid_t>( 317 );
- groupCache = new QDict<gid_t>( 317 );
- currentGroups = new QIntDict<char>( 317 );
- uidCache = new QIntDict<QString>( 317 );
- gidCache = new QIntDict<QString>( 317 );
+ passwdCache = new TQDict<uid_t>( 317 );
+ groupCache = new TQDict<gid_t>( 317 );
+ currentGroups = new TQIntDict<char>( 317 );
+ uidCache = new TQIntDict<TQString>( 317 );
+ gidCache = new TQIntDict<TQString>( 317 );
passwdCache->setAutoDelete( true );
@@ -186,7 +186,7 @@ void KRpermHandler::init() {
while ( ( pass = getpwent() ) != 0L ) {
uid_temp = new uid_t( pass->pw_uid );
passwdCache->insert( pass->pw_name, uid_temp );
- uidCache->insert( pass->pw_uid, new QString( pass->pw_name ) );
+ uidCache->insert( pass->pw_uid, new TQString( pass->pw_name ) );
}
delete pass;
endpwent();
@@ -197,7 +197,7 @@ void KRpermHandler::init() {
while ( ( gr = getgrent() ) != 0L ) {
gid_temp = new gid_t( gr->gr_gid );
groupCache->insert( gr->gr_name, gid_temp );
- gidCache->insert( gr->gr_gid, new QString( gr->gr_name ) );
+ gidCache->insert( gr->gr_gid, new TQString( gr->gr_name ) );
}
delete gr;
endgrent();
@@ -211,7 +211,7 @@ void KRpermHandler::init() {
currentGroups->insert( getegid(), t );
}
-char KRpermHandler::ftpWriteable ( QString fileOwner, QString userName, QString perm ) {
+char KRpermHandler::ftpWriteable ( TQString fileOwner, TQString userName, TQString perm ) {
// first check other permissions.
if ( perm[ 8 ] != '-' ) return ALLOWED_PERM;
// can't check group permission !
@@ -224,7 +224,7 @@ char KRpermHandler::ftpWriteable ( QString fileOwner, QString userName, QString
return NO_PERM;
}
-char KRpermHandler::ftpReadable ( QString fileOwner, QString userName, QString perm ) {
+char KRpermHandler::ftpReadable ( TQString fileOwner, TQString userName, TQString perm ) {
// first check other permissions.
if ( perm[ 7 ] != '-' ) return ALLOWED_PERM;
// can't check group permission !
@@ -237,7 +237,7 @@ char KRpermHandler::ftpReadable ( QString fileOwner, QString userName, QString p
return NO_PERM;
}
-char KRpermHandler::ftpExecutable( QString fileOwner, QString userName, QString perm ) {
+char KRpermHandler::ftpExecutable( TQString fileOwner, TQString userName, TQString perm ) {
// first check other permissions.
if ( perm[ 9 ] != '-' ) return ALLOWED_PERM;
// can't check group permission !
@@ -250,22 +250,22 @@ char KRpermHandler::ftpExecutable( QString fileOwner, QString userName, QString
return NO_PERM;
}
-bool KRpermHandler::dirExist( QString path ) {
+bool KRpermHandler::dirExist( TQString path ) {
DIR * dir = opendir( path.local8Bit() );
if ( !dir ) return false;
closedir( dir ); // bug fix Karai Csaba (ckarai)
return true;
}
-bool KRpermHandler::fileExist( QString fullPath ) {
+bool KRpermHandler::fileExist( TQString fullPath ) {
if ( fullPath.right( 1 ) == "/" ) fullPath = fullPath.left( fullPath.length() - 1 ) ;
if ( fullPath.left( 1 ) != "/" ) return fileExist( "/", fullPath );
- return fileExist( fullPath.left( fullPath.findRev( "/" ) ) ,
- fullPath.mid( fullPath.findRev( "/" ) + 1 ) );
+ return fileExist( fullPath.left( fullPath.tqfindRev( "/" ) ) ,
+ fullPath.mid( fullPath.tqfindRev( "/" ) + 1 ) );
}
-bool KRpermHandler::fileExist( QString path, QString name ) {
- if ( QDir( path ).exists( name ) ) return true;
+bool KRpermHandler::fileExist( TQString path, TQString name ) {
+ if ( TQDir( path ).exists( name ) ) return true;
DIR* dir = opendir( path.local8Bit() );
if ( !dir ) return false;
struct dirent* dirEnt;
@@ -279,20 +279,20 @@ bool KRpermHandler::fileExist( QString path, QString name ) {
return false;
}
-QString KRpermHandler::parseSize( KIO::filesize_t val ) {
+TQString KRpermHandler::parseSize( KIO::filesize_t val ) {
#if (KDE_VERSION_MAJOR >= 3) && (KDE_VERSION_MINOR >= 5)
- return KGlobal::locale()->formatNumber(QString::number(val), false, 0);
+ return KGlobal::locale()->formatNumber(TQString::number(val), false, 0);
#else
return KGlobal::locale()->formatNumber(val);
#endif
#if 0
- QString temp;
+ TQString temp;
temp.sprintf( "%llu", val );
if ( temp.length() <= 3 ) return temp;
unsigned int i = temp.length() % 3;
if ( i == 0 ) i = 3;
- QString size = temp.left( i ) + ",";
+ TQString size = temp.left( i ) + ",";
while ( i + 3 < temp.length() ) {
size = size + temp.mid( i, 3 ) + ",";
i += 3;
@@ -303,8 +303,8 @@ QString KRpermHandler::parseSize( KIO::filesize_t val ) {
#endif
}
-QString KRpermHandler::date2qstring( QString date ) {
- QString temp;
+TQString KRpermHandler::date2qstring( TQString date ) {
+ TQString temp;
int year;
year = date[ 6 ].digitValue() * 10 + date[ 7 ].digitValue();
@@ -316,40 +316,40 @@ QString KRpermHandler::date2qstring( QString date ) {
return temp;
}
-time_t KRpermHandler::QString2time( QString date ) {
+time_t KRpermHandler::TQString2time( TQString date ) {
struct tm t;
t.tm_sec = 0;
- t.tm_min = ( QString( date[ 12 ] ) + QString( date[ 13 ] ) ).toInt();
- t.tm_hour = ( QString( date[ 9 ] ) + QString( date[ 10 ] ) ).toInt();
- t.tm_mday = ( QString( date[ 0 ] ) + QString( date[ 1 ] ) ).toInt();
- t.tm_mon = ( QString( date[ 3 ] ) + QString( date[ 4 ] ) ).toInt() - 1;
- t.tm_year = ( QString( date[ 6 ] ) + QString( date[ 7 ] ) ).toInt();
+ t.tm_min = ( TQString( date[ 12 ] ) + TQString( date[ 13 ] ) ).toInt();
+ t.tm_hour = ( TQString( date[ 9 ] ) + TQString( date[ 10 ] ) ).toInt();
+ t.tm_mday = ( TQString( date[ 0 ] ) + TQString( date[ 1 ] ) ).toInt();
+ t.tm_mon = ( TQString( date[ 3 ] ) + TQString( date[ 4 ] ) ).toInt() - 1;
+ t.tm_year = ( TQString( date[ 6 ] ) + TQString( date[ 7 ] ) ).toInt();
if ( t.tm_year < 70 ) t.tm_year += 100;
t.tm_isdst = -1; // daylight saving time information isn't availble
return mktime( &t );
}
-gid_t KRpermHandler::group2gid( QString group ) {
- gid_t * gid = groupCache->find( group );
+gid_t KRpermHandler::group2gid( TQString group ) {
+ gid_t * gid = groupCache->tqfind( group );
if ( gid ) return * gid;
return getgid();
}
-uid_t KRpermHandler::user2uid ( QString user ) {
- uid_t * uid = passwdCache->find( user );
+uid_t KRpermHandler::user2uid ( TQString user ) {
+ uid_t * uid = passwdCache->tqfind( user );
if ( uid ) return * uid;
return getuid();
}
-QString KRpermHandler::gid2group( gid_t groupId ) {
- QString * group = gidCache->find( groupId );
+TQString KRpermHandler::gid2group( gid_t groupId ) {
+ TQString * group = gidCache->tqfind( groupId );
if ( group ) return * group;
- return QString( "???" );
+ return TQString( "???" );
}
-QString KRpermHandler::uid2user ( uid_t userId ) {
- QString * user = uidCache->find( userId );
+TQString KRpermHandler::uid2user ( uid_t userId ) {
+ TQString * user = uidCache->tqfind( userId );
if ( user ) return * user;
- return QString( "???" );
+ return TQString( "???" );
}
diff --git a/krusader/VFS/krpermhandler.h b/krusader/VFS/krpermhandler.h
index 8529ca6..ffb9485 100644
--- a/krusader/VFS/krpermhandler.h
+++ b/krusader/VFS/krpermhandler.h
@@ -32,11 +32,11 @@
#ifndef KRPERMHANDLER_H
#define KRPERMHANDLER_H
-#include <qstring.h>
-#include <qfileinfo.h>
+#include <tqstring.h>
+#include <tqfileinfo.h>
#include <sys/types.h>
-#include <qdict.h>
-#include <qintdict.h>
+#include <tqdict.h>
+#include <tqintdict.h>
#include <kio/global.h>
#define NO_PERM 0
@@ -50,40 +50,40 @@ public:
static void init();
- static gid_t group2gid(QString group);
- static uid_t user2uid (QString user);
+ static gid_t group2gid(TQString group);
+ static uid_t user2uid (TQString user);
- static QString gid2group(gid_t groupId);
- static QString uid2user (uid_t userId);
+ static TQString gid2group(gid_t groupId);
+ static TQString uid2user (uid_t userId);
- static char writeable (QString perm, gid_t gid, uid_t uid, int rwx=-1);
- static char readable (QString perm, gid_t gid, uid_t uid, int rwx=-1);
- static char executable(QString perm, gid_t gid, uid_t uid, int rwx=-1);
+ static char writeable (TQString perm, gid_t gid, uid_t uid, int rwx=-1);
+ static char readable (TQString perm, gid_t gid, uid_t uid, int rwx=-1);
+ static char executable(TQString perm, gid_t gid, uid_t uid, int rwx=-1);
- static bool fileWriteable (QString localFile);
- static bool fileReadable (QString localFile);
- static bool fileExecutable(QString localFile);
+ static bool fileWriteable (TQString localFile);
+ static bool fileReadable (TQString localFile);
+ static bool fileExecutable(TQString localFile);
- static char ftpWriteable ( QString fileOwner, QString userName, QString perm );
- static char ftpReadable ( QString fileOwner, QString userName, QString perm );
- static char ftpExecutable( QString fileOwner, QString userName, QString perm );
+ static char ftpWriteable ( TQString fileOwner, TQString userName, TQString perm );
+ static char ftpReadable ( TQString fileOwner, TQString userName, TQString perm );
+ static char ftpExecutable( TQString fileOwner, TQString userName, TQString perm );
- static bool dirExist (QString path);
- static bool fileExist(QString fullPath);
- static bool fileExist(QString Path, QString name);
+ static bool dirExist (TQString path);
+ static bool fileExist(TQString fullPath);
+ static bool fileExist(TQString Path, TQString name);
- static QString mode2QString(mode_t m);
- static QString parseSize(KIO::filesize_t val);
- static QString date2qstring(QString date);
- static time_t QString2time(QString date);
+ static TQString mode2TQString(mode_t m);
+ static TQString parseSize(KIO::filesize_t val);
+ static TQString date2qstring(TQString date);
+ static time_t TQString2time(TQString date);
private:
// cache for passwd and group entries
- static QDict<uid_t> *passwdCache;
- static QDict<gid_t> *groupCache;
- static QIntDict<char> *currentGroups;
- static QIntDict<QString> *uidCache;
- static QIntDict<QString> *gidCache;
+ static TQDict<uid_t> *passwdCache;
+ static TQDict<gid_t> *groupCache;
+ static TQIntDict<char> *currentGroups;
+ static TQIntDict<TQString> *uidCache;
+ static TQIntDict<TQString> *gidCache;
};
#endif
diff --git a/krusader/VFS/krquery.cpp b/krusader/VFS/krquery.cpp
index a3a0443..c8a63de 100644
--- a/krusader/VFS/krquery.cpp
+++ b/krusader/VFS/krquery.cpp
@@ -37,13 +37,13 @@
#include "krarchandler.h"
#include "krpermhandler.h"
-#include <qtextstream.h>
-#include <qtextcodec.h>
-#include <qregexp.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
+#include <tqregexp.h>
#include <klargefile.h>
#include <klocale.h>
#include <kmimetype.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kurlcompletion.h>
#include <kio/job.h>
#include <kfileitem.h>
@@ -52,26 +52,26 @@
#define MAX_LINE_LEN 500
// set the defaults
-KRQuery::KRQuery(): QObject(), matchesCaseSensitive(true), bNull( true ),
- contain(QString::null),containCaseSensetive(true),
+KRQuery::KRQuery(): TQObject(), matchesCaseSensitive(true), bNull( true ),
+ contain(TQString()),containCaseSensetive(true),
containWholeWord(false),containOnRemote(false),
minSize(0),maxSize(0),newerThen(0),olderThen(0),
- owner(QString::null),group(QString::null),perm(QString::null),
- type(QString::null),inArchive(false),recurse(true),
+ owner(TQString()),group(TQString()),perm(TQString()),
+ type(TQString()),inArchive(false),recurse(true),
followLinksP(true), receivedBuffer( 0 ), processEventsConnected(0) {}
// set the defaults
-KRQuery::KRQuery( const QString &name, bool matchCase ) : QObject(),
- bNull( true ),contain(QString::null),containCaseSensetive(true),
+KRQuery::KRQuery( const TQString &name, bool matchCase ) : TQObject(),
+ bNull( true ),contain(TQString()),containCaseSensetive(true),
containWholeWord(false), containOnRemote(false),
minSize(0),maxSize(0),newerThen(0),olderThen(0),
- owner(QString::null),group(QString::null),perm(QString::null),
- type(QString::null),inArchive(false),recurse(true),
+ owner(TQString()),group(TQString()),perm(TQString()),
+ type(TQString()),inArchive(false),recurse(true),
followLinksP(true), receivedBuffer( 0 ), processEventsConnected(0) {
setNameFilter( name, matchCase );
}
-KRQuery::KRQuery( const KRQuery & that ) : QObject(), receivedBuffer( 0 ), processEventsConnected(0) {
+KRQuery::KRQuery( const KRQuery & that ) : TQObject(), receivedBuffer( 0 ), processEventsConnected(0) {
*this = that;
}
@@ -112,61 +112,61 @@ KRQuery& KRQuery::operator=(const KRQuery &old) {
}
void KRQuery::connectNotify ( const char * signal ) {
- QString signalString = QString( signal ).replace( " ", "" );
- QString processString = QString( SIGNAL( processEvents( bool & ) ) ).replace( " ", "" );
+ TQString signalString = TQString( signal ).tqreplace( " ", "" );
+ TQString processString = TQString( TQT_SIGNAL( processEvents( bool & ) ) ).tqreplace( " ", "" );
if( signalString == processString )
processEventsConnected++;
}
void KRQuery::disconnectNotify ( const char * signal ) {
- QString signalString = QString( signal ).replace( " ", "" );
- QString processString = QString( SIGNAL( processEvents( bool & ) ) ).replace( " ", "" );
+ TQString signalString = TQString( signal ).tqreplace( " ", "" );
+ TQString processString = TQString( TQT_SIGNAL( processEvents( bool & ) ) ).tqreplace( " ", "" );
if( signalString == processString )
processEventsConnected--;
}
-bool KRQuery::checkPerm( QString filePerm ) const
+bool KRQuery::checkPerm( TQString filePerm ) const
{
for ( int i = 0; i < 9; ++i )
if ( perm[ i ] != '?' && perm[ i ] != filePerm[ i + 1 ] ) return false;
return true;
}
-bool KRQuery::checkType( QString mime ) const
+bool KRQuery::checkType( TQString mime ) const
{
if ( type == mime ) return true;
if ( type == i18n( "Archives" ) ) return KRarcHandler::arcSupported( mime.right( 4 ) );
- if ( type == i18n( "Directories" ) ) return mime.contains( "directory" );
- if ( type == i18n( "Image Files" ) ) return mime.contains( "image/" );
- if ( type == i18n( "Text Files" ) ) return mime.contains( "text/" );
- if ( type == i18n( "Video Files" ) ) return mime.contains( "video/" );
- if ( type == i18n( "Audio Files" ) ) return mime.contains( "audio/" );
- if ( type == i18n( "Custom" ) ) return customType.contains( mime );
+ if ( type == i18n( "Directories" ) ) return mime.tqcontains( "directory" );
+ if ( type == i18n( "Image Files" ) ) return mime.tqcontains( "image/" );
+ if ( type == i18n( "Text Files" ) ) return mime.tqcontains( "text/" );
+ if ( type == i18n( "Video Files" ) ) return mime.tqcontains( "video/" );
+ if ( type == i18n( "Audio Files" ) ) return mime.tqcontains( "audio/" );
+ if ( type == i18n( "Custom" ) ) return customType.tqcontains( mime );
return false;
}
-bool KRQuery::match( const QString & name ) const {
+bool KRQuery::match( const TQString & name ) const {
return matchCommon( name, matches, excludes );
}
-bool KRQuery::matchDirName( const QString & name ) const {
+bool KRQuery::matchDirName( const TQString & name ) const {
return matchCommon( name, includedDirs, excludedDirs );
}
-bool KRQuery::matchCommon( const QString &nameIn, const QStringList &matchList, const QStringList &excludeList ) const
+bool KRQuery::matchCommon( const TQString &nameIn, const TQStringList &matchList, const TQStringList &excludeList ) const
{
if( excludeList.count() == 0 && matchList.count() == 0 ) /* true if there's no match condition */
return true;
- QString name( nameIn );
- int ndx = nameIn.findRev( '/' ); // virtual filenames may contain '/'
+ TQString name( nameIn );
+ int ndx = nameIn.tqfindRev( '/' ); // virtual filenames may contain '/'
if( ndx != -1 ) // but the end of the filename is OK
name = nameIn.mid( ndx + 1 );
unsigned int len;
for ( unsigned int i = 0; i < excludeList.count(); ++i )
{
- QRegExp( *excludeList.at( i ), matchesCaseSensitive, true ).match( name, 0, ( int* ) & len );
+ TQRegExp( *excludeList.at( i ), matchesCaseSensitive, true ).match( name, 0, ( int* ) & len );
if ( len == name.length() ) return false;
}
@@ -175,7 +175,7 @@ bool KRQuery::matchCommon( const QString &nameIn, const QStringList &matchList,
for ( unsigned int i = 0; i < matchList.count(); ++i )
{
- QRegExp( *matchList.at( i ), matchesCaseSensitive, true ).match( name, 0, ( int* ) & len );
+ TQRegExp( *matchList.at( i ), matchesCaseSensitive, true ).match( name, 0, ( int* ) & len );
if ( len == name.length() ) return true;
}
return false;
@@ -233,7 +233,7 @@ bool KRQuery::match( vfile *vf ) const
bool KRQuery::match( KFileItem *kfi ) const {
mode_t mode = kfi->mode() | kfi->permissions();
- QString perm = KRpermHandler::mode2QString( mode );
+ TQString perm = KRpermHandler::mode2TQString( mode );
if ( kfi->isDir() )
perm[ 0 ] = 'd';
@@ -246,22 +246,22 @@ bool KRQuery::match( KFileItem *kfi ) const {
// takes the string and adds BOLD to it, so that when it is displayed,
// the grepped text will be bold
-void fixFoundTextForDisplay(QString& haystack, int start, int length) {
- QString before = haystack.left( start );
- QString text = haystack.mid( start, length );
- QString after = haystack.mid( start + length );
+void fixFoundTextForDisplay(TQString& haystack, int start, int length) {
+ TQString before = haystack.left( start );
+ TQString text = haystack.mid( start, length );
+ TQString after = haystack.mid( start + length );
- before.replace( '&', "&amp;" );
- before.replace( '<', "&lt;" );
- before.replace( '>', "&gt;" );
+ before.tqreplace( '&', "&amp;" );
+ before.tqreplace( '<', "&lt;" );
+ before.tqreplace( '>', "&gt;" );
- text.replace( '&', "&amp;" );
- text.replace( '<', "&lt;" );
- text.replace( '>', "&gt;" );
+ text.tqreplace( '&', "&amp;" );
+ text.tqreplace( '<', "&lt;" );
+ text.tqreplace( '>', "&gt;" );
- after.replace( '&', "&amp;" );
- after.replace( '<', "&lt;" );
- after.replace( '>', "&gt;" );
+ after.tqreplace( '&', "&amp;" );
+ after.tqreplace( '<', "&lt;" );
+ after.tqreplace( '>', "&gt;" );
haystack = ("<qt>"+before+"<b>"+text+"</b>"+after+"</qt>" );
}
@@ -319,7 +319,7 @@ bool KRQuery::checkBuffer( const char *buf, int len ) const {
bool KRQuery::checkLines( const char * buf, int len ) const
{
- QStringList list;
+ TQStringList list;
int start = 0;
int k = 0;
@@ -329,7 +329,7 @@ bool KRQuery::checkLines( const char * buf, int len ) const
{
if( k != start )
{
- QString line = QTextCodec::codecForLocale()->toUnicode( buf + start, k - start );
+ TQString line = TQTextCodec::codecForLocale()->toUnicode( buf + start, k - start );
if( !line.isEmpty() )
list << line;
}
@@ -339,22 +339,22 @@ bool KRQuery::checkLines( const char * buf, int len ) const
}
if( start != k )
{
- QString line = QTextCodec::codecForLocale()->toUnicode( buf + start, k - start );
+ TQString line = TQTextCodec::codecForLocale()->toUnicode( buf + start, k - start );
if( !line.isEmpty() )
list << line;
}
for( unsigned int i=0; i != list.count(); i++ ) {
- QString line = list[ i ];
+ TQString line = list[ i ];
int ndx = 0;
if ( line.isNull() ) return false;
if ( containWholeWord )
{
- while ( ( ndx = line.find( contain, ndx, containCaseSensetive ) ) != -1 )
+ while ( ( ndx = line.tqfind( contain, ndx, containCaseSensetive ) ) != -1 )
{
- QChar before = line.at( ndx - 1 );
- QChar after = line.at( ndx + contain.length() );
+ TQChar before = line.at( ndx - 1 );
+ TQChar after = line.at( ndx + contain.length() );
if ( !before.isLetterOrNumber() && !after.isLetterOrNumber() &&
after != '_' && before != '_' ) {
@@ -365,7 +365,7 @@ bool KRQuery::checkLines( const char * buf, int len ) const
ndx++;
}
}
- else if ( (ndx = line.find( contain, 0, containCaseSensetive )) != -1 ) {
+ else if ( (ndx = line.tqfind( contain, 0, containCaseSensetive )) != -1 ) {
lastSuccessfulGrep = line;
fixFoundTextForDisplay(lastSuccessfulGrep, ndx, contain.length());
return true;
@@ -374,9 +374,9 @@ bool KRQuery::checkLines( const char * buf, int len ) const
return false;
}
-bool KRQuery::containsContent( QString file ) const
+bool KRQuery::containsContent( TQString file ) const
{
- QFile qf( file );
+ TQFile qf( file );
if( !qf.open( IO_ReadOnly ) )
return false;
@@ -403,17 +403,17 @@ bool KRQuery::containsContent( QString file ) const
if( checkBuffer( buffer, 0 ) )
return true;
- lastSuccessfulGrep = QString::null; // nothing was found
+ lastSuccessfulGrep = TQString(); // nothing was found
return false;
}
bool KRQuery::containsContent( KURL url ) const
{
KIO::TransferJob *contentReader = KIO::get( url, false, false );
- connect(contentReader, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(containsContentData(KIO::Job *, const QByteArray &)));
- connect(contentReader, SIGNAL( result( KIO::Job* ) ),
- this, SLOT(containsContentFinished( KIO::Job* ) ) );
+ connect(contentReader, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(containsContentData(KIO::Job *, const TQByteArray &)));
+ connect(contentReader, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT(containsContentFinished( KIO::Job* ) ) );
busy = true;
containsContentResult = false;
@@ -432,7 +432,7 @@ bool KRQuery::containsContent( KURL url ) const
return containsContentResult;
}
-void KRQuery::containsContentData(KIO::Job *job, const QByteArray &array) {
+void KRQuery::containsContentData(KIO::Job *job, const TQByteArray &array) {
receivedBytes += array.size();
if( checkBuffer( array.data(), array.size() ) ) {
containsContentResult = true;
@@ -450,8 +450,8 @@ void KRQuery::containsContentFinished( KIO::Job * ) {
bool KRQuery::checkTimer() const {
if( timer.elapsed() >= STATUS_SEND_DELAY ) {
int pcnt = (int)(100.*(double)receivedBytes/(double)totalBytes + .5);
- QString message = i18n( "Searching content of '%1' (%2%)" )
- .arg( fileName ).arg( pcnt );
+ TQString message = i18n( "Searching content of '%1' (%2%)" )
+ .tqarg( fileName ).tqarg( pcnt );
timer.start();
emit ((KRQuery *)this)->status( message );
return true;
@@ -459,9 +459,9 @@ bool KRQuery::checkTimer() const {
return false;
}
-QStringList KRQuery::split( QString str )
+TQStringList KRQuery::split( TQString str )
{
- QStringList list;
+ TQStringList list;
unsigned splitNdx = 0;
unsigned startNdx = 0;
bool quotation = false;
@@ -473,7 +473,7 @@ QStringList KRQuery::split( QString str )
if( !quotation && str[ splitNdx ] == ' ')
{
- QString section = str.mid( startNdx, splitNdx - startNdx );
+ TQString section = str.mid( startNdx, splitNdx - startNdx );
startNdx = splitNdx+1;
if( section.startsWith( "\"" ) && section.endsWith( "\"" ) && section.length() >=2 )
section = section.mid( 1, section.length()-2 );
@@ -485,7 +485,7 @@ QStringList KRQuery::split( QString str )
if( startNdx < splitNdx )
{
- QString section = str.mid( startNdx, splitNdx - startNdx );
+ TQString section = str.mid( startNdx, splitNdx - startNdx );
if( section.startsWith( "\"" ) && section.endsWith( "\"" ) && section.length() >=2 )
section = section.mid( 1, section.length()-2 );
if( !section.isEmpty() )
@@ -495,14 +495,14 @@ QStringList KRQuery::split( QString str )
return list;
}
-void KRQuery::setNameFilter( const QString &text, bool cs )
+void KRQuery::setNameFilter( const TQString &text, bool cs )
{
bNull = false;
matchesCaseSensitive = cs;
origFilter = text;
- QString matchText = text;
- QString excludeText;
+ TQString matchText = text;
+ TQString excludeText;
unsigned excludeNdx = 0;
bool quotationMark = 0;
@@ -539,7 +539,7 @@ void KRQuery::setNameFilter( const QString &text, bool cs )
continue;
}
- if( !matches[ i ].contains( "*" ) && !matches[ i ].contains( "?" ) )
+ if( !matches[ i ].tqcontains( "*" ) && !matches[ i ].tqcontains( "?" ) )
matches[ i ] = "*" + matches[ i ] + "*";
i++;
@@ -555,14 +555,14 @@ void KRQuery::setNameFilter( const QString &text, bool cs )
continue;
}
- if( !excludes[ i ].contains( "*" ) && !excludes[ i ].contains( "?" ) )
+ if( !excludes[ i ].tqcontains( "*" ) && !excludes[ i ].tqcontains( "?" ) )
excludes[ i ] = "*" + excludes[ i ] + "*";
i++;
}
}
-void KRQuery::setContent( const QString &content, bool cs, bool wholeWord, bool remoteSearch )
+void KRQuery::setContent( const TQString &content, bool cs, bool wholeWord, bool remoteSearch )
{
bNull = false;
contain = content;
@@ -571,16 +571,16 @@ void KRQuery::setContent( const QString &content, bool cs, bool wholeWord, bool
containOnRemote = remoteSearch;
}
-void KRQuery::setMinimumFileSize( KIO::filesize_t minimumSize )
+void KRQuery::setMinimumFileSize( KIO::filesize_t tqminimumSize )
{
bNull = false;
- minSize = minimumSize;
+ minSize = tqminimumSize;
}
-void KRQuery::setMaximumFileSize( KIO::filesize_t maximumSize )
+void KRQuery::setMaximumFileSize( KIO::filesize_t tqmaximumSize )
{
bNull = false;
- maxSize = maximumSize;
+ maxSize = tqmaximumSize;
}
void KRQuery::setNewerThan( time_t time )
@@ -595,25 +595,25 @@ void KRQuery::setOlderThan( time_t time )
olderThen = time;
}
-void KRQuery::setOwner( const QString &ownerIn )
+void KRQuery::setOwner( const TQString &ownerIn )
{
bNull = false;
owner = ownerIn;
}
-void KRQuery::setGroup( const QString &groupIn )
+void KRQuery::setGroup( const TQString &groupIn )
{
bNull = false;
group = groupIn;
}
-void KRQuery::setPermissions( const QString &permIn )
+void KRQuery::setPermissions( const TQString &permIn )
{
bNull = false;
perm = permIn;
}
-void KRQuery::setMimeType( const QString &typeIn, QStringList customList )
+void KRQuery::setMimeType( const TQString &typeIn, TQStringList customList )
{
bNull = false;
type = typeIn;
@@ -635,7 +635,7 @@ bool KRQuery::isExcluded( const KURL &url )
void KRQuery::setSearchInDirs( const KURL::List &urls ) {
whereToSearch.clear();
for( unsigned int i = 0; i < urls.count(); ++i ) {
- QString url = urls[ i ].url();
+ TQString url = urls[ i ].url();
KURL completed = vfs::fromPathOrURL( KURLCompletion::replacedPath( url, true, true ) );
whereToSearch.append( completed );
}
@@ -644,7 +644,7 @@ void KRQuery::setSearchInDirs( const KURL::List &urls ) {
void KRQuery::setDontSearchInDirs( const KURL::List &urls ) {
whereNotToSearch.clear();
for( unsigned int i = 0; i < urls.count(); ++i ) {
- QString url = urls[ i ].url();
+ TQString url = urls[ i ].url();
KURL completed = vfs::fromPathOrURL( KURLCompletion::replacedPath( url, true, true ) );
whereNotToSearch.append( completed );
}
diff --git a/krusader/VFS/krquery.h b/krusader/VFS/krquery.h
index 5849d79..e7bb86f 100644
--- a/krusader/VFS/krquery.h
+++ b/krusader/VFS/krquery.h
@@ -27,11 +27,11 @@
* (at your option) any later version. *
* *
***************************************************************************/
-#ifndef KRQUERY_H
-#define KRQUERY_H
+#ifndef KRTQUERY_H
+#define KRTQUERY_H
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
#include <time.h>
#include <kurl.h>
#include <kio/jobclasses.h>
@@ -39,14 +39,15 @@
class KFileItem;
-class KRQuery : public QObject {
+class KRQuery : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
// null query
KRQuery();
// query only with name filter
- KRQuery( const QString &name, bool matchCase = true );
+ KRQuery( const TQString &name, bool matchCase = true );
// copy constructor
KRQuery( const KRQuery & );
// let operator
@@ -59,14 +60,14 @@ public:
// matching a KIO file with the query
bool match( KFileItem *file ) const;// checks if the given vfile object matches the conditions
// matching a name with the query
- bool match( const QString &name ) const;// matching the filename only
+ bool match( const TQString &name ) const;// matching the filename only
// matching the name of the directory
- bool matchDirName( const QString &name ) const;
+ bool matchDirName( const TQString &name ) const;
// sets the text for name filtering
- void setNameFilter( const QString &text, bool cs=true );
- // returns the current filter mask
- const QString& nameFilter() const { return origFilter; }
+ void setNameFilter( const TQString &text, bool cs=true );
+ // returns the current filter tqmask
+ const TQString& nameFilter() const { return origFilter; }
// returns whether the filter is case sensitive
bool isCaseSensitive() { return matchesCaseSensitive; }
@@ -74,7 +75,7 @@ public:
bool isNull() {return bNull;};
// sets the content part of the query
- void setContent( const QString &content, bool cs=true, bool wholeWord=false, bool remoteSearch=false );
+ void setContent( const TQString &content, bool cs=true, bool wholeWord=false, bool remoteSearch=false );
// sets the minimum file size limit
void setMinimumFileSize( KIO::filesize_t );
@@ -87,11 +88,11 @@ public:
void setOlderThan( time_t time );
// sets the owner
- void setOwner( const QString &ownerIn );
+ void setOwner( const TQString &ownerIn );
// sets the group
- void setGroup( const QString &groupIn );
+ void setGroup( const TQString &groupIn );
// sets the permissions
- void setPermissions( const QString &permIn );
+ void setPermissions( const TQString &permIn );
// sets the mimetype for the query
// type, must be one of the following:
@@ -99,8 +100,8 @@ public:
// 2. one of: i18n("Archives"), i18n("Directories"), i18n("Image Files")
// i18n("Text Files"), i18n("Video Files"), i18n("Audio Files")
// 3. i18n("Custom") in which case you must supply a list of valid mime-types
- // in the member QStringList customType
- void setMimeType( const QString &typeIn, QStringList customList = QStringList() );
+ // in the member TQStringList customType
+ void setMimeType( const TQString &typeIn, TQStringList customList = TQStringList() );
// true if setMimeType was called
bool hasMimeType() { return type.isEmpty(); }
@@ -130,7 +131,7 @@ public:
// gives whether we search for content
bool isContentSearched() const { return !contain.isEmpty(); }
- const QString& foundText() const { return lastSuccessfulGrep; }
+ const TQString& foundText() const { return lastSuccessfulGrep; }
protected:
// important to know whether the event processor is connected
@@ -139,15 +140,15 @@ protected:
virtual void disconnectNotify ( const char * signal );
protected:
- QStringList matches; // what to search
- QStringList excludes; // what to exclude
- QStringList includedDirs; // what dirs to include
- QStringList excludedDirs; // what dirs to exclude
+ TQStringList matches; // what to search
+ TQStringList excludes; // what to exclude
+ TQStringList includedDirs; // what dirs to include
+ TQStringList excludedDirs; // what dirs to exclude
bool matchesCaseSensitive;
bool bNull; // flag if the query is null
- QString contain; // file must contain this string
+ TQString contain; // file must contain this string
bool containCaseSensetive;
bool containWholeWord;
bool containOnRemote;
@@ -158,12 +159,12 @@ protected:
time_t newerThen;
time_t olderThen;
- QString owner;
- QString group;
- QString perm;
+ TQString owner;
+ TQString group;
+ TQString perm;
- QString type;
- QStringList customType;
+ TQString type;
+ TQStringList customType;
bool inArchive; // if true- search in archive.
bool recurse; // if true recurse ob sub-dirs...
@@ -173,36 +174,36 @@ protected:
KURL::List whereNotToSearch; // directorys NOT to search
signals:
- void status( const QString &name );
+ void status( const TQString &name );
void processEvents( bool & stopped );
private:
- bool matchCommon( const QString &, const QStringList &, const QStringList & ) const;
- bool checkPerm(QString perm) const;
- bool checkType(QString mime) const;
- bool containsContent( QString file ) const;
+ bool matchCommon( const TQString &, const TQStringList &, const TQStringList & ) const;
+ bool checkPerm(TQString perm) const;
+ bool checkType(TQString mime) const;
+ bool containsContent( TQString file ) const;
bool containsContent( KURL url ) const;
bool checkBuffer( const char *buffer, int len ) const;
bool checkLines( const char *buffer, int len ) const;
bool checkTimer() const;
- QStringList split( QString );
+ TQStringList split( TQString );
private slots:
- void containsContentData(KIO::Job *, const QByteArray &);
+ void containsContentData(KIO::Job *, const TQByteArray &);
void containsContentFinished(KIO::Job*);
private:
- QString origFilter;
+ TQString origFilter;
mutable bool busy;
mutable bool containsContentResult;
mutable char * receivedBuffer;
mutable int receivedBufferLen;
- mutable QString lastSuccessfulGrep;
- mutable QString fileName;
+ mutable TQString lastSuccessfulGrep;
+ mutable TQString fileName;
mutable KIO::filesize_t receivedBytes;
mutable KIO::filesize_t totalBytes;
mutable int processEventsConnected;
- mutable QTime timer;
+ mutable TQTime timer;
};
#endif
diff --git a/krusader/VFS/krvfshandler.cpp b/krusader/VFS/krvfshandler.cpp
index 6a116fa..72a436d 100644
--- a/krusader/VFS/krvfshandler.cpp
+++ b/krusader/VFS/krvfshandler.cpp
@@ -21,7 +21,7 @@
#include "ftp_vfs.h"
#include "virt_vfs.h"
-#include <qdir.h>
+#include <tqdir.h>
#include <kdebug.h>
@@ -32,10 +32,10 @@ KrVfsHandler::~KrVfsHandler(){
}
vfs::VFS_TYPE KrVfsHandler::getVfsType(const KURL& url){
- QString protocol = url.protocol();
+ TQString protocol = url.protocol();
if( ( protocol == "krarc" || protocol == "tar" || protocol == "zip" ) &&
- QDir(url.path(-1)).exists() )
+ TQDir(url.path(-1)).exists() )
return vfs::NORMAL;
if( url.isLocalFile() ){
@@ -48,7 +48,7 @@ vfs::VFS_TYPE KrVfsHandler::getVfsType(const KURL& url){
return vfs::ERROR;
}
-vfs* KrVfsHandler::getVfs(const KURL& url,QObject* parent,vfs* oldVfs){
+vfs* KrVfsHandler::getVfs(const KURL& url,TQObject* tqparent,vfs* oldVfs){
vfs::VFS_TYPE newType,oldType = vfs::ERROR;
if(oldVfs) oldType = oldVfs->vfs_getType();
@@ -59,10 +59,10 @@ vfs* KrVfsHandler::getVfs(const KURL& url,QObject* parent,vfs* oldVfs){
if( oldType != newType ){
switch( newType ){
- case (vfs::NORMAL) : newVfs = new normal_vfs(parent); break;
- case (vfs::FTP ) : newVfs = new ftp_vfs(parent) ; break;
- case (vfs::TEMP ) : newVfs = 0/*new temp_vfs(parent)*/ ; break;
- case (vfs::VIRT ) : newVfs = new virt_vfs(parent) ; break;
+ case (vfs::NORMAL) : newVfs = new normal_vfs(tqparent); break;
+ case (vfs::FTP ) : newVfs = new ftp_vfs(tqparent) ; break;
+ case (vfs::TEMP ) : newVfs = 0/*new temp_vfs(tqparent)*/ ; break;
+ case (vfs::VIRT ) : newVfs = new virt_vfs(tqparent) ; break;
case (vfs::ERROR ) : newVfs = 0 ; break;
}
}
diff --git a/krusader/VFS/krvfshandler.h b/krusader/VFS/krvfshandler.h
index 698a504..900af8a 100644
--- a/krusader/VFS/krvfshandler.h
+++ b/krusader/VFS/krvfshandler.h
@@ -18,7 +18,7 @@
#ifndef KRVFSHANDLER_H
#define KRVFSHANDLER_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
@@ -28,13 +28,13 @@
*@author Shie Erlich & Rafi Yanai
*/
-class KrVfsHandler : public QObject {
+class KrVfsHandler : public TQObject {
public:
KrVfsHandler();
~KrVfsHandler();
static vfs::VFS_TYPE getVfsType(const KURL& url);
- static vfs* getVfs(const KURL& url,QObject* parent=0,vfs* oldVfs=0);
+ static vfs* getVfs(const KURL& url,TQObject* tqparent=0,vfs* oldVfs=0);
};
#endif
diff --git a/krusader/VFS/normal_vfs.cpp b/krusader/VFS/normal_vfs.cpp
index adbfb34..9db06a7 100644
--- a/krusader/VFS/normal_vfs.cpp
+++ b/krusader/VFS/normal_vfs.cpp
@@ -33,8 +33,8 @@
#include <unistd.h>
#include <dirent.h>
// QT includes
-#include <qdir.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqtimer.h>
// KDE includes
#include <kmessagebox.h>
#include <kmimetype.h>
@@ -64,12 +64,12 @@
#endif
#endif
-normal_vfs::normal_vfs(QObject* panel):vfs(panel), watcher(0) {
+normal_vfs::normal_vfs(TQObject* panel):vfs(panel), watcher(0) {
vfs_type=NORMAL;
}
bool normal_vfs::populateVfsList(const KURL& origin, bool showHidden){
- QString path = origin.path(-1);
+ TQString path = origin.path(-1);
// set the writable attribute to true, if that's not the case - the KIO job
// will give the warnings and errors
@@ -85,9 +85,9 @@ bool normal_vfs::populateVfsList(const KURL& origin, bool showHidden){
vfs_origin.cleanPath(-1);
// check that the new origin exists
- if ( !QDir(path).exists() )
+ if ( !TQDir(path).exists() )
{
- if( !quietMode ) KMessageBox::error(krApp, i18n("Directory %1 does not exist!").arg( path ), i18n("Error"));
+ if( !quietMode ) KMessageBox::error(krApp, i18n("Directory %1 does not exist!").tqarg( path ), i18n("Error"));
return false;
}
@@ -97,12 +97,12 @@ bool normal_vfs::populateVfsList(const KURL& origin, bool showHidden){
DIR* dir = opendir(path.local8Bit());
if(!dir)
{
- if( !quietMode ) KMessageBox::error(krApp, i18n("Can't open the %1 directory!").arg( path ), i18n("Error"));
+ if( !quietMode ) KMessageBox::error(krApp, i18n("Can't open the %1 directory!").tqarg( path ), i18n("Error"));
return false;
}
// change directory to the new directory
- QString save = getcwd( 0, 0 );
+ TQString save = getcwd( 0, 0 );
if (chdir(path.local8Bit()) != 0) {
if( !quietMode ) KMessageBox::error(krApp, i18n("Access denied to")+path, i18n("Error"));
closedir(dir);
@@ -110,10 +110,10 @@ bool normal_vfs::populateVfsList(const KURL& origin, bool showHidden){
}
struct dirent* dirEnt;
- QString name;
+ TQString name;
while( (dirEnt=readdir(dir)) != NULL ){
- name = QString::fromLocal8Bit(dirEnt->d_name);
+ name = TQString::fromLocal8Bit(dirEnt->d_name);
// show hidden files ?
if ( !showHidden && name.left(1) == "." ) continue ;
@@ -131,9 +131,9 @@ bool normal_vfs::populateVfsList(const KURL& origin, bool showHidden){
{
watcher = new KDirWatch();
// connect the watcher
- connect(watcher,SIGNAL(dirty(const QString&)),this,SLOT(vfs_slotDirty(const QString&)));
- connect(watcher,SIGNAL(created(const QString&)),this, SLOT(vfs_slotCreated(const QString&)));
- connect(watcher,SIGNAL(deleted(const QString&)),this, SLOT(vfs_slotDeleted(const QString&)));
+ connect(watcher,TQT_SIGNAL(dirty(const TQString&)),this,TQT_SLOT(vfs_slotDirty(const TQString&)));
+ connect(watcher,TQT_SIGNAL(created(const TQString&)),this, TQT_SLOT(vfs_slotCreated(const TQString&)));
+ connect(watcher,TQT_SIGNAL(deleted(const TQString&)),this, TQT_SLOT(vfs_slotDeleted(const TQString&)));
watcher->addDir(vfs_getOrigin().path(-1),true); //start watching the new dir
watcher->startScan(true);
}
@@ -142,7 +142,7 @@ bool normal_vfs::populateVfsList(const KURL& origin, bool showHidden){
}
// copy a file to the vfs (physical)
-void normal_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir, PreserveMode pmode ){
+void normal_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir, PreserveMode pmode ){
//if( watcher ) watcher->stopScan(); // we will refresh manually this time...
if( watcher ) {
delete watcher; // stopScan is buggy, leaves reference on the directory, that's why we delete the watcher
@@ -153,18 +153,18 @@ void normal_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,Q
dest.setPath(vfs_workingDir()+"/"+dir);
KIO::Job* job = PreservingCopyJob::createCopyJob( pmode, *fileUrls,dest,mode,false,true );
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(vfs_refresh()) );
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh()) );
if(mode == KIO::CopyJob::Move) // notify the other panel
- connect(job,SIGNAL(result(KIO::Job*)),toNotify,SLOT(vfs_refresh(KIO::Job*)) );
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),toNotify,TQT_SLOT(vfs_refresh(KIO::Job*)) );
else
job->setAutoErrorHandlingEnabled( true );
}
// remove a file from the vfs (physical)
-void normal_vfs::vfs_delFiles(QStringList *fileNames){
+void normal_vfs::vfs_delFiles(TQStringList *fileNames){
KURL::List filesUrls;
KURL url;
- QDir local( vfs_workingDir() );
+ TQDir local( vfs_workingDir() );
vfile* vf;
// if( watcher ) watcher->stopScan(); // we will refresh manually this time...
@@ -175,7 +175,7 @@ void normal_vfs::vfs_delFiles(QStringList *fileNames){
// names -> urls
for(uint i=0 ; i<fileNames->count(); ++i){
- QString filename = (*fileNames)[i];
+ TQString filename = (*fileNames)[i];
vf = vfs_search(filename);
url.setPath( vfs_workingDir()+"/"+filename);
filesUrls.append(url);
@@ -190,38 +190,38 @@ void normal_vfs::vfs_delFiles(QStringList *fileNames){
#else
job = new KIO::CopyJob(filesUrls,KGlobalSettings::trashPath(),KIO::CopyJob::Move,false,true );
#endif
- connect(job,SIGNAL(result(KIO::Job*)),SLOTS,SLOT(changeTrashIcon()));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),SLOTS,TQT_SLOT(changeTrashIcon()));
}
else
job = new KIO::DeleteJob(filesUrls, false, true);
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(vfs_refresh(KIO::Job*)));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*)));
}
// return a path to the file
-KURL normal_vfs::vfs_getFile(const QString& name){
- QString url;
+KURL normal_vfs::vfs_getFile(const TQString& name){
+ TQString url;
if ( vfs_workingDir() == "/" ) url = "/"+name;
else url = vfs_workingDir()+"/"+name;
return vfs::fromPathOrURL(url);
}
-KURL::List* normal_vfs::vfs_getFiles(QStringList* names){
+KURL::List* normal_vfs::vfs_getFiles(TQStringList* names){
KURL::List* urls = new KURL::List();
- for(QStringList::Iterator name = names->begin(); name != names->end(); ++name){
+ for(TQStringList::Iterator name = names->begin(); name != names->end(); ++name){
urls->append( vfs_getFile(*name) );
}
return urls;
}
-void normal_vfs::vfs_mkdir(const QString& name){
- if (!QDir(vfs_workingDir()).mkdir(name))
+void normal_vfs::vfs_mkdir(const TQString& name){
+ if (!TQDir(vfs_workingDir()).mkdir(name))
if (!quietMode) KMessageBox::sorry(krApp,i18n("Can't create a directory. Check your permissions."));
vfs::vfs_refresh();
}
-void normal_vfs::vfs_rename(const QString& fileName,const QString& newName){
+void normal_vfs::vfs_rename(const TQString& fileName,const TQString& newName){
KURL::List fileUrls;
KURL url , dest;
@@ -236,22 +236,22 @@ void normal_vfs::vfs_rename(const QString& fileName,const QString& newName){
dest.setPath(vfs_workingDir()+"/"+newName);
KIO::Job *job = new KIO::CopyJob(fileUrls,dest,KIO::CopyJob::Move,true,false );
- connect(job,SIGNAL(result(KIO::Job*)),this,SLOT(vfs_refresh(KIO::Job*)));
+ connect(job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(vfs_refresh(KIO::Job*)));
}
-vfile* normal_vfs::vfileFromName(const QString& name){
- QString path = vfs_workingDir()+"/"+name;
- QCString fileName = path.local8Bit();
+vfile* normal_vfs::vfileFromName(const TQString& name){
+ TQString path = vfs_workingDir()+"/"+name;
+ TQCString fileName = path.local8Bit();
KDE_struct_stat stat_p;
KDE_lstat(fileName.data(),&stat_p);
KIO::filesize_t size = stat_p.st_size;
- QString perm = KRpermHandler::mode2QString(stat_p.st_mode);
+ TQString perm = KRpermHandler::mode2TQString(stat_p.st_mode);
bool symLink= S_ISLNK(stat_p.st_mode);
if( S_ISDIR(stat_p.st_mode) ) perm[0] = 'd';
KURL mimeUrl = fromPathOrURL(path);
- QString mime=QString::null;
+ TQString mime=TQString();
char symDest[256];
bzero(symDest,256);
@@ -259,8 +259,8 @@ vfile* normal_vfs::vfileFromName(const QString& name){
int endOfName=0;
endOfName=readlink(fileName.data(),symDest,256);
if ( endOfName != -1 ){
- if ( QDir(QString::fromLocal8Bit( symDest ) ).exists() ) perm[0] = 'd';
- if ( !QDir(vfs_workingDir()).exists( QString::fromLocal8Bit ( symDest ) ) ) mime = "Broken Link !";
+ if ( TQDir(TQString::fromLocal8Bit( symDest ) ).exists() ) perm[0] = 'd';
+ if ( !TQDir(vfs_workingDir()).exists( TQString::fromLocal8Bit ( symDest ) ) ) mime = "Broken Link !";
}
else krOut << "Failed to read link: "<< path<<endl;
}
@@ -275,16 +275,16 @@ vfile* normal_vfs::vfileFromName(const QString& name){
// create a new virtual file object
vfile* temp=new vfile(name,size,perm,stat_p.st_mtime,symLink,stat_p.st_uid,
- stat_p.st_gid,mime,QString::fromLocal8Bit( symDest ),stat_p.st_mode, rwx);
+ stat_p.st_gid,mime,TQString::fromLocal8Bit( symDest ),stat_p.st_mode, rwx);
temp->vfile_setUrl( mimeUrl );
return temp;
}
-void normal_vfs::getACL( vfile *file, QString &acl, QString &defAcl )
+void normal_vfs::getACL( vfile *file, TQString &acl, TQString &defAcl )
{
- acl = defAcl = QString::null;
+ acl = defAcl = TQString();
#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
- QCString fileName = file->vfile_getUrl().path( -1 ).local8Bit();
+ TQCString fileName = file->vfile_getUrl().path( -1 ).local8Bit();
#if HAVE_NON_POSIX_ACL_EXTENSIONS
if ( acl_extended_file( fileName.data() ) )
{
@@ -298,12 +298,12 @@ void normal_vfs::getACL( vfile *file, QString &acl, QString &defAcl )
#endif
}
-QString normal_vfs::getACL( const QString & path, int type )
+TQString normal_vfs::getACL( const TQString & path, int type )
{
#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
acl_t acl = 0;
// do we have an acl for the file, and/or a default acl for the dir, if it is one?
- if ( ( acl = acl_get_file( path.data(), type ) ) != 0 )
+ if ( ( acl = acl_get_file( path.ascii(), type ) ) != 0 )
{
bool aclExtended = false;
@@ -334,16 +334,16 @@ QString normal_vfs::getACL( const QString & path, int type )
}
if( acl == 0 )
- return QString::null;
+ return TQString();
char *aclString = acl_to_text( acl, 0 );
- QString ret = QString::fromLatin1( aclString );
+ TQString ret = TQString::tqfromLatin1( aclString );
acl_free( (void*)aclString );
acl_free( acl );
return ret;
#else
- return QString::null;
+ return TQString();
#endif
}
@@ -352,26 +352,26 @@ void normal_vfs::vfs_slotRefresh()
krConfig->setGroup("Advanced");
int maxRefreshFrequency = krConfig->readNumEntry("Max Refresh Frequency", 1000);
vfs_refresh();
- disconnect( &refreshTimer, SIGNAL( timeout() ), this, SLOT( vfs_slotRefresh() ) );
+ disconnect( &refreshTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( vfs_slotRefresh() ) );
refreshTimer.start( maxRefreshFrequency, true );
}
-bool normal_vfs::burstRefresh(const QString& path ){
+bool normal_vfs::burstRefresh(const TQString& path ){
if( path == vfs_getOrigin().path(-1) ) {
if( !refreshTimer.isActive() ) {
// the directory itself is dirty - full refresh is needed
- QTimer::singleShot(0, this, SLOT( vfs_slotRefresh() ) ); // safety: dirty signal comes from KDirWatch!
+ TQTimer::singleShot(0, this, TQT_SLOT( vfs_slotRefresh() ) ); // safety: dirty signal comes from KDirWatch!
return true;
}
- disconnect( &refreshTimer, SIGNAL( timeout() ), this, SLOT( vfs_slotRefresh() ) );
- connect( &refreshTimer, SIGNAL( timeout() ), this, SLOT( vfs_slotRefresh() ) );
+ disconnect( &refreshTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( vfs_slotRefresh() ) );
+ connect( &refreshTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( vfs_slotRefresh() ) );
postponedRefreshURL = fromPathOrURL(path);
return true;
}
return false;
}
-void normal_vfs::vfs_slotDirty(const QString& path){
+void normal_vfs::vfs_slotDirty(const TQString& path){
if( disableRefresh ){
postponedRefreshURL = fromPathOrURL(path);
return;
@@ -381,7 +381,7 @@ void normal_vfs::vfs_slotDirty(const QString& path){
return;
KURL url = fromPathOrURL(path);
- QString name = url.fileName();
+ TQString name = url.fileName();
// do we have it already ?
if( !vfs_search(name ) ) return vfs_slotCreated(path);
@@ -393,7 +393,7 @@ void normal_vfs::vfs_slotDirty(const QString& path){
emit updatedVfile(vf);
}
-void normal_vfs::vfs_slotCreated(const QString& path){
+void normal_vfs::vfs_slotCreated(const TQString& path){
if( disableRefresh ){
postponedRefreshURL = fromPathOrURL(path);
return;
@@ -404,7 +404,7 @@ void normal_vfs::vfs_slotCreated(const QString& path){
KURL url = fromPathOrURL(path);
- QString name = url.fileName();
+ TQString name = url.fileName();
// if it's in the CVS - it's an update not new file
if( vfs_search(name) )
return vfs_slotDirty(path);
@@ -414,7 +414,7 @@ void normal_vfs::vfs_slotCreated(const QString& path){
emit addedVfile(vf);
}
-void normal_vfs::vfs_slotDeleted(const QString& path){
+void normal_vfs::vfs_slotDeleted(const TQString& path){
if( disableRefresh ){
postponedRefreshURL = fromPathOrURL(path);
return;
@@ -425,7 +425,7 @@ void normal_vfs::vfs_slotDeleted(const QString& path){
KURL url = fromPathOrURL(path);
- QString name = url.fileName();
+ TQString name = url.fileName();
// if it's not in the CVS - do nothing
if( vfs_search(name) ){
diff --git a/krusader/VFS/normal_vfs.h b/krusader/VFS/normal_vfs.h
index 9c7d067..9fd01e1 100644
--- a/krusader/VFS/normal_vfs.h
+++ b/krusader/VFS/normal_vfs.h
@@ -32,7 +32,7 @@
#define NORMAL_VFS
// QT includes
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes
#include <kfileitem.h>
#include <kdirwatch.h>
@@ -46,47 +46,48 @@
*/
class normal_vfs : public vfs{
Q_OBJECT
+ TQ_OBJECT
public:
// the constructor simply uses the inherited constructor
- normal_vfs(QObject* panel);
+ normal_vfs(TQObject* panel);
~normal_vfs(){if( watcher ) delete watcher;}
/// Copy a file to the vfs (physical).
- virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = "", PreserveMode pmode = PM_DEFAULT );
+ virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir = "", PreserveMode pmode = PM_DEFAULT );
/// Remove a file from the vfs (physical)
- virtual void vfs_delFiles(QStringList *fileNames);
+ virtual void vfs_delFiles(TQStringList *fileNames);
/// Return a list of URLs for multiple files
- virtual KURL::List* vfs_getFiles(QStringList* names);
+ virtual KURL::List* vfs_getFiles(TQStringList* names);
/// Return a URL to a single file
- virtual KURL vfs_getFile(const QString& name);
+ virtual KURL vfs_getFile(const TQString& name);
/// Create a new directory
- virtual void vfs_mkdir(const QString& name);
+ virtual void vfs_mkdir(const TQString& name);
/// Rename file
- virtual void vfs_rename(const QString& fileName,const QString& newName);
+ virtual void vfs_rename(const TQString& fileName,const TQString& newName);
/// return the VFS working dir
- virtual QString vfs_workingDir() { return vfs_origin.path(-1); }
+ virtual TQString vfs_workingDir() { return vfs_origin.path(-1); }
/// Get ACL permissions
- static void getACL( vfile *file, QString &acl, QString &defAcl );
+ static void getACL( vfile *file, TQString &acl, TQString &defAcl );
public slots:
void vfs_slotRefresh();
- void vfs_slotDirty(const QString& path);
- void vfs_slotCreated(const QString& path);
- void vfs_slotDeleted(const QString& path);
+ void vfs_slotDirty(const TQString& path);
+ void vfs_slotCreated(const TQString& path);
+ void vfs_slotDeleted(const TQString& path);
protected:
/// Re-reads files and stats and fills the vfile list
virtual bool populateVfsList(const KURL& origin, bool showHidden);
- QTimer refreshTimer; //< Timer to exclude sudden refreshes
+ TQTimer refreshTimer; //< Timer to exclude sudden refreshes
KDirWatch *watcher; //< The internal dir watcher - use to detect changes in directories
- vfile* vfileFromName(const QString& name);
+ vfile* vfileFromName(const TQString& name);
private:
- bool burstRefresh( const QString &path );
- static QString getACL( const QString & path, int type );
+ bool burstRefresh( const TQString &path );
+ static TQString getACL( const TQString & path, int type );
};
#endif
diff --git a/krusader/VFS/preservingcopyjob.cpp b/krusader/VFS/preservingcopyjob.cpp
index bd6d6cf..23d62e1 100644
--- a/krusader/VFS/preservingcopyjob.cpp
+++ b/krusader/VFS/preservingcopyjob.cpp
@@ -36,7 +36,7 @@
#include <kio/job.h>
#include <kio/jobclasses.h>
#include <kfileitem.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <pwd.h>
#include <grp.h>
@@ -54,23 +54,23 @@ Attributes::Attributes()
uid = (uid_t)-1;
gid = (gid_t)-1;
mode = (mode_t)-1;
- acl = QString::null;
+ acl = TQString();
}
-Attributes::Attributes( time_t tIn, uid_t uIn, gid_t gIn, mode_t modeIn, const QString & aclIn )
+Attributes::Attributes( time_t tIn, uid_t uIn, gid_t gIn, mode_t modeIn, const TQString & aclIn )
{
time = tIn, uid = uIn, gid = gIn, mode = modeIn, acl = aclIn;
}
-Attributes::Attributes( time_t tIn, QString user, QString group, mode_t modeIn, const QString & aclIn )
+Attributes::Attributes( time_t tIn, TQString user, TQString group, mode_t modeIn, const TQString & aclIn )
{
time = tIn;
uid = (uid_t)-1;
- struct passwd* pw = getpwnam(QFile::encodeName( user ));
+ struct passwd* pw = getpwnam(TQFile::encodeName( user ));
if ( pw != 0L )
uid = pw->pw_uid;
gid = (gid_t)-1;
- struct group* g = getgrnam(QFile::encodeName( group ));
+ struct group* g = getgrnam(TQFile::encodeName( group ));
if ( g != 0L )
gid = g->gr_gid;
mode = modeIn;
@@ -82,24 +82,24 @@ PreservingCopyJob::PreservingCopyJob( const KURL::List& src, const KURL& dest, C
{
if( dest.isLocalFile() )
{
- connect( this, SIGNAL( aboutToCreate (KIO::Job *, const QValueList< KIO::CopyInfo > &) ),
- this, SLOT( slotAboutToCreate (KIO::Job *, const QValueList< KIO::CopyInfo > &) ) );
- connect( this, SIGNAL( copyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool) ),
- this, SLOT( slotCopyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool) ) );
- connect( this, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotFinished() ) );
+ connect( this, TQT_SIGNAL( aboutToCreate (KIO::Job *, const TQValueList< KIO::CopyInfo > &) ),
+ this, TQT_SLOT( slotAboutToCreate (KIO::Job *, const TQValueList< KIO::CopyInfo > &) ) );
+ connect( this, TQT_SIGNAL( copyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool) ),
+ this, TQT_SLOT( slotCopyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool) ) );
+ connect( this, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotFinished() ) );
}
}
-void PreservingCopyJob::slotAboutToCreate( KIO::Job */*job*/, const QValueList< KIO::CopyInfo > &files )
+void PreservingCopyJob::slotAboutToCreate( KIO::Job */*job*/, const TQValueList< KIO::CopyInfo > &files )
{
- for ( QValueList< KIO::CopyInfo >::ConstIterator it = files.begin(); it != files.end(); ++it ) {
+ for ( TQValueList< KIO::CopyInfo >::ConstIterator it = files.begin(); it != files.end(); ++it ) {
if( (*it).uSource.isLocalFile() ) {
KDE_struct_stat stat_p;
KDE_lstat( (*it).uSource.path(-1).local8Bit(),&stat_p); /* getting the date information */
- QString aclStr;
+ TQString aclStr;
#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
acl_t acl = acl_get_file( (*it).uSource.path(-1).local8Bit(), ACL_TYPE_ACCESS );
@@ -134,7 +134,7 @@ void PreservingCopyJob::slotAboutToCreate( KIO::Job */*job*/, const QValueList<
if( acl )
{
char *aclString = acl_to_text( acl, 0 );
- aclStr = QString::fromLatin1( aclString );
+ aclStr = TQString::tqfromLatin1( aclString );
acl_free( (void*)aclString );
acl_free( acl );
}
@@ -164,7 +164,7 @@ void PreservingCopyJob::slotResult( Job *job ) {
#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
fileAttributes[ url ] = Attributes( kfi.time( KIO::UDS_MODIFICATION_TIME ), kfi.user(), kfi.group(), kfi.mode(), kfi.ACL().asString() );
#else
- fileAttributes[ url ] = Attributes( kfi.time( KIO::UDS_MODIFICATION_TIME ), kfi.user(), kfi.group(), kfi.mode(), QString::null );
+ fileAttributes[ url ] = Attributes( kfi.time( KIO::UDS_MODIFICATION_TIME ), kfi.user(), kfi.group(), kfi.mode(), TQString() );
#endif
}
}
@@ -173,10 +173,10 @@ void PreservingCopyJob::slotResult( Job *job ) {
for( unsigned j=0; j != subjobs.count(); j++ ) {
if( subjobs.at( j )->inherits( "KIO::ListJob" ) ) {
- disconnect( subjobs.at( j ), SIGNAL( entries (KIO::Job *, const KIO::UDSEntryList &) ),
- this, SLOT( slotListEntries (KIO::Job *, const KIO::UDSEntryList &) ) );
- connect( subjobs.at( j ), SIGNAL( entries (KIO::Job *, const KIO::UDSEntryList &) ),
- this, SLOT( slotListEntries (KIO::Job *, const KIO::UDSEntryList &) ) );
+ disconnect( subjobs.at( j ), TQT_SIGNAL( entries (KIO::Job *, const KIO::UDSEntryList &) ),
+ this, TQT_SLOT( slotListEntries (KIO::Job *, const KIO::UDSEntryList &) ) );
+ connect( subjobs.at( j ), TQT_SIGNAL( entries (KIO::Job *, const KIO::UDSEntryList &) ),
+ this, TQT_SLOT( slotListEntries (KIO::Job *, const KIO::UDSEntryList &) ) );
}
}
}
@@ -186,10 +186,10 @@ void PreservingCopyJob::slotListEntries(KIO::Job *job, const KIO::UDSEntryList &
KIO::UDSEntryListConstIterator end = list.end();
for (; it != end; ++it) {
KURL url = ((KIO::SimpleJob *)job)->url();
- QString relName, user, group;
+ TQString relName, user, group;
time_t mtime = (time_t)-1;
mode_t mode = 0755;
- QString acl;
+ TQString acl;
KIO::UDSEntry::ConstIterator it2 = (*it).begin();
for( ; it2 != (*it).end(); it2++ ) {
@@ -230,9 +230,9 @@ void PreservingCopyJob::slotCopyingDone( KIO::Job *, const KURL &from, const KUR
{
if( postpone ) { // the directories are stamped at the last step, so if it's a directory, we postpone
unsigned i=0;
- QString path = to.path( -1 );
+ TQString path = to.path( -1 );
- for( ; i != directoriesToStamp.count(); i++ ) // sort the URL-s to avoid parent time stamp modification
+ for( ; i != directoriesToStamp.count(); i++ ) // sort the URL-s to avoid tqparent time stamp modification
if( path >= directoriesToStamp[ i ].path( -1 ) )
break;
@@ -301,7 +301,7 @@ KIO::CopyJob * PreservingCopyJob::createCopyJob( PreserveMode pmode, const KURL:
return new PreservingCopyJob( src, dest, mode, asMethod, showProgressInfo );
case PM_DEFAULT:
{
- QString group = krConfig->group();
+ TQString group = krConfig->group();
krConfig->setGroup( "Advanced" );
bool preserve = krConfig->readBoolEntry( "PreserveAttributes", _PreserveAttributes );
krConfig->setGroup( group );
diff --git a/krusader/VFS/preservingcopyjob.h b/krusader/VFS/preservingcopyjob.h
index 0e48959..9e43131 100644
--- a/krusader/VFS/preservingcopyjob.h
+++ b/krusader/VFS/preservingcopyjob.h
@@ -34,8 +34,8 @@
#include "config.h"
#include <time.h>
#include <kio/jobclasses.h>
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
typedef enum {
PM_NONE = 0,
@@ -47,19 +47,20 @@ typedef enum {
class Attributes {
public:
Attributes();
- Attributes( time_t tIn, uid_t uIn, gid_t gIn, mode_t modeIn, const QString & aclIn );
- Attributes( time_t tIn, QString user, QString group, mode_t modeIn, const QString & aclIn );
+ Attributes( time_t tIn, uid_t uIn, gid_t gIn, mode_t modeIn, const TQString & aclIn );
+ Attributes( time_t tIn, TQString user, TQString group, mode_t modeIn, const TQString & aclIn );
time_t time;
uid_t uid;
gid_t gid;
mode_t mode;
- QString acl;
+ TQString acl;
};
class PreservingCopyJob : public KIO::CopyJob
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -68,17 +69,17 @@ public:
static KIO::CopyJob *createCopyJob( PreserveMode pmode, const KURL::List& src, const KURL& dest, CopyMode mode, bool asMethod, bool showProgressInfo );
public slots:
- void slotAboutToCreate (KIO::Job *, const QValueList< KIO::CopyInfo > &);
+ void slotAboutToCreate (KIO::Job *, const TQValueList< KIO::CopyInfo > &);
void slotCopyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool);
void slotFinished();
virtual void slotResult( Job *job );
void slotListEntries(KIO::Job *job, const KIO::UDSEntryList &list);
private:
- QMap<KURL, Attributes> fileAttributes;
- QMap<KIO::Job *, KURL> pendingJobs;
- QValueList<KURL> directoriesToStamp;
- QValueList<KURL> originalDirectories;
+ TQMap<KURL, Attributes> fileAttributes;
+ TQMap<KIO::Job *, KURL> pendingJobs;
+ TQValueList<KURL> directoriesToStamp;
+ TQValueList<KURL> originalDirectories;
};
#endif /* __PRESERVING_COPY_JOB_H__ */
diff --git a/krusader/VFS/temp_vfs.cpp b/krusader/VFS/temp_vfs.cpp
index 12a5dad..e7130e0 100644
--- a/krusader/VFS/temp_vfs.cpp
+++ b/krusader/VFS/temp_vfs.cpp
@@ -27,8 +27,8 @@
* (at your option) any later version. *
* *
***************************************************************************/
-// Qt includes
-#include <qdir.h>
+// TQt includes
+#include <tqdir.h>
// KDE includes
#include <kmessagebox.h>
#include <kprocess.h>
@@ -40,8 +40,8 @@
#include "../resources.h"
#include "../krservices.h"
-temp_vfs::temp_vfs( QString origin, QString type, QWidget* panel, bool ):
- normal_vfs(panel){
+temp_vfs::temp_vfs( TQString origin, TQString type, TQWidget* panel, bool ):
+ normal_vfs(TQT_TQOBJECT(panel)){
vfs_type=TEMP;
// first we need to create a temp diretory
tmpDir = krApp->getTempDir();
@@ -69,12 +69,12 @@ temp_vfs::~temp_vfs(){
}
// return the working dir
-QString temp_vfs::vfs_workingDir(){
+TQString temp_vfs::vfs_workingDir(){
// get the path inside the archive
- QString path = vfs_origin.path(-1);
- path = path.mid(path.findRev('\\')+1);
+ TQString path = vfs_origin.path(-1);
+ path = path.mid(path.tqfindRev('\\')+1);
if(path.left(1) != "/") path = "/"+path;
- QDir().mkdir(tmpDir+path);
+ TQDir().mkdir(tmpDir+path);
return tmpDir+path;
}
@@ -83,7 +83,7 @@ bool temp_vfs::vfs_refresh(const KURL& origin){
vfs_origin = origin;
vfs_origin.adjustPath(-1);
// get the directory...
- QString path = origin.path(-1).mid(origin.path(-1).findRev('\\')+1);
+ TQString path = origin.path(-1).mid(origin.path(-1).tqfindRev('\\')+1);
if(path.left(1) =="/") path.remove(0,1);
if ( !normal_vfs::vfs_refresh(tmpDir+"/"+path) ){
vfs_origin = backup;
@@ -93,18 +93,18 @@ bool temp_vfs::vfs_refresh(const KURL& origin){
return true;
}
-void temp_vfs::handleAceArj(QString origin, QString type){
+void temp_vfs::handleAceArj(TQString origin, TQString type){
// for ace and arj we just unpack to the tmpDir
if( !KRarcHandler::arcHandled(type) ){
if (!quietMode) KMessageBox::error(krApp,"This archive type is NOT supported");
return;
}
- else if( !KRarcHandler::unpack(origin,type, QString::null, tmpDir) ){
+ else if( !KRarcHandler::unpack(origin,type, TQString(), tmpDir) ){
return;
}
}
-void temp_vfs::handleRpm(QString origin){
+void temp_vfs::handleRpm(TQString origin){
// then extract the cpio archive from the rpm
KShellProcess rpm;
rpm << "rpm2cpio"<<"\""+origin+"\""+" > "+tmpDir+"/contents.cpio";
@@ -119,7 +119,7 @@ void temp_vfs::handleRpm(QString origin){
rpm.start(KProcess::Block);
}
-void temp_vfs::handleIso(QString origin){
+void temp_vfs::handleIso(TQString origin){
// mount the ISO image
KShellProcess mount;
mount << KrServices::fullPathName( "mount" ) << "-o loop" << origin << tmpDir;
diff --git a/krusader/VFS/temp_vfs.h b/krusader/VFS/temp_vfs.h
index f55eb23..3b94248 100644
--- a/krusader/VFS/temp_vfs.h
+++ b/krusader/VFS/temp_vfs.h
@@ -37,9 +37,9 @@
class temp_vfs : public normal_vfs {
public:
- temp_vfs( QString origin, QString type, QWidget* panel, bool writeable);
+ temp_vfs( TQString origin, TQString type, TQWidget* panel, bool writeable);
~temp_vfs();
- QString vfs_workingDir();
+ TQString vfs_workingDir();
bool vfs_isWritable() { return false; } // temp vfs is not writable !
public slots:
@@ -47,10 +47,10 @@ public slots:
bool vfs_refresh(const KURL& origin);
protected:
- void handleAceArj(QString origin, QString type);
- void handleRpm(QString origin);
- void handleIso(QString origin);
- QString tmpDir;
+ void handleAceArj(TQString origin, TQString type);
+ void handleRpm(TQString origin);
+ void handleIso(TQString origin);
+ TQString tmpDir;
};
diff --git a/krusader/VFS/vfile.cpp b/krusader/VFS/vfile.cpp
index a3e8c6b..3ca3e0f 100644
--- a/krusader/VFS/vfile.cpp
+++ b/krusader/VFS/vfile.cpp
@@ -33,8 +33,8 @@
#include <grp.h>
#include <sys/types.h>
#include <sys/stat.h>
-// Qt includes
-#include <qdatetime.h>
+// TQt includes
+#include <tqdatetime.h>
// KDE includes
#include <kmimetype.h>
#include <kdeversion.h>
@@ -45,25 +45,25 @@
#include <kdebug.h>
-vfile::vfile(const QString& name, // useful construtor
+vfile::vfile(const TQString& name, // useful construtor
const KIO::filesize_t size,
- const QString& perm,
+ const TQString& perm,
const time_t mtime,
const bool symLink,
const uid_t owner,
const gid_t group,
- const QString& mime,
- const QString& symDest,
+ const TQString& mime,
+ const TQString& symDest,
const mode_t mode,
const int rwx)
{
vfile_name=name;
vfile_size=size;
- vfile_owner=QString::null;
+ vfile_owner=TQString();
vfile_ownerId=owner;
- vfile_group=QString::null;
+ vfile_group=TQString();
vfile_groupId=group;
- vfile_userName=QString::null;
+ vfile_userName=TQString();
vfile_perm=perm;
vfile_time_t=mtime;
vfile_symLink=symLink;
@@ -77,20 +77,20 @@ vfile::vfile(const QString& name, // useful construtor
vfile_acl_loaded = false;
}
-vfile::vfile(const QString& name, // useful construtor
+vfile::vfile(const TQString& name, // useful construtor
const KIO::filesize_t size,
- const QString& perm,
+ const TQString& perm,
const time_t mtime,
const bool symLink,
- const QString& owner,
- const QString& group,
- const QString& userName,
- const QString& mime,
- const QString& symDest,
+ const TQString& owner,
+ const TQString& group,
+ const TQString& userName,
+ const TQString& mime,
+ const TQString& symDest,
const mode_t mode,
const int rwx,
- const QString& aclString,
- const QString& aclDfltString ){
+ const TQString& aclString,
+ const TQString& aclDfltString ){
vfile_name=name;
vfile_size=size;
vfile_owner=owner;
@@ -146,33 +146,33 @@ char vfile::vfile_isExecutable() const {
return KRpermHandler::ftpExecutable(vfile_owner, vfile_userName, vfile_perm);
}
-const QString& vfile::vfile_getMime(bool fast){
- if( vfile_mimeType == QString::null ){ // mimetype == "" is OK so don't check mimetype.empty() !
+const TQString& vfile::vfile_getMime(bool fast){
+ if( vfile_mimeType == TQString() ){ // mimetype == "" is OK so don't check mimetype.empty() !
vfile_mimeType = KMimeType::findByURL( vfile_getUrl(),vfile_getMode(),vfile_getUrl().isLocalFile(),fast)->name();
- if( vfile_mimeType.contains("directory") ) vfile_perm[0] = 'd', vfile_isdir = true;
+ if( vfile_mimeType.tqcontains("directory") ) vfile_perm[0] = 'd', vfile_isdir = true;
}
return vfile_mimeType;
}
-const QString& vfile::vfile_getOwner(){
+const TQString& vfile::vfile_getOwner(){
if( vfile_owner.isEmpty() )
vfile_owner=KRpermHandler::uid2user(vfile_getUid());
return vfile_owner;
}
-const QString& vfile::vfile_getGroup(){
+const TQString& vfile::vfile_getGroup(){
if( vfile_group.isEmpty() )
vfile_group=KRpermHandler::gid2group(vfile_getGid());
return vfile_group;
}
-const QString& vfile::vfile_getACL(){
+const TQString& vfile::vfile_getACL(){
if( !vfile_acl_loaded )
vfile_loadACL();
return vfile_acl;
}
-const QString& vfile::vfile_getDefaultACL(){
+const TQString& vfile::vfile_getDefaultACL(){
if( !vfile_acl_loaded )
vfile_loadACL();
return vfile_def_acl;
diff --git a/krusader/VFS/vfile.h b/krusader/VFS/vfile.h
index 61aa9bc..d2aa284 100644
--- a/krusader/VFS/vfile.h
+++ b/krusader/VFS/vfile.h
@@ -30,8 +30,8 @@
#define VFILE_H
// QT includes
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
// System includes
#include <sys/types.h>
// KDE includes
@@ -46,8 +46,9 @@
* contains the nessecery details about a file and member functions which
* allow the object to give out the needed details about the file.
*/
-class vfile : public QObject{
+class vfile : public TQObject{
Q_OBJECT
+ TQ_OBJECT
public:
vfile(){}
@@ -56,55 +57,55 @@ public:
* Use this constructor when you know the following files properties: \n
* file name, file size, file permissions,is the file a link,owner uid & group uid.
*/
- vfile(const QString& name,
+ vfile(const TQString& name,
const KIO::filesize_t size,
- const QString& perm,
+ const TQString& perm,
const time_t mtime,
const bool symLink,
const uid_t owner,
const gid_t group,
- const QString& mime,
- const QString& symDest,
+ const TQString& mime,
+ const TQString& symDest,
const mode_t mode,
const int rwx = -1 );
- vfile(const QString& name,
+ vfile(const TQString& name,
const KIO::filesize_t size,
- const QString& perm,
+ const TQString& perm,
const time_t mtime,
const bool symLink,
- const QString& owner,
- const QString& group,
- const QString& userName,
- const QString& mime,
- const QString& symDest,
+ const TQString& owner,
+ const TQString& group,
+ const TQString& userName,
+ const TQString& mime,
+ const TQString& symDest,
const mode_t mode,
const int rwx = -1,
- const QString& aclString = QString::null,
- const QString& aclDfltString = QString::null );
+ const TQString& aclString = TQString(),
+ const TQString& aclDfltString = TQString() );
bool operator==(const vfile& vf) const;
vfile& operator= (const vfile& vf);
inline bool operator!=(const vfile& vf){ return !((*this)==vf); }
// following functions give-out file details
- inline const QString& vfile_getName() const { return vfile_name; }
+ inline const TQString& vfile_getName() const { return vfile_name; }
inline KIO::filesize_t vfile_getSize() const { return vfile_size; }
- inline const QString& vfile_getPerm() const { return vfile_perm; }
+ inline const TQString& vfile_getPerm() const { return vfile_perm; }
inline bool vfile_isDir() const { return vfile_isdir; }
inline bool vfile_isSymLink() const { return vfile_symLink; }
- inline const QString& vfile_getSymDest() const { return vfile_symDest; }
+ inline const TQString& vfile_getSymDest() const { return vfile_symDest; }
inline mode_t vfile_getMode() const { return vfile_mode; }
inline uid_t vfile_getUid() const { return vfile_ownerId; }
inline gid_t vfile_getGid() const { return vfile_groupId; }
inline time_t vfile_getTime_t() const { return vfile_time_t; }
inline const KURL& vfile_getUrl() const { return vfile_url; }
- const QString& vfile_getMime(bool fast=false);
- const QString& vfile_getOwner();
- const QString& vfile_getGroup();
- const QString& vfile_getACL();
- const QString& vfile_getDefaultACL();
+ const TQString& vfile_getMime(bool fast=false);
+ const TQString& vfile_getOwner();
+ const TQString& vfile_getGroup();
+ const TQString& vfile_getACL();
+ const TQString& vfile_getDefaultACL();
const KIO::UDSEntry vfile_getEntry(); //< return the UDSEntry from the vfile
char vfile_isReadable() const;
char vfile_isWriteable() const;
@@ -117,8 +118,8 @@ public:
inline void vfile_setSize(KIO::filesize_t size) {vfile_size = size;}
inline void vfile_setUrl(const KURL& url) {vfile_url = url; }
- inline void vfile_setIcon(const QString& icn) {vfile_icon = icn; }
- inline QString vfile_getIcon();
+ inline void vfile_setIcon(const TQString& icn) {vfile_icon = icn; }
+ inline TQString vfile_getIcon();
virtual ~vfile(){}
@@ -127,37 +128,37 @@ private:
protected:
// the file information list
- QString vfile_name; //< file name
+ TQString vfile_name; //< file name
KIO::filesize_t vfile_size; //< file size
mode_t vfile_mode; //< file mode
uid_t vfile_ownerId; //< file owner id
gid_t vfile_groupId; //< file group id
- QString vfile_owner; //< file owner name
- QString vfile_group; //< file group name
- QString vfile_userName; //< the current username
- QString vfile_perm; //< file permissions string
+ TQString vfile_owner; //< file owner name
+ TQString vfile_group; //< file group name
+ TQString vfile_userName; //< the current username
+ TQString vfile_perm; //< file permissions string
time_t vfile_time_t; //< file modification in time_t format
bool vfile_symLink; //< true if the file is a symlink
- QString vfile_mimeType; //< file mimetype
- QString vfile_symDest; //< if it's a sym link - its detination
+ TQString vfile_mimeType; //< file mimetype
+ TQString vfile_symDest; //< if it's a sym link - its detination
KURL vfile_url; //< file URL - empty by default
- QString vfile_icon; //< the name of the icon file
+ TQString vfile_icon; //< the name of the icon file
bool vfile_isdir; //< flag, if it's a directory
int vfile_rwx; //< flag, showing read, write, execute properties
bool vfile_acl_loaded;//<flag, indicates that ACL permissions already loaded
bool vfile_has_acl; //< flag, indicates ACL permissions
- QString vfile_acl; //< ACL permission string
- QString vfile_def_acl; //< ACL default string
+ TQString vfile_acl; //< ACL permission string
+ TQString vfile_def_acl; //< ACL default string
};
-QString vfile::vfile_getIcon(){
+TQString vfile::vfile_getIcon(){
if( vfile_icon.isEmpty() ){
- QString mime = this->vfile_getMime();
+ TQString mime = this->vfile_getMime();
if ( mime == "Broken Link !" )
vfile_icon = "file_broken";
else {
- vfile_icon = KMimeType::mimeType( mime ) ->icon( QString::null, true );
+ vfile_icon = KMimeType::mimeType( mime ) ->icon( TQString(), true );
}
}
return vfile_icon;
diff --git a/krusader/VFS/vfs.cpp b/krusader/VFS/vfs.cpp
index 54efe7e..db49f0b 100644
--- a/krusader/VFS/vfs.cpp
+++ b/krusader/VFS/vfs.cpp
@@ -33,24 +33,24 @@
#include <unistd.h>
#include <time.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
#include <kapplication.h>
#include <klargefile.h>
-#include <qdir.h>
+#include <tqdir.h>
#include "vfs.h"
#include "../krusader.h"
#include "../defaults.h"
-vfs::vfs(QObject* panel, bool quiet): vfs_busy(false), quietMode(quiet),disableRefresh(false),postponedRefreshURL(),
- invalidated(true),panelConnected(false),vfs_tempFilesP(0),vfileIterator(0),deletePossible( true ),
+vfs::vfs(TQObject* panel, bool quiet): vfs_busy(false), quietMode(quiet),disableRefresh(false),postponedRefreshURL(),
+ tqinvalidated(true),panelConnected(false),vfs_tempFilesP(0),vfileIterator(0),deletePossible( true ),
deleteRequested( false ) {
setVfsFilesP( new vfileDict() );
if ( panel ){
panelConnected = true;
- connect(this,SIGNAL(startUpdate()),panel,SLOT(slotStartUpdate()));
- connect(this,SIGNAL(incrementalRefreshFinished( const KURL& )),panel,SLOT(slotGetStats( const KURL& )));
+ connect(this,TQT_SIGNAL(startUpdate()),panel,TQT_SLOT(slotStartUpdate()));
+ connect(this,TQT_SIGNAL(incrementalRefreshFinished( const KURL& )),panel,TQT_SLOT(slotGetStats( const KURL& )));
}
else quietMode = true;
}
@@ -82,28 +82,28 @@ bool vfs::vfs_refresh(KIO::Job* job){
return vfs_refresh(vfs_origin);
}
-KURL vfs::fromPathOrURL( const QString &originIn )
+KURL vfs::fromPathOrURL( const TQString &originIn )
{
- QString password, loginName, origin = originIn;
+ TQString password, loginName, origin = originIn;
bool bugfix = false;
- if ( originIn.contains( ":/" ) && !originIn.startsWith( "/" ) )
+ if ( originIn.tqcontains( ":/" ) && !originIn.startsWith( "/" ) )
{
// breakdown the url;
/* FIXME: untill KDE fixes the bug we have to check for
passwords and users with @ in them... */
- bugfix = origin.find("@") != origin.findRev("@");
+ bugfix = origin.tqfind("@") != origin.tqfindRev("@");
if(bugfix){
- if(origin.find(":") != origin.findRev(":", origin.findRev("@") )){
- int passStart = origin.find( ":",origin.find(":")+1 )+1;
- int passLen = origin.findRev("@")-passStart;
+ if(origin.tqfind(":") != origin.tqfindRev(":", origin.tqfindRev("@") )){
+ int passStart = origin.tqfind( ":",origin.tqfind(":")+1 )+1;
+ int passLen = origin.tqfindRev("@")-passStart;
password = origin.mid(passStart,passLen);
origin = origin.remove(passStart-1,passLen+1);
}
- if(origin.find("@") != origin.findRev("@")){
- int usrStart = origin.find( "/" )+1;
+ if(origin.tqfind("@") != origin.tqfindRev("@")){
+ int usrStart = origin.tqfind( "/" )+1;
if(origin.at(usrStart) == '/') ++usrStart;
- int usrLen = origin.findRev("@")-usrStart;
+ int usrLen = origin.tqfindRev("@")-usrStart;
loginName = origin.mid(usrStart,usrLen);
origin = origin.remove(usrStart,usrLen+1);
}
@@ -120,7 +120,7 @@ KURL vfs::fromPathOrURL( const QString &originIn )
return url;
}
-QString vfs::pathOrURL( const KURL &originIn, int trailingSlash )
+TQString vfs::pathOrURL( const KURL &originIn, int trailingSlash )
{
if( originIn.isLocalFile() )
return originIn.path( trailingSlash );
@@ -133,14 +133,14 @@ void vfs::setVfsFilesP(vfileDict* dict){
vfs_tempFilesP->setAutoDelete( true );
dict->setAutoDelete(true);
if( vfileIterator ) delete vfileIterator;
- vfileIterator = new QDictIterator<vfile>(*dict);
+ vfileIterator = new TQDictIterator<vfile>(*dict);
}
bool vfs::vfs_refresh(){
if( vfs_busy )
return false;
- if( invalidated ) // invalidated fs requires total refresh
+ if( tqinvalidated ) // tqinvalidated fs requires total refresh
return vfs_refresh( vfs_getOrigin() );
if( disableRefresh )
@@ -157,7 +157,7 @@ bool vfs::vfs_refresh(){
bool showHidden = krConfig->readBoolEntry("Show Hidden",_ShowHidden);
bool res = populateVfsList(vfs_getOrigin(),showHidden);
- QString name;
+ TQString name;
if( res ){
// check if the maximum incremental refresh number is achieved
int diff = vfs_filesP->count() - vfs_tempFilesP->count();
@@ -196,7 +196,7 @@ bool vfs::vfs_refresh(){
vfs_tempFilesP->remove(name);
}
// everything thats left is a new file
- QDictIterator<vfile> it(*vfs_tempFilesP);
+ TQDictIterator<vfile> it(*vfs_tempFilesP);
for(vfile* vf=it.toFirst(); vf; vf=(++it)){
// sanity checking
if( !vf || (*vfs_filesP)[vf->vfile_getName()] ) continue;
@@ -227,7 +227,7 @@ bool vfs::vfs_refresh(const KURL& origin){
return true;
}
- if( !invalidated && origin.equals(vfs_getOrigin(),true) ) return vfs_refresh();
+ if( !tqinvalidated && origin.equals(vfs_getOrigin(),true) ) return vfs_refresh();
vfs_busy = true;
@@ -249,7 +249,7 @@ bool vfs::vfs_refresh(const KURL& origin){
emit startUpdate();
- invalidated = false;
+ tqinvalidated = false;
return true;
}
@@ -271,7 +271,7 @@ bool vfs::vfs_processEvents() {
if( deleteRequested )
return false;
deletePossible = false;
- qApp->eventLoop() ->processEvents( QEventLoop::AllEvents | QEventLoop::WaitForMore );
+ tqApp->eventLoop() ->processEvents( TQEventLoop::AllEvents | TQEventLoop::WaitForMore );
deletePossible = true;
if( deleteRequested ) {
emit deleteAllowed();
@@ -299,7 +299,7 @@ void vfs::slotKdsResult( KIO::Job* job){
*kds_busy = true;
}
-void vfs::vfs_calcSpace( QString name , KIO::filesize_t* totalSize, unsigned long* totalFiles, unsigned long* totalDirs, bool* stop ) {
+void vfs::vfs_calcSpace( TQString name , KIO::filesize_t* totalSize, unsigned long* totalFiles, unsigned long* totalDirs, bool* stop ) {
calculateURLSize( vfs_getFile( name ), totalSize, totalFiles, totalDirs, stop );
}
@@ -316,7 +316,7 @@ void vfs::calculateURLSize( KURL url, KIO::filesize_t* totalSize, unsigned long
} else {
stat_busy = true;
KIO::StatJob* statJob = KIO::stat( url, false );
- connect( statJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotStatResultArrived( KIO::Job* ) ) );
+ connect( statJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResultArrived( KIO::Job* ) ) );
while ( !(*stop) && stat_busy ) {usleep(1000);}
if( entry.isEmpty() ) return; // statJob failed
KFileItem kfi(entry, url, true );
@@ -328,19 +328,19 @@ void vfs::calculateURLSize( KURL url, KIO::filesize_t* totalSize, unsigned long
}
KDirSize* kds = KDirSize::dirSizeJob( url );
- connect( kds, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotKdsResult( KIO::Job* ) ) );
+ connect( kds, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotKdsResult( KIO::Job* ) ) );
while ( !(*stop) ){
// we are in a sepetate thread - so sleeping is OK
usleep(1000);
}
}
-void vfs::vfs_calcSpaceLocal(QString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool* stop){
+void vfs::vfs_calcSpaceLocal(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool* stop){
if ( *stop ) return;
- if (!name.contains("/")) name = vfs_workingDir()+"/"+name;
+ if (!name.tqcontains("/")) name = vfs_workingDir()+"/"+name;
if (name == "/proc") return;
- KDE_struct_stat stat_p; // KDE lstat is necessary as QFileInfo and KFileItem
+ KDE_struct_stat stat_p; // KDE lstat is necessary as TQFileInfo and KFileItem
KDE_lstat(name.local8Bit(),&stat_p); // reports wrong size for a symbolic link
if( S_ISLNK(stat_p.st_mode) || !S_ISDIR(stat_p.st_mode) ) { // single files are easy : )
@@ -353,16 +353,16 @@ void vfs::vfs_calcSpaceLocal(QString name ,KIO::filesize_t *totalSize,unsigned l
if( !readable )
return;
- QDir dir(name);
+ TQDir dir(name);
if ( !dir.exists() ) return;
++(*totalDirs);
- dir.setFilter(QDir::All | QDir::System | QDir::Hidden);
- dir.setSorting(QDir::Name | QDir::DirsFirst);
+ dir.setFilter(TQDir::All | TQDir::System | TQDir::Hidden);
+ dir.setSorting(TQDir::Name | TQDir::DirsFirst);
// recurse on all the files in the directory
- QFileInfoList* fileList = const_cast<QFileInfoList*>(dir.entryInfoList());
- for (QFileInfo* qfiP = fileList->first(); qfiP != 0; qfiP = fileList->next()){
+ TQFileInfoList* fileList = const_cast<TQFileInfoList*>(dir.entryInfoList());
+ for (TQFileInfo* qfiP = fileList->first(); qfiP != 0; qfiP = fileList->next()){
if ( *stop ) return;
if (qfiP->fileName() != "." && qfiP->fileName() != "..")
vfs_calcSpaceLocal(name+"/"+qfiP->fileName(),totalSize,totalFiles,totalDirs,stop);
@@ -379,11 +379,11 @@ void vfs::slotStatResultArrived( KIO::Job* job ) {
#else
void vfs::slotKdsResult(KIO::Job *job){/* empty */}
-void vfs::vfs_calcSpace( QString /*name*/ , KIO::filesize_t* /*totalSize*/, unsigned long* /*totalFiles*/, unsigned long* /*totalDirs*/, bool* /*stop*/ ) {/* empty*/}
+void vfs::vfs_calcSpace( TQString /*name*/ , KIO::filesize_t* /*totalSize*/, unsigned long* /*totalFiles*/, unsigned long* /*totalDirs*/, bool* /*stop*/ ) {/* empty*/}
#endif
-QValueList<vfile*> vfs::vfs_search(const KRQuery& filter) {
- QValueList<vfile*> result;
+TQValueList<vfile*> vfs::vfs_search(const KRQuery& filter) {
+ TQValueList<vfile*> result;
for ( vfile *vf = vfs_getFirstFile(); vf != 0 ; vf = vfs_getNextFile() )
if (filter.match(vf))
result.append(vf);
diff --git a/krusader/VFS/vfs.h b/krusader/VFS/vfs.h
index a20645d..bc5dcf1 100644
--- a/krusader/VFS/vfs.h
+++ b/krusader/VFS/vfs.h
@@ -31,10 +31,10 @@
#define VFS_H
// QT includes
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qobject.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqobject.h>
+#include <tqdict.h>
// KDE includes
#include <kurl.h>
#include <kio/jobclasses.h>
@@ -48,10 +48,11 @@
* nothing. other VFSs like the normal_vfs inherits from this class and
* make it possible to use a consistent API for all types of VFSs.
*/
-class vfs: public QObject{
+class vfs: public TQObject{
Q_OBJECT
+ TQ_OBJECT
public:
- typedef QDict<vfile> vfileDict;
+ typedef TQDict<vfile> vfileDict;
enum VFS_TYPE{ERROR=0,NORMAL,FTP,TEMP,VIRT};
/**
@@ -59,34 +60,34 @@ public:
* @param panel the panel father. the VFS will connect it's signals to this object.
* @param quiet if true, the VFS will not display error messages
*/
- vfs(QObject* panel, bool quiet=false);
+ vfs(TQObject* panel, bool quiet=false);
virtual ~vfs();
/// Copy a file to the vfs (physical).
- virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = "", PreserveMode pmode = PM_DEFAULT)=0;
+ virtual void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir = "", PreserveMode pmode = PM_DEFAULT)=0;
/// Remove a file from the vfs (physical)
- virtual void vfs_delFiles(QStringList *fileNames)=0;
+ virtual void vfs_delFiles(TQStringList *fileNames)=0;
/// Return a list of URLs for multiple files
- virtual KURL::List* vfs_getFiles(QStringList* names)=0;
+ virtual KURL::List* vfs_getFiles(TQStringList* names)=0;
/// Return a URL to a single file
- virtual KURL vfs_getFile(const QString& name)=0;
+ virtual KURL vfs_getFile(const TQString& name)=0;
/// Create a new directory
- virtual void vfs_mkdir(const QString& name)=0;
+ virtual void vfs_mkdir(const TQString& name)=0;
/// Rename file
- virtual void vfs_rename(const QString& fileName,const QString& newName)=0;
+ virtual void vfs_rename(const TQString& fileName,const TQString& newName)=0;
/// Calculate the amount of space occupied by a file or directory (recursive).
- virtual void vfs_calcSpace(QString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop);
+ virtual void vfs_calcSpace(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop);
/// Calculate the amount of space occupied by a local file or directory (recursive).
- virtual void vfs_calcSpaceLocal(QString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop);
+ virtual void vfs_calcSpaceLocal(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop);
/// Return the VFS working dir
- virtual QString vfs_workingDir()=0;
+ virtual TQString vfs_workingDir()=0;
/// Return true if the VFS url is writable
virtual bool vfs_isWritable() { return isWritable; }
/// Return vfile* or 0 if not found
- inline vfile* vfs_search(const QString& name){ return (*vfs_filesP)[name]; }
+ inline vfile* vfs_search(const TQString& name){ return (*vfs_filesP)[name]; }
/// Return an empty vfile* list if not found
- QValueList<vfile*> vfs_search(const KRQuery& filter);
+ TQValueList<vfile*> vfs_search(const KRQuery& filter);
/// The total size of all the files in the VFS,
KIO::filesize_t vfs_totalSize();
/// The number of files in the VFS
@@ -110,8 +111,8 @@ public:
/// process the application events
virtual bool vfs_isDeleting() { return deleteRequested; }
// KDE FTP proxy bug correction
- static KURL fromPathOrURL( const QString &originIn );
- static QString pathOrURL( const KURL &originIn, int trailingSlash = 0 );
+ static KURL fromPathOrURL( const TQString &originIn );
+ static TQString pathOrURL( const KURL &originIn, int trailingSlash = 0 );
public slots:
@@ -123,14 +124,14 @@ public slots:
bool vfs_refresh();
void vfs_setQuiet(bool beQuiet){ quietMode=beQuiet; }
void vfs_enableRefresh(bool enable);
- void vfs_invalidate() { invalidated = true; }
+ void vfs_tqinvalidate() { tqinvalidated = true; }
signals:
void startUpdate(); //< emitted when the VFS starts to refresh its list of vfiles.
void startJob(KIO::Job* job);
void incrementalRefreshFinished( const KURL& ); //< emitted when the incremental refresh was finished
void addedVfile(vfile* vf);
- void deletedVfile(const QString& name);
+ void deletedVfile(const TQString& name);
void updatedVfile(vfile* vf);
void cleared();
void deleteAllowed();
@@ -147,7 +148,7 @@ protected:
/// Add a new vfile to the list.
inline void addToList(vfile *data){ vfs_filesP->insert(data->vfile_getName(),data); }
/// Deletes a vfile from the list.
- inline void removeFromList(QString name){ vfs_filesP->remove(name); }
+ inline void removeFromList(TQString name){ vfs_filesP->remove(name); }
/// Deletes a vfile from the list.
void calculateURLSize(KURL url,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop);
@@ -159,7 +160,7 @@ protected:
bool disableRefresh; //< true if refresh is disabled
bool isWritable; //< true if it's writable
KURL postponedRefreshURL; //< true if vfs_refresh() was called when refresh is disabled.
- bool invalidated; //< the content of the cache is invalidated
+ bool tqinvalidated; //< the content of the cache is tqinvalidated
bool panelConnected; //< indicates that there's a panel connected. Important for disabling the dir watcher
protected slots:
@@ -170,7 +171,7 @@ protected slots:
private:
vfileDict* vfs_filesP; //< Point to a lists of virtual files (vfile).
vfileDict* vfs_tempFilesP;//< Temporary files are stored here
- QDictIterator<vfile>* vfileIterator; //< Point to a dictionary of virtual files (vfile).
+ TQDictIterator<vfile>* vfileIterator; //< Point to a dictionary of virtual files (vfile).
// used in the calcSpace function
bool* kds_busy;
diff --git a/krusader/VFS/virt_vfs.cpp b/krusader/VFS/virt_vfs.cpp
index 360e0f7..038edf4 100644
--- a/krusader/VFS/virt_vfs.cpp
+++ b/krusader/VFS/virt_vfs.cpp
@@ -33,10 +33,10 @@
#define VIRT_VFS_DB "virt_vfs.db"
-QDict<KURL::List> virt_vfs::virtVfsDict;
+TQDict<KURL::List> virt_vfs::virtVfsDict;
KConfig* virt_vfs::virt_vfs_db=0;
-virt_vfs::virt_vfs( QObject* panel, bool quiet ) : vfs( panel, quiet ) {
+virt_vfs::virt_vfs( TQObject* panel, bool quiet ) : vfs( panel, quiet ) {
// set the writable attribute
isWritable = true;
@@ -81,7 +81,7 @@ bool virt_vfs::populateVfsList( const KURL& origin, bool /*showHidden*/ ) {
return true;
}
-void virt_vfs::vfs_addFiles( KURL::List *fileUrls, KIO::CopyJob::CopyMode /*mode*/, QObject* /*toNotify*/, QString /*dir*/, PreserveMode /*pmode*/ ) {
+void virt_vfs::vfs_addFiles( KURL::List *fileUrls, KIO::CopyJob::CopyMode /*mode*/, TQObject* /*toNotify*/, TQString /*dir*/, PreserveMode /*pmode*/ ) {
if ( path == "/" ) {
if ( !quietMode )
KMessageBox::error( krApp, i18n( "You can't copy files directly to the 'virt:/' directory.\nYou can create a sub directory and copy your files into it." ), i18n( "Error" ) );
@@ -90,18 +90,18 @@ void virt_vfs::vfs_addFiles( KURL::List *fileUrls, KIO::CopyJob::CopyMode /*mode
KURL::List* urlList = virtVfsDict[ path ];
for( unsigned i=0; i != fileUrls->count(); i++ ) {
- if( !urlList->contains( (*fileUrls)[ i ] ) )
+ if( !urlList->tqcontains( (*fileUrls)[ i ] ) )
urlList->push_back( (*fileUrls)[ i ] );
}
vfs_refresh();
}
-void virt_vfs::vfs_delFiles( QStringList *fileNames ) {
+void virt_vfs::vfs_delFiles( TQStringList *fileNames ) {
if ( path == "/" ) {
for ( uint i = 0 ; i < fileNames->count(); ++i ) {
- QString filename = ( *fileNames ) [ i ];
- virtVfsDict[ "/" ] ->remove( QString("virt:/")+filename );
+ TQString filename = ( *fileNames ) [ i ];
+ virtVfsDict[ "/" ] ->remove( TQString("virt:/")+filename );
virtVfsDict.remove( filename );
}
vfs_refresh();
@@ -113,7 +113,7 @@ void virt_vfs::vfs_delFiles( QStringList *fileNames ) {
// names -> urls
for ( uint i = 0 ; i < fileNames->count(); ++i ) {
- QString filename = ( *fileNames ) [ i ];
+ TQString filename = ( *fileNames ) [ i ];
filesUrls.append( vfs_getFile( filename ) );
}
KIO::Job *job;
@@ -126,15 +126,15 @@ void virt_vfs::vfs_delFiles( QStringList *fileNames ) {
#else
job = new KIO::CopyJob( filesUrls, KGlobalSettings::trashPath(), KIO::CopyJob::Move, false, true );
#endif
- connect( job, SIGNAL( result( KIO::Job* ) ), krApp, SLOT( changeTrashIcon() ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), krApp, TQT_SLOT( changeTrashIcon() ) );
} else
job = new KIO::DeleteJob( filesUrls, false, true );
// refresh will remove the deleted files...
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( vfs_refresh( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) );
}
-void virt_vfs::vfs_removeFiles( QStringList *fileNames ) {
+void virt_vfs::vfs_removeFiles( TQStringList *fileNames ) {
if ( path == "/" )
return;
@@ -148,17 +148,17 @@ void virt_vfs::vfs_removeFiles( QStringList *fileNames ) {
vfs_refresh();
}
-KURL::List* virt_vfs::vfs_getFiles( QStringList* names ) {
+KURL::List* virt_vfs::vfs_getFiles( TQStringList* names ) {
KURL url;
KURL::List* urls = new KURL::List();
- for ( QStringList::Iterator name = names->begin(); name != names->end(); ++name ) {
+ for ( TQStringList::Iterator name = names->begin(); name != names->end(); ++name ) {
url = vfs_getFile( *name );
urls->append( url );
}
return urls;
}
-KURL virt_vfs::vfs_getFile( const QString& name ) {
+KURL virt_vfs::vfs_getFile( const TQString& name ) {
vfile * vf = vfs_search( name );
if ( !vf ) return KURL(); // empty
@@ -167,7 +167,7 @@ KURL virt_vfs::vfs_getFile( const QString& name ) {
return url;
}
-void virt_vfs::vfs_mkdir( const QString& name ) {
+void virt_vfs::vfs_mkdir( const TQString& name ) {
if ( path != "/" ) {
if ( !quietMode )
KMessageBox::error( krApp, i18n( "Creating new directories is allowed only in the 'virt:/' directory." ), i18n( "Error" ) );
@@ -175,12 +175,12 @@ void virt_vfs::vfs_mkdir( const QString& name ) {
}
KURL::List* temp = new KURL::List();
virtVfsDict.insert( name, temp );
- virtVfsDict[ "/" ] ->append( QString( "virt:/" )+name );
+ virtVfsDict[ "/" ] ->append( TQString( "virt:/" )+name );
vfs_refresh();
}
-void virt_vfs::vfs_rename( const QString& fileName, const QString& newName ) {
+void virt_vfs::vfs_rename( const TQString& fileName, const TQString& newName ) {
KURL::List fileUrls;
KURL url , dest;
@@ -188,8 +188,8 @@ void virt_vfs::vfs_rename( const QString& fileName, const QString& newName ) {
if ( !vf ) return ; // not found
if ( path == "/" ) {
- virtVfsDict[ "/" ] ->append( QString( "virt:/" ) + newName );
- virtVfsDict[ "/" ] ->remove( QString( "virt:/" ) + fileName );
+ virtVfsDict[ "/" ] ->append( TQString( "virt:/" ) + newName );
+ virtVfsDict[ "/" ] ->remove( TQString( "virt:/" ) + fileName );
virtVfsDict.insert( newName, virtVfsDict.take( fileName ) );
vfs_refresh();
return ;
@@ -205,7 +205,7 @@ void virt_vfs::vfs_rename( const QString& fileName, const QString& newName ) {
virtVfsDict[ path ] ->append( dest );
KIO::Job *job = new KIO::CopyJob( fileUrls, dest, KIO::CopyJob::Move, true, false );
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( vfs_refresh( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( vfs_refresh( KIO::Job* ) ) );
}
void virt_vfs::slotStatResult( KIO::Job* job ) {
@@ -216,7 +216,7 @@ void virt_vfs::slotStatResult( KIO::Job* job ) {
vfile* virt_vfs::stat( const KURL& url ) {
if( url.protocol() == "virt" ){
- QString path = url.path().mid(1);
+ TQString path = url.path().mid(1);
if( path.isEmpty() ) path = "/";
vfile * temp = new vfile( path, 0, "drwxr-xr-x", time( 0 ), false, getuid(), getgid(), "inode/directory", "", 0 );
temp->vfile_setUrl( url );
@@ -229,7 +229,7 @@ vfile* virt_vfs::stat( const KURL& url ) {
else {
busy = true;
KIO::StatJob* statJob = KIO::stat( url, false );
- connect( statJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotStatResult( KIO::Job* ) ) );
+ connect( statJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResult( KIO::Job* ) ) );
while ( busy && vfs_processEvents() );
if( entry.isEmpty() ) return 0; // statJob failed
@@ -244,7 +244,7 @@ vfile* virt_vfs::stat( const KURL& url ) {
vfile *temp;
// get file statistics
- QString name;
+ TQString name;
if( url.isLocalFile() )
name = url.path();
else
@@ -254,10 +254,10 @@ vfile* virt_vfs::stat( const KURL& url ) {
time_t mtime = kfi->time( KIO::UDS_MODIFICATION_TIME );
bool symLink = kfi->isLink();
mode_t mode = kfi->mode() | kfi->permissions();
- QString perm = KRpermHandler::mode2QString( mode );
+ TQString perm = KRpermHandler::mode2TQString( mode );
// set the mimetype
- QString mime = QString::null;
- QString symDest = "";
+ TQString mime = TQString();
+ TQString symDest = "";
if ( symLink ) {
symDest = kfi->linkDest();
if ( kfi->isDir() ) perm[ 0 ] = 'd';
@@ -267,9 +267,9 @@ vfile* virt_vfs::stat( const KURL& url ) {
if ( kfi->user().isEmpty() )
temp = new vfile( name, size, perm, mtime, symLink, getuid(), getgid(), mime, symDest, mode );
else {
- QString currentUser = url.user();
- if ( currentUser.contains( "@" ) ) /* remove the FTP proxy tags from the username */
- currentUser.truncate( currentUser.find( '@' ) );
+ TQString currentUser = url.user();
+ if ( currentUser.tqcontains( "@" ) ) /* remove the FTP proxy tags from the username */
+ currentUser.truncate( currentUser.tqfind( '@' ) );
if ( currentUser.isEmpty() )
currentUser = KRpermHandler::uid2user( getuid() );
temp = new vfile( name, size, perm, mtime, symLink, kfi->user(), kfi->group(), currentUser, mime, symDest, mode );
@@ -291,10 +291,10 @@ bool virt_vfs::save(){
KConfig* db = getVirtDB();
db->setGroup("virt_db");
- QDictIterator<KURL::List> it( virtVfsDict ); // See QDictIterator
+ TQDictIterator<KURL::List> it( virtVfsDict ); // See TQDictIterator
for( ; it.current(); ++it ){
KURL::List::iterator url;
- QStringList entry;
+ TQStringList entry;
for ( url = it.current()->begin() ; url != it.current()->end() ; ++url ) {
entry.append( (*url).prettyURL() );
}
@@ -310,8 +310,8 @@ bool virt_vfs::restore(){
KConfig* db = getVirtDB();
db->setGroup("virt_db");
- QMap<QString, QString> map = db->entryMap("virt_db");
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString> map = db->entryMap("virt_db");
+ TQMap<TQString, TQString>::Iterator it;
KURL::List* urlList;
for ( it = map.begin(); it != map.end(); ++it ) {
urlList = new KURL::List( db->readListEntry(it.key()) );
@@ -326,7 +326,7 @@ bool virt_vfs::restore(){
return true;
}
-void virt_vfs::vfs_calcSpace( QString name , KIO::filesize_t* totalSize, unsigned long* totalFiles, unsigned long* totalDirs, bool* stop ) {
+void virt_vfs::vfs_calcSpace( TQString name , KIO::filesize_t* totalSize, unsigned long* totalFiles, unsigned long* totalDirs, bool* stop ) {
if ( stop && *stop ) return ;
if( path == "/" ) {
KURL::List* urlList = virtVfsDict[ name ];
diff --git a/krusader/VFS/virt_vfs.h b/krusader/VFS/virt_vfs.h
index 2cf880f..d16b1f1 100644
--- a/krusader/VFS/virt_vfs.h
+++ b/krusader/VFS/virt_vfs.h
@@ -28,29 +28,30 @@
class virt_vfs : public vfs {
Q_OBJECT
+ TQ_OBJECT
public:
- virt_vfs(QObject* panel, bool quiet=false);
+ virt_vfs(TQObject* panel, bool quiet=false);
~virt_vfs();
/// Copy a file to the vfs (physical).
- void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,QObject* toNotify,QString dir = "", PreserveMode pmode = PM_DEFAULT );
+ void vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQObject* toNotify,TQString dir = "", PreserveMode pmode = PM_DEFAULT );
/// Remove a file from the vfs (physical)
- void vfs_delFiles(QStringList *fileNames);
+ void vfs_delFiles(TQStringList *fileNames);
/// Remove a file from the collection (only its link, not the file)
- void vfs_removeFiles(QStringList *fileNames);
+ void vfs_removeFiles(TQStringList *fileNames);
/// Return a list of URLs for multiple files
- KURL::List* vfs_getFiles(QStringList* names);
+ KURL::List* vfs_getFiles(TQStringList* names);
/// Return a URL to a single file
- KURL vfs_getFile(const QString& name);
+ KURL vfs_getFile(const TQString& name);
/// Create a new directory
- void vfs_mkdir(const QString& name);
+ void vfs_mkdir(const TQString& name);
/// Rename file
- void vfs_rename(const QString& fileName,const QString& newName);
+ void vfs_rename(const TQString& fileName,const TQString& newName);
/// Calculate the amount of space occupied by a file or directory (recursive).
- virtual void vfs_calcSpace(QString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop);
+ virtual void vfs_calcSpace(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool * stop);
/// Return the VFS working dir
- QString vfs_workingDir(){ return QString::null; }
+ TQString vfs_workingDir(){ return TQString(); }
protected slots:
void slotStatResult(KIO::Job *job);
@@ -66,10 +67,10 @@ protected:
bool populateVfsList(const KURL& origin, bool showHidden);
vfile* stat(const KURL& url);
- static QDict<KURL::List> virtVfsDict;
+ static TQDict<KURL::List> virtVfsDict;
static KConfig* virt_vfs_db;
bool busy;
- QString path;
+ TQString path;
KIO::UDSEntry entry;
};
diff --git a/krusader/VFS/virtualcopyjob.cpp b/krusader/VFS/virtualcopyjob.cpp
index 7b11c77..8525e11 100644
--- a/krusader/VFS/virtualcopyjob.cpp
+++ b/krusader/VFS/virtualcopyjob.cpp
@@ -39,7 +39,7 @@
#define REPORT_TIMEOUT 200
-VirtualCopyJob::VirtualCopyJob( const QStringList *names, vfs * vfs, const KURL& dest, const KURL& baseURL,
+VirtualCopyJob::VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL& dest, const KURL& baseURL,
PreserveMode pmode, KIO::CopyJob::CopyMode mode, bool asMethod, bool showProgressInfo ) :
KIO::Job( showProgressInfo ), m_totalSize( 0 ), m_totalFiles( 0 ), m_totalSubdirs( 0 ),
m_processedSize( 0 ), m_processedFiles( 0 ), m_processedSubdirs( 0 ), m_tempSize( 0 ), m_tempFiles( 0 ),
@@ -52,10 +52,10 @@ VirtualCopyJob::VirtualCopyJob( const QStringList *names, vfs * vfs, const KURL&
vfile * file = vfs->vfs_getFirstFile();
while( file ) {
- if( names->contains( file->vfile_getName() ) ) {
- QString relativeDir = KURL::relativeURL( baseURL, file->vfile_getUrl().upURL() );
+ if( names->tqcontains( file->vfile_getName() ) ) {
+ TQString relativeDir = KURL::relativeURL( baseURL, file->vfile_getUrl().upURL() );
- KURL::List *list = m_filesToCopy.find( relativeDir );
+ KURL::List *list = m_filesToCopy.tqfind( relativeDir );
if( list == 0 ) {
list = new KURL::List();
m_filesToCopy.insert( relativeDir, list );
@@ -65,7 +65,7 @@ VirtualCopyJob::VirtualCopyJob( const QStringList *names, vfs * vfs, const KURL&
m_subdirs[ relativeDir ] = 0;
}
- if( !list->contains( file->vfile_getUrl() ) ) {
+ if( !list->tqcontains( file->vfile_getUrl() ) ) {
if( file->vfile_isDir() ) {
m_dirsToGetSize.append( file->vfile_getUrl() );
m_totalSubdirs++;
@@ -83,19 +83,19 @@ VirtualCopyJob::VirtualCopyJob( const QStringList *names, vfs * vfs, const KURL&
}
if ( showProgressInfo ) {
- connect( this, SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
- connect( this, SIGNAL( percent( KIO::Job*, unsigned long ) ),
- Observer::self(), SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( totalFiles( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotTotalFiles( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( totalDirs( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotTotalDirs( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( processedFiles( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotProcessedFiles( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( processedDirs( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotProcessedDirs( KIO::Job*, unsigned long ) ) );
+ connect( this, TQT_SIGNAL( percent( KIO::Job*, unsigned long ) ),
+ Observer::self(), TQT_SLOT( slotPercent( KIO::Job*, unsigned long ) ) );
}
- QTimer::singleShot( 0, this, SLOT( slotStart() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotStart() ) );
}
void VirtualCopyJob::slotStart() {
@@ -106,7 +106,7 @@ void VirtualCopyJob::slotStart() {
Observer::self()->slotCopying( this, m_baseURL, m_dest );
}
- connect(&m_reportTimer,SIGNAL(timeout()),this,SLOT(slotReport()));
+ connect(&m_reportTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(slotReport()));
m_reportTimer.start(REPORT_TIMEOUT,false);
statNextDir();
@@ -158,7 +158,7 @@ void VirtualCopyJob::statNextDir() {
m_currentDir = KURL::relativeURL( m_baseURL, dirToCheck.upURL() );
KDirSize* kds = KDirSize::dirSizeJob( dirToCheck );
- connect( kds, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotKdsResult( KIO::Job* ) ) );
+ connect( kds, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotKdsResult( KIO::Job* ) ) );
}
void VirtualCopyJob::slotKdsResult( KIO::Job * job ) {
@@ -181,7 +181,7 @@ void VirtualCopyJob::createNextDir() {
return;
}
- QDictIterator<KURL::List> diter( m_filesToCopy );
+ TQDictIterator<KURL::List> diter( m_filesToCopy );
m_currentDir = diter.currentKey();
m_current = m_dest;
@@ -189,7 +189,7 @@ void VirtualCopyJob::createNextDir() {
m_current.addPath( m_currentDir );
KIO::Job *job = KIO::stat( m_current );
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotStatResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResult( KIO::Job* ) ) );
}
void VirtualCopyJob::slotStatResult( KIO::Job *job ) {
@@ -199,7 +199,7 @@ void VirtualCopyJob::slotStatResult( KIO::Job *job ) {
if( job->error() == KIO::ERR_DOES_NOT_EXIST && !url.equals( url.upURL(),true ) ) {
m_dirStack.push_back( url.fileName() );
KIO::Job *job = KIO::stat( url.upURL() );
- connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotStatResult( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotStatResult( KIO::Job* ) ) );
return;
}
job->showErrorDialog( krApp );
@@ -214,7 +214,7 @@ void VirtualCopyJob::slotStatResult( KIO::Job *job ) {
m_dirStack.pop_back();
KIO::Job *mkdir_job = KIO::mkdir( url );
- connect( mkdir_job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotMkdirResult( KIO::Job* ) ) );
+ connect( mkdir_job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotMkdirResult( KIO::Job* ) ) );
}
else
copyCurrentDir();
@@ -236,7 +236,7 @@ void VirtualCopyJob::slotMkdirResult( KIO::Job *job ) {
m_dirStack.pop_back();
KIO::Job *mkdir_job = KIO::mkdir( url );
- connect( mkdir_job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotMkdirResult( KIO::Job* ) ) );
+ connect( mkdir_job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotMkdirResult( KIO::Job* ) ) );
}
else
copyCurrentDir();
@@ -248,19 +248,19 @@ void VirtualCopyJob::copyCurrentDir() {
KIO::CopyJob * copy_job = PreservingCopyJob::createCopyJob( m_pmode, *m_filesToCopy[ m_currentDir ], m_current,
m_mode, m_asMethod, false );
- connect( copy_job, SIGNAL( copying(KIO::Job *, const KURL &, const KURL &) ),
- this, SLOT( slotCopying(KIO::Job *, const KURL &, const KURL &) ) );
- connect( copy_job, SIGNAL( moving(KIO::Job *, const KURL &, const KURL &) ),
- this, SLOT( slotMoving(KIO::Job *, const KURL &, const KURL &) ) );
- connect( copy_job, SIGNAL( creatingDir(KIO::Job *, const KURL &) ),
- this, SLOT( slotCreatingDir(KIO::Job *, const KURL &) ) );
- connect( copy_job, SIGNAL( processedFiles (KIO::Job *, unsigned long) ),
- this, SLOT( slotProcessedFiles (KIO::Job *, unsigned long) ) );
- connect( copy_job, SIGNAL( processedDirs (KIO::Job *, unsigned long) ),
- this, SLOT( slotProcessedDirs (KIO::Job *, unsigned long) ) );
- connect( copy_job, SIGNAL( processedSize (KIO::Job *, KIO::filesize_t) ),
- this, SLOT( slotProcessedSize (KIO::Job *, KIO::filesize_t) ) );
- connect( copy_job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotCopyResult( KIO::Job* ) ) );
+ connect( copy_job, TQT_SIGNAL( copying(KIO::Job *, const KURL &, const KURL &) ),
+ this, TQT_SLOT( slotCopying(KIO::Job *, const KURL &, const KURL &) ) );
+ connect( copy_job, TQT_SIGNAL( moving(KIO::Job *, const KURL &, const KURL &) ),
+ this, TQT_SLOT( slotMoving(KIO::Job *, const KURL &, const KURL &) ) );
+ connect( copy_job, TQT_SIGNAL( creatingDir(KIO::Job *, const KURL &) ),
+ this, TQT_SLOT( slotCreatingDir(KIO::Job *, const KURL &) ) );
+ connect( copy_job, TQT_SIGNAL( processedFiles (KIO::Job *, unsigned long) ),
+ this, TQT_SLOT( slotProcessedFiles (KIO::Job *, unsigned long) ) );
+ connect( copy_job, TQT_SIGNAL( processedDirs (KIO::Job *, unsigned long) ),
+ this, TQT_SLOT( slotProcessedDirs (KIO::Job *, unsigned long) ) );
+ connect( copy_job, TQT_SIGNAL( processedSize (KIO::Job *, KIO::filesize_t) ),
+ this, TQT_SLOT( slotProcessedSize (KIO::Job *, KIO::filesize_t) ) );
+ connect( copy_job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotCopyResult( KIO::Job* ) ) );
}
void VirtualCopyJob::slotCopyResult( KIO::Job *job ) {
@@ -272,7 +272,7 @@ void VirtualCopyJob::slotCopyResult( KIO::Job *job ) {
createNextDir();
}
-void VirtualCopyJob::directoryFinished( const QString &name ) {
+void VirtualCopyJob::directoryFinished( const TQString &name ) {
m_filesToCopy.remove( name );
m_processedSize += m_size[ name ];
diff --git a/krusader/VFS/virtualcopyjob.h b/krusader/VFS/virtualcopyjob.h
index 6505a97..98bd479 100644
--- a/krusader/VFS/virtualcopyjob.h
+++ b/krusader/VFS/virtualcopyjob.h
@@ -33,10 +33,10 @@
#include <kio/job.h>
#include "preservingcopyjob.h"
-#include <qvaluelist.h>
-#include <qtimer.h>
-#include <qdict.h>
-#include <qmap.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
+#include <tqdict.h>
+#include <tqmap.h>
class vfs;
@@ -50,16 +50,17 @@ typedef enum {
class VirtualCopyJob : public KIO::Job
{
Q_OBJECT
+ TQ_OBJECT
public:
- VirtualCopyJob( const QStringList *names, vfs * vfs, const KURL& dest, const KURL& baseURL,
+ VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL& dest, const KURL& baseURL,
PreserveMode pmode, KIO::CopyJob::CopyMode mode, bool asMethod, bool showProgressInfo );
protected:
void statNextDir();
void createNextDir();
void copyCurrentDir();
- void directoryFinished( const QString & );
+ void directoryFinished( const TQString & );
protected slots:
void slotStart();
@@ -97,13 +98,13 @@ private:
unsigned long m_tempFiles;
unsigned long m_tempSubdirs;
- QValueList<KURL> m_dirsToGetSize;
+ TQValueList<KURL> m_dirsToGetSize;
- QDict<KURL::List> m_filesToCopy;
+ TQDict<KURL::List> m_filesToCopy;
- QMap<QString,int> m_size;
- QMap<QString,int> m_filenum;
- QMap<QString,int> m_subdirs;
+ TQMap<TQString,int> m_size;
+ TQMap<TQString,int> m_filenum;
+ TQMap<TQString,int> m_subdirs;
KURL m_baseURL;
KURL m_dest;
@@ -114,12 +115,12 @@ private:
State m_state;
- QTimer m_reportTimer;
+ TQTimer m_reportTimer;
KURL m_current;
- QString m_currentDir;
+ TQString m_currentDir;
- QStringList m_dirStack;
+ TQStringList m_dirStack;
};
#endif /* __VIRTUAL_COPY_JOB_H__ */
diff --git a/krusader/calc.ui b/krusader/calc.ui
index fd442e6..9945949 100644
--- a/krusader/calc.ui
+++ b/krusader/calc.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>calc</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>calc</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLCDNumber" row="0" column="0">
+ <widget class="TQLCDNumber" row="0" column="0">
<property name="name">
<cstring>display</cstring>
</property>
@@ -27,15 +27,15 @@
<number>18</number>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="1" column="3">
+ <widget class="TQPushButton" row="1" column="3">
<property name="name">
<cstring>plus</cstring>
</property>
@@ -43,7 +43,7 @@
<string>+</string>
</property>
</widget>
- <widget class="QPushButton" row="0" column="4">
+ <widget class="TQPushButton" row="0" column="4">
<property name="name">
<cstring>all_clear</cstring>
</property>
@@ -51,7 +51,7 @@
<string>AC</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="3">
+ <widget class="TQPushButton" row="2" column="3">
<property name="name">
<cstring>minus</cstring>
</property>
@@ -59,7 +59,7 @@
<string>-</string>
</property>
</widget>
- <widget class="QPushButton" row="3" column="2" rowspan="1" colspan="2">
+ <widget class="TQPushButton" row="3" column="2" rowspan="1" colspan="2">
<property name="name">
<cstring>equals</cstring>
</property>
@@ -67,7 +67,7 @@
<string>=</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="4">
+ <widget class="TQPushButton" row="1" column="4">
<property name="name">
<cstring>clear</cstring>
</property>
@@ -75,7 +75,7 @@
<string>CL</string>
</property>
</widget>
- <widget class="QPushButton" row="3" column="1">
+ <widget class="TQPushButton" row="3" column="1">
<property name="name">
<cstring>zero</cstring>
</property>
@@ -83,7 +83,7 @@
<string>0</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="0">
+ <widget class="TQPushButton" row="1" column="0">
<property name="name">
<cstring>four</cstring>
</property>
@@ -91,7 +91,7 @@
<string>4</string>
</property>
</widget>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>two</cstring>
</property>
@@ -99,7 +99,7 @@
<string>2</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>five</cstring>
</property>
@@ -107,7 +107,7 @@
<string>5</string>
</property>
</widget>
- <widget class="QPushButton" row="0" column="2">
+ <widget class="TQPushButton" row="0" column="2">
<property name="name">
<cstring>three</cstring>
</property>
@@ -115,7 +115,7 @@
<string>3</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="0">
+ <widget class="TQPushButton" row="2" column="0">
<property name="name">
<cstring>seven</cstring>
</property>
@@ -123,7 +123,7 @@
<string>7</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="2">
+ <widget class="TQPushButton" row="1" column="2">
<property name="name">
<cstring>six</cstring>
</property>
@@ -131,7 +131,7 @@
<string>6</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="1">
+ <widget class="TQPushButton" row="2" column="1">
<property name="name">
<cstring>eight</cstring>
</property>
@@ -139,7 +139,7 @@
<string>8</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="2">
+ <widget class="TQPushButton" row="2" column="2">
<property name="name">
<cstring>nine</cstring>
</property>
@@ -147,7 +147,7 @@
<string>9</string>
</property>
</widget>
- <widget class="QPushButton" row="0" column="0">
+ <widget class="TQPushButton" row="0" column="0">
<property name="name">
<cstring>one</cstring>
</property>
@@ -157,7 +157,7 @@
</widget>
</grid>
</widget>
- <widget class="QPushButton" row="2" column="0">
+ <widget class="TQPushButton" row="2" column="0">
<property name="name">
<cstring>setCap</cstring>
</property>
@@ -247,7 +247,7 @@
<slot>one()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>one()</slot>
<slot>two()</slot>
<slot>three()</slot>
@@ -262,6 +262,6 @@
<slot>minus()</slot>
<slot>equals()</slot>
<slot>setCap()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/krusader/defaults.h b/krusader/defaults.h
index 5d99fe4..c3087a8 100644
--- a/krusader/defaults.h
+++ b/krusader/defaults.h
@@ -58,7 +58,7 @@
////////////////////////[Look&Feel]
// Filelist Font ///////
-#define _FilelistFont new QFont(KGlobalSettings::generalFont())
+#define _FilelistFont new TQFont(KGlobalSettings::generalFont())
// Warn On Exit ////////
#define _WarnOnExit false
// Minimize To Tray ////
@@ -74,7 +74,7 @@
// Html Min Font Size //
#define _HtmlMinFontSize 12
// Filelist Icon Size //
-#define _FilelistIconSize QString("22")
+#define _FilelistIconSize TQString("22")
// Mouse Selection /////
#define _MouseSelection 0 // 0 - normal (shift+click, ctrl+click), 1 - left click, 2 - right click
// Use fullpath tab names /////
@@ -197,23 +197,23 @@
#define _TestArchives false
// Test Before Unpack ////
#define _TestBeforeUnpack true
-// Supported Packers // ====> a QStringList of SYSTEM supported archives ( also new )
+// Supported Packers // ====> a TQStringList of SYSTEM supported archives ( also new )
/////////////////////// [UserActions]
// Terminal for UserActions ///////////
#define _UserActions_Terminal "konsole --noclose -e"
// Normal font for output collection ///////
-#define _UserActions_NormalFont new QFont(KGlobalSettings::generalFont())
+#define _UserActions_NormalFont new TQFont(KGlobalSettings::generalFont())
// Font for output collection with fixed width ///////
-#define _UserActions_FixedFont new QFont(KGlobalSettings::fixedFont())
+#define _UserActions_FixedFont new TQFont(KGlobalSettings::fixedFont())
// Use for output collection fixed width font as default ///////
#define _UserActions_UseFixedFont false
/////////////////////// [Private]
// Start Position /////
-#define _StartPosition new QPoint(QApplication::desktop()->width()/2 - mainView->sizeHint().width()/2,QApplication::desktop()->height()/2 - 250)
+#define _StartPosition new TQPoint(TQApplication::desktop()->width()/2 - mainView->tqsizeHint().width()/2,TQApplication::desktop()->height()/2 - 250)
// Start Size /////////
-#define _StartSize new QSize(mainView->sizeHint().width(),500)
+#define _StartSize new TQSize(mainView->tqsizeHint().width(),500)
// Panel Size /////////
#define _PanelSize 0
// Terminal Size //////
@@ -283,7 +283,7 @@
/////////////////////// [Custom Selection Mode]
// QT Selection
-#define _QtSelection false
+#define _TQtSelection false
// Left Selects
#define _LeftSelects true
// Left Preserves
diff --git a/krusader/kicons.cpp b/krusader/kicons.cpp
index 103cf53..9f1f3a7 100644
--- a/krusader/kicons.cpp
+++ b/krusader/kicons.cpp
@@ -31,15 +31,15 @@
#include "kicons.h"
#include "krusader.h"
#include "defaults.h"
-#include <qstring.h>
+#include <tqstring.h>
-QPixmap FL_LOADICON(QString name) {
+TQPixmap FL_LOADICON(TQString name) {
krConfig->setGroup("Look&Feel");
int size = (krConfig->readEntry("Filelist Icon Size",_FilelistIconSize)).toInt();
if (size!=22)
return krLoader->loadIcon(name,KIcon::Desktop,size);
// else implied
- return QIconSet(krLoader->loadIcon(name,KIcon::Desktop,32)).pixmap(QIconSet::Small,true);
+ return TQIconSet(krLoader->loadIcon(name,KIcon::Desktop,32)).pixmap(TQIconSet::Small,true);
}
const char * no_xpm[] = {
diff --git a/krusader/kicons.h b/krusader/kicons.h
index ae200db..f97a23b 100644
--- a/krusader/kicons.h
+++ b/krusader/kicons.h
@@ -1,8 +1,8 @@
#ifndef KICONS_H
#define KICONS_H
-#include <qiconset.h>
-#include <qpixmap.h>
+#include <tqiconset.h>
+#include <tqpixmap.h>
#include <kiconloader.h>
#include <kicontheme.h>
@@ -11,10 +11,10 @@
// the the icon is resized again to fit into the toolbutton or menu.
// IMPORTANT: this SHOULD NOT BE USED for actions. If creating an action, just state the file-name
// of the icon to allow automatic resizing when needed.
-#define LOADICON(X) QIconSet(krLoader->loadIcon(X,KIcon::Desktop)).pixmap(QIconSet::Small,true)
+#define LOADICON(X) TQIconSet(krLoader->loadIcon(X,KIcon::Desktop)).pixmap(TQIconSet::Small,true)
// used only for calls within the kfilelist framework, handles icon sizes
-QPixmap FL_LOADICON(QString name);
+TQPixmap FL_LOADICON(TQString name);
extern const char * no_xpm[];
extern const char * yes_xpm[];
diff --git a/krusader/krservices.cpp b/krusader/krservices.cpp
index bf0ef35..463247d 100644
--- a/krusader/krservices.cpp
+++ b/krusader/krservices.cpp
@@ -18,21 +18,21 @@
#include <stdlib.h>
#include <unistd.h>
// QT includes
-#include <qdir.h>
+#include <tqdir.h>
// KDE includes
#include <kdebug.h>
// Krusader includes
#include "krservices.h"
#include "krusader.h"
-QMap<QString,QString>* KrServices::slaveMap=0;
+TQMap<TQString,TQString>* KrServices::slaveMap=0;
-bool KrServices::cmdExist(QString cmdName)
+bool KrServices::cmdExist(TQString cmdName)
{
- QString lastGroup = krConfig->group();
+ TQString lastGroup = krConfig->group();
krConfig->setGroup( "Dependencies" );
- if( QFile( krConfig->readEntry( cmdName, QString::null )).exists() )
+ if( TQFile( krConfig->readEntry( cmdName, TQString() )).exists() )
{
krConfig->setGroup( lastGroup );
return true;
@@ -42,15 +42,15 @@ bool KrServices::cmdExist(QString cmdName)
return !detectFullPathName( cmdName ).isEmpty();
}
-QString KrServices::detectFullPathName(QString name)
+TQString KrServices::detectFullPathName(TQString name)
{
- QStringList path = QStringList::split(":",getenv("PATH"));
+ TQStringList path = TQStringList::split(":",getenv("PATH"));
- for ( QStringList::Iterator it = path.begin(); it != path.end(); ++it )
+ for ( TQStringList::Iterator it = path.begin(); it != path.end(); ++it )
{
- if( QDir(*it).exists( name ) )
+ if( TQDir(*it).exists( name ) )
{
- QString dir = *it;
+ TQString dir = *it;
if( !dir.endsWith( "/" ) )
dir+="/";
@@ -61,16 +61,16 @@ QString KrServices::detectFullPathName(QString name)
return "";
}
-QString KrServices::fullPathName( QString name, QString confName )
+TQString KrServices::fullPathName( TQString name, TQString confName )
{
- QString lastGroup = krConfig->group();
- QString supposedName;
+ TQString lastGroup = krConfig->group();
+ TQString supposedName;
if( confName.isNull() )
confName = name;
krConfig->setGroup( "Dependencies" );
- if( QFile( supposedName = krConfig->readEntry( confName, "" )).exists() )
+ if( TQFile( supposedName = krConfig->readEntry( confName, "" )).exists() )
{
krConfig->setGroup( lastGroup );
return supposedName;
@@ -88,12 +88,12 @@ QString KrServices::fullPathName( QString name, QString confName )
}
// TODO: Document me!
-QStringList KrServices::separateArgs( QString args )
+TQStringList KrServices::separateArgs( TQString args )
{
- QStringList argList;
+ TQStringList argList;
int pointer = 0, tokenStart, len = args.length();
bool quoted = false;
- QChar quoteCh;
+ TQChar quoteCh;
do{
while( pointer < len && args[ pointer ].isSpace() )
@@ -104,7 +104,7 @@ QStringList KrServices::separateArgs( QString args )
tokenStart = pointer;
- QString result="";
+ TQString result="";
for(; pointer < len && ( quoted || !args[ pointer ].isSpace()) ; pointer++)
{
@@ -132,15 +132,15 @@ QStringList KrServices::separateArgs( QString args )
return argList;
}
-QString KrServices::registerdProtocol(QString mimetype){
+TQString KrServices::registerdProtocol(TQString mimetype){
if( slaveMap == 0 ){
- slaveMap = new QMap<QString,QString>();
+ slaveMap = new TQMap<TQString,TQString>();
krConfig->setGroup( "Protocols" );
- QStringList protList = krConfig->readListEntry( "Handled Protocols" );
- for( QStringList::Iterator it = protList.begin(); it != protList.end(); it++ ){
- QStringList mimes = krConfig->readListEntry( QString( "Mimes For %1" ).arg( *it ) );
- for( QStringList::Iterator it2 = mimes.begin(); it2 != mimes.end(); it2++ )
+ TQStringList protList = krConfig->readListEntry( "Handled Protocols" );
+ for( TQStringList::Iterator it = protList.begin(); it != protList.end(); it++ ){
+ TQStringList mimes = krConfig->readListEntry( TQString( "Mimes For %1" ).tqarg( *it ) );
+ for( TQStringList::Iterator it2 = mimes.begin(); it2 != mimes.end(); it2++ )
(*slaveMap)[*it2] = *it;
}
@@ -156,9 +156,9 @@ void KrServices::clearProtocolCache()
slaveMap = 0;
}
-bool KrServices::fileToStringList(QTextStream *stream, QStringList& target, bool keepEmptyLines) {
+bool KrServices::fileToStringList(TQTextStream *stream, TQStringList& target, bool keepEmptyLines) {
if (!stream) return false;
- QString line;
+ TQString line;
while ( !stream->atEnd() ) {
line = stream->readLine().stripWhiteSpace();
if (keepEmptyLines || !line.isEmpty()) target.append(line);
@@ -166,33 +166,33 @@ bool KrServices::fileToStringList(QTextStream *stream, QStringList& target, bool
return true;
}
-QString KrServices::quote( QString name ) {
- if( !name.contains( '\'' ) )
+TQString KrServices::quote( TQString name ) {
+ if( !name.tqcontains( '\'' ) )
return "'" + name + "'";
- if( !name.contains( '"' ) && !name.contains( '$' ) )
+ if( !name.tqcontains( '"' ) && !name.tqcontains( '$' ) )
return "\"" + name + "\"";
return escape( name );
}
-QStringList KrServices::quote( const QStringList& names ) {
- QStringList result;
+TQStringList KrServices::quote( const TQStringList& names ) {
+ TQStringList result;
for (unsigned i=0; i<names.size(); ++i)
result.append(quote(names[i]));
return result;
}
-QString KrServices::escape( QString name ) {
- const QString evilstuff = "\\\"'`()[]{}!?;$&<>| \t\r\n"; // stuff that should get escaped
+TQString KrServices::escape( TQString name ) {
+ const TQString evilstuff = "\\\"'`()[]{}!?;$&<>| \t\r\n"; // stuff that should get escaped
for ( unsigned int i = 0; i < evilstuff.length(); ++i )
- name.replace( evilstuff[ i ], ('\\' + evilstuff[ i ]) );
+ name.tqreplace( evilstuff[ i ], (TQString('\\') + evilstuff[ i ]) );
return name;
}
// ------- KEasyProcess
-KEasyProcess::KEasyProcess(QObject *parent, const char *name): KProcess(parent, name) {
+KEasyProcess::KEasyProcess(TQObject *tqparent, const char *name): KProcess(tqparent, name) {
init();
}
@@ -201,16 +201,16 @@ KEasyProcess::KEasyProcess(): KProcess() {
}
void KEasyProcess::init() {
- connect(this, SIGNAL(receivedStdout(KProcess *, char *, int)),
- this, SLOT(receivedStdout(KProcess *, char *, int)));
- connect(this, SIGNAL(receivedStderr(KProcess *, char *, int)),
- this, SLOT(receivedStderr(KProcess *, char *, int)));
+ connect(this, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ this, TQT_SLOT(receivedStdout(KProcess *, char *, int)));
+ connect(this, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ this, TQT_SLOT(receivedStderr(KProcess *, char *, int)));
}
void KEasyProcess::receivedStdout (KProcess * /* proc */, char *buffer, int buflen) {
- _stdout+=QString::fromLocal8Bit(buffer, buflen);
+ _stdout+=TQString::fromLocal8Bit(buffer, buflen);
}
void KEasyProcess::receivedStderr (KProcess * /* proc */, char *buffer, int buflen) {
- _stderr+=QString::fromLocal8Bit(buffer, buflen);
+ _stderr+=TQString::fromLocal8Bit(buffer, buflen);
}
diff --git a/krusader/krservices.h b/krusader/krservices.h
index d001cf2..9d348c2 100644
--- a/krusader/krservices.h
+++ b/krusader/krservices.h
@@ -18,9 +18,9 @@
#ifndef KRSERVICES_H
#define KRSERVICES_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
#include <kprocess.h>
/**
@@ -32,21 +32,21 @@ public:
KrServices(){}
~KrServices(){}
- static bool cmdExist(QString cmdName);
- static QString detectFullPathName( QString name );
- static QString fullPathName( QString name, QString confName = QString::null );
- static QStringList separateArgs( QString args );
- static QString registerdProtocol(QString mimetype);
+ static bool cmdExist(TQString cmdName);
+ static TQString detectFullPathName( TQString name );
+ static TQString fullPathName( TQString name, TQString confName = TQString() );
+ static TQStringList separateArgs( TQString args );
+ static TQString registerdProtocol(TQString mimetype);
static void clearProtocolCache();
- static bool fileToStringList(QTextStream *stream, QStringList& target, bool keepEmptyLines=false);
- static QString quote( QString name );
- static QStringList quote( const QStringList& names );
+ static bool fileToStringList(TQTextStream *stream, TQStringList& target, bool keepEmptyLines=false);
+ static TQString quote( TQString name );
+ static TQStringList quote( const TQStringList& names );
protected:
- static QString escape( QString name );
+ static TQString escape( TQString name );
private:
- static QMap<QString,QString>* slaveMap;
+ static TQMap<TQString,TQString>* slaveMap;
};
@@ -58,13 +58,14 @@ private:
// to happen (ie: start(KEasyProcess::Block, KEasyProcess::AllOutput);)
class KEasyProcess: public KProcess {
Q_OBJECT
+ TQ_OBJECT
public:
- KEasyProcess(QObject *parent, const char *name=0);
+ KEasyProcess(TQObject *tqparent, const char *name=0);
KEasyProcess();
virtual ~KEasyProcess() {}
- const QString& getStdout() const { return _stdout; }
- const QString& getStderr() const { return _stderr; }
+ const TQString& getStdout() const { return _stdout; }
+ const TQString& getStderr() const { return _stderr; }
protected slots:
void receivedStdout (KProcess *proc, char *buffer, int buflen);
@@ -72,7 +73,7 @@ protected slots:
void init();
private:
- QString _stdout, _stderr;
+ TQString _stdout, _stderr;
};
#endif
diff --git a/krusader/krslots.cpp b/krusader/krslots.cpp
index 17c8b4b..8fc2c81 100644
--- a/krusader/krslots.cpp
+++ b/krusader/krslots.cpp
@@ -28,12 +28,12 @@
* *
***************************************************************************/
-#include <qdir.h>
-#include <qpoint.h>
-#include <qstringlist.h>
-#include <qprogressdialog.h>
-#include <qlistview.h>
-#include <qpixmapcache.h>
+#include <tqdir.h>
+#include <tqpoint.h>
+#include <tqstringlist.h>
+#include <tqprogressdialog.h>
+#include <tqlistview.h>
+#include <tqpixmapcache.h>
// KDE includes
#include <klocale.h>
#include <kprocess.h>
@@ -98,10 +98,10 @@
#define ACTIVE_PANEL_MANAGER (ACTIVE_PANEL == krApp->mainView->left ? krApp->mainView->leftMng : \
krApp->mainView->rightMng)
-void KRslots::sendFileByEmail(QString filename) {
- QString mailProg;
- QStringList lst = Krusader::supportedTools();
- if (lst.contains("MAIL")) mailProg=lst[lst.findIndex("MAIL") + 1];
+void KRslots::sendFileByEmail(TQString filename) {
+ TQString mailProg;
+ TQStringList lst = Krusader::supportedTools();
+ if (lst.tqcontains("MAIL")) mailProg=lst[lst.tqfindIndex("MAIL") + 1];
else {
KMessageBox::error(0,i18n("Krusader can't find a supported mail client. Please install one to your path. Hint: Krusader supports Kmail."));
return;
@@ -111,7 +111,7 @@ void KRslots::sendFileByEmail(QString filename) {
if ( vfs::fromPathOrURL( mailProg ).fileName() == "kmail") {
proc << "kmail" << "--subject \""+i18n("Sending file: ")+
- filename.mid(filename.findRev('/')+1)+"\"" << QString::null +
+ filename.mid(filename.tqfindRev('/')+1)+"\"" << TQString() +
"--attach "+"\"" + filename + "\"";
}
@@ -121,8 +121,8 @@ void KRslots::sendFileByEmail(QString filename) {
}
void KRslots::compareContent() {
- QStringList lstLeft, lstRight;
- QStringList* lstActive;
+ TQStringList lstLeft, lstRight;
+ TQStringList* lstActive;
KURL name1, name2;
MAIN_VIEW->left->getSelectedNames( &lstLeft );
@@ -158,10 +158,10 @@ void KRslots::compareContent() {
class KrProcess: public KProcess
{
- QString tmp1, tmp2;
+ TQString tmp1, tmp2;
public:
- KrProcess( QString in1, QString in2 )
+ KrProcess( TQString in1, TQString in2 )
{
tmp1 = in1;
tmp2 = in2;
@@ -179,15 +179,15 @@ public:
void KRslots::compareContent( KURL url1, KURL url2 )
{
- QString diffProg;
- QStringList lst = Krusader::supportedTools();
- if (lst.contains("DIFF")) diffProg=lst[lst.findIndex("DIFF") + 1];
+ TQString diffProg;
+ TQStringList lst = Krusader::supportedTools();
+ if (lst.tqcontains("DIFF")) diffProg=lst[lst.tqfindIndex("DIFF") + 1];
else {
KMessageBox::error(0,i18n("Krusader can't find any of the supported diff-frontends. Please install one to your path. Hint: Krusader supports Kompare, Kdiff3 and Xxdiff."));
return;
}
- QString tmp1 = QString::null, tmp2 = QString::null;
+ TQString tmp1 = TQString(), tmp2 = TQString();
if (!url1.isLocalFile()) {
if( !KIO::NetAccess::download( url1, tmp1, 0 ) ){
@@ -204,8 +204,8 @@ void KRslots::compareContent( KURL url1, KURL url2 )
}
} else tmp2 = url2.path();
- KrProcess *p = new KrProcess( tmp1 != url1.path() ? tmp1 : QString::null,
- tmp2 != url2.path() ? tmp2 : QString::null );
+ KrProcess *p = new KrProcess( tmp1 != url1.path() ? tmp1 : TQString(),
+ tmp2 != url2.path() ? tmp2 : TQString() );
*p << diffProg << tmp1 << tmp2;
if (!p->start(KProcess::DontCare))
KMessageBox::error(0,i18n("Error executing ")+diffProg+" !");
@@ -214,19 +214,19 @@ void KRslots::compareContent( KURL url1, KURL url2 )
void KRslots::rightclickMenu() {
if( dynamic_cast<KrDetailedView*>(ACTIVE_PANEL->view) != 0 )
{
- QListViewItem * currentItem = dynamic_cast<QListViewItem*>(ACTIVE_PANEL->view->getCurrentKrViewItem());
+ TQListViewItem * currentItem = dynamic_cast<TQListViewItem*>(ACTIVE_PANEL->view->getCurrentKrViewItem());
if( currentItem )
{
ACTIVE_PANEL->popRightClickMenu(
ACTIVE_PANEL->mapToGlobal(
- dynamic_cast<KListView*>(ACTIVE_PANEL->view)->itemRect( currentItem ).topLeft()
+ dynamic_cast<KListView*>(ACTIVE_PANEL->view)->tqitemRect( currentItem ).topLeft()
)
);
}
}
else if( dynamic_cast<KrBriefView*>(ACTIVE_PANEL->view) != 0 )
{
- QIconViewItem * currentItem = dynamic_cast<QIconViewItem*>(ACTIVE_PANEL->view->getCurrentKrViewItem());
+ TQIconViewItem * currentItem = dynamic_cast<TQIconViewItem*>(ACTIVE_PANEL->view->getCurrentKrViewItem());
if( currentItem )
{
ACTIVE_PANEL->popRightClickMenu(
@@ -279,12 +279,12 @@ void KRslots::toggleTerminal() {
void KRslots::insertFileName(bool full_path)
{
- QString filename = ACTIVE_PANEL->view->getCurrentItem();
- if( filename == QString::null )
+ TQString filename = ACTIVE_PANEL->view->getCurrentItem();
+ if( filename == TQString() )
return;
if( full_path ){
- QString path=vfs::pathOrURL( ACTIVE_FUNC->files()->vfs_getOrigin(), 1 );
+ TQString path=vfs::pathOrURL( ACTIVE_FUNC->files()->vfs_getOrigin(), 1 );
filename = path+filename;
}
@@ -292,16 +292,16 @@ void KRslots::insertFileName(bool full_path)
if(MAIN_VIEW->cmdLine->isVisible() || !MAIN_VIEW->konsole_part || !MAIN_VIEW->konsole_part->widget() ||
!MAIN_VIEW->konsole_part->widget()->isVisible() ){
- QString current = MAIN_VIEW->cmdLine->text();
+ TQString current = MAIN_VIEW->cmdLine->text();
if( current.length() != 0 && !current.endsWith( " " ) )
current += " ";
MAIN_VIEW->cmdLine->setText( current + filename );
MAIN_VIEW->cmdLine->setFocus();
}
else if(MAIN_VIEW->konsole_part){
- filename = QString( " " ) + filename + QString( " " );
- QKeyEvent keyEvent( QEvent::KeyPress, 0, -1, 0, filename);
- QApplication::sendEvent( MAIN_VIEW->konsole_part->widget(), &keyEvent );
+ filename = TQString( " " ) + filename + TQString( " " );
+ TQKeyEvent keyEvent( TQEvent::KeyPress, 0, -1, 0, filename);
+ TQApplication::sendEvent( MAIN_VIEW->konsole_part->widget(), &keyEvent );
MAIN_VIEW->konsole_part->widget()->setFocus();
}
}
@@ -313,13 +313,13 @@ void KRslots::customFilter() { ACTIVE_PANEL->setFilter(KrViewProperties::Custom
void KRslots::markAll() { ACTIVE_PANEL->select(true,true); }
void KRslots::unmarkAll() { ACTIVE_PANEL->select(false,true); }
void KRslots::markGroup() { ACTIVE_PANEL->select(true,false); }
-void KRslots::markGroup(const QString& mask, bool select) { ACTIVE_PANEL->select( KRQuery( mask ), select); }
+void KRslots::markGroup(const TQString& tqmask, bool select) { ACTIVE_PANEL->select( KRQuery( tqmask ), select); }
void KRslots::unmarkGroup() { ACTIVE_PANEL->select(false,false); }
void KRslots::invert() { ACTIVE_PANEL->invertSelection(); }
void KRslots::root() { ACTIVE_FUNC->openUrl(vfs::fromPathOrURL("/"));}
void KRslots::refresh(const KURL& u){ ACTIVE_FUNC->openUrl(u); }
-void KRslots::home() { ACTIVE_FUNC->openUrl(QDir::homeDirPath()); }
+void KRslots::home() { ACTIVE_FUNC->openUrl(TQDir::homeDirPath()); }
void KRslots::refresh() { ACTIVE_FUNC->refresh(); }
void KRslots::properties() { ACTIVE_FUNC->properties(); }
void KRslots::dirUp() { ACTIVE_FUNC->dirUp(); }
@@ -348,7 +348,7 @@ void KRslots::runKonfigurator(bool firstTime) {
{
krConfig->setGroup( "Look&Feel" );
if((krConfig->readEntry("Filelist Icon Size",_FilelistIconSize)).toInt() != size )
- QPixmapCache::clear();
+ TQPixmapCache::clear();
KrDetailedViewItem::itemHeightChanged(); // needed when icon size / font size changes
KrBriefViewItem::itemHeightChanged();
@@ -392,7 +392,7 @@ void KRslots::swapPanels(){
}
void KRslots::toggleSwapSides(){
- QValueList<int> lst = MAIN_VIEW->horiz_splitter->sizes();
+ TQValueList<int> lst = MAIN_VIEW->horiz_splitter->sizes();
MAIN_VIEW->horiz_splitter->moveToLast( MAIN_VIEW->leftMng );
@@ -463,8 +463,8 @@ void KRslots::runRemoteMan() {
"Try the new bookmark-manager: open a new remote connection, once "
"done, press the bookmark button, select 'Add bookmark' and that's it!"));
- QString host=remoteMan::getHost();
- if (host==QString::null) return;
+ TQString host=remoteMan::getHost();
+ if (host==TQString()) return;
// otherwise, attempt a connection
ACTIVE_FUNC->openUrl(vfs::fromPathOrURL(host));
}
@@ -482,15 +482,15 @@ void KRslots::runMountMan() {
}
void KRslots::homeTerminal(){
- QString save = getcwd(0,0);
- chdir (QDir::homeDirPath().local8Bit());
+ TQString save = getcwd(0,0);
+ chdir (TQDir::homeDirPath().local8Bit());
KProcess proc;
krConfig->setGroup("General");
- QString term = krConfig->readEntry("Terminal",_Terminal);
+ TQString term = krConfig->readEntry("Terminal",_Terminal);
proc << KrServices::separateArgs( term );
- if( term.contains( "konsole" ) ) /* KDE 3.2 bug (konsole is killed by pressing Ctrl+C) */
+ if( term.tqcontains( "konsole" ) ) /* KDE 3.2 bug (konsole is killed by pressing Ctrl+C) */
{ /* Please remove the patch if the bug is corrected */
proc << "&";
proc.setUseShell( true );
@@ -506,20 +506,20 @@ void KRslots::sysInfo(){
KProcess proc;
proc << "kcmshell" << "System/ksysctrl";
if (!proc.start(KProcess::DontCare)){
- KMessageBox::sorry(krApp,i18n("Can't find \"KsysCtrl\". Please install KDE admin package"));
+ KMessageBox::sorry(krApp,i18n("Can't tqfind \"KsysCtrl\". Please install KDE admin package"));
}
}
void KRslots::multiRename(){
- QStringList lst = Krusader::supportedTools();
- int i = lst.findIndex("RENAME");
+ TQStringList lst = Krusader::supportedTools();
+ int i = lst.tqfindIndex("RENAME");
if (i == -1){
KMessageBox::sorry(krApp,i18n("Can't find a batch rename tool.\nYou can get Krename at http://www.krename.net"));
return;
}
- QString pathToRename = lst[i+1];
+ TQString pathToRename = lst[i+1];
- QStringList names;
+ TQStringList names;
((ListPanel*)ACTIVE_PANEL)->getSelectedNames(&names);
KURL::List* urls = ACTIVE_FUNC->files()->vfs_getFiles(&names);
@@ -532,7 +532,7 @@ void KRslots::multiRename(){
proc << pathToRename;
for( KURL::List::iterator u=urls->begin(); u != urls->end(); ++u){
- if( QFileInfo((*u).path()).isDir() ) proc << "-r";
+ if( TQFileInfo((*u).path()).isDir() ) proc << "-r";
proc << "\"" + (*u).path() + "\""; // patch thanks to Tobias Vogele
}
@@ -549,7 +549,7 @@ void KRslots::rootKrusader()
}
KShellProcess proc;
- proc << KrServices::fullPathName( "kdesu" ) << QString("'") + KrServices::fullPathName( "krusader" ) +
+ proc << KrServices::fullPathName( "kdesu" ) << TQString("'") + KrServices::fullPathName( "krusader" ) +
" --left=\"" +MAIN_VIEW->left->func->files()->vfs_getOrigin().url() +
"\" --right=\""+MAIN_VIEW->right->func->files()->vfs_getOrigin().url() + "\"'";
@@ -657,8 +657,8 @@ void KRslots::closeTab() {
void KRslots::slotSplit()
{
- QStringList list;
- QString name;
+ TQStringList list;
+ TQString name;
((ListPanel*)ACTIVE_PANEL)->getSelectedNames(&list);
@@ -684,7 +684,7 @@ void KRslots::slotSplit()
SplitterGUI splitterGUI( MAIN_VIEW, fileURL, destDir );
- if( splitterGUI.result() == QDialog::Accepted )
+ if( splitterGUI.result() == TQDialog::Accepted )
{
bool splitToOtherPanel = ( splitterGUI.getDestinationDir().equals( ACTIVE_PANEL->otherPanel->virtualPath(), true ) );
@@ -697,11 +697,11 @@ void KRslots::slotSplit()
}
void KRslots::slotCombine(){
- QStringList list;
+ TQStringList list;
KURL baseURL;
bool unixStyle = false;
bool windowsStyle = false;
- QString commonName = QString::null;
+ TQString commonName = TQString();
unsigned int commonLength = 0;
((ListPanel*)ACTIVE_PANEL)->getSelectedNames(&list);
@@ -712,7 +712,7 @@ void KRslots::slotCombine(){
}
/* checking splitter names */
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
KURL url = ACTIVE_FUNC->files()->vfs_getFile(*it);
if( url.isEmpty() )
@@ -725,9 +725,9 @@ void KRslots::slotCombine(){
if( !unixStyle )
{
- QString name = url.fileName();
- int extPos = name.findRev( '.' );
- QString ext = name.mid( extPos + 1 );
+ TQString name = url.fileName();
+ int extPos = name.tqfindRev( '.' );
+ TQString ext = name.mid( extPos + 1 );
name.truncate( extPos );
url.setFileName( name );
@@ -738,7 +738,7 @@ void KRslots::slotCombine(){
{
if( windowsStyle )
{
- KMessageBox::error(0,i18n("Not a split file %1!").arg( vfs::pathOrURL( url ) ));
+ KMessageBox::error(0,i18n("Not a split file %1!").tqarg( vfs::pathOrURL( url ) ));
return;
}
unixStyle = true;
@@ -765,8 +765,8 @@ void KRslots::slotCombine(){
do
{
- QString shortName = *it;
- QChar lastChar = shortName.at( shortName.length()-1 );
+ TQString shortName = *it;
+ TQChar lastChar = shortName.at( shortName.length()-1 );
if( lastChar.isLetter() )
{
@@ -779,8 +779,8 @@ void KRslots::slotCombine(){
while ( commonName.length() )
{
- QString shorter = commonName.left( commonName.length() - 1 );
- QString testFile = shorter.leftJustify( commonLength, fillLetter );
+ TQString shorter = commonName.left( commonName.length() - 1 );
+ TQString testFile = shorter.leftJustify( commonLength, fillLetter );
if( ACTIVE_FUNC->files()->vfs_search( testFile ) == 0 )
break;
@@ -801,14 +801,14 @@ void KRslots::slotCombine(){
if( error )
{
- KMessageBox::error(0,i18n("Not a splitted file %1!").arg( vfs::pathOrURL( url ) ));
+ KMessageBox::error(0,i18n("Not a splitted file %1!").tqarg( vfs::pathOrURL( url ) ));
return;
}
}
}
// ask the user for the copy dest
- KURL dest = KChooseDir::getDir(i18n("Combining %1.* to directory:" ).arg( vfs::pathOrURL( baseURL ) ),
+ KURL dest = KChooseDir::getDir(i18n("Combining %1.* to directory:" ).tqarg( vfs::pathOrURL( baseURL ) ),
ACTIVE_PANEL->otherPanel->virtualPath(), ACTIVE_PANEL->virtualPath());
if ( dest.isEmpty() ) return ; // the user canceled
@@ -831,7 +831,7 @@ void KRslots::manageUseractions() {
ActionMan actionMan( MAIN_VIEW );
}
-void KRslots::slotSynchronizeDirs( QStringList selected ) {
+void KRslots::slotSynchronizeDirs( TQStringList selected ) {
new SynchronizerGUI( 0, MAIN_VIEW->left->func->files()->vfs_getOrigin(),
MAIN_VIEW->right->func->files()->vfs_getOrigin(), selected );
}
diff --git a/krusader/krslots.h b/krusader/krslots.h
index 293279c..f48292a 100644
--- a/krusader/krslots.h
+++ b/krusader/krslots.h
@@ -33,7 +33,7 @@
#ifndef KRSLOTS_H
#define KRSLOTS_H
-#include <qobject.h>
+#include <tqobject.h>
// the 2 following #includes should go away with the ugly stubs on the bottom
#include "krusader.h"
#include "krusaderview.h"
@@ -47,19 +47,20 @@
class ListPanel;
class KURL;
-class KRslots : public QObject {
+class KRslots : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
enum compareMode { full } ;
- KRslots(QObject *parent): QObject(parent, "KRslots") {}
+ KRslots(TQObject *tqparent): TQObject(tqparent, "KRslots") {}
~KRslots() {}
public slots:
void createChecksum();
void matchChecksum();
- void sendFileByEmail( QString filename );
+ void sendFileByEmail( TQString filename );
void compareContent();
void compareContent( KURL, KURL );
void rightclickMenu();
@@ -83,7 +84,7 @@ class KRslots : public QObject {
void markAll();
void unmarkAll();
void markGroup();
- void markGroup(const QString &, bool select);
+ void markGroup(const TQString &, bool select);
void unmarkGroup();
void invert();
void compareDirs();
@@ -145,7 +146,7 @@ class KRslots : public QObject {
void slotCombine();
void userMenu();
void manageUseractions();
- void slotSynchronizeDirs( QStringList selected = QStringList() );
+ void slotSynchronizeDirs( TQStringList selected = TQStringList() );
void slotSyncBrowse();
void slotDiskUsage();
void slotLocationBar();
@@ -177,7 +178,7 @@ class KRslots : public QObject {
void rename();
// ugly stubs, remove later ?
- void slotCurrentChanged( QString p ) { MAIN_VIEW->slotCurrentChanged( p ); }
+ void slotCurrentChanged( TQString p ) { MAIN_VIEW->slotCurrentChanged( p ); }
void slotSetActivePanel( ListPanel *p ) { MAIN_VIEW->slotSetActivePanel( p ); }
diff --git a/krusader/krusader.cpp b/krusader/krusader.cpp
index 430beff..c7419ee 100644
--- a/krusader/krusader.cpp
+++ b/krusader/krusader.cpp
@@ -53,15 +53,15 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#include <kdeversion.h>
// QT includes
-#include <qpixmap.h>
-#include <qstringlist.h>
-#include <qdir.h>
-#include <qprinter.h>
-#include <qprogressdialog.h>
-#include <qvaluelist.h>
-#include <qwhatsthis.h>
-#include <qwidgetlist.h>
-#include <qdatetime.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
+#include <tqprinter.h>
+#include <tqprogressdialog.h>
+#include <tqvaluelist.h>
+#include <tqwhatsthis.h>
+#include <tqwidgetlist.h>
+#include <tqdatetime.h>
#include <dcopclient.h>
// Krusader includes
#include "krusader.h"
@@ -196,7 +196,7 @@ KPopupMenu *Krusader::userActionMenu = 0;
UserAction *Krusader::userAction = 0;
UserMenu *Krusader::userMenu = 0;
KrBookmarkHandler *Krusader::bookman = 0;
-//QTextOStream *Krusader::_krOut = QTextOStream(::stdout);
+//TQTextOStream *Krusader::_krOut = TQTextOStream(::stdout);
#ifdef __KJSEMBED__
KrJS *Krusader::js = 0;
@@ -204,7 +204,7 @@ KAction *Krusader::actShowJSConsole = 0;
#endif
// construct the views, statusbar and menu bars and prepare Krusader to start
-Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|Qt::WStyle_ContextHelp),
+Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|TQt::WStyle_ContextHelp),
DCOPObject("Krusader-Interface"), status(NULL), sysTray( 0 ), isStarting( true ), isExiting( false ), directExit( false ) {
// parse command line arguments
KCmdLineArgs * args = KCmdLineArgs::parsedArgs();
@@ -213,14 +213,14 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|Q
// create the "krusader"
App = this;
- slot = new KRslots(this);
+ slot = new KRslots(TQT_TQOBJECT(this));
setXMLFile( "krusaderui.rc" ); // kpart-related xml file
plzWait = new KRPleaseWaitHandler();
bool runKonfig = versionControl();
- QString message;
+ TQString message;
switch ( config->getConfigState() ) {
case KConfigBase::NoAccess :
message = "Krusader's configuration file can't be found. Default values will be used.";
@@ -245,7 +245,7 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|Q
// create bookman
bookman = new KrBookmarkHandler();
- popularUrls = new PopularUrls(this);
+ popularUrls = new PopularUrls(TQT_TQOBJECT(this));
queueManager = new QueueManager();
@@ -265,23 +265,23 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|Q
initChecksumModule();
krConfig->setGroup( "Look&Feel" );
- QString defaultType = krConfig->readEntry( "Default Panel Type", _DefaultPanelType );
+ TQString defaultType = krConfig->readEntry( "Default Panel Type", _DefaultPanelType );
krConfig->setGroup( "Startup" );
- QStringList leftTabs = krConfig->readPathListEntry( "Left Tab Bar" );
- QStringList rightTabs = krConfig->readPathListEntry( "Right Tab Bar" );
- QStringList leftTabTypes = krConfig->readListEntry( "Left Tab Bar Types" );
- QStringList rightTabTypes = krConfig->readListEntry( "Right Tab Bar Types" );
- QValueList<int> leftTabProps = krConfig->readIntListEntry( "Left Tab Bar Props" );
- QValueList<int> rightTabProps = krConfig->readIntListEntry( "Right Tab Bar Props" );
+ TQStringList leftTabs = krConfig->readPathListEntry( "Left Tab Bar" );
+ TQStringList rightTabs = krConfig->readPathListEntry( "Right Tab Bar" );
+ TQStringList leftTabTypes = krConfig->readListEntry( "Left Tab Bar Types" );
+ TQStringList rightTabTypes = krConfig->readListEntry( "Right Tab Bar Types" );
+ TQValueList<int> leftTabProps = krConfig->readIntListEntry( "Left Tab Bar Props" );
+ TQValueList<int> rightTabProps = krConfig->readIntListEntry( "Right Tab Bar Props" );
int leftActiveTab = krConfig->readNumEntry( "Left Active Tab", 0 );
int rightActiveTab = krConfig->readNumEntry( "Right Active Tab", 0 );
- QString startProfile = krConfig->readEntry("Starter Profile Name", QString::null );
+ TQString startProfile = krConfig->readEntry("Starter Profile Name", TQString() );
bool leftActive = krConfig->readBoolEntry( "Left Side Is Active", false );
// get command-line arguments
if ( args->isSet( "left" ) ) {
- leftTabs = QStringList::split( ',', args->getOption( "left" ) );
+ leftTabs = TQStringList::split( ',', args->getOption( "left" ) );
leftTabTypes.clear();
leftTabProps.clear();
@@ -291,13 +291,13 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|Q
for(unsigned int i = 0; i != leftTabs.count(); i++ )
{
leftTabs[ i ] = leftTabs[ i ].stripWhiteSpace();
- if( !leftTabs[ i ].startsWith( "/" ) && leftTabs[ i ].find( ":/" ) < 0 )
- leftTabs[ i ] = QDir::currentDirPath() + "/" + leftTabs[ i ];
+ if( !leftTabs[ i ].startsWith( "/" ) && leftTabs[ i ].tqfind( ":/" ) < 0 )
+ leftTabs[ i ] = TQDir::currentDirPath() + "/" + leftTabs[ i ];
}
- startProfile = QString::null;
+ startProfile = TQString();
}
if ( args->isSet( "right" ) ) {
- rightTabs = QStringList::split( ',', args->getOption( "right" ) );
+ rightTabs = TQStringList::split( ',', args->getOption( "right" ) );
rightTabTypes.clear();
rightTabProps.clear();
@@ -307,10 +307,10 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|Q
for(unsigned int i = 0; i != rightTabs.count(); i++ )
{
rightTabs[ i ] = rightTabs[ i ].stripWhiteSpace();
- if( !rightTabs[ i ].startsWith( "/" ) && rightTabs[ i ].find( ":/" ) < 0 )
- rightTabs[ i ] = QDir::currentDirPath() + "/" + rightTabs[ i ];
+ if( !rightTabs[ i ].startsWith( "/" ) && rightTabs[ i ].tqfind( ":/" ) < 0 )
+ rightTabs[ i ] = TQDir::currentDirPath() + "/" + rightTabs[ i ];
}
- startProfile = QString::null;
+ startProfile = TQString();
}
while( leftTabTypes.count() < leftTabs.count() )
@@ -337,13 +337,13 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|Q
if( leftTabs.count() == 0 )
{
- leftTabs.push_back( QDir::homeDirPath() );
+ leftTabs.push_back( TQDir::homeDirPath() );
leftTabTypes.push_back( defaultType );
leftTabProps.push_back( 0 );
}
if( rightTabs.count() == 0 )
{
- rightTabs.push_back( QDir::homeDirPath() );
+ rightTabs.push_back( TQDir::homeDirPath() );
rightTabTypes.push_back( defaultType );
rightTabProps.push_back( 0 );
}
@@ -360,8 +360,8 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|Q
setupAccels();
// create a status bar
- status = new KrusaderStatus( this );
- QWhatsThis::add( status, i18n( "Statusbar will show basic information "
+ status = new KrusadertqStatus( this );
+ TQWhatsThis::add( status, i18n( "Statusbar will show basic information "
"about file below mouse pointer." ) );
// This enables Krusader to show a tray icon
@@ -370,7 +370,7 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|Q
sysTray->setPixmap( iconLoader->loadIcon( privIcon(), KIcon::Panel, 22 ) );
sysTray->hide();
- connect( sysTray, SIGNAL( quitSelected() ), this, SLOT( setDirectExit() ) );
+ connect( sysTray, TQT_SIGNAL( quitSelected() ), TQT_TQOBJECT(this), TQT_SLOT( setDirectExit() ) );
setCentralWidget( mainView );
config->setGroup( "Startup" );
@@ -437,13 +437,13 @@ bool Krusader::versionControl() {
bool firstRun = config->readBoolEntry(FIRST_RUN, true);
#if 0
- QString oldVerText = config->readEntry( "Version", "10.0" );
- oldVerText.truncate( oldVerText.findRev( "." ) ); // remove the third dot
+ TQString oldVerText = config->readEntry( "Version", "10.0" );
+ oldVerText.truncate( oldVerText.tqfindRev( "." ) ); // remove the third dot
float oldVer = oldVerText.toFloat();
// older icompatible version
if ( oldVer <= 0.9 ) {
KMessageBox::information( krApp, i18n( "A configuration of 1.51 or older was detected. Krusader has to reset your configuration to default values.\nNote: Your bookmarks and keybindings will remain intact.\n Krusader will now run Konfigurator." ) );
- /*if ( !QDir::home().remove( ".kde/share/config/krusaderrc" ) ) {
+ /*if ( !TQDir::home().remove( ".kde/share/config/krusaderrc" ) ) {
KMessageBox::error( krApp, i18n( "Unable to remove your krusaderrc file! Please remove it manually and rerun Krusader." ) );
exit( 1 );
}*/
@@ -463,14 +463,14 @@ bool Krusader::versionControl() {
return retval;
}
-void Krusader::statusBarUpdate( QString& mess ) {
+void Krusader::statusBarUpdate( TQString& mess ) {
// change the message on the statusbar for 2 seconds
if (status) // ugly!!!! But as statusBar() creates a status bar if there is no, I have to ask status to prevent
- // the creation of the KDE default status bar instead of KrusaderStatus.
+ // the creation of the KDE default status bar instead of KrusadertqStatus.
statusBar() ->message( mess, 5000 );
}
-void Krusader::showEvent ( QShowEvent * ) {
+void Krusader::showEvent ( TQShowEvent * ) {
if( isExiting )
return;
config->setGroup( "Look&Feel" );
@@ -483,20 +483,20 @@ void Krusader::showEvent ( QShowEvent * ) {
// the taskbar when minimizing (system tray issue)
}
-void Krusader::hideEvent ( QHideEvent *e ) {
+void Krusader::hideEvent ( TQHideEvent *e ) {
if( isExiting ) {
KParts::MainWindow::hideEvent( e );
sysTray->hide();
return;
}
- QString lastGroup = config->group();
+ TQString lastGroup = config->group();
config->setGroup( "Look&Feel" );
bool showTrayIcon = krConfig->readBoolEntry( "Minimize To Tray", _MinimizeToTray );
config->setGroup ( lastGroup );
bool isModalTopWidget = false;
- QWidget *actWnd = qApp->activeWindow();
+ TQWidget *actWnd = TQT_TQWIDGET(tqApp->activeWindow());
if ( actWnd )
isModalTopWidget = actWnd->isModal();
@@ -507,12 +507,12 @@ void Krusader::hideEvent ( QHideEvent *e ) {
} else KParts::MainWindow::hideEvent( e );
}
-void Krusader::moveEvent ( QMoveEvent *e ) {
+void Krusader::moveEvent ( TQMoveEvent *e ) {
oldPos = e->oldPos();
KParts::MainWindow::moveEvent( e );
}
-void Krusader::resizeEvent ( QResizeEvent *e ) {
+void Krusader::resizeEvent ( TQResizeEvent *e ) {
oldSize = e->oldSize();
KParts::MainWindow::resizeEvent( e );
}
@@ -520,11 +520,11 @@ void Krusader::resizeEvent ( QResizeEvent *e ) {
void Krusader::setupAccels() {
accels = new KAccel( this );
// SHIFT+F3
- accels->insert( "F3_ViewDlg", i18n( "F3 View Dialog" ), QString::null,
- SHIFT + Key_F3, SLOTS, SLOT( viewDlg() ) );
+ accels->insert( "F3_ViewDlg", i18n( "F3 View Dialog" ), TQString(),
+ SHIFT + Key_F3, SLOTS, TQT_SLOT( viewDlg() ) );
// Tab
- accels->insert( "Tab-Switch panel", i18n( "Tab: switch panel" ), QString::null,
- Key_Tab, mainView, SLOT( panelSwitch() ) );
+ accels->insert( "Tab-Switch panel", i18n( "Tab: switch panel" ), TQString(),
+ Key_Tab, TQT_TQOBJECT(mainView), TQT_SLOT( panelSwitch() ) );
}
@@ -535,110 +535,110 @@ void Krusader::setupActions() {
//actNewTool = 0;//new KAction(i18n("&Add a new tool"), 0, this, 0, actionCollection(), "add tool");
//actToolsSetup = 0;//new KAction(i18n("&Tools Menu Setup"), 0, 0, this, 0, actionCollection(), "tools setup");
//KStdAction::print(SLOTS, 0,actionCollection(),"std_print");
- //KStdAction::showMenubar( SLOTS, SLOT( showMenubar() ), actionCollection(), "std_menubar" );
+ //KStdAction::showMenubar( SLOTS, TQT_SLOT( showMenubar() ), actionCollection(), "std_menubar" );
// second, the KDE standard action
- //KStdAction::up( SLOTS, SLOT( dirUp() ), actionCollection(), "std_up" )->setShortcut(Key_Backspace);
+ //KStdAction::up( SLOTS, TQT_SLOT( dirUp() ), actionCollection(), "std_up" )->setShortcut(Key_Backspace);
/* Shortcut disabled because of the Terminal Emulator bug. */
krConfig->setGroup( "Private" );
int compareMode = krConfig->readNumEntry( "Compare Mode", 0 );
int cmdExecMode = krConfig->readNumEntry( "Command Execution Mode", 0 );
- KStdAction::home( SLOTS, SLOT( home() ), actionCollection(), "std_home" )->setText( i18n("Home") ); /*->setShortcut(Key_QuoteLeft);*/
- new KAction( i18n( "&Reload" ), "reload", CTRL + Key_R, SLOTS, SLOT( refresh() ), actionCollection(), "std_redisplay" );
- actShowToolBar = KStdAction::showToolbar( SLOTS, SLOT( toggleToolbar() ), actionCollection(), "std_toolbar" );
- new KToggleAction( i18n("Show Actions Toolbar"), 0, SLOTS, SLOT( toggleActionsToolbar() ),
+ KStdAction::home( SLOTS, TQT_SLOT( home() ), actionCollection(), "std_home" )->setText( i18n("Home") ); /*->setShortcut(Key_QuoteLeft);*/
+ new KAction( i18n( "&Reload" ), "reload", CTRL + Key_R, SLOTS, TQT_SLOT( refresh() ), actionCollection(), "std_redisplay" );
+ actShowToolBar = KStdAction::showToolbar( SLOTS, TQT_SLOT( toggleToolbar() ), actionCollection(), "std_toolbar" );
+ new KToggleAction( i18n("Show Actions Toolbar"), 0, SLOTS, TQT_SLOT( toggleActionsToolbar() ),
actionCollection(), "toggle actions toolbar" );
- actShowStatusBar = KStdAction::showStatusbar( SLOTS, SLOT( toggleStatusbar() ), actionCollection(), "std_statusbar" );
- KStdAction::quit( this, SLOT( slotClose() ), actionCollection(), "std_quit" );
- KStdAction::configureToolbars( SLOTS, SLOT( configToolbar() ), actionCollection(), "std_config_toolbar" );
- KStdAction::keyBindings( SLOTS, SLOT( configKeys() ), actionCollection(), "std_config_keys" );
+ actShowStatusBar = KStdAction::showStatusbar( SLOTS, TQT_SLOT( toggleStatusbar() ), actionCollection(), "std_statusbar" );
+ KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( slotClose() ), actionCollection(), "std_quit" );
+ KStdAction::configureToolbars( SLOTS, TQT_SLOT( configToolbar() ), actionCollection(), "std_config_toolbar" );
+ KStdAction::keyBindings( SLOTS, TQT_SLOT( configKeys() ), actionCollection(), "std_config_keys" );
- KStdAction::cut( SLOTS, SLOT( cut() ), actionCollection(), "std_cut" )->setText( i18n("Cut to Clipboard") );
- (actCopy = KStdAction::copy( SLOTS, SLOT( copy() ), actionCollection(), "std_copy" ))->setText( i18n("Copy to Clipboard") );
- (actPaste = KStdAction::paste( SLOTS, SLOT( paste() ), actionCollection(), "std_paste" ))->setText( i18n("Paste from Clipboard") );
+ KStdAction::cut( SLOTS, TQT_SLOT( cut() ), actionCollection(), "std_cut" )->setText( i18n("Cut to Clipboard") );
+ (actCopy = KStdAction::copy( SLOTS, TQT_SLOT( copy() ), actionCollection(), "std_copy" ))->setText( i18n("Copy to Clipboard") );
+ (actPaste = KStdAction::paste( SLOTS, TQT_SLOT( paste() ), actionCollection(), "std_paste" ))->setText( i18n("Paste from Clipboard") );
// the toggle actions
actToggleFnkeys = new KToggleAction( i18n( "Show &FN Keys Bar" ), 0, SLOTS,
- SLOT( toggleFnkeys() ), actionCollection(), "toggle fn bar" );
+ TQT_SLOT( toggleFnkeys() ), actionCollection(), "toggle fn bar" );
actToggleFnkeys->setChecked( true );
actToggleCmdline = new KToggleAction( i18n( "Show &Command Line" ), 0, SLOTS,
- SLOT( toggleCmdline() ), actionCollection(), "toggle command line" );
+ TQT_SLOT( toggleCmdline() ), actionCollection(), "toggle command line" );
actToggleCmdline->setChecked( true );
actToggleTerminal = new KToggleAction( i18n( "Show Terminal &Emulator" ), ALT + CTRL + Key_T, SLOTS,
- SLOT( toggleTerminal() ), actionCollection(), "toggle terminal emulator" );
+ TQT_SLOT( toggleTerminal() ), actionCollection(), "toggle terminal emulator" );
actToggleTerminal->setChecked( false );
actDetailedView = new KAction( i18n( "&Detailed View" ), ALT + SHIFT + Key_D, SLOTS,
- SLOT( setDetailedView() ), actionCollection(), "detailed_view" );
+ TQT_SLOT( setDetailedView() ), actionCollection(), "detailed_view" );
actBriefView = new KAction( i18n( "&Brief View" ), ALT + SHIFT + Key_B, SLOTS,
- SLOT( setBriefView() ), actionCollection(), "brief_view" );
+ TQT_SLOT( setBriefView() ), actionCollection(), "brief_view" );
actToggleHidden = new KToggleAction( i18n( "Show &Hidden Files" ), CTRL + Key_Period, SLOTS,
- SLOT( toggleHidden() ), actionCollection(), "toggle hidden files" );
+ TQT_SLOT( toggleHidden() ), actionCollection(), "toggle hidden files" );
actSwapPanels = new KAction( i18n( "S&wap Panels" ), CTRL + Key_U, SLOTS,
- SLOT( swapPanels() ), actionCollection(), "swap panels" );
+ TQT_SLOT( swapPanels() ), actionCollection(), "swap panels" );
actSwapSides = new KAction( i18n( "Sw&ap Sides" ), CTRL + SHIFT + Key_U, SLOTS,
- SLOT( toggleSwapSides() ), actionCollection(), "toggle swap sides" );
+ TQT_SLOT( toggleSwapSides() ), actionCollection(), "toggle swap sides" );
krConfig->setGroup( "Look&Feel" );
actToggleHidden->setChecked( krConfig->readBoolEntry( "Show Hidden", _ShowHidden ) );
// and then the DONE actions
actCmdlinePopup = new KAction( i18n( "popup cmdline" ), 0, CTRL + Key_Slash, SLOTS,
- SLOT( cmdlinePopup() ), actionCollection(), "cmdline popup" );
+ TQT_SLOT( cmdlinePopup() ), actionCollection(), "cmdline popup" );
/* Shortcut disabled because of the Terminal Emulator bug. */
- actDirUp = new KAction( i18n( "Up" ), "up", CTRL+Key_PageUp /*Key_Backspace*/, SLOTS, SLOT( dirUp() ), actionCollection(), "dirUp" );
- new KAction( i18n( "&New Text File..." ), "filenew", SHIFT + Key_F4, SLOTS, SLOT( editDlg() ), actionCollection(), "edit_new_file" );
- new KAction( i18n( "Start &Root Mode Krusader" ), "krusader_root", ALT + Key_K, SLOTS, SLOT( rootKrusader() ), actionCollection(), "root krusader" );
+ actDirUp = new KAction( i18n( "Up" ), "up", CTRL+Key_PageUp /*Key_Backspace*/, SLOTS, TQT_SLOT( dirUp() ), actionCollection(), "dirUp" );
+ new KAction( i18n( "&New Text File..." ), "filenew", SHIFT + Key_F4, SLOTS, TQT_SLOT( editDlg() ), actionCollection(), "edit_new_file" );
+ new KAction( i18n( "Start &Root Mode Krusader" ), "krusader_root", ALT + Key_K, SLOTS, TQT_SLOT( rootKrusader() ), actionCollection(), "root krusader" );
actTest = new KAction( i18n( "T&est Archive" ), "ark", ALT + Key_E,
- SLOTS, SLOT( testArchive() ), actionCollection(), "test archives" );
+ SLOTS, TQT_SLOT( testArchive() ), actionCollection(), "test archives" );
//actFTPConnect = new KAction( i18n( "&Net Connections" ), "domtreeviewer", 0,
- // SLOTS, SLOT( runRemoteMan() ), actionCollection(), "ftp connect" );
+ // SLOTS, TQT_SLOT( runRemoteMan() ), actionCollection(), "ftp connect" );
actFTPNewConnect = new KAction( i18n( "New Net &Connection..." ), "connect_creating", CTRL + Key_N,
- SLOTS, SLOT( newFTPconnection() ), actionCollection(), "ftp new connection" );
+ SLOTS, TQT_SLOT( newFTPconnection() ), actionCollection(), "ftp new connection" );
actProfiles = new KAction( i18n( "Pro&files" ), "kr_profile", ALT + Key_L,
- MAIN_VIEW, SLOT( profiles() ), actionCollection(), "profile" );
+ TQT_TQOBJECT(MAIN_VIEW), TQT_SLOT( profiles() ), actionCollection(), "profile" );
actCalculate = new KAction( i18n( "Calculate &Occupied Space" ), "kcalc", 0,
- SLOTS, SLOT( calcSpace() ), actionCollection(), "calculate" );
+ SLOTS, TQT_SLOT( calcSpace() ), actionCollection(), "calculate" );
actCreateChecksum = new KAction( i18n( "Create Checksum..." ), "binary", 0,
- SLOTS, SLOT( createChecksum() ), actionCollection(), "create checksum" );
+ SLOTS, TQT_SLOT( createChecksum() ), actionCollection(), "create checksum" );
actMatchChecksum = new KAction( i18n( "Verify Checksum..." ), "match_checksum", 0,
- SLOTS, SLOT( matchChecksum() ), actionCollection(), "match checksum" );
+ SLOTS, TQT_SLOT( matchChecksum() ), actionCollection(), "match checksum" );
actProperties = new KAction( i18n( "&Properties..." ), 0, ALT+Key_Enter,
- SLOTS, SLOT( properties() ), actionCollection(), "properties" );
+ SLOTS, TQT_SLOT( properties() ), actionCollection(), "properties" );
actPack = new KAction( i18n( "Pac&k..." ), "kr_arc_pack", ALT + Key_P,
- SLOTS, SLOT( slotPack() ), actionCollection(), "pack" );
+ SLOTS, TQT_SLOT( slotPack() ), actionCollection(), "pack" );
actUnpack = new KAction( i18n( "&Unpack..." ), "kr_arc_unpack", ALT + Key_U,
- SLOTS, SLOT( slotUnpack() ), actionCollection() , "unpack" );
+ SLOTS, TQT_SLOT( slotUnpack() ), actionCollection() , "unpack" );
actSplit = new KAction( i18n( "Sp&lit File..." ), "kr_split", CTRL + Key_P,
- SLOTS, SLOT( slotSplit() ), actionCollection(), "split" );
+ SLOTS, TQT_SLOT( slotSplit() ), actionCollection(), "split" );
actCombine = new KAction( i18n( "Com&bine Files..." ), "kr_combine", CTRL + Key_B,
- SLOTS, SLOT( slotCombine() ), actionCollection() , "combine" );
+ SLOTS, TQT_SLOT( slotCombine() ), actionCollection() , "combine" );
actSelect = new KAction( i18n( "Select &Group..." ), "kr_select", CTRL + Key_Plus,
- SLOTS, SLOT( markGroup() ), actionCollection(), "select group" );
+ SLOTS, TQT_SLOT( markGroup() ), actionCollection(), "select group" );
actSelectAll = new KAction( i18n( "&Select All" ), "kr_selectall", ALT + Key_Plus,
- SLOTS, SLOT( markAll() ), actionCollection(), "select all" );
+ SLOTS, TQT_SLOT( markAll() ), actionCollection(), "select all" );
actUnselect = new KAction( i18n( "&Unselect Group..." ), "kr_unselect", CTRL + Key_Minus,
- SLOTS, SLOT( unmarkGroup() ), actionCollection(), "unselect group" );
+ SLOTS, TQT_SLOT( unmarkGroup() ), actionCollection(), "unselect group" );
actUnselectAll = new KAction( i18n( "U&nselect All" ), "kr_unselectall", ALT + Key_Minus,
- SLOTS, SLOT( unmarkAll() ), actionCollection(), "unselect all" );
+ SLOTS, TQT_SLOT( unmarkAll() ), actionCollection(), "unselect all" );
actInvert = new KAction( i18n( "&Invert Selection" ), "kr_invert", ALT + Key_Asterisk,
- SLOTS, SLOT( invert() ), actionCollection(), "invert" );
+ SLOTS, TQT_SLOT( invert() ), actionCollection(), "invert" );
actCompDirs = new KAction( i18n( "&Compare Directories" ), "view_left_right", ALT + Key_C,
- SLOTS, SLOT( compareDirs() ), actionCollection(), "compare dirs" );
+ SLOTS, TQT_SLOT( compareDirs() ), actionCollection(), "compare dirs" );
actSelectNewerAndSingle = new KRadioAction( i18n( "&Select Newer and Single" ), 0,
- SLOTS, SLOT( compareSetup() ), actionCollection(), "select_newer_and_single" );
+ SLOTS, TQT_SLOT( compareSetup() ), actionCollection(), "select_newer_and_single" );
actSelectNewer = new KRadioAction( i18n( "Select &Newer" ), 0,
- SLOTS, SLOT( compareSetup() ), actionCollection(), "select_newer" );
+ SLOTS, TQT_SLOT( compareSetup() ), actionCollection(), "select_newer" );
actSelectSingle = new KRadioAction( i18n( "Select &Single" ), 0,
- SLOTS, SLOT( compareSetup() ), actionCollection(), "select_single" );
+ SLOTS, TQT_SLOT( compareSetup() ), actionCollection(), "select_single" );
actSelectDifferentAndSingle = new KRadioAction( i18n( "Select Different &and Single" ), 0,
- SLOTS, SLOT( compareSetup() ), actionCollection(), "select_different_and_single" );
+ SLOTS, TQT_SLOT( compareSetup() ), actionCollection(), "select_different_and_single" );
actSelectDifferent = new KRadioAction( i18n( "Select &Different" ), 0,
- SLOTS, SLOT( compareSetup() ), actionCollection(), "select_different" );
+ SLOTS, TQT_SLOT( compareSetup() ), actionCollection(), "select_different" );
actSelectNewerAndSingle->setExclusiveGroup( "the_select_group" );
actSelectNewer->setExclusiveGroup( "the_select_group" );
actSelectSingle->setExclusiveGroup( "the_select_group" );
@@ -648,23 +648,23 @@ void Krusader::setupActions() {
(*compareArray[ compareMode ])->setChecked( true );
actExecStartAndForget = new KRadioAction(
i18n( "Start and &Forget" ), 0,
- SLOTS, SLOT( execTypeSetup() ),
+ SLOTS, TQT_SLOT( execTypeSetup() ),
actionCollection(), "exec_start_and_forget" );
actExecCollectSeparate = new KRadioAction(
i18n( "Display &Separated Standard and Error Output" ), 0,
- SLOTS, SLOT( execTypeSetup() ),
+ SLOTS, TQT_SLOT( execTypeSetup() ),
actionCollection(), "exec_collect_separate" );
actExecCollectTogether = new KRadioAction(
i18n( "Display &Mixed Standard and Error Output" ), 0,
- SLOTS, SLOT( execTypeSetup() ),
+ SLOTS, TQT_SLOT( execTypeSetup() ),
actionCollection(), "exec_collect_together" );
actExecTerminalExternal = new KRadioAction(
i18n( "Start in &New Terminal" ), 0,
- SLOTS, SLOT( execTypeSetup() ),
+ SLOTS, TQT_SLOT( execTypeSetup() ),
actionCollection(), "exec_terminal_external" );
actExecTerminalEmbedded = new KRadioAction(
i18n( "Send to &Embedded Terminal Emulator" ), 0,
- SLOTS, SLOT( execTypeSetup() ),
+ SLOTS, TQT_SLOT( execTypeSetup() ),
actionCollection(), "exec_terminal_embedded" );
actExecStartAndForget->setExclusiveGroup("the_exec_type_group");
actExecCollectSeparate->setExclusiveGroup("the_exec_type_group");
@@ -676,124 +676,124 @@ void Krusader::setupActions() {
actHomeTerminal = new KAction( i18n( "Start &Terminal" ), "terminal", 0,
- SLOTS, SLOT( homeTerminal() ), actionCollection(), "terminal@home" );
+ SLOTS, TQT_SLOT( homeTerminal() ), actionCollection(), "terminal@home" );
actFTPDisconnect = new KAction( i18n( "Disconnect &from Net" ), "kr_ftp_disconnect", SHIFT + CTRL + Key_F,
- SLOTS, SLOT( FTPDisconnect() ), actionCollection(), "ftp disconnect" );
+ SLOTS, TQT_SLOT( FTPDisconnect() ), actionCollection(), "ftp disconnect" );
#if KDE_IS_VERSION(3,2,0) /* new mountman feature is available in kde 3.2 only! */
actMountMan = new KToolBarPopupAction( i18n( "&MountMan..." ), "kr_mountman", ALT + Key_Slash,
- SLOTS, SLOT( runMountMan() ), actionCollection(), "mountman" );
- connect( ( ( KToolBarPopupAction* ) actMountMan ) ->popupMenu(), SIGNAL( aboutToShow() ),
- mountMan, SLOT( quickList() ) );
+ SLOTS, TQT_SLOT( runMountMan() ), actionCollection(), "mountman" );
+ connect( ( ( KToolBarPopupAction* ) actMountMan ) ->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ mountMan, TQT_SLOT( quickList() ) );
#else
actMountMan = new KAction( i18n( "&MountMan..." ), "kr_mountman", ALT + Key_Slash,
- SLOTS, SLOT( runMountMan() ), actionCollection(), "mountman" );
+ SLOTS, TQT_SLOT( runMountMan() ), actionCollection(), "mountman" );
#endif /* KDE 3.2 */
- actFind = new KAction( i18n( "&Search..." ), "filefind", CTRL + Key_S,
- SLOTS, SLOT( search() ), actionCollection(), "find" );
- actLocate = new KAction( i18n( "&Locate..." ), "find", SHIFT+CTRL + Key_L,
- SLOTS, SLOT( locate() ), actionCollection(), "locate" );
+ actFind = new KAction( i18n( "&Search..." ), "filetqfind", CTRL + Key_S,
+ SLOTS, TQT_SLOT( search() ), actionCollection(), "tqfind" );
+ actLocate = new KAction( i18n( "&Locate..." ), "tqfind", SHIFT+CTRL + Key_L,
+ SLOTS, TQT_SLOT( locate() ), actionCollection(), "locate" );
actSyncDirs = new KAction( i18n( "Synchronize &Directories..." ), "kr_syncdirs", CTRL + Key_Y,
- SLOTS, SLOT( slotSynchronizeDirs() ), actionCollection(), "sync dirs" );
+ SLOTS, TQT_SLOT( slotSynchronizeDirs() ), actionCollection(), "sync dirs" );
actSyncBrowse = new KAction( i18n( "S&ynchron Directory Changes" ), "kr_syncbrowse_off", ALT + Key_Y,
- SLOTS, SLOT( slotSyncBrowse() ), actionCollection(), "sync browse" );
+ SLOTS, TQT_SLOT( slotSyncBrowse() ), actionCollection(), "sync browse" );
actDiskUsage = new KAction( i18n( "D&isk Usage..." ), "kr_diskusage", ALT + Key_D,
- SLOTS, SLOT( slotDiskUsage() ), actionCollection(), "disk usage" );
+ SLOTS, TQT_SLOT( slotDiskUsage() ), actionCollection(), "disk usage" );
actKonfigurator = new KAction( i18n( "Configure &Krusader..." ), "configure", 0,
- SLOTS, SLOT( startKonfigurator() ), actionCollection(), "konfigurator" );
+ SLOTS, TQT_SLOT( startKonfigurator() ), actionCollection(), "konfigurator" );
actBack = new KAction( i18n( "Back" ), "back", 0,
- SLOTS, SLOT( back() ), actionCollection(), "back" );
+ SLOTS, TQT_SLOT( back() ), actionCollection(), "back" );
actRoot = new KAction( i18n( "Root" ), "top", CTRL + Key_Backspace,
- SLOTS, SLOT( root() ), actionCollection(), "root" );
+ SLOTS, TQT_SLOT( root() ), actionCollection(), "root" );
actSavePosition = new KAction( i18n( "Save &Position" ), 0,
- krApp, SLOT( savePosition() ), actionCollection(), "save position" );
+ TQT_TQOBJECT(krApp), TQT_SLOT( savePosition() ), actionCollection(), "save position" );
actAllFilter = new KAction( i18n( "&All Files" ), SHIFT + Key_F10,
- SLOTS, SLOT( allFilter() ), actionCollection(), "all files" );
+ SLOTS, TQT_SLOT( allFilter() ), actionCollection(), "all files" );
//actExecFilter = new KAction( i18n( "&Executables" ), SHIFT + Key_F11,
- // SLOTS, SLOT( execFilter() ), actionCollection(), "exec files" );
+ // SLOTS, TQT_SLOT( execFilter() ), actionCollection(), "exec files" );
actCustomFilter = new KAction( i18n( "&Custom" ), SHIFT + Key_F12,
- SLOTS, SLOT( customFilter() ), actionCollection(), "custom files" );
+ SLOTS, TQT_SLOT( customFilter() ), actionCollection(), "custom files" );
actCompare = new KAction( i18n( "Compare b&y Content..." ), "kmultiple", 0,
- SLOTS, SLOT( compareContent() ), actionCollection(), "compare" );
+ SLOTS, TQT_SLOT( compareContent() ), actionCollection(), "compare" );
actMultiRename = new KAction( i18n( "Multi &Rename..." ), "krename", SHIFT + Key_F9,
- SLOTS, SLOT( multiRename() ), actionCollection(), "multirename" );
+ SLOTS, TQT_SLOT( multiRename() ), actionCollection(), "multirename" );
new KAction( i18n( "Right-click Menu" ), Key_Menu,
- SLOTS, SLOT( rightclickMenu() ), actionCollection(), "rightclick menu" );
+ SLOTS, TQT_SLOT( rightclickMenu() ), actionCollection(), "rightclick menu" );
new KAction( i18n( "Right Bookmarks" ), ALT + Key_Right,
- SLOTS, SLOT( openRightBookmarks() ), actionCollection(), "right bookmarks" );
+ SLOTS, TQT_SLOT( openRightBookmarks() ), actionCollection(), "right bookmarks" );
new KAction( i18n( "Left Bookmarks" ), ALT + Key_Left,
- SLOTS, SLOT( openLeftBookmarks() ), actionCollection(), "left bookmarks" );
+ SLOTS, TQT_SLOT( openLeftBookmarks() ), actionCollection(), "left bookmarks" );
new KAction( i18n( "Bookmarks" ), CTRL + Key_D,
- SLOTS, SLOT( openBookmarks() ), actionCollection(), "bookmarks" );
+ SLOTS, TQT_SLOT( openBookmarks() ), actionCollection(), "bookmarks" );
new KAction( i18n( "Bookmark Current" ), CTRL + SHIFT + Key_D,
- SLOTS, SLOT( bookmarkCurrent() ), actionCollection(), "bookmark current" );
+ SLOTS, TQT_SLOT( bookmarkCurrent() ), actionCollection(), "bookmark current" );
new KAction( i18n( "History" ), CTRL + Key_H,
- SLOTS, SLOT( openHistory() ), actionCollection(), "history" );
+ SLOTS, TQT_SLOT( openHistory() ), actionCollection(), "history" );
new KAction( i18n( "Sync Panels" ), ALT + Key_O,
- SLOTS, SLOT( syncPanels() ), actionCollection(), "sync panels");
+ SLOTS, TQT_SLOT( syncPanels() ), actionCollection(), "sync panels");
new KAction( i18n( "Left History" ), ALT + CTRL + Key_Left,
- SLOTS, SLOT( openLeftHistory() ), actionCollection(), "left history" );
+ SLOTS, TQT_SLOT( openLeftHistory() ), actionCollection(), "left history" );
new KAction( i18n( "Right History" ), ALT + CTRL + Key_Right,
- SLOTS, SLOT( openRightHistory() ), actionCollection(), "right history" );
+ SLOTS, TQT_SLOT( openRightHistory() ), actionCollection(), "right history" );
new KAction( i18n( "Media" ), CTRL + Key_M,
- SLOTS, SLOT( openMedia() ), actionCollection(), "media" );
+ SLOTS, TQT_SLOT( openMedia() ), actionCollection(), "media" );
new KAction( i18n( "Left Media" ), CTRL + SHIFT + Key_Left,
- SLOTS, SLOT( openLeftMedia() ), actionCollection(), "left media" );
+ SLOTS, TQT_SLOT( openLeftMedia() ), actionCollection(), "left media" );
new KAction( i18n( "Right Media" ), CTRL + SHIFT + Key_Right,
- SLOTS, SLOT( openRightMedia() ), actionCollection(), "right media" );
+ SLOTS, TQT_SLOT( openRightMedia() ), actionCollection(), "right media" );
new KAction( i18n( "New Symlink..." ), CTRL + ALT + Key_S,
- SLOTS, SLOT( newSymlink() ), actionCollection(), "new symlink");
+ SLOTS, TQT_SLOT( newSymlink() ), actionCollection(), "new symlink");
new KToggleAction( i18n( "Toggle Popup Panel" ), ALT + Key_Down, SLOTS,
- SLOT( togglePopupPanel() ), actionCollection(), "toggle popup panel" );
- actVerticalMode = new KToggleAction( i18n( "Vertical Mode" ), "view_top_bottom", ALT + CTRL + Key_R, MAIN_VIEW,
- SLOT( toggleVerticalMode() ), actionCollection(), "toggle vertical mode" );
+ TQT_SLOT( togglePopupPanel() ), actionCollection(), "toggle popup panel" );
+ actVerticalMode = new KToggleAction( i18n( "Vertical Mode" ), "view_top_bottom", ALT + CTRL + Key_R, TQT_TQOBJECT(MAIN_VIEW),
+ TQT_SLOT( toggleVerticalMode() ), actionCollection(), "toggle vertical mode" );
actNewTab = new KAction( i18n( "New Tab" ), "tab_new", ALT + CTRL + Key_N, SLOTS,
- SLOT( newTab() ), actionCollection(), "new tab" );
+ TQT_SLOT( newTab() ), actionCollection(), "new tab" );
actDupTab = new KAction( i18n( "Duplicate Current Tab" ), "tab_duplicate", ALT + CTRL + SHIFT + Key_N, SLOTS,
- SLOT( duplicateTab() ), actionCollection(), "duplicate tab" );
+ TQT_SLOT( duplicateTab() ), actionCollection(), "duplicate tab" );
actCloseTab = new KAction( i18n( "Close Current Tab" ), "tab_remove", CTRL + Key_W, SLOTS,
- SLOT( closeTab() ), actionCollection(), "close tab" );
+ TQT_SLOT( closeTab() ), actionCollection(), "close tab" );
actNextTab = new KAction( i18n( "Next Tab" ), SHIFT + Key_Right, SLOTS,
- SLOT( nextTab() ), actionCollection(), "next tab" );
+ TQT_SLOT( nextTab() ), actionCollection(), "next tab" );
actPreviousTab = new KAction( i18n( "Previous Tab" ), SHIFT + Key_Left, SLOTS,
- SLOT( previousTab() ), actionCollection(), "previous tab" );
+ TQT_SLOT( previousTab() ), actionCollection(), "previous tab" );
/*
actUserMenu = new KAction( i18n( "User Menu" ), ALT + Key_QuoteLeft, SLOTS,
- SLOT( userMenu() ), actionCollection(), "user menu" );
+ TQT_SLOT( userMenu() ), actionCollection(), "user menu" );
*/
actManageUseractions = new KAction( i18n( "Manage User Actions..." ), 0, SLOTS,
- SLOT( manageUseractions() ), actionCollection(), "manage useractions" );
+ TQT_SLOT( manageUseractions() ), actionCollection(), "manage useractions" );
new KrRemoteEncodingMenu(i18n("Select Remote Charset"), "charset", actionCollection(), "changeremoteencoding");
// setup the Fn keys
actF2 = new KAction( i18n( "Start Terminal Here" ), "terminal", Key_F2,
- SLOTS, SLOT( terminal() ) , actionCollection(), "F2_Terminal" );
+ SLOTS, TQT_SLOT( terminal() ) , actionCollection(), "F2_Terminal" );
actF3 = new KAction( i18n( "View File" ), Key_F3,
- SLOTS, SLOT( view() ) , actionCollection(), "F3_View" );
+ SLOTS, TQT_SLOT( view() ) , actionCollection(), "F3_View" );
actF4 = new KAction( i18n( "Edit File" ), Key_F4,
- SLOTS, SLOT( edit() ) , actionCollection(), "F4_Edit" );
+ SLOTS, TQT_SLOT( edit() ) , actionCollection(), "F4_Edit" );
actF5 = new KAction( i18n( "Copy..." ), Key_F5,
- SLOTS, SLOT( copyFiles() ) , actionCollection(), "F5_Copy" );
+ SLOTS, TQT_SLOT( copyFiles() ) , actionCollection(), "F5_Copy" );
actF6 = new KAction( i18n( "Move..." ), Key_F6,
- SLOTS, SLOT( moveFiles() ) , actionCollection(), "F6_Move" );
+ SLOTS, TQT_SLOT( moveFiles() ) , actionCollection(), "F6_Move" );
actF7 = new KAction( i18n( "New Directory..." ), "folder_new", Key_F7,
- SLOTS, SLOT( mkdir() ) , actionCollection(), "F7_Mkdir" );
+ SLOTS, TQT_SLOT( mkdir() ) , actionCollection(), "F7_Mkdir" );
actF8 = new KAction( i18n( "Delete" ), "editdelete", Key_F8,
- SLOTS, SLOT( deleteFiles() ) , actionCollection(), "F8_Delete" );
+ SLOTS, TQT_SLOT( deleteFiles() ) , actionCollection(), "F8_Delete" );
actF9 = new KAction( i18n( "Rename" ), Key_F9,
- SLOTS, SLOT( rename() ) , actionCollection(), "F9_Rename" );
+ SLOTS, TQT_SLOT( rename() ) , actionCollection(), "F9_Rename" );
actF10 = new KAction( i18n( "Quit" ), Key_F10,
- this, SLOT( slotClose() ) , actionCollection(), "F10_Quit" );
+ TQT_TQOBJECT(this), TQT_SLOT( slotClose() ) , actionCollection(), "F10_Quit" );
actPopularUrls = new KAction( i18n("Popular URLs..."), CTRL+Key_Z,
- popularUrls, SLOT( showDialog() ), actionCollection(), "Popular_Urls");
+ popularUrls, TQT_SLOT( showDialog() ), actionCollection(), "Popular_Urls");
actLocationBar = new KAction( i18n("Go to Location Bar"), CTRL+Key_L,
- SLOTS, SLOT( slotLocationBar() ), actionCollection(), "location_bar");
+ SLOTS, TQT_SLOT( slotLocationBar() ), actionCollection(), "location_bar");
actJumpBack = new KAction( i18n("Jump Back"), "kr_jumpback", CTRL+Key_J,
- SLOTS, SLOT( slotJumpBack() ), actionCollection(), "jump_back");
+ SLOTS, TQT_SLOT( slotJumpBack() ), actionCollection(), "jump_back");
actSetJumpBack = new KAction( i18n("Set Jump Back Point"), "kr_setjumpback", CTRL+SHIFT+Key_J,
- SLOTS, SLOT( slotSetJumpBack() ), actionCollection(), "set_jump_back");
+ SLOTS, TQT_SLOT( slotSetJumpBack() ), actionCollection(), "set_jump_back");
actSwitchFullScreenTE = new KAction( i18n( "Toggle Fullwidget Terminal Emulator" ), 0, CTRL + Key_F,
- MAIN_VIEW, SLOT( switchFullScreenTE() ), actionCollection(), "switch_fullscreen_te" );
+ TQT_TQOBJECT(MAIN_VIEW), TQT_SLOT( switchFullScreenTE() ), actionCollection(), "switch_fullscreen_te" );
// and at last we can set the tool-tips
actSelect->setToolTip( i18n( "Select files using a filter" ) );
@@ -808,7 +808,7 @@ void Krusader::setupActions() {
userAction = new UserAction();
#ifdef __KJSEMBED__
- actShowJSConsole = new KAction( i18n( "JavaScript Console..." ), ALT + CTRL + Key_J, SLOTS, SLOT( jsConsole() ), actionCollection(), "JS_Console" );
+ actShowJSConsole = new KAction( i18n( "JavaScript Console..." ), ALT + CTRL + Key_J, SLOTS, TQT_SLOT( jsConsole() ), actionCollection(), "JS_Console" );
#endif
}
@@ -827,7 +827,7 @@ void Krusader::savePosition() {
}
config->writeEntry( "Panel Size", mainView->vert_splitter->sizes() [ 0 ] );
config->writeEntry( "Terminal Size", mainView->vert_splitter->sizes() [ 1 ] );
- QValueList<int> lst = mainView->horiz_splitter->sizes();
+ TQValueList<int> lst = mainView->horiz_splitter->sizes();
config->writeEntry( "Splitter Sizes", lst );
mainView->left->popup->saveSizes();
mainView->right->popup->saveSizes();
@@ -963,11 +963,11 @@ bool Krusader::queryClose() {
main window close. */
for(;;) {
- QWidgetList * list = QApplication::topLevelWidgets();
- QWidget *activeModal = QApplication::activeModalWidget();
- QWidget *w = list->first();
+ TQWidgetList * list = TQApplication::tqtopLevelWidgets();
+ TQWidget *activeModal = TQT_TQWIDGET(TQApplication::activeModalWidget());
+ TQWidget *w = list->first();
- if( activeModal && activeModal != this && activeModal != menuBar() && activeModal != sysTray && list->contains( activeModal ) && !activeModal->isHidden() )
+ if( activeModal && activeModal != this && activeModal != menuBar() && activeModal != sysTray && list->tqcontains( activeModal ) && !activeModal->isHidden() )
w = activeModal;
else {
while(w && (w==this || w==sysTray || w->isHidden() || w==menuBar()) )
@@ -987,7 +987,7 @@ bool Krusader::queryClose() {
if( hid )
w->show();
- if( w->inherits( "QDialog" ) )
+ if( w->inherits( TQDIALOG_OBJECT_NAME_STRING ) )
fprintf( stderr, "Failed to close: %s\n", w->className() );
return false;
@@ -1012,7 +1012,7 @@ bool Krusader::queryClose() {
}
// the please wait dialog functions
-void Krusader::startWaiting( QString msg, int count , bool cancel ) {
+void Krusader::startWaiting( TQString msg, int count , bool cancel ) {
plzWait->startWaiting( msg , count, cancel );
}
@@ -1092,7 +1092,7 @@ void Krusader::updateGUI( bool enforce ) {
if ( config->readBoolEntry( "Show Terminal Emulator", _ShowTerminalEmulator ) ) {
mainView->slotTerminalEmulator( true ); // create konsole_part
KConfigGroup grp(krConfig, "Private" );
- QValueList<int> lst;
+ TQValueList<int> lst;
lst.append( grp.readNumEntry( "Panel Size", _PanelSize ) );
lst.append( grp.readNumEntry( "Terminal Size", _TerminalSize ) );
mainView->vert_splitter->setSizes( lst );
@@ -1113,11 +1113,11 @@ void Krusader::updateGUI( bool enforce ) {
//
// currently supported tools: DIFF, MAIL, RENAME
//
-// to use it: QStringList lst = supportedTools();
+// to use it: TQStringList lst = supportedTools();
// int i = lst.findIndex("DIFF");
// if (i!=-1) pathToDiff=lst[i+1];
-QStringList Krusader::supportedTools() {
- QStringList tools;
+TQStringList Krusader::supportedTools() {
+ TQStringList tools;
// first, a diff program: kdiff
if ( KrServices::cmdExist( "kdiff3" ) ) {
@@ -1167,56 +1167,56 @@ QStringList Krusader::supportedTools() {
return tools;
}
-QString Krusader::getTempDir() {
+TQString Krusader::getTempDir() {
// try to make krusader temp dir
krConfig->setGroup( "General" );
- QString tmpDir = krConfig->readEntry( "Temp Directory", _TempDirectory );
+ TQString tmpDir = krConfig->readEntry( "Temp Directory", _TempDirectory );
- if ( ! QDir( tmpDir ).exists() ) {
- for ( int i = 1 ; i != -1 ; i = tmpDir.find( '/', i + 1 ) )
- QDir().mkdir( tmpDir.left( i ) );
- QDir().mkdir( tmpDir );
+ if ( ! TQDir( tmpDir ).exists() ) {
+ for ( int i = 1 ; i != -1 ; i = tmpDir.tqfind( '/', i + 1 ) )
+ TQDir().mkdir( tmpDir.left( i ) );
+ TQDir().mkdir( tmpDir );
chmod( tmpDir.local8Bit(), 0777 );
}
// add a secure sub dir under the user UID
- QString uid;
+ TQString uid;
uid.sprintf( "%d", getuid() );
- QDir( tmpDir ).mkdir( uid );
+ TQDir( tmpDir ).mkdir( uid );
tmpDir = tmpDir + "/" + uid + "/";
chmod( tmpDir.local8Bit(), S_IRUSR | S_IWUSR | S_IXUSR );
// add a random sub dir to use
- while ( QDir().exists( tmpDir ) )
+ while ( TQDir().exists( tmpDir ) )
tmpDir = tmpDir + kapp->randomString( 8 );
- QDir().mkdir( tmpDir );
+ TQDir().mkdir( tmpDir );
- if ( !QDir( tmpDir ).isReadable() ) {
+ if ( !TQDir( tmpDir ).isReadable() ) {
KMessageBox::error( krApp, "Could not create a temporary directory. Handling of Archives will not be possible until this is fixed." );
- return QString::null;
+ return TQString();
}
return tmpDir;
}
-QString Krusader::getTempFile() {
+TQString Krusader::getTempFile() {
// try to make krusader temp dir
krConfig->setGroup( "General" );
- QString tmpDir = krConfig->readEntry( "Temp Directory", _TempDirectory );
+ TQString tmpDir = krConfig->readEntry( "Temp Directory", _TempDirectory );
- if ( ! QDir( tmpDir ).exists() ) {
- for ( int i = 1 ; i != -1 ; i = tmpDir.find( '/', i + 1 ) )
- QDir().mkdir( tmpDir.left( i ) );
- QDir().mkdir( tmpDir );
+ if ( ! TQDir( tmpDir ).exists() ) {
+ for ( int i = 1 ; i != -1 ; i = tmpDir.tqfind( '/', i + 1 ) )
+ TQDir().mkdir( tmpDir.left( i ) );
+ TQDir().mkdir( tmpDir );
chmod( tmpDir.local8Bit(), 0777 );
}
// add a secure sub dir under the user UID
- QString uid;
+ TQString uid;
uid.sprintf( "%d", getuid() );
- QDir( tmpDir ).mkdir( uid );
+ TQDir( tmpDir ).mkdir( uid );
tmpDir = tmpDir + "/" + uid + "/";
chmod( tmpDir.local8Bit(), S_IRUSR | S_IWUSR | S_IXUSR );
- while ( QDir().exists( tmpDir ) )
+ while ( TQDir().exists( tmpDir ) )
tmpDir = tmpDir + kapp->randomString( 8 );
return tmpDir;
}
@@ -1228,7 +1228,7 @@ const char* Krusader::privIcon() {
return "krusader_root";
}
-bool Krusader::process(const QCString &fun, const QByteArray &/* data */, QCString &/* replyType */, QByteArray &/* replyData */) {
+bool Krusader::process(const TQCString &fun, const TQByteArray &/* data */, TQCString &/* replyType */, TQByteArray &/* replyData */) {
if (fun == "moveToTop()") {
moveToTop();
return true;
diff --git a/krusader/krusader.h b/krusader/krusader.h
index f693326..c0fa70d 100644
--- a/krusader/krusader.h
+++ b/krusader/krusader.h
@@ -44,8 +44,8 @@
#include <kaction.h>
#include <kconfig.h>
#include <kaccel.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <dcopobject.h>
@@ -53,7 +53,7 @@
class KrJS;
#endif
-class KrusaderStatus;
+class KrusadertqStatus;
class KRPleaseWaitHandler;
class KrusaderView;
class KProcess;
@@ -68,11 +68,12 @@ class KrBookmarkHandler;
class PopularUrls;
class QueueManager;
-//static QTextOStream krOut(stdout);
+//static TQTextOStream krOut(stdout);
#define krOut kdDebug(50010)
class Krusader : public KParts::MainWindow, public DCOPObject {
Q_OBJECT
+ TQ_OBJECT
public:
Krusader();
virtual ~Krusader();
@@ -83,15 +84,15 @@ class Krusader : public KParts::MainWindow, public DCOPObject {
* @return a character string with the specitif icon-name
*/
static const char* privIcon();
- static QStringList supportedTools(); // find supported tools
+ static TQStringList supportedTools(); // find supported tools
- virtual bool process (const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData);
+ virtual bool process (const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData);
void moveToTop();
public slots:
// increase the internal progress bar
void incProgress( KProcess *, char *buffer, int buflen );
- void statusBarUpdate( QString& mess );
+ void statusBarUpdate( TQString& mess );
// in use by Krusader only
void saveSettings();
void savePosition();
@@ -108,10 +109,10 @@ class Krusader : public KParts::MainWindow, public DCOPObject {
void setupActions();
void setupAccels();
bool versionControl(); // handle version differences in krusaderrc
- void showEvent ( QShowEvent * );
- void hideEvent ( QHideEvent * );
- void moveEvent ( QMoveEvent * );
- void resizeEvent ( QResizeEvent * );
+ void showEvent ( TQShowEvent * );
+ void hideEvent ( TQHideEvent * );
+ void moveEvent ( TQMoveEvent * );
+ void resizeEvent ( TQResizeEvent * );
public:
static Krusader *App; // a kApp style pointer
@@ -149,16 +150,16 @@ class Krusader : public KParts::MainWindow, public DCOPObject {
static KRadioAction **execTypeArray[];
// return a path to a temp dir or file we can use.
- QString getTempDir();
- QString getTempFile();
+ TQString getTempDir();
+ TQString getTempFile();
// the internal progress bar variales + functions
KRPleaseWaitHandler* plzWait;
- void startWaiting( QString msg = "Please Wait", int count = 0 , bool cancel = false );
+ void startWaiting( TQString msg = "Please Wait", int count = 0 , bool cancel = false );
void stopWait();
bool wasWaitingCancelled() const;
- KrusaderStatus *status;
+ KrusadertqStatus *status;
KRslots *slot;
KAccel *accels; // global accelerators
@@ -173,12 +174,12 @@ class Krusader : public KParts::MainWindow, public DCOPObject {
#endif
signals:
- void changeMessage( QString );
+ void changeMessage( TQString );
private:
KSystemTray *sysTray;
- QPoint oldPos;
- QSize oldSize;
+ TQPoint oldPos;
+ TQSize oldSize;
bool isStarting;
bool isExiting;
bool directExit;
diff --git a/krusader/krusaderapp.h b/krusader/krusaderapp.h
index 2004147..ee8e9f1 100644
--- a/krusader/krusaderapp.h
+++ b/krusader/krusaderapp.h
@@ -7,6 +7,7 @@
// declare a dummy kapplication, just to get the X focusin focusout events
class KrusaderApp: public KApplication {
Q_OBJECT
+ TQ_OBJECT
public:
KrusaderApp(): KApplication() {}
bool x11EventFilter ( XEvent *e ) {
diff --git a/krusader/krusaderview.cpp b/krusader/krusaderview.cpp
index b203d1d..1774b02 100644
--- a/krusader/krusaderview.cpp
+++ b/krusader/krusaderview.cpp
@@ -28,8 +28,8 @@
* *
***************************************************************************/
-// Qt includes
-#include <qwhatsthis.h>
+// TQt includes
+#include <tqwhatsthis.h>
#include <kstatusbar.h>
#include <kmenubar.h>
#include <kshortcut.h>
@@ -48,23 +48,23 @@
#include "GUI/profilemanager.h"
#include "Dialogs/percentalsplitter.h"
#include "krservices.h"
-#include <qclipboard.h>
+#include <tqclipboard.h>
-KrusaderView::KrusaderView( QWidget *parent ) : QWidget( parent, "KrusaderView" ), activePanel(0),
+KrusaderView::KrusaderView( TQWidget *tqparent ) : TQWidget( tqparent, "KrusaderView" ), activePanel(0),
konsole_part( 0L ) {}
-void KrusaderView::start( QStringList leftTabs, QStringList leftTypes, QValueList<int> leftProps, int leftActiveTab,
- QStringList rightTabs, QStringList rightTypes, QValueList<int> rightProps, int rightActiveTab,
+void KrusaderView::start( TQStringList leftTabs, TQStringList leftTypes, TQValueList<int> leftProps, int leftActiveTab,
+ TQStringList rightTabs, TQStringList rightTypes, TQValueList<int> rightProps, int rightActiveTab,
bool leftSideActive ) {
////////////////////////////////
// make a 1x1 mainLayout, it will auto-expand:
- mainLayout = new QGridLayout( this, 1, 1 );
+ mainLayout = new TQGridLayout( this, 1, 1 );
// vertical splitter
- vert_splitter = new QSplitter( this ); // splits between panels and terminal/cmdline
- vert_splitter->setOrientation( QObject::Vertical );
+ vert_splitter = new TQSplitter( this ); // splits between panels and terminal/cmdline
+ vert_splitter->setOrientation( Qt::Vertical );
// horizontal splitter
horiz_splitter = new PercentalSplitter( vert_splitter );
- ( terminal_dock = new QHBox( vert_splitter ) ) ->hide(); // create it hidden
+ ( terminal_dock = new TQHBox( vert_splitter ) ) ->hide(); // create it hidden
// create a command line thing
cmdLine = new KCMDLine( this );
@@ -84,11 +84,11 @@ void KrusaderView::start( QStringList leftTabs, QStringList leftTypes, QValueLis
// create the function keys widget
fnKeys = new KFnKeys( this );
fnKeys->hide();
- QWhatsThis::add
+ TQWhatsThis::add
( fnKeys, i18n( "Function keys allow performing fast "
"operations on files." ) );
- // and insert the whole thing into the main layout... at last
+ // and insert the whole thing into the main tqlayout... at last
mainLayout->addWidget( vert_splitter, 0, 0 ); //<>
mainLayout->addWidget( cmdLine, 1, 0 );
mainLayout->addWidget( fnKeys, 2, 0 );
@@ -96,7 +96,7 @@ void KrusaderView::start( QStringList leftTabs, QStringList leftTypes, QValueLis
// get the last saved sizes of the splitter
krConfig->setGroup( "Private" );
- QValueList<int> lst = krConfig->readIntListEntry( "Splitter Sizes" );
+ TQValueList<int> lst = krConfig->readIntListEntry( "Splitter Sizes" );
if ( lst.isEmpty() )
{
lst = horiz_splitter->sizes();
@@ -109,7 +109,7 @@ void KrusaderView::start( QStringList leftTabs, QStringList leftTypes, QValueLis
show();
- qApp->processEvents();
+ tqApp->processEvents();
// make the left panel focused at program start
rightMng->startPanel( right, rightTabs[ 0 ] );
@@ -136,7 +136,7 @@ void KrusaderView::start( QStringList leftTabs, QStringList leftTypes, QValueLis
// updates the command line whenever current panel changes
//////////////////////////////////////////////////////////
-void KrusaderView::slotCurrentChanged( QString p ) {
+void KrusaderView::slotCurrentChanged( TQString p ) {
cmdLine->setCurrent( p );
if ( konsole_part != 0L && konsole_part->widget() != 0L ) {
KConfigGroupSaver grp(krConfig, "General");
@@ -159,17 +159,17 @@ void KrusaderView::createTE() {
if ( konsole_part == 0L ) { // konsole part is not yet loaded
KLibFactory * factory = KLibLoader::self() ->factory( "libkonsolepart" );
if ( factory ) {
- QWidget *focusW = qApp->focusWidget();
+ TQWidget *focusW = tqApp->tqfocusWidget();
// Create the part
konsole_part = ( KParts::ReadOnlyPart * )
- factory->create( terminal_dock, "konsolepart",
+ factory->create( TQT_TQOBJECT(terminal_dock), "konsolepart",
"KParts::ReadOnlyPart" );
if( konsole_part ) { //loaded successfully
- connect( konsole_part, SIGNAL( destroyed() ),
- this, SLOT( killTerminalEmulator() ) );
- qApp->installEventFilter( this );
+ connect( konsole_part, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( killTerminalEmulator() ) );
+ tqApp->installEventFilter( this );
} else {
- qApp->removeEventFilter( this );
+ tqApp->removeEventFilter( this );
}
/*the Terminal Emulator may be hidden (if we are creating it only
to send command there and see the results later */
@@ -203,7 +203,7 @@ void KrusaderView::slotTerminalEmulator( bool show ) {
verticalSplitterSizes = vert_splitter->sizes();
// BUGFIX: when the terminal emulator is toggled on, first it is shown in minimum size
- // then QSplitter resizes it to the desired size.
+ // then TQSplitter resizes it to the desired size.
// this minimum resize scrolls up the content of the konsole widget
// SOLUTION:
// we hide the console widget while the resize ceremony happens, then reenable it
@@ -211,7 +211,7 @@ void KrusaderView::slotTerminalEmulator( bool show ) {
konsole_part->widget()->hide(); // hide the widget to prevent from resize
terminal_dock->hide();
- QValueList<int> newSizes;
+ TQValueList<int> newSizes;
newSizes.push_back( vert_splitter->height() );
newSizes.push_back( 0 );
vert_splitter->setSizes( newSizes );
@@ -241,7 +241,7 @@ void KrusaderView::slotTerminalEmulator( bool show ) {
// BUGFIX: TE scrolling bug (see upper)
// show the Konsole part delayed
- QTimer::singleShot( 0, konsole_part->widget(), SLOT( show() ) );
+ TQTimer::singleShot( 0, konsole_part->widget(), TQT_SLOT( show() ) );
if( konsole_part->widget() ) {
konsole_part->widget()->setFocus();
@@ -288,9 +288,9 @@ void KrusaderView::switchFullScreenTE()
}
-bool KrusaderView::eventFilter ( QObject * watched, QEvent * e ) {
- if( e->type() == QEvent::AccelOverride && konsole_part && konsole_part->widget() == watched ) {
- QKeyEvent *ke = (QKeyEvent *)e;
+bool KrusaderView::eventFilter ( TQObject * watched, TQEvent * e ) {
+ if( e->type() == TQEvent::AccelOverride && konsole_part && TQT_BASE_OBJECT(konsole_part->widget()) == TQT_BASE_OBJECT(watched) ) {
+ TQKeyEvent *ke = (TQKeyEvent *)e;
if( ( ke->key() == Key_Insert ) && ( ke->state() == ShiftButton ) ) {
ke->accept();
return true;
@@ -301,8 +301,8 @@ bool KrusaderView::eventFilter ( QObject * watched, QEvent * e ) {
return true;
}
}
- else if( e->type() == QEvent::KeyPress && konsole_part && konsole_part->widget() == watched ) {
- QKeyEvent *ke = (QKeyEvent *)e;
+ else if( e->type() == TQEvent::KeyPress && konsole_part && TQT_BASE_OBJECT(konsole_part->widget()) == TQT_BASE_OBJECT(watched) ) {
+ TQKeyEvent *ke = (TQKeyEvent *)e;
KKey pressedKey( ke );
if( Krusader::actToggleTerminal->shortcut().contains( pressedKey ) ) {
@@ -317,18 +317,18 @@ bool KrusaderView::eventFilter ( QObject * watched, QEvent * e ) {
if( ( ke->key() == Key_Enter || ke->key() == Key_Return ) && ( ( ke->state() & ~ShiftButton ) == ControlButton ) ) {
- QString filename = ACTIVE_PANEL->view->getCurrentItem();
- if( filename == QString::null || filename == ".." )
+ TQString filename = ACTIVE_PANEL->view->getCurrentItem();
+ if( filename == TQString() || filename == ".." )
return true;
if( ke->state() & ShiftButton ) {
- QString path=vfs::pathOrURL( ACTIVE_FUNC->files()->vfs_getOrigin(), 1 );
+ TQString path=vfs::pathOrURL( ACTIVE_FUNC->files()->vfs_getOrigin(), 1 );
filename = path+filename;
}
filename = KrServices::quote( filename );
- QKeyEvent keyEvent( QEvent::KeyPress, 0, -1, 0, QString( " " ) + filename + QString( " " ));
- QApplication::sendEvent( konsole_part->widget(), &keyEvent );
+ TQKeyEvent keyEvent( TQEvent::KeyPress, 0, -1, 0, TQString( " " ) + filename + TQString( " " ));
+ TQApplication::sendEvent( konsole_part->widget(), &keyEvent );
return true;
} else if( ( ke->key() == Key_Down ) && ( ke->state() == ControlButton ) ) {
if( cmdLine->isVisible() )
@@ -339,12 +339,12 @@ bool KrusaderView::eventFilter ( QObject * watched, QEvent * e ) {
ACTIVE_PANEL->slotFocusOnMe();
return true;
} else if( Krusader::actPaste->shortcut().contains( pressedKey ) ) {
- QString text = QApplication::clipboard()->text();
+ TQString text = TQApplication::tqclipboard()->text();
if ( ! text.isEmpty() )
{
- text.replace("\n", "\r");
- QKeyEvent keyEvent(QEvent::KeyPress, 0,-1,0, text);
- QApplication::sendEvent( konsole_part->widget(), &keyEvent );
+ text.tqreplace("\n", "\r");
+ TQKeyEvent keyEvent(TQEvent::KeyPress, 0,-1,0, text);
+ TQApplication::sendEvent( konsole_part->widget(), &keyEvent );
}
return true;
}
@@ -352,7 +352,7 @@ bool KrusaderView::eventFilter ( QObject * watched, QEvent * e ) {
return false;
}
-QValueList<int> KrusaderView::getTerminalEmulatorSplitterSizes() {
+TQValueList<int> KrusaderView::getTerminalEmulatorSplitterSizes() {
if( terminal_dock->isVisible() )
return vert_splitter->sizes();
else
@@ -366,19 +366,19 @@ void KrusaderView::killTerminalEmulator() {
}
-void KrusaderView::profiles( QString profileName )
+void KrusaderView::profiles( TQString profileName )
{
ProfileManager profileManager( "Panel" );
profileManager.hide();
- connect( &profileManager, SIGNAL( saveToProfile( QString ) ), this, SLOT( savePanelProfiles( QString ) ) );
- connect( &profileManager, SIGNAL( loadFromProfile( QString ) ), this, SLOT( loadPanelProfiles( QString ) ) );
+ connect( &profileManager, TQT_SIGNAL( saveToProfile( TQString ) ), this, TQT_SLOT( savePanelProfiles( TQString ) ) );
+ connect( &profileManager, TQT_SIGNAL( loadFromProfile( TQString ) ), this, TQT_SLOT( loadPanelProfiles( TQString ) ) );
if( profileName.isEmpty() )
profileManager.profilePopup();
else
profileManager.loadProfile( profileName );
}
-void KrusaderView::loadPanelProfiles( QString group )
+void KrusaderView::loadPanelProfiles( TQString group )
{
krConfig->setGroup( group );
MAIN_VIEW->leftMng->loadSettings( krConfig, "Left Tabs" );
@@ -395,7 +395,7 @@ void KrusaderView::loadPanelProfiles( QString group )
MAIN_VIEW->right->slotFocusOnMe();
}
-void KrusaderView::savePanelProfiles( QString group )
+void KrusaderView::savePanelProfiles( TQString group )
{
krConfig->setGroup( group );
@@ -407,9 +407,9 @@ void KrusaderView::savePanelProfiles( QString group )
}
void KrusaderView::toggleVerticalMode() {
- if (horiz_splitter->orientation() == QSplitter::Vertical)
- horiz_splitter->setOrientation(QSplitter::Horizontal);
- else horiz_splitter->setOrientation(QSplitter::Vertical);
+ if (horiz_splitter->orientation() == Qt::Vertical)
+ horiz_splitter->setOrientation(Qt::Horizontal);
+ else horiz_splitter->setOrientation(Qt::Vertical);
}
#include "krusaderview.moc"
diff --git a/krusader/krusaderview.h b/krusader/krusaderview.h
index 1f4f566..ff8d8cc 100644
--- a/krusader/krusaderview.h
+++ b/krusader/krusaderview.h
@@ -40,12 +40,12 @@
#include <kparts/part.h>
// QT includes
-#include <qlayout.h>
-#include <qsplitter.h>
-#include <qwidget.h>
-#include <qpushbutton.h>
-#include <qhbox.h>
-#include <qvaluelist.h>
+#include <tqlayout.h>
+#include <tqsplitter.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
+#include <tqhbox.h>
+#include <tqvaluelist.h>
class PanelManager;
class ListPanel;
@@ -54,26 +54,27 @@ class ListPanel;
class KFnKeys;
class KCMDLine;
-class KrusaderView : public QWidget {
+class KrusaderView : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- KrusaderView(QWidget *parent=0);
+ KrusaderView(TQWidget *tqparent=0);
virtual ~KrusaderView(){}
- void start(QStringList leftTabs, QStringList leftTypes, QValueList<int> leftProps, int leftActiveTab,
- QStringList rightTabs, QStringList rightTypes, QValueList<int> rightProps, int rightActiveTab,
+ void start(TQStringList leftTabs, TQStringList leftTypes, TQValueList<int> leftProps, int leftActiveTab,
+ TQStringList rightTabs, TQStringList rightTypes, TQValueList<int> rightProps, int rightActiveTab,
bool leftSideActive);
void cmdLineFocus(); // command line receive's keyboard focus
void cmdLineUnFocus();// return focus from command line to active panel
inline PanelManager *activeManager() const { return (activePanel==left ? leftMng : rightMng); }
inline PanelManager *inactiveManager() const { return (activePanel==left ? rightMng : leftMng); }
- QValueList<int> getTerminalEmulatorSplitterSizes();
- virtual bool eventFilter ( QObject * watched, QEvent * e );
+ TQValueList<int> getTerminalEmulatorSplitterSizes();
+ virtual bool eventFilter ( TQObject * watched, TQEvent * e );
/** if the KonsolePart for the Terminal Emulator is not yet loaded, load it */
void createTE();
public slots:
- void slotCurrentChanged(QString p);
+ void slotCurrentChanged(TQString p);
void slotSetActivePanel(ListPanel *p);
void slotTerminalEmulator(bool);
// manage the function keys to the CURRENT vfs
@@ -85,9 +86,9 @@ public slots:
void focusTerminalEmulator();
void switchFullScreenTE();
- void profiles( QString profileName = QString::null );
- void loadPanelProfiles( QString group );
- void savePanelProfiles( QString group );
+ void profiles( TQString profileName = TQString() );
+ void loadPanelProfiles( TQString group );
+ void savePanelProfiles( TQString group );
protected slots:
void killTerminalEmulator();
@@ -98,13 +99,13 @@ public:
PanelManager *leftMng, *rightMng; // saving them for panel swaps
KFnKeys *fnKeys; // function keys
KCMDLine *cmdLine; // command line widget
- QHBox *terminal_dock; // docking widget for terminal emulator
+ TQHBox *terminal_dock; // docking widget for terminal emulator
KParts::ReadOnlyPart *konsole_part; // the actual part pointer
- QSplitter *horiz_splitter, *vert_splitter;
- QValueList<int> verticalSplitterSizes;
+ TQSplitter *horiz_splitter, *vert_splitter;
+ TQValueList<int> verticalSplitterSizes;
private:
- QGridLayout *mainLayout, *terminal_layout;
+ TQGridLayout *mainLayout, *terminal_layout;
};
#endif
diff --git a/krusader/main.cpp b/krusader/main.cpp
index a70a071..c902bb0 100644
--- a/krusader/main.cpp
+++ b/krusader/main.cpp
@@ -36,7 +36,7 @@
#include <ksplashscreen.h>
#include <unistd.h>
#include <signal.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
// Krusader includes
#include "krusader.h"
@@ -64,7 +64,7 @@ static void sigterm_handler(int i)
{
fprintf(stderr,"Signal: %d\n",i);
- QApplication::eventLoop()->wakeUp();
+ TQApplication::eventLoop()->wakeUp();
KApplication::exit( - 15 );
}
@@ -105,9 +105,9 @@ int main(int argc, char *argv[]) {
// ABOUT data information
#ifdef RELEASE_NAME
- QString versionName = QString("%1 \"%2\"").arg(VERSION).arg(RELEASE_NAME);
+ TQString versionName = TQString("%1 \"%2\"").tqarg(VERSION).tqarg(RELEASE_NAME);
#else
- QString versionName = VERSION;
+ TQString versionName = VERSION;
#endif
KAboutData aboutData( "krusader", ( geteuid() ? I18N_NOOP("Krusader") :
I18N_NOOP("Krusader - ROOT PRIVILEGES")),
@@ -197,12 +197,12 @@ int main(int argc, char *argv[]) {
DCOPClient* client = KApplication::kApplication() ->dcopClient();
if ( !client->attach() )
exit( 0 );
- QCString regName = client->registerAs( KApplication::kApplication() ->name(), !singleInstanceMode );
+ TQCString regName = client->registerAs( KApplication::kApplication() ->name(), !singleInstanceMode );
if( singleInstanceMode && regName != KApplication::kApplication()->name() ) {
fprintf( stderr, i18n( "Application already running!\n" ).ascii() );
DCOPClient::mainClient()->send( KApplication::kApplication() ->name(), "Krusader-Interface",
- "moveToTop()", QByteArray() );
+ "moveToTop()", TQByteArray() );
KStartupInfo::appStarted();
return 1;
@@ -214,8 +214,8 @@ int main(int argc, char *argv[]) {
{ // don't remove bracket
KConfigGroupSaver saver(app.config(), "Look&Feel");
if (app.config()->readBoolEntry( "Show splashscreen", _ShowSplashScreen )) {
- QString splashFilename = locate( "data", "krusader/splash.png" );
- QPixmap pixmap( splashFilename );
+ TQString splashFilename = locate( "data", "krusader/splash.png" );
+ TQPixmap pixmap( splashFilename );
if (!pixmap.isNull()) {
splash = new KSplashScreen( pixmap );
splash->show();
@@ -231,8 +231,8 @@ int main(int argc, char *argv[]) {
signal(SIGHUP,sigterm_handler);
// make sure we receive X's focus in/out events
- QObject::connect(&app, SIGNAL(windowActive()), krusader.slot, SLOT(windowActive()));
- QObject::connect(&app, SIGNAL(windowInactive()), krusader.slot, SLOT(windowInactive()));
+ TQObject::connect(&app, TQT_SIGNAL(windowActive()), krusader.slot, TQT_SLOT(windowActive()));
+ TQObject::connect(&app, TQT_SIGNAL(windowInactive()), krusader.slot, TQT_SLOT(windowInactive()));
// and set krusader to be the main widget in it
app.setMainWidget(&krusader);
diff --git a/krusader/mount.ui b/krusader/mount.ui
index cb80f43..b87b0cb 100644
--- a/krusader/mount.ui
+++ b/krusader/mount.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>mountDlg</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>mountDlg</cstring>
</property>
@@ -30,7 +30,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="5" column="0" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -54,14 +54,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -78,7 +78,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -94,7 +94,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>labelDevice</cstring>
</property>
@@ -145,7 +145,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>labelFilesystem</cstring>
</property>
@@ -153,7 +153,7 @@
<string>Filesystem</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>labelMountpoint</cstring>
</property>
@@ -161,7 +161,7 @@
<string>Mountpoint</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>labelOptions</cstring>
</property>
@@ -193,7 +193,7 @@
<includes>
<include location="local" impldecl="in implementation">mount.ui.h</include>
</includes>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/krusader/panelmanager.cpp b/krusader/panelmanager.cpp
index dbdf25a..e19a9d9 100644
--- a/krusader/panelmanager.cpp
+++ b/krusader/panelmanager.cpp
@@ -1,7 +1,7 @@
-#include <qwidgetstack.h>
-#include <qtoolbutton.h>
+#include <tqwidgetstack.h>
+#include <tqtoolbutton.h>
#include <klocale.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kdebug.h>
#include <kconfig.h>
#include <kiconloader.h>
@@ -19,35 +19,35 @@
#define _self (*_selfPtr)
#define _other (*_otherPtr)
-PanelManager::PanelManager( QWidget *parent, bool left ) :
-QWidget( parent, "PanelManager" ), _layout( 0 ), _left( left ),
+PanelManager::PanelManager( TQWidget *tqparent, bool left ) :
+TQWidget( tqparent, "PanelManager" ), _layout( 0 ), _left( left ),
_selfPtr( _left ? &MAIN_VIEW->left : &MAIN_VIEW->right ),
_otherPtr( _left ? &MAIN_VIEW->right : &MAIN_VIEW->left ) {
- _layout = new QGridLayout( this, 1, 1 );
- _stack = new QWidgetStack( this );
+ _layout = new TQGridLayout( this, 1, 1 );
+ _stack = new TQWidgetStack( this );
// new tab button
- _newTab = new QToolButton( this );
+ _newTab = new TQToolButton( this );
_newTab->setFixedSize( 22, 22 );
_newTab->setTextLabel( i18n( "Open a new tab in home" ) );
_newTab->setIconSet( SmallIcon( "tab_new" ) );
_newTab->adjustSize();
- connect( _newTab, SIGNAL( clicked() ), this, SLOT( slotNewTab() ) );
+ connect( _newTab, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNewTab() ) );
// close tab button
- _closeTab = new QToolButton( this );
+ _closeTab = new TQToolButton( this );
_closeTab->setFixedSize( 22, 22 );
_closeTab->setTextLabel( i18n( "Close current tab" ) );
_closeTab->setIconSet( SmallIcon( "tab_remove" ) );
_closeTab->adjustSize();
- connect( _closeTab, SIGNAL( clicked() ), this, SLOT( slotCloseTab() ) );
+ connect( _closeTab, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCloseTab() ) );
_closeTab->setEnabled( false ); // disabled when there's only 1 tab
// tab-bar
_tabbar = new PanelTabBar( this );
- connect( _tabbar, SIGNAL( changePanel( ListPanel* ) ), this, SLOT( slotChangePanel( ListPanel * ) ) );
- connect( _tabbar, SIGNAL( closeCurrentTab() ), this, SLOT( slotCloseTab() ) );
- connect( _tabbar, SIGNAL( newTab( const KURL& ) ), this, SLOT( slotNewTab( const KURL& ) ) );
+ connect( _tabbar, TQT_SIGNAL( changePanel( ListPanel* ) ), this, TQT_SLOT( slotChangePanel( ListPanel * ) ) );
+ connect( _tabbar, TQT_SIGNAL( closeCurrentTab() ), this, TQT_SLOT( slotCloseTab() ) );
+ connect( _tabbar, TQT_SIGNAL( newTab( const KURL& ) ), this, TQT_SLOT( slotNewTab( const KURL& ) ) );
_layout->addMultiCellWidget( _stack, 0, 0, 0, 2 );
_layout->addWidget( _newTab, 1, 0 );
@@ -68,7 +68,7 @@ void PanelManager::slotChangePanel( ListPanel *p ) {
_self->slotFocusOnMe();
}
-ListPanel* PanelManager::createPanel( QString type, bool setCurrent ) {
+ListPanel* PanelManager::createPanel( TQString type, bool setCurrent ) {
// create the panel and add it into the widgetstack
ListPanel * p = new ListPanel( type, _stack, _left );
_stack->addWidget( p );
@@ -85,7 +85,7 @@ ListPanel* PanelManager::createPanel( QString type, bool setCurrent ) {
_stack->raiseWidget( p );
// connect the activePanelChanged signal to enable/disable actions
- connect( p, SIGNAL( activePanelChanged( ListPanel* ) ), this, SLOT( slotRefreshActions() ) );
+ connect( p, TQT_SIGNAL( activePanelChanged( ListPanel* ) ), this, TQT_SLOT( slotRefreshActions() ) );
return p;
}
@@ -93,10 +93,10 @@ void PanelManager::startPanel( ListPanel *panel, const KURL& path ) {
panel->start( path );
}
-void PanelManager::saveSettings( KConfig *config, const QString& key, bool localOnly ) {
- QStringList l;
- QStringList types;
- QValueList<int> props;
+void PanelManager::saveSettings( KConfig *config, const TQString& key, bool localOnly ) {
+ TQStringList l;
+ TQStringList types;
+ TQValueList<int> props;
int i=0, cnt=0;
while (cnt < _tabbar->count()) {
PanelTab *t = dynamic_cast<PanelTab*>(_tabbar->tabAt(i));
@@ -113,10 +113,10 @@ void PanelManager::saveSettings( KConfig *config, const QString& key, bool local
config->writeEntry( key + " Props", props );
}
-void PanelManager::loadSettings( KConfig *config, const QString& key ) {
- QStringList l = config->readPathListEntry( key );
- QStringList types = config->readListEntry( key + " Types" );
- QValueList<int> props = config->readIntListEntry( key + " Props" );
+void PanelManager::loadSettings( KConfig *config, const TQString& key ) {
+ TQStringList l = config->readPathListEntry( key );
+ TQStringList types = config->readListEntry( key + " Types" );
+ TQValueList<int> props = config->readIntListEntry( key + " Props" );
if( l.count() < 1 )
return;
@@ -154,7 +154,7 @@ void PanelManager::loadSettings( KConfig *config, const QString& key ) {
slotNewTab( vfs::fromPathOrURL(l[i]), false, types[ i ], props[ i ] );
}
-void PanelManager::slotNewTab(const KURL& url, bool setCurrent, QString type, int props ) {
+void PanelManager::slotNewTab(const KURL& url, bool setCurrent, TQString type, int props ) {
if( type.isNull() )
{
krConfig->setGroup( "Look&Feel" );
@@ -173,7 +173,7 @@ void PanelManager::slotNewTab(const KURL& url, bool setCurrent, QString type, in
}
void PanelManager::slotNewTab() {
- slotNewTab( QDir::home().absPath() );
+ slotNewTab( TQDir::home().absPath() );
}
void PanelManager::slotCloseTab() {
@@ -242,7 +242,7 @@ int PanelManager::activeTab()
void PanelManager::setActiveTab( int panelIndex )
{
- QTab *current = _tabbar->tabAt( panelIndex );
+ TQTab *current = _tabbar->tabAt( panelIndex );
if( current == 0 )
return;
_tabbar->setCurrentTab( current );
@@ -270,14 +270,14 @@ void PanelManager::slotRecreatePanels() {
PanelTab *updatedPanel = dynamic_cast<PanelTab*>(_tabbar->tabAt( i ) );
ListPanel *oldPanel = updatedPanel->panel;
- QString type = oldPanel->getType();
+ TQString type = oldPanel->getType();
ListPanel *newPanel = new ListPanel( type, _stack, _left );
_stack->addWidget( newPanel, i );
_stack->removeWidget( oldPanel );
disconnect( oldPanel );
- connect( newPanel, SIGNAL( activePanelChanged( ListPanel* ) ), this, SLOT( slotRefreshActions() ) );
- connect( newPanel, SIGNAL( pathChanged(ListPanel*) ), _tabbar, SLOT(updateTab(ListPanel*)));
+ connect( newPanel, TQT_SIGNAL( activePanelChanged( ListPanel* ) ), this, TQT_SLOT( slotRefreshActions() ) );
+ connect( newPanel, TQT_SIGNAL( pathChanged(ListPanel*) ), _tabbar, TQT_SLOT(updateTab(ListPanel*)));
newPanel->otherPanel = _other;
if( _other->otherPanel == oldPanel )
@@ -315,15 +315,15 @@ void PanelManager::slotPreviousTab() {
slotChangePanel(nextp);
}
-void PanelManager::refreshAllTabs( bool invalidate ) {
+void PanelManager::refreshAllTabs( bool tqinvalidate ) {
int i=0;
while (i < _tabbar->count()) {
PanelTab *t = dynamic_cast<PanelTab*>(_tabbar->tabAt(i));
if (t && t->panel && t->panel->func ) {
vfs * vfs = t->panel->func->files();
if( vfs ) {
- if( invalidate )
- vfs->vfs_invalidate();
+ if( tqinvalidate )
+ vfs->vfs_tqinvalidate();
vfs->vfs_refresh();
}
}
@@ -336,7 +336,7 @@ void PanelManager::deletePanel( ListPanel * p ) {
ACTIVE_PANEL = _self;
if( p && p->func && p->func->files() && !p->func->files()->vfs_canDelete() ) {
- connect( p->func->files(), SIGNAL( deleteAllowed() ), p, SLOT( deleteLater() ) );
+ connect( p->func->files(), TQT_SIGNAL( deleteAllowed() ), p, TQT_SLOT( deleteLater() ) );
p->func->files()->vfs_requestDelete();
return;
}
diff --git a/krusader/panelmanager.h b/krusader/panelmanager.h
index 2016b77..4a2b8fe 100644
--- a/krusader/panelmanager.h
+++ b/krusader/panelmanager.h
@@ -1,20 +1,21 @@
#ifndef _PANEL_MANAGER_H
#define _PANEL_MANAGER_H
-#include <qwidget.h>
-#include <qlayout.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
#include "paneltabbar.h"
class KConfig;
class ListPanel;
-class QWidgetStack;
-class QToolButton;
+class TQWidgetStack;
+class TQToolButton;
/**
* Implements tabbed-browsing by managing a list of tabs and corrosponding panels.
*/
-class PanelManager: public QWidget {
+class PanelManager: public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -22,12 +23,12 @@ class PanelManager: public QWidget {
* (self, other, active), which enables it to manage pointers held by the panels transparently.
* It also receives a bool (left) which is true if the manager is the left one, or false otherwise.
*/
- PanelManager( QWidget *parent, bool left );
+ PanelManager( TQWidget *tqparent, bool left );
/**
* Called once by KrusaderView to create the first panel. Subsequent called are done internally
* Note: only creates the panel, but doesn't start the VFS inside it. Use startPanel() for that.
*/
- ListPanel* createPanel( QString type, bool setCurrent = true );
+ ListPanel* createPanel( TQString type, bool setCurrent = true );
/**
* Called once by KrusaderView to start the first panel. Subsequent called are done internally
* Only starts the VFS inside the panel, you must first use createPanel() !
@@ -38,19 +39,19 @@ class PanelManager: public QWidget {
*/
void swapPanels();
- void saveSettings(KConfig *config, const QString& key, bool localOnly = true );
- void loadSettings(KConfig *config, const QString& key);
+ void saveSettings(KConfig *config, const TQString& key, bool localOnly = true );
+ void loadSettings(KConfig *config, const TQString& key);
int activeTab();
void setActiveTab( int );
void setCurrentTab( int );
- void refreshAllTabs( bool invalidate = false );
+ void refreshAllTabs( bool tqinvalidate = false );
public slots:
/**
* Called externally to start a new tab. Example of usage would be the "open in a new tab"
* action, from the context-menu.
*/
- void slotNewTab(const KURL& url, bool setCurrent = true, QString type = QString::null, int props = 0 );
+ void slotNewTab(const KURL& url, bool setCurrent = true, TQString type = TQString(), int props = 0 );
void slotNewTab();
void slotNextTab();
void slotPreviousTab();
@@ -65,12 +66,12 @@ class PanelManager: public QWidget {
private:
void deletePanel( ListPanel *p );
- QGridLayout *_layout;
- QHBoxLayout *_barLayout;
+ TQGridLayout *_layout;
+ TQHBoxLayout *_barLayout;
bool _left;
PanelTabBar *_tabbar;
- QWidgetStack *_stack;
- QToolButton *_newTab, *_closeTab;
+ TQWidgetStack *_stack;
+ TQToolButton *_newTab, *_closeTab;
ListPanel **_selfPtr, **_otherPtr;
};
diff --git a/krusader/paneltabbar.cpp b/krusader/paneltabbar.cpp
index 6208255..7dcc84a 100644
--- a/krusader/paneltabbar.cpp
+++ b/krusader/paneltabbar.cpp
@@ -23,16 +23,16 @@
#include <kaction.h>
#include <klocale.h>
#include <kshortcut.h>
-#include <qevent.h>
-#include <qwidgetstack.h>
-#include <qfontmetrics.h>
-#include <qtooltip.h>
+#include <tqevent.h>
+#include <tqwidgetstack.h>
+#include <tqfontmetrics.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#define DISPLAY(X) (X.isLocalFile() ? X.path() : X.prettyURL())
-PanelTabBar::PanelTabBar(QWidget *parent): QTabBar(parent), _maxTabLength(0) {
- _panelActionMenu = new KActionMenu( i18n("Panel"), this );
+PanelTabBar::PanelTabBar(TQWidget *tqparent): TQTabBar(tqparent), _maxTabLength(0) {
+ _panelActionMenu = new KActionMenu( i18n("Panel"), TQT_TQOBJECT(this) );
setAcceptDrops(true);
insertAction(krNewTab);
@@ -42,13 +42,13 @@ PanelTabBar::PanelTabBar(QWidget *parent): QTabBar(parent), _maxTabLength(0) {
insertAction(krCloseTab);
krCloseTab->setEnabled(false); //can't close a single tab
- setShape(QTabBar::TriangularBelow);
+ setShape(TQTabBar::TriangularBelow);
}
-void PanelTabBar::mousePressEvent( QMouseEvent* e ) {
- QTab* clickedTab = selectTab( e->pos() );
+void PanelTabBar::mousePressEvent( TQMouseEvent* e ) {
+ TQTab* clickedTab = selectTab( e->pos() );
if( !clickedTab ) { // clicked on nothing ...
- QTabBar::mousePressEvent(e);
+ TQTabBar::mousePressEvent(e);
return;
}
// else implied
@@ -68,7 +68,7 @@ void PanelTabBar::mousePressEvent( QMouseEvent* e ) {
if (e->button() == Qt::MidButton) { // close the current tab
emit closeCurrentTab();
}
- QTabBar::mousePressEvent(e);
+ TQTabBar::mousePressEvent(e);
}
void PanelTabBar::insertAction( KAction* action ) {
@@ -81,7 +81,7 @@ int PanelTabBar::addPanel(ListPanel *panel, bool setCurrent ) {
// make sure all tabs lengths are correct
for (int i=0; i<count(); i++)
tabAt(i)->setText(squeeze(DISPLAY(dynamic_cast<PanelTab*>(tabAt(i))->panel->virtualPath()), i));
- layoutTabs();
+ tqlayoutTabs();
if( setCurrent )
setCurrentTab(newId);
@@ -91,8 +91,8 @@ int PanelTabBar::addPanel(ListPanel *panel, bool setCurrent ) {
krCloseTab->setEnabled(true);
}
- connect(dynamic_cast<PanelTab*>(tab(newId))->panel, SIGNAL(pathChanged(ListPanel*)),
- this, SLOT(updateTab(ListPanel*)));
+ connect(dynamic_cast<PanelTab*>(tab(newId))->panel, TQT_SIGNAL(pathChanged(ListPanel*)),
+ this, TQT_SLOT(updateTab(ListPanel*)));
return newId;
}
@@ -105,7 +105,7 @@ ListPanel* PanelTabBar::removeCurrentPanel(ListPanel* &panelToDelete) {
for (int i=0; i<count(); i++)
tabAt(i)->setText(squeeze(DISPLAY(dynamic_cast<PanelTab*>(tabAt(i))->panel->virtualPath()), i));
- layoutTabs();
+ tqlayoutTabs();
// setup current one
id = currentTab();
@@ -138,10 +138,10 @@ void PanelTabBar::closeTab() {
emit closeCurrentTab();
}
-QString PanelTabBar::squeeze(QString text, int index) {
- QString originalText = text;
+TQString PanelTabBar::squeeze(TQString text, int index) {
+ TQString originalText = text;
- QString lastGroup = krConfig->group();
+ TQString lastGroup = krConfig->group();
krConfig->setGroup( "Look&Feel" );
bool longNames = krConfig->readBoolEntry( "Fullpath Tab Names", _FullPathTabNames );
krConfig->setGroup( lastGroup );
@@ -154,12 +154,12 @@ QString PanelTabBar::squeeze(QString text, int index) {
text += "/";
else
{
- QString shortName;
+ TQString shortName;
- if( text.contains( ":/" ) )
- shortName = text.left( text.find( ":/" ) ) + ":";
+ if( text.tqcontains( ":/" ) )
+ shortName = text.left( text.tqfind( ":/" ) ) + ":";
- shortName += text.mid( text.findRev( "/" ) + 1 );
+ shortName += text.mid( text.tqfindRev( "/" ) + 1 );
text = shortName;
}
@@ -169,10 +169,10 @@ QString PanelTabBar::squeeze(QString text, int index) {
index = -1;
}
- QFontMetrics fm(fontMetrics());
+ TQFontMetrics fm(fontMetrics());
// set the real max length
- _maxTabLength = (static_cast<QWidget*>(parent())->width()-(6*fm.width("W")))/fm.width("W");
+ _maxTabLength = (TQT_TQWIDGET(tqparent())->width()-(6*fm.width("W")))/fm.width("W");
// each tab gets a fair share of the max tab length
int _effectiveTabLength = _maxTabLength / (count() == 0 ? 1 : count());
@@ -180,7 +180,7 @@ QString PanelTabBar::squeeze(QString text, int index) {
int textWidth = fm.width(text);
if (textWidth > labelWidth) {
// start with the dots only
- QString squeezedText = "...";
+ TQString squeezedText = "...";
int squeezedWidth = fm.width(squeezedText);
// estimate how many letters we can add to the dots on both sides
@@ -227,17 +227,17 @@ QString PanelTabBar::squeeze(QString text, int index) {
};
}
-void PanelTabBar::resizeEvent ( QResizeEvent *e ) {
- QTabBar::resizeEvent( e );
+void PanelTabBar::resizeEvent ( TQResizeEvent *e ) {
+ TQTabBar::resizeEvent( e );
for (int i=0; i<count(); i++)
tabAt(i)->setText(squeeze(DISPLAY(dynamic_cast<PanelTab*>(tabAt(i))->panel->virtualPath()), i));
- layoutTabs();
+ tqlayoutTabs();
}
-void PanelTabBar::dragEnterEvent(QDragEnterEvent *e) {
- QTab *t = selectTab(e->pos());
+void PanelTabBar::dragEnterEvent(TQDragEnterEvent *e) {
+ TQTab *t = selectTab(e->pos());
if (!t) return;
if (tab(currentTab()) != t) {
setCurrentTab(t);
@@ -245,8 +245,8 @@ void PanelTabBar::dragEnterEvent(QDragEnterEvent *e) {
}
}
-void PanelTabBar::dragMoveEvent(QDragMoveEvent *e) {
- QTab *t = selectTab(e->pos());
+void PanelTabBar::dragMoveEvent(TQDragMoveEvent *e) {
+ TQTab *t = selectTab(e->pos());
if (!t) return;
if (tab(currentTab()) != t) {
setCurrentTab(t);
@@ -256,7 +256,7 @@ void PanelTabBar::dragMoveEvent(QDragMoveEvent *e) {
// -----------------------------> PanelTab <----------------------------
-PanelTab::PanelTab(const QString & text): QTab(text) {}
-PanelTab::PanelTab(const QString & text, ListPanel *p): QTab(text), panel(p) {}
+PanelTab::PanelTab(const TQString & text): TQTab(text) {}
+PanelTab::PanelTab(const TQString & text, ListPanel *p): TQTab(text), panel(p) {}
#include "paneltabbar.moc"
diff --git a/krusader/paneltabbar.h b/krusader/paneltabbar.h
index 0e94f6d..598e3ed 100644
--- a/krusader/paneltabbar.h
+++ b/krusader/paneltabbar.h
@@ -18,34 +18,35 @@
#define PANELTABBAR_H
#include <kurl.h>
-#include <qtabbar.h>
-#include <qvaluelist.h>
+#include <tqtabbar.h>
+#include <tqvaluelist.h>
-class QMouseEvent;
+class TQMouseEvent;
class KAction;
class KActionMenu;
class ListPanel;
/**
- * Extends QTab to include a pointer to the panel contained in this tab
+ * Extends TQTab to include a pointer to the panel contained in this tab
*/
-class PanelTab: public QTab {
+class PanelTab: public TQTab {
public:
- PanelTab(const QString & text);
- PanelTab(const QString & text, ListPanel *p);
+ PanelTab(const TQString & text);
+ PanelTab(const TQString & text, ListPanel *p);
ListPanel *panel;
};
/**
- * This class extends QTabBar such that right-clicking on a tab pops-up a menu
+ * This class extends TQTabBar such that right-clicking on a tab pops-up a menu
* containing relevant actions for the tab. It also emits signals (caught by PanelManager)
* to create a new tab, close the current tab and change a panel when a tab was clicked
*/
-class PanelTabBar : public QTabBar {
+class PanelTabBar : public TQTabBar {
Q_OBJECT
+ TQ_OBJECT
public:
- PanelTabBar( QWidget *parent );
+ PanelTabBar( TQWidget *tqparent );
public slots:
/**
@@ -79,12 +80,12 @@ signals:
void newTab(const KURL& path);
protected:
- void mousePressEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
void insertAction( KAction* );
- QString squeeze(QString text, int index=-1);
- virtual void dragEnterEvent(QDragEnterEvent *);
- virtual void dragMoveEvent(QDragMoveEvent *);
- virtual void resizeEvent ( QResizeEvent *e );
+ TQString squeeze(TQString text, int index=-1);
+ virtual void dragEnterEvent(TQDragEnterEvent *);
+ virtual void dragMoveEvent(TQDragMoveEvent *);
+ virtual void resizeEvent ( TQResizeEvent *e );
protected slots:
void closeTab();
diff --git a/krusader/recode.ui b/krusader/recode.ui
index 3c97d47..21c6985 100644
--- a/krusader/recode.ui
+++ b/krusader/recode.ui
@@ -1,7 +1,7 @@
<!DOCTYPE UI>
<UI version="3.3" stdsetdef="1">
<class>recodeDlg</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>recodeDlg</cstring>
</property>
@@ -31,7 +31,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="9" column="0" rowspan="1" colspan="3">
+ <widget class="TQLayoutWidget" row="9" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -55,14 +55,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -79,7 +79,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -95,7 +95,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>labelInHdr</cstring>
</property>
@@ -103,7 +103,7 @@
<string>INPUT:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>labelOutHdr</cstring>
</property>
@@ -111,7 +111,7 @@
<string>OUTPUT:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>labelCharset</cstring>
</property>
@@ -135,7 +135,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>labelLineend</cstring>
</property>
@@ -159,7 +159,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>labelMime</cstring>
</property>
@@ -183,7 +183,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>labelDump</cstring>
</property>
@@ -207,7 +207,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>labelLocation</cstring>
</property>
@@ -233,7 +233,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QCheckBox" row="7" column="1">
+ <widget class="TQCheckBox" row="7" column="1">
<property name="name">
<cstring>checkName</cstring>
</property>
@@ -244,7 +244,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="8" column="1">
+ <widget class="TQCheckBox" row="8" column="1">
<property name="name">
<cstring>checkContent</cstring>
</property>
@@ -255,7 +255,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QCheckBox" row="7" column="2">
+ <widget class="TQCheckBox" row="7" column="2">
<property name="name">
<cstring>checkDebug</cstring>
</property>
@@ -282,7 +282,7 @@
<slot>reject()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/tar/ktartest.cpp b/tar/ktartest.cpp
index a82e6db..bfbb216 100644
--- a/tar/ktartest.cpp
+++ b/tar/ktartest.cpp
@@ -1,13 +1,13 @@
#include "ktar.h"
#include <stdio.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kinstance.h>
#include <kdebug.h>
-void recursive_print( const KTarDirectory * dir, const QString & path )
+void recursive_print( const KTarDirectory * dir, const TQString & path )
{
- QStringList l = dir->entries();
- QStringList::Iterator it = l.begin();
+ TQStringList l = dir->entries();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
const KTarEntry* entry = dir->entry( (*it) );
@@ -37,7 +37,7 @@ int main( int argc, char** argv )
}
KInstance instance("ktartest");
- QString command = argv[1];
+ TQString command = argv[1];
kdDebug() << "main: command=" << command << endl;
if ( command == "list" )
{
@@ -81,19 +81,19 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KTarFile* f = (KTarFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
printf("DATA=%s\n", str.latin1());
/*
- // This is what KGzipDev::readAll could do, if QIODevice::readAll was virtual....
- QByteArray array(1024);
+ // This is what KGzipDev::readAll could do, if TQIODevice::readAll was virtual....
+ TQByteArray array(1024);
int n;
while ( ( n = dev.readBlock( array.data(), array.size() ) ) )
{
kdDebug() << "readBlock returned " << n << endl << endl;
- QCString s(array,n+1); // Terminate with 0 before printing
+ TQCString s(array,n+1); // Terminate with 0 before printing
printf("%s", s.data());
}
dev.close();
@@ -151,9 +151,9 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KTarFile* f = (KTarFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
printf("DATA=%s\n", str.latin1());
tar.close();
@@ -172,7 +172,7 @@ int main( int argc, char** argv )
// Generate long filenames of each possible length bigger than 98...
for (int i = 98; i < 500 ; i++ )
{
- QString str, num;
+ TQString str, num;
str.fill( 'a', i-10 );
num.setNum( i );
num = num.rightJustify( 10, '0' );
@@ -186,7 +186,7 @@ int main( int argc, char** argv )
}
else if ( command == "bytearray" )
{
- QFile file( argv[2] );
+ TQFile file( argv[2] );
if ( !file.open( IO_ReadOnly ) )
return 1;
KTarGz tar( &file );
diff --git a/tar/tar.cc b/tar/tar.cc
index 77f70db..d63b777 100644
--- a/tar/tar.cc
+++ b/tar/tar.cc
@@ -4,9 +4,9 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qptrqueue.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqptrqueue.h>
#include <kurl.h>
#include <kdebug.h>
#include <kinstance.h>
@@ -46,7 +46,7 @@ int kdemain( int argc, char **argv ) {
return 0;
}
-ArchiveProtocol::ArchiveProtocol( const QCString &pool, const QCString &app ) : SlaveBase( "tar", pool, app ) {
+ArchiveProtocol::ArchiveProtocol( const TQCString &pool, const TQCString &app ) : SlaveBase( "tar", pool, app ) {
kdDebug( 7109 ) << "ArchiveProtocol::ArchiveProtocol" << endl;
m_archiveFile = 0L;
}
@@ -61,25 +61,25 @@ void ArchiveProtocol::put( const KURL& url, int, bool, bool resume ){
return;
}
- QByteArray tempBuffer;
- QPtrQueue<QByteArray> buffer;
+ TQByteArray tempBuffer;
+ TQPtrQueue<TQByteArray> buffer;
buffer.setAutoDelete(true);
int readResult=0;
int size = 0;
- QByteArray* temp;
+ TQByteArray* temp;
do{
dataReq();
- temp = new QByteArray();
+ temp = new TQByteArray();
readResult = readData(*temp);
buffer.enqueue(temp);
size += temp->size();
} while( readResult > 0 );
- QString filename = url.path().mid(m_archiveName.length()+1);
+ TQString filename = url.path().mid(m_archiveName.length()+1);
if( !m_archiveFile->prepareWriting(filename,user,group,size) ){
error(ERR_UNSUPPORTED_ACTION,
- i18n("Writing to %1 is not supported").arg(filename) );
+ i18n("Writing to %1 is not supported").tqarg(filename) );
return;
}
while( (temp=buffer.dequeue()) ){
@@ -91,13 +91,13 @@ void ArchiveProtocol::put( const KURL& url, int, bool, bool resume ){
}
void ArchiveProtocol::mkdir(const KURL& url,int){
- QString filename = url.path().mid(m_archiveName.length()+1);
+ TQString filename = url.path().mid(m_archiveName.length()+1);
m_archiveFile->writeDir(filename,user,group);
finished();
}
-bool ArchiveProtocol::checkNewFile( const KURL & url, QString & path ) {
- QString fullPath = url.path();
+bool ArchiveProtocol::checkNewFile( const KURL & url, TQString & path ) {
+ TQString fullPath = url.path();
kdDebug( 7109 ) << "ArchiveProtocol::checkNewFile " << fullPath << endl;
@@ -105,7 +105,7 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, QString & path ) {
if ( m_archiveFile && m_archiveName == fullPath.left( m_archiveName.length() ) ) {
// Has it changed ?
struct stat statbuf;
- if ( ::stat( QFile::encodeName( m_archiveName ), &statbuf ) == 0 ) {
+ if ( ::stat( TQFile::encodeName( m_archiveName ), &statbuf ) == 0 ) {
if ( m_mtime == statbuf.st_mtime ) {
path = fullPath.mid( m_archiveName.length() );
kdDebug( 7109 ) << "ArchiveProtocol::checkNewFile returning " << path << endl;
@@ -124,23 +124,23 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, QString & path ) {
// Find where the tar file is in the full path
int pos = 0;
- QString archiveFile;
- path = QString::null;
+ TQString archiveFile;
+ path = TQString();
int len = fullPath.length();
if ( len != 0 && fullPath[ len - 1 ] != '/' )
fullPath += '/';
kdDebug( 7109 ) << "the full path is " << fullPath << endl;
- while ( ( pos = fullPath.find( '/', pos + 1 ) ) != -1 ) {
- QString tryPath = fullPath.left( pos );
+ while ( ( pos = fullPath.tqfind( '/', pos + 1 ) ) != -1 ) {
+ TQString tryPath = fullPath.left( pos );
kdDebug( 7109 ) << fullPath << " trying " << tryPath << endl;
struct stat statbuf;
- if ( ::stat( QFile::encodeName( tryPath ), &statbuf ) == 0 && !S_ISDIR( statbuf.st_mode ) ) {
+ if ( ::stat( TQFile::encodeName( tryPath ), &statbuf ) == 0 && !S_ISDIR( statbuf.st_mode ) ) {
archiveFile = tryPath;
m_mtime = statbuf.st_mtime;
- user = QFileInfo(archiveFile).owner();
- group = QFileInfo(archiveFile).group();
+ user = TQFileInfo(archiveFile).owner();
+ group = TQFileInfo(archiveFile).group();
path = fullPath.mid( pos + 1 );
kdDebug( 7109 ) << "fullPath=" << fullPath << " path=" << path << endl;
len = path.length();
@@ -148,7 +148,7 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, QString & path ) {
if ( path[ len - 1 ] == '/' )
path.truncate( len - 1 );
} else
- path = QString::fromLatin1( "/" );
+ path = TQString::tqfromLatin1( "/" );
kdDebug( 7109 ) << "Found. archiveFile=" << archiveFile << " path=" << path << endl;
break;
}
@@ -224,9 +224,9 @@ void ArchiveProtocol::createUDSEntry( const KArchiveEntry * archiveEntry, UDSEnt
void ArchiveProtocol::listDir( const KURL & url ) {
kdDebug( 7109 ) << "ArchiveProtocol::listDir " << url.url() << endl;
- QString path;
+ TQString path;
if ( !checkNewFile( url, path ) ) {
- QCString _path( QFile::encodeName( url.path() ) );
+ TQCString _path( TQFile::encodeName( url.path() ) );
kdDebug( 7109 ) << "Checking (stat) on " << _path << endl;
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
@@ -246,9 +246,9 @@ void ArchiveProtocol::listDir( const KURL & url ) {
}
if ( path.isEmpty() ) {
- KURL redir( url.protocol() + QString::fromLatin1( ":/" ) );
+ KURL redir( url.protocol() + TQString::tqfromLatin1( ":/" ) );
kdDebug( 7109 ) << "url.path()==" << url.path() << endl;
- redir.setPath( url.path() + QString::fromLatin1( "/" ) );
+ redir.setPath( url.path() + TQString::tqfromLatin1( "/" ) );
kdDebug( 7109 ) << "ArchiveProtocol::listDir: redirection " << redir.url() << endl;
redirection( redir );
finished();
@@ -259,7 +259,7 @@ void ArchiveProtocol::listDir( const KURL & url ) {
const KArchiveDirectory* root = m_archiveFile->directory();
const KArchiveDirectory* dir;
if ( !path.isEmpty() && path != "/" ) {
- kdDebug( 7109 ) << QString( "Looking for entry %1" ).arg( path ) << endl;
+ kdDebug( 7109 ) << TQString( "Looking for entry %1" ).tqarg( path ) << endl;
const KArchiveEntry* e = root->entry( path );
if ( !e ) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
@@ -274,11 +274,11 @@ void ArchiveProtocol::listDir( const KURL & url ) {
dir = root;
}
- QStringList l = dir->entries();
+ TQStringList l = dir->entries();
totalSize( l.count() );
UDSEntry entry;
- QStringList::Iterator it = l.begin();
+ TQStringList::Iterator it = l.begin();
for ( ; it != l.end(); ++it ) {
kdDebug( 7109 ) << ( *it ) << endl;
const KArchiveEntry* archiveEntry = dir->entry( ( *it ) );
@@ -296,12 +296,12 @@ void ArchiveProtocol::listDir( const KURL & url ) {
}
void ArchiveProtocol::stat( const KURL & url ) {
- QString path;
+ TQString path;
UDSEntry entry;
if ( !checkNewFile( url, path ) ) {
// We may be looking at a real directory - this happens
// when pressing up after being in the root of an archive
- QCString _path( QFile::encodeName( url.path() ) );
+ TQCString _path( TQFile::encodeName( url.path() ) );
kdDebug( 7109 ) << "ArchiveProtocol::stat (stat) on " << _path << endl;
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
@@ -333,7 +333,7 @@ void ArchiveProtocol::stat( const KURL & url ) {
const KArchiveDirectory* root = m_archiveFile->directory();
const KArchiveEntry* archiveEntry;
if ( path.isEmpty() ) {
- path = QString::fromLatin1( "/" );
+ path = TQString::tqfromLatin1( "/" );
archiveEntry = root;
} else {
archiveEntry = root->entry( path );
@@ -352,7 +352,7 @@ void ArchiveProtocol::stat( const KURL & url ) {
void ArchiveProtocol::get( const KURL & url ) {
kdDebug( 7109 ) << "ArchiveProtocol::get" << url.url() << endl;
- QString path;
+ TQString path;
if ( !checkNewFile( url, path ) ) {
error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL() );
return ;
@@ -381,7 +381,7 @@ void ArchiveProtocol::get( const KURL & url ) {
totalSize( archiveFileEntry->size() );
- QByteArray completeData = archiveFileEntry->data();
+ TQByteArray completeData = archiveFileEntry->data();
KMimeMagicResult * result = KMimeMagic::self() ->findBufferFileType( completeData, path );
kdDebug( 7109 ) << "Emitting mimetype " << result->mimeType() << endl;
@@ -390,7 +390,7 @@ void ArchiveProtocol::get( const KURL & url ) {
data( completeData );
processedSize( archiveFileEntry->size() );
- data( QByteArray() );
+ data( TQByteArray() );
finished();
}
diff --git a/tar/tar.h b/tar/tar.h
index 0f7062e..5b41ce1 100644
--- a/tar/tar.h
+++ b/tar/tar.h
@@ -25,7 +25,7 @@
class ArchiveProtocol : public KIO::SlaveBase {
public:
- ArchiveProtocol( const QCString &pool, const QCString &app );
+ ArchiveProtocol( const TQCString &pool, const TQCString &app );
virtual ~ArchiveProtocol();
virtual void listDir( const KURL & url );
@@ -36,12 +36,12 @@ public:
protected:
void createUDSEntry( const KArchiveEntry * tarEntry, KIO::UDSEntry & entry );
- bool checkNewFile( const KURL & url, QString & path );
+ bool checkNewFile( const KURL & url, TQString & path );
KArchive * m_archiveFile;
- QString m_archiveName;
- QString user;
- QString group;
+ TQString m_archiveName;
+ TQString user;
+ TQString group;
time_t m_mtime;
};
diff --git a/virt/virt.cc b/virt/virt.cc
index ad7aa5b..b6f34ee 100644
--- a/virt/virt.cc
+++ b/virt/virt.cc
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kurl.h>
#include <kdebug.h>
#include <klocale.h>
@@ -47,7 +47,7 @@ extern "C" { int kdemain( int argc, char **argv ); }
fclose(f);\
}
-QDict<KURL::List> VirtProtocol::kioVirtDict;
+TQDict<KURL::List> VirtProtocol::kioVirtDict;
KConfig* VirtProtocol::kio_virt_db;
int kdemain( int argc, char **argv ) {
@@ -64,7 +64,7 @@ int kdemain( int argc, char **argv ) {
return 0;
}
-VirtProtocol::VirtProtocol( const QCString &pool, const QCString &app ) : SlaveBase( "virt", pool, app ) {
+VirtProtocol::VirtProtocol( const TQCString &pool, const TQCString &app ) : SlaveBase( "virt", pool, app ) {
kio_virt_db = new KConfig(VIRT_VFS_DB,false,"data");
}
@@ -86,8 +86,8 @@ void VirtProtocol::del(KURL const & /*url */, bool /* isFile */ ){
}
void VirtProtocol::copy( const KURL &src, const KURL &dest, int /* permissions */, bool /* overwrite */ ){
- QString path = dest.path( -1 ).mid( 1 );
- path = path.left(path.findRev("/"));
+ TQString path = dest.path( -1 ).mid( 1 );
+ path = path.left(path.tqfindRev("/"));
if ( path.isEmpty() ) path = "/";
if( addDir(path) ){
@@ -98,23 +98,23 @@ void VirtProtocol::copy( const KURL &src, const KURL &dest, int /* permissions *
finished();
}
-bool VirtProtocol::addDir(QString& path){
+bool VirtProtocol::addDir(TQString& path){
if( kioVirtDict[ path ] ) return true;
- QString updir;
- if( !path.contains("/") ) updir = "/";
- else updir = path.left(path.findRev("/"));
- QString name = path.mid(path.findRev("/")+1);
+ TQString updir;
+ if( !path.tqcontains("/") ) updir = "/";
+ else updir = path.left(path.tqfindRev("/"));
+ TQString name = path.mid(path.tqfindRev("/")+1);
if( addDir(updir) ){
KURL url;
- if( updir == "/" ) url = QString("virt:/")+name;
- else url = QString("virt:/")+updir+"/"+name;
+ if( updir == "/" ) url = TQString("virt:/")+name;
+ else url = TQString("virt:/")+updir+"/"+name;
kioVirtDict[ updir ]->append( url );
KURL::List* temp = new KURL::List();
- kioVirtDict.replace( path, temp );
+ kioVirtDict.tqreplace( path, temp );
return true;
}
@@ -128,7 +128,7 @@ void VirtProtocol::mkdir(const KURL& url,int){
return;
}
- QString path = url.path( -1 ).mid( 1 );
+ TQString path = url.path( -1 ).mid( 1 );
if ( path.isEmpty() ) path = "/";
if( kioVirtDict[ path ] ){
@@ -152,7 +152,7 @@ void VirtProtocol::listDir( const KURL & url ) {
load();
- QString path = url.path( -1 ).mid( 1 );
+ TQString path = url.path( -1 ).mid( 1 );
if ( path.isEmpty() ) path = "/";
KURL::List* urlList = kioVirtDict[ path ];
@@ -225,10 +225,10 @@ bool VirtProtocol::save(){
KConfig* db = new KConfig(VIRT_VFS_DB,false,"data");;
db->setGroup("virt_db");
- QDictIterator<KURL::List> it( kioVirtDict ); // See QDictIterator
+ TQDictIterator<KURL::List> it( kioVirtDict ); // See TQDictIterator
for( ; it.current(); ++it ){
KURL::List::iterator url;
- QStringList entry;
+ TQStringList entry;
for ( url = it.current()->begin() ; url != it.current()->end() ; ++url ) {
entry.append( (*url).url() );
}
@@ -249,17 +249,17 @@ bool VirtProtocol::load(){
KConfig* db = new KConfig(VIRT_VFS_DB,false,"data");
db->setGroup("virt_db");
- QMap<QString, QString> map = db->entryMap("virt_db");
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString> map = db->entryMap("virt_db");
+ TQMap<TQString, TQString>::Iterator it;
KURL::List* urlList;
for ( it = map.begin(); it != map.end(); ++it ) {
urlList = new KURL::List( db->readListEntry(it.key()) );
- kioVirtDict.replace( it.key(),urlList );
+ kioVirtDict.tqreplace( it.key(),urlList );
}
if( !kioVirtDict["/" ]){
urlList = new KURL::List();
- kioVirtDict.replace( "/", urlList );
+ kioVirtDict.tqreplace( "/", urlList );
}
unlock();
@@ -270,7 +270,7 @@ bool VirtProtocol::load(){
}
void VirtProtocol::local_entry(const KURL& url,UDSEntry& entry){
- QString path = url.path( -1 ).mid( 1 );
+ TQString path = url.path( -1 ).mid( 1 );
if ( path.isEmpty() ) path = "/";
UDSAtom atom;
diff --git a/virt/virt.h b/virt/virt.h
index 04443de..bd35c29 100644
--- a/virt/virt.h
+++ b/virt/virt.h
@@ -19,13 +19,13 @@
#define _VIRT_H
#include <sys/types.h>
-#include <qdict.h>
+#include <tqdict.h>
#include <kconfig.h>
#include <kio/slavebase.h>
class VirtProtocol : public KIO::SlaveBase {
public:
- VirtProtocol( const QCString &pool, const QCString &app );
+ VirtProtocol( const TQCString &pool, const TQCString &app );
virtual ~VirtProtocol();
virtual void listDir ( const KURL & url );
@@ -42,10 +42,10 @@ protected:
bool load();
void local_entry(const KURL& url,KIO::UDSEntry& entry);
- bool addDir(QString& path);
+ bool addDir(TQString& path);
- static QDict<KURL::List> kioVirtDict;
+ static TQDict<KURL::List> kioVirtDict;
static KConfig* kio_virt_db;
bool rewriteURL(const KURL&, KURL&);