From 6ffad5a006df848f5e9a80ca31e5faec8ed65e62 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 3 Jul 2011 02:49:54 +0000 Subject: 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 --- iso/iso.cpp | 46 +-- iso/iso.h | 6 +- iso/kiso.cpp | 70 ++-- iso/kiso.h | 28 +- iso/kisodirectory.cpp | 6 +- iso/kisodirectory.h | 8 +- iso/kisofile.cpp | 10 +- iso/kisofile.h | 10 +- iso/libisofs/iso_fs.h | 4 +- iso/libisofs/isofs.h | 4 +- iso/qfilehack.cpp | 12 +- iso/qfilehack.h | 18 +- krArc/krarc.cpp | 480 ++++++++++++------------- krArc/krarc.h | 88 ++--- krusader/ActionMan/actionman.cpp | 8 +- krusader/ActionMan/actionman.h | 3 +- krusader/ActionMan/actionproperty.cpp | 114 +++--- krusader/ActionMan/actionproperty.h | 5 +- krusader/ActionMan/actionpropertybase.cpp | 374 +++++++++---------- krusader/ActionMan/actionpropertybase.ui | 166 ++++----- krusader/ActionMan/addplaceholderpopup.cpp | 286 +++++++-------- krusader/ActionMan/addplaceholderpopup.h | 116 +++--- krusader/ActionMan/useractionlistview.cpp | 58 +-- krusader/ActionMan/useractionlistview.h | 20 +- krusader/ActionMan/useractionpage.cpp | 98 ++--- krusader/ActionMan/useractionpage.h | 15 +- krusader/BookMan/kraddbookmarkdlg.cpp | 58 +-- krusader/BookMan/kraddbookmarkdlg.h | 19 +- krusader/BookMan/krbookmark.cpp | 14 +- krusader/BookMan/krbookmark.h | 15 +- krusader/BookMan/krbookmarkbutton.cpp | 10 +- krusader/BookMan/krbookmarkbutton.h | 7 +- krusader/BookMan/krbookmarkhandler.cpp | 178 ++++----- krusader/BookMan/krbookmarkhandler.h | 39 +- krusader/Dialogs/checksumdlg.cpp | 320 ++++++++--------- krusader/Dialogs/checksumdlg.h | 24 +- krusader/Dialogs/krdialogs.cpp | 94 ++--- krusader/Dialogs/krdialogs.h | 48 +-- krusader/Dialogs/krkeydialog.cpp | 50 +-- krusader/Dialogs/krkeydialog.h | 5 +- krusader/Dialogs/krmaskchoice.cpp | 122 +++---- krusader/Dialogs/krmaskchoice.h | 57 +-- krusader/Dialogs/krpleasewait.cpp | 32 +- krusader/Dialogs/krpleasewait.h | 22 +- krusader/Dialogs/krprogress.cpp | 110 +++--- krusader/Dialogs/krprogress.h | 19 +- krusader/Dialogs/krspecialwidgets.cpp | 70 ++-- krusader/Dialogs/krspecialwidgets.h | 71 ++-- krusader/Dialogs/krspwidgets.cpp | 94 ++--- krusader/Dialogs/krspwidgets.h | 24 +- krusader/Dialogs/krsqueezedtextlabel.cpp | 38 +- krusader/Dialogs/krsqueezedtextlabel.h | 25 +- krusader/Dialogs/kurllistrequester.cpp | 58 +-- krusader/Dialogs/kurllistrequester.h | 27 +- krusader/Dialogs/newftpgui.cpp | 125 ++++--- krusader/Dialogs/newftpgui.h | 55 +-- krusader/Dialogs/packgui.cpp | 40 +-- krusader/Dialogs/packgui.h | 7 +- krusader/Dialogs/packguibase.cpp | 200 +++++------ krusader/Dialogs/packguibase.h | 103 +++--- krusader/Dialogs/percentalsplitter.cpp | 64 ++-- krusader/Dialogs/percentalsplitter.h | 15 +- krusader/Dialogs/popularurls.cpp | 62 ++-- krusader/Dialogs/popularurls.h | 16 +- krusader/DiskUsage/diskusage.cpp | 260 +++++++------- krusader/DiskUsage/diskusage.h | 82 ++--- krusader/DiskUsage/diskusagegui.cpp | 100 +++--- krusader/DiskUsage/diskusagegui.h | 27 +- krusader/DiskUsage/dufilelight.cpp | 54 +-- krusader/DiskUsage/dufilelight.h | 5 +- krusader/DiskUsage/dulines.cpp | 166 ++++----- krusader/DiskUsage/dulines.h | 17 +- krusader/DiskUsage/dulistview.cpp | 106 +++--- krusader/DiskUsage/dulistview.h | 63 ++-- krusader/DiskUsage/filelightParts/Config.cpp | 2 +- krusader/DiskUsage/filelightParts/Config.h | 2 +- krusader/DiskUsage/filelightParts/fileTree.cpp | 18 +- krusader/DiskUsage/filelightParts/fileTree.h | 80 ++--- krusader/DiskUsage/radialMap/builder.cpp | 4 +- krusader/DiskUsage/radialMap/labels.cpp | 36 +- krusader/DiskUsage/radialMap/map.cpp | 62 ++-- krusader/DiskUsage/radialMap/radialMap.h | 10 +- krusader/DiskUsage/radialMap/segmentTip.cpp | 70 ++-- krusader/DiskUsage/radialMap/segmentTip.h | 12 +- krusader/DiskUsage/radialMap/widget.cpp | 44 +-- krusader/DiskUsage/radialMap/widget.h | 39 +- krusader/DiskUsage/radialMap/widgetEvents.cpp | 54 +-- krusader/Filter/advancedfilter.cpp | 252 ++++++------- krusader/Filter/advancedfilter.h | 103 +++--- krusader/Filter/filterbase.h | 8 +- krusader/Filter/filterdialog.cpp | 10 +- krusader/Filter/filterdialog.h | 3 +- krusader/Filter/filtertabs.cpp | 18 +- krusader/Filter/filtertabs.h | 25 +- krusader/Filter/generalfilter.cpp | 174 ++++----- krusader/Filter/generalfilter.h | 51 +-- krusader/GUI/dirhistorybutton.cpp | 18 +- krusader/GUI/dirhistorybutton.h | 13 +- krusader/GUI/dirhistoryqueue.cpp | 16 +- krusader/GUI/dirhistoryqueue.h | 13 +- krusader/GUI/kcmdline.cpp | 96 ++--- krusader/GUI/kcmdline.h | 36 +- krusader/GUI/kcmdmodebutton.cpp | 10 +- krusader/GUI/kcmdmodebutton.h | 9 +- krusader/GUI/kfnkeys.cpp | 86 ++--- krusader/GUI/kfnkeys.h | 15 +- krusader/GUI/krremoteencodingmenu.cpp | 48 +-- krusader/GUI/krremoteencodingmenu.h | 9 +- krusader/GUI/krusaderstatus.cpp | 10 +- krusader/GUI/krusaderstatus.h | 15 +- krusader/GUI/mediabutton.cpp | 210 +++++------ krusader/GUI/mediabutton.h | 37 +- krusader/GUI/profilemanager.cpp | 46 +-- krusader/GUI/profilemanager.h | 29 +- krusader/GUI/syncbrowsebutton.cpp | 4 +- krusader/GUI/syncbrowsebutton.h | 11 +- krusader/KViewer/diskusageviewer.cpp | 22 +- krusader/KViewer/diskusageviewer.h | 19 +- krusader/KViewer/kimagefilepreview.cpp | 54 +-- krusader/KViewer/kimagefilepreview.h | 25 +- krusader/KViewer/krviewer.cpp | 162 ++++----- krusader/KViewer/krviewer.h | 48 +-- krusader/KViewer/panelviewer.cpp | 84 ++--- krusader/KViewer/panelviewer.h | 29 +- krusader/Konfigurator/kgadvanced.cpp | 38 +- krusader/Konfigurator/kgadvanced.h | 3 +- krusader/Konfigurator/kgarchives.cpp | 52 +-- krusader/Konfigurator/kgarchives.h | 3 +- krusader/Konfigurator/kgcolors.cpp | 230 ++++++------ krusader/Konfigurator/kgcolors.h | 79 ++-- krusader/Konfigurator/kgdependencies.cpp | 52 +-- krusader/Konfigurator/kgdependencies.h | 11 +- krusader/Konfigurator/kggeneral.cpp | 84 ++--- krusader/Konfigurator/kggeneral.h | 5 +- krusader/Konfigurator/kglookfeel.cpp | 132 +++---- krusader/Konfigurator/kglookfeel.h | 9 +- krusader/Konfigurator/kgprotocols.cpp | 178 ++++----- krusader/Konfigurator/kgprotocols.h | 41 +-- krusader/Konfigurator/kgstartup.cpp | 36 +- krusader/Konfigurator/kgstartup.h | 3 +- krusader/Konfigurator/kguseractions.cpp | 36 +- krusader/Konfigurator/kguseractions.h | 3 +- krusader/Konfigurator/kgwelcome.cpp | 12 +- krusader/Konfigurator/kgwelcome.h | 3 +- krusader/Konfigurator/konfigurator.cpp | 34 +- krusader/Konfigurator/konfigurator.h | 13 +- krusader/Konfigurator/konfiguratoritems.cpp | 314 ++++++++-------- krusader/Konfigurator/konfiguratoritems.h | 244 +++++++------ krusader/Konfigurator/konfiguratorpage.cpp | 154 ++++---- krusader/Konfigurator/konfiguratorpage.h | 181 +++++----- krusader/Konfigurator/krresulttable.cpp | 94 ++--- krusader/Konfigurator/krresulttable.h | 64 ++-- krusader/Konfigurator/krresulttabledialog.cpp | 38 +- krusader/Konfigurator/krresulttabledialog.h | 38 +- krusader/Konfigurator/searchobject.cpp | 10 +- krusader/Konfigurator/searchobject.h | 48 +-- krusader/KrJS/krjs.cpp | 16 +- krusader/KrJS/krjs.h | 2 +- krusader/Locate/locate.cpp | 162 ++++----- krusader/Locate/locate.h | 27 +- krusader/MountMan/kdiskfreesp.cpp | 60 ++-- krusader/MountMan/kdiskfreesp.h | 23 +- krusader/MountMan/kmountman.cpp | 76 ++-- krusader/MountMan/kmountman.h | 39 +- krusader/MountMan/kmountmangui.cpp | 140 ++++---- krusader/MountMan/kmountmangui.h | 61 ++-- krusader/Panel/krbriefview.cpp | 404 ++++++++++----------- krusader/Panel/krbriefview.h | 119 +++--- krusader/Panel/krbriefviewitem.cpp | 54 +-- krusader/Panel/krbriefviewitem.h | 24 +- krusader/Panel/krcalcspacedialog.cpp | 36 +- krusader/Panel/krcalcspacedialog.h | 21 +- krusader/Panel/krcolorcache.cpp | 266 +++++++------- krusader/Panel/krcolorcache.h | 43 +-- krusader/Panel/krdetailedview.cpp | 410 ++++++++++----------- krusader/Panel/krdetailedview.h | 101 +++--- krusader/Panel/krdetailedviewitem.cpp | 68 ++-- krusader/Panel/krdetailedviewitem.h | 16 +- krusader/Panel/krdrag.cpp | 28 +- krusader/Panel/krdrag.h | 15 +- krusader/Panel/krpopupmenu.cpp | 56 +-- krusader/Panel/krpopupmenu.h | 15 +- krusader/Panel/krpreviewpopup.cpp | 10 +- krusader/Panel/krpreviewpopup.h | 9 +- krusader/Panel/krselectionmode.cpp | 4 +- krusader/Panel/krselectionmode.h | 10 +- krusader/Panel/krview.cpp | 70 ++-- krusader/Panel/krview.h | 99 ++--- krusader/Panel/krviewitem.cpp | 40 +-- krusader/Panel/krviewitem.h | 18 +- krusader/Panel/listpanel.cpp | 360 +++++++++---------- krusader/Panel/listpanel.h | 99 ++--- krusader/Panel/panelfunc.cpp | 246 ++++++------- krusader/Panel/panelfunc.h | 29 +- krusader/Panel/panelpopup.cpp | 152 ++++---- krusader/Panel/panelpopup.h | 43 +-- krusader/Queue/queue.cpp | 2 +- krusader/Queue/queue.h | 21 +- krusader/Queue/queue_mgr.cpp | 12 +- krusader/Queue/queue_mgr.h | 16 +- krusader/Queue/queuewidget.h | 7 +- krusader/RemoteMan/remoteman.cpp | 148 ++++---- krusader/RemoteMan/remoteman.h | 19 +- krusader/RemoteMan/remotemanbase.cpp | 184 +++++----- krusader/RemoteMan/remotemanbase.h | 103 +++--- krusader/Search/krsearchdialog.cpp | 198 +++++----- krusader/Search/krsearchdialog.h | 77 ++-- krusader/Search/krsearchmod.cpp | 44 +-- krusader/Search/krsearchmod.h | 23 +- krusader/Splitter/combiner.cpp | 84 ++--- krusader/Splitter/combiner.h | 25 +- krusader/Splitter/splitter.cpp | 70 ++-- krusader/Splitter/splitter.h | 19 +- krusader/Splitter/splittergui.cpp | 54 +-- krusader/Splitter/splittergui.h | 100 +++--- krusader/Synchronizer/feedtolistboxdialog.cpp | 72 ++-- krusader/Synchronizer/feedtolistboxdialog.h | 19 +- krusader/Synchronizer/synchronizedialog.cpp | 96 ++--- krusader/Synchronizer/synchronizedialog.h | 35 +- krusader/Synchronizer/synchronizer.cpp | 330 ++++++++--------- krusader/Synchronizer/synchronizer.h | 99 ++--- krusader/Synchronizer/synchronizerdirlist.cpp | 56 +-- krusader/Synchronizer/synchronizerdirlist.h | 21 +- krusader/Synchronizer/synchronizerfileitem.h | 88 ++--- krusader/Synchronizer/synchronizergui.cpp | 436 +++++++++++----------- krusader/Synchronizer/synchronizergui.h | 155 ++++---- krusader/Synchronizer/synchronizertask.cpp | 72 ++-- krusader/Synchronizer/synchronizertask.h | 69 ++-- krusader/UserAction/expander.cpp | 296 +++++++-------- krusader/UserAction/expander.h | 72 ++-- krusader/UserAction/kraction.cpp | 170 ++++----- krusader/UserAction/kraction.h | 91 ++--- krusader/UserAction/kractionbase.cpp | 10 +- krusader/UserAction/kractionbase.h | 10 +- krusader/UserAction/tstring.h | 22 +- krusader/UserAction/useraction.cpp | 60 ++-- krusader/UserAction/useraction.h | 28 +- krusader/UserAction/useractionpopupmenu.cpp | 2 +- krusader/UserAction/useractionpopupmenu.h | 2 +- krusader/UserMenu/usermenu.cpp | 4 +- krusader/UserMenu/usermenu.h | 8 +- krusader/VFS/arc_vfs.cpp | 240 ++++++------- krusader/VFS/arc_vfs.h | 79 ++-- krusader/VFS/ftp_vfs.cpp | 82 ++--- krusader/VFS/ftp_vfs.h | 17 +- krusader/VFS/krarchandler.cpp | 192 +++++----- krusader/VFS/krarchandler.h | 71 ++-- krusader/VFS/krdirwatch.cpp | 20 +- krusader/VFS/krdirwatch.h | 31 +- krusader/VFS/krpermhandler.cpp | 120 +++---- krusader/VFS/krpermhandler.h | 58 +-- krusader/VFS/krquery.cpp | 168 ++++----- krusader/VFS/krquery.h | 79 ++-- krusader/VFS/krvfshandler.cpp | 16 +- krusader/VFS/krvfshandler.h | 6 +- krusader/VFS/normal_vfs.cpp | 112 +++--- krusader/VFS/normal_vfs.h | 35 +- krusader/VFS/preservingcopyjob.cpp | 52 +-- krusader/VFS/preservingcopyjob.h | 21 +- krusader/VFS/temp_vfs.cpp | 26 +- krusader/VFS/temp_vfs.h | 12 +- krusader/VFS/vfile.cpp | 50 +-- krusader/VFS/vfile.h | 79 ++-- krusader/VFS/vfs.cpp | 76 ++-- krusader/VFS/vfs.h | 51 +-- krusader/VFS/virt_vfs.cpp | 68 ++-- krusader/VFS/virt_vfs.h | 25 +- krusader/VFS/virtualcopyjob.cpp | 74 ++-- krusader/VFS/virtualcopyjob.h | 29 +- krusader/calc.ui | 46 +-- krusader/defaults.h | 16 +- krusader/kicons.cpp | 6 +- krusader/kicons.h | 8 +- krusader/krservices.cpp | 82 ++--- krusader/krservices.h | 35 +- krusader/krslots.cpp | 130 +++---- krusader/krslots.h | 15 +- krusader/krusader.cpp | 392 ++++++++++---------- krusader/krusader.h | 37 +- krusader/krusaderapp.h | 1 + krusader/krusaderview.cpp | 94 ++--- krusader/krusaderview.h | 41 +-- krusader/main.cpp | 20 +- krusader/mount.ui | 20 +- krusader/panelmanager.cpp | 68 ++-- krusader/panelmanager.h | 31 +- krusader/paneltabbar.cpp | 68 ++-- krusader/paneltabbar.h | 31 +- krusader/recode.ui | 32 +- tar/ktartest.cpp | 28 +- tar/tar.cc | 70 ++-- tar/tar.h | 10 +- virt/virt.cc | 44 +-- virt/virt.h | 8 +- 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 #include -#include +#include #include #include #include @@ -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 #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -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 (udata) )->device(); + TQIODevice* dev = ( static_cast (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 (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 #include -#include -#include -#include -#include +#include +#include +#include +#include #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 +#include #include /** @@ -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 -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 +#include #include /** @@ -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 -#include +#include +#include /** *@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 #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -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();iurl().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();iurl().path() )+ " " <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 -#include -#include -#include +#include +#include +#include +#include #include #include @@ -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 dirDict; //< the directoris data structure. + TQDict 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 -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -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 -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include #include -#include -#include -#include +#include +#include +#include #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 Useraction. It is only displayed in the Konfigurator and via Shift-F1." ) ); + TQWhatsThis::add( LabelDescription, tr2i18n( "A detailed description of the Useraction. It is only displayed in the Konfigurator and via Shift-F1." ) ); bgAccept->setTitle( tr2i18n( "Command accepts" ) ); radioLocal->setText( tr2i18n( "Local files only (no URL's)" ) ); - QWhatsThis::add( radioLocal, tr2i18n( "Substitute the Placeholders with local filenames." ) ); + TQWhatsThis::add( radioLocal, tr2i18n( "Substitute the Placeholders with local filenames." ) ); radioUrl->setText( tr2i18n( "URL's (remote and local)" ) ); - QWhatsThis::add( radioUrl, tr2i18n( "Substitute the Placeholders with valid URL's." ) ); - QWhatsThis::add( leTitle, tr2i18n( "The title displayed in the Usermenu." ) ); + TQWhatsThis::add( radioUrl, tr2i18n( "Substitute the Placeholders with valid URL's." ) ); + TQWhatsThis::add( leTitle, tr2i18n( "The title displayed in the Usermenu." ) ); LabelTitle->setText( tr2i18n( "Title:" ) ); - QWhatsThis::add( LabelTitle, tr2i18n( "The title displayed in the Usermenu." ) ); - QWhatsThis::add( leDistinctName, tr2i18n( "Unique name of the Useraction. It is only used in the Konfigurator and doesn't appear in any other menu.

Note: The Title shown in the Usermenu can be set below." ) ); - QWhatsThis::add( cbCategory, tr2i18n( "Useractions can be grouped in categories for better distinction. Choose a existing Category or create a new one by entering a name." ) ); + TQWhatsThis::add( LabelTitle, tr2i18n( "The title displayed in the Usermenu." ) ); + TQWhatsThis::add( leDistinctName, tr2i18n( "Unique name of the Useraction. It is only used in the Konfigurator and doesn't appear in any other menu.

Note: The Title shown in the Usermenu can be set below." ) ); + TQWhatsThis::add( cbCategory, tr2i18n( "Useractions can be grouped in categories for better distinction. Choose a existing Category or create a new one by entering a name." ) ); ButtonIcon->setText( tr2i18n( "Icon" ) ); - QWhatsThis::add( ButtonIcon, tr2i18n( "Each Useraction can have its own icon. It will appear in front of the title in the Usermenu." ) ); + TQWhatsThis::add( ButtonIcon, tr2i18n( "Each Useraction can have its own icon. It will appear in front of the title in the Usermenu." ) ); LabelDistinctName->setText( tr2i18n( "Identifier:" ) ); - QWhatsThis::add( LabelDistinctName, tr2i18n( "

Unique name of the Useraction. It is only used in the Konfigurator and doesn't appear in any other menu.

Note: The Title shown in the Usermenu can be set below.

" ) ); + TQWhatsThis::add( LabelDistinctName, tr2i18n( "

Unique name of the Useraction. It is only used in the Konfigurator and doesn't appear in any other menu.

Note: The Title shown in the Usermenu can be set below.

" ) ); LabelCommandline->setText( tr2i18n( "Command:" ) ); - QWhatsThis::add( LabelCommandline, tr2i18n( "

The Command defines the command that will be executed when the Useraction is used. It can be a simple shell command or a complex sequence of multiple commands with Placeholders.

Examples:

  • eject /mnt/cdrom
  • amarok --append %aList(\"Selected\")%
\n" + TQWhatsThis::add( LabelCommandline, tr2i18n( "

The Command defines the command that will be executed when the Useraction is used. It can be a simple shell command or a complex sequence of multiple commands with Placeholders.

Examples:

  • eject /mnt/cdrom
  • amarok --append %aList(\"Selected\")%
\n" "Please consult the handbook to learn more about the syntax.

" ) ); - QWhatsThis::add( leTooltip, tr2i18n( "The Tooltip is shown when the mouse cursor is hold over an entry of the Useraction Toolbar." ) ); - QWhatsThis::add( leStartpath, tr2i18n( "The Workdir defines in which directory the Command will be executed." ) ); + TQWhatsThis::add( leTooltip, tr2i18n( "The Tooltip is shown when the mouse cursor is hold over an entry of the Useraction Toolbar." ) ); + TQWhatsThis::add( leStartpath, tr2i18n( "The Workdir defines in which directory the Command will be executed." ) ); LabelTooltip->setText( tr2i18n( "Tooltip:" ) ); - QWhatsThis::add( LabelTooltip, tr2i18n( "The Tooltip is shown when the mouse cursor is hold over an entry of the Useraction Toolbar." ) ); - leCommandline->setText( QString::null ); - QWhatsThis::add( leCommandline, tr2i18n( "The Command defines the command that will be executed when the Useraction is used. It can be a simple shell command or a complex sequence of multiple commands with Placeholders.

\n" + TQWhatsThis::add( LabelTooltip, tr2i18n( "The Tooltip is shown when the mouse cursor is hold over an entry of the Useraction Toolbar." ) ); + leCommandline->setText( TQString() ); + TQWhatsThis::add( leCommandline, tr2i18n( "The Command defines the command that will be executed when the Useraction is used. It can be a simple shell command or a complex sequence of multiple commands with Placeholders.

\n" "Examples:

  • eject /mnt/cdrom
  • amarok --append %aList(\"Selected\")%
\n" "Please consult the handbook to learn more about the syntax." ) ); LabelCategory->setText( tr2i18n( "Category:" ) ); - QWhatsThis::add( LabelCategory, tr2i18n( "Useractions can be grouped in categories for better distinction. Choose a existing Category or create a new one by entering a name." ) ); + TQWhatsThis::add( LabelCategory, tr2i18n( "Useractions can be grouped in categories for better distinction. Choose a existing Category or create a new one by entering a name." ) ); ButtonAddPlaceholder->setText( tr2i18n( "&Add" ) ); - QWhatsThis::add( ButtonAddPlaceholder, tr2i18n( "Add Placeholders for the selected files in the panel." ) ); - QWhatsThis::add( textDescription, tr2i18n( "A detailed description of the Useraction. It is only displayed in the Konfigurator and via Shift-F1." ) ); + TQWhatsThis::add( ButtonAddPlaceholder, tr2i18n( "Add Placeholders for the selected files in the panel." ) ); + TQWhatsThis::add( textDescription, tr2i18n( "A detailed description of the Useraction. It is only displayed in the Konfigurator and via Shift-F1." ) ); LabelStartpath->setText( tr2i18n( "Workdir:" ) ); - QWhatsThis::add( LabelStartpath, tr2i18n( "The Workdir defines in which directory the Command will be executed." ) ); + TQWhatsThis::add( LabelStartpath, tr2i18n( "The Workdir defines in which directory the Command 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 Useraction only for the values defined here." ) ); + TQWhatsThis::add( lbShowonlyProtocol, tr2i18n( "Show the Useraction only for the values defined here." ) ); tabShowonly->changeTab( TabPage, tr2i18n( "Protocol" ) ); - QWhatsThis::add( lbShowonlyPath, tr2i18n( "Show the Useraction only for the values defined here." ) ); + TQWhatsThis::add( lbShowonlyPath, tr2i18n( "Show the Useraction 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 Useraction only for the values defined here." ) ); + TQWhatsThis::add( lbShowonlyMime, tr2i18n( "Show the Useraction 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 Useraction only for the filenames defined here. The wildcards '?' and '*' can be used." ) ); + TQWhatsThis::add( lbShowonlyFile, tr2i18n( "Show the Useraction only for the filenames defined here. The wildcards '?' and '*' 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 Command before it is executed." ) ); + TQWhatsThis::add( chkConfirmExecution, tr2i18n( "Allows to tweak the Command before it is executed." ) ); chkDifferentUser->setText( tr2i18n( "Run as different user:" ) ); - QWhatsThis::add( chkDifferentUser, tr2i18n( "Execute the Command under a different user-id." ) ); - QWhatsThis::add( leDifferentUser, tr2i18n( "Execute the Command under a different user-id." ) ); + TQWhatsThis::add( chkDifferentUser, tr2i18n( "Execute the Command under a different user-id." ) ); + TQWhatsThis::add( leDifferentUser, tr2i18n( "Execute the Command 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 @@ ActionPropertyBase - + ActionPropertyBase @@ -25,11 +25,11 @@ 0 - + tabWidget3 - + tab @@ -40,7 +40,7 @@ unnamed - + ButtonAddStartpath @@ -48,7 +48,7 @@ ... - + LabelDescription @@ -67,7 +67,7 @@ A detailed description of the <b>Useraction</b>. It is only displayed in the <i>Konfigurator</i> and via <code>Shift-F1</code>. - + bgAccept @@ -86,7 +86,7 @@ unnamed - + radioLocal @@ -100,7 +100,7 @@ Substitute the <b>Placeholders</b> with local filenames. - + radioUrl @@ -121,7 +121,7 @@ The title displayed in the <b>Usermenu</b>. - + LabelTitle @@ -140,17 +140,17 @@ The title displayed in the <b>Usermenu</b>. - + - layout3 + tqlayout3 unnamed - + - layout2 + tqlayout2 @@ -189,13 +189,13 @@ 0 - + 50 50 - + 50 50 @@ -210,7 +210,7 @@ - + LabelDistinctName @@ -229,7 +229,7 @@ <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 @@ -265,7 +265,7 @@ Please consult the handbook to learn more about the syntax.</p> The <i>Workdir</i> defines in which directory the <i>Command</i> will be executed. - + LabelTooltip @@ -297,7 +297,7 @@ Examples:<ul><code><li>eject /mnt/cdrom</li><li>am Please consult the handbook to learn more about the syntax. - + LabelCategory @@ -316,7 +316,7 @@ Please consult the handbook to learn more about the syntax. <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 @@ -328,7 +328,7 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 @@ -352,7 +352,7 @@ Please consult the handbook to learn more about the syntax. A detailed description of the <b>Useraction</b>. It is only displayed in the <i>Konfigurator</i> and via <code>Shift-F1</code>. - + LabelStartpath @@ -381,22 +381,22 @@ Please consult the handbook to learn more about the syntax. Expanding - + 80 19 - + - layout4 + tqlayout4 unnamed - + LabelShortcut @@ -414,7 +414,7 @@ Please consult the handbook to learn more about the syntax. Expanding - + 161 21 @@ -434,7 +434,7 @@ Please consult the handbook to learn more about the syntax. - + bgExecType @@ -453,7 +453,7 @@ Please consult the handbook to learn more about the syntax. unnamed - + radioCollectOutput @@ -464,7 +464,7 @@ Please consult the handbook to learn more about the syntax. Collect the output of the executed program. - + chkSeparateStdError @@ -478,7 +478,7 @@ Please consult the handbook to learn more about the syntax. Separate standard out and standard error in the output collection. - + radioNormal @@ -489,7 +489,7 @@ Please consult the handbook to learn more about the syntax. true - + radioTerminal @@ -504,7 +504,7 @@ Please consult the handbook to learn more about the syntax. - + tab @@ -515,7 +515,7 @@ Please consult the handbook to learn more about the syntax. unnamed - + gbShowonly @@ -534,7 +534,7 @@ Please consult the handbook to learn more about the syntax. unnamed - + tabShowonly @@ -544,7 +544,7 @@ Please consult the handbook to learn more about the syntax. Triangular - + TabPage @@ -555,7 +555,7 @@ Please consult the handbook to learn more about the syntax. unnamed - + ButtonNewProtocol @@ -567,13 +567,13 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 - + 32767 32767 @@ -583,7 +583,7 @@ Please consult the handbook to learn more about the syntax. &New... - + ButtonEditProtocol @@ -595,13 +595,13 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 - + 32767 32767 @@ -621,14 +621,14 @@ Please consult the handbook to learn more about the syntax. Expanding - + 21 58 - + ButtonRemoveProtocol @@ -640,13 +640,13 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 - + 32767 32767 @@ -666,7 +666,7 @@ Please consult the handbook to learn more about the syntax. - + tab @@ -685,7 +685,7 @@ Please consult the handbook to learn more about the syntax. Show the <b>Useraction</b> only for the values defined here. - + ButtonAddPath @@ -697,13 +697,13 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 - + 32767 32767 @@ -713,7 +713,7 @@ Please consult the handbook to learn more about the syntax. &New... - + ButtonEditPath @@ -725,13 +725,13 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 - + 32767 32767 @@ -741,7 +741,7 @@ Please consult the handbook to learn more about the syntax. Chan&ge... - + ButtonRemovePath @@ -753,13 +753,13 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 - + 32767 32767 @@ -779,7 +779,7 @@ Please consult the handbook to learn more about the syntax. Expanding - + 21 61 @@ -788,7 +788,7 @@ Please consult the handbook to learn more about the syntax. - + tab @@ -807,7 +807,7 @@ Please consult the handbook to learn more about the syntax. Show the <b>Useraction</b> only for the values defined here. - + ButtonAddMime @@ -819,13 +819,13 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 - + 32767 32767 @@ -835,7 +835,7 @@ Please consult the handbook to learn more about the syntax. &New... - + ButtonEditMime @@ -847,13 +847,13 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 - + 32767 32767 @@ -863,7 +863,7 @@ Please consult the handbook to learn more about the syntax. Chan&ge... - + ButtonRemoveMime @@ -875,13 +875,13 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 - + 32767 32767 @@ -901,7 +901,7 @@ Please consult the handbook to learn more about the syntax. Expanding - + 21 41 @@ -910,7 +910,7 @@ Please consult the handbook to learn more about the syntax. - + TabPage @@ -929,7 +929,7 @@ Please consult the handbook to learn more about the syntax. Show the <b>Useraction</b> only for the filenames defined here. The wildcards '<code>?</code>' and '<code>*</code>' can be used. - + ButtonNewFile @@ -941,13 +941,13 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 - + 32767 32767 @@ -957,7 +957,7 @@ Please consult the handbook to learn more about the syntax. &New... - + ButtonEditFile @@ -969,13 +969,13 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 - + 32767 32767 @@ -985,7 +985,7 @@ Please consult the handbook to learn more about the syntax. Chan&ge... - + ButtonRemoveFile @@ -997,13 +997,13 @@ Please consult the handbook to learn more about the syntax. 0 - + 0 0 - + 32767 32767 @@ -1023,7 +1023,7 @@ Please consult the handbook to learn more about the syntax. Expanding - + 21 41 @@ -1035,7 +1035,7 @@ Please consult the handbook to learn more about the syntax. - + chkConfirmExecution @@ -1046,7 +1046,7 @@ Please consult the handbook to learn more about the syntax. Allows to tweak the <i>Command</i> before it is executed. - + chkDifferentUser @@ -1078,7 +1078,7 @@ Please consult the handbook to learn more about the syntax. Expanding - + 161 102 @@ -1104,7 +1104,7 @@ Please consult the handbook to learn more about the syntax. setEnabled(bool) - + klineedit.h klineedit.h 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 -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include #include #include @@ -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 ( ¤tPlaceholder->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 #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 ParameterList; + typedef TQValueList 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 #include -#include -#include +#include +#include #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( 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( 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 list = selectedItems(); - QDomDocument doc; +TQDomDocument UserActionListView::dumpSelectedActions( TQDomDocument* mergeDoc ) const { + TQPtrList 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( item ) ) root.appendChild( actionItem->action()->xmlDump( doc ) ); @@ -162,9 +162,9 @@ QDomDocument UserActionListView::dumpSelectedActions( QDomDocument* mergeDoc ) c } void UserActionListView::removeSelectedActions() { - QPtrList list = selectedItems(); + TQPtrList 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( 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( parent() ) ) { + if ( TQListViewItem* item = dynamic_cast( 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 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 -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -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( 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( 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( 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 +#include 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 -#include -#include -#include +#include +#include +#include #include #include #include -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(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 #include #include -#include +#include #include -#include +#include 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(_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 _xr; - QToolButton *_createInBtn; + TQMap _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 #include -#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(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 -#include +#include #include 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& children() { return _children; } + TQPtrList& 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 _children; + TQPtrList _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 +#include #include #include #include #include #include -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 +#include #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 #include -#include +#include #include #include #include #include #include -#include -#include +#include +#include #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 // // 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: 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 ); + if( !_bookmarkIDTable.tqfind( menu ) ) + _bookmarkIDTable.insert( menu, new TQMap ); (*_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 ); + if( !_bookmarkIDTable.tqfind( menu ) ) + _bookmarkIDTable.insert( menu, new TQMap ); (*_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(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(obj)->idAt( static_cast(ev)->pos() ); + if( obj->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) { + int id = static_cast(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 * table = _bookmarkIDTable[ obj ]; + if( _bookmarkIDTable.tqfind( obj ) ) { + TQMap * table = _bookmarkIDTable[ obj ]; if( table && table->count( id ) ) { KrBookmark *bm = (*table)[ id ]; - rightClicked( static_cast(obj), id, bm ); + rightClicked( static_cast(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 -#include +#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include 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 _mainBookmarkPopup; // main bookmark popup menu - QValueList _specialBookmarkIDs; // the ID list of the special bookmarks - QPtrDict > _bookmarkIDTable; // the IDs of the bookmarks + TQGuardedPtr _mainBookmarkPopup; // main bookmark popup menu + TQValueList _specialBookmarkIDs; // the ID list of the special bookmarks + TQPtrDict > _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 -#include -#include -#include +#include +#include +#include #include #include -#include +#include #include #include -#include -#include +#include +#include #include -#include +#include #include #include -#include +#include #include #include "../krservices.h" -#include -#include +#include +#include #include #include 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 tools, r_tools; // normal and recursive tools + TQPtrList 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; ibinary ); 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 cs_textToType; -QMap cs_typeToText; +TQMap cs_textToType; +TQMap 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::Iterator it; + TQMap::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 getTools(bool folders) { - QPtrList result; +static TQPtrList getTools(bool folders) { + TQPtrList 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 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 tools = getTools(containFolders); + TQPtrList tools = getTools(containFolders); if (tools.count() == 0) { // nothing was suggested?! - QString error = i18n("Can't calculate checksum since no supported tool was found. " + TQString error = i18n("Can't calculate checksum since no supported tool was found. " "Please check the Dependencies page in Krusader's settings."); if (containFolders) error += i18n("Note: 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; iinsertItem( 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("There was an error while running %1.").arg(mytool->binary)); + KMessageBox::error(0, i18n("There was an error while running %1.").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 tools = getTools(containFolders); + TQPtrList tools = getTools(containFolders); if (tools.count() == 0) { // nothing was suggested?! - QString error = i18n("Can't verify checksum since no supported tool was found. " + TQString error = i18n("Can't verify checksum since no supported tool was found. " "Please check the Dependencies page in Krusader's settings."); if (containFolders) error += i18n("Note: 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("Error reading checksum file %1.
Please specify a valid checksum file.
").arg(file)); + KMessageBox::error(0, i18n("Error reading checksum file %1.
Please specify a valid checksum file.
").tqarg(file)); return; } @@ -374,7 +374,7 @@ MatchChecksumDlg::MatchChecksumDlg(const QStringList& files, bool containFolders break; } if (!mytool) { - KMessageBox::error(0, i18n("Krusader can't find a checksum tool that handles %1 on your system. Please check the Dependencies page in Krusader's settings.").arg(extension)); + KMessageBox::error(0, i18n("Krusader can't find a checksum tool that handles %1 on your system. Please check the Dependencies page in Krusader's settings.").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("There was an error while running %1.").arg(mytool->binary)); + KMessageBox::error(0, i18n("There was an error while running %1.").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 -#include +#include 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 -#include -#include -#include -#include +#include +#include +#include +#include +#include // KDE includes #include #include @@ -46,21 +46,21 @@ #include #include #include -#include +#include #include -#include +#include // Krusader includes #include "../krusader.h" #include "../resources.h" #include "../VFS/vfs.h" #include "../defaults.h" -#include +#include -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 #include // QT includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /** \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 -#include +#include +#include #include #include #include @@ -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( actionButton(KDialogBase::Ok)->parent() ); - QBoxLayout* buttonBoxLayout = static_cast( buttonBox->layout() ); + TQWidget* buttonBox = TQT_TQWIDGET( actionButton(KDialogBase::Ok)->tqparent() ); + TQBoxLayout* buttonBoxLayout = static_cast( 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( 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("File %1 already exists. Do you really want to overwrite it?").arg(filename), + i18n("File %1 already exists. Do you really want to overwrite it?").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("Can't open %1 for writing!").arg(filename) ); + KMessageBox::error( this, i18n("Can't open %1 for writing!").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 -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include /* - * 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 -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QComboBox; -class QGroupBox; -class QLabel; -class QListBox; -class QListBoxItem; -class QPushButton; +#include +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 -#include -#include -#include +#include +#include +#include +#include #include #include "../krusader.h" #include "klocale.h" #include -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 -#include -#include +#include +#include +#include #include 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 job; + TQGuardedPtr 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 -#include -#include -#include +#include +#include +#include +#include #include #include @@ -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 +#include #include @@ -30,10 +30,11 @@ #include -#include +#include 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; ikey() ) { 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 -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include 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 slices; + TQList 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 -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include #include -#include +#include #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"), - "" + i18n("Already at %1").arg(tx.left(idx)) + "", + "" + i18n("Already at %1").tqarg(tx.left(idx)) + "", *(KCursor::handCursor().bitmap()), this); _dummyDisplayed=true; @@ -308,7 +308,7 @@ void QuickNavLineEdit::mouseMoveEvent( QMouseEvent *m) { _dummyDisplayed=false; _pop = KPassivePopup::message( i18n("Quick Navigation"), - "" + i18n("Click to go to %1").arg(tx.left(idx)) + "", + "" + i18n("Click to go to %1").tqarg(tx.left(idx)) + "", *(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 +#include #include #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 _pop; + TQGuardedPtr _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 #include -#include +#include -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 -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 -#include -#include +#include +#include +#include #include #include #include @@ -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 -#include -#include +#include +#include +#include #include #include #include -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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -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 -#include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QLabel; -class QLineEdit; -class QPushButton; -class QSpinBox; +#include +#include +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 #include "../krusader.h" #include "../defaults.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#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 PackGUI::extraProps; +TQString PackGUI::filename=0; +TQString PackGUI::destination=0; +TQString PackGUI::type=0; +TQMap 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 extraProps; + static TQString filename, destination, type; + static TQMap 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -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 & inMap ) { +bool PackGUIBase::extraProperties( TQMap & inMap ) { inMap.clear(); if( password->isEnabled() && passwordAgain->isEnabled() ) { @@ -405,23 +405,23 @@ bool PackGUIBase::extraProperties( QMap & 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 & 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 -#include -#include +#include +#include -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 & ); + virtual bool extraProperties( TQMap & ); 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 -#include -#include +#include +#include +#include -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 values = sizes(); +TQString PercentalSplitter::toolTipString( int p ) { + TQValueList 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 -#include +#include +#include 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 #include -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include #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 rankList; + TQStringList urlList; + TQValueList 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 rankList = krConfig->readIntListEntry("PopularUrlsRank"); + TQStringList urlList = krConfig->readListEntry("PopularUrls"); + TQValueList 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::Iterator rit; + TQStringList::Iterator uit; + TQValueList::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 +#include #include -#include +#include #include // 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 ranks; // actually holds UrlNode* + TQDict 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 -#include +#include #include #include #include #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #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( newItem ) ); + tqparentStack.push( dynamic_cast( 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 job; + TQGuardedPtr 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 = "
"+ + TQString str = "
" + i18n( "Name:" ) + "" + item->name() + "
"+ ""+ ""; @@ -1038,7 +1038,7 @@ QString DiskUsage::getToolTip( File *item ) ""+ ""+ "
" + i18n( "Name:" ) + "" + item->name() + "
" + i18n( "Type:" ) + "" + mime + "
" + i18n( "Size:" ) + "" + KRpermHandler::parseSize( item->size() ) + "
" + i18n( "Permissions:" ) + "" + item->perm() + "
" + i18n( "Owner:" ) + "" + item->owner() + " - " + item->group() + "
"; - str.replace( " ", " " ); + str.tqreplace( " ", " " ); 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 -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include +#include +#include +#include #define VIEW_LINES 0 #define VIEW_DETAILED 1 #define VIEW_FILELIGHT 2 #define VIEW_LOADER 3 -typedef QDict Properties; +typedef TQDict 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 propertyMap; + TQDict< Directory > contentMap; + TQPtrDict 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 directoryStack; - QPtrStack parentStack; + TQValueStack directoryStack; + TQPtrStack 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 -#include +#include +#include #include -#include +#include -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 -#include -#include +#include +#include +#include #include #include #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 +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -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 -#include +#include +#include #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 +#include #include #include #include -#include +#include #include 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 +#include #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 +#include 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 #include -#include +#include //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, 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::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 -#include -#include -#include -#include +#include +#include +#include +#include #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