summaryrefslogtreecommitdiffstats
path: root/libkonq
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /libkonq
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkonq')
-rw-r--r--libkonq/favicons/favicons.cpp90
-rw-r--r--libkonq/favicons/favicons.h26
-rw-r--r--libkonq/kfileivi.cc136
-rw-r--r--libkonq/kfileivi.h36
-rw-r--r--libkonq/kivdirectoryoverlay.cc22
-rw-r--r--libkonq/kivdirectoryoverlay.h8
-rw-r--r--libkonq/knewmenu.cc166
-rw-r--r--libkonq/knewmenu.h34
-rw-r--r--libkonq/konq_bgnddlg.cc86
-rw-r--r--libkonq/konq_bgnddlg.h28
-rw-r--r--libkonq/konq_dirpart.cc134
-rw-r--r--libkonq/konq_dirpart.h32
-rw-r--r--libkonq/konq_drag.cc102
-rw-r--r--libkonq/konq_drag.h42
-rw-r--r--libkonq/konq_events.h16
-rw-r--r--libkonq/konq_faviconmgr.cc18
-rw-r--r--libkonq/konq_faviconmgr.h10
-rw-r--r--libkonq/konq_filetip.cc96
-rw-r--r--libkonq/konq_filetip.h30
-rw-r--r--libkonq/konq_historycomm.cc10
-rw-r--r--libkonq/konq_historycomm.h34
-rw-r--r--libkonq/konq_historymgr.cc138
-rw-r--r--libkonq/konq_historymgr.h68
-rw-r--r--libkonq/konq_iconviewwidget.cc342
-rw-r--r--libkonq/konq_iconviewwidget.h110
-rw-r--r--libkonq/konq_operations.cc152
-rw-r--r--libkonq/konq_operations.h56
-rw-r--r--libkonq/konq_pixmapprovider.cc48
-rw-r--r--libkonq/konq_pixmapprovider.h18
-rw-r--r--libkonq/konq_popupmenu.cc208
-rw-r--r--libkonq/konq_popupmenu.h38
-rw-r--r--libkonq/konq_propsview.cc60
-rw-r--r--libkonq/konq_propsview.h46
-rw-r--r--libkonq/konq_settings.cc22
-rw-r--r--libkonq/konq_settings.h34
-rw-r--r--libkonq/konq_sound.cc20
-rw-r--r--libkonq/konq_sound.h4
-rw-r--r--libkonq/konq_undo.cc52
-rw-r--r--libkonq/konq_undo.h28
-rw-r--r--libkonq/konq_xmlguiclient.cc36
-rw-r--r--libkonq/konq_xmlguiclient.h20
-rw-r--r--libkonq/konqbookmarkmanager.h2
-rw-r--r--libkonq/libkonq_export.h2
-rw-r--r--libkonq/tests/konqdragtest.cpp6
44 files changed, 1333 insertions, 1333 deletions
diff --git a/libkonq/favicons/favicons.cpp b/libkonq/favicons/favicons.cpp
index 9419b4b03..82b4aeb17 100644
--- a/libkonq/favicons/favicons.cpp
+++ b/libkonq/favicons/favicons.cpp
@@ -20,11 +20,11 @@
#include <string.h>
#include <time.h>
-#include <qbuffer.h>
-#include <qfile.h>
-#include <qcache.h>
-#include <qimage.h>
-#include <qtimer.h>
+#include <tqbuffer.h>
+#include <tqfile.h>
+#include <tqcache.h>
+#include <tqimage.h>
+#include <tqtimer.h>
#include <kdatastream.h> // DO NOT REMOVE, otherwise bool marshalling breaks
#include <kicontheme.h>
@@ -41,20 +41,20 @@ struct FaviconsModulePrivate
struct DownloadInfo
{
- QString hostOrURL;
+ TQString hostOrURL;
bool isHost;
- QByteArray iconData;
+ TQByteArray iconData;
};
- QMap<KIO::Job *, DownloadInfo> downloads;
- QStringList failedDownloads;
+ TQMap<KIO::Job *, DownloadInfo> downloads;
+ TQStringList failedDownloads;
KSimpleConfig *config;
- QPtrList<KIO::Job> killJobs;
+ TQPtrList<KIO::Job> killJobs;
KIO::MetaData metaData;
- QString faviconsDir;
- QCache<QString> faviconsCache;
+ TQString faviconsDir;
+ TQCache<TQString> faviconsCache;
};
-FaviconsModule::FaviconsModule(const QCString &obj)
+FaviconsModule::FaviconsModule(const TQCString &obj)
: KDEDModule(obj)
{
// create our favicons folder so that KIconLoader knows about it
@@ -76,7 +76,7 @@ FaviconsModule::~FaviconsModule()
delete d;
}
-QString removeSlash(QString result)
+TQString removeSlash(TQString result)
{
for (unsigned int i = result.length() - 1; i > 0; --i)
if (result[i] != '/')
@@ -89,15 +89,15 @@ QString removeSlash(QString result)
}
-QString FaviconsModule::iconForURL(const KURL &url)
+TQString FaviconsModule::iconForURL(const KURL &url)
{
if (url.host().isEmpty())
- return QString::null;
+ return TQString::null;
- QString icon;
- QString simplifiedURL = simplifyURL(url);
+ TQString icon;
+ TQString simplifiedURL = simplifyURL(url);
- QString *iconURL = d->faviconsCache.find( removeSlash(simplifiedURL) );
+ TQString *iconURL = d->faviconsCache.find( removeSlash(simplifiedURL) );
if (iconURL)
icon = *iconURL;
else
@@ -110,44 +110,44 @@ QString FaviconsModule::iconForURL(const KURL &url)
icon = "favicons/" + icon;
- if (QFile::exists(d->faviconsDir+icon+".png"))
+ if (TQFile::exists(d->faviconsDir+icon+".png"))
return icon;
- return QString::null;
+ return TQString::null;
}
-QString FaviconsModule::simplifyURL(const KURL &url)
+TQString FaviconsModule::simplifyURL(const KURL &url)
{
// splat any = in the URL so it can be safely used as a config key
- QString result = url.host() + url.path();
+ TQString result = url.host() + url.path();
for (unsigned int i = 0; i < result.length(); ++i)
if (result[i] == '=')
result[i] = '_';
return result;
}
-QString FaviconsModule::iconNameFromURL(const KURL &iconURL)
+TQString FaviconsModule::iconNameFromURL(const KURL &iconURL)
{
if (iconURL.path() == "/favicon.ico")
return iconURL.host();
- QString result = simplifyURL(iconURL);
+ TQString result = simplifyURL(iconURL);
// splat / so it can be safely used as a file name
for (unsigned int i = 0; i < result.length(); ++i)
if (result[i] == '/')
result[i] = '_';
- QString ext = result.right(4);
+ TQString ext = result.right(4);
if (ext == ".ico" || ext == ".png" || ext == ".xpm")
result.remove(result.length() - 4, 4);
return result;
}
-bool FaviconsModule::isIconOld(const QString &icon)
+bool FaviconsModule::isIconOld(const TQString &icon)
{
struct stat st;
- if (stat(QFile::encodeName(icon), &st) != 0)
+ if (stat(TQFile::encodeName(icon), &st) != 0)
return true; // Trigger a new download on error
return (time(0) - st.st_mtime) > 604800; // arbitrary value (one week)
@@ -155,12 +155,12 @@ bool FaviconsModule::isIconOld(const QString &icon)
void FaviconsModule::setIconForURL(const KURL &url, const KURL &iconURL)
{
- QString simplifiedURL = simplifyURL(url);
+ TQString simplifiedURL = simplifyURL(url);
- d->faviconsCache.insert(removeSlash(simplifiedURL), new QString(iconURL.url()) );
+ d->faviconsCache.insert(removeSlash(simplifiedURL), new TQString(iconURL.url()) );
- QString iconName = "favicons/" + iconNameFromURL(iconURL);
- QString iconFile = d->faviconsDir + iconName + ".png";
+ TQString iconName = "favicons/" + iconNameFromURL(iconURL);
+ TQString iconFile = d->faviconsDir + iconName + ".png";
if (!isIconOld(iconFile)) {
emit iconChanged(false, simplifiedURL, iconName);
@@ -172,37 +172,37 @@ void FaviconsModule::setIconForURL(const KURL &url, const KURL &iconURL)
void FaviconsModule::downloadHostIcon(const KURL &url)
{
- QString iconFile = d->faviconsDir + "favicons/" + url.host() + ".png";
+ TQString iconFile = d->faviconsDir + "favicons/" + url.host() + ".png";
if (!isIconOld(iconFile))
return;
startDownload(url.host(), true, KURL(url, "/favicon.ico"));
}
-void FaviconsModule::startDownload(const QString &hostOrURL, bool isHost, const KURL &iconURL)
+void FaviconsModule::startDownload(const TQString &hostOrURL, bool isHost, const KURL &iconURL)
{
if (d->failedDownloads.contains(iconURL.url()))
return;
KIO::Job *job = KIO::get(iconURL, false, false);
job->addMetaData(d->metaData);
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *)));
- connect(job, SIGNAL(infoMessage(KIO::Job *, const QString &)), SLOT(slotInfoMessage(KIO::Job *, const QString &)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(infoMessage(KIO::Job *, const TQString &)), TQT_SLOT(slotInfoMessage(KIO::Job *, const TQString &)));
FaviconsModulePrivate::DownloadInfo download;
download.hostOrURL = hostOrURL;
download.isHost = isHost;
d->downloads.insert(job, download);
}
-void FaviconsModule::slotData(KIO::Job *job, const QByteArray &data)
+void FaviconsModule::slotData(KIO::Job *job, const TQByteArray &data)
{
FaviconsModulePrivate::DownloadInfo &download = d->downloads[job];
unsigned int oldSize = download.iconData.size();
if (oldSize > 0x10000)
{
d->killJobs.append(job);
- QTimer::singleShot(0, this, SLOT(slotKill()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotKill()));
}
download.iconData.resize(oldSize + data.size());
memcpy(download.iconData.data() + oldSize, data.data(), data.size());
@@ -213,12 +213,12 @@ void FaviconsModule::slotResult(KIO::Job *job)
FaviconsModulePrivate::DownloadInfo download = d->downloads[job];
d->downloads.remove(job);
KURL iconURL = static_cast<KIO::TransferJob *>(job)->url();
- QString iconName;
+ TQString iconName;
if (!job->error())
{
- QBuffer buffer(download.iconData);
+ TQBuffer buffer(download.iconData);
buffer.open(IO_ReadOnly);
- QImageIO io;
+ TQImageIO io;
io.setIODevice(&buffer);
io.setParameters("size=16");
// Check here too, the job might have had no error, but the downloaded
@@ -243,7 +243,7 @@ void FaviconsModule::slotResult(KIO::Job *job)
io.setFileName(d->faviconsDir + iconName + ".png");
io.setFormat("PNG");
if (!io.write())
- iconName = QString::null;
+ iconName = TQString::null;
else if (!download.isHost)
d->config->writeEntry( removeSlash(download.hostOrURL), iconURL.url());
}
@@ -254,7 +254,7 @@ void FaviconsModule::slotResult(KIO::Job *job)
emit iconChanged(download.isHost, download.hostOrURL, iconName);
}
-void FaviconsModule::slotInfoMessage(KIO::Job *job, const QString &msg)
+void FaviconsModule::slotInfoMessage(KIO::Job *job, const TQString &msg)
{
emit infoMessage(static_cast<KIO::TransferJob *>( job )->url(), msg);
}
@@ -265,7 +265,7 @@ void FaviconsModule::slotKill()
}
extern "C" {
- KDE_EXPORT KDEDModule *create_favicons(const QCString &obj)
+ KDE_EXPORT KDEDModule *create_favicons(const TQCString &obj)
{
KImageIO::registerFormats();
return new FaviconsModule(obj);
diff --git a/libkonq/favicons/favicons.h b/libkonq/favicons/favicons.h
index 021ea3b9b..1ca337713 100644
--- a/libkonq/favicons/favicons.h
+++ b/libkonq/favicons/favicons.h
@@ -31,7 +31,7 @@ namespace KIO { class Job; }
* place.
*
* After a successful download, the DCOP signal iconChanged() is emitted.
- * It has the signature void iconChanged(bool, QString, QString);
+ * It has the signature void iconChanged(bool, TQString, TQString);
* The first parameter is true if the icon is a "host" icon, that is it is
* the default icon for all URLs on the given host. In this case, the
* second parameter is a host name, otherwise the second parameter is the
@@ -47,20 +47,20 @@ class FaviconsModule : public KDEDModule
Q_OBJECT
K_DCOP
public:
- FaviconsModule(const QCString &obj);
+ FaviconsModule(const TQCString &obj);
virtual ~FaviconsModule();
k_dcop:
/**
* Looks up an icon name for a given URL. This function does not
* initiate any download. If no icon for the URL or its host has
- * been downloaded yet, QString::null is returned.
+ * been downloaded yet, TQString::null is returned.
*
* @param url the URL for which the icon is queried
* @return the icon name suitable to pass to @ref KIconLoader or
- * QString::null if no icon for this URL was found.
+ * TQString::null if no icon for this URL was found.
*/
- QString iconForURL(const KURL &url);
+ TQString iconForURL(const KURL &url);
/**
* Assiciates an icon with the given URL. If the icon was not
* downloaded before or the downloaded was too long ago, a
@@ -81,19 +81,19 @@ k_dcop:
ASYNC downloadHostIcon(const KURL &url);
k_dcop_signals:
- void iconChanged(bool isHost, QString hostOrURL, QString iconName);
- void infoMessage(KURL iconURL, QString msg);
+ void iconChanged(bool isHost, TQString hostOrURL, TQString iconName);
+ void infoMessage(KURL iconURL, TQString msg);
private:
- void startDownload(const QString &, bool, const KURL &);
- QString simplifyURL(const KURL &);
- QString iconNameFromURL(const KURL &);
- bool isIconOld(const QString &);
+ void startDownload(const TQString &, bool, const KURL &);
+ TQString simplifyURL(const KURL &);
+ TQString iconNameFromURL(const KURL &);
+ bool isIconOld(const TQString &);
private slots:
- void slotData(KIO::Job *, const QByteArray &);
+ void slotData(KIO::Job *, const TQByteArray &);
void slotResult(KIO::Job *);
- void slotInfoMessage(KIO::Job *, const QString &);
+ void slotInfoMessage(KIO::Job *, const TQString &);
void slotKill();
private:
diff --git a/libkonq/kfileivi.cc b/libkonq/kfileivi.cc
index 6775f115a..3bc303bae 100644
--- a/libkonq/kfileivi.cc
+++ b/libkonq/kfileivi.cc
@@ -23,7 +23,7 @@
#include "konq_operations.h"
#include "konq_settings.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kurldrag.h>
#include <kiconeffect.h>
@@ -38,14 +38,14 @@
*/
struct KFileIVI::Private
{
- QIconSet icons; // Icon states (cached to prevent re-applying icon effects
+ TQIconSet icons; // Icon states (cached to prevent re-applying icon effects
// every time)
- QPixmap thumb; // Raw unprocessed thumbnail
- QString m_animatedIcon; // Name of animation
+ TQPixmap thumb; // Raw unprocessed thumbnail
+ TQString m_animatedIcon; // Name of animation
bool m_animated; // Animation currently running ?
KIVDirectoryOverlay* m_directoryOverlay;
- QPixmap m_overlay;
- QString m_overlayName;
+ TQPixmap m_overlay;
+ TQString m_overlayName;
};
KFileIVI::KFileIVI( KonqIconViewWidget *iconview, KFileItem* fileitem, int size )
@@ -60,13 +60,13 @@ KFileIVI::KFileIVI( KonqIconViewWidget *iconview, KFileItem* fileitem, int size
setDropEnabled( S_ISDIR( m_fileitem->mode() ) );
// Cache entry for the icon effects
- d->icons.reset( *pixmap(), QIconSet::Large );
+ d->icons.reset( *pixmap(), TQIconSet::Large );
d->m_animated = false;
// iconName() requires the mimetype to be known
if ( fileitem->isMimeTypeKnown() )
{
- QString icon = fileitem->iconName();
+ TQString icon = fileitem->iconName();
if ( !icon.isEmpty() )
setMouseOverAnimation( icon );
else
@@ -83,27 +83,27 @@ KFileIVI::~KFileIVI()
void KFileIVI::invalidateThumb( int state, bool redraw )
{
- QIconSet::Mode mode;
+ TQIconSet::Mode mode;
switch( state )
{
case KIcon::DisabledState:
- mode = QIconSet::Disabled;
+ mode = TQIconSet::Disabled;
break;
case KIcon::ActiveState:
- mode = QIconSet::Active;
+ mode = TQIconSet::Active;
break;
case KIcon::DefaultState:
default:
- mode = QIconSet::Normal;
+ mode = TQIconSet::Normal;
break;
}
- d->icons = QIconSet();
+ d->icons = TQIconSet();
d->icons.setPixmap( KGlobal::iconLoader()->iconEffect()->
apply( d->thumb, KIcon::Desktop, state ),
- QIconSet::Large, mode );
+ TQIconSet::Large, mode );
m_state = state;
- QIconViewItem::setPixmap( d->icons.pixmap( QIconSet::Large, mode ),
+ TQIconViewItem::setPixmap( d->icons.pixmap( TQIconSet::Large, mode ),
false, redraw );
}
@@ -117,7 +117,7 @@ void KFileIVI::setIcon( int size, int state, bool recalc, bool redraw )
m_state = state;
if ( d->m_overlayName.isNull() )
- d->m_overlay = QPixmap();
+ d->m_overlay = TQPixmap();
else {
int halfSize;
if (m_size == 0) {
@@ -131,7 +131,7 @@ void KFileIVI::setIcon( int size, int state, bool recalc, bool redraw )
setPixmapDirect(m_fileitem->pixmap( m_size, m_state ) , recalc, redraw );
}
-void KFileIVI::setOverlay( const QString& iconName )
+void KFileIVI::setOverlay( const TQString& iconName )
{
d->m_overlayName = iconName;
@@ -150,7 +150,7 @@ KIVDirectoryOverlay* KFileIVI::setShowDirectoryOverlay( bool show )
} else {
delete d->m_directoryOverlay;
d->m_directoryOverlay = 0;
- setOverlay(QString());
+ setOverlay(TQString());
return 0;
}
}
@@ -160,31 +160,31 @@ bool KFileIVI::showDirectoryOverlay( )
return (bool)d->m_directoryOverlay;
}
-void KFileIVI::setPixmapDirect( const QPixmap& pixmap, bool recalc, bool redraw )
+void KFileIVI::setPixmapDirect( const TQPixmap& pixmap, bool recalc, bool redraw )
{
- QIconSet::Mode mode;
+ TQIconSet::Mode mode;
switch( m_state )
{
case KIcon::DisabledState:
- mode = QIconSet::Disabled;
+ mode = TQIconSet::Disabled;
break;
case KIcon::ActiveState:
- mode = QIconSet::Active;
+ mode = TQIconSet::Active;
break;
case KIcon::DefaultState:
default:
- mode = QIconSet::Normal;
+ mode = TQIconSet::Normal;
break;
}
// We cannot just reset() the iconset here, because setIcon can be
// called with any state and not just normal state. So we just
// create a dummy empty iconset as base object.
- d->icons = QIconSet();
- d->icons.setPixmap( pixmap, QIconSet::Large, mode );
+ d->icons = TQIconSet();
+ d->icons.setPixmap( pixmap, TQIconSet::Large, mode );
updatePixmapSize();
- QIconViewItem::setPixmap( d->icons.pixmap( QIconSet::Large, mode ),
+ TQIconViewItem::setPixmap( d->icons.pixmap( TQIconSet::Large, mode ),
recalc, redraw );
}
@@ -199,23 +199,23 @@ void KFileIVI::setDisabled( bool disabled )
}
}
-void KFileIVI::setThumbnailPixmap( const QPixmap & pixmap )
+void KFileIVI::setThumbnailPixmap( const TQPixmap & pixmap )
{
m_bThumbnail = true;
d->thumb = pixmap;
- // QIconSet::reset() doesn't seem to clear the other generated pixmaps,
- // so we just create a blank QIconSet here
- d->icons = QIconSet();
+ // TQIconSet::reset() doesn't seem to clear the other generated pixmaps,
+ // so we just create a blank TQIconSet here
+ d->icons = TQIconSet();
d->icons.setPixmap( KGlobal::iconLoader()->iconEffect()->
apply( pixmap, KIcon::Desktop, KIcon::DefaultState ),
- QIconSet::Large, QIconSet::Normal );
+ TQIconSet::Large, TQIconSet::Normal );
m_state = KIcon::DefaultState;
// Recalc when setting this pixmap!
updatePixmapSize();
- QIconViewItem::setPixmap( d->icons.pixmap( QIconSet::Large,
- QIconSet::Normal ), true );
+ TQIconViewItem::setPixmap( d->icons.pixmap( TQIconSet::Large,
+ TQIconSet::Normal ), true );
}
void KFileIVI::setActive( bool active )
@@ -228,18 +228,18 @@ void KFileIVI::setActive( bool active )
void KFileIVI::setEffect( int state )
{
- QIconSet::Mode mode;
+ TQIconSet::Mode mode;
switch( state )
{
case KIcon::DisabledState:
- mode = QIconSet::Disabled;
+ mode = TQIconSet::Disabled;
break;
case KIcon::ActiveState:
- mode = QIconSet::Active;
+ mode = TQIconSet::Active;
break;
case KIcon::DefaultState:
default:
- mode = QIconSet::Normal;
+ mode = TQIconSet::Normal;
break;
}
// Do not update if the fingerprint is identical (prevents flicker)!
@@ -264,17 +264,17 @@ void KFileIVI::setEffect( int state )
// save memory. Do this now when needed
if( m_bThumbnail )
{
- if( d->icons.isGenerated( QIconSet::Large, mode ) )
+ if( d->icons.isGenerated( TQIconSet::Large, mode ) )
d->icons.setPixmap( effect->apply( d->thumb, KIcon::Desktop, state ),
- QIconSet::Large, mode );
+ TQIconSet::Large, mode );
}
else
{
- if( d->icons.isGenerated( QIconSet::Large, mode ) )
+ if( d->icons.isGenerated( TQIconSet::Large, mode ) )
d->icons.setPixmap( m_fileitem->pixmap( m_size, state ),
- QIconSet::Large, mode );
+ TQIconSet::Large, mode );
}
- QIconViewItem::setPixmap( d->icons.pixmap( QIconSet::Large, mode ) );
+ TQIconViewItem::setPixmap( d->icons.pixmap( TQIconSet::Large, mode ) );
}
m_state = state;
}
@@ -287,7 +287,7 @@ void KFileIVI::refreshIcon( bool redraw )
void KFileIVI::invalidateThumbnail()
{
- d->thumb = QPixmap();
+ d->thumb = TQPixmap();
}
bool KFileIVI::isThumbnailInvalid() const
@@ -295,7 +295,7 @@ bool KFileIVI::isThumbnailInvalid() const
return d->thumb.isNull();
}
-bool KFileIVI::acceptDrop( const QMimeSource *mime ) const
+bool KFileIVI::acceptDrop( const TQMimeSource *mime ) const
{
if ( mime->provides( "text/uri-list" ) ) // We're dragging URLs
{
@@ -314,16 +314,16 @@ bool KFileIVI::acceptDrop( const QMimeSource *mime ) const
return true;
}
}
- return QIconViewItem::acceptDrop( mime );
+ return TQIconViewItem::acceptDrop( mime );
}
-void KFileIVI::setKey( const QString &key )
+void KFileIVI::setKey( const TQString &key )
{
- QString theKey = key;
+ TQString theKey = key;
- QVariant sortDirProp = iconView()->property( "sortDirectoriesFirst" );
+ TQVariant sortDirProp = iconView()->property( "sortDirectoriesFirst" );
- bool isdir = ( S_ISDIR( m_fileitem->mode() ) && ( !sortDirProp.isValid() || ( sortDirProp.type() == QVariant::Bool && sortDirProp.toBool() ) ) );
+ bool isdir = ( S_ISDIR( m_fileitem->mode() ) && ( !sortDirProp.isValid() || ( sortDirProp.type() == TQVariant::Bool && sortDirProp.toBool() ) ) );
// The order is: .dir (0), dir (1), .file (2), file (3)
int sortChar = isdir ? 1 : 3;
@@ -333,12 +333,12 @@ void KFileIVI::setKey( const QString &key )
if ( !iconView()->sortDirection() ) // reverse sorting
sortChar = 3 - sortChar;
- theKey.prepend( QChar( sortChar + '0' ) );
+ theKey.prepend( TQChar( sortChar + '0' ) );
- QIconViewItem::setKey( theKey );
+ TQIconViewItem::setKey( theKey );
}
-void KFileIVI::dropped( QDropEvent *e, const QValueList<QIconDragItem> & )
+void KFileIVI::dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & )
{
KonqOperations::doDrop( item(), item()->url(), e, iconView() );
}
@@ -359,16 +359,16 @@ void KFileIVI::returnPressed()
}
-void KFileIVI::paintItem( QPainter *p, const QColorGroup &c )
+void KFileIVI::paintItem( TQPainter *p, const TQColorGroup &c )
{
- QColorGroup cg = updateColors(c);
+ TQColorGroup cg = updateColors(c);
paintFontUpdate( p );
//*** TEMPORARY CODE - MUST BE MADE CONFIGURABLE FIRST - Martijn
// SET UNDERLINE ON HOVER ONLY
/*if ( ( ( KonqIconViewWidget* ) iconView() )->m_pActiveItem == this )
{
- QFont f( p->font() );
+ TQFont f( p->font() );
f.setUnderline( TRUE );
p->setFont( f );
}*/
@@ -378,28 +378,28 @@ void KFileIVI::paintItem( QPainter *p, const QColorGroup &c )
}
-void KFileIVI::paintOverlay( QPainter *p ) const
+void KFileIVI::paintOverlay( TQPainter *p ) const
{
if ( !d->m_overlay.isNull() ) {
- QRect rect = pixmapRect(true);
+ TQRect rect = pixmapRect(true);
p->drawPixmap(x() + rect.x() , y() + pixmapRect().height() - d->m_overlay.height(), d->m_overlay);
}
}
-void KFileIVI::paintFontUpdate( QPainter *p ) const
+void KFileIVI::paintFontUpdate( TQPainter *p ) const
{
if ( m_fileitem->isLink() )
{
- QFont f( p->font() );
+ TQFont f( p->font() );
f.setItalic( TRUE );
p->setFont( f );
}
}
-QColorGroup KFileIVI::updateColors( const QColorGroup &c ) const
+TQColorGroup KFileIVI::updateColors( const TQColorGroup &c ) const
{
- QColorGroup cg( c );
- cg.setColor( QColorGroup::Text, static_cast<KonqIconViewWidget*>(iconView())->itemColor() );
+ TQColorGroup cg( c );
+ cg.setColor( TQColorGroup::Text, static_cast<KonqIconViewWidget*>(iconView())->itemColor() );
return cg;
}
@@ -415,7 +415,7 @@ bool KFileIVI::move( int x, int y )
if ( y > iconView()->viewport()->height() - ( height() + 5 ) )
y = iconView()->viewport()->height() - ( height() + 5 );
}
- return QIconViewItem::move( x, y );
+ return TQIconViewItem::move( x, y );
}
bool KFileIVI::hasAnimation() const
@@ -423,7 +423,7 @@ bool KFileIVI::hasAnimation() const
return !d->m_animatedIcon.isEmpty() && !m_bThumbnail;
}
-void KFileIVI::setMouseOverAnimation( const QString& movieFileName )
+void KFileIVI::setMouseOverAnimation( const TQString& movieFileName )
{
if ( !movieFileName.isEmpty() )
{
@@ -432,7 +432,7 @@ void KFileIVI::setMouseOverAnimation( const QString& movieFileName )
}
}
-QString KFileIVI::mouseOverAnimation() const
+TQString KFileIVI::mouseOverAnimation() const
{
return d->m_animatedIcon;
}
@@ -447,7 +447,7 @@ void KFileIVI::setAnimated( bool a )
d->m_animated = a;
}
-int KFileIVI::compare( QIconViewItem *i ) const
+int KFileIVI::compare( TQIconViewItem *i ) const
{
KonqIconViewWidget* view = static_cast<KonqIconViewWidget*>(iconView());
if ( view->caseInsensitiveSort() )
@@ -465,10 +465,10 @@ void KFileIVI::updatePixmapSize()
if ( view && view->canPreview( item() ) ) {
int previewSize = view->previewIconSize( size );
- setPixmapSize( QSize( previewSize, previewSize ) );
+ setPixmapSize( TQSize( previewSize, previewSize ) );
}
else {
- QSize pixSize = QSize( size, size );
+ TQSize pixSize = TQSize( size, size );
if ( pixSize != pixmapSize() )
setPixmapSize( pixSize );
}
diff --git a/libkonq/kfileivi.h b/libkonq/kfileivi.h
index d1f1d9ab7..6c16907ec 100644
--- a/libkonq/kfileivi.h
+++ b/libkonq/kfileivi.h
@@ -60,9 +60,9 @@ public:
/**
* @return true if dropping on this file is allowed
- * Overloads QIconView::acceptDrop()
+ * Overloads TQIconView::acceptDrop()
*/
- virtual bool acceptDrop( const QMimeSource *mime ) const;
+ virtual bool acceptDrop( const TQMimeSource *mime ) const;
/**
* Changes the icon for this item.
@@ -83,7 +83,7 @@ public:
* @param recalc whether to update the layout of the icon view when setting the icon
* @param redraw whether to redraw the item after setting the icon
*/
- void setPixmapDirect( const QPixmap & pixmap,
+ void setPixmapDirect( const TQPixmap & pixmap,
bool recalc=false,
bool redraw=false);
@@ -125,7 +125,7 @@ public:
/**
* Set this when the thumbnail was loaded
*/
- void setThumbnailPixmap( const QPixmap & pixmap );
+ void setThumbnailPixmap( const TQPixmap & pixmap );
/**
* Set the icon to use the specified KIconEffect
@@ -141,9 +141,9 @@ public:
/**
* Sets an icon to be shown over the bottom left corner of the icon.
* Currently used for directory overlays.
- * setOverlay(QString::null) to remove icon.
+ * setOverlay(TQString::null) to remove icon.
*/
- void setOverlay( const QString & iconName);
+ void setOverlay( const TQString & iconName);
/**
* Redetermines the icon (useful if KFileItem might return another icon).
@@ -151,13 +151,13 @@ public:
*/
virtual void refreshIcon( bool redraw );
- virtual void setKey( const QString &key );
+ virtual void setKey( const TQString &key );
/**
* Paints this item. Takes care of using the normal or alpha
* blending methods depending on the configuration.
*/
- virtual void paintItem( QPainter *p, const QColorGroup &cg );
+ virtual void paintItem( TQPainter *p, const TQColorGroup &cg );
virtual bool move( int x, int y );
@@ -166,13 +166,13 @@ public:
* @param movieFileName the base name for the mng, e.g. "folder".
* Nothing happens if there is no animation available.
*/
- void setMouseOverAnimation( const QString& movieFileName );
- QString mouseOverAnimation() const;
+ void setMouseOverAnimation( const TQString& movieFileName );
+ TQString mouseOverAnimation() const;
/**
* Return true if the icon _might_ have an animation available.
* This doesn't mean the .mng exists (only determined when hovering on the
- * icon - and if it doesn't exist setMouseOverAnimation(QString::null) is called),
+ * icon - and if it doesn't exist setMouseOverAnimation(TQString::null) is called),
* and it doesn't mean that it's currently running either.
*/
bool hasAnimation() const;
@@ -191,31 +191,31 @@ public:
KIVDirectoryOverlay* setShowDirectoryOverlay( bool );
bool showDirectoryOverlay( );
- virtual int compare( QIconViewItem *i ) const;
+ virtual int compare( TQIconViewItem *i ) const;
protected:
- virtual void dropped( QDropEvent *e, const QValueList<QIconDragItem> & );
+ virtual void dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & );
/**
* Contains the logic and code for painting the overlay pixmap.
*/
- void paintOverlay( QPainter *p ) const;
+ void paintOverlay( TQPainter *p ) const;
/**
* Updates the colorgroup.
*/
- QColorGroup updateColors(const QColorGroup &c) const;
+ TQColorGroup updateColors(const TQColorGroup &c) const;
/**
* Contains the logic and code for painting links.
*/
- void paintFontUpdate( QPainter *p ) const;
+ void paintFontUpdate( TQPainter *p ) const;
private:
/** You are not supposed to call this on a KFileIVI, from the outside,
* it bypasses the icons cache */
- virtual void setPixmap ( const QPixmap & icon ) { KIconViewItem::setPixmap( icon ); }
- virtual void setPixmap ( const QPixmap & icon, bool recalc, bool redraw = TRUE )
+ virtual void setPixmap ( const TQPixmap & icon ) { KIconViewItem::setPixmap( icon ); }
+ virtual void setPixmap ( const TQPixmap & icon, bool recalc, bool redraw = TRUE )
{ KIconViewItem::setPixmap( icon, recalc, redraw ); }
/** Check if a thumbnail will be generated and calc the size of the icon */
diff --git a/libkonq/kivdirectoryoverlay.cc b/libkonq/kivdirectoryoverlay.cc
index 5c9d14783..2b32129c2 100644
--- a/libkonq/kivdirectoryoverlay.cc
+++ b/libkonq/kivdirectoryoverlay.cc
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdict.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qimage.h>
+#include <tqdict.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
#include <kfileivi.h>
#include <kfileitem.h>
@@ -43,8 +43,8 @@ KIVDirectoryOverlay::KIVDirectoryOverlay(KFileIVI* directory)
{
m_lister = new KDirLister;
m_lister->setAutoErrorHandlingEnabled(false, 0);
- connect(m_lister, SIGNAL(completed()), SLOT(slotCompleted()));
- connect(m_lister, SIGNAL(newItems( const KFileItemList& )), SLOT(slotNewItems( const KFileItemList& )));
+ connect(m_lister, TQT_SIGNAL(completed()), TQT_SLOT(slotCompleted()));
+ connect(m_lister, TQT_SIGNAL(newItems( const KFileItemList& )), TQT_SLOT(slotNewItems( const KFileItemList& )));
m_lister->setShowingDotFiles(false);
}
m_directory = directory;
@@ -60,7 +60,7 @@ KIVDirectoryOverlay::~KIVDirectoryOverlay()
void KIVDirectoryOverlay::start()
{
if ( m_directory->item()->isReadable() ) {
- m_popularIcons = new QDict<int>;
+ m_popularIcons = new TQDict<int>;
m_popularIcons->setAutoDelete(true);
m_lister->openURL(m_directory->item()->url());
} else {
@@ -68,7 +68,7 @@ void KIVDirectoryOverlay::start()
}
}
-void KIVDirectoryOverlay::timerEvent(QTimerEvent *)
+void KIVDirectoryOverlay::timerEvent(TQTimerEvent *)
{
m_lister->stop();
}
@@ -78,7 +78,7 @@ void KIVDirectoryOverlay::slotCompleted()
if (!m_popularIcons) return;
// Look through the histogram for the most popular mimetype
- QDictIterator<int> currentIcon( (*m_popularIcons) );
+ TQDictIterator<int> currentIcon( (*m_popularIcons) );
unsigned int best = 0;
unsigned int total = 0;
for ( ; currentIcon.current(); ++currentIcon ) {
@@ -120,7 +120,7 @@ void KIVDirectoryOverlay::slotNewItems( const KFileItemList& items )
for ( ; (file = files.current()) != 0; ++files ) {
if ( file -> isFile() ) {
- QString iconName = file -> iconName();
+ TQString iconName = file -> iconName();
if (!iconName) continue;
int* iconCount = m_popularIcons -> find( file -> iconName() );
diff --git a/libkonq/kivdirectoryoverlay.h b/libkonq/kivdirectoryoverlay.h
index 5ebd07959..27fba34d9 100644
--- a/libkonq/kivdirectoryoverlay.h
+++ b/libkonq/kivdirectoryoverlay.h
@@ -23,7 +23,7 @@
#include <kfileitem.h>
#include <libkonq_export.h>
-#include <qdict.h>
+#include <tqdict.h>
class KDirLister;
class KFileIVI;
@@ -40,7 +40,7 @@ signals:
void finished();
protected:
- virtual void timerEvent(QTimerEvent *);
+ virtual void timerEvent(TQTimerEvent *);
private slots:
void slotCompleted();
@@ -50,8 +50,8 @@ private:
KDirLister* m_lister;
bool m_foundItems;
bool m_containsFolder;
- QDict<int>* m_popularIcons;
- QString m_bestIcon;
+ TQDict<int>* m_popularIcons;
+ TQString m_bestIcon;
KFileIVI* m_directory;
};
diff --git a/libkonq/knewmenu.cc b/libkonq/knewmenu.cc
index 168ade6f7..d592a0617 100644
--- a/libkonq/knewmenu.cc
+++ b/libkonq/knewmenu.cc
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <kdesktopfile.h>
@@ -41,14 +41,14 @@
#include <utime.h>
// For KURLDesktopFileDlg
-#include <qlayout.h>
-#include <qhbox.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
#include <klineedit.h>
#include <kurlrequester.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
-QValueList<KNewMenu::Entry> * KNewMenu::s_templatesList = 0L;
+TQValueList<KNewMenu::Entry> * KNewMenu::s_templatesList = 0L;
int KNewMenu::s_templatesVersion = 0;
bool KNewMenu::s_filesParsed = false;
KDirWatch * KNewMenu::s_pDirWatch = 0L;
@@ -58,8 +58,8 @@ class KNewMenu::KNewMenuPrivate
public:
KNewMenuPrivate() : m_parentWidget(0) {}
KActionCollection * m_actionCollection;
- QString m_destPath;
- QWidget *m_parentWidget;
+ TQString m_destPath;
+ TQWidget *m_parentWidget;
KActionMenu *m_menuDev;
};
@@ -75,7 +75,7 @@ KNewMenu::KNewMenu( KActionCollection * _collec, const char *name ) :
makeMenus();
}
-KNewMenu::KNewMenu( KActionCollection * _collec, QWidget *parentWidget, const char *name ) :
+KNewMenu::KNewMenu( KActionCollection * _collec, TQWidget *parentWidget, const char *name ) :
KActionMenu( i18n( "Create New" ), "filenew", _collec, name ),
menuItemsVersion( 0 )
{
@@ -106,15 +106,15 @@ void KNewMenu::slotCheckUpToDate( )
//kdDebug(1203) << "KNewMenu::slotCheckUpToDate() : recreating actions" << endl;
// We need to clean up the action collection
// We look for our actions using the group
- QValueList<KAction*> actions = d->m_actionCollection->actions( "KNewMenu" );
- for( QValueListIterator<KAction*> it = actions.begin(); it != actions.end(); ++it )
+ TQValueList<KAction*> actions = d->m_actionCollection->actions( "KNewMenu" );
+ for( TQValueListIterator<KAction*> it = actions.begin(); it != actions.end(); ++it )
{
remove( *it );
d->m_actionCollection->remove( *it );
}
if (!s_templatesList) { // No templates list up to now
- s_templatesList = new QValueList<Entry>();
+ s_templatesList = new TQValueList<Entry>();
slotFillTemplates();
parseFiles();
}
@@ -134,15 +134,15 @@ void KNewMenu::parseFiles()
{
//kdDebug(1203) << "KNewMenu::parseFiles()" << endl;
s_filesParsed = true;
- QValueList<Entry>::Iterator templ = s_templatesList->begin();
+ TQValueList<Entry>::Iterator templ = s_templatesList->begin();
for ( /*++templ*/; templ != s_templatesList->end(); ++templ)
{
- QString iconname;
- QString filePath = (*templ).filePath;
+ TQString iconname;
+ TQString filePath = (*templ).filePath;
if ( !filePath.isEmpty() )
{
- QString text;
- QString templatePath;
+ TQString text;
+ TQString templatePath;
// If a desktop file, then read the name from it.
// Otherwise (or if no name in it?) use file name
if ( KDesktopFile::isDesktopFile( filePath ) ) {
@@ -151,7 +151,7 @@ void KNewMenu::parseFiles()
text = config.readEntry("Name");
(*templ).icon = config.readEntry("Icon");
(*templ).comment = config.readEntry("Comment");
- QString type = config.readEntry( "Type" );
+ TQString type = config.readEntry( "Type" );
if ( type == "Link" )
{
templatePath = config.readPathEntry("URL");
@@ -162,7 +162,7 @@ void KNewMenu::parseFiles()
else
{
// A relative path, then (that's the default in the files we ship)
- QString linkDir = filePath.left( filePath.findRev( '/' ) + 1 /*keep / */ );
+ TQString linkDir = filePath.left( filePath.findRev( '/' ) + 1 /*keep / */ );
//kdDebug(1203) << "linkDir=" << linkDir << endl;
templatePath = linkDir + templatePath;
}
@@ -207,7 +207,7 @@ void KNewMenu::fillMenu()
KAction *linkURL = 0, *linkApp = 0; // these shall be put at special positions
int i = 1; // was 2 when there was Folder
- QValueList<Entry>::Iterator templ = s_templatesList->begin();
+ TQValueList<Entry>::Iterator templ = s_templatesList->begin();
for ( ; templ != s_templatesList->end(); ++templ, ++i)
{
if ( (*templ).entryType != SEPARATOR )
@@ -220,8 +220,8 @@ void KNewMenu::fillMenu()
bool bSkip = false;
- QValueList<KAction*> actions = d->m_actionCollection->actions();
- QValueListIterator<KAction*> it = actions.begin();
+ TQValueList<KAction*> actions = d->m_actionCollection->actions();
+ TQValueListIterator<KAction*> it = actions.begin();
for( ; it != actions.end() && !bSkip; ++it )
{
if ( (*it)->text() == (*templ).text )
@@ -238,8 +238,8 @@ void KNewMenu::fillMenu()
// The best way to identify the "Create Directory", "Link to Location", "Link to Application" was the template
if ( (*templ).templatePath.endsWith( "emptydir" ) )
{
- KAction * act = new KAction( (*templ).text, (*templ).icon, 0, this, SLOT( slotNewDir() ),
- d->m_actionCollection, QCString().sprintf("newmenu%d", i ) );
+ KAction * act = new KAction( (*templ).text, (*templ).icon, 0, this, TQT_SLOT( slotNewDir() ),
+ d->m_actionCollection, TQCString().sprintf("newmenu%d", i ) );
act->setGroup( "KNewMenu" );
act->plug( popupMenu() );
@@ -248,8 +248,8 @@ void KNewMenu::fillMenu()
}
else
{
- KAction * act = new KAction( (*templ).text, (*templ).icon, 0, this, SLOT( slotNewFile() ),
- d->m_actionCollection, QCString().sprintf("newmenu%d", i ) );
+ KAction * act = new KAction( (*templ).text, (*templ).icon, 0, this, TQT_SLOT( slotNewFile() ),
+ d->m_actionCollection, TQCString().sprintf("newmenu%d", i ) );
act->setGroup( "KNewMenu" );
if ( (*templ).templatePath.endsWith( "URL.desktop" ) )
@@ -296,18 +296,18 @@ void KNewMenu::slotFillTemplates()
if ( ! s_pDirWatch )
{
s_pDirWatch = new KDirWatch;
- QStringList dirs = d->m_actionCollection->instance()->dirs()->resourceDirs("templates");
- for ( QStringList::Iterator it = dirs.begin() ; it != dirs.end() ; ++it )
+ TQStringList dirs = d->m_actionCollection->instance()->dirs()->resourceDirs("templates");
+ for ( TQStringList::Iterator it = dirs.begin() ; it != dirs.end() ; ++it )
{
//kdDebug(1203) << "Templates resource dir: " << *it << endl;
s_pDirWatch->addDir( *it );
}
- connect ( s_pDirWatch, SIGNAL( dirty( const QString & ) ),
- this, SLOT ( slotFillTemplates() ) );
- connect ( s_pDirWatch, SIGNAL( created( const QString & ) ),
- this, SLOT ( slotFillTemplates() ) );
- connect ( s_pDirWatch, SIGNAL( deleted( const QString & ) ),
- this, SLOT ( slotFillTemplates() ) );
+ connect ( s_pDirWatch, TQT_SIGNAL( dirty( const TQString & ) ),
+ this, TQT_SLOT ( slotFillTemplates() ) );
+ connect ( s_pDirWatch, TQT_SIGNAL( created( const TQString & ) ),
+ this, TQT_SLOT ( slotFillTemplates() ) );
+ connect ( s_pDirWatch, TQT_SIGNAL( deleted( const TQString & ) ),
+ this, TQT_SLOT ( slotFillTemplates() ) );
// Ok, this doesn't cope with new dirs in KDEDIRS, but that's another story
}
s_templatesVersion++;
@@ -316,9 +316,9 @@ void KNewMenu::slotFillTemplates()
s_templatesList->clear();
// Look into "templates" dirs.
- QStringList files = d->m_actionCollection->instance()->dirs()->findAllResources("templates");
- KSortableValueList<Entry,QString> slist;
- for ( QStringList::Iterator it = files.begin() ; it != files.end() ; ++it )
+ TQStringList files = d->m_actionCollection->instance()->dirs()->findAllResources("templates");
+ KSortableValueList<Entry,TQString> slist;
+ for ( TQStringList::Iterator it = files.begin() ; it != files.end() ; ++it )
{
//kdDebug(1203) << *it << endl;
if ( (*it)[0] != '.' )
@@ -338,7 +338,7 @@ void KNewMenu::slotFillTemplates()
// tricky solution to ensure that TextFile is at the beginning
// because this filetype is the most used (according kde-core discussion)
- QString key = config.readEntry("Name");
+ TQString key = config.readEntry("Name");
if ( (*it).endsWith( "TextFile.desktop" ) )
key = "1_" + key;
else
@@ -349,7 +349,7 @@ void KNewMenu::slotFillTemplates()
}
}
slist.sort();
- for(KSortableValueList<Entry, QString>::ConstIterator it = slist.begin(); it != slist.end(); ++it)
+ for(KSortableValueList<Entry, TQString>::ConstIterator it = slist.begin(); it != slist.end(); ++it)
{
s_templatesList->append( (*it).value() );
}
@@ -368,26 +368,26 @@ void KNewMenu::slotNewDir()
void KNewMenu::slotNewFile()
{
- int id = QString( sender()->name() + 7 ).toInt(); // skip "newmenu"
+ int id = TQString( sender()->name() + 7 ).toInt(); // skip "newmenu"
if (id == 0)
{
// run the command for the templates
- KRun::runCommand(QString(sender()->name()));
+ KRun::runCommand(TQString(sender()->name()));
return;
}
emit activated(); // for KDIconView::slotNewMenuActivated()
Entry entry = *(s_templatesList->at( id - 1 ));
- //kdDebug(1203) << QString("sFile = %1").arg(sFile) << endl;
+ //kdDebug(1203) << TQString("sFile = %1").arg(sFile) << endl;
- if ( !QFile::exists( entry.templatePath ) ) {
+ if ( !TQFile::exists( entry.templatePath ) ) {
kdWarning(1203) << entry.templatePath << " doesn't exist" << endl;
KMessageBox::sorry( 0L, i18n("<qt>The template file <b>%1</b> does not exist.</qt>").arg(entry.templatePath));
return;
}
m_isURLDesktopFile = false;
- QString name;
+ TQString name;
if ( KDesktopFile::isDesktopFile( entry.templatePath ) )
{
KDesktopFile df( entry.templatePath );
@@ -418,12 +418,12 @@ void KNewMenu::slotNewFile()
//kdDebug(1203) << "first arg=" << entry.templatePath << endl;
//kdDebug(1203) << "second arg=" << (*it).url() << endl;
//kdDebug(1203) << "third arg=" << entry.text << endl;
- QString text = entry.text;
- text.replace( "...", QString::null ); // the ... is fine for the menu item but not for the default filename
+ TQString text = entry.text;
+ text.replace( "...", TQString::null ); // the ... is fine for the menu item but not for the default filename
KURL defaultFile( *it );
defaultFile.addPath( KIO::encodeFileName( text ) );
- if ( defaultFile.isLocalFile() && QFile::exists( defaultFile.path() ) )
+ if ( defaultFile.isLocalFile() && TQFile::exists( defaultFile.path() ) )
text = KIO::RenameDlg::suggestName( *it, text);
KURL templateURL;
@@ -438,15 +438,15 @@ void KNewMenu::slotNewFile()
// The template is not a desktop file
// Show the small dialog for getting the destination filename
bool ok;
- QString text = entry.text;
- text.replace( "...", QString::null ); // the ... is fine for the menu item but not for the default filename
+ TQString text = entry.text;
+ text.replace( "...", TQString::null ); // the ... is fine for the menu item but not for the default filename
KURL defaultFile( *(popupFiles.begin()) );
defaultFile.addPath( KIO::encodeFileName( text ) );
- if ( defaultFile.isLocalFile() && QFile::exists( defaultFile.path() ) )
+ if ( defaultFile.isLocalFile() && TQFile::exists( defaultFile.path() ) )
text = KIO::RenameDlg::suggestName( *(popupFiles.begin()), text);
- name = KInputDialog::getText( QString::null, entry.comment,
+ name = KInputDialog::getText( TQString::null, entry.comment,
text, &ok, d->m_parentWidget );
if ( !ok )
return;
@@ -456,7 +456,7 @@ void KNewMenu::slotNewFile()
// Copy it.
KURL::List::Iterator it = popupFiles.begin();
- QString src = entry.templatePath;
+ TQString src = entry.templatePath;
for ( ; it != popupFiles.end(); ++it )
{
KURL dest( *it );
@@ -468,11 +468,11 @@ void KNewMenu::slotNewFile()
//kdDebug(1203) << "KNewMenu : KIO::copyAs( " << uSrc.url() << ", " << dest.url() << ")" << endl;
KIO::CopyJob * job = KIO::copyAs( uSrc, dest );
job->setDefaultPermissions( true );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
if ( m_isURLDesktopFile )
- connect( job, SIGNAL( renamed( KIO::Job *, const KURL&, const KURL& ) ),
- SLOT( slotRenamed( KIO::Job *, const KURL&, const KURL& ) ) );
+ connect( job, TQT_SIGNAL( renamed( KIO::Job *, const KURL&, const KURL& ) ),
+ TQT_SLOT( slotRenamed( KIO::Job *, const KURL&, const KURL& ) ) );
KURL::List lst;
lst.append( uSrc );
(void)new KonqCommandRecorder( KonqCommand::COPY, lst, dest, job );
@@ -513,7 +513,7 @@ void KNewMenu::slotResult( KIO::Job * job )
else
{
// Normal (local) file. Need to "touch" it, kio_file copied the mtime.
- (void) ::utime( QFile::encodeName( destURL.path() ), 0 );
+ (void) ::utime( TQFile::encodeName( destURL.path() ), 0 );
}
}
}
@@ -521,86 +521,86 @@ void KNewMenu::slotResult( KIO::Job * job )
//////////
-KURLDesktopFileDlg::KURLDesktopFileDlg( const QString& textFileName, const QString& textUrl )
- : KDialogBase( Plain, QString::null, Ok|Cancel|User1, Ok, 0L /*parent*/, 0L, true,
+KURLDesktopFileDlg::KURLDesktopFileDlg( const TQString& textFileName, const TQString& textUrl )
+ : KDialogBase( Plain, TQString::null, Ok|Cancel|User1, Ok, 0L /*parent*/, 0L, true,
true, KStdGuiItem::clear() )
{
- initDialog( textFileName, QString::null, textUrl, QString::null );
+ initDialog( textFileName, TQString::null, textUrl, TQString::null );
}
-KURLDesktopFileDlg::KURLDesktopFileDlg( const QString& textFileName, const QString& textUrl, QWidget *parent )
- : KDialogBase( Plain, QString::null, Ok|Cancel|User1, Ok, parent, 0L, true,
+KURLDesktopFileDlg::KURLDesktopFileDlg( const TQString& textFileName, const TQString& textUrl, TQWidget *parent )
+ : KDialogBase( Plain, TQString::null, Ok|Cancel|User1, Ok, parent, 0L, true,
true, KStdGuiItem::clear() )
{
- initDialog( textFileName, QString::null, textUrl, QString::null );
+ initDialog( textFileName, TQString::null, textUrl, TQString::null );
}
-void KURLDesktopFileDlg::initDialog( const QString& textFileName, const QString& defaultName, const QString& textUrl, const QString& defaultUrl )
+void KURLDesktopFileDlg::initDialog( const TQString& textFileName, const TQString& defaultName, const TQString& textUrl, const TQString& defaultUrl )
{
- QVBoxLayout * topLayout = new QVBoxLayout( plainPage(), 0, spacingHint() );
+ TQVBoxLayout * topLayout = new TQVBoxLayout( plainPage(), 0, spacingHint() );
// First line: filename
- QHBox * fileNameBox = new QHBox( plainPage() );
+ TQHBox * fileNameBox = new TQHBox( plainPage() );
topLayout->addWidget( fileNameBox );
- QLabel * label = new QLabel( textFileName, fileNameBox );
+ TQLabel * label = new TQLabel( textFileName, fileNameBox );
m_leFileName = new KLineEdit( fileNameBox, 0L );
m_leFileName->setMinimumWidth(m_leFileName->sizeHint().width() * 3);
label->setBuddy(m_leFileName); // please "scheck" style
m_leFileName->setText( defaultName );
m_leFileName->setSelection(0, m_leFileName->text().length()); // autoselect
- connect( m_leFileName, SIGNAL(textChanged(const QString&)),
- SLOT(slotNameTextChanged(const QString&)) );
+ connect( m_leFileName, TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotNameTextChanged(const TQString&)) );
// Second line: url
- QHBox * urlBox = new QHBox( plainPage() );
+ TQHBox * urlBox = new TQHBox( plainPage() );
topLayout->addWidget( urlBox );
- label = new QLabel( textUrl, urlBox );
+ label = new TQLabel( textUrl, urlBox );
m_urlRequester = new KURLRequester( defaultUrl, urlBox, "urlRequester" );
m_urlRequester->setMode( KFile::File | KFile::Directory );
m_urlRequester->setMinimumWidth( m_urlRequester->sizeHint().width() * 3 );
- connect( m_urlRequester->lineEdit(), SIGNAL(textChanged(const QString&)),
- SLOT(slotURLTextChanged(const QString&)) );
+ connect( m_urlRequester->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotURLTextChanged(const TQString&)) );
label->setBuddy(m_urlRequester); // please "scheck" style
m_urlRequester->setFocus();
enableButtonOK( !defaultName.isEmpty() && !defaultUrl.isEmpty() );
- connect( this, SIGNAL(user1Clicked()), this, SLOT(slotClear()) );
+ connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotClear()) );
m_fileNameEdited = false;
}
-QString KURLDesktopFileDlg::url() const
+TQString KURLDesktopFileDlg::url() const
{
- if ( result() == QDialog::Accepted )
+ if ( result() == TQDialog::Accepted )
return m_urlRequester->url();
else
- return QString::null;
+ return TQString::null;
}
-QString KURLDesktopFileDlg::fileName() const
+TQString KURLDesktopFileDlg::fileName() const
{
- if ( result() == QDialog::Accepted )
+ if ( result() == TQDialog::Accepted )
return m_leFileName->text();
else
- return QString::null;
+ return TQString::null;
}
void KURLDesktopFileDlg::slotClear()
{
- m_leFileName->setText( QString::null );
+ m_leFileName->setText( TQString::null );
m_urlRequester->clear();
m_fileNameEdited = false;
}
-void KURLDesktopFileDlg::slotNameTextChanged( const QString& )
+void KURLDesktopFileDlg::slotNameTextChanged( const TQString& )
{
kdDebug() << k_funcinfo << endl;
m_fileNameEdited = true;
enableButtonOK( !m_leFileName->text().isEmpty() && !m_urlRequester->url().isEmpty() );
}
-void KURLDesktopFileDlg::slotURLTextChanged( const QString& )
+void KURLDesktopFileDlg::slotURLTextChanged( const TQString& )
{
if ( !m_fileNameEdited )
{
diff --git a/libkonq/knewmenu.h b/libkonq/knewmenu.h
index ecba301e5..9039c2878 100644
--- a/libkonq/knewmenu.h
+++ b/libkonq/knewmenu.h
@@ -20,8 +20,8 @@
#ifndef __knewmenu_h
#define __knewmenu_h
-#include <qintdict.h>
-#include <qstringlist.h>
+#include <tqintdict.h>
+#include <tqstringlist.h>
#include <kaction.h>
#include <kdialogbase.h>
@@ -58,7 +58,7 @@ public:
* Constructor
*/
KNewMenu( KActionCollection * _collec, const char *name=0L );
- KNewMenu( KActionCollection * _collec, QWidget *parentWidget, const char *name=0L );
+ KNewMenu( KActionCollection * _collec, TQWidget *parentWidget, const char *name=0L );
virtual ~KNewMenu();
/**
@@ -128,12 +128,12 @@ private:
enum { LINKTOTEMPLATE = 1, TEMPLATE, SEPARATOR };
struct Entry {
- QString text;
- QString filePath; // empty for SEPARATOR
- QString templatePath; // same as filePath for TEMPLATE
- QString icon;
+ TQString text;
+ TQString filePath; // empty for SEPARATOR
+ TQString templatePath; // same as filePath for TEMPLATE
+ TQString icon;
int entryType;
- QString comment;
+ TQString comment;
};
// NOTE: only filePath is known before we call parseFiles
@@ -141,7 +141,7 @@ private:
* List of all template files. It is important that they are in
* the same order as the 'New' menu.
*/
- static QValueList<Entry> * s_templatesList;
+ static TQValueList<Entry> * s_templatesList;
class KNewMenuPrivate;
KNewMenuPrivate* d;
@@ -171,7 +171,7 @@ private:
* True when a desktop file with Type=URL is being copied
*/
bool m_isURLDesktopFile;
- QString m_linkURL; // the url to put in the file
+ TQString m_linkURL; // the url to put in the file
static KDirWatch * s_pDirWatch;
};
@@ -186,25 +186,25 @@ class KURLDesktopFileDlg : public KDialogBase
{
Q_OBJECT
public:
- KURLDesktopFileDlg( const QString& textFileName, const QString& textUrl );
- KURLDesktopFileDlg( const QString& textFileName, const QString& textUrl, QWidget *parent );
+ KURLDesktopFileDlg( const TQString& textFileName, const TQString& textUrl );
+ KURLDesktopFileDlg( const TQString& textFileName, const TQString& textUrl, TQWidget *parent );
virtual ~KURLDesktopFileDlg() {}
/**
* @return the filename the user entered (no path)
*/
- QString fileName() const;
+ TQString fileName() const;
/**
* @return the URL the user entered
*/
- QString url() const;
+ TQString url() const;
protected slots:
void slotClear();
- void slotNameTextChanged( const QString& );
- void slotURLTextChanged( const QString& );
+ void slotNameTextChanged( const TQString& );
+ void slotURLTextChanged( const TQString& );
private:
- void initDialog( const QString& textFileName, const QString& defaultName, const QString& textUrl, const QString& defaultUrl );
+ void initDialog( const TQString& textFileName, const TQString& defaultName, const TQString& textUrl, const TQString& defaultUrl );
/**
* The line edit widget for the fileName
diff --git a/libkonq/konq_bgnddlg.cc b/libkonq/konq_bgnddlg.cc
index bb871d2fc..ca21c69a3 100644
--- a/libkonq/konq_bgnddlg.cc
+++ b/libkonq/konq_bgnddlg.cc
@@ -18,10 +18,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
#include <kcolorbutton.h>
#include <kcombobox.h>
@@ -35,72 +35,72 @@
#include "konq_bgnddlg.h"
-KonqBgndDialog::KonqBgndDialog( QWidget* parent,
- const QString& pixmapFile,
- const QColor& theColor,
- const QColor& defaultColor )
+KonqBgndDialog::KonqBgndDialog( TQWidget* parent,
+ const TQString& pixmapFile,
+ const TQColor& theColor,
+ const TQColor& defaultColor )
: KDialogBase( parent, "KonqBgndDialog", false,
i18n("Background Settings"), Ok|Cancel, Ok, true )
{
- QWidget* page = new QWidget( this );
+ TQWidget* page = new TQWidget( this );
setMainWidget( page );
- QVBoxLayout* mainLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ TQVBoxLayout* mainLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
- m_buttonGroup = new QButtonGroup( i18n("Background"), page );
+ m_buttonGroup = new TQButtonGroup( i18n("Background"), page );
m_buttonGroup->setColumnLayout( 0, Qt::Vertical );
m_buttonGroup->layout()->setMargin( KDialog::marginHint() );
m_buttonGroup->layout()->setSpacing( KDialog::spacingHint() );
- QGridLayout* groupLayout = new QGridLayout( m_buttonGroup->layout() );
+ TQGridLayout* groupLayout = new TQGridLayout( m_buttonGroup->layout() );
groupLayout->setAlignment( Qt::AlignTop );
mainLayout->addWidget( m_buttonGroup );
- connect( m_buttonGroup, SIGNAL( clicked(int) ),
- this, SLOT( slotBackgroundModeChanged() ) );
+ connect( m_buttonGroup, TQT_SIGNAL( clicked(int) ),
+ this, TQT_SLOT( slotBackgroundModeChanged() ) );
// color
- m_radioColor = new QRadioButton( i18n("Co&lor:"), m_buttonGroup );
+ m_radioColor = new TQRadioButton( i18n("Co&lor:"), m_buttonGroup );
groupLayout->addWidget( m_radioColor, 0, 0 );
m_buttonColor = new KColorButton( theColor, defaultColor, m_buttonGroup );
- m_buttonColor->setSizePolicy( QSizePolicy::Preferred,
- QSizePolicy::Minimum );
+ m_buttonColor->setSizePolicy( TQSizePolicy::Preferred,
+ TQSizePolicy::Minimum );
groupLayout->addWidget( m_buttonColor, 0, 1 );
- connect( m_buttonColor, SIGNAL( changed( const QColor& ) ),
- this, SLOT( slotColorChanged() ) );
+ connect( m_buttonColor, TQT_SIGNAL( changed( const TQColor& ) ),
+ this, TQT_SLOT( slotColorChanged() ) );
// picture
- m_radioPicture = new QRadioButton( i18n("&Picture:"), m_buttonGroup );
+ m_radioPicture = new TQRadioButton( i18n("&Picture:"), m_buttonGroup );
groupLayout->addWidget( m_radioPicture, 1, 0 );
m_comboPicture = new KURLComboRequester( m_buttonGroup );
groupLayout->addMultiCellWidget( m_comboPicture, 1, 1, 1, 2 );
initPictures();
- connect( m_comboPicture->comboBox(), SIGNAL( activated( int ) ),
- this, SLOT( slotPictureChanged() ) );
- connect( m_comboPicture, SIGNAL( urlSelected(const QString &) ),
- this, SLOT( slotPictureChanged() ) );
+ connect( m_comboPicture->comboBox(), TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotPictureChanged() ) );
+ connect( m_comboPicture, TQT_SIGNAL( urlSelected(const TQString &) ),
+ this, TQT_SLOT( slotPictureChanged() ) );
- QSpacerItem* spacer1 = new QSpacerItem( 0, 0, QSizePolicy::Expanding,
- QSizePolicy::Minimum );
+ TQSpacerItem* spacer1 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum );
groupLayout->addItem( spacer1, 0, 2 );
// preview title
- QHBoxLayout* hlay = new QHBoxLayout( mainLayout, KDialog::spacingHint() );
+ TQHBoxLayout* hlay = new TQHBoxLayout( mainLayout, KDialog::spacingHint() );
//mainLayout->addLayout( hlay );
- QLabel* lbl = new QLabel( i18n("Preview"), page );
+ TQLabel* lbl = new TQLabel( i18n("Preview"), page );
hlay->addWidget( lbl );
- QFrame* frame = new QFrame( page );
- frame->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum );
- frame->setFrameShape( QFrame::HLine );
- frame->setFrameShadow( QFrame::Sunken );
+ TQFrame* frame = new TQFrame( page );
+ frame->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ frame->setFrameShape( TQFrame::HLine );
+ frame->setFrameShadow( TQFrame::Sunken );
hlay->addWidget( frame );
// preview frame
- m_preview = new QFrame( page );
- m_preview->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+ m_preview = new TQFrame( page );
+ m_preview->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
m_preview->setMinimumSize( 370, 180 );
- m_preview->setFrameShape( QFrame::Panel );
- m_preview->setFrameShadow( QFrame::Raised );
+ m_preview->setFrameShape( TQFrame::Panel );
+ m_preview->setFrameShadow( TQFrame::Raised );
mainLayout->addWidget( m_preview );
if ( !pixmapFile.isEmpty() ) {
@@ -120,12 +120,12 @@ KonqBgndDialog::~KonqBgndDialog()
{
}
-QColor KonqBgndDialog::color() const
+TQColor KonqBgndDialog::color() const
{
if ( m_radioColor->isChecked() )
return m_buttonColor->color();
- return QColor();
+ return TQColor();
}
void KonqBgndDialog::initPictures()
@@ -134,12 +134,12 @@ void KonqBgndDialog::initPictures()
KGlobal::dirs()->kde_default("data") + "konqueror/tiles/");
kdDebug(1203) << KGlobal::dirs()->kde_default("data") + "konqueror/tiles/" << endl;
- QStringList list = KGlobal::dirs()->findAllResources("tiles");
+ TQStringList list = KGlobal::dirs()->findAllResources("tiles");
if ( list.isEmpty() )
m_comboPicture->comboBox()->insertItem( i18n("None") );
else {
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = list.begin(); it != list.end(); it++ )
m_comboPicture->comboBox()->insertItem(
( (*it).at(0) == '/' ) ? // if absolute path
@@ -148,7 +148,7 @@ void KonqBgndDialog::initPictures()
}
}
-void KonqBgndDialog::loadPicture( const QString& fileName )
+void KonqBgndDialog::loadPicture( const TQString& fileName )
{
int i ;
for ( i = 0; i < m_comboPicture->comboBox()->count(); i++ ) {
@@ -169,13 +169,13 @@ void KonqBgndDialog::loadPicture( const QString& fileName )
void KonqBgndDialog::slotPictureChanged()
{
m_pixmapFile = m_comboPicture->comboBox()->currentText();
- QString file = locate( "tiles", m_pixmapFile );
+ TQString file = locate( "tiles", m_pixmapFile );
if ( file.isEmpty() )
file = locate("wallpaper", m_pixmapFile); // add fallback for compatibility
if ( file.isEmpty() ) {
kdWarning(1203) << "Couldn't locate wallpaper " << m_pixmapFile << endl;
m_preview->unsetPalette();
- m_pixmap = QPixmap();
+ m_pixmap = TQPixmap();
m_pixmapFile = "";
}
else {
diff --git a/libkonq/konq_bgnddlg.h b/libkonq/konq_bgnddlg.h
index 3a1e3c67d..b5366f863 100644
--- a/libkonq/konq_bgnddlg.h
+++ b/libkonq/konq_bgnddlg.h
@@ -21,8 +21,8 @@
#ifndef __konq_bgnd_h
#define __konq_bgnd_h
-#include <qstring.h>
-#include <qpixmap.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
#include <kdialogbase.h>
@@ -42,12 +42,12 @@ public:
/**
* Constructor
*/
- KonqBgndDialog( QWidget* parent, const QString& pixmapFile,
- const QColor& theColor, const QColor& defaultColor );
+ KonqBgndDialog( TQWidget* parent, const TQString& pixmapFile,
+ const TQColor& theColor, const TQColor& defaultColor );
~KonqBgndDialog();
- QColor color() const;
- const QString& pixmapFile() const { return m_pixmapFile; }
+ TQColor color() const;
+ const TQString& pixmapFile() const { return m_pixmapFile; }
private slots:
void slotBackgroundModeChanged();
@@ -56,16 +56,16 @@ private slots:
private:
void initPictures();
- void loadPicture( const QString& fileName );
+ void loadPicture( const TQString& fileName );
- QColor m_color;
- QPixmap m_pixmap;
- QString m_pixmapFile;
- QFrame* m_preview;
+ TQColor m_color;
+ TQPixmap m_pixmap;
+ TQString m_pixmapFile;
+ TQFrame* m_preview;
- QButtonGroup* m_buttonGroup;
- QRadioButton* m_radioColor;
- QRadioButton* m_radioPicture;
+ TQButtonGroup* m_buttonGroup;
+ TQRadioButton* m_radioColor;
+ TQRadioButton* m_radioPicture;
KURLRequester* m_comboPicture;
KColorButton* m_buttonColor;
diff --git a/libkonq/konq_dirpart.cc b/libkonq/konq_dirpart.cc
index 0e46ec0c9..d64dde7ef 100644
--- a/libkonq/konq_dirpart.cc
+++ b/libkonq/konq_dirpart.cc
@@ -38,21 +38,21 @@
#include <kurifilter.h>
#include <kglobalsettings.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qguardedptr.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqguardedptr.h>
#include <assert.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
class KonqDirPart::KonqDirPartPrivate
{
public:
KonqDirPartPrivate() : dirLister( 0 ) {}
- QStringList mimeFilters;
+ TQStringList mimeFilters;
KToggleAction *aEnormousIcons;
KToggleAction *aSmallMediumIcons;
- QValueVector<int> iconSize;
+ TQValueVector<int> iconSize;
KDirLister* dirLister;
bool dirSizeDirty;
@@ -67,13 +67,13 @@ void KonqDirPart::KonqDirPartPrivate::findAvailableIconSizes(void)
KIconTheme *root = KGlobal::instance()->iconLoader()->theme();
iconSize.resize(1);
if (root) {
- QValueList<int> avSizes = root->querySizes(KIcon::Desktop);
+ TQValueList<int> avSizes = root->querySizes(KIcon::Desktop);
kdDebug(1203) << "The icon theme handles the sizes:" << avSizes << endl;
qHeapSort(avSizes);
int oldSize = -1;
if (avSizes.count() < 10) {
// Fixed or threshold type icons
- QValueListConstIterator<int> i;
+ TQValueListConstIterator<int> i;
for (i = avSizes.begin(); i != avSizes.end(); i++) {
// Skip duplicated values (sanity check)
if (*i != oldSize) iconSize.append(*i);
@@ -83,7 +83,7 @@ void KonqDirPart::KonqDirPartPrivate::findAvailableIconSizes(void)
// Scalable icons.
const int progression[] = {16, 22, 32, 48, 64, 96, 128, 192, 256};
- QValueListConstIterator<int> j = avSizes.begin();
+ TQValueListConstIterator<int> j = avSizes.begin();
for (uint i = 0; i < 9; i++) {
while (j++ != avSizes.end()) {
if (*j >= progression[i]) {
@@ -124,7 +124,7 @@ int KonqDirPart::KonqDirPartPrivate::nearestIconSizeError(int size)
return QABS(size - findNearestIconSize(size));
}
-KonqDirPart::KonqDirPart( QObject *parent, const char *name )
+KonqDirPart::KonqDirPart( TQObject *parent, const char *name )
:KParts::ReadOnlyPart( parent, name ),
m_pProps( 0L ),
m_findPart( 0L )
@@ -133,12 +133,12 @@ KonqDirPart::KonqDirPart( QObject *parent, const char *name )
resetCount();
//m_bMultipleItemsSelected = false;
- connect( QApplication::clipboard(), SIGNAL(dataChanged()), this, SLOT(slotClipboardDataChanged()) );
+ connect( TQApplication::clipboard(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotClipboardDataChanged()) );
actionCollection()->setHighlightingEnabled( true );
- m_paIncIconSize = new KAction( i18n( "Enlarge Icons" ), "viewmag+", 0, this, SLOT( slotIncIconSize() ), actionCollection(), "incIconSize" );
- m_paDecIconSize = new KAction( i18n( "Shrink Icons" ), "viewmag-", 0, this, SLOT( slotDecIconSize() ), actionCollection(), "decIconSize" );
+ m_paIncIconSize = new KAction( i18n( "Enlarge Icons" ), "viewmag+", 0, this, TQT_SLOT( slotIncIconSize() ), actionCollection(), "incIconSize" );
+ m_paDecIconSize = new KAction( i18n( "Shrink Icons" ), "viewmag-", 0, this, TQT_SLOT( slotDecIconSize() ), actionCollection(), "decIconSize" );
m_paDefaultIcons = new KRadioAction( i18n( "&Default Size" ), 0, actionCollection(), "modedefault" );
d->aEnormousIcons = new KRadioAction( i18n( "&Huge" ), 0,
@@ -158,17 +158,17 @@ KonqDirPart::KonqDirPart( QObject *parent, const char *name )
d->aSmallMediumIcons->setExclusiveGroup( "ViewMode" );
m_paSmallIcons->setExclusiveGroup( "ViewMode" );
- connect( m_paDefaultIcons, SIGNAL( toggled( bool ) ), this, SLOT( slotIconSizeToggled( bool ) ) );
- connect( d->aEnormousIcons, SIGNAL( toggled( bool ) ),
- this, SLOT( slotIconSizeToggled( bool ) ) );
- connect( m_paHugeIcons, SIGNAL( toggled( bool ) ), this, SLOT( slotIconSizeToggled( bool ) ) );
- connect( m_paLargeIcons, SIGNAL( toggled( bool ) ), this, SLOT( slotIconSizeToggled( bool ) ) );
- connect( m_paMediumIcons, SIGNAL( toggled( bool ) ), this, SLOT( slotIconSizeToggled( bool ) ) );
- connect( d->aSmallMediumIcons, SIGNAL( toggled( bool ) ),
- this, SLOT( slotIconSizeToggled( bool ) ) );
- connect( m_paSmallIcons, SIGNAL( toggled( bool ) ), this, SLOT( slotIconSizeToggled( bool ) ) );
-
- connect( kapp, SIGNAL(iconChanged(int)), SLOT(slotIconChanged(int)) );
+ connect( m_paDefaultIcons, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIconSizeToggled( bool ) ) );
+ connect( d->aEnormousIcons, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotIconSizeToggled( bool ) ) );
+ connect( m_paHugeIcons, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIconSizeToggled( bool ) ) );
+ connect( m_paLargeIcons, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIconSizeToggled( bool ) ) );
+ connect( m_paMediumIcons, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIconSizeToggled( bool ) ) );
+ connect( d->aSmallMediumIcons, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotIconSizeToggled( bool ) ) );
+ connect( m_paSmallIcons, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIconSizeToggled( bool ) ) );
+
+ connect( kapp, TQT_SIGNAL(iconChanged(int)), TQT_SLOT(slotIconChanged(int)) );
#if 0
// Extract 6 icon sizes from the icon theme.
// Use 16,22,32,48,64,128 as default.
@@ -186,13 +186,13 @@ KonqDirPart::KonqDirPart( QObject *parent, const char *name )
KIconTheme *root = KGlobal::instance()->iconLoader()->theme();
if (root)
{
- QValueList<int> avSizes = root->querySizes(KIcon::Desktop);
+ TQValueList<int> avSizes = root->querySizes(KIcon::Desktop);
kdDebug(1203) << "the icon theme handles the following sizes:" << avSizes << endl;
if (avSizes.count() < 10) {
// Use the icon sizes supplied by the theme.
// If avSizes contains more than 10 entries, assume a scalable
// icon theme.
- QValueList<int>::Iterator it;
+ TQValueList<int>::Iterator it;
for (i=1, it=avSizes.begin(); (it!=avSizes.end()) && (i<7); it++, i++)
{
d->iconSize[i] = *it;
@@ -219,7 +219,7 @@ KonqDirPart::KonqDirPart( QObject *parent, const char *name )
m_iIconSize[4] = KIcon::SizeHuge;
// ... up to here
- KAction *a = new KAction( i18n( "Configure Background..." ), "background", 0, this, SLOT( slotBackgroundSettings() ),
+ KAction *a = new KAction( i18n( "Configure Background..." ), "background", 0, this, TQT_SLOT( slotBackgroundSettings() ),
actionCollection(), "bgsettings" );
a->setToolTip( i18n( "Allows choosing of background settings for this view" ) );
@@ -254,9 +254,9 @@ void KonqDirPart::adjustIconSizes()
}
}
-void KonqDirPart::setMimeFilter (const QStringList& mime)
+void KonqDirPart::setMimeFilter (const TQStringList& mime)
{
- QString u = url().url();
+ TQString u = url().url();
if ( u.isEmpty () )
return;
@@ -267,23 +267,23 @@ void KonqDirPart::setMimeFilter (const QStringList& mime)
d->mimeFilters = mime;
}
-QStringList KonqDirPart::mimeFilter() const
+TQStringList KonqDirPart::mimeFilter() const
{
return d->mimeFilters;
}
-QScrollView * KonqDirPart::scrollWidget()
+TQScrollView * KonqDirPart::scrollWidget()
{
- return static_cast<QScrollView *>(widget());
+ return static_cast<TQScrollView *>(widget());
}
void KonqDirPart::slotBackgroundSettings()
{
- QColor bgndColor = m_pProps->bgColor( widget() );
- QColor defaultColor = KGlobalSettings::baseColor();
+ TQColor bgndColor = m_pProps->bgColor( widget() );
+ TQColor defaultColor = KGlobalSettings::baseColor();
// dlg must be created on the heap as widget() can get deleted while dlg.exec(),
// trying to delete dlg as its child then (#124210) - Frank Osterfeld
- QGuardedPtr<KonqBgndDialog> dlg = new KonqBgndDialog( widget(),
+ TQGuardedPtr<KonqBgndDialog> dlg = new KonqBgndDialog( widget(),
m_pProps->bgPixmapFile(),
bgndColor,
defaultColor );
@@ -313,7 +313,7 @@ void KonqDirPart::lmbClicked( KFileItem * fileItem )
if ( !fileItem->isReadable() )
{
// No permissions or local file that doesn't exist - need to find out which
- if ( ( !fileItem->isLocalFile() ) || QFile::exists( url.path() ) )
+ if ( ( !fileItem->isLocalFile() ) || TQFile::exists( url.path() ) )
{
KMessageBox::error( widget(), i18n("<p>You do not have enough permissions to read <b>%1</b></p>").arg(url.prettyURL()) );
return;
@@ -369,17 +369,17 @@ void KonqDirPart::mmbClicked( KFileItem * fileItem )
}
}
-void KonqDirPart::saveState( QDataStream& stream )
+void KonqDirPart::saveState( TQDataStream& stream )
{
stream << m_nameFilter;
}
-void KonqDirPart::restoreState( QDataStream& stream )
+void KonqDirPart::restoreState( TQDataStream& stream )
{
stream >> m_nameFilter;
}
-void KonqDirPart::saveFindState( QDataStream& stream )
+void KonqDirPart::saveFindState( TQDataStream& stream )
{
// assert only doable in KDE4.
//assert( m_findPart ); // test done by caller.
@@ -397,7 +397,7 @@ void KonqDirPart::saveFindState( QDataStream& stream )
ext->saveState( stream );
}
-void KonqDirPart::restoreFindState( QDataStream& stream )
+void KonqDirPart::restoreFindState( TQDataStream& stream )
{
// Restore our own URL
stream >> m_url;
@@ -418,7 +418,7 @@ void KonqDirPart::slotClipboardDataChanged()
// This is very related to KDIconView::slotClipboardDataChanged
KURL::List lst;
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::clipboard()->data();
if ( data->provides( "application/x-kde-cutselection" ) && data->provides( "text/uri-list" ) )
if ( KonqDrag::decodeIsCutSelection( data ) )
(void) KURLDrag::decode( data, lst );
@@ -430,7 +430,7 @@ void KonqDirPart::slotClipboardDataChanged()
void KonqDirPart::updatePasteAction() // KDE4: merge into method above
{
- QString actionText = KIO::pasteActionText();
+ TQString actionText = KIO::pasteActionText();
bool paste = !actionText.isEmpty();
if ( paste )
emit m_extension->setActionText( "paste", actionText );
@@ -475,7 +475,7 @@ void KonqDirPart::emitTotalCount()
d->dirSizeDirty = false;
}
- QString summary =
+ TQString summary =
KIO::itemsSummaryString(m_lFileCount + m_lDirCount,
m_lFileCount,
m_lDirCount,
@@ -484,7 +484,7 @@ void KonqDirPart::emitTotalCount()
bool bShowsResult = false;
if (m_findPart)
{
- QVariant prop = m_findPart->property( "showsResult" );
+ TQVariant prop = m_findPart->property( "showsResult" );
bShowsResult = prop.isValid() && prop.toBool();
}
//kdDebug(1203) << "KonqDirPart::emitTotalCount bShowsResult=" << bShowsResult << endl;
@@ -527,7 +527,7 @@ void KonqDirPart::emitCounts( const KFileItemList & lst, bool selectionChanged )
emitCounts( lst );
// Yes, the caller could do that too :)
- // But this bool could also be used to cache the QString for the last
+ // But this bool could also be used to cache the TQString for the last
// selection, as long as selectionChanged is false.
// Not sure it's worth it though.
// MiB: no, I don't think it's worth it. Especially regarding the
@@ -650,25 +650,25 @@ void KonqDirPart::setFindPart( KParts::ReadOnlyPart * part )
{
assert(part);
m_findPart = part;
- connect( m_findPart, SIGNAL( started() ),
- this, SLOT( slotStarted() ) );
- connect( m_findPart, SIGNAL( started() ),
- this, SLOT( slotStartAnimationSearching() ) );
- connect( m_findPart, SIGNAL( clear() ),
- this, SLOT( slotClear() ) );
- connect( m_findPart, SIGNAL( newItems( const KFileItemList & ) ),
- this, SLOT( slotNewItems( const KFileItemList & ) ) );
- connect( m_findPart, SIGNAL( finished() ), // can't name it completed, it conflicts with a KROP signal
- this, SLOT( slotCompleted() ) );
- connect( m_findPart, SIGNAL( finished() ),
- this, SLOT( slotStopAnimationSearching() ) );
- connect( m_findPart, SIGNAL( canceled() ),
- this, SLOT( slotCanceled() ) );
- connect( m_findPart, SIGNAL( canceled() ),
- this, SLOT( slotStopAnimationSearching() ) );
-
- connect( m_findPart, SIGNAL( findClosed() ),
- this, SLOT( slotFindClosed() ) );
+ connect( m_findPart, TQT_SIGNAL( started() ),
+ this, TQT_SLOT( slotStarted() ) );
+ connect( m_findPart, TQT_SIGNAL( started() ),
+ this, TQT_SLOT( slotStartAnimationSearching() ) );
+ connect( m_findPart, TQT_SIGNAL( clear() ),
+ this, TQT_SLOT( slotClear() ) );
+ connect( m_findPart, TQT_SIGNAL( newItems( const KFileItemList & ) ),
+ this, TQT_SLOT( slotNewItems( const KFileItemList & ) ) );
+ connect( m_findPart, TQT_SIGNAL( finished() ), // can't name it completed, it conflicts with a KROP signal
+ this, TQT_SLOT( slotCompleted() ) );
+ connect( m_findPart, TQT_SIGNAL( finished() ),
+ this, TQT_SLOT( slotStopAnimationSearching() ) );
+ connect( m_findPart, TQT_SIGNAL( canceled() ),
+ this, TQT_SLOT( slotCanceled() ) );
+ connect( m_findPart, TQT_SIGNAL( canceled() ),
+ this, TQT_SLOT( slotStopAnimationSearching() ) );
+
+ connect( m_findPart, TQT_SIGNAL( findClosed() ),
+ this, TQT_SLOT( slotFindClosed() ) );
emit findOpened( this );
@@ -702,7 +702,7 @@ void KonqDirPart::slotStopAnimationSearching()
completed();
}
-void KonqDirPartBrowserExtension::saveState( QDataStream &stream )
+void KonqDirPartBrowserExtension::saveState( TQDataStream &stream )
{
m_dirPart->saveState( stream );
bool hasFindPart = m_dirPart->findPart();
@@ -715,7 +715,7 @@ void KonqDirPartBrowserExtension::saveState( QDataStream &stream )
}
}
-void KonqDirPartBrowserExtension::restoreState( QDataStream &stream )
+void KonqDirPartBrowserExtension::restoreState( TQDataStream &stream )
{
m_dirPart->restoreState( stream );
bool hasFindPart;
diff --git a/libkonq/konq_dirpart.h b/libkonq/konq_dirpart.h
index df76e93bd..0b890e240 100644
--- a/libkonq/konq_dirpart.h
+++ b/libkonq/konq_dirpart.h
@@ -20,7 +20,7 @@
#ifndef __konqdirpart_h
#define __konqdirpart_h
-#include <qstring.h>
+#include <tqstring.h>
#include <kparts/part.h>
#include <kparts/browserextension.h>
#include <kfileitem.h>
@@ -43,7 +43,7 @@ class LIBKONQ_EXPORT KonqDirPart: public KParts::ReadOnlyPart
friend class KonqDirPartBrowserExtension;
public:
- KonqDirPart( QObject *parent, const char *name );
+ KonqDirPart( TQObject *parent, const char *name );
virtual ~KonqDirPart();
@@ -62,10 +62,10 @@ public:
void setDirLister( KDirLister* lister );
// TODO KDE4 create the KDirLister here and simplify the parts?
- QScrollView * scrollWidget();
+ TQScrollView * scrollWidget();
- virtual void saveState( QDataStream &stream );
- virtual void restoreState( QDataStream &stream );
+ virtual void saveState( TQDataStream &stream );
+ virtual void restoreState( TQDataStream &stream );
/** Called when LMB'ing an item in a directory view.
* @param fileItem must be set
@@ -76,11 +76,11 @@ public:
* @param fileItem if 0 it means we MMB'ed the background. */
void mmbClicked( KFileItem * fileItem );
- void setNameFilter( const QString & nameFilter ) { m_nameFilter = nameFilter; }
+ void setNameFilter( const TQString & nameFilter ) { m_nameFilter = nameFilter; }
- QString nameFilter() const { return m_nameFilter; }
+ TQString nameFilter() const { return m_nameFilter; }
- void setFilesToSelect( const QStringList & filesToSelect ) { m_filesToSelect = filesToSelect; }
+ void setFilesToSelect( const TQStringList & filesToSelect ) { m_filesToSelect = filesToSelect; }
/**
* Sets per directory mime-type based filtering.
@@ -96,13 +96,13 @@ public:
*
* @param filter mime-type(s) to filter directory by.
*/
- void setMimeFilter (const QStringList& filters);
+ void setMimeFilter (const TQStringList& filters);
/**
* Completely clears the internally stored list of mime filters
* set by call to @ref #setMimeFilter.
*/
- QStringList mimeFilter() const;
+ TQStringList mimeFilter() const;
KonqPropsView * props() const { return m_pProps; }
@@ -294,8 +294,8 @@ protected:
protected:
- QString m_nameFilter;
- QStringList m_filesToSelect;
+ TQString m_nameFilter;
+ TQStringList m_filesToSelect;
KonqPropsView * m_pProps;
@@ -317,8 +317,8 @@ protected:
uint m_lDirCount;
private:
- void saveFindState( QDataStream& );
- void restoreFindState( QDataStream& );
+ void saveFindState( TQDataStream& );
+ void restoreFindState( TQDataStream& );
void adjustIconSizes();
@@ -341,8 +341,8 @@ public:
* you should probably override KonqDirPart::saveState
* and KonqDirPart::restoreState, not the following methods.
*/
- virtual void saveState( QDataStream &stream );
- virtual void restoreState( QDataStream &stream );
+ virtual void saveState( TQDataStream &stream );
+ virtual void restoreState( TQDataStream &stream );
private:
KonqDirPart* m_dirPart;
diff --git a/libkonq/konq_drag.cc b/libkonq/konq_drag.cc
index 3333061c2..0fdca5722 100644
--- a/libkonq/konq_drag.cc
+++ b/libkonq/konq_drag.cc
@@ -21,8 +21,8 @@
#include <kdebug.h>
#include <kurldrag.h>
-KonqIconDrag::KonqIconDrag( QWidget * dragSource, const char* name )
- : QIconDrag( dragSource, name ),
+KonqIconDrag::KonqIconDrag( TQWidget * dragSource, const char* name )
+ : TQIconDrag( dragSource, name ),
m_bCutSelection( false )
{
}
@@ -47,31 +47,31 @@ const char* KonqIconDrag::format( int i ) const
else return 0;
}
-QByteArray KonqIconDrag::encodedData( const char* mime ) const
+TQByteArray KonqIconDrag::encodedData( const char* mime ) const
{
- QByteArray a;
- QCString mimetype( mime );
+ TQByteArray a;
+ TQCString mimetype( mime );
if ( mimetype == "application/x-qiconlist" )
- a = QIconDrag::encodedData( mime );
+ a = TQIconDrag::encodedData( mime );
else if ( mimetype == "text/uri-list" ) {
- QCString s = urls.join( "\r\n" ).latin1();
+ TQCString s = urls.join( "\r\n" ).latin1();
if( urls.count() > 0 )
s.append( "\r\n" );
a.resize( s.length() + 1 ); // trailing zero
memcpy( a.data(), s.data(), s.length() + 1 );
}
else if ( mimetype == "application/x-kde-cutselection" ) {
- QCString s ( m_bCutSelection ? "1" : "0" );
+ TQCString s ( m_bCutSelection ? "1" : "0" );
a.resize( s.length() + 1 ); // trailing zero
memcpy( a.data(), s.data(), s.length() + 1 );
}
else if ( mimetype == "text/plain" ) {
if (!urls.isEmpty())
{
- QStringList uris;
- for (QStringList::ConstIterator it = urls.begin(); it != urls.end(); ++it)
+ TQStringList uris;
+ for (TQStringList::ConstIterator it = urls.begin(); it != urls.end(); ++it)
uris.append(KURLDrag::stringToUrl((*it).latin1()).prettyURL());
- QCString s = uris.join( "\n" ).local8Bit();
+ TQCString s = uris.join( "\n" ).local8Bit();
if( uris.count() > 1 )
s.append( "\n" );
a.resize( s.length()); // no trailing zero in clipboard text
@@ -82,12 +82,12 @@ QByteArray KonqIconDrag::encodedData( const char* mime ) const
{
if (!urls.isEmpty())
{
- QStringList uris;
+ TQStringList uris;
- for (QStringList::ConstIterator it = urls.begin(); it != urls.end(); ++it)
+ for (TQStringList::ConstIterator it = urls.begin(); it != urls.end(); ++it)
uris.append(KURLDrag::stringToUrl((*it).latin1()).url(0, 4)); // 4 for latin1
- QCString s = uris.join( "\n" ).latin1();
+ TQCString s = uris.join( "\n" ).latin1();
if( uris.count() > 1 )
s.append( "\n" );
a.resize( s.length());
@@ -98,10 +98,10 @@ QByteArray KonqIconDrag::encodedData( const char* mime ) const
{
if (!urls.isEmpty())
{
- QStringList uris;
- for (QStringList::ConstIterator it = urls.begin(); it != urls.end(); ++it)
+ TQStringList uris;
+ for (TQStringList::ConstIterator it = urls.begin(); it != urls.end(); ++it)
uris.append(KURLDrag::stringToUrl((*it).latin1()).prettyURL());
- QCString s = uris.join( "\n" ).utf8();
+ TQCString s = uris.join( "\n" ).utf8();
if( uris.count() > 1 )
s.append( "\n" );
a.resize( s.length());
@@ -111,29 +111,29 @@ QByteArray KonqIconDrag::encodedData( const char* mime ) const
return a;
}
-bool KonqIconDrag::canDecode( const QMimeSource* e )
+bool KonqIconDrag::canDecode( const TQMimeSource* e )
{
return e->provides( "application/x-qiconlist" ) ||
e->provides( "text/uri-list" ) ||
e->provides( "application/x-kde-cutselection" );
}
-void KonqIconDrag::append( const QIconDragItem &item, const QRect &pr,
- const QRect &tr, const QString &url )
+void KonqIconDrag::append( const TQIconDragItem &item, const TQRect &pr,
+ const TQRect &tr, const TQString &url )
{
- QIconDrag::append( item, pr, tr );
+ TQIconDrag::append( item, pr, tr );
urls.append( url );
}
-KonqIconDrag2::KonqIconDrag2( QWidget * dragSource )
+KonqIconDrag2::KonqIconDrag2( TQWidget * dragSource )
: KonqIconDrag( dragSource )
{
}
-void KonqIconDrag2::append( const QIconDragItem &item, const QRect &pr,
- const QRect &tr, const QString& url, const KURL &mostLocalURL )
+void KonqIconDrag2::append( const TQIconDragItem &item, const TQRect &pr,
+ const TQRect &tr, const TQString& url, const KURL &mostLocalURL )
{
- QString mostLocalURLStr = KURLDrag::urlToString(mostLocalURL);
+ TQString mostLocalURLStr = KURLDrag::urlToString(mostLocalURL);
m_kdeURLs.append( url );
KonqIconDrag::append( item, pr, tr, mostLocalURLStr );
}
@@ -145,15 +145,15 @@ const char* KonqIconDrag2::format( int i ) const
return KonqIconDrag::format( i );
}
-QByteArray KonqIconDrag2::encodedData( const char* mime ) const
+TQByteArray KonqIconDrag2::encodedData( const char* mime ) const
{
- QCString mimetype( mime );
+ TQCString mimetype( mime );
if ( mimetype == "application/x-kde-urilist" )
{
- QByteArray a;
+ TQByteArray a;
int c=0;
- for (QStringList::ConstIterator it = m_kdeURLs.begin(); it != m_kdeURLs.end(); ++it) {
- QCString url = (*it).utf8();
+ for (TQStringList::ConstIterator it = m_kdeURLs.begin(); it != m_kdeURLs.end(); ++it) {
+ TQCString url = (*it).utf8();
int l = url.length();
a.resize(c+l+2);
memcpy(a.data()+c, url.data(), l);
@@ -169,10 +169,10 @@ QByteArray KonqIconDrag2::encodedData( const char* mime ) const
//
-KonqDrag * KonqDrag::newDrag( const KURL::List & urls, bool cut, QWidget * dragSource, const char* name )
+KonqDrag * KonqDrag::newDrag( const KURL::List & urls, bool cut, TQWidget * dragSource, const char* name )
{
// See KURLDrag::newDrag
- QStrList uris;
+ TQStrList uris;
KURL::List::ConstIterator uit = urls.begin();
KURL::List::ConstIterator uEnd = urls.end();
// Get each URL encoded in utf8 - and since we get it in escaped
@@ -183,25 +183,25 @@ KonqDrag * KonqDrag::newDrag( const KURL::List & urls, bool cut, QWidget * dragS
}
// urls must be already checked to have hostname in file URLs
-KonqDrag::KonqDrag( const QStrList & urls, bool cut, QWidget * dragSource, const char* name )
- : QUriDrag( urls, dragSource, name ),
+KonqDrag::KonqDrag( const TQStrList & urls, bool cut, TQWidget * dragSource, const char* name )
+ : TQUriDrag( urls, dragSource, name ),
m_bCutSelection( cut ), m_urls( urls )
{}
// urls must be already checked to have hostname in file URLs
KonqDrag::KonqDrag( const KURL::List & urls, const KURL::List& mostLocalUrls,
- bool cut, QWidget * dragSource )
- : QUriDrag( dragSource ),
+ bool cut, TQWidget * dragSource )
+ : TQUriDrag( dragSource ),
m_bCutSelection( cut )
{
- QStrList uris;
+ TQStrList uris;
KURL::List::ConstIterator uit = urls.begin();
KURL::List::ConstIterator uEnd = urls.end();
// Get each URL encoded in utf8 - and since we get it in escaped
// form on top of that, .latin1() is fine.
for ( ; uit != uEnd ; ++uit )
uris.append( KURLDrag::urlToString( *uit ).latin1() );
- setUris( uris ); // we give the KDE uris to QUriDrag. TODO: do the opposite in KDE4 and add a m_mostLocalUris member.
+ setUris( uris ); // we give the KDE uris to TQUriDrag. TODO: do the opposite in KDE4 and add a m_mostLocalUris member.
uit = mostLocalUrls.begin();
uEnd = mostLocalUrls.end();
@@ -223,15 +223,15 @@ const char* KonqDrag::format( int i ) const
else return 0;
}
-QByteArray KonqDrag::encodedData( const char* mime ) const
+TQByteArray KonqDrag::encodedData( const char* mime ) const
{
- QByteArray a;
- QCString mimetype( mime );
+ TQByteArray a;
+ TQCString mimetype( mime );
if ( mimetype == "text/uri-list" )
{
- // Code taken from QUriDrag::setUris
+ // Code taken from TQUriDrag::setUris
int c=0;
- for (QStrListIterator it(m_urls); *it; ++it) {
+ for (TQStrListIterator it(m_urls); *it; ++it) {
int l = qstrlen(*it);
a.resize(c+l+2);
memcpy(a.data()+c,*it,l);
@@ -243,20 +243,20 @@ QByteArray KonqDrag::encodedData( const char* mime ) const
}
else if ( mimetype == "application/x-kde-urilist" )
{
- return QUriDrag::encodedData( "text/uri-list" );
+ return TQUriDrag::encodedData( "text/uri-list" );
}
else if ( mimetype == "application/x-kde-cutselection" )
{
- QCString s ( m_bCutSelection ? "1" : "0" );
+ TQCString s ( m_bCutSelection ? "1" : "0" );
a.resize( s.length() + 1 ); // trailing zero
memcpy( a.data(), s.data(), s.length() + 1 );
}
else if ( mimetype == "text/plain" )
{
- QStringList uris;
- for (QStrListIterator it(m_urls); *it; ++it)
+ TQStringList uris;
+ for (TQStrListIterator it(m_urls); *it; ++it)
uris.append(KURLDrag::stringToUrl(*it).prettyURL());
- QCString s = uris.join( "\n" ).local8Bit();
+ TQCString s = uris.join( "\n" ).local8Bit();
if( uris.count() > 1 )
s.append( "\n" );
a.resize( s.length() + 1 ); // trailing zero
@@ -269,14 +269,14 @@ QByteArray KonqDrag::encodedData( const char* mime ) const
// Used for KonqIconDrag too
-bool KonqDrag::decodeIsCutSelection( const QMimeSource *e )
+bool KonqDrag::decodeIsCutSelection( const TQMimeSource *e )
{
- QByteArray a = e->encodedData( "application/x-kde-cutselection" );
+ TQByteArray a = e->encodedData( "application/x-kde-cutselection" );
if ( a.isEmpty() )
return false;
else
{
- kdDebug(1203) << "KonqDrag::decodeIsCutSelection : a=" << QCString(a.data(), a.size() + 1) << endl;
+ kdDebug(1203) << "KonqDrag::decodeIsCutSelection : a=" << TQCString(a.data(), a.size() + 1) << endl;
return (a.at(0) == '1'); // true if 1
}
}
diff --git a/libkonq/konq_drag.h b/libkonq/konq_drag.h
index dca79676f..e5e49a837 100644
--- a/libkonq/konq_drag.h
+++ b/libkonq/konq_drag.h
@@ -19,10 +19,10 @@
#ifndef __konqdrag_h__
#define __konqdrag_h__
-#include <qdragobject.h>
-#include <qrect.h>
-#include <qstring.h>
-#include <qiconview.h>
+#include <tqdragobject.h>
+#include <tqrect.h>
+#include <tqstring.h>
+#include <tqiconview.h>
#include <libkonq_export.h>
@@ -40,21 +40,21 @@ class LIBKONQ_EXPORT KonqIconDrag : public QIconDrag
Q_OBJECT
public:
- KonqIconDrag( QWidget * dragSource, const char* name = 0 );
+ KonqIconDrag( TQWidget * dragSource, const char* name = 0 );
virtual ~KonqIconDrag() {}
const char* format( int i ) const;
- QByteArray encodedData( const char* mime ) const;
+ TQByteArray encodedData( const char* mime ) const;
- void append( const QIconDragItem &item, const QRect &pr,
- const QRect &tr, const QString &url );
+ void append( const TQIconDragItem &item, const TQRect &pr,
+ const TQRect &tr, const TQString &url );
void setMoveSelection( bool move ) { m_bCutSelection = move; }
- static bool canDecode( const QMimeSource* e );
+ static bool canDecode( const TQMimeSource* e );
protected: // KDE4: private. And d pointer...
- QStringList urls;
+ TQStringList urls;
bool m_bCutSelection;
};
@@ -68,17 +68,17 @@ class LIBKONQ_EXPORT KonqIconDrag2 : public KonqIconDrag
Q_OBJECT
public:
- KonqIconDrag2( QWidget * dragSource );
+ KonqIconDrag2( TQWidget * dragSource );
virtual ~KonqIconDrag2() {}
virtual const char* format( int i ) const;
- virtual QByteArray encodedData( const char* mime ) const;
+ virtual TQByteArray encodedData( const char* mime ) const;
- void append( const QIconDragItem &item, const QRect &pr,
- const QRect &tr, const QString &url, const KURL &mostLocalURL );
+ void append( const TQIconDragItem &item, const TQRect &pr,
+ const TQRect &tr, const TQString &url, const KURL &mostLocalURL );
private:
- QStringList m_kdeURLs;
+ TQStringList m_kdeURLs;
};
// Clipboard/dnd data for: URLS + isCut
@@ -87,7 +87,7 @@ class LIBKONQ_EXPORT KonqDrag : public QUriDrag
public:
// KDE4: remove, use KonqDrag constructor instead
static KonqDrag * newDrag( const KURL::List & urls,
- bool move, QWidget * dragSource = 0, const char* name = 0 );
+ bool move, TQWidget * dragSource = 0, const char* name = 0 );
/**
* Create a KonqDrag object.
@@ -97,26 +97,26 @@ public:
* @param dragSource parent object
* @since 3.5
*/
- KonqDrag( const KURL::List & urls, const KURL::List& mostLocalUrls, bool cut, QWidget * dragSource = 0 );
+ KonqDrag( const KURL::List & urls, const KURL::List& mostLocalUrls, bool cut, TQWidget * dragSource = 0 );
protected:
// KDE4: remove
- KonqDrag( const QStrList & urls, bool cut, QWidget * dragSource, const char* name );
+ KonqDrag( const TQStrList & urls, bool cut, TQWidget * dragSource, const char* name );
public:
virtual ~KonqDrag() {}
virtual const char* format( int i ) const;
- virtual QByteArray encodedData( const char* mime ) const;
+ virtual TQByteArray encodedData( const char* mime ) const;
void setMoveSelection( bool move ) { m_bCutSelection = move; }
// Returns true if the data was cut (used for KonqIconDrag too)
- static bool decodeIsCutSelection( const QMimeSource *e );
+ static bool decodeIsCutSelection( const TQMimeSource *e );
protected: // KDE4: private. And d pointer...
bool m_bCutSelection;
- QStrList m_urls; // this is set to the "most local urls". KDE4: KURL::List
+ TQStrList m_urls; // this is set to the "most local urls". KDE4: KURL::List
};
#endif
diff --git a/libkonq/konq_events.h b/libkonq/konq_events.h
index b76469717..cade20d63 100644
--- a/libkonq/konq_events.h
+++ b/libkonq/konq_events.h
@@ -2,7 +2,7 @@
#define __konq_events_h__
#include <kparts/event.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <libkonq_export.h>
namespace KParts
@@ -12,7 +12,7 @@ namespace KParts
class KConfig;
class KFileItem;
-typedef QPtrList<KFileItem> KFileItemList;
+typedef TQPtrList<KFileItem> KFileItemList;
class LIBKONQ_EXPORT KonqFileSelectionEvent : public KParts::Event
{
@@ -22,7 +22,7 @@ public:
KFileItemList selection() const { return m_selection; }
KParts::ReadOnlyPart *part() const { return m_part; }
- static bool test( const QEvent *event ) { return KParts::Event::test( event, s_fileItemSelectionEventName ); }
+ static bool test( const TQEvent *event ) { return KParts::Event::test( event, s_fileItemSelectionEventName ); }
private:
static const char *s_fileItemSelectionEventName;
@@ -39,7 +39,7 @@ public:
const KFileItem* item() const { return m_item; }
KParts::ReadOnlyPart *part() const { return m_part; }
- static bool test( const QEvent *event ) { return KParts::Event::test( event, s_fileItemMouseOverEventName ); }
+ static bool test( const TQEvent *event ) { return KParts::Event::test( event, s_fileItemMouseOverEventName ); }
private:
static const char *s_fileItemMouseOverEventName;
@@ -51,19 +51,19 @@ private:
class LIBKONQ_EXPORT KonqConfigEvent : public KParts::Event
{
public:
- KonqConfigEvent( KConfig *config, const QString &prefix, bool save ) : KParts::Event( s_configEventName ), m_config( config ), m_prefix( prefix ), m_save( save ) {}
+ KonqConfigEvent( KConfig *config, const TQString &prefix, bool save ) : KParts::Event( s_configEventName ), m_config( config ), m_prefix( prefix ), m_save( save ) {}
KConfig * config() const { return m_config; }
- QString prefix() const { return m_prefix; }
+ TQString prefix() const { return m_prefix; }
bool save() const { return m_save; }
- static bool test( const QEvent *event ) { return KParts::Event::test( event, s_configEventName ); }
+ static bool test( const TQEvent *event ) { return KParts::Event::test( event, s_configEventName ); }
private:
static const char *s_configEventName;
KConfig *m_config;
- QString m_prefix;
+ TQString m_prefix;
bool m_save;
};
diff --git a/libkonq/konq_faviconmgr.cc b/libkonq/konq_faviconmgr.cc
index 782beca91..37b01741f 100644
--- a/libkonq/konq_faviconmgr.cc
+++ b/libkonq/konq_faviconmgr.cc
@@ -25,32 +25,32 @@
#include "konq_faviconmgr.moc"
-KonqFavIconMgr::KonqFavIconMgr(QObject *parent, const char *name)
- : QObject(parent, name),
+KonqFavIconMgr::KonqFavIconMgr(TQObject *parent, const char *name)
+ : TQObject(parent, name),
DCOPObject("KonqFavIconMgr")
{
connectDCOPSignal("kded", "favicons",
- "iconChanged(bool, QString, QString)",
- "notifyChange(bool, QString, QString)", false);
+ "iconChanged(bool, TQString, TQString)",
+ "notifyChange(bool, TQString, TQString)", false);
}
-QString KonqFavIconMgr::iconForURL(const QString &url)
+TQString KonqFavIconMgr::iconForURL(const TQString &url)
{
return KMimeType::favIconForURL( KURL(url) );
}
void KonqFavIconMgr::setIconForURL(const KURL &url, const KURL &iconURL)
{
- QByteArray data;
- QDataStream str(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream str(data, IO_WriteOnly);
str << url << iconURL;
kapp->dcopClient()->send("kded", "favicons", "setIconForURL(KURL, KURL)", data);
}
void KonqFavIconMgr::downloadHostIcon(const KURL &url)
{
- QByteArray data;
- QDataStream str(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream str(data, IO_WriteOnly);
str << url;
kapp->dcopClient()->send("kded", "favicons", "downloadHostIcon(KURL)", data);
}
diff --git a/libkonq/konq_faviconmgr.h b/libkonq/konq_faviconmgr.h
index 66175f682..48c345bcd 100644
--- a/libkonq/konq_faviconmgr.h
+++ b/libkonq/konq_faviconmgr.h
@@ -28,7 +28,7 @@
* Maintains a list of custom icons per URL. This is only a stub
* for the "favicons" KDED Module
*/
-class LIBKONQ_EXPORT KonqFavIconMgr : public QObject, public DCOPObject
+class LIBKONQ_EXPORT KonqFavIconMgr : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -36,7 +36,7 @@ public:
/**
* Constructor.
*/
- KonqFavIconMgr(QObject *parent = 0, const char *name = 0);
+ KonqFavIconMgr(TQObject *parent = 0, const char *name = 0);
/**
* Downloads an icon from @p iconURL and associates @p url with it.
@@ -52,15 +52,15 @@ public:
/**
* Looks up an icon for @p url and returns its name if found
- * or QString::null otherwise
+ * or TQString::null otherwise
*/
- static QString iconForURL(const QString &url);
+ static TQString iconForURL(const TQString &url);
k_dcop:
/**
* an icon changed, updates the combo box
*/
- virtual ASYNC notifyChange( bool, QString, QString ) = 0;
+ virtual ASYNC notifyChange( bool, TQString, TQString ) = 0;
signals:
void changed();
diff --git a/libkonq/konq_filetip.cc b/libkonq/konq_filetip.cc
index c9c661c57..81262ae99 100644
--- a/libkonq/konq_filetip.cc
+++ b/libkonq/konq_filetip.cc
@@ -26,18 +26,18 @@
#include <kstandarddirs.h>
#include <kapplication.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qscrollview.h>
-#include <qtimer.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqscrollview.h>
+#include <tqtimer.h>
#include <fixx11h.h>
//--------------------------------------------------------------------------------
-KonqFileTip::KonqFileTip( QScrollView* parent )
- : QFrame( 0, 0, WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop | WX11BypassWM ),
+KonqFileTip::KonqFileTip( TQScrollView* parent )
+ : TQFrame( 0, 0, WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop | WX11BypassWM ),
m_on( false ),
m_preview( false ),
m_filter( false ),
@@ -47,20 +47,20 @@ KonqFileTip::KonqFileTip( QScrollView* parent )
m_item( 0 ),
m_previewJob( 0 )
{
- m_iconLabel = new QLabel(this);
- m_textLabel = new QLabel(this);
+ m_iconLabel = new TQLabel(this);
+ m_textLabel = new TQLabel(this);
m_textLabel->setAlignment(Qt::AlignAuto | Qt::AlignTop);
- QGridLayout* layout = new QGridLayout(this, 1, 2, 8, 0);
+ TQGridLayout* layout = new TQGridLayout(this, 1, 2, 8, 0);
layout->addWidget(m_iconLabel, 0, 0);
layout->addWidget(m_textLabel, 0, 1);
- layout->setResizeMode(QLayout::Fixed);
+ layout->setResizeMode(TQLayout::Fixed);
- setPalette( QToolTip::palette() );
+ setPalette( TQToolTip::palette() );
setMargin( 1 );
- setFrameStyle( QFrame::Plain | QFrame::Box );
+ setFrameStyle( TQFrame::Plain | TQFrame::Box );
- m_timer = new QTimer(this);
+ m_timer = new TQTimer(this);
hide();
}
@@ -89,7 +89,7 @@ void KonqFileTip::setOptions( bool on, bool preview, int num )
m_num = num;
}
-void KonqFileTip::setItem( KFileItem *item, const QRect &rect, const QPixmap *pixmap )
+void KonqFileTip::setItem( KFileItem *item, const TQRect &rect, const TQPixmap *pixmap )
{
hideTip();
@@ -108,13 +108,13 @@ void KonqFileTip::setItem( KFileItem *item, const QRect &rect, const QPixmap *pi
if ( pixmap )
m_iconLabel->setPixmap( *pixmap );
else
- m_iconLabel->setPixmap( QPixmap() );
+ m_iconLabel->setPixmap( TQPixmap() );
}
// Don't start immediately, because the user could move the mouse over another item
// This avoids a quick sequence of started preview-jobs
m_timer->disconnect( this );
- connect(m_timer, SIGNAL(timeout()), this, SLOT(startDelayed()));
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(startDelayed()));
m_timer->start( 300, true );
}
}
@@ -123,11 +123,11 @@ void KonqFileTip::reposition()
{
if ( m_rect.isEmpty() || !m_view || !m_view->viewport() ) return;
- QRect rect = m_rect;
- QPoint off = m_view->viewport()->mapToGlobal( m_view->contentsToViewport( rect.topRight() ) );
+ TQRect rect = m_rect;
+ TQPoint off = m_view->viewport()->mapToGlobal( m_view->contentsToViewport( rect.topRight() ) );
rect.moveTopRight( off );
- QPoint pos = rect.center();
+ TQPoint pos = rect.center();
// m_corner:
// 0: upperleft
// 1: upperright
@@ -136,7 +136,7 @@ void KonqFileTip::reposition()
// 4+: none
m_corner = 0;
// should the tooltip be shown to the left or to the right of the ivi ?
- QRect desk = KGlobalSettings::desktopGeometry(rect.center());
+ TQRect desk = KGlobalSettings::desktopGeometry(rect.center());
if (rect.center().x() + width() > desk.right())
{
// to the left
@@ -161,7 +161,7 @@ void KonqFileTip::reposition()
update();
}
-void KonqFileTip::gotPreview( const KFileItem* item, const QPixmap& pixmap )
+void KonqFileTip::gotPreview( const KFileItem* item, const TQPixmap& pixmap )
{
m_previewJob = 0;
if (item != m_item) return;
@@ -174,7 +174,7 @@ void KonqFileTip::gotPreviewResult()
m_previewJob = 0;
}
-void KonqFileTip::drawContents( QPainter *p )
+void KonqFileTip::drawContents( TQPainter *p )
{
static const char * const names[] = {
"arrow_topleft",
@@ -184,14 +184,14 @@ void KonqFileTip::drawContents( QPainter *p )
};
if (m_corner >= 4) { // 4 is empty, so don't draw anything
- QFrame::drawContents( p );
+ TQFrame::drawContents( p );
return;
}
if ( m_corners[m_corner].isNull())
- m_corners[m_corner].load( locate( "data", QString::fromLatin1( "konqueror/pics/%1.png" ).arg( names[m_corner] ) ) );
+ m_corners[m_corner].load( locate( "data", TQString::fromLatin1( "konqueror/pics/%1.png" ).arg( names[m_corner] ) ) );
- QPixmap &pix = m_corners[m_corner];
+ TQPixmap &pix = m_corners[m_corner];
switch ( m_corner )
{
@@ -209,7 +209,7 @@ void KonqFileTip::drawContents( QPainter *p )
break;
}
- QFrame::drawContents( p );
+ TQFrame::drawContents( p );
}
void KonqFileTip::setFilter( bool enable )
@@ -218,10 +218,10 @@ void KonqFileTip::setFilter( bool enable )
if ( enable ) {
kapp->installEventFilter( this );
- QApplication::setGlobalMouseTracking( true );
+ TQApplication::setGlobalMouseTracking( true );
}
else {
- QApplication::setGlobalMouseTracking( false );
+ TQApplication::setGlobalMouseTracking( false );
kapp->removeEventFilter( this );
}
m_filter = enable;
@@ -229,12 +229,12 @@ void KonqFileTip::setFilter( bool enable )
void KonqFileTip::showTip()
{
- QString text = m_item->getToolTipText(m_num);
+ TQString text = m_item->getToolTipText(m_num);
if ( text.isEmpty() ) return;
m_timer->disconnect( this );
- connect(m_timer, SIGNAL(timeout()), this, SLOT(hideTip()));
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(hideTip()));
m_timer->start( 15000, true );
m_textLabel->setText( text );
@@ -261,35 +261,35 @@ void KonqFileTip::startDelayed()
oneItem.append( m_item );
m_previewJob = KIO::filePreview( oneItem, 256, 256, 64, 70, true, true, 0);
- connect( m_previewJob, SIGNAL( gotPreview( const KFileItem *, const QPixmap & ) ),
- this, SLOT( gotPreview( const KFileItem *, const QPixmap & ) ) );
- connect( m_previewJob, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( gotPreviewResult() ) );
+ connect( m_previewJob, TQT_SIGNAL( gotPreview( const KFileItem *, const TQPixmap & ) ),
+ this, TQT_SLOT( gotPreview( const KFileItem *, const TQPixmap & ) ) );
+ connect( m_previewJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( gotPreviewResult() ) );
}
m_timer->disconnect( this );
- connect(m_timer, SIGNAL(timeout()), this, SLOT(showTip()));
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(showTip()));
m_timer->start( 400, true );
}
-void KonqFileTip::resizeEvent( QResizeEvent* event )
+void KonqFileTip::resizeEvent( TQResizeEvent* event )
{
- QFrame::resizeEvent(event);
+ TQFrame::resizeEvent(event);
reposition();
}
-bool KonqFileTip::eventFilter( QObject *, QEvent *e )
+bool KonqFileTip::eventFilter( TQObject *, TQEvent *e )
{
switch ( e->type() )
{
- case QEvent::Leave:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- case QEvent::FocusIn:
- case QEvent::FocusOut:
- case QEvent::Wheel:
+ case TQEvent::Leave:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::FocusIn:
+ case TQEvent::FocusOut:
+ case TQEvent::Wheel:
hideTip();
default: break;
}
diff --git a/libkonq/konq_filetip.h b/libkonq/konq_filetip.h
index fc878c074..667204e6c 100644
--- a/libkonq/konq_filetip.h
+++ b/libkonq/konq_filetip.h
@@ -22,8 +22,8 @@
#ifndef KONQ_FILETIP_H
#define KONQ_FILETIP_H
-#include <qframe.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
#include <kio/previewjob.h>
#include <libkonq_export.h>
@@ -40,7 +40,7 @@ class LIBKONQ_EXPORT KonqFileTip : public QFrame
Q_OBJECT
public:
- KonqFileTip( QScrollView *parent );
+ KonqFileTip( TQScrollView *parent );
~KonqFileTip();
void setPreview(bool on);
@@ -57,17 +57,17 @@ class LIBKONQ_EXPORT KonqFileTip : public QFrame
@param rect the rectangle around which the tip will be shown
@param pixmap the pixmap to be shown. If 0, no pixmap is shown
*/
- void setItem( KFileItem *item, const QRect &rect = QRect(),
- const QPixmap *pixmap = 0 );
+ void setItem( KFileItem *item, const TQRect &rect = TQRect(),
+ const TQPixmap *pixmap = 0 );
- virtual bool eventFilter( QObject *, QEvent *e );
+ virtual bool eventFilter( TQObject *, TQEvent *e );
protected:
- virtual void drawContents( QPainter *p );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void drawContents( TQPainter *p );
+ virtual void resizeEvent( TQResizeEvent * );
private slots:
- void gotPreview( const KFileItem*, const QPixmap& );
+ void gotPreview( const KFileItem*, const TQPixmap& );
void gotPreviewResult();
void startDelayed();
@@ -79,19 +79,19 @@ class LIBKONQ_EXPORT KonqFileTip : public QFrame
void reposition();
- QLabel* m_iconLabel;
- QLabel* m_textLabel;
+ TQLabel* m_iconLabel;
+ TQLabel* m_textLabel;
bool m_on : 1;
bool m_preview : 1; // shall the preview icon be shown
bool m_filter : 1;
- QPixmap m_corners[4];
+ TQPixmap m_corners[4];
int m_corner;
int m_num;
- QScrollView* m_view;
+ TQScrollView* m_view;
KFileItem* m_item;
KIO::PreviewJob* m_previewJob;
- QRect m_rect;
- QTimer* m_timer;
+ TQRect m_rect;
+ TQTimer* m_timer;
};
#endif
diff --git a/libkonq/konq_historycomm.cc b/libkonq/konq_historycomm.cc
index 0875a7945..6cfd9b53f 100644
--- a/libkonq/konq_historycomm.cc
+++ b/libkonq/konq_historycomm.cc
@@ -2,9 +2,9 @@
bool KonqHistoryEntry::marshalURLAsStrings;
-// QDataStream operators (read and write a KonqHistoryEntry
-// from/into a QDataStream)
-QDataStream& operator<< (QDataStream& s, const KonqHistoryEntry& e) {
+// TQDataStream operators (read and write a KonqHistoryEntry
+// from/into a TQDataStream)
+TQDataStream& operator<< (TQDataStream& s, const KonqHistoryEntry& e) {
if (KonqHistoryEntry::marshalURLAsStrings)
s << e.url.url();
else
@@ -19,10 +19,10 @@ QDataStream& operator<< (QDataStream& s, const KonqHistoryEntry& e) {
return s;
}
-QDataStream& operator>> (QDataStream& s, KonqHistoryEntry& e) {
+TQDataStream& operator>> (TQDataStream& s, KonqHistoryEntry& e) {
if (KonqHistoryEntry::marshalURLAsStrings)
{
- QString url;
+ TQString url;
s >> url;
e.url = url;
}
diff --git a/libkonq/konq_historycomm.h b/libkonq/konq_historycomm.h
index e02e10a61..ea2a387df 100644
--- a/libkonq/konq_historycomm.h
+++ b/libkonq/konq_historycomm.h
@@ -20,8 +20,8 @@
#ifndef KONQ_HISTORYCOMM_H
#define KONQ_HISTORYCOMM_H
-#include <qdatetime.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqstringlist.h>
#include <dcopobject.h>
#include <kurl.h>
@@ -35,18 +35,18 @@ public:
: numberOfTimesVisited(1) {}
KURL url;
- QString typedURL;
- QString title;
+ TQString typedURL;
+ TQString title;
Q_UINT32 numberOfTimesVisited;
- QDateTime firstVisited;
- QDateTime lastVisited;
+ TQDateTime firstVisited;
+ TQDateTime lastVisited;
};
-// QDataStream operators (read and write a KonqHistoryEntry
+// TQDataStream operators (read and write a KonqHistoryEntry
// from/into a QDataStream
-QDataStream& operator<< (QDataStream& s, const KonqHistoryEntry& e);
-QDataStream& operator>> (QDataStream& s, KonqHistoryEntry& e);
+TQDataStream& operator<< (TQDataStream& s, const KonqHistoryEntry& e);
+TQDataStream& operator>> (TQDataStream& s, KonqHistoryEntry& e);
///////////////////////////////////////////////////////////////////
@@ -61,16 +61,16 @@ class KonqHistoryComm : public DCOPObject
K_DCOP
protected:
- KonqHistoryComm( QCString objId ) : DCOPObject( objId ) {}
+ KonqHistoryComm( TQCString objId ) : DCOPObject( objId ) {}
k_dcop:
- virtual ASYNC notifyHistoryEntry( KonqHistoryEntry e, QCString saveId) = 0;
- virtual ASYNC notifyMaxCount( Q_UINT32 count, QCString saveId ) = 0;
- virtual ASYNC notifyMaxAge( Q_UINT32 days, QCString saveId ) = 0;
- virtual ASYNC notifyClear( QCString saveId ) = 0;
- virtual ASYNC notifyRemove( KURL url, QCString saveId ) = 0;
- virtual ASYNC notifyRemove( KURL::List url, QCString saveId ) = 0;
- virtual QStringList allURLs() const = 0;
+ virtual ASYNC notifyHistoryEntry( KonqHistoryEntry e, TQCString saveId) = 0;
+ virtual ASYNC notifyMaxCount( Q_UINT32 count, TQCString saveId ) = 0;
+ virtual ASYNC notifyMaxAge( Q_UINT32 days, TQCString saveId ) = 0;
+ virtual ASYNC notifyClear( TQCString saveId ) = 0;
+ virtual ASYNC notifyRemove( KURL url, TQCString saveId ) = 0;
+ virtual ASYNC notifyRemove( KURL::List url, TQCString saveId ) = 0;
+ virtual TQStringList allURLs() const = 0;
};
diff --git a/libkonq/konq_historymgr.cc b/libkonq/konq_historymgr.cc
index 72c6be3de..b971d39b3 100644
--- a/libkonq/konq_historymgr.cc
+++ b/libkonq/konq_historymgr.cc
@@ -33,11 +33,11 @@
const Q_UINT32 KonqHistoryManager::s_historyVersion = 3;
-KonqHistoryManager::KonqHistoryManager( QObject *parent, const char *name )
+KonqHistoryManager::KonqHistoryManager( TQObject *parent, const char *name )
: KParts::HistoryProvider( parent, name ),
KonqHistoryComm( "KonqHistoryManager" )
{
- m_updateTimer = new QTimer( this );
+ m_updateTimer = new TQTimer( this );
// defaults
KConfig *config = KGlobal::config();
@@ -48,7 +48,7 @@ KonqHistoryManager::KonqHistoryManager( QObject *parent, const char *name )
m_history.setAutoDelete( true );
m_filename = locateLocal( "data",
- QString::fromLatin1("konqueror/konq_history" ));
+ TQString::fromLatin1("konqueror/konq_history" ));
if ( !kapp->dcopClient()->isAttached() )
kapp->dcopClient()->attach();
@@ -61,7 +61,7 @@ KonqHistoryManager::KonqHistoryManager( QObject *parent, const char *name )
// and load the history
loadHistory();
- connect( m_updateTimer, SIGNAL( timeout() ), SLOT( slotEmitUpdated() ));
+ connect( m_updateTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotEmitUpdated() ));
}
@@ -84,7 +84,7 @@ bool KonqHistoryManager::loadHistory()
m_history.clear();
m_pCompletion->clear();
- QFile file( m_filename );
+ TQFile file( m_filename );
if ( !file.open( IO_ReadOnly ) ) {
if ( file.exists() )
kdWarning() << "Can't open " << file.name() << endl;
@@ -95,17 +95,17 @@ bool KonqHistoryManager::loadHistory()
return ret;
}
- QDataStream fileStream( &file );
- QByteArray data; // only used for version == 2
+ TQDataStream fileStream( &file );
+ TQByteArray data; // only used for version == 2
// we construct the stream object now but fill in the data later.
// thanks to QBA's explicit sharing this works :)
- QDataStream crcStream( data, IO_ReadOnly );
+ TQDataStream crcStream( data, IO_ReadOnly );
if ( !fileStream.atEnd() ) {
Q_UINT32 version;
fileStream >> version;
- QDataStream *stream = &fileStream;
+ TQDataStream *stream = &fileStream;
bool crcChecked = false;
bool crcOk = false;
@@ -154,12 +154,12 @@ bool KonqHistoryManager::loadHistory()
*stream >> *entry;
// kdDebug(1203) << "## loaded entry: " << entry->url << ", Title: " << entry->title << endl;
m_history.append( entry );
- QString urlString2 = entry->url.prettyURL();
+ TQString urlString2 = entry->url.prettyURL();
addToCompletion( urlString2, entry->typedURL, entry->numberOfTimesVisited );
// and fill our baseclass.
- QString urlString = entry->url.url();
+ TQString urlString = entry->url.url();
KParts::HistoryProvider::insert( urlString );
// DF: also insert the "pretty" version if different
// This helps getting 'visited' links on websites which don't use fully-escaped urls.
@@ -205,16 +205,16 @@ bool KonqHistoryManager::saveHistory()
return false;
}
- QDataStream *fileStream = file.dataStream();
+ TQDataStream *fileStream = file.dataStream();
*fileStream << s_historyVersion;
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
//We use KURL for marshalling URLs in entries in the V3
//file format
KonqHistoryEntry::marshalURLAsStrings = false;
- QPtrListIterator<KonqHistoryEntry> it( m_history );
+ TQPtrListIterator<KonqHistoryEntry> it( m_history );
KonqHistoryEntry *entry;
while ( (entry = it.current()) ) {
stream << *entry;
@@ -240,7 +240,7 @@ void KonqHistoryManager::adjustSize()
while ( m_history.count() > m_maxCount || isExpired( entry ) ) {
removeFromCompletion( entry->url.prettyURL(), entry->typedURL );
- QString urlString = entry->url.url();
+ TQString urlString = entry->url.url();
KParts::HistoryProvider::remove( urlString );
addToUpdateList( urlString );
@@ -253,23 +253,23 @@ void KonqHistoryManager::adjustSize()
}
-void KonqHistoryManager::addPending( const KURL& url, const QString& typedURL,
- const QString& title )
+void KonqHistoryManager::addPending( const KURL& url, const TQString& typedURL,
+ const TQString& title )
{
addToHistory( true, url, typedURL, title );
}
void KonqHistoryManager::confirmPending( const KURL& url,
- const QString& typedURL,
- const QString& title )
+ const TQString& typedURL,
+ const TQString& title )
{
addToHistory( false, url, typedURL, title );
}
void KonqHistoryManager::addToHistory( bool pending, const KURL& _url,
- const QString& typedURL,
- const QString& title )
+ const TQString& typedURL,
+ const TQString& title )
{
kdDebug(1203) << "## addToHistory: " << _url.prettyURL() << " Typed URL: " << typedURL << ", Title: " << title << endl;
@@ -282,10 +282,10 @@ void KonqHistoryManager::addToHistory( bool pending, const KURL& _url,
KURL url( _url );
bool hasPass = url.hasPass();
- url.setPass( QString::null ); // No password in the history, especially not in the completion!
+ url.setPass( TQString::null ); // No password in the history, especially not in the completion!
url.setHost( url.host().lower() ); // All host parts lower case
KonqHistoryEntry entry;
- QString u = url.prettyURL();
+ TQString u = url.prettyURL();
entry.url = url;
if ( (u != typedURL) && !hasPass )
entry.typedURL = typedURL;
@@ -295,12 +295,12 @@ void KonqHistoryManager::addToHistory( bool pending, const KURL& _url,
// konqueror's window caption).
if ( !pending && u != title )
entry.title = title;
- entry.firstVisited = QDateTime::currentDateTime();
+ entry.firstVisited = TQDateTime::currentDateTime();
entry.lastVisited = entry.firstVisited;
// always remove from pending if available, otherwise the else branch leaks
// if the map already contains an entry for this key.
- QMapIterator<QString,KonqHistoryEntry*> it = m_pending.find( u );
+ TQMapIterator<TQString,KonqHistoryEntry*> it = m_pending.find( u );
if ( it != m_pending.end() ) {
delete it.data();
m_pending.remove( it );
@@ -333,7 +333,7 @@ void KonqHistoryManager::addToHistory( bool pending, const KURL& _url,
// returns false). But when using the HistoryProvider interface, we record
// exactly those filtered-out urls.
// Moreover, we don't get any pending/confirming entries, just one insert()
-void KonqHistoryManager::insert( const QString& url )
+void KonqHistoryManager::insert( const TQString& url )
{
KURL u ( url );
if ( !filterOut( u ) || u.protocol() == "about" ) { // remote URL
@@ -342,21 +342,21 @@ void KonqHistoryManager::insert( const QString& url )
// Local URL -> add to history
KonqHistoryEntry entry;
entry.url = u;
- entry.firstVisited = QDateTime::currentDateTime();
+ entry.firstVisited = TQDateTime::currentDateTime();
entry.lastVisited = entry.firstVisited;
emitAddToHistory( entry );
}
void KonqHistoryManager::emitAddToHistory( const KonqHistoryEntry& entry )
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << entry << objId();
// Protection against very long urls (like data:)
if ( data.size() > 4096 )
return;
kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager",
- "notifyHistoryEntry(KonqHistoryEntry, QCString)",
+ "notifyHistoryEntry(KonqHistoryEntry, TQCString)",
data );
}
@@ -368,7 +368,7 @@ void KonqHistoryManager::removePending( const KURL& url )
if ( url.isLocalFile() )
return;
- QMapIterator<QString,KonqHistoryEntry*> it = m_pending.find( url.prettyURL() );
+ TQMapIterator<TQString,KonqHistoryEntry*> it = m_pending.find( url.prettyURL() );
if ( it != m_pending.end() ) {
KonqHistoryEntry *oldEntry = it.data(); // the old entry, may be 0L
emitRemoveFromHistory( url ); // remove the current pending entry
@@ -384,7 +384,7 @@ void KonqHistoryManager::removePending( const KURL& url )
// clears the pending list and makes sure the entries get deleted.
void KonqHistoryManager::clearPending()
{
- QMapIterator<QString,KonqHistoryEntry*> it = m_pending.begin();
+ TQMapIterator<TQString,KonqHistoryEntry*> it = m_pending.begin();
while ( it != m_pending.end() ) {
delete it.data();
++it;
@@ -394,59 +394,59 @@ void KonqHistoryManager::clearPending()
void KonqHistoryManager::emitRemoveFromHistory( const KURL& url )
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << url << objId();
kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager",
- "notifyRemove(KURL, QCString)", data );
+ "notifyRemove(KURL, TQCString)", data );
}
void KonqHistoryManager::emitRemoveFromHistory( const KURL::List& urls )
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << urls << objId();
kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager",
- "notifyRemove(KURL::List, QCString)", data );
+ "notifyRemove(KURL::List, TQCString)", data );
}
void KonqHistoryManager::emitClear()
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << objId();
kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager",
- "notifyClear(QCString)", data );
+ "notifyClear(TQCString)", data );
}
void KonqHistoryManager::emitSetMaxCount( Q_UINT32 count )
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << count << objId();
kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager",
- "notifyMaxCount(Q_UINT32, QCString)", data );
+ "notifyMaxCount(Q_UINT32, TQCString)", data );
}
void KonqHistoryManager::emitSetMaxAge( Q_UINT32 days )
{
- QByteArray data;
- QDataStream stream( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream stream( data, IO_WriteOnly );
stream << days << objId();
kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager",
- "notifyMaxAge(Q_UINT32, QCString)", data );
+ "notifyMaxAge(Q_UINT32, TQCString)", data );
}
///////////////////////////////////////////////////////////////////
// DCOP called methods
void KonqHistoryManager::notifyHistoryEntry( KonqHistoryEntry e,
- QCString )
+ TQCString )
{
//kdDebug(1203) << "Got new entry from Broadcast: " << e.url.prettyURL() << endl;
KonqHistoryEntry *entry = findEntry( e.url );
- QString urlString = e.url.url();
+ TQString urlString = e.url.url();
if ( !entry ) { // create a new history entry
entry = new KonqHistoryEntry;
@@ -487,7 +487,7 @@ void KonqHistoryManager::notifyHistoryEntry( KonqHistoryEntry e,
emit entryAdded( entry );
}
-void KonqHistoryManager::notifyMaxCount( Q_UINT32 count, QCString )
+void KonqHistoryManager::notifyMaxCount( Q_UINT32 count, TQCString )
{
m_maxCount = count;
clearPending();
@@ -503,7 +503,7 @@ void KonqHistoryManager::notifyMaxCount( Q_UINT32 count, QCString )
}
}
-void KonqHistoryManager::notifyMaxAge( Q_UINT32 days, QCString )
+void KonqHistoryManager::notifyMaxAge( Q_UINT32 days, TQCString )
{
m_maxAgeDays = days;
clearPending();
@@ -519,7 +519,7 @@ void KonqHistoryManager::notifyMaxAge( Q_UINT32 days, QCString )
}
}
-void KonqHistoryManager::notifyClear( QCString )
+void KonqHistoryManager::notifyClear( TQCString )
{
clearPending();
m_history.clear();
@@ -531,7 +531,7 @@ void KonqHistoryManager::notifyClear( QCString )
KParts::HistoryProvider::clear(); // also emits the cleared() signal
}
-void KonqHistoryManager::notifyRemove( KURL url, QCString )
+void KonqHistoryManager::notifyRemove( KURL url, TQCString )
{
kdDebug(1203) << "#### Broadcast: remove entry:: " << url.prettyURL() << endl;
@@ -541,7 +541,7 @@ void KonqHistoryManager::notifyRemove( KURL url, QCString )
if ( entry ) { // entry is now the current item
removeFromCompletion( entry->url.prettyURL(), entry->typedURL );
- QString urlString = entry->url.url();
+ TQString urlString = entry->url.url();
KParts::HistoryProvider::remove( urlString );
addToUpdateList( urlString );
@@ -555,7 +555,7 @@ void KonqHistoryManager::notifyRemove( KURL url, QCString )
}
}
-void KonqHistoryManager::notifyRemove( KURL::List urls, QCString )
+void KonqHistoryManager::notifyRemove( KURL::List urls, TQCString )
{
kdDebug(1203) << "#### Broadcast: removing list!" << endl;
@@ -567,7 +567,7 @@ void KonqHistoryManager::notifyRemove( KURL::List urls, QCString )
if ( entry ) { // entry is now the current item
removeFromCompletion( entry->url.prettyURL(), entry->typedURL );
- QString urlString = entry->url.url();
+ TQString urlString = entry->url.url();
KParts::HistoryProvider::remove( urlString );
addToUpdateList( urlString );
@@ -589,21 +589,21 @@ void KonqHistoryManager::notifyRemove( KURL::List urls, QCString )
// compatibility fallback, try to load the old completion history
bool KonqHistoryManager::loadFallback()
{
- QString file = locateLocal( "config", QString::fromLatin1("konq_history"));
+ TQString file = locateLocal( "config", TQString::fromLatin1("konq_history"));
if ( file.isEmpty() )
return false;
KonqHistoryEntry *entry;
KSimpleConfig config( file );
config.setGroup("History");
- QStringList items = config.readListEntry( "CompletionItems" );
- QStringList::Iterator it = items.begin();
+ TQStringList items = config.readListEntry( "CompletionItems" );
+ TQStringList::Iterator it = items.begin();
while ( it != items.end() ) {
entry = createFallbackEntry( *it );
if ( entry ) {
m_history.append( entry );
- addToCompletion( entry->url.prettyURL(), QString::null, entry->numberOfTimesVisited );
+ addToCompletion( entry->url.prettyURL(), TQString::null, entry->numberOfTimesVisited );
KParts::HistoryProvider::insert( entry->url.url() );
}
@@ -620,7 +620,7 @@ bool KonqHistoryManager::loadFallback()
// tries to create a small KonqHistoryEntry out of a string, where the string
// looks like "http://www.bla.com/bla.html:23"
// the attached :23 is the weighting from KCompletion
-KonqHistoryEntry * KonqHistoryManager::createFallbackEntry(const QString& item) const
+KonqHistoryEntry * KonqHistoryManager::createFallbackEntry(const TQString& item) const
{
// code taken from KCompletion::addItem(), adjusted to use weight = 1
uint len = item.length();
@@ -646,7 +646,7 @@ KonqHistoryEntry * KonqHistoryManager::createFallbackEntry(const QString& item)
entry->url = u;
entry->numberOfTimesVisited = weight;
// to make it not expire immediately...
- entry->lastVisited = QDateTime::currentDateTime();
+ entry->lastVisited = TQDateTime::currentDateTime();
}
return entry;
@@ -672,9 +672,9 @@ void KonqHistoryManager::slotEmitUpdated()
m_updateURLs.clear();
}
-QStringList KonqHistoryManager::allURLs() const
+TQStringList KonqHistoryManager::allURLs() const
{
- QStringList list;
+ TQStringList list;
KonqHistoryIterator it ( m_history );
for ( ; it.current(); ++it )
list.append( it.current()->url.url() );
@@ -682,7 +682,7 @@ QStringList KonqHistoryManager::allURLs() const
return list;
}
-void KonqHistoryManager::addToCompletion( const QString& url, const QString& typedURL,
+void KonqHistoryManager::addToCompletion( const TQString& url, const TQString& typedURL,
int numberOfTimesVisited )
{
m_pCompletion->addItem( url, numberOfTimesVisited );
@@ -690,7 +690,7 @@ void KonqHistoryManager::addToCompletion( const QString& url, const QString& typ
m_pCompletion->addItem( typedURL, numberOfTimesVisited +10 );
}
-void KonqHistoryManager::removeFromCompletion( const QString& url, const QString& typedURL )
+void KonqHistoryManager::removeFromCompletion( const TQString& url, const TQString& typedURL )
{
m_pCompletion->removeItem( url );
m_pCompletion->removeItem( typedURL );
@@ -714,8 +714,8 @@ KonqHistoryEntry * KonqHistoryList::findEntry( const KURL& url )
}
// sort by lastVisited date (oldest go first)
-int KonqHistoryList::compareItems( QPtrCollection::Item item1,
- QPtrCollection::Item item2 )
+int KonqHistoryList::compareItems( TQPtrCollection::Item item1,
+ TQPtrCollection::Item item2 )
{
KonqHistoryEntry *entry1 = static_cast<KonqHistoryEntry *>( item1 );
KonqHistoryEntry *entry2 = static_cast<KonqHistoryEntry *>( item2 );
diff --git a/libkonq/konq_historymgr.h b/libkonq/konq_historymgr.h
index 4ddcb5e83..11b14603b 100644
--- a/libkonq/konq_historymgr.h
+++ b/libkonq/konq_historymgr.h
@@ -20,12 +20,12 @@
#ifndef KONQ_HISTORY_H
#define KONQ_HISTORY_H
-#include <qdatastream.h>
-#include <qfile.h>
-#include <qptrlist.h>
-#include <qobject.h>
-#include <qmap.h>
-#include <qtimer.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqtimer.h>
#include <dcopobject.h>
@@ -40,8 +40,8 @@
class KCompletion;
-typedef QPtrList<KonqHistoryEntry> KonqBaseHistoryList;
-typedef QPtrListIterator<KonqHistoryEntry> KonqHistoryIterator;
+typedef TQPtrList<KonqHistoryEntry> KonqBaseHistoryList;
+typedef TQPtrListIterator<KonqHistoryEntry> KonqHistoryIterator;
class LIBKONQ_EXPORT KonqHistoryList : public KonqBaseHistoryList
{
@@ -57,7 +57,7 @@ protected:
/**
* Ensures that the items are sorted by the lastVisited date
*/
- virtual int compareItems( QPtrCollection::Item, QPtrCollection::Item );
+ virtual int compareItems( TQPtrCollection::Item, TQPtrCollection::Item );
};
@@ -81,7 +81,7 @@ public:
return static_cast<KonqHistoryManager*>( KParts::HistoryProvider::self() );
}
- KonqHistoryManager( QObject *parent, const char *name );
+ KonqHistoryManager( TQObject *parent, const char *name );
~KonqHistoryManager();
/**
@@ -147,15 +147,15 @@ public:
* @param title The title of the URL. If you don't know it (yet), you may
specify it in @ref confirmPending().
*/
- void addPending( const KURL& url, const QString& typedURL = QString::null,
- const QString& title = QString::null );
+ void addPending( const KURL& url, const TQString& typedURL = TQString::null,
+ const TQString& title = TQString::null );
/**
* Confirms and updates the entry for @p url.
*/
void confirmPending( const KURL& url,
- const QString& typedURL = QString::null,
- const QString& title = QString::null );
+ const TQString& typedURL = TQString::null,
+ const TQString& title = TQString::null );
/**
* Removes a pending url from the history, e.g. when the url does not
@@ -181,8 +181,8 @@ public:
* By default, file:/ urls will be filtered out, but if they come thru
* the HistoryProvider interface, they are added to the history.
*/
- virtual void insert( const QString& );
- virtual void remove( const QString& ) {}
+ virtual void insert( const TQString& );
+ virtual void remove( const TQString& ) {}
virtual void clear() {}
@@ -236,7 +236,7 @@ protected:
*/
inline bool isExpired( KonqHistoryEntry *entry ) {
return (entry && m_maxAgeDays > 0 && entry->lastVisited <
- QDate::currentDate().addDays( -m_maxAgeDays ));
+ TQDate::currentDate().addDays( -m_maxAgeDays ));
}
/**
@@ -253,41 +253,41 @@ protected:
* @param saveId is the DCOPObject::objId() of the sender so that
* only the sender saves the new history.
*/
- virtual void notifyHistoryEntry( KonqHistoryEntry e, QCString saveId );
+ virtual void notifyHistoryEntry( KonqHistoryEntry e, TQCString saveId );
/**
* Called when the configuration of the maximum count changed.
* Called via DCOP by some config-module
*/
- virtual void notifyMaxCount( Q_UINT32 count, QCString saveId );
+ virtual void notifyMaxCount( Q_UINT32 count, TQCString saveId );
/**
* Called when the configuration of the maximum age of history-entries
* changed. Called via DCOP by some config-module
*/
- virtual void notifyMaxAge( Q_UINT32 days, QCString saveId );
+ virtual void notifyMaxAge( Q_UINT32 days, TQCString saveId );
/**
* Clears the history completely. Called via DCOP by some config-module
*/
- virtual void notifyClear( QCString saveId );
+ virtual void notifyClear( TQCString saveId );
/**
* Notifes about a url that has to be removed from the history.
* The instance where saveId == objId() has to save the history.
*/
- virtual void notifyRemove( KURL url, QCString saveId );
+ virtual void notifyRemove( KURL url, TQCString saveId );
/**
* Notifes about a list of urls that has to be removed from the history.
* The instance where saveId == objId() has to save the history.
*/
- virtual void notifyRemove( KURL::List urls, QCString saveId );
+ virtual void notifyRemove( KURL::List urls, TQCString saveId );
/**
* @returns a list of all urls in the history.
*/
- virtual QStringList allURLs() const;
+ virtual TQStringList allURLs() const;
/**
* Does the work for @ref addPending() and @ref confirmPending().
@@ -301,8 +301,8 @@ protected:
* (if available) and NOT be added again in that case.
*/
void addToHistory( bool pending, const KURL& url,
- const QString& typedURL = QString::null,
- const QString& title = QString::null );
+ const TQString& typedURL = TQString::null,
+ const TQString& title = TQString::null );
/**
@@ -312,7 +312,7 @@ protected:
*/
virtual bool filterOut( const KURL& url );
- void addToUpdateList( const QString& url ) {
+ void addToUpdateList( const TQString& url ) {
m_updateURLs.append( url );
m_updateTimer->start( 500, true );
}
@@ -322,7 +322,7 @@ protected:
* urls to it whenever you modify the list of history entries and start
* m_updateTimer.
*/
- QStringList m_updateURLs;
+ TQStringList m_updateURLs;
private slots:
/**
@@ -351,12 +351,12 @@ private:
* completion.
*/
bool loadFallback();
- KonqHistoryEntry * createFallbackEntry( const QString& ) const;
+ KonqHistoryEntry * createFallbackEntry( const TQString& ) const;
- void addToCompletion( const QString& url, const QString& typedURL, int numberOfTimesVisited = 1 );
- void removeFromCompletion( const QString& url, const QString& typedURL );
+ void addToCompletion( const TQString& url, const TQString& typedURL, int numberOfTimesVisited = 1 );
+ void removeFromCompletion( const TQString& url, const TQString& typedURL );
- QString m_filename;
+ TQString m_filename;
KonqHistoryList m_history;
/**
@@ -365,7 +365,7 @@ private:
* Note: when removing an entry, you have to delete the KonqHistoryEntry
* of the item you remove.
*/
- QMap<QString,KonqHistoryEntry*> m_pending;
+ TQMap<TQString,KonqHistoryEntry*> m_pending;
Q_UINT32 m_maxCount; // maximum of history entries
Q_UINT32 m_maxAgeDays; // maximum age of a history entry
@@ -376,7 +376,7 @@ private:
* A timer that will emit the KParts::HistoryProvider::updated() signal
* thru the slotEmitUpdated slot.
*/
- QTimer *m_updateTimer;
+ TQTimer *m_updateTimer;
static const Q_UINT32 s_historyVersion;
};
diff --git a/libkonq/konq_iconviewwidget.cc b/libkonq/konq_iconviewwidget.cc
index f30873a9e..c3b255cc2 100644
--- a/libkonq/konq_iconviewwidget.cc
+++ b/libkonq/konq_iconviewwidget.cc
@@ -23,15 +23,15 @@
#include "konq_sound.h"
#include "konq_filetip.h"
-#include <qclipboard.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qmovie.h>
-#include <qregexp.h>
-#include <qcursor.h>
+#include <tqclipboard.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqmovie.h>
+#include <tqregexp.h>
+#include <tqcursor.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -88,7 +88,7 @@ struct KonqIconViewWidgetPrivate
// Sound preview
KFileIVI *pSoundItem;
KonqSoundPlayer *pSoundPlayer;
- QTimer *pSoundTimer;
+ TQTimer *pSoundTimer;
bool bSoundPreviews;
bool bSoundItemClicked;
bool bAllowSetWallpaper;
@@ -97,48 +97,48 @@ struct KonqIconViewWidgetPrivate
// Animated icons support
bool doAnimations;
- QMovie* m_movie;
+ TQMovie* m_movie;
int m_movieBlocked;
- QString movieFileName;
+ TQString movieFileName;
KIO::PreviewJob *pPreviewJob;
KonqFileTip* pFileTip;
- QStringList previewSettings;
+ TQStringList previewSettings;
bool renameItem;
bool firstClick;
bool releaseMouseEvent;
- QPoint mousePos;
+ TQPoint mousePos;
int mouseState;
- QTimer *pActivateDoubleClick;
- QStringList* pPreviewMimeTypes;
+ TQTimer *pActivateDoubleClick;
+ TQStringList* pPreviewMimeTypes;
bool bProgramsURLdrag;
};
-KonqIconViewWidget::KonqIconViewWidget( QWidget * parent, const char * name, WFlags f, bool kdesktop )
+KonqIconViewWidget::KonqIconViewWidget( TQWidget * parent, const char * name, WFlags f, bool kdesktop )
: KIconView( parent, name, f ),
m_rootItem( 0L ), m_size( 0 ) /* default is DesktopIcon size */,
m_bDesktop( kdesktop ),
m_bSetGridX( !kdesktop ) /* No line breaking on the desktop */
{
d = new KonqIconViewWidgetPrivate;
- connect( this, SIGNAL( dropped( QDropEvent *, const QValueList<QIconDragItem> & ) ),
- this, SLOT( slotDropped( QDropEvent*, const QValueList<QIconDragItem> & ) ) );
+ connect( this, TQT_SIGNAL( dropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ),
+ this, TQT_SLOT( slotDropped( TQDropEvent*, const TQValueList<TQIconDragItem> & ) ) );
- connect( this, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
kapp->addKipcEventMask( KIPC::IconChanged );
- connect( kapp, SIGNAL(iconChanged(int)), SLOT(slotIconChanged(int)) );
- connect( this, SIGNAL(onItem(QIconViewItem *)), SLOT(slotOnItem(QIconViewItem *)) );
- connect( this, SIGNAL(onViewport()), SLOT(slotOnViewport()) );
- connect( this, SIGNAL(itemRenamed(QIconViewItem *, const QString &)), SLOT(slotItemRenamed(QIconViewItem *, const QString &)) );
+ connect( kapp, TQT_SIGNAL(iconChanged(int)), TQT_SLOT(slotIconChanged(int)) );
+ connect( this, TQT_SIGNAL(onItem(TQIconViewItem *)), TQT_SLOT(slotOnItem(TQIconViewItem *)) );
+ connect( this, TQT_SIGNAL(onViewport()), TQT_SLOT(slotOnViewport()) );
+ connect( this, TQT_SIGNAL(itemRenamed(TQIconViewItem *, const TQString &)), TQT_SLOT(slotItemRenamed(TQIconViewItem *, const TQString &)) );
m_pSettings = KonqFMSettings::settings(); // already needed in setItemTextPos(), calculateGridX()
d->bBoostPreview = boostPreview();
// hardcoded settings
- setSelectionMode( QIconView::Extended );
- setItemTextPos( QIconView::Bottom );
+ setSelectionMode( TQIconView::Extended );
+ setItemTextPos( TQIconView::Bottom );
d->releaseMouseEvent = false;
d->pFileTip = new KonqFileTip(this);
d->firstClick = false;
@@ -151,7 +151,7 @@ KonqIconViewWidget::KonqIconViewWidget( QWidget * parent, const char * name, WFl
m_LineupMode = LineupBoth;
// emit our signals
slotSelectionChanged();
- m_iconPositionGroupPrefix = QString::fromLatin1( "IconPosition::" );
+ m_iconPositionGroupPrefix = TQString::fromLatin1( "IconPosition::" );
KonqUndoManager::incRef();
}
@@ -172,7 +172,7 @@ void KonqIconViewWidget::setMaySetWallpaper(bool b)
d->bAllowSetWallpaper = b;
}
-void KonqIconViewWidget::focusOutEvent( QFocusEvent * ev )
+void KonqIconViewWidget::focusOutEvent( TQFocusEvent * ev )
{
// We can't possibly have the mouse pressed and still lose focus.
// Well, we can, but when we regain focus we should assume the mouse is
@@ -189,7 +189,7 @@ void KonqIconViewWidget::focusOutEvent( QFocusEvent * ev )
KIconView::focusOutEvent( ev );
}
-void KonqIconViewWidget::slotItemRenamed(QIconViewItem *item, const QString &name)
+void KonqIconViewWidget::slotItemRenamed(TQIconViewItem *item, const TQString &name)
{
kdDebug(1203) << "KonqIconViewWidget::slotItemRenamed" << endl;
KFileIVI *viewItem = static_cast<KFileIVI *>(item);
@@ -231,7 +231,7 @@ void KonqIconViewWidget::readAnimatedIconsConfig()
d->doAnimations = cfgGroup.readBoolEntry( "Animated", true /*default*/ );
}
-void KonqIconViewWidget::slotOnItem( QIconViewItem *_item )
+void KonqIconViewWidget::slotOnItem( TQIconViewItem *_item )
{
KFileIVI* item = static_cast<KFileIVI *>( _item );
// Reset icon of previous item
@@ -284,7 +284,7 @@ void KonqIconViewWidget::slotOnItem( QIconViewItem *_item )
else {
kdDebug(1203) << "we go ahead.." << endl;
d->m_movieBlocked++;
- QTimer::singleShot(300, this, SLOT(slotReenableAnimation()));
+ TQTimer::singleShot(300, this, TQT_SLOT(slotReenableAnimation()));
d->m_movie->restart();
d->m_movie->unpause();
}
@@ -292,14 +292,14 @@ void KonqIconViewWidget::slotOnItem( QIconViewItem *_item )
else
#endif
{
- QMovie movie = KGlobal::iconLoader()->loadMovie( d->pActiveItem->mouseOverAnimation(), KIcon::Desktop, d->pActiveItem->iconSize() );
+ TQMovie movie = KGlobal::iconLoader()->loadMovie( d->pActiveItem->mouseOverAnimation(), KIcon::Desktop, d->pActiveItem->iconSize() );
if ( !movie.isNull() )
{
delete d->m_movie;
- d->m_movie = new QMovie( movie ); // shallow copy, don't worry
+ d->m_movie = new TQMovie( movie ); // shallow copy, don't worry
// Fix alpha-channel - currently only if no background pixmap,
// the bg pixmap case requires to uncomment the code at qmovie.cpp:404
- const QPixmap* pm = backgroundPixmap();
+ const TQPixmap* pm = backgroundPixmap();
bool hasPixmap = pm && !pm->isNull();
if ( !hasPixmap ) {
pm = viewport()->backgroundPixmap();
@@ -307,8 +307,8 @@ void KonqIconViewWidget::slotOnItem( QIconViewItem *_item )
}
if (!hasPixmap && backgroundMode() != NoBackground)
d->m_movie->setBackgroundColor( viewport()->backgroundColor() );
- d->m_movie->connectUpdate( this, SLOT( slotMovieUpdate(const QRect &) ) );
- d->m_movie->connectStatus( this, SLOT( slotMovieStatus(int) ) );
+ d->m_movie->connectUpdate( this, TQT_SLOT( slotMovieUpdate(const TQRect &) ) );
+ d->m_movie->connectStatus( this, TQT_SLOT( slotMovieStatus(int) ) );
d->movieFileName = d->pActiveItem->mouseOverAnimation();
d->pActiveItem->setAnimated( true );
}
@@ -318,7 +318,7 @@ void KonqIconViewWidget::slotOnItem( QIconViewItem *_item )
if (d->m_movie)
d->m_movie->pause();
// No movie available, remember it
- d->pActiveItem->setMouseOverAnimation( QString::null );
+ d->pActiveItem->setMouseOverAnimation( TQString::null );
}
}
} // animations
@@ -355,8 +355,8 @@ void KonqIconViewWidget::slotOnItem( QIconViewItem *_item )
d->bSoundItemClicked = false;
if (!d->pSoundTimer)
{
- d->pSoundTimer = new QTimer(this);
- connect(d->pSoundTimer, SIGNAL(timeout()), SLOT(slotStartSoundPreview()));
+ d->pSoundTimer = new TQTimer(this);
+ connect(d->pSoundTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotStartSoundPreview()));
}
if (d->pSoundTimer->isActive())
d->pSoundTimer->stop();
@@ -394,7 +394,7 @@ void KonqIconViewWidget::slotOnViewport()
d->m_movie->pause();
d->m_movieBlocked++;
kdDebug(1203) << "on viewport, blocking" << endl;
- QTimer::singleShot(300, this, SLOT(slotReenableAnimation()));
+ TQTimer::singleShot(300, this, TQT_SLOT(slotReenableAnimation()));
}
#endif
d->pActiveItem->refreshIcon( true );
@@ -419,16 +419,16 @@ void KonqIconViewWidget::slotStartSoundPreview()
}
-void KonqIconViewWidget::slotPreview(const KFileItem *item, const QPixmap &pix)
+void KonqIconViewWidget::slotPreview(const KFileItem *item, const TQPixmap &pix)
{
// ### slow. Idea: move KonqKfmIconView's m_itemDict into this class
- for (QIconViewItem *it = firstItem(); it; it = it->nextItem())
+ for (TQIconViewItem *it = firstItem(); it; it = it->nextItem())
{
KFileIVI* current = static_cast<KFileIVI *>(it);
if (current->item() == item)
{
if (item->overlays() & KIcon::HiddenOverlay) {
- QPixmap p(pix);
+ TQPixmap p(pix);
KIconEffect::semiTransparent(p);
current->setThumbnailPixmap(p);
@@ -446,7 +446,7 @@ void KonqIconViewWidget::slotPreviewResult()
emit imagePreviewFinished();
}
-void KonqIconViewWidget::slotToolTipPreview(const KFileItem* , const QPixmap &)
+void KonqIconViewWidget::slotToolTipPreview(const KFileItem* , const TQPixmap &)
{
// unused - remove for KDE4
}
@@ -456,14 +456,14 @@ void KonqIconViewWidget::slotToolTipPreviewResult()
// unused - remove for KDE4
}
-void KonqIconViewWidget::slotMovieUpdate( const QRect& rect )
+void KonqIconViewWidget::slotMovieUpdate( const TQRect& rect )
{
//kdDebug(1203) << "KonqIconViewWidget::slotMovieUpdate " << rect.x() << "," << rect.y() << " " << rect.width() << "x" << rect.height() << endl;
Q_ASSERT( d );
Q_ASSERT( d->m_movie );
// seems stopAnimation triggers one last update
if ( d->pActiveItem && d->m_movie && d->pActiveItem->isAnimated() ) {
- const QPixmap &frame = d->m_movie->framePixmap();
+ const TQPixmap &frame = d->m_movie->framePixmap();
// This can happen if the icon was scaled to the desired size, so KIconLoader
// will happily return a movie with different dimensions than the icon
int iconSize=d->pActiveItem->iconSize();
@@ -472,12 +472,12 @@ void KonqIconViewWidget::slotMovieUpdate( const QRect& rect )
d->pActiveItem->setAnimated( false );
d->m_movie->pause();
// No movie available, remember it
- d->pActiveItem->setMouseOverAnimation( QString::null );
+ d->pActiveItem->setMouseOverAnimation( TQString::null );
d->pActiveItem->setActive( true );
return;
}
d->pActiveItem->setPixmapDirect( frame, false, false /*no redraw*/ );
- QRect pixRect = d->pActiveItem->pixmapRect(false);
+ TQRect pixRect = d->pActiveItem->pixmapRect(false);
repaintContents( pixRect.x() + rect.x(), pixRect.y() + rect.y(), rect.width(), rect.height(), false );
}
}
@@ -488,7 +488,7 @@ void KonqIconViewWidget::slotMovieStatus( int status )
// Error playing the MNG -> forget about it and do normal iconeffect
if ( d->pActiveItem && d->pActiveItem->isAnimated() ) {
d->pActiveItem->setAnimated( false );
- d->pActiveItem->setMouseOverAnimation( QString::null );
+ d->pActiveItem->setMouseOverAnimation( TQString::null );
d->pActiveItem->setActive( true );
}
}
@@ -513,7 +513,7 @@ void KonqIconViewWidget::clear()
d->pActiveItem = 0L;
}
-void KonqIconViewWidget::takeItem( QIconViewItem *item )
+void KonqIconViewWidget::takeItem( TQIconViewItem *item )
{
if ( d->pActiveItem == static_cast<KFileIVI *>(item) )
{
@@ -528,7 +528,7 @@ void KonqIconViewWidget::takeItem( QIconViewItem *item )
}
// Currently unused - remove in KDE 4.0
-void KonqIconViewWidget::setThumbnailPixmap( KFileIVI * item, const QPixmap & pixmap )
+void KonqIconViewWidget::setThumbnailPixmap( KFileIVI * item, const TQPixmap & pixmap )
{
if ( item )
{
@@ -552,19 +552,19 @@ bool KonqIconViewWidget::initConfig( bool bInit )
bool fontChanged = false;
// Color settings
- QColor normalTextColor = m_pSettings->normalTextColor();
+ TQColor normalTextColor = m_pSettings->normalTextColor();
setItemColor( normalTextColor );
if (m_bDesktop)
{
- QColor itemTextBg = m_pSettings->itemTextBackground();
+ TQColor itemTextBg = m_pSettings->itemTextBackground();
if ( itemTextBg.isValid() )
setItemTextBackground( itemTextBg );
else
setItemTextBackground( NoBrush );
}
- bool on = m_pSettings->showFileTips() && QToolTip::isGloballyEnabled();
+ bool on = m_pSettings->showFileTips() && TQToolTip::isGloballyEnabled();
d->pFileTip->setOptions(on,
m_pSettings->showPreviewsInFileTips(),
m_pSettings->numFileTips());
@@ -573,7 +573,7 @@ bool KonqIconViewWidget::initConfig( bool bInit )
setShowToolTips(!on);
// Font settings
- QFont font( m_pSettings->standardFont() );
+ TQFont font( m_pSettings->standardFont() );
if (!m_bDesktop)
font.setUnderline( m_pSettings->underlineLink() );
@@ -582,7 +582,7 @@ bool KonqIconViewWidget::initConfig( bool bInit )
setFont( font );
if (!bInit)
{
- // QIconView doesn't do it by default... but if the font is made much
+ // TQIconView doesn't do it by default... but if the font is made much
// bigger, we really need to give more space between the icons
fontChanged = true;
}
@@ -590,7 +590,7 @@ bool KonqIconViewWidget::initConfig( bool bInit )
setIconTextHeight( m_pSettings->iconTextHeight() );
- if ( (itemTextPos() == QIconView::Right) && (maxItemWidth() != gridXValue()) )
+ if ( (itemTextPos() == TQIconView::Right) && (maxItemWidth() != gridXValue()) )
{
int size = m_size;
m_size = -1; // little trick to force grid change in setIcons
@@ -622,7 +622,7 @@ void KonqIconViewWidget::disableSoundPreviews()
d->pSoundTimer->stop();
}
-void KonqIconViewWidget::setIcons( int size, const QStringList& stopImagePreviewFor )
+void KonqIconViewWidget::setIcons( int size, const TQStringList& stopImagePreviewFor )
{
// size has changed?
bool sizeChanged = (m_size != size);
@@ -639,7 +639,7 @@ void KonqIconViewWidget::setIcons( int size, const QStringList& stopImagePreview
int realSize = size ? size : KGlobal::iconLoader()->currentSize( KIcon::Desktop );
// choose spacing depending on font, but min 5 (due to KFileIVI move limit)
setSpacing( ( m_bDesktop || ( realSize > KIcon::SizeSmall ) ) ?
- QMAX( 5, QFontMetrics(font()).width('n') ) : 0 );
+ QMAX( 5, TQFontMetrics(font()).width('n') ) : 0 );
}
if ( sizeChanged || previewSizeChanged || !stopImagePreviewFor.isEmpty() )
@@ -656,7 +656,7 @@ void KonqIconViewWidget::setIcons( int size, const QStringList& stopImagePreview
viewport()->setUpdatesEnabled( false );
// Do this even if size didn't change, since this is used by refreshMimeTypes...
- for ( QIconViewItem *it = firstItem(); it; it = it->nextItem() ) {
+ for ( TQIconViewItem *it = firstItem(); it; it = it->nextItem() ) {
KFileIVI * ivi = static_cast<KFileIVI *>( it );
// Set a normal icon for files that are not thumbnails, and for files
// that are thumbnails but for which it should be stopped
@@ -682,22 +682,22 @@ void KonqIconViewWidget::setIcons( int size, const QStringList& stopImagePreview
viewport()->update(); //Repaint later..
}
-bool KonqIconViewWidget::mimeTypeMatch( const QString& mimeType, const QStringList& mimeList ) const
+bool KonqIconViewWidget::mimeTypeMatch( const TQString& mimeType, const TQStringList& mimeList ) const
{
// Code duplication from KIO::PreviewJob
KMimeType::Ptr mime = KMimeType::mimeType( mimeType );
- for (QStringList::ConstIterator mt = mimeList.begin(); mt != mimeList.end(); ++mt)
+ for (TQStringList::ConstIterator mt = mimeList.begin(); mt != mimeList.end(); ++mt)
{
if ( mime->is( *mt ) )
return true;
// Support for *mt == "image/*"
- QString tmp( mimeType );
- if ( (*mt).endsWith("*") && tmp.replace(QRegExp("/.*"), "/*") == (*mt) )
+ TQString tmp( mimeType );
+ if ( (*mt).endsWith("*") && tmp.replace(TQRegExp("/.*"), "/*") == (*mt) )
return true;
if ( (*mt) == "text/plain" )
{
- QVariant textProperty = mime->property( "X-KDE-text" );
- if ( textProperty.type() == QVariant::Bool && textProperty.toBool() )
+ TQVariant textProperty = mime->property( "X-KDE-text" );
+ if ( textProperty.type() == TQVariant::Bool && textProperty.toBool() )
return true;
}
}
@@ -710,7 +710,7 @@ void KonqIconViewWidget::setItemTextPos( ItemTextPos pos )
int sz = m_size ? m_size : KGlobal::iconLoader()->currentSize( KIcon::Desktop );
if ( m_bSetGridX )
- if ( pos == QIconView::Bottom )
+ if ( pos == TQIconView::Bottom )
setGridX( QMAX( sz + 50, previewIconSize( sz ) + 13 ) );
else
{
@@ -774,7 +774,7 @@ void KonqIconViewWidget::gridValues( int* x, int* y, int* dx, int* dy,
void KonqIconViewWidget::calculateGridX()
{
if ( m_bSetGridX )
- if ( itemTextPos() == QIconView::Bottom )
+ if ( itemTextPos() == TQIconView::Bottom )
setGridX( gridXValue() );
else
{
@@ -789,7 +789,7 @@ int KonqIconViewWidget::gridXValue() const
int sz = m_size ? m_size : KGlobal::iconLoader()->currentSize( KIcon::Desktop );
int newGridX;
- if ( itemTextPos() == QIconView::Bottom )
+ if ( itemTextPos() == TQIconView::Bottom )
newGridX = QMAX( sz + 50, previewIconSize( sz ) + 13 );
else
newGridX = QMAX( sz, previewIconSize( sz ) ) + m_pSettings->iconTextWidth();
@@ -801,7 +801,7 @@ int KonqIconViewWidget::gridXValue() const
void KonqIconViewWidget::refreshMimeTypes()
{
updatePreviewMimeTypes();
- for ( QIconViewItem *it = firstItem(); it; it = it->nextItem() )
+ for ( TQIconViewItem *it = firstItem(); it; it = it->nextItem() )
(static_cast<KFileIVI *>( it ))->item()->refreshMimeType();
setIcons( m_size );
}
@@ -816,10 +816,10 @@ void KonqIconViewWidget::setURL( const KURL &kurl )
if ( m_url.isLocalFile() )
m_dotDirectoryPath = m_url.path(1).append( ".directory" );
else
- m_dotDirectoryPath = QString::null;
+ m_dotDirectoryPath = TQString::null;
}
-void KonqIconViewWidget::startImagePreview( const QStringList &, bool force )
+void KonqIconViewWidget::startImagePreview( const TQStringList &, bool force )
{
stopImagePreview(); // just in case
@@ -841,12 +841,12 @@ void KonqIconViewWidget::startImagePreview( const QStringList &, bool force )
}
KFileItemList items;
- for ( QIconViewItem *it = firstItem(); it; it = it->nextItem() )
+ for ( TQIconViewItem *it = firstItem(); it; it = it->nextItem() )
if ( force || !static_cast<KFileIVI *>( it )->hasValidThumbnail() )
items.append( static_cast<KFileIVI *>( it )->item() );
bool onlyAudio = true;
- for ( QStringList::ConstIterator it = d->previewSettings.begin(); it != d->previewSettings.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = d->previewSettings.begin(); it != d->previewSettings.end(); ++it ) {
if ( (*it).startsWith( "audio/" ) )
d->bSoundPreviews = true;
else
@@ -870,10 +870,10 @@ void KonqIconViewWidget::startImagePreview( const QStringList &, bool force )
d->pPreviewJob = KIO::filePreview( items, size, size, iconSize,
m_pSettings->textPreviewIconTransparency(), true /* scale */,
true /* save */, &(d->previewSettings) );
- connect( d->pPreviewJob, SIGNAL( gotPreview( const KFileItem *, const QPixmap & ) ),
- this, SLOT( slotPreview( const KFileItem *, const QPixmap & ) ) );
- connect( d->pPreviewJob, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotPreviewResult() ) );
+ connect( d->pPreviewJob, TQT_SIGNAL( gotPreview( const KFileItem *, const TQPixmap & ) ),
+ this, TQT_SLOT( slotPreview( const KFileItem *, const TQPixmap & ) ) );
+ connect( d->pPreviewJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotPreviewResult() ) );
}
void KonqIconViewWidget::stopImagePreview()
@@ -896,7 +896,7 @@ KFileItemList KonqIconViewWidget::selectedFileItems()
{
KFileItemList lstItems;
- QIconViewItem *it = firstItem();
+ TQIconViewItem *it = firstItem();
for (; it; it = it->nextItem() )
if ( it->isSelected() ) {
KFileItem *fItem = (static_cast<KFileIVI *>(it))->item();
@@ -905,7 +905,7 @@ KFileItemList KonqIconViewWidget::selectedFileItems()
return lstItems;
}
-void KonqIconViewWidget::slotDropped( QDropEvent *ev, const QValueList<QIconDragItem> & )
+void KonqIconViewWidget::slotDropped( TQDropEvent *ev, const TQValueList<TQIconDragItem> & )
{
// Drop on background
KURL dirURL = url();
@@ -916,26 +916,26 @@ void KonqIconViewWidget::slotDropped( QDropEvent *ev, const QValueList<QIconDrag
KonqOperations::doDrop( m_rootItem /* may be 0L */, dirURL, ev, this );
}
-void KonqIconViewWidget::slotAboutToCreate(const QPoint &, const QValueList<KIO::CopyInfo> &)
+void KonqIconViewWidget::slotAboutToCreate(const TQPoint &, const TQValueList<KIO::CopyInfo> &)
{
// Do nothing :-)
}
-void KonqIconViewWidget::drawBackground( QPainter *p, const QRect &r )
+void KonqIconViewWidget::drawBackground( TQPainter *p, const TQRect &r )
{
drawBackground(p, r, r.topLeft());
}
-void KonqIconViewWidget::drawBackground( QPainter *p, const QRect &r , const QPoint &pt)
+void KonqIconViewWidget::drawBackground( TQPainter *p, const TQRect &r , const TQPoint &pt)
{
- const QPixmap *pm = backgroundPixmap();
+ const TQPixmap *pm = backgroundPixmap();
bool hasPixmap = pm && !pm->isNull();
if ( !hasPixmap ) {
pm = viewport()->backgroundPixmap();
hasPixmap = pm && !pm->isNull();
}
- QRect rtgt(r);
+ TQRect rtgt(r);
rtgt.moveTopLeft(pt);
if (!hasPixmap && backgroundMode() != NoBackground) {
p->fillRect(rtgt, viewport()->backgroundColor());
@@ -945,11 +945,11 @@ void KonqIconViewWidget::drawBackground( QPainter *p, const QRect &r , const QPo
if (hasPixmap) {
int ax = (r.x() + contentsX() + leftMargin()) % pm->width();
int ay = (r.y() + contentsY() + topMargin()) % pm->height();
- p->drawTiledPixmap(rtgt, *pm, QPoint(ax, ay));
+ p->drawTiledPixmap(rtgt, *pm, TQPoint(ax, ay));
}
}
-QDragObject * KonqIconViewWidget::dragObject()
+TQDragObject * KonqIconViewWidget::dragObject()
{
if ( !currentItem() )
return 0;
@@ -957,14 +957,14 @@ QDragObject * KonqIconViewWidget::dragObject()
return konqDragObject( viewport() );
}
-KonqIconDrag * KonqIconViewWidget::konqDragObject( QWidget * dragSource )
+KonqIconDrag * KonqIconViewWidget::konqDragObject( TQWidget * dragSource )
{
//kdDebug(1203) << "KonqIconViewWidget::konqDragObject" << endl;
KonqIconDrag2 * drag = new KonqIconDrag2( dragSource );
- QIconViewItem *primaryItem = currentItem();
+ TQIconViewItem *primaryItem = currentItem();
// Append all items to the drag object
- for ( QIconViewItem *it = firstItem(); it; it = it->nextItem() ) {
+ for ( TQIconViewItem *it = firstItem(); it; it = it->nextItem() ) {
if ( it->isSelected() ) {
if (!primaryItem)
primaryItem = it;
@@ -972,14 +972,14 @@ KonqIconDrag * KonqIconViewWidget::konqDragObject( QWidget * dragSource )
KURL url = fileItem->url();
bool dummy;
KURL mostLocalURL = fileItem->mostLocalURL(dummy);
- QString itemURL = KURLDrag::urlToString(url);
+ TQString itemURL = KURLDrag::urlToString(url);
kdDebug(1203) << "itemURL=" << itemURL << endl;
- QIconDragItem id;
- id.setData( QCString(itemURL.latin1()) );
+ TQIconDragItem id;
+ id.setData( TQCString(itemURL.latin1()) );
drag->append( id,
- QRect( it->pixmapRect(false).topLeft() - m_mousePos,
+ TQRect( it->pixmapRect(false).topLeft() - m_mousePos,
it->pixmapRect().size() ),
- QRect( it->textRect(false).topLeft() - m_mousePos,
+ TQRect( it->textRect(false).topLeft() - m_mousePos,
it->textRect().size() ),
itemURL, mostLocalURL );
}
@@ -991,11 +991,11 @@ KonqIconDrag * KonqIconViewWidget::konqDragObject( QWidget * dragSource )
return drag;
}
-void KonqIconViewWidget::contentsDragEnterEvent( QDragEnterEvent *e )
+void KonqIconViewWidget::contentsDragEnterEvent( TQDragEnterEvent *e )
{
if ( e->provides( "text/uri-list" ) )
{
- QByteArray payload = e->encodedData( "text/uri-list" );
+ TQByteArray payload = e->encodedData( "text/uri-list" );
if ( !payload.size() )
kdError() << "Empty data !" << endl;
// Cache the URLs, since we need them every time we move over a file
@@ -1021,7 +1021,7 @@ void KonqIconViewWidget::contentsDragEnterEvent( QDragEnterEvent *e )
emit dragEntered( true /*accepted*/ );
}
-void KonqIconViewWidget::contentsDragMoveEvent( QDragMoveEvent *e )
+void KonqIconViewWidget::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if ( d->bProgramsURLdrag ) {
emit dragMove( false );
@@ -1030,7 +1030,7 @@ void KonqIconViewWidget::contentsDragMoveEvent( QDragMoveEvent *e )
return;
}
- QIconViewItem *item = findItem( e->pos() );
+ TQIconViewItem *item = findItem( e->pos() );
if ( e->source() != viewport() &&
!item && m_rootItem && !m_rootItem->isWritable() ) {
emit dragMove( false );
@@ -1042,7 +1042,7 @@ void KonqIconViewWidget::contentsDragMoveEvent( QDragMoveEvent *e )
KIconView::contentsDragMoveEvent( e );
}
-void KonqIconViewWidget::contentsDragLeaveEvent( QDragLeaveEvent *e )
+void KonqIconViewWidget::contentsDragLeaveEvent( TQDragLeaveEvent *e )
{
d->bProgramsURLdrag = false;
KIconView::contentsDragLeaveEvent(e);
@@ -1050,19 +1050,19 @@ void KonqIconViewWidget::contentsDragLeaveEvent( QDragLeaveEvent *e )
}
-void KonqIconViewWidget::setItemColor( const QColor &c )
+void KonqIconViewWidget::setItemColor( const TQColor &c )
{
iColor = c;
}
-QColor KonqIconViewWidget::itemColor() const
+TQColor KonqIconViewWidget::itemColor() const
{
return iColor;
}
void KonqIconViewWidget::disableIcons( const KURL::List & lst )
{
- for ( QIconViewItem *kit = firstItem(); kit; kit = kit->nextItem() )
+ for ( TQIconViewItem *kit = firstItem(); kit; kit = kit->nextItem() )
{
bool bFound = false;
// Wow. This is ugly. Matching two lists together....
@@ -1088,7 +1088,7 @@ void KonqIconViewWidget::slotSelectionChanged()
bool bInTrash = false;
int iCount = 0;
- for ( QIconViewItem *it = firstItem(); it; it = it->nextItem() )
+ for ( TQIconViewItem *it = firstItem(); it; it = it->nextItem() )
{
if ( it->isSelected() )
{
@@ -1097,7 +1097,7 @@ void KonqIconViewWidget::slotSelectionChanged()
KFileItem *item = ( static_cast<KFileIVI *>( it ) )->item();
KURL url = item->url();
- QString local_path = item->localPath();
+ TQString local_path = item->localPath();
if ( url.directory(false) == KGlobalSettings::trashPath() )
bInTrash = true;
@@ -1126,8 +1126,8 @@ void KonqIconViewWidget::renameCurrentItem()
void KonqIconViewWidget::renameSelectedItem()
{
kdDebug(1203) << " -- KonqIconViewWidget::renameSelectedItem() -- " << endl;
- QIconViewItem * item = 0L;
- QIconViewItem *it = firstItem();
+ TQIconViewItem * item = 0L;
+ TQIconViewItem *it = firstItem();
for (; it; it = it->nextItem() )
if ( it->isSelected() && !item )
{
@@ -1147,14 +1147,14 @@ void KonqIconViewWidget::cutSelection()
kdDebug(1203) << " -- KonqIconViewWidget::cutSelection() -- " << endl;
KonqIconDrag * obj = konqDragObject( /* no parent ! */ );
obj->setMoveSelection( true );
- QApplication::clipboard()->setData( obj );
+ TQApplication::clipboard()->setData( obj );
}
void KonqIconViewWidget::copySelection()
{
kdDebug(1203) << " -- KonqIconViewWidget::copySelection() -- " << endl;
KonqIconDrag * obj = konqDragObject( /* no parent ! */ );
- QApplication::clipboard()->setData( obj );
+ TQApplication::clipboard()->setData( obj );
}
void KonqIconViewWidget::pasteSelection()
@@ -1176,7 +1176,7 @@ KURL::List KonqIconViewWidget::selectedUrls( UrlFlags flags ) const
{
KURL::List lstURLs;
bool dummy;
- for ( QIconViewItem *it = firstItem(); it; it = it->nextItem() )
+ for ( TQIconViewItem *it = firstItem(); it; it = it->nextItem() )
if ( it->isSelected() ) {
KFileItem* item = (static_cast<KFileIVI *>( it ))->item();
lstURLs.append( flags == MostLocalUrls ? item->mostLocalURL( dummy ) : item->url() );
@@ -1184,12 +1184,12 @@ KURL::List KonqIconViewWidget::selectedUrls( UrlFlags flags ) const
return lstURLs;
}
-QRect KonqIconViewWidget::iconArea() const
+TQRect KonqIconViewWidget::iconArea() const
{
return m_IconRect;
}
-void KonqIconViewWidget::setIconArea(const QRect &rect)
+void KonqIconViewWidget::setIconArea(const TQRect &rect)
{
m_IconRect = rect;
}
@@ -1214,14 +1214,14 @@ void KonqIconViewWidget::setSortDirectoriesFirst( bool b )
m_bSortDirsFirst = b;
}
-void KonqIconViewWidget::contentsMouseMoveEvent( QMouseEvent *e )
+void KonqIconViewWidget::contentsMouseMoveEvent( TQMouseEvent *e )
{
if ( (d->pSoundPlayer && d->pSoundPlayer->isPlaying()) || (d->pSoundTimer && d->pSoundTimer->isActive()))
{
// The following call is SO expensive (the ::widgetAt call eats up to 80%
// of the mouse move cpucycles!), so it's mandatory to place that function
// under strict checks, such as d->pSoundPlayer->isPlaying()
- if ( QApplication::widgetAt( QCursor::pos() ) != topLevelWidget() )
+ if ( TQApplication::widgetAt( TQCursor::pos() ) != topLevelWidget() )
{
if (d->pSoundPlayer)
d->pSoundPlayer->stop();
@@ -1234,9 +1234,9 @@ void KonqIconViewWidget::contentsMouseMoveEvent( QMouseEvent *e )
KIconView::contentsMouseMoveEvent( e );
}
-void KonqIconViewWidget::contentsDropEvent( QDropEvent * ev )
+void KonqIconViewWidget::contentsDropEvent( TQDropEvent * ev )
{
- QIconViewItem *i = findItem( ev->pos() );
+ TQIconViewItem *i = findItem( ev->pos() );
if ( ev->source() != viewport() &&
!i && m_rootItem && !m_rootItem->isWritable() ) {
@@ -1244,18 +1244,18 @@ void KonqIconViewWidget::contentsDropEvent( QDropEvent * ev )
return;
}
- // Short-circuit QIconView if Ctrl is pressed, so that it's possible
+ // Short-circuit TQIconView if Ctrl is pressed, so that it's possible
// to drop a file into its own parent widget to copy it.
- if ( !i && (ev->action() == QDropEvent::Copy || ev->action() == QDropEvent::Link)
+ if ( !i && (ev->action() == TQDropEvent::Copy || ev->action() == TQDropEvent::Link)
&& ev->source() && ev->source() == viewport())
{
- // First we need to call QIconView though, to clear the drag shape
+ // First we need to call TQIconView though, to clear the drag shape
bool bMovable = itemsMovable();
setItemsMovable(false); // hack ? call it what you want :-)
KIconView::contentsDropEvent( ev );
setItemsMovable(bMovable);
- QValueList<QIconDragItem> lst;
+ TQValueList<TQIconDragItem> lst;
slotDropped(ev, lst);
}
else
@@ -1280,8 +1280,8 @@ void KonqIconViewWidget::doubleClickTimeout()
mousePressChangeValue();
if ( d->releaseMouseEvent )
{
- QMouseEvent e( QEvent::MouseButtonPress,d->mousePos , 1, d->mouseState);
- QIconViewItem* item = findItem( e.pos() );
+ TQMouseEvent e( TQEvent::MouseButtonPress,d->mousePos , 1, d->mouseState);
+ TQIconViewItem* item = findItem( e.pos() );
KURL url;
if ( item )
{
@@ -1301,7 +1301,7 @@ void KonqIconViewWidget::doubleClickTimeout()
}
else
{
- QMouseEvent e( QEvent::MouseMove,d->mousePos , 1, d->mouseState);
+ TQMouseEvent e( TQEvent::MouseMove,d->mousePos , 1, d->mouseState);
KIconView::contentsMousePressEvent( &e );
}
if( d->pActivateDoubleClick->isActive() )
@@ -1311,7 +1311,7 @@ void KonqIconViewWidget::doubleClickTimeout()
d->renameItem= false;
}
-void KonqIconViewWidget::wheelEvent(QWheelEvent* e)
+void KonqIconViewWidget::wheelEvent(TQWheelEvent* e)
{
// when scrolling with mousewheel, stop possible pending filetip
d->pFileTip->setItem( 0 );
@@ -1333,7 +1333,7 @@ void KonqIconViewWidget::wheelEvent(QWheelEvent* e)
KIconView::wheelEvent(e);
}
-void KonqIconViewWidget::leaveEvent( QEvent *e )
+void KonqIconViewWidget::leaveEvent( TQEvent *e )
{
// when leaving the widget, stop possible pending filetip and icon effect
slotOnViewport();
@@ -1355,11 +1355,11 @@ void KonqIconViewWidget::mousePressChangeValue()
d->pFileTip->setItem( 0 );
}
-void KonqIconViewWidget::contentsMousePressEvent( QMouseEvent *e )
+void KonqIconViewWidget::contentsMousePressEvent( TQMouseEvent *e )
{
if(d->pActivateDoubleClick && d->pActivateDoubleClick->isActive ())
d->pActivateDoubleClick->stop();
- QIconViewItem* item = findItem( e->pos() );
+ TQIconViewItem* item = findItem( e->pos() );
m_mousePos = e->pos();
KURL url;
if ( item )
@@ -1375,13 +1375,13 @@ void KonqIconViewWidget::contentsMousePressEvent( QMouseEvent *e )
d->mouseState = e->state();
if (!d->pActivateDoubleClick)
{
- d->pActivateDoubleClick = new QTimer(this);
- connect(d->pActivateDoubleClick, SIGNAL(timeout()), this, SLOT(doubleClickTimeout()));
+ d->pActivateDoubleClick = new TQTimer(this);
+ connect(d->pActivateDoubleClick, TQT_SIGNAL(timeout()), this, TQT_SLOT(doubleClickTimeout()));
}
if( d->pActivateDoubleClick->isActive () )
d->pActivateDoubleClick->stop();
else
- d->pActivateDoubleClick->start(QApplication::doubleClickInterval());
+ d->pActivateDoubleClick->start(TQApplication::doubleClickInterval());
d->releaseMouseEvent = false;
return;
}
@@ -1397,7 +1397,7 @@ void KonqIconViewWidget::contentsMousePressEvent( QMouseEvent *e )
}
-void KonqIconViewWidget::contentsMouseReleaseEvent( QMouseEvent *e )
+void KonqIconViewWidget::contentsMouseReleaseEvent( TQMouseEvent *e )
{
KIconView::contentsMouseReleaseEvent( e );
if(d->releaseMouseEvent && d->pActivateDoubleClick && d->pActivateDoubleClick->isActive ())
@@ -1422,7 +1422,7 @@ void KonqIconViewWidget::slotSaveIconPositions()
return; // Currently not available in Konqueror
kdDebug(1214) << "KonqIconViewWidget::slotSaveIconPositions" << endl;
KSimpleConfig dotDirectory( m_dotDirectoryPath );
- QIconViewItem *it = firstItem();
+ TQIconViewItem *it = firstItem();
if ( !it )
return; // No more icons. Maybe we're closing and they've been removed already
while ( it )
@@ -1430,18 +1430,18 @@ void KonqIconViewWidget::slotSaveIconPositions()
KFileIVI *ivi = static_cast<KFileIVI *>( it );
KFileItem *item = ivi->item();
- dotDirectory.setGroup( QString( m_iconPositionGroupPrefix ).append( item->url().fileName() ) );
+ dotDirectory.setGroup( TQString( m_iconPositionGroupPrefix ).append( item->url().fileName() ) );
kdDebug(1214) << "KonqIconViewWidget::slotSaveIconPositions " << item->url().fileName() << " " << it->x() << " " << it->y() << endl;
- dotDirectory.writeEntry( QString( "X %1" ).arg( width() ), it->x() );
- dotDirectory.writeEntry( QString( "Y %1" ).arg( height() ), it->y() );
+ dotDirectory.writeEntry( TQString( "X %1" ).arg( width() ), it->x() );
+ dotDirectory.writeEntry( TQString( "Y %1" ).arg( height() ), it->y() );
dotDirectory.writeEntry( "Exists", true );
it = it->nextItem();
}
- QStringList groups = dotDirectory.groupList();
- QStringList::ConstIterator gIt = groups.begin();
- QStringList::ConstIterator gEnd = groups.end();
+ TQStringList groups = dotDirectory.groupList();
+ TQStringList::ConstIterator gIt = groups.begin();
+ TQStringList::ConstIterator gEnd = groups.end();
for (; gIt != gEnd; ++gIt )
if ( (*gIt).left( m_iconPositionGroupPrefix.length() ) == m_iconPositionGroupPrefix )
{
@@ -1465,10 +1465,10 @@ void KonqIconViewWidget::slotSaveIconPositions()
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
}
-// Adapted version of QIconView::insertInGrid, that works relative to
+// Adapted version of TQIconView::insertInGrid, that works relative to
// m_IconRect, instead of the entire viewport.
-void KonqIconViewWidget::insertInGrid(QIconViewItem *item)
+void KonqIconViewWidget::insertInGrid(TQIconViewItem *item)
{
if (0L == item)
return;
@@ -1479,8 +1479,8 @@ void KonqIconViewWidget::insertInGrid(QIconViewItem *item)
return;
}
- QRegion r(m_IconRect);
- QIconViewItem *i = firstItem();
+ TQRegion r(m_IconRect);
+ TQIconViewItem *i = firstItem();
int y = -1;
for (; i; i = i->nextItem() )
{
@@ -1488,12 +1488,12 @@ void KonqIconViewWidget::insertInGrid(QIconViewItem *item)
y = QMAX(y, i->y() + i->height());
}
- QMemArray<QRect> rects = r.rects();
- QMemArray<QRect>::Iterator it = rects.begin();
+ TQMemArray<TQRect> rects = r.rects();
+ TQMemArray<TQRect>::Iterator it = rects.begin();
bool foundPlace = FALSE;
for (; it != rects.end(); ++it)
{
- QRect rect = *it;
+ TQRect rect = *it;
if (rect.width() >= item->width() && rect.height() >= item->height())
{
int sx = 0, sy = 0;
@@ -1566,7 +1566,7 @@ void KonqIconViewWidget::lineupIcons()
int iconSize = m_size ? m_size : KGlobal::iconLoader()->currentSize( KIcon::Desktop );
- typedef QValueList<QIconViewItem*> Bin;
+ typedef TQValueList<TQIconViewItem*> Bin;
Bin*** bins = new Bin**[nx];
int i;
int j;
@@ -1579,7 +1579,7 @@ void KonqIconViewWidget::lineupIcons()
// Insert items into grid
int textHeight = iconTextHeight() * fontMetrics().height();
- for ( QIconViewItem* item = firstItem(); item; item = item->nextItem() ) {
+ for ( TQIconViewItem* item = firstItem(); item; item = item->nextItem() ) {
int x = item->x() + item->width() / 2 - x0;
int y = item->pixmapRect( false ).bottom() - iconSize / 2
- ( dy - ( iconSize + textHeight ) ) / 2 - y0;
@@ -1640,7 +1640,7 @@ void KonqIconViewWidget::lineupIcons()
}
// Move one item in the direction of the least friction
- QIconViewItem* movedItem;
+ TQIconViewItem* movedItem;
Bin* items = bins[i][j];
int mini = QMIN( QMIN( tf, bf ), QMIN( lf, rf ) );
@@ -1703,8 +1703,8 @@ void KonqIconViewWidget::lineupIcons()
}
// Perform the actual moving
- QRegion repaintRegion;
- QValueList<QIconViewItem*> movedItems;
+ TQRegion repaintRegion;
+ TQValueList<TQIconViewItem*> movedItems;
for ( i = 0; i < nx; i++ ) {
for ( j = 0; j < ny; j++ ) {
@@ -1712,13 +1712,13 @@ void KonqIconViewWidget::lineupIcons()
if ( !bin )
continue;
if ( !bin->isEmpty() ) {
- QIconViewItem* item = bin->first();
+ TQIconViewItem* item = bin->first();
int newX = x0 + i*dx + spacing() +
QMAX(0, ( (dx-spacing()) - item->width() ) / 2); // pixmap can be larger as iconsize
// align all icons vertically to their text
int newY = y0 + j*dy + dy - spacing() - ( item->pixmapRect().bottom() + 2 + textHeight );
if ( item->x() != newX || item->y() != newY ) {
- QRect oldRect = item->rect();
+ TQRect oldRect = item->rect();
movedItems.prepend( item );
item->move( newX, newY );
if ( item->rect() != oldRect )
@@ -1735,7 +1735,7 @@ void KonqIconViewWidget::lineupIcons()
updateContents();
else {
// Repaint only repaintRegion...
- QMemArray<QRect> rects = repaintRegion.rects();
+ TQMemArray<TQRect> rects = repaintRegion.rects();
for ( uint l = 0; l < rects.count(); l++ ) {
kdDebug( 1203 ) << "Repainting (" << rects[l].x() << ","
<< rects[l].y() << ")\n";
@@ -1754,30 +1754,30 @@ void KonqIconViewWidget::lineupIcons()
delete [] bins;
}
-void KonqIconViewWidget::lineupIcons( QIconView::Arrangement arrangement )
+void KonqIconViewWidget::lineupIcons( TQIconView::Arrangement arrangement )
{
int x0, y0, dx, dy, nxmax, nymax;
gridValues( &x0, &y0, &dx, &dy, &nxmax, &nymax );
int textHeight = iconTextHeight() * fontMetrics().height();
- QRegion repaintRegion;
- QValueList<QIconViewItem*> movedItems;
+ TQRegion repaintRegion;
+ TQValueList<TQIconViewItem*> movedItems;
int nx = 0, ny = 0;
- QIconViewItem* item;
+ TQIconViewItem* item;
for ( item = firstItem(); item; item = item->nextItem() ) {
int newX = x0 + nx*dx + spacing() +
QMAX(0, ( (dx-spacing()) - item->width() ) / 2); // icon can be larger as defined
// align all icons vertically to their text
int newY = y0 + ny*dy + dy - spacing() - ( item->pixmapRect().bottom() + 2 + textHeight );
if ( item->x() != newX || item->y() != newY ) {
- QRect oldRect = item->rect();
+ TQRect oldRect = item->rect();
movedItems.prepend( item );
item->move( newX, newY );
if ( item->rect() != oldRect )
repaintRegion = repaintRegion.unite( oldRect );
}
- if ( arrangement == QIconView::LeftToRight ) {
+ if ( arrangement == TQIconView::LeftToRight ) {
nx++;
if ( nx >= nxmax ) {
ny++;
@@ -1794,7 +1794,7 @@ void KonqIconViewWidget::lineupIcons( QIconView::Arrangement arrangement )
}
// Repaint only repaintRegion...
- QMemArray<QRect> rects = repaintRegion.rects();
+ TQMemArray<TQRect> rects = repaintRegion.rects();
for ( uint l = 0; l < rects.count(); l++ ) {
kdDebug( 1203 ) << "Repainting (" << rects[l].x() << ","
<< rects[l].y() << ")\n";
@@ -1833,13 +1833,13 @@ int KonqIconViewWidget::previewIconSize( int size ) const
return largestPreviewIconSize( iconSize );
}
-void KonqIconViewWidget::visualActivate(QIconViewItem * item)
+void KonqIconViewWidget::visualActivate(TQIconViewItem * item)
{
- // Rect of the QIconViewItem.
- QRect irect = item->rect();
+ // Rect of the TQIconViewItem.
+ TQRect irect = item->rect();
// Rect of the QIconViewItem's pixmap area.
- QRect rect = item->pixmapRect();
+ TQRect rect = item->pixmapRect();
// Adjust to correct position. If this isn't done, the fact that the
// text may be wider than the pixmap puts us off-centre.
@@ -1851,12 +1851,12 @@ void KonqIconViewWidget::visualActivate(QIconViewItem * item)
KIconEffect::visualActivate(viewport(), rect, item->pixmap());
}
-void KonqIconViewWidget::backgroundPixmapChange( const QPixmap & )
+void KonqIconViewWidget::backgroundPixmapChange( const TQPixmap & )
{
viewport()->update();
}
-void KonqIconViewWidget::setPreviewSettings( const QStringList& settings )
+void KonqIconViewWidget::setPreviewSettings( const TQStringList& settings )
{
d->previewSettings = settings;
updatePreviewMimeTypes();
@@ -1866,12 +1866,12 @@ void KonqIconViewWidget::setPreviewSettings( const QStringList& settings )
setIcons( size ); // force re-determining all icons
}
-const QStringList& KonqIconViewWidget::previewSettings()
+const TQStringList& KonqIconViewWidget::previewSettings()
{
return d->previewSettings;
}
-void KonqIconViewWidget::setNewURL( const QString& url )
+void KonqIconViewWidget::setNewURL( const TQString& url )
{
KURL u;
if ( url.startsWith( "/" ) )
@@ -1915,8 +1915,8 @@ void KonqIconViewWidget::updatePreviewMimeTypes()
for ( it = plugins.begin(); it != plugins.end(); ++it ) {
if ( d->previewSettings.contains((*it)->desktopEntryName()) ) {
- QStringList mimeTypes = (*it)->property("MimeTypes").toStringList();
- for (QStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt)
+ TQStringList mimeTypes = (*it)->property("MimeTypes").toStringList();
+ for (TQStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt)
d->pPreviewMimeTypes->append(*mt);
}
}
diff --git a/libkonq/konq_iconviewwidget.h b/libkonq/konq_iconviewwidget.h
index 6f18cc020..04db9029a 100644
--- a/libkonq/konq_iconviewwidget.h
+++ b/libkonq/konq_iconviewwidget.h
@@ -23,7 +23,7 @@
#include <kiconloader.h>
#include <kiconview.h>
#include <kurl.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kfileitem.h>
#include <kio/jobclasses.h>
#include <libkonq_export.h>
@@ -43,9 +43,9 @@ class LIBKONQ_EXPORT KonqIconViewWidget : public KIconView
{
Q_OBJECT
Q_PROPERTY( bool sortDirectoriesFirst READ sortDirectoriesFirst WRITE setSortDirectoriesFirst )
- Q_PROPERTY( QRect iconArea READ iconArea WRITE setIconArea )
+ Q_PROPERTY( TQRect iconArea READ iconArea WRITE setIconArea )
Q_PROPERTY( int lineupMode READ lineupMode WRITE setLineupMode )
- Q_PROPERTY( QString url READ urlString WRITE setNewURL )
+ Q_PROPERTY( TQString url READ urlString WRITE setNewURL )
friend class KFileIVI;
@@ -56,7 +56,7 @@ public:
/**
* Constructor
*/
- KonqIconViewWidget( QWidget *parent = 0L, const char *name = 0L, WFlags f = 0, bool kdesktop = FALSE );
+ KonqIconViewWidget( TQWidget *parent = 0L, const char *name = 0L, WFlags f = 0, bool kdesktop = FALSE );
virtual ~KonqIconViewWidget();
/**
@@ -74,17 +74,17 @@ public:
* drag icons outside this area; this only applies to automatically placed
* icons.
*/
- void setIconArea( const QRect &rect );
+ void setIconArea( const TQRect &rect );
/**
* Reimplemented to make the slotOnItem highlighting work.
*/
- virtual void focusOutEvent( QFocusEvent * /* ev */ );
+ virtual void focusOutEvent( TQFocusEvent * /* ev */ );
/**
* Returns the icon area.
*/
- QRect iconArea() const;
+ TQRect iconArea() const;
/**
* Set the lineup mode. This determines in which direction(s) icons are
@@ -107,11 +107,11 @@ public:
/**
* Line up the icons to a regular grid horizontally or vertically.
*
- * @param arrangement the arrangement to use (QIconView::LeftToRight
- * for a horizontal arrangement and QIconView::TopToBottom
+ * @param arrangement the arrangement to use (TQIconView::LeftToRight
+ * for a horizontal arrangement and TQIconView::TopToBottom
* for vertical)
*/
- void lineupIcons( QIconView::Arrangement arrangement );
+ void lineupIcons( TQIconView::Arrangement arrangement );
/**
* Sets the icons of all items, and stores the @p size
@@ -123,7 +123,7 @@ public:
* For instance "text/plain,image/wmf".
* Can be set to "*" for "all mimetypes" and to "image/"+"*" for "all images".
*/
- void setIcons( int size, const QStringList& stopImagePreviewFor = QStringList() );
+ void setIcons( int size, const TQStringList& stopImagePreviewFor = TQStringList() );
/**
* Called on databaseChanged
@@ -135,7 +135,7 @@ public:
void calculateGridX();
/**
* The horizontal distance between two icons
- * (whether or not a grid has been given to QIconView)
+ * (whether or not a grid has been given to TQIconView)
*/
int gridXValue() const;
@@ -160,17 +160,17 @@ public:
*
* @todo figure out the parameter meanings again
*/
- void startImagePreview( const QStringList &ignored, bool force );
+ void startImagePreview( const TQStringList &ignored, bool force );
void stopImagePreview();
bool isPreviewRunning() const;
// unused
- void setThumbnailPixmap( KFileIVI * item, const QPixmap & pixmap );
+ void setThumbnailPixmap( KFileIVI * item, const TQPixmap & pixmap );
void disableSoundPreviews();
void setURL ( const KURL & kurl );
// ### KDE4: make const
const KURL & url() { return m_url; }
- QString urlString() const { return m_url.url(); }
+ TQString urlString() const { return m_url.url(); }
void setRootItem ( const KFileItem * item ) { m_rootItem = item; }
/**
@@ -178,8 +178,8 @@ public:
*/
KFileItemList selectedFileItems();
- void setItemColor( const QColor &c );
- QColor itemColor() const;
+ void setItemColor( const TQColor &c );
+ TQColor itemColor() const;
virtual void cutSelection();
virtual void copySelection();
@@ -208,22 +208,22 @@ public:
/**
* Reimplemented from QIconView
*/
- virtual void takeItem( QIconViewItem *item );
+ virtual void takeItem( TQIconViewItem *item );
/**
- * Reimplemented from QIconView to take into account iconArea.
+ * Reimplemented from TQIconView to take into account iconArea.
*/
- virtual void insertInGrid( QIconViewItem *item );
+ virtual void insertInGrid( TQIconViewItem *item );
/**
- * Reimplemented from QIconView to update the gridX
+ * Reimplemented from TQIconView to update the gridX
*/
virtual void setItemTextPos( ItemTextPos pos );
/**
* Give feedback when item is activated.
*/
- virtual void visualActivate(QIconViewItem *);
+ virtual void visualActivate(TQIconViewItem *);
bool isDesktop() const { return m_bDesktop; }
@@ -237,12 +237,12 @@ public:
void disableIcons( const KURL::List & lst );
- QString iconPositionGroupPrefix() const { return m_iconPositionGroupPrefix; }
- QString dotDirectoryPath() const { return m_dotDirectoryPath; }
+ TQString iconPositionGroupPrefix() const { return m_iconPositionGroupPrefix; }
+ TQString dotDirectoryPath() const { return m_dotDirectoryPath; }
- void setPreviewSettings(const QStringList& mimeTypes);
- const QStringList& previewSettings();
- void setNewURL( const QString& url );
+ void setPreviewSettings(const TQStringList& mimeTypes);
+ const TQStringList& previewSettings();
+ void setNewURL( const TQString& url );
public slots:
/**
@@ -255,7 +255,7 @@ public slots:
void renameSelectedItem();
void renameCurrentItem();
- void slotToolTipPreview( const KFileItem *, const QPixmap & ); // ### unused - remove for KDE4
+ void slotToolTipPreview( const KFileItem *, const TQPixmap & ); // ### unused - remove for KDE4
void slotToolTipPreviewResult() ; // ### unused - remove for KDE4
signals:
@@ -284,47 +284,47 @@ signals:
void dragFinished();
protected slots:
- virtual void slotDropped( QDropEvent *e, const QValueList<QIconDragItem> & );
+ virtual void slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & );
- void slotItemRenamed(QIconViewItem *item, const QString &name);
+ void slotItemRenamed(TQIconViewItem *item, const TQString &name);
void slotIconChanged(int);
- void slotOnItem(QIconViewItem *);
+ void slotOnItem(TQIconViewItem *);
void slotOnViewport();
void slotStartSoundPreview();
- void slotPreview(const KFileItem *, const QPixmap &);
+ void slotPreview(const KFileItem *, const TQPixmap &);
void slotPreviewResult();
- void slotMovieUpdate( const QRect& rect );
+ void slotMovieUpdate( const TQRect& rect );
void slotMovieStatus( int status );
void slotReenableAnimation();
- void slotAboutToCreate(const QPoint &pos, const QValueList<KIO::CopyInfo> &files);
+ void slotAboutToCreate(const TQPoint &pos, const TQValueList<KIO::CopyInfo> &files);
void doubleClickTimeout();
protected:
- virtual QDragObject *dragObject();
- KonqIconDrag *konqDragObject( QWidget * dragSource = 0L );
- bool mimeTypeMatch( const QString& mimeType, const QStringList& mimeList ) const;
+ virtual TQDragObject *dragObject();
+ KonqIconDrag *konqDragObject( TQWidget * dragSource = 0L );
+ bool mimeTypeMatch( const TQString& mimeType, const TQStringList& mimeList ) const;
- virtual void drawBackground( QPainter *p, const QRect &r );
+ virtual void drawBackground( TQPainter *p, const TQRect &r );
/**
* r is the rectangle which you want to paint from the background.
* pt is the upper left point in the painter device where you want to paint
* the rectangle r.
*/
- virtual void drawBackground( QPainter *p, const QRect &r,
- const QPoint &pt );
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDropEvent( QDropEvent *e );
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void contentsMouseReleaseEvent ( QMouseEvent * e );
- virtual void contentsMouseMoveEvent( QMouseEvent *e );
- virtual void backgroundPixmapChange( const QPixmap & );
- virtual void wheelEvent( QWheelEvent* );
- virtual void leaveEvent( QEvent *e );
+ virtual void drawBackground( TQPainter *p, const TQRect &r,
+ const TQPoint &pt );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *e );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void contentsMouseReleaseEvent ( TQMouseEvent * e );
+ virtual void contentsMouseMoveEvent( TQMouseEvent *e );
+ virtual void backgroundPixmapChange( const TQPixmap & );
+ virtual void wheelEvent( TQWheelEvent* );
+ virtual void leaveEvent( TQEvent *e );
void readAnimatedIconsConfig();
void mousePressChangeValue();
@@ -347,17 +347,17 @@ private:
KonqFMSettings * m_pSettings;
bool m_bMousePressed;
- QPoint m_mousePos;
+ TQPoint m_mousePos;
- QColor iColor;
+ TQColor iColor;
bool m_bSortDirsFirst;
- QString m_iconPositionGroupPrefix;
- QString m_dotDirectoryPath;
+ TQString m_iconPositionGroupPrefix;
+ TQString m_dotDirectoryPath;
int m_LineupMode;
- QRect m_IconRect;
+ TQRect m_IconRect;
bool m_bDesktop;
bool m_bSetGridX;
diff --git a/libkonq/konq_operations.cc b/libkonq/konq_operations.cc
index 5e9e8269b..6c7a2ba81 100644
--- a/libkonq/konq_operations.cc
+++ b/libkonq/konq_operations.cc
@@ -16,7 +16,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qclipboard.h>
+#include <tqclipboard.h>
#include "konq_operations.h"
#include <kautomount.h>
@@ -36,7 +36,7 @@
#include "konqbookmarkmanager.h"
// For doDrop
-#include <qdir.h>//first
+#include <tqdir.h>//first
#include <assert.h>
#include <kapplication.h>
#include <kipc.h>
@@ -56,14 +56,14 @@
#include <kprotocolinfo.h>
#include <kprocess.h>
#include <kstringhandler.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <unistd.h>
#include <X11/Xlib.h>
KBookmarkManager * KonqBookmarkManager::s_bookmarkManager;
-KonqOperations::KonqOperations( QWidget *parent )
- : QObject( parent, "KonqOperations" ),
+KonqOperations::KonqOperations( TQWidget *parent )
+ : TQObject( parent, "KonqOperations" ),
m_method( UNKNOWN ), m_info(0L), m_pasteInfo(0L)
{
}
@@ -74,14 +74,14 @@ KonqOperations::~KonqOperations()
delete m_pasteInfo;
}
-void KonqOperations::editMimeType( const QString & mimeType )
+void KonqOperations::editMimeType( const TQString & mimeType )
{
- QString keditfiletype = QString::fromLatin1("keditfiletype");
+ TQString keditfiletype = TQString::fromLatin1("keditfiletype");
KRun::runCommand( keditfiletype + " " + KProcess::quote(mimeType),
keditfiletype, keditfiletype /*unused*/);
}
-void KonqOperations::del( QWidget * parent, int method, const KURL::List & selectedURLs )
+void KonqOperations::del( TQWidget * parent, int method, const KURL::List & selectedURLs )
{
kdDebug(1203) << "KonqOperations::del " << parent->className() << endl;
if ( selectedURLs.isEmpty() )
@@ -107,7 +107,7 @@ void KonqOperations::restoreTrashedItems( const KURL::List& urls )
op->_restoreTrashedItems( urls );
}
-void KonqOperations::mkdir( QWidget *parent, const KURL & url )
+void KonqOperations::mkdir( TQWidget *parent, const KURL & url )
{
KIO::Job * job = KIO::mkdir( url );
KonqOperations * op = new KonqOperations( parent );
@@ -115,16 +115,16 @@ void KonqOperations::mkdir( QWidget *parent, const KURL & url )
(void) new KonqCommandRecorder( KonqCommand::MKDIR, KURL(), url, job ); // no support yet, apparently
}
-void KonqOperations::doPaste( QWidget * parent, const KURL & destURL )
+void KonqOperations::doPaste( TQWidget * parent, const KURL & destURL )
{
- doPaste(parent, destURL, QPoint());
+ doPaste(parent, destURL, TQPoint());
}
-void KonqOperations::doPaste( QWidget * parent, const KURL & destURL, const QPoint &pos )
+void KonqOperations::doPaste( TQWidget * parent, const KURL & destURL, const TQPoint &pos )
{
// move or not move ?
bool move = false;
- QMimeSource *data = QApplication::clipboard()->data();
+ TQMimeSource *data = TQApplication::clipboard()->data();
if ( data->provides( "application/x-kde-cutselection" ) ) {
move = KonqDrag::decodeIsCutSelection( data );
kdDebug(1203) << "move (from clipboard data) = " << move << endl;
@@ -143,7 +143,7 @@ void KonqOperations::doPaste( QWidget * parent, const KURL & destURL, const QPoi
}
}
-void KonqOperations::copy( QWidget * parent, int method, const KURL::List & selectedURLs, const KURL& destUrl )
+void KonqOperations::copy( TQWidget * parent, int method, const KURL::List & selectedURLs, const KURL& destUrl )
{
kdDebug(1203) << "KonqOperations::copy() " << parent->className() << endl;
if ((method!=COPY) && (method!=MOVE) && (method!=LINK))
@@ -201,8 +201,8 @@ void KonqOperations::_del( int method, const KURL::List & _selectedURLs, Confirm
case EMPTYTRASH:
{
// Same as in ktrash --empty
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)1;
job = KIO::special( "trash:/", packedArgs );
KNotifyClient::event(0, "Trash: emptied");
@@ -219,8 +219,8 @@ void KonqOperations::_del( int method, const KURL::List & _selectedURLs, Confirm
delete this;
return;
}
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
} else
delete this;
}
@@ -229,15 +229,15 @@ void KonqOperations::_restoreTrashedItems( const KURL::List& urls )
{
m_method = RESTORE;
KonqMultiRestoreJob* job = new KonqMultiRestoreJob( urls, true );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
}
-bool KonqOperations::askDeleteConfirmation( const KURL::List & selectedURLs, int method, ConfirmationType confirmation, QWidget* widget )
+bool KonqOperations::askDeleteConfirmation( const KURL::List & selectedURLs, int method, ConfirmationType confirmation, TQWidget* widget )
{
if ( confirmation == SKIP_CONFIRMATION )
return true;
- QString keyName;
+ TQString keyName;
bool ask = ( confirmation == FORCE_CONFIRMATION );
if ( !ask )
{
@@ -250,13 +250,13 @@ bool KonqOperations::askDeleteConfirmation( const KURL::List & selectedURLs, int
if ( ask )
{
KURL::List::ConstIterator it = selectedURLs.begin();
- QStringList prettyList;
+ TQStringList prettyList;
for ( ; it != selectedURLs.end(); ++it ) {
if ( (*it).protocol() == "trash" ) {
- QString path = (*it).path();
+ TQString path = (*it).path();
// HACK (#98983): remove "0-foo". Note that it works better than
// displaying KFileItem::name(), for files under a subdir.
- prettyList.append( path.remove(QRegExp("^/[0-9]*-")) );
+ prettyList.append( path.remove(TQRegExp("^/[0-9]*-")) );
} else
prettyList.append( (*it).pathOrURL() );
}
@@ -310,11 +310,11 @@ bool KonqOperations::askDeleteConfirmation( const KURL::List & selectedURLs, int
return true;
}
-void KonqOperations::doDrop( const KFileItem * destItem, const KURL & dest, QDropEvent * ev, QWidget * parent )
+void KonqOperations::doDrop( const KFileItem * destItem, const KURL & dest, TQDropEvent * ev, TQWidget * parent )
{
kdDebug(1203) << "doDrop: dest : " << dest.url() << endl;
KURL::List lst;
- QMap<QString, QString> metaData;
+ TQMap<TQString, TQString> metaData;
if ( KURLDrag::decode( ev, lst, metaData ) ) // Are they urls ?
{
if( lst.count() == 0 )
@@ -324,7 +324,7 @@ void KonqOperations::doDrop( const KFileItem * destItem, const KURL & dest, QDro
return;
}
kdDebug(1203) << "KonqOperations::doDrop metaData: " << metaData.count() << " entries." << endl;
- QMap<QString,QString>::ConstIterator mit;
+ TQMap<TQString,TQString>::ConstIterator mit;
for( mit = metaData.begin(); mit != metaData.end(); ++mit )
{
kdDebug(1203) << "metaData: key=" << mit.key() << " value=" << mit.data() << endl;
@@ -354,12 +354,12 @@ void KonqOperations::doDrop( const KFileItem * destItem, const KURL & dest, QDro
XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
&root_x, &root_y, &win_x, &win_y, &keybstate );
- QDropEvent::Action action = ev->action();
+ TQDropEvent::Action action = ev->action();
// Check for the drop of a bookmark -> we want a Link action
if ( ev->provides("application/x-xbel") )
{
keybstate |= ControlMask | ShiftMask;
- action = QDropEvent::Link;
+ action = TQDropEvent::Link;
kdDebug(1203) << "KonqOperations::doDrop Bookmark -> emulating Link" << endl;
}
@@ -374,7 +374,7 @@ void KonqOperations::doDrop( const KFileItem * destItem, const KURL & dest, QDro
else
{
// we need to stat to get it.
- op->_statURL( dest, op, SLOT( asyncDrop( const KFileItem * ) ) );
+ op->_statURL( dest, op, TQT_SLOT( asyncDrop( const KFileItem * ) ) );
}
// In both cases asyncDrop will delete op when done
@@ -423,8 +423,8 @@ void KonqOperations::asyncDrop( const KFileItem * destItem )
KDesktopFile desktopFile( m_destURL.path() );
if ( desktopFile.hasApplicationType() )
{
- QString error;
- QStringList stringList;
+ TQString error;
+ TQStringList stringList;
KURL::List lst = m_info->lst;
KURL::List::Iterator it = lst.begin();
for ( ; it != lst.end() ; it++ )
@@ -438,19 +438,19 @@ void KonqOperations::asyncDrop( const KFileItem * destItem )
{
// Device or Link -> adjust dest
if ( desktopFile.hasDeviceType() && desktopFile.hasKey("MountPoint") ) {
- QString point = desktopFile.readEntry( "MountPoint" );
+ TQString point = desktopFile.readEntry( "MountPoint" );
m_destURL.setPath( point );
- QString dev = desktopFile.readDevice();
- QString mp = KIO::findDeviceMountPoint( dev );
+ TQString dev = desktopFile.readDevice();
+ TQString mp = KIO::findDeviceMountPoint( dev );
// Is the device already mounted ?
if ( !mp.isNull() )
doFileCopy();
else
{
bool ro = desktopFile.readBoolEntry( "ReadOnly", false );
- QString fstype = desktopFile.readEntry( "FSType" );
+ TQString fstype = desktopFile.readEntry( "FSType" );
KAutoMount* am = new KAutoMount( ro, fstype, dev, point, m_destURL.path(), false );
- connect( am, SIGNAL( finished() ), this, SLOT( doFileCopy() ) );
+ connect( am, TQT_SIGNAL( finished() ), this, TQT_SLOT( doFileCopy() ) );
}
return;
}
@@ -467,7 +467,7 @@ void KonqOperations::asyncDrop( const KFileItem * destItem )
// Should be a local executable
// (If this fails, there is a bug in KFileItem::acceptsDrops)
kdDebug(1203) << "KonqOperations::doDrop " << m_destURL.path() << "should be an executable" << endl;
- Q_ASSERT ( access( QFile::encodeName(m_destURL.path()), X_OK ) == 0 );
+ Q_ASSERT ( access( TQFile::encodeName(m_destURL.path()), X_OK ) == 0 );
KProcess proc;
proc << m_destURL.path() ;
// Launch executable for each of the files
@@ -485,7 +485,7 @@ void KonqOperations::doFileCopy()
{
assert(m_info); // setDropInfo - and asyncDrop - should have been called before asyncDrop
KURL::List lst = m_info->lst;
- QDropEvent::Action action = m_info->action;
+ TQDropEvent::Action action = m_info->action;
bool isDesktopFile = false;
bool itemIsOnDesktop = false;
bool allItemsAreFromTrash = true;
@@ -493,7 +493,7 @@ void KonqOperations::doFileCopy()
for (KURL::List::ConstIterator it = lst.begin(); it != lst.end(); ++it)
{
bool local = (*it).isLocalFile();
- if ( KProtocolInfo::supportsDeleting( *it ) && (!local || QFileInfo((*it).directory()).isWritable() ))
+ if ( KProtocolInfo::supportsDeleting( *it ) && (!local || TQFileInfo((*it).directory()).isWritable() ))
mlst.append(*it);
if ( local && KDesktopFile::isDesktopFile((*it).path()))
isDesktopFile = true;
@@ -520,7 +520,7 @@ void KonqOperations::doFileCopy()
m_method = TRASH;
if ( askDeleteConfirmation( mlst, TRASH, DEFAULT_CONFIRMATION, parentWidget() ) )
- action = QDropEvent::Move;
+ action = TQDropEvent::Move;
else
{
delete this;
@@ -529,7 +529,7 @@ void KonqOperations::doFileCopy()
}
else if ( allItemsAreFromTrash || m_destURL.protocol() == "trash" ) {
// No point in asking copy/move/link when using dnd from or to the trash.
- action = QDropEvent::Move;
+ action = TQDropEvent::Move;
}
else if ( (((m_info->keybstate & ControlMask) == 0) && ((m_info->keybstate & ShiftMask) == 0)) ||
linkOnly )
@@ -562,7 +562,7 @@ void KonqOperations::doFileCopy()
return;
}
- QPopupMenu popup;
+ TQPopupMenu popup;
if (!mlst.isEmpty() && (sMoving || (sReading && sDeleting)) && !linkOnly )
popup.insertItem(SmallIconSet("goto"), i18n( "&Move Here" ) + "\t" + KKey::modFlagLabel( KKey::SHIFT ), 2 );
if ( sReading && !linkOnly)
@@ -576,9 +576,9 @@ void KonqOperations::doFileCopy()
int result = popup.exec( m_info->mousePos );
switch (result) {
- case 1 : action = QDropEvent::Copy; break;
- case 2 : action = QDropEvent::Move; break;
- case 3 : action = QDropEvent::Link; break;
+ case 1 : action = TQDropEvent::Copy; break;
+ case 2 : action = TQDropEvent::Move; break;
+ case 3 : action = TQDropEvent::Link; break;
case 4 :
{
kdDebug(1203) << "setWallpaper iconView=" << iconView << " url=" << lst.first().url() << endl;
@@ -593,7 +593,7 @@ void KonqOperations::doFileCopy()
KIO::Job * job = 0;
switch ( action ) {
- case QDropEvent::Move :
+ case TQDropEvent::Move :
job = KIO::move( lst, m_destURL );
job->setMetaData( m_info->metaData );
setOperation( job, m_method == TRASH ? TRASH : MOVE, lst, m_destURL );
@@ -601,13 +601,13 @@ void KonqOperations::doFileCopy()
m_method == TRASH ? KonqCommand::TRASH : KonqCommand::MOVE,
lst, m_destURL, job );
return; // we still have stuff to do -> don't delete ourselves
- case QDropEvent::Copy :
+ case TQDropEvent::Copy :
job = KIO::copy( lst, m_destURL );
job->setMetaData( m_info->metaData );
setOperation( job, COPY, lst, m_destURL );
(void) new KonqCommandRecorder( KonqCommand::COPY, lst, m_destURL, job );
return;
- case QDropEvent::Link :
+ case TQDropEvent::Link :
kdDebug(1203) << "KonqOperations::asyncDrop lst.count=" << lst.count() << endl;
job = KIO::link( lst, m_destURL );
job->setMetaData( m_info->metaData );
@@ -619,7 +619,7 @@ void KonqOperations::doFileCopy()
delete this;
}
-void KonqOperations::rename( QWidget * parent, const KURL & oldurl, const KURL& newurl )
+void KonqOperations::rename( TQWidget * parent, const KURL & oldurl, const KURL& newurl )
{
kdDebug(1203) << "KonqOperations::rename oldurl=" << oldurl << " newurl=" << newurl << endl;
if ( oldurl == newurl )
@@ -650,46 +650,46 @@ void KonqOperations::setOperation( KIO::Job * job, int method, const KURL::List
m_destURL = dest;
if ( job )
{
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotResult( KIO::Job * ) ) );
KIO::CopyJob *copyJob = dynamic_cast<KIO::CopyJob*>(job);
KonqIconViewWidget *iconView = dynamic_cast<KonqIconViewWidget*>(parent());
if (copyJob && iconView)
{
- connect(copyJob, SIGNAL(aboutToCreate(KIO::Job *,const QValueList<KIO::CopyInfo> &)),
- this, SLOT(slotAboutToCreate(KIO::Job *,const QValueList<KIO::CopyInfo> &)));
- connect(this, SIGNAL(aboutToCreate(const QPoint &, const QValueList<KIO::CopyInfo> &)),
- iconView, SLOT(slotAboutToCreate(const QPoint &, const QValueList<KIO::CopyInfo> &)));
+ connect(copyJob, TQT_SIGNAL(aboutToCreate(KIO::Job *,const TQValueList<KIO::CopyInfo> &)),
+ this, TQT_SLOT(slotAboutToCreate(KIO::Job *,const TQValueList<KIO::CopyInfo> &)));
+ connect(this, TQT_SIGNAL(aboutToCreate(const TQPoint &, const TQValueList<KIO::CopyInfo> &)),
+ iconView, TQT_SLOT(slotAboutToCreate(const TQPoint &, const TQValueList<KIO::CopyInfo> &)));
}
}
else // for link
slotResult( 0L );
}
-void KonqOperations::slotAboutToCreate(KIO::Job *, const QValueList<KIO::CopyInfo> &files)
+void KonqOperations::slotAboutToCreate(KIO::Job *, const TQValueList<KIO::CopyInfo> &files)
{
- emit aboutToCreate( m_info ? m_info->mousePos : m_pasteInfo ? m_pasteInfo->mousePos : QPoint(), files);
+ emit aboutToCreate( m_info ? m_info->mousePos : m_pasteInfo ? m_pasteInfo->mousePos : TQPoint(), files);
}
-void KonqOperations::statURL( const KURL & url, const QObject *receiver, const char *member )
+void KonqOperations::statURL( const KURL & url, const TQObject *receiver, const char *member )
{
KonqOperations * op = new KonqOperations( 0L );
op->_statURL( url, receiver, member );
op->m_method = STAT;
}
-void KonqOperations::_statURL( const KURL & url, const QObject *receiver, const char *member )
+void KonqOperations::_statURL( const KURL & url, const TQObject *receiver, const char *member )
{
- connect( this, SIGNAL( statFinished( const KFileItem * ) ), receiver, member );
+ connect( this, TQT_SIGNAL( statFinished( const KFileItem * ) ), receiver, member );
KIO::StatJob * job = KIO::stat( url /*, false?*/ );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotStatResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotStatResult( KIO::Job * ) ) );
}
void KonqOperations::slotStatResult( KIO::Job * job )
{
if ( job->error())
- job->showErrorDialog( (QWidget*)parent() );
+ job->showErrorDialog( (TQWidget*)parent() );
else
{
KIO::StatJob * statJob = static_cast<KIO::StatJob*>(job);
@@ -705,7 +705,7 @@ void KonqOperations::slotStatResult( KIO::Job * job )
void KonqOperations::slotResult( KIO::Job * job )
{
if (job && job->error())
- job->showErrorDialog( (QWidget*)parent() );
+ job->showErrorDialog( (TQWidget*)parent() );
if ( m_method == EMPTYTRASH ) {
// Update konq windows opened on trash:/
KDirNotify_stub allDirNotify("*", "KDirNotify*");
@@ -714,7 +714,7 @@ void KonqOperations::slotResult( KIO::Job * job )
delete this;
}
-void KonqOperations::rename( QWidget * parent, const KURL & oldurl, const QString & name )
+void KonqOperations::rename( TQWidget * parent, const KURL & oldurl, const TQString & name )
{
KURL newurl( oldurl );
newurl.setPath( oldurl.directory(false, true) + name );
@@ -722,11 +722,11 @@ void KonqOperations::rename( QWidget * parent, const KURL & oldurl, const QStrin
rename( parent, oldurl, newurl );
}
-void KonqOperations::newDir( QWidget * parent, const KURL & baseURL )
+void KonqOperations::newDir( TQWidget * parent, const KURL & baseURL )
{
bool ok;
- QString name = i18n( "New Folder" );
- if ( baseURL.isLocalFile() && QFileInfo( baseURL.path(+1) + name ).exists() )
+ TQString name = i18n( "New Folder" );
+ if ( baseURL.isLocalFile() && TQFileInfo( baseURL.path(+1) + name ).exists() )
name = KIO::RenameDlg::suggestName( baseURL, i18n( "New Folder" ) );
name = KInputDialog::getText ( i18n( "New Folder" ),
@@ -755,7 +755,7 @@ KonqMultiRestoreJob::KonqMultiRestoreJob( const KURL::List& urls, bool showProgr
m_urls( urls ), m_urlsIterator( m_urls.begin() ),
m_progress( 0 )
{
- QTimer::singleShot(0, this, SLOT(slotStart()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotStart()));
}
void KonqMultiRestoreJob::slotStart()
@@ -772,15 +772,15 @@ void KonqMultiRestoreJob::slotStart()
if ( new_url.protocol()=="system"
&& new_url.path().startsWith("/trash") )
{
- QString path = new_url.path();
+ TQString path = new_url.path();
path.remove(0, 6);
new_url.setProtocol("trash");
new_url.setPath(path);
}
Q_ASSERT( new_url.protocol() == "trash" );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)3 << new_url;
KIO::Job* job = KIO::special( new_url, packedArgs );
addSubjob( job );
@@ -809,9 +809,9 @@ void KonqMultiRestoreJob::slotResult( KIO::Job *job )
slotStart();
}
-QWidget* KonqOperations::parentWidget() const
+TQWidget* KonqOperations::parentWidget() const
{
- return static_cast<QWidget *>( parent() );
+ return static_cast<TQWidget *>( parent() );
}
#include "konq_operations.moc"
diff --git a/libkonq/konq_operations.h b/libkonq/konq_operations.h
index 82d021c55..42a00e814 100644
--- a/libkonq/konq_operations.h
+++ b/libkonq/konq_operations.h
@@ -22,8 +22,8 @@
#include <kurl.h>
#include <libkonq_export.h>
-#include <qobject.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqevent.h>
namespace KIO { class Job; class CopyInfo; }
class QWidget;
@@ -38,14 +38,14 @@ class LIBKONQ_EXPORT KonqOperations : public QObject
{
Q_OBJECT
protected:
- KonqOperations( QWidget * parent );
+ KonqOperations( TQWidget * parent );
virtual ~KonqOperations();
public:
/**
* Pop up properties dialog for mimetype @p mimeType.
*/
- static void editMimeType( const QString & mimeType );
+ static void editMimeType( const TQString & mimeType );
enum { TRASH, DEL, SHRED, COPY, MOVE, LINK, EMPTYTRASH, STAT, MKDIR, RESTORE, UNKNOWN };
/**
@@ -55,7 +55,7 @@ public:
* @param method should be TRASH, DEL or SHRED
* @param selectedURLs the URLs to be deleted
*/
- static void del( QWidget * parent, int method, const KURL::List & selectedURLs );
+ static void del( TQWidget * parent, int method, const KURL::List & selectedURLs );
/**
* Copy the @p selectedURLs to the destination @p destURL.
@@ -67,7 +67,7 @@ public:
*
* @todo document restrictions on the kind of destination
*/
- static void copy( QWidget * parent, int method, const KURL::List & selectedURLs, const KURL& destURL );
+ static void copy( TQWidget * parent, int method, const KURL::List & selectedURLs, const KURL& destURL );
/**
* Drop
* @param destItem destination KFileItem for the drop (background or item)
@@ -77,13 +77,13 @@ public:
*
* If destItem is 0L, doDrop will stat the URL to determine it.
*/
- static void doDrop( const KFileItem * destItem, const KURL & destURL, QDropEvent * ev, QWidget * parent );
+ static void doDrop( const KFileItem * destItem, const KURL & destURL, TQDropEvent * ev, TQWidget * parent );
/**
* Paste the clipboard contents
*/
- static void doPaste( QWidget * parent, const KURL & destURL, const QPoint &pos );
- static void doPaste( QWidget * parent, const KURL & destURL );
+ static void doPaste( TQWidget * parent, const KURL & destURL, const TQPoint &pos );
+ static void doPaste( TQWidget * parent, const KURL & destURL );
static void emptyTrash();
static void restoreTrashedItems( const KURL::List& urls );
@@ -91,7 +91,7 @@ public:
/**
* Create a directory
*/
- static void mkdir( QWidget *parent, const KURL & url );
+ static void mkdir( TQWidget *parent, const KURL & url );
/**
* Get info about a given URL, and when that's done (it's asynchronous!),
@@ -99,7 +99,7 @@ public:
* The KFileItem will be deleted by statURL after calling the slot. Make a copy
* if you need one !
*/
- static void statURL( const KURL & url, const QObject *receiver, const char *member );
+ static void statURL( const KURL & url, const TQObject *receiver, const char *member );
/**
* Do a renaming.
@@ -107,7 +107,7 @@ public:
* @param oldurl the current url of the file to be renamed
* @param name the new name for the file. Shouldn't include '/'.
*/
- static void rename( QWidget * parent, const KURL & oldurl, const QString & name );
+ static void rename( TQWidget * parent, const KURL & oldurl, const TQString & name );
/**
* Do a renaming.
@@ -117,14 +117,14 @@ public:
* Use this version if the other one wouldn't work :) (e.g. because name could
* be a relative path, including a '/').
*/
- static void rename( QWidget * parent, const KURL & oldurl, const KURL & newurl );
+ static void rename( TQWidget * parent, const KURL & oldurl, const KURL & newurl );
/**
* Ask for the name of a new directory and create it.
* @param parent the parent widget
* @param baseURL the directory to create the new directory in
*/
- static void newDir( QWidget * parent, const KURL & baseURL );
+ static void newDir( TQWidget * parent, const KURL & baseURL );
enum ConfirmationType { DEFAULT_CONFIRMATION, SKIP_CONFIRMATION, FORCE_CONFIRMATION };
/**
@@ -135,49 +135,49 @@ public:
* @param widget parent widget for message boxes
* @return true if confirmed
*/
- static bool askDeleteConfirmation( const KURL::List & selectedURLs, int method, ConfirmationType confirmation, QWidget* widget );
+ static bool askDeleteConfirmation( const KURL::List & selectedURLs, int method, ConfirmationType confirmation, TQWidget* widget );
signals:
void statFinished( const KFileItem * item );
- void aboutToCreate(const QPoint &pos, const QValueList<KIO::CopyInfo> &files);
+ void aboutToCreate(const TQPoint &pos, const TQValueList<KIO::CopyInfo> &files);
protected:
void _del( int method, const KURL::List & selectedURLs, ConfirmationType confirmation );
void _restoreTrashedItems( const KURL::List& urls );
- void _statURL( const KURL & url, const QObject *receiver, const char *member );
+ void _statURL( const KURL & url, const TQObject *receiver, const char *member );
// internal, for COPY/MOVE/LINK/MKDIR
void setOperation( KIO::Job * job, int method, const KURL::List & src, const KURL & dest );
struct DropInfo
{
- DropInfo( uint k, KURL::List & l, const QMap<QString,QString> &m,
- int x, int y, QDropEvent::Action a ) :
+ DropInfo( uint k, KURL::List & l, const TQMap<TQString,TQString> &m,
+ int x, int y, TQDropEvent::Action a ) :
keybstate(k), lst(l), metaData(m), mousePos(x,y), action(a) {}
uint keybstate;
KURL::List lst;
- QMap<QString,QString> metaData;
- QPoint mousePos;
- QDropEvent::Action action;
+ TQMap<TQString,TQString> metaData;
+ TQPoint mousePos;
+ TQDropEvent::Action action;
};
// internal, for doDrop
void setDropInfo( DropInfo * info ) { m_info = info; }
- struct KIOPasteInfo // KDE4: remove and use DropInfo instead or a QPoint member
+ struct KIOPasteInfo // KDE4: remove and use DropInfo instead or a TQPoint member
{
- QByteArray data; // unused
+ TQByteArray data; // unused
KURL destURL; // unused
- QPoint mousePos;
- QString dialogText; // unused
+ TQPoint mousePos;
+ TQString dialogText; // unused
};
void setPasteInfo( KIOPasteInfo * info ) { m_pasteInfo = info; }
private:
- QWidget* parentWidget() const;
+ TQWidget* parentWidget() const;
protected slots:
- void slotAboutToCreate(KIO::Job *job, const QValueList<KIO::CopyInfo> &files);
+ void slotAboutToCreate(KIO::Job *job, const TQValueList<KIO::CopyInfo> &files);
void slotResult( KIO::Job * job );
void slotStatResult( KIO::Job * job );
void asyncDrop( const KFileItem * item );
diff --git a/libkonq/konq_pixmapprovider.cc b/libkonq/konq_pixmapprovider.cc
index a666aa6cf..3cff83453 100644
--- a/libkonq/konq_pixmapprovider.cc
+++ b/libkonq/konq_pixmapprovider.cc
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qbitmap.h>
+#include <tqbitmap.h>
#include <kapplication.h>
#include <kiconloader.h>
@@ -37,7 +37,7 @@ KonqPixmapProvider * KonqPixmapProvider::self()
return s_self;
}
-KonqPixmapProvider::KonqPixmapProvider( QObject *parent, const char *name )
+KonqPixmapProvider::KonqPixmapProvider( TQObject *parent, const char *name )
: KPixmapProvider(),
KonqFavIconMgr( parent, name )
{
@@ -52,10 +52,10 @@ KonqPixmapProvider::~KonqPixmapProvider()
// if not available, tries to find the pixmap for the mimetype of url
// if that fails, gets the icon for the protocol
// finally, inserts the url/icon pair into the cache
-QString KonqPixmapProvider::iconNameFor( const QString& url )
+TQString KonqPixmapProvider::iconNameFor( const TQString& url )
{
- QMapIterator<QString,QString> it = iconMap.find( url );
- QString icon;
+ TQMapIterator<TQString,TQString> it = iconMap.find( url );
+ TQString icon;
if ( it != iconMap.end() ) {
icon = it.data();
if ( !icon.isEmpty() )
@@ -88,18 +88,18 @@ QString KonqPixmapProvider::iconNameFor( const QString& url )
return icon;
}
-QPixmap KonqPixmapProvider::pixmapFor( const QString& url, int size )
+TQPixmap KonqPixmapProvider::pixmapFor( const TQString& url, int size )
{
return loadIcon( url, iconNameFor( url ), size );
}
-void KonqPixmapProvider::load( KConfig *kc, const QString& key )
+void KonqPixmapProvider::load( KConfig *kc, const TQString& key )
{
iconMap.clear();
- QStringList list;
+ TQStringList list;
list = kc->readPathListEntry( key );
- QStringList::Iterator it = list.begin();
- QString url, icon;
+ TQStringList::Iterator it = list.begin();
+ TQString url, icon;
while ( it != list.end() ) {
url = (*it);
if ( ++it == list.end() )
@@ -113,12 +113,12 @@ void KonqPixmapProvider::load( KConfig *kc, const QString& key )
// only saves the cache for the given list of items to prevent the cache
// from growing forever.
-void KonqPixmapProvider::save( KConfig *kc, const QString& key,
- const QStringList& items )
+void KonqPixmapProvider::save( KConfig *kc, const TQString& key,
+ const TQStringList& items )
{
- QStringList list;
- QStringList::ConstIterator it = items.begin();
- QMapConstIterator<QString,QString> mit;
+ TQStringList list;
+ TQStringList::ConstIterator it = items.begin();
+ TQMapConstIterator<TQString,TQString> mit;
while ( it != items.end() ) {
mit = iconMap.find( *it );
if ( mit != iconMap.end() ) {
@@ -131,10 +131,10 @@ void KonqPixmapProvider::save( KConfig *kc, const QString& key,
kc->writePathEntry( key, list );
}
-void KonqPixmapProvider::notifyChange( bool isHost, QString hostOrURL,
- QString iconName )
+void KonqPixmapProvider::notifyChange( bool isHost, TQString hostOrURL,
+ TQString iconName )
{
- for ( QMapIterator<QString,QString> it = iconMap.begin();
+ for ( TQMapIterator<TQString,TQString> it = iconMap.begin();
it != iconMap.end();
++it )
{
@@ -145,7 +145,7 @@ void KonqPixmapProvider::notifyChange( bool isHost, QString hostOrURL,
{
// For host default-icons still query the favicon manager to get
// the correct icon for pages that have an own one.
- QString icon = isHost ? KMimeType::favIconForURL( url ) : iconName;
+ TQString icon = isHost ? KMimeType::favIconForURL( url ) : iconName;
if ( !icon.isEmpty() )
*it = icon;
}
@@ -159,7 +159,7 @@ void KonqPixmapProvider::clear()
iconMap.clear();
}
-QPixmap KonqPixmapProvider::loadIcon( const QString& url, const QString& icon,
+TQPixmap KonqPixmapProvider::loadIcon( const TQString& url, const TQString& icon,
int size )
{
if ( size <= KIcon::SizeSmall )
@@ -171,11 +171,11 @@ QPixmap KonqPixmapProvider::loadIcon( const QString& url, const QString& icon,
else
u = url;
- QPixmap big;
+ TQPixmap big;
// favicon? => blend the favicon in the large
if ( url.startsWith( "http:/" ) && icon.startsWith("favicons/") ) {
- QPixmap small = SmallIcon( icon, size );
+ TQPixmap small = SmallIcon( icon, size );
big = KGlobal::iconLoader()->loadIcon( KProtocolInfo::icon("http"),
KIcon::Panel, size );
@@ -183,9 +183,9 @@ QPixmap KonqPixmapProvider::loadIcon( const QString& url, const QString& icon,
int y = 0;
if ( big.mask() ) {
- QBitmap mask = *big.mask();
+ TQBitmap mask = *big.mask();
bitBlt( &mask, x, y,
- small.mask() ? const_cast<QBitmap *>(small.mask()) : &small, 0, 0,
+ small.mask() ? const_cast<TQBitmap *>(small.mask()) : &small, 0, 0,
small.width(), small.height(),
small.mask() ? OrROP : SetROP );
big.setMask( mask );
diff --git a/libkonq/konq_pixmapprovider.h b/libkonq/konq_pixmapprovider.h
index b313652f3..cb20879a6 100644
--- a/libkonq/konq_pixmapprovider.h
+++ b/libkonq/konq_pixmapprovider.h
@@ -20,7 +20,7 @@
#ifndef KONQ_PIXMAPPROVIDER_H
#define KONQ_PIXMAPPROVIDER_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kpixmapprovider.h>
#include "konq_faviconmgr.h"
@@ -39,17 +39,17 @@ public:
/**
* Looks up a pixmap for @p url. Uses a cache for the iconname of url.
*/
- virtual QPixmap pixmapFor( const QString& url, int size = 0 );
+ virtual TQPixmap pixmapFor( const TQString& url, int size = 0 );
/**
* Loads the cache to @p kc from the current KConfig-group from key @p key.
*/
- void load( KConfig * kc, const QString& key );
+ void load( KConfig * kc, const TQString& key );
/**
* Saves the cache to @p kc into the current KConfig-group as key @p key.
* Only those @p items are saved, otherwise the cache would grow forever.
*/
- void save( KConfig *, const QString& key, const QStringList& items );
+ void save( KConfig *, const TQString& key, const TQStringList& items );
/**
* Clears the pixmap cache
@@ -60,20 +60,20 @@ public:
* Looks up an iconname for @p url. Uses a cache for the iconname of url.
* @since 3.4.1
*/
- QString iconNameFor( const QString& url );
+ TQString iconNameFor( const TQString& url );
protected:
- KonqPixmapProvider( QObject *parent=0, const char *name=0 );
+ KonqPixmapProvider( TQObject *parent=0, const char *name=0 );
/**
* Overridden from KonqFavIconMgr to update the cache
*/
- virtual void notifyChange( bool isHost, QString hostOrURL, QString iconName );
+ virtual void notifyChange( bool isHost, TQString hostOrURL, TQString iconName );
- QPixmap loadIcon( const QString& url, const QString& icon, int size );
+ TQPixmap loadIcon( const TQString& url, const TQString& icon, int size );
private:
- QMap<QString,QString> iconMap;
+ TQMap<TQString,TQString> iconMap;
static KonqPixmapProvider * s_self;
};
diff --git a/libkonq/konq_popupmenu.cc b/libkonq/konq_popupmenu.cc
index 9238122c0..4adfbc01d 100644
--- a/libkonq/konq_popupmenu.cc
+++ b/libkonq/konq_popupmenu.cc
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <klocale.h>
#include <kapplication.h>
@@ -70,7 +70,7 @@
class KonqPopupMenuGUIBuilder : public KXMLGUIBuilder
{
public:
- KonqPopupMenuGUIBuilder( QPopupMenu *menu )
+ KonqPopupMenuGUIBuilder( TQPopupMenu *menu )
: KXMLGUIBuilder( 0 )
{
m_menu = menu;
@@ -79,8 +79,8 @@ public:
{
}
- virtual QWidget *createContainer( QWidget *parent, int index,
- const QDomElement &element,
+ virtual TQWidget *createContainer( TQWidget *parent, int index,
+ const TQDomElement &element,
int &id )
{
if ( !parent && element.attribute( "name" ) == "popupmenu" )
@@ -89,7 +89,7 @@ public:
return KXMLGUIBuilder::createContainer( parent, index, element, id );
}
- QPopupMenu *m_menu;
+ TQPopupMenu *m_menu;
};
class KonqPopupMenu::KonqPopupMenuPrivate
@@ -99,8 +99,8 @@ public:
m_itemFlags( KParts::BrowserExtension::DefaultPopupItems )
{
}
- QString m_urlTitle;
- QWidget *m_parentWidget;
+ TQString m_urlTitle;
+ TQWidget *m_parentWidget;
KParts::BrowserExtension::PopupFlags m_itemFlags;
};
@@ -143,14 +143,14 @@ bool KonqPopupMenu::ProtocolInfo::trashIncluded() const
class PopupServices
{
public:
- ServiceList* selectList( const QString& priority, const QString& submenuName );
+ ServiceList* selectList( const TQString& priority, const TQString& submenuName );
ServiceList builtin;
ServiceList user, userToplevel, userPriority;
- QMap<QString, ServiceList> userSubmenus, userToplevelSubmenus, userPrioritySubmenus;
+ TQMap<TQString, ServiceList> userSubmenus, userToplevelSubmenus, userPrioritySubmenus;
};
-ServiceList* PopupServices::selectList( const QString& priority, const QString& submenuName )
+ServiceList* PopupServices::selectList( const TQString& priority, const TQString& submenuName )
{
// we use the categories .desktop entry to define submenus
// if none is defined, we just pop it in the main menu
@@ -187,8 +187,8 @@ KonqPopupMenu::KonqPopupMenu( KBookmarkManager *mgr, const KFileItemList &items,
KActionCollection & actions,
KNewMenu * newMenu,
bool showProperties )
- : QPopupMenu( 0L, "konq_popupmenu" ),
- m_actions( actions ), m_ownActions( static_cast<QWidget *>( 0 ), "KonqPopupMenu::m_ownActions" ),
+ : TQPopupMenu( 0L, "konq_popupmenu" ),
+ m_actions( actions ), m_ownActions( static_cast<TQWidget *>( 0 ), "KonqPopupMenu::m_ownActions" ),
m_pMenuNew( newMenu ), m_sViewURL(viewURL), m_lstItems(items), m_pManager(mgr)
{
KonqPopupFlags kpf = ( showProperties ? ShowProperties : IsLink ) | ShowNewWindow;
@@ -199,9 +199,9 @@ KonqPopupMenu::KonqPopupMenu( KBookmarkManager *mgr, const KFileItemList &items,
KURL viewURL,
KActionCollection & actions,
KNewMenu * newMenu,
- QWidget * parentWidget,
+ TQWidget * parentWidget,
bool showProperties )
- : QPopupMenu( parentWidget, "konq_popupmenu" ), m_actions( actions ), m_ownActions( static_cast<QWidget *>( 0 ), "KonqPopupMenu::m_ownActions" ), m_pMenuNew( newMenu ), m_sViewURL(viewURL), m_lstItems(items), m_pManager(mgr)
+ : TQPopupMenu( parentWidget, "konq_popupmenu" ), m_actions( actions ), m_ownActions( static_cast<TQWidget *>( 0 ), "KonqPopupMenu::m_ownActions" ), m_pMenuNew( newMenu ), m_sViewURL(viewURL), m_lstItems(items), m_pManager(mgr)
{
KonqPopupFlags kpf = ( showProperties ? ShowProperties : IsLink ) | ShowNewWindow;
init(parentWidget, kpf, KParts::BrowserExtension::DefaultPopupItems);
@@ -211,15 +211,15 @@ KonqPopupMenu::KonqPopupMenu( KBookmarkManager *mgr, const KFileItemList &items,
const KURL& viewURL,
KActionCollection & actions,
KNewMenu * newMenu,
- QWidget * parentWidget,
+ TQWidget * parentWidget,
KonqPopupFlags kpf,
KParts::BrowserExtension::PopupFlags flags)
- : QPopupMenu( parentWidget, "konq_popupmenu" ), m_actions( actions ), m_ownActions( static_cast<QWidget *>( 0 ), "KonqPopupMenu::m_ownActions" ), m_pMenuNew( newMenu ), m_sViewURL(viewURL), m_lstItems(items), m_pManager(mgr)
+ : TQPopupMenu( parentWidget, "konq_popupmenu" ), m_actions( actions ), m_ownActions( static_cast<TQWidget *>( 0 ), "KonqPopupMenu::m_ownActions" ), m_pMenuNew( newMenu ), m_sViewURL(viewURL), m_lstItems(items), m_pManager(mgr)
{
init(parentWidget, kpf, flags);
}
-void KonqPopupMenu::init (QWidget * parentWidget, KonqPopupFlags kpf, KParts::BrowserExtension::PopupFlags flags)
+void KonqPopupMenu::init (TQWidget * parentWidget, KonqPopupFlags kpf, KParts::BrowserExtension::PopupFlags flags)
{
d = new KonqPopupMenuPrivate;
d->m_parentWidget = parentWidget;
@@ -227,12 +227,12 @@ void KonqPopupMenu::init (QWidget * parentWidget, KonqPopupFlags kpf, KParts::Br
setup(kpf);
}
-int KonqPopupMenu::insertServicesSubmenus(const QMap<QString, ServiceList>& submenus,
- QDomElement& menu,
+int KonqPopupMenu::insertServicesSubmenus(const TQMap<TQString, ServiceList>& submenus,
+ TQDomElement& menu,
bool isBuiltin)
{
int count = 0;
- QMap<QString, ServiceList>::ConstIterator it;
+ TQMap<TQString, ServiceList>::ConstIterator it;
for (it = submenus.begin(); it != submenus.end(); ++it)
{
@@ -242,10 +242,10 @@ int KonqPopupMenu::insertServicesSubmenus(const QMap<QString, ServiceList>& subm
continue;
}
- QDomElement actionSubmenu = m_doc.createElement( "menu" );
+ TQDomElement actionSubmenu = m_doc.createElement( "menu" );
actionSubmenu.setAttribute( "name", "actions " + it.key() );
menu.appendChild( actionSubmenu );
- QDomElement subtext = m_doc.createElement( "text" );
+ TQDomElement subtext = m_doc.createElement( "text" );
actionSubmenu.appendChild( subtext );
subtext.appendChild( m_doc.createTextNode( it.key() ) );
count += insertServices(it.data(), actionSubmenu, isBuiltin);
@@ -255,7 +255,7 @@ int KonqPopupMenu::insertServicesSubmenus(const QMap<QString, ServiceList>& subm
}
int KonqPopupMenu::insertServices(const ServiceList& list,
- QDomElement& menu,
+ TQDomElement& menu,
bool isBuiltin)
{
static int id = 1000;
@@ -269,7 +269,7 @@ int KonqPopupMenu::insertServices(const ServiceList& list,
if (!menu.firstChild().isNull() &&
menu.lastChild().toElement().tagName().lower() != "separator")
{
- QDomElement separator = m_doc.createElement( "separator" );
+ TQDomElement separator = m_doc.createElement( "separator" );
menu.appendChild(separator);
}
continue;
@@ -277,16 +277,16 @@ int KonqPopupMenu::insertServices(const ServiceList& list,
if (isBuiltin || (*it).m_display == true)
{
- QCString name;
+ TQCString name;
name.setNum( id );
name.prepend( isBuiltin ? "builtinservice_" : "userservice_" );
- KAction * act = new KAction( QString((*it).m_strName).replace('&',"&&"), 0,
- this, SLOT( slotRunService() ),
+ KAction * act = new KAction( TQString((*it).m_strName).replace('&',"&&"), 0,
+ this, TQT_SLOT( slotRunService() ),
&m_ownActions, name );
if ( !(*it).m_strIcon.isEmpty() )
{
- QPixmap pix = SmallIcon( (*it).m_strIcon );
+ TQPixmap pix = SmallIcon( (*it).m_strIcon );
act->setIconSet( pix );
}
@@ -307,10 +307,10 @@ bool KonqPopupMenu::KIOSKAuthorizedAction(KConfig& cfg)
return true;
}
- QStringList list = cfg.readListEntry("X-KDE-AuthorizeAction");
+ TQStringList list = cfg.readListEntry("X-KDE-AuthorizeAction");
if (kapp && !list.isEmpty())
{
- for(QStringList::ConstIterator it = list.begin();
+ for(TQStringList::ConstIterator it = list.begin();
it != list.end();
++it)
{
@@ -338,7 +338,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
bool sMoving = sDeleting;
bool sWriting = sDeleting && m_lstItems.first()->isWritable();
m_sMimeType = m_lstItems.first()->mimetype();
- QString mimeGroup = m_sMimeType.left(m_sMimeType.find('/'));
+ TQString mimeGroup = m_sMimeType.left(m_sMimeType.find('/'));
mode_t mode = m_lstItems.first()->mode();
bool isDirectory = S_ISDIR(mode);
bool bTrashIncluded = false;
@@ -354,7 +354,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
m_pluginList.setAutoDelete( true );
m_ownActions.setHighlightingEnabled( true );
- attrName = QString::fromLatin1( "name" );
+ attrName = TQString::fromLatin1( "name" );
prepareXMLGUIStuff();
m_builder = new KonqPopupMenuGUIBuilder( this );
@@ -362,7 +362,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
KURL url;
KFileItemListIterator it ( m_lstItems );
- QStringList mimeTypeList;
+ TQStringList mimeTypeList;
// Check whether all URLs are correct
for ( ; it.current(); ++it )
{
@@ -378,10 +378,10 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
// Determine if common mimetype among all URLs
if ( m_sMimeType != (*it)->mimetype() )
{
- m_sMimeType = QString::null; // mimetypes are different => null
+ m_sMimeType = TQString::null; // mimetypes are different => null
if ( mimeGroup != (*it)->mimetype().left((*it)->mimetype().find('/')))
- mimeGroup = QString::null; // mimetype groups are different as well!
+ mimeGroup = TQString::null; // mimetype groups are different as well!
}
if ( mimeTypeList.findIndex( (*it)->mimetype() ) == -1 )
@@ -455,7 +455,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
if (!isCurrentTrash)
addMerge( "konqueror" );
- bool isKDesktop = QCString( kapp->name() ) == "kdesktop";
+ bool isKDesktop = TQCString( kapp->name() ) == "kdesktop";
KAction *actNewWindow = 0;
if (( kpf & ShowProperties ) && isKDesktop &&
@@ -468,8 +468,8 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
// or we need to insert it ourselves (e.g. for kdesktop). In the first case, actNewWindow must remain 0.
if ( ((kpf & ShowNewWindow) != 0) && sReading )
{
- QString openStr = isKDesktop ? i18n( "&Open" ) : i18n( "Open in New &Window" );
- actNewWindow = new KAction( openStr, "window_new", 0, this, SLOT( slotPopupNewView() ), &m_ownActions, "newview" );
+ TQString openStr = isKDesktop ? i18n( "&Open" ) : i18n( "Open in New &Window" );
+ actNewWindow = new KAction( openStr, "window_new", 0, this, TQT_SLOT( slotPopupNewView() ), &m_ownActions, "newview" );
}
if ( actNewWindow && !isKDesktop )
@@ -498,14 +498,14 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
{
if (d->m_itemFlags & KParts::BrowserExtension::ShowCreateDirectory)
{
- KAction *actNewDir = new KAction( i18n( "Create &Folder..." ), "folder_new", 0, this, SLOT( slotPopupNewDir() ), &m_ownActions, "newdir" );
+ KAction *actNewDir = new KAction( i18n( "Create &Folder..." ), "folder_new", 0, this, TQT_SLOT( slotPopupNewDir() ), &m_ownActions, "newdir" );
addAction( actNewDir );
addSeparator();
}
}
} else if ( isIntoTrash ) {
// Trashed item, offer restoring
- act = new KAction( i18n( "&Restore" ), 0, this, SLOT( slotPopupRestoreTrashedItems() ), &m_ownActions, "restore" );
+ act = new KAction( i18n( "&Restore" ), 0, this, TQT_SLOT( slotPopupRestoreTrashedItems() ), &m_ownActions, "restore" );
addAction( act );
}
@@ -576,7 +576,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
}
if ( isCurrentTrash )
{
- act = new KAction( i18n( "&Empty Trash Bin" ), "emptytrash", 0, this, SLOT( slotPopupEmptyTrashBin() ), &m_ownActions, "empytrash" );
+ act = new KAction( i18n( "&Empty Trash Bin" ), "emptytrash", 0, this, TQT_SLOT( slotPopupEmptyTrashBin() ), &m_ownActions, "empytrash" );
KSimpleConfig trashConfig( "trashrc", true );
trashConfig.setGroup( "Status" );
act->setEnabled( !trashConfig.readBoolEntry( "Empty", true ) );
@@ -593,7 +593,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
if ( !isCurrentTrash && !isIntoTrash && (d->m_itemFlags & KParts::BrowserExtension::ShowBookmark))
{
addSeparator();
- QString caption;
+ TQString caption;
if (currentDir)
{
bool httpPage = (m_sViewURL.protocol().find("http", 0, false) == 0);
@@ -609,7 +609,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
else
caption = i18n("&Bookmark This File");
- act = new KAction( caption, "bookmark_add", 0, this, SLOT( slotPopupAddToBookmark() ), &m_ownActions, "bookmark_add" );
+ act = new KAction( caption, "bookmark_add", 0, this, TQT_SLOT( slotPopupAddToBookmark() ), &m_ownActions, "bookmark_add" );
if (m_lstItems.count() > 1)
act->setEnabled(false);
if (kapp->authorizeKAction("bookmarks"))
@@ -633,11 +633,11 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
{
// get builtin services, like mount/unmount
s.builtin = KDEDesktopMimeType::builtinServices( urlForServiceMenu );
- const QString path = urlForServiceMenu.path();
+ const TQString path = urlForServiceMenu.path();
KSimpleConfig cfg( path, true );
cfg.setDesktopGroup();
- const QString priority = cfg.readEntry("X-KDE-Priority");
- const QString submenuName = cfg.readEntry( "X-KDE-Submenu" );
+ const TQString priority = cfg.readEntry("X-KDE-Priority");
+ const TQString submenuName = cfg.readEntry( "X-KDE-Submenu" );
if ( cfg.readEntry("Type") == "Link" ) {
urlForServiceMenu = cfg.readEntry("URL");
// TODO: Do we want to make all the actions apply on the target
@@ -655,26 +655,26 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
// first check the .directory if this is a directory
if (isDirectory && isSingleLocal)
{
- QString dotDirectoryFile = urlForServiceMenu.path(1).append(".directory");
+ TQString dotDirectoryFile = urlForServiceMenu.path(1).append(".directory");
KSimpleConfig cfg( dotDirectoryFile, true );
cfg.setDesktopGroup();
if (KIOSKAuthorizedAction(cfg))
{
- const QString priority = cfg.readEntry("X-KDE-Priority");
- const QString submenuName = cfg.readEntry( "X-KDE-Submenu" );
+ const TQString priority = cfg.readEntry("X-KDE-Priority");
+ const TQString submenuName = cfg.readEntry( "X-KDE-Submenu" );
ServiceList* list = s.selectList( priority, submenuName );
(*list) += KDEDesktopMimeType::userDefinedServices( dotDirectoryFile, cfg, true );
}
}
// findAllResources() also removes duplicates
- const QStringList entries = KGlobal::dirs()->findAllResources("data",
+ const TQStringList entries = KGlobal::dirs()->findAllResources("data",
"konqueror/servicemenus/*.desktop",
false /* recursive */,
true /* unique */);
- QStringList::ConstIterator eIt = entries.begin();
- const QStringList::ConstIterator eEnd = entries.end();
+ TQStringList::ConstIterator eIt = entries.begin();
+ const TQStringList::ConstIterator eEnd = entries.end();
for (; eIt != eEnd; ++eIt )
{
KSimpleConfig cfg( *eIt, true );
@@ -687,26 +687,26 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
if ( cfg.hasKey( "X-KDE-ShowIfRunning" ) )
{
- const QString app = cfg.readEntry( "X-KDE-ShowIfRunning" );
+ const TQString app = cfg.readEntry( "X-KDE-ShowIfRunning" );
if ( !kapp->dcopClient()->isApplicationRegistered( app.utf8() ) )
continue;
}
if ( cfg.hasKey( "X-KDE-ShowIfDcopCall" ) )
{
- QString dcopcall = cfg.readEntry( "X-KDE-ShowIfDcopCall" );
- const QCString app = dcopcall.section(' ', 0,0).utf8();
+ TQString dcopcall = cfg.readEntry( "X-KDE-ShowIfDcopCall" );
+ const TQCString app = dcopcall.section(' ', 0,0).utf8();
//if( !kapp->dcopClient()->isApplicationRegistered( app ))
// continue; //app does not exist so cannot send call
- QByteArray dataToSend;
- QDataStream dataStream(dataToSend, IO_WriteOnly);
+ TQByteArray dataToSend;
+ TQDataStream dataStream(dataToSend, IO_WriteOnly);
dataStream << m_lstPopupURLs;
- QCString replyType;
- QByteArray replyData;
- QCString object = dcopcall.section(' ', 1,-2).utf8();
- QString function = dcopcall.section(' ', -1);
+ TQCString replyType;
+ TQByteArray replyData;
+ TQCString object = dcopcall.section(' ', 1,-2).utf8();
+ TQString function = dcopcall.section(' ', -1);
if(!function.endsWith("(KURL::List)")) {
kdWarning() << "Desktop file " << *eIt << " contains an invalid X-KDE-ShowIfDcopCall - the function must take the exact parameter (KURL::List) and must be specified." << endl;
continue; //Be safe.
@@ -722,13 +722,13 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
}
if ( cfg.hasKey( "X-KDE-Protocol" ) )
{
- const QString protocol = cfg.readEntry( "X-KDE-Protocol" );
+ const TQString protocol = cfg.readEntry( "X-KDE-Protocol" );
if ( protocol != urlForServiceMenu.protocol() )
continue;
}
else if ( cfg.hasKey( "X-KDE-Protocols" ) )
{
- QStringList protocols = QStringList::split( "," , cfg.readEntry( "X-KDE-Protocols" ) );
+ TQStringList protocols = TQStringList::split( "," , cfg.readEntry( "X-KDE-Protocols" ) );
if ( !protocols.contains( urlForServiceMenu.protocol() ) )
continue;
}
@@ -742,18 +742,18 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
if ( cfg.hasKey( "X-KDE-Require" ) )
{
- const QStringList capabilities = cfg.readListEntry( "X-KDE-Require" );
+ const TQStringList capabilities = cfg.readListEntry( "X-KDE-Require" );
if ( capabilities.contains( "Write" ) && !sWriting )
continue;
}
if ( (cfg.hasKey( "Actions" ) || cfg.hasKey( "X-KDE-GetActionMenu") ) && cfg.hasKey( "ServiceTypes" ) )
{
- const QStringList types = cfg.readListEntry( "ServiceTypes" );
- const QStringList excludeTypes = cfg.readListEntry( "ExcludeServiceTypes" );
+ const TQStringList types = cfg.readListEntry( "ServiceTypes" );
+ const TQStringList excludeTypes = cfg.readListEntry( "ExcludeServiceTypes" );
bool ok = false;
// check for exact matches or a typeglob'd mimetype if we have a mimetype
- for (QStringList::ConstIterator it = types.begin();
+ for (TQStringList::ConstIterator it = types.begin();
it != types.end() && !ok;
++it)
{
@@ -787,7 +787,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
if (checkTheMimetypes)
{
ok = true;
- for (QStringList::ConstIterator itex = excludeTypes.begin(); itex != excludeTypes.end(); ++itex)
+ for (TQStringList::ConstIterator itex = excludeTypes.begin(); itex != excludeTypes.end(); ++itex)
{
if( ((*itex).right(1) == "*" && (*itex).left((*itex).find('/')) == mimeGroup) ||
((*itex) == m_sMimeType) )
@@ -801,8 +801,8 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
if ( ok )
{
- const QString priority = cfg.readEntry("X-KDE-Priority");
- const QString submenuName = cfg.readEntry( "X-KDE-Submenu" );
+ const TQString priority = cfg.readEntry("X-KDE-Priority");
+ const TQString submenuName = cfg.readEntry( "X-KDE-Submenu" );
ServiceList* list = s.selectList( priority, submenuName );
(*list) += KDEDesktopMimeType::userDefinedServices( *eIt, cfg, url.isLocalFile(), m_lstPopupURLs );
@@ -814,13 +814,13 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
if (kapp->authorizeKAction("openwith"))
{
- QString constraint = "Type == 'Application' and DesktopEntryName != 'kfmclient' and DesktopEntryName != 'kfmclient_dir' and DesktopEntryName != 'kfmclient_html'";
- QString subConstraint = " and '%1' in ServiceTypes";
+ TQString constraint = "Type == 'Application' and DesktopEntryName != 'kfmclient' and DesktopEntryName != 'kfmclient_dir' and DesktopEntryName != 'kfmclient_html'";
+ TQString subConstraint = " and '%1' in ServiceTypes";
- QStringList::ConstIterator it = mimeTypeList.begin();
- QStringList::ConstIterator end = mimeTypeList.end();
+ TQStringList::ConstIterator it = mimeTypeList.begin();
+ TQStringList::ConstIterator end = mimeTypeList.end();
Q_ASSERT( it != end );
- QString first = *it;
+ TQString first = *it;
++it;
while ( it != end ) {
constraint += subConstraint.arg( *it );
@@ -846,14 +846,14 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
// First block, app and preview offers
id = 1;
- QDomElement menu = m_menuElement;
+ TQDomElement menu = m_menuElement;
if ( offers.count() > 1 ) // submenu 'open with'
{
menu = m_doc.createElement( "menu" );
menu.setAttribute( "name", "openwith submenu" );
m_menuElement.appendChild( menu );
- QDomElement text = m_doc.createElement( "text" );
+ TQDomElement text = m_doc.createElement( "text" );
menu.appendChild( text );
text.appendChild( m_doc.createTextNode( i18n("&Open With") ) );
}
@@ -867,35 +867,35 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
// but still offer NoDisplay=true entries, that's the
// whole point of such desktop files. This is why we don't
// use service->noDisplay() here.
- const QString onlyShowIn = service->property("OnlyShowIn", QVariant::String).toString();
+ const TQString onlyShowIn = service->property("OnlyShowIn", TQVariant::String).toString();
if ( !onlyShowIn.isEmpty() ) {
- const QStringList aList = QStringList::split(';', onlyShowIn);
+ const TQStringList aList = TQStringList::split(';', onlyShowIn);
if (!aList.contains("KDE"))
continue;
}
- const QString notShowIn = service->property("NotShowIn", QVariant::String).toString();
+ const TQString notShowIn = service->property("NotShowIn", TQVariant::String).toString();
if ( !notShowIn.isEmpty() ) {
- const QStringList aList = QStringList::split(';', notShowIn);
+ const TQStringList aList = TQStringList::split(';', notShowIn);
if (aList.contains("KDE"))
continue;
}
- QCString nam;
+ TQCString nam;
nam.setNum( id );
- QString actionName( (*it)->name().replace("&", "&&") );
+ TQString actionName( (*it)->name().replace("&", "&&") );
if ( menu == m_menuElement ) // no submenu -> prefix single offer
actionName = i18n( "Open with %1" ).arg( actionName );
act = new KAction( actionName, (*it)->pixmap( KIcon::Small ), 0,
- this, SLOT( slotRunService() ),
+ this, TQT_SLOT( slotRunService() ),
&m_ownActions, nam.prepend( "appservice_" ) );
addAction( act, menu );
m_mapPopup[ id++ ] = *it;
}
- QString openWithActionName;
+ TQString openWithActionName;
if ( menu != m_menuElement ) // submenu
{
addSeparator( menu );
@@ -905,12 +905,12 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
{
openWithActionName = i18n( "&Open With..." );
}
- KAction *openWithAct = new KAction( openWithActionName, 0, this, SLOT( slotPopupOpenWith() ), &m_ownActions, "openwith" );
+ KAction *openWithAct = new KAction( openWithActionName, 0, this, TQT_SLOT( slotPopupOpenWith() ), &m_ownActions, "openwith" );
addAction( openWithAct, menu );
}
else // no app offers -> Open With...
{
- act = new KAction( i18n( "&Open With..." ), 0, this, SLOT( slotPopupOpenWith() ), &m_ownActions, "openwith" );
+ act = new KAction( i18n( "&Open With..." ), 0, this, TQT_SLOT( slotPopupOpenWith() ), &m_ownActions, "openwith" );
addAction( act );
}
@@ -919,7 +919,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
}
// Second block, builtin + user
- QDomElement actionMenu = m_menuElement;
+ TQDomElement actionMenu = m_menuElement;
int userItemCount = 0;
if (s.user.count() + s.userSubmenus.count() +
s.userPriority.count() + s.userPrioritySubmenus.count() > 1)
@@ -928,7 +928,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
actionMenu = m_doc.createElement( "menu" );
actionMenu.setAttribute( "name", "actions submenu" );
m_menuElement.appendChild( actionMenu );
- QDomElement text = m_doc.createElement( "text" );
+ TQDomElement text = m_doc.createElement( "text" );
actionMenu.appendChild( text );
text.appendChild( m_doc.createTextNode( i18n("Ac&tions") ) );
}
@@ -943,7 +943,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
s.builtin.count() > 0) &&
actionMenu.lastChild().toElement().tagName().lower() != "separator")
{
- QDomElement separator = m_doc.createElement( "separator" );
+ TQDomElement separator = m_doc.createElement( "separator" );
actionMenu.appendChild(separator);
}
@@ -964,7 +964,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
if ( KPropertiesDialog::canDisplay( m_lstItems ) && (kpf & ShowProperties) )
{
- act = new KAction( i18n( "&Properties" ), 0, this, SLOT( slotPopupProperties() ),
+ act = new KAction( i18n( "&Properties" ), 0, this, TQT_SLOT( slotPopupProperties() ),
&m_ownActions, "properties" );
addAction( act );
}
@@ -978,7 +978,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
if ( KFileShare::authorization() == KFileShare::Authorized )
{
addSeparator();
- act = new KAction( i18n("Share"), 0, this, SLOT( slotOpenShareFileDialog() ),
+ act = new KAction( i18n("Share"), 0, this, TQT_SLOT( slotOpenShareFileDialog() ),
&m_ownActions, "sharefile" );
addAction( act );
}
@@ -1005,7 +1005,7 @@ KonqPopupMenu::~KonqPopupMenu()
//kdDebug(1203) << "~KonqPopupMenu leave" << endl;
}
-void KonqPopupMenu::setURLTitle( const QString& urlTitle )
+void KonqPopupMenu::setURLTitle( const TQString& urlTitle )
{
d->m_urlTitle = urlTitle;
}
@@ -1045,7 +1045,7 @@ void KonqPopupMenu::slotPopupAddToBookmark()
KBookmarkGroup root;
if ( m_lstPopupURLs.count() == 1 ) {
KURL url = m_lstPopupURLs.first();
- QString title = d->m_urlTitle.isEmpty() ? url.prettyURL() : d->m_urlTitle;
+ TQString title = d->m_urlTitle.isEmpty() ? url.prettyURL() : d->m_urlTitle;
root = m_pManager->addBookmarkDialog( url.prettyURL(), title );
}
else
@@ -1060,11 +1060,11 @@ void KonqPopupMenu::slotPopupAddToBookmark()
void KonqPopupMenu::slotRunService()
{
- QCString senderName = sender()->name();
+ TQCString senderName = sender()->name();
int id = senderName.mid( senderName.find( '_' ) + 1 ).toInt();
// Is it a usual service (application)
- QMap<int,KService::Ptr>::Iterator it = m_mapPopup.find( id );
+ TQMap<int,KService::Ptr>::Iterator it = m_mapPopup.find( id );
if ( it != m_mapPopup.end() )
{
KRun::run( **it, m_lstPopupURLs );
@@ -1072,7 +1072,7 @@ void KonqPopupMenu::slotRunService()
}
// Is it a service specific to desktop entry files ?
- QMap<int,KDEDesktopMimeType::Service>::Iterator it2 = m_mapPopupServices.find( id );
+ TQMap<int,KDEDesktopMimeType::Service>::Iterator it2 = m_mapPopupServices.find( id );
if ( it2 != m_mapPopupServices.end() )
{
KDEDesktopMimeType::executeService( m_lstPopupURLs, it2.data() );
@@ -1109,9 +1109,9 @@ KPropertiesDialog* KonqPopupMenu::showPropertiesDialog()
return new KPropertiesDialog( m_lstItems, d->m_parentWidget );
}
-KAction *KonqPopupMenu::action( const QDomElement &element ) const
+KAction *KonqPopupMenu::action( const TQDomElement &element ) const
{
- QCString name = element.attribute( attrName ).ascii();
+ TQCString name = element.attribute( attrName ).ascii();
KAction *res = m_ownActions.action( name );
if ( !res )
@@ -1128,7 +1128,7 @@ KActionCollection *KonqPopupMenu::actionCollection() const
return const_cast<KActionCollection *>( &m_ownActions );
}
-QString KonqPopupMenu::mimeType() const
+TQString KonqPopupMenu::mimeType() const
{
return m_sMimeType;
}
@@ -1144,7 +1144,7 @@ void KonqPopupMenu::addPlugins()
//search for a plugin with the right protocol
KTrader::OfferList plugin_offers;
unsigned int pluginCount = 0;
- plugin_offers = KTrader::self()->query( m_sMimeType.isNull() ? QString::fromLatin1( "all/all" ) : m_sMimeType, "'KonqPopupMenu/Plugin' in ServiceTypes");
+ plugin_offers = KTrader::self()->query( m_sMimeType.isNull() ? TQString::fromLatin1( "all/all" ) : m_sMimeType, "'KonqPopupMenu/Plugin' in ServiceTypes");
if ( plugin_offers.isEmpty() )
return; // no plugins installed do not bother about it
@@ -1157,13 +1157,13 @@ void KonqPopupMenu::addPlugins()
//kdDebug() << (*iterator)->library() << endl;
KonqPopupMenuPlugin *plugin =
KParts::ComponentFactory::
- createInstanceFromLibrary<KonqPopupMenuPlugin>( QFile::encodeName( (*iterator)->library() ),
+ createInstanceFromLibrary<KonqPopupMenuPlugin>( TQFile::encodeName( (*iterator)->library() ),
this,
(*iterator)->name().latin1() );
if ( !plugin )
continue;
// This make the kuick plugin insert its stuff above "Properties"
- QString pluginClientName = QString::fromLatin1( "Plugin%1" ).arg( pluginCount );
+ TQString pluginClientName = TQString::fromLatin1( "Plugin%1" ).arg( pluginCount );
addMerge( pluginClientName );
plugin->domDocument().documentElement().setAttribute( "name", pluginClientName );
m_pluginList.append( plugin );
@@ -1194,7 +1194,7 @@ KURL::List KonqPopupMenu::popupURLList() const
*/
KonqPopupMenuPlugin::KonqPopupMenuPlugin( KonqPopupMenu *parent, const char *name )
- : QObject( parent, name )
+ : TQObject( parent, name )
{
}
diff --git a/libkonq/konq_popupmenu.h b/libkonq/konq_popupmenu.h
index 44021713f..ee528bc9e 100644
--- a/libkonq/konq_popupmenu.h
+++ b/libkonq/konq_popupmenu.h
@@ -23,11 +23,11 @@
#include <sys/types.h>
-#include <qpopupmenu.h>
-#include <qmap.h>
+#include <tqpopupmenu.h>
+#include <tqmap.h>
#include <kaction.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kfileitem.h>
#include <kmimetype.h> // for KDEDesktopMimeType
@@ -37,7 +37,7 @@
#include "konq_xmlguiclient.h"
-typedef QValueList<KDEDesktopMimeType::Service> ServiceList;
+typedef TQValueList<KDEDesktopMimeType::Service> ServiceList;
class KPropertiesDialog;
class KNewMenu;
@@ -52,7 +52,7 @@ class KBookmarkManager;
* with the correct arguments, then exec() to make it appear, then destroy it.
*
*/
-class LIBKONQ_EXPORT KonqPopupMenu : public QPopupMenu, public KonqXMLGUIClient
+class LIBKONQ_EXPORT KonqPopupMenu : public TQPopupMenu, public KonqXMLGUIClient
{
Q_OBJECT
public:
@@ -89,7 +89,7 @@ public:
KURL viewURL,
KActionCollection & actions,
KNewMenu * newMenu,
- QWidget * parentWidget,
+ TQWidget * parentWidget,
bool showPropertiesAndFileType = true ) KDE_DEPRECATED;
/**
@@ -117,7 +117,7 @@ public:
const KURL& viewURL,
KActionCollection & actions,
KNewMenu * newMenu,
- QWidget * parentWidget,
+ TQWidget * parentWidget,
KonqPopupFlags kpf,
KParts::BrowserExtension::PopupFlags f /*= KParts::BrowserExtension::DefaultPopupItems*/);
@@ -130,7 +130,7 @@ public:
* Set the title of the URL, when the popupmenu is opened for a single URL.
* This is used if the user chooses to add a bookmark for this URL.
*/
- void setURLTitle( const QString& urlTitle );
+ void setURLTitle( const TQString& urlTitle );
class LIBKONQ_EXPORT ProtocolInfo {
public:
@@ -151,11 +151,11 @@ public:
/**
* Reimplemented for internal purpose
*/
- virtual KAction *action( const QDomElement &element ) const;
+ virtual KAction *action( const TQDomElement &element ) const;
virtual KActionCollection *actionCollection() const;
- QString mimeType( ) const;
+ TQString mimeType( ) const;
KURL url( ) const;
KFileItemList fileItemList() const;
KURL::List popupURLList( ) const;
@@ -177,11 +177,11 @@ protected:
KActionCollection m_ownActions;
private:
- void init (QWidget * parentWidget, KonqPopupFlags kpf, KParts::BrowserExtension::PopupFlags itemFlags);
+ void init (TQWidget * parentWidget, KonqPopupFlags kpf, KParts::BrowserExtension::PopupFlags itemFlags);
void setup(KonqPopupFlags kpf);
void addPlugins( );
- int insertServicesSubmenus(const QMap<QString, ServiceList>& list, QDomElement& menu, bool isBuiltin);
- int insertServices(const ServiceList& list, QDomElement& menu, bool isBuiltin);
+ int insertServicesSubmenus(const TQMap<TQString, ServiceList>& list, TQDomElement& menu, bool isBuiltin);
+ int insertServices(const ServiceList& list, TQDomElement& menu, bool isBuiltin);
bool KIOSKAuthorizedAction(KConfig& cfg);
KPropertiesDialog* showPropertiesDialog();
@@ -189,21 +189,21 @@ private:
KonqPopupMenuPrivate *d;
KNewMenu *m_pMenuNew;
KURL m_sViewURL;
- QString m_sMimeType;
+ TQString m_sMimeType;
KFileItemList m_lstItems;
KURL::List m_lstPopupURLs;
- QMap<int,KService::Ptr> m_mapPopup;
- QMap<int,KDEDesktopMimeType::Service> m_mapPopupServices;
+ TQMap<int,KService::Ptr> m_mapPopup;
+ TQMap<int,KDEDesktopMimeType::Service> m_mapPopupServices;
bool m_bHandleEditOperations;
KXMLGUIFactory *m_factory;
KXMLGUIBuilder *m_builder;
- QString attrName;
+ TQString attrName;
ProtocolInfo m_info;
- QPtrList<KonqPopupMenuPlugin> m_pluginList;
+ TQPtrList<KonqPopupMenuPlugin> m_pluginList;
KBookmarkManager* m_pManager;
};
-class LIBKONQ_EXPORT KonqPopupMenuPlugin : public QObject, public KonqXMLGUIClient {
+class LIBKONQ_EXPORT KonqPopupMenuPlugin : public TQObject, public KonqXMLGUIClient {
Q_OBJECT
public:
/**
diff --git a/libkonq/konq_propsview.cc b/libkonq/konq_propsview.cc
index c2cc3dd3d..62ec8da48 100644
--- a/libkonq/konq_propsview.cc
+++ b/libkonq/konq_propsview.cc
@@ -23,10 +23,10 @@
#include <kdebug.h>
#include <kstandarddirs.h>
#include <kpixmap.h>
-#include <qpixmapcache.h>
-#include <qiconview.h>
+#include <tqpixmapcache.h>
+#include <tqiconview.h>
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <iostream>
#include <ktrader.h>
#include <kinstance.h>
@@ -34,16 +34,16 @@
#include <ksimpleconfig.h>
-static QPixmap wallpaperPixmap( const QString & _wallpaper )
+static TQPixmap wallpaperPixmap( const TQString & _wallpaper )
{
- QString key = "wallpapers/";
+ TQString key = "wallpapers/";
key += _wallpaper;
KPixmap pix;
- if ( QPixmapCache::find( key, pix ) )
+ if ( TQPixmapCache::find( key, pix ) )
return pix;
- QString path = locate("tiles", _wallpaper);
+ TQString path = locate("tiles", _wallpaper);
if (path.isEmpty())
path = locate("wallpaper", _wallpaper);
if (!path.isEmpty())
@@ -56,20 +56,20 @@ static QPixmap wallpaperPixmap( const QString & _wallpaper )
if ( pix.isNull() )
kdWarning(1203) << "Could not load wallpaper " << path << endl;
else
- QPixmapCache::insert( key, pix );
+ TQPixmapCache::insert( key, pix );
return pix;
} else kdWarning(1203) << "Couldn't locate wallpaper " << _wallpaper << endl;
- return QPixmap();
+ return TQPixmap();
}
struct KonqPropsView::Private
{
- QStringList* previewsToShow;
+ TQStringList* previewsToShow;
bool previewsEnabled:1;
bool caseInsensitiveSort:1;
bool dirsfirst:1;
bool descending:1;
- QString sortcriterion;
+ TQString sortcriterion;
};
KonqPropsView::KonqPropsView( KInstance * instance, KonqPropsView * defaultProps )
@@ -88,7 +88,7 @@ KonqPropsView::KonqPropsView( KInstance * instance, KonqPropsView * defaultProps
d->caseInsensitiveSort=config->readBoolEntry( "CaseInsensitiveSort", true );
m_iIconSize = config->readNumEntry( "IconSize", 0 );
- m_iItemTextPos = config->readNumEntry( "ItemTextPos", QIconView::Bottom );
+ m_iItemTextPos = config->readNumEntry( "ItemTextPos", TQIconView::Bottom );
d->sortcriterion = config->readEntry( "SortingCriterion", "sort_nci" );
d->dirsfirst = config->readBoolEntry( "SortDirsFirst", true );
d->descending = config->readBoolEntry( "SortDescending", false );
@@ -109,9 +109,9 @@ KonqPropsView::KonqPropsView( KInstance * instance, KonqPropsView * defaultProps
d->previewsEnabled = config->readBoolEntry( "PreviewsEnabled", true );
- QColor tc = KonqFMSettings::settings()->normalTextColor();
+ TQColor tc = KonqFMSettings::settings()->normalTextColor();
m_textColor = config->readColorEntry( "TextColor", &tc );
- m_bgColor = config->readColorEntry( "BgColor" ); // will be set to QColor() if not found
+ m_bgColor = config->readColorEntry( "BgColor" ); // will be set to TQColor() if not found
m_bgPixmapFile = config->readPathEntry( "BgImage" );
//kdDebug(1203) << "KonqPropsView::KonqPropsView from \"config\" : BgImage=" << m_bgPixmapFile << endl;
@@ -188,8 +188,8 @@ bool KonqPropsView::enterDir( const KURL & dir )
// Check for .directory
KURL u ( dir );
u.addPath(".directory");
- bool dotDirExists = u.isLocalFile() && QFile::exists( u.path() );
- dotDirectory = u.isLocalFile() ? u.path() : QString::null;
+ bool dotDirExists = u.isLocalFile() && TQFile::exists( u.path() );
+ dotDirectory = u.isLocalFile() ? u.path() : TQString::null;
// Revert to default setting first - unless there is no .directory
// in the previous dir nor in this one (then we can keep the current settings)
@@ -300,7 +300,7 @@ void KonqPropsView::setItemTextPos( int pos )
}
}
-void KonqPropsView::setSortCriterion( const QString &criterion )
+void KonqPropsView::setSortCriterion( const TQString &criterion )
{
d->sortcriterion = criterion;
if ( m_defaultProps && !m_bSaveViewPropertiesLocally )
@@ -393,7 +393,7 @@ void KonqPropsView::setShowingDirectoryOverlays( bool show )
}
}
-void KonqPropsView::setShowingPreview( const QString &preview, bool show )
+void KonqPropsView::setShowingPreview( const TQString &preview, bool show )
{
if ( m_dontPreview.contains( preview ) != show )
return;
@@ -452,7 +452,7 @@ bool KonqPropsView::isShowingPreview()
return d->previewsEnabled;
}
-void KonqPropsView::setBgColor( const QColor & color )
+void KonqPropsView::setBgColor( const TQColor & color )
{
m_bgColor = color;
if ( m_defaultProps && !m_bSaveViewPropertiesLocally )
@@ -471,7 +471,7 @@ void KonqPropsView::setBgColor( const QColor & color )
}
}
-const QColor & KonqPropsView::bgColor( QWidget * widget ) const
+const TQColor & KonqPropsView::bgColor( TQWidget * widget ) const
{
if ( !m_bgColor.isValid() )
return widget->colorGroup().base();
@@ -479,7 +479,7 @@ const QColor & KonqPropsView::bgColor( QWidget * widget ) const
return m_bgColor;
}
-void KonqPropsView::setTextColor( const QColor & color )
+void KonqPropsView::setTextColor( const TQColor & color )
{
m_textColor = color;
if ( m_defaultProps && !m_bSaveViewPropertiesLocally )
@@ -498,7 +498,7 @@ void KonqPropsView::setTextColor( const QColor & color )
}
}
-const QColor & KonqPropsView::textColor( QWidget * widget ) const
+const TQColor & KonqPropsView::textColor( TQWidget * widget ) const
{
if ( !m_textColor.isValid() )
return widget->colorGroup().text();
@@ -506,7 +506,7 @@ const QColor & KonqPropsView::textColor( QWidget * widget ) const
return m_textColor;
}
-void KonqPropsView::setBgPixmapFile( const QString & file )
+void KonqPropsView::setBgPixmapFile( const TQString & file )
{
m_bgPixmapFile = file;
@@ -526,22 +526,22 @@ void KonqPropsView::setBgPixmapFile( const QString & file )
}
}
-QPixmap KonqPropsView::loadPixmap() const
+TQPixmap KonqPropsView::loadPixmap() const
{
//kdDebug(1203) << "KonqPropsView::loadPixmap " << m_bgPixmapFile << endl;
- QPixmap bgPixmap;
+ TQPixmap bgPixmap;
if ( !m_bgPixmapFile.isEmpty() )
bgPixmap = wallpaperPixmap( m_bgPixmapFile );
return bgPixmap;
}
-void KonqPropsView::applyColors(QWidget * widget) const
+void KonqPropsView::applyColors(TQWidget * widget) const
{
if ( m_bgPixmapFile.isEmpty() )
widget->setPaletteBackgroundColor( bgColor( widget ) );
else
{
- QPixmap pix = loadPixmap();
+ TQPixmap pix = loadPixmap();
// don't set an null pixmap, as this leads to
// undefined results with regards to the background of widgets
// that have the iconview as a parent and on the iconview itself
@@ -556,7 +556,7 @@ void KonqPropsView::applyColors(QWidget * widget) const
widget->setPaletteForegroundColor( m_textColor );
}
-const QStringList& KonqPropsView::previewSettings()
+const TQStringList& KonqPropsView::previewSettings()
{
if ( ! d->previewsToShow )
{
@@ -566,7 +566,7 @@ const QStringList& KonqPropsView::previewSettings()
KTrader::OfferList plugins = KTrader::self()->query( "ThumbCreator" );
for ( KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it )
{
- QString name = (*it)->desktopEntryName();
+ TQString name = (*it)->desktopEntryName();
if ( ! m_dontPreview.contains(name) )
d->previewsToShow->append( name );
}
@@ -578,7 +578,7 @@ const QStringList& KonqPropsView::previewSettings()
return *(d->previewsToShow);
}
-const QString& KonqPropsView::sortCriterion() const {
+const TQString& KonqPropsView::sortCriterion() const {
return d->sortcriterion;
}
diff --git a/libkonq/konq_propsview.h b/libkonq/konq_propsview.h
index 679ce8a0e..c69b97966 100644
--- a/libkonq/konq_propsview.h
+++ b/libkonq/konq_propsview.h
@@ -20,8 +20,8 @@
#ifndef __konq_viewprops_h__
#define __konq_viewprops_h__
-#include <qpixmap.h>
-#include <qstringlist.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
#include <kurl.h>
#include <libkonq_export.h>
@@ -84,11 +84,11 @@ public:
void setIconSize( int size ); // in pixel, 0 for default
int iconSize() const { return m_iIconSize; }
- void setItemTextPos( int pos ); // QIconView::Bottom or QIconView::Right, currently
+ void setItemTextPos( int pos ); // TQIconView::Bottom or TQIconView::Right, currently
int itemTextPos() const { return m_iItemTextPos; }
- void setSortCriterion( const QString &criterion );
- const QString& sortCriterion() const;
+ void setSortCriterion( const TQString &criterion );
+ const TQString& sortCriterion() const;
void setDirsFirst ( bool first );
bool isDirsFirst() const;
@@ -105,25 +105,25 @@ public:
void setShowingDirectoryOverlays( bool show );
bool isShowingDirectoryOverlays() const { return m_bShowDirectoryOverlays; }
- void setShowingPreview( const QString &preview, bool show );
+ void setShowingPreview( const TQString &preview, bool show );
void setShowingPreview( bool show );
- bool isShowingPreview( const QString &preview ) const { return ! m_dontPreview.contains(preview); }
+ bool isShowingPreview( const TQString &preview ) const { return ! m_dontPreview.contains(preview); }
bool isShowingPreview();
- const QStringList &previewSettings();
+ const TQStringList &previewSettings();
- void setBgColor( const QColor & color );
- const QColor& bgColor(QWidget * widget) const;
- void setTextColor( const QColor & color );
- const QColor& textColor(QWidget * widget) const;
- void setBgPixmapFile( const QString & file );
- const QString& bgPixmapFile() const { return m_bgPixmapFile; }
+ void setBgColor( const TQColor & color );
+ const TQColor& bgColor(TQWidget * widget) const;
+ void setTextColor( const TQColor & color );
+ const TQColor& textColor(TQWidget * widget) const;
+ void setBgPixmapFile( const TQString & file );
+ const TQString& bgPixmapFile() const { return m_bgPixmapFile; }
// Applies bgcolor, textcolor, pixmap to the @p widget
- void applyColors( QWidget * widget ) const;
+ void applyColors( TQWidget * widget ) const;
protected:
- QPixmap loadPixmap() const;
+ TQPixmap loadPixmap() const;
// Current config object for _saving_
KConfigBase * currentConfig();
@@ -131,9 +131,9 @@ protected:
// Current config object for _saving_ settings related to colors
KConfigBase * currentColorConfig();
- QString currentGroup() const {
+ TQString currentGroup() const {
return isDefaultProperties() ?
- QString::fromLatin1("Settings") : QString::fromLatin1("URL properties");
+ TQString::fromLatin1("Settings") : TQString::fromLatin1("URL properties");
}
private:
@@ -143,13 +143,13 @@ private:
int m_iItemTextPos;
bool m_bShowDot;
bool m_bShowDirectoryOverlays;
- QStringList m_dontPreview;
- QColor m_textColor;
- QColor m_bgColor;
- QString m_bgPixmapFile;
+ TQStringList m_dontPreview;
+ TQColor m_textColor;
+ TQColor m_bgColor;
+ TQString m_bgPixmapFile;
// Path to .directory file, whether it exists or not
- QString dotDirectory;
+ TQString dotDirectory;
bool m_bSaveViewPropertiesLocally;
diff --git a/libkonq/konq_settings.cc b/libkonq/konq_settings.cc
index 07866b08b..d48c7af10 100644
--- a/libkonq/konq_settings.cc
+++ b/libkonq/konq_settings.cc
@@ -25,7 +25,7 @@
#include <kdesktopfile.h>
#include <kdebug.h>
#include <assert.h>
-#include <qfontmetrics.h>
+#include <tqfontmetrics.h>
struct KonqFMSettingsPrivate
{
@@ -90,7 +90,7 @@ void KonqFMSettings::init( KConfig * config )
d->m_iconTextWidth = config->readNumEntry( "TextWidth", DEFAULT_TEXTWIDTH );
if ( d->m_iconTextWidth == DEFAULT_TEXTWIDTH )
- d->m_iconTextWidth = QFontMetrics(m_standardFont).width("0000000000");
+ d->m_iconTextWidth = TQFontMetrics(m_standardFont).width("0000000000");
m_iconTextHeight = config->readNumEntry( "TextHeight", 0 );
if ( m_iconTextHeight == 0 ) {
@@ -119,11 +119,11 @@ void KonqFMSettings::init( KConfig * config )
m_embedMap = config->entryMap( "EmbedSettings" );
- /// true if QString::localeAwareCompare is case sensitive (it usually isn't, when LC_COLLATE is set)
- d->localeAwareCompareIsCaseSensitive = QString( "a" ).localeAwareCompare( "B" ) > 0; // see #40131
+ /// true if TQString::localeAwareCompare is case sensitive (it usually isn't, when LC_COLLATE is set)
+ d->localeAwareCompareIsCaseSensitive = TQString( "a" ).localeAwareCompare( "B" ) > 0; // see #40131
}
-bool KonqFMSettings::shouldEmbed( const QString & serviceType ) const
+bool KonqFMSettings::shouldEmbed( const TQString & serviceType ) const
{
// First check in user's settings whether to embed or not
// 1 - in the mimetype file itself
@@ -132,7 +132,7 @@ bool KonqFMSettings::shouldEmbed( const QString & serviceType ) const
if ( serviceTypePtr )
{
hasLocalProtocolRedirect = !serviceTypePtr->property( "X-KDE-LocalProtocol" ).toString().isEmpty();
- QVariant autoEmbedProp = serviceTypePtr->property( "X-KDE-AutoEmbed" );
+ TQVariant autoEmbedProp = serviceTypePtr->property( "X-KDE-AutoEmbed" );
if ( autoEmbedProp.isValid() )
{
bool autoEmbed = autoEmbedProp.toBool();
@@ -142,14 +142,14 @@ bool KonqFMSettings::shouldEmbed( const QString & serviceType ) const
kdDebug(1203) << "No X-KDE-AutoEmbed, looking for group" << endl;
}
// 2 - in the configuration for the group if nothing was found in the mimetype
- QString serviceTypeGroup = serviceType.left(serviceType.find("/"));
+ TQString serviceTypeGroup = serviceType.left(serviceType.find("/"));
kdDebug(1203) << "KonqFMSettings::shouldEmbed : serviceTypeGroup=" << serviceTypeGroup << endl;
if ( serviceTypeGroup == "inode" || serviceTypeGroup == "Browser" || serviceTypeGroup == "Konqueror" )
return true; //always embed mimetype inode/*, Browser/* and Konqueror/*
- QMap<QString, QString>::ConstIterator it = m_embedMap.find( QString::fromLatin1("embed-")+serviceTypeGroup );
+ TQMap<TQString, TQString>::ConstIterator it = m_embedMap.find( TQString::fromLatin1("embed-")+serviceTypeGroup );
if ( it != m_embedMap.end() ) {
kdDebug(1203) << "KonqFMSettings::shouldEmbed: " << it.data() << endl;
- return it.data() == QString::fromLatin1("true");
+ return it.data() == TQString::fromLatin1("true");
}
// 3 - if no config found, use default.
// Note: if you change those defaults, also change kcontrol/filetypes/typeslistitem.cpp !
@@ -169,12 +169,12 @@ bool KonqFMSettings::renameIconDirectly() const
return d->m_renameIconDirectly;
}
-int KonqFMSettings::caseSensitiveCompare( const QString& a, const QString& b ) const
+int KonqFMSettings::caseSensitiveCompare( const TQString& a, const TQString& b ) const
{
if ( d->localeAwareCompareIsCaseSensitive ) {
return a.localeAwareCompare( b );
}
- else // can't use localeAwareCompare, have to fallback to normal QString compare
+ else // can't use localeAwareCompare, have to fallback to normal TQString compare
return a.compare( b );
}
diff --git a/libkonq/konq_settings.h b/libkonq/konq_settings.h
index 8f3d981fc..365e03fc9 100644
--- a/libkonq/konq_settings.h
+++ b/libkonq/konq_settings.h
@@ -21,10 +21,10 @@
#define __konq_settings_h__
class KConfig;
-#include <qcolor.h>
-#include <qstring.h>
-#include <qfont.h>
-#include <qmap.h>
+#include <tqcolor.h>
+#include <tqstring.h>
+#include <tqfont.h>
+#include <tqmap.h>
#include <libkonq_export.h>
@@ -72,7 +72,7 @@ public:
// Use settings (and mimetype definition files)
// to find whether to embed a certain service type or not
// Only makes sense in konqueror.
- bool shouldEmbed( const QString & serviceType ) const;
+ bool shouldEmbed( const TQString & serviceType ) const;
// Behaviour settings
bool wordWrapText() const { return m_bWordWrapText; }
@@ -81,7 +81,7 @@ public:
bool underlineLink() const { return m_underlineLink; }
bool fileSizeInBytes() const { return m_fileSizeInBytes; }
bool alwaysNewWin() const { return m_alwaysNewWin; }
- const QString & homeURL() const { return m_homeURL; }
+ const TQString & homeURL() const { return m_homeURL; }
bool showFileTips() const {return m_showFileTips; }
bool showPreviewsInFileTips() const;
@@ -89,16 +89,16 @@ public:
bool renameIconDirectly() const;
// Font settings
- const QFont& standardFont() const { return m_standardFont; }
+ const TQFont& standardFont() const { return m_standardFont; }
// Color settings
- const QColor& normalTextColor() const { return m_normalTextColor; }
- const QColor& highlightedTextColor() const { return m_highlightedTextColor; }
- const QColor& itemTextBackground() const { return m_itemTextBackground; }
+ const TQColor& normalTextColor() const { return m_normalTextColor; }
+ const TQColor& highlightedTextColor() const { return m_highlightedTextColor; }
+ const TQColor& itemTextBackground() const { return m_itemTextBackground; }
int textPreviewIconTransparency() const { return m_iconTransparency; }
- int caseSensitiveCompare( const QString& a, const QString& b ) const;
+ int caseSensitiveCompare( const TQString& a, const TQString& b ) const;
private:
@@ -109,18 +109,18 @@ private:
bool m_alwaysNewWin;
bool m_bTreeFollow;
- QMap<QString, QString> m_embedMap;
+ TQMap<TQString, TQString> m_embedMap;
- QFont m_standardFont;
+ TQFont m_standardFont;
- QColor m_normalTextColor;
- QColor m_highlightedTextColor;
- QColor m_itemTextBackground;
+ TQColor m_normalTextColor;
+ TQColor m_highlightedTextColor;
+ TQColor m_itemTextBackground;
bool m_bWordWrapText;
int m_iconTextHeight;
- QString m_homeURL;
+ TQString m_homeURL;
bool m_showFileTips;
int m_numFileTips;
diff --git a/libkonq/konq_sound.cc b/libkonq/konq_sound.cc
index c609df553..577dd5dc4 100644
--- a/libkonq/konq_sound.cc
+++ b/libkonq/konq_sound.cc
@@ -31,13 +31,13 @@ public:
KonqSoundPlayerImpl();
virtual ~KonqSoundPlayerImpl();
- virtual const QStringList &mimeTypes();
- virtual void play(const QString &fileName);
+ virtual const TQStringList &mimeTypes();
+ virtual void play(const TQString &fileName);
virtual void stop();
virtual bool isPlaying();
private:
- QStringList m_mimeTypes;
+ TQStringList m_mimeTypes;
KArtsDispatcher m_dispatcher;
Arts::SoundServerV2 m_soundServer;
@@ -58,7 +58,7 @@ KonqSoundPlayerImpl::~KonqSoundPlayerImpl()
delete m_factory;
}
-const QStringList &KonqSoundPlayerImpl::mimeTypes()
+const TQStringList &KonqSoundPlayerImpl::mimeTypes()
{
if (m_mimeTypes.isEmpty())
{
@@ -80,7 +80,7 @@ const QStringList &KonqSoundPlayerImpl::mimeTypes()
return m_mimeTypes;
}
-void KonqSoundPlayerImpl::play(const QString &fileName)
+void KonqSoundPlayerImpl::play(const TQString &fileName)
{
if (m_soundServer.isNull())
return;
@@ -109,17 +109,17 @@ bool KonqSoundPlayerImpl::isPlaying()
class KonqSoundFactory : public KLibFactory
{
public:
- KonqSoundFactory(QObject *parent = 0, const char *name = 0)
+ KonqSoundFactory(TQObject *parent = 0, const char *name = 0)
: KLibFactory(parent, name) {};
virtual ~KonqSoundFactory() {};
protected:
- virtual QObject *createObject(QObject * = 0, const char * = 0,
- const char *className = "QObject", const QStringList &args = QStringList());
+ virtual TQObject *createObject(TQObject * = 0, const char * = 0,
+ const char *className = "TQObject", const TQStringList &args = TQStringList());
};
-QObject *KonqSoundFactory::createObject(QObject *, const char *,
- const char *className, const QStringList &)
+TQObject *KonqSoundFactory::createObject(TQObject *, const char *,
+ const char *className, const TQStringList &)
{
if (qstrcmp(className, "KonqSoundPlayer") == 0)
return new KonqSoundPlayerImpl();
diff --git a/libkonq/konq_sound.h b/libkonq/konq_sound.h
index 78fcc968b..32bddc40f 100644
--- a/libkonq/konq_sound.h
+++ b/libkonq/konq_sound.h
@@ -24,8 +24,8 @@
class KonqSoundPlayer : public QObject
{
public:
- virtual const QStringList &mimeTypes() = 0;
- virtual void play(const QString &fileName) = 0;
+ virtual const TQStringList &mimeTypes() = 0;
+ virtual void play(const TQString &fileName) = 0;
virtual void stop() = 0;
virtual bool isPlaying() = 0;
};
diff --git a/libkonq/konq_undo.cc b/libkonq/konq_undo.cc
index 7f8d1a4c6..91eece83b 100644
--- a/libkonq/konq_undo.cc
+++ b/libkonq/konq_undo.cc
@@ -86,21 +86,21 @@ public:
};
KonqCommandRecorder::KonqCommandRecorder( KonqCommand::Type op, const KURL::List &src, const KURL &dst, KIO::Job *job )
- : QObject( job, "konqcmdrecorder" )
+ : TQObject( job, "konqcmdrecorder" )
{
d = new KonqCommandRecorderPrivate;
d->m_cmd.m_type = op;
d->m_cmd.m_valid = true;
d->m_cmd.m_src = src;
d->m_cmd.m_dst = dst;
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotResult( KIO::Job * ) ) );
if ( op != KonqCommand::MKDIR ) {
- connect( job, SIGNAL( copyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool ) ),
- this, SLOT( slotCopyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool ) ) );
- connect( job, SIGNAL( copyingLinkDone( KIO::Job *, const KURL &, const QString &, const KURL & ) ),
- this, SLOT( slotCopyingLinkDone( KIO::Job *, const KURL &, const QString &, const KURL & ) ) );
+ connect( job, TQT_SIGNAL( copyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool ) ),
+ this, TQT_SLOT( slotCopyingDone( KIO::Job *, const KURL &, const KURL &, bool, bool ) ) );
+ connect( job, TQT_SIGNAL( copyingLinkDone( KIO::Job *, const KURL &, const TQString &, const KURL & ) ),
+ this, TQT_SLOT( slotCopyingLinkDone( KIO::Job *, const KURL &, const TQString &, const KURL & ) ) );
}
KonqUndoManager::incRef();
@@ -134,8 +134,8 @@ void KonqCommandRecorder::slotCopyingDone( KIO::Job *job, const KURL &from, cons
{
Q_ASSERT( from.isLocalFile() );
Q_ASSERT( to.protocol() == "trash" );
- QMap<QString, QString> metaData = job->metaData();
- QMap<QString, QString>::ConstIterator it = metaData.find( "trashURL-" + from.path() );
+ TQMap<TQString, TQString> metaData = job->metaData();
+ TQMap<TQString, TQString>::ConstIterator it = metaData.find( "trashURL-" + from.path() );
if ( it != metaData.end() ) {
// Update URL
op.m_dst = it.data();
@@ -145,7 +145,7 @@ void KonqCommandRecorder::slotCopyingDone( KIO::Job *job, const KURL &from, cons
d->m_cmd.m_opStack.prepend( op );
}
-void KonqCommandRecorder::slotCopyingLinkDone( KIO::Job *, const KURL &from, const QString &target, const KURL &to )
+void KonqCommandRecorder::slotCopyingLinkDone( KIO::Job *, const KURL &from, const TQString &target, const KURL &to )
{
KonqBasicOperation op;
op.m_valid = true;
@@ -181,10 +181,10 @@ public:
KonqCommand m_current;
KIO::Job *m_currentJob;
UndoState m_undoState;
- QValueStack<KURL> m_dirStack;
- QValueStack<KURL> m_dirCleanupStack;
- QValueStack<KURL> m_fileCleanupStack;
- QValueList<KURL> m_dirsToUpdate;
+ TQValueStack<KURL> m_dirStack;
+ TQValueStack<KURL> m_dirCleanupStack;
+ TQValueStack<KURL> m_fileCleanupStack;
+ TQValueList<KURL> m_dirsToUpdate;
bool m_lock;
@@ -247,7 +247,7 @@ bool KonqUndoManager::undoAvailable() const
return ( d->m_commands.count() > 0 ) && !d->m_lock;
}
-QString KonqUndoManager::undoText() const
+TQString KonqUndoManager::undoText() const
{
if ( d->m_commands.count() == 0 )
return i18n( "Und&o" );
@@ -266,7 +266,7 @@ QString KonqUndoManager::undoText() const
else
assert( false );
/* NOTREACHED */
- return QString::null;
+ return TQString::null;
}
void KonqUndoManager::undo()
@@ -276,11 +276,11 @@ void KonqUndoManager::undo()
d->m_current = cmd;
- QValueList<KonqBasicOperation>& opStack = d->m_current.m_opStack;
+ TQValueList<KonqBasicOperation>& opStack = d->m_current.m_opStack;
// Let's first ask for confirmation if we need to delete any file (#99898)
KURL::List fileCleanupStack;
- QValueList<KonqBasicOperation>::Iterator it = opStack.begin();
+ TQValueList<KonqBasicOperation>::Iterator it = opStack.begin();
for ( ; it != opStack.end() ; ++it ) {
if ( !(*it).m_directory && !(*it).m_link && d->m_current.m_type == KonqCommand::COPY ) {
fileCleanupStack.append( (*it).m_dst );
@@ -304,7 +304,7 @@ void KonqUndoManager::undo()
broadcastLock();
it = opStack.begin();
- QValueList<KonqBasicOperation>::Iterator end = opStack.end();
+ TQValueList<KonqBasicOperation>::Iterator end = opStack.end();
while ( it != end )
{
if ( (*it).m_directory && !(*it).m_renamed )
@@ -411,8 +411,8 @@ void KonqUndoManager::undoStep()
undoRemovingDirectories();
if ( d->m_currentJob )
- connect( d->m_currentJob, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( d->m_currentJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotResult( KIO::Job * ) ) );
}
void KonqUndoManager::undoMakingDirectories()
@@ -523,7 +523,7 @@ void KonqUndoManager::undoRemovingDirectories()
d->m_undoJob = 0;
}
KDirNotify_stub allDirNotify( "*", "KDirNotify*" );
- QValueList<KURL>::ConstIterator it = d->m_dirsToUpdate.begin();
+ TQValueList<KURL>::ConstIterator it = d->m_dirsToUpdate.begin();
for( ; it != d->m_dirsToUpdate.end(); ++it ) {
kdDebug() << "Notifying FilesAdded for " << *it << endl;
allDirNotify.FilesAdded( *it );
@@ -637,26 +637,26 @@ bool KonqUndoManager::initializeFromKDesky()
return true;
}
-QDataStream &operator<<( QDataStream &stream, const KonqBasicOperation &op )
+TQDataStream &operator<<( TQDataStream &stream, const KonqBasicOperation &op )
{
stream << op.m_valid << op.m_directory << op.m_renamed << op.m_link
<< op.m_src << op.m_dst << op.m_target;
return stream;
}
-QDataStream &operator>>( QDataStream &stream, KonqBasicOperation &op )
+TQDataStream &operator>>( TQDataStream &stream, KonqBasicOperation &op )
{
stream >> op.m_valid >> op.m_directory >> op.m_renamed >> op.m_link
>> op.m_src >> op.m_dst >> op.m_target;
return stream;
}
-QDataStream &operator<<( QDataStream &stream, const KonqCommand &cmd )
+TQDataStream &operator<<( TQDataStream &stream, const KonqCommand &cmd )
{
stream << cmd.m_valid << (Q_INT8)cmd.m_type << cmd.m_opStack << cmd.m_src << cmd.m_dst;
return stream;
}
-QDataStream &operator>>( QDataStream &stream, KonqCommand &cmd )
+TQDataStream &operator>>( TQDataStream &stream, KonqCommand &cmd )
{
Q_INT8 type;
stream >> cmd.m_valid >> type >> cmd.m_opStack >> cmd.m_src >> cmd.m_dst;
diff --git a/libkonq/konq_undo.h b/libkonq/konq_undo.h
index fae2b5e61..3e704a8d2 100644
--- a/libkonq/konq_undo.h
+++ b/libkonq/konq_undo.h
@@ -19,9 +19,9 @@
#ifndef __konq_undo_h__
#define __konq_undo_h__
-#include <qobject.h>
-#include <qstring.h>
-#include <qvaluestack.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqvaluestack.h>
#include <dcopobject.h>
@@ -37,7 +37,7 @@ class KonqUndoJob;
struct KonqBasicOperation
{
- typedef QValueStack<KonqBasicOperation> Stack;
+ typedef TQValueStack<KonqBasicOperation> Stack;
KonqBasicOperation()
{ m_valid = false; }
@@ -48,12 +48,12 @@ struct KonqBasicOperation
bool m_link;
KURL m_src;
KURL m_dst;
- QString m_target;
+ TQString m_target;
};
struct KonqCommand
{
- typedef QValueStack<KonqCommand> Stack;
+ typedef TQValueStack<KonqCommand> Stack;
enum Type { COPY, MOVE, LINK, MKDIR, TRASH };
@@ -79,14 +79,14 @@ private slots:
void slotResult( KIO::Job *job );
void slotCopyingDone( KIO::Job *, const KURL &from, const KURL &to, bool directory, bool renamed );
- void slotCopyingLinkDone( KIO::Job *, const KURL &from, const QString &target, const KURL &to );
+ void slotCopyingLinkDone( KIO::Job *, const KURL &from, const TQString &target, const KURL &to );
private:
class KonqCommandRecorderPrivate;
KonqCommandRecorderPrivate *d;
};
-class LIBKONQ_EXPORT KonqUndoManager : public QObject, public DCOPObject
+class LIBKONQ_EXPORT KonqUndoManager : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -104,14 +104,14 @@ public:
void addCommand( const KonqCommand &cmd );
bool undoAvailable() const;
- QString undoText() const;
+ TQString undoText() const;
public slots:
void undo();
signals:
void undoAvailable( bool avail );
- void undoTextChanged( const QString &text );
+ void undoTextChanged( const TQString &text );
protected:
/**
@@ -153,10 +153,10 @@ private:
static unsigned long s_refCnt;
};
-QDataStream &operator<<( QDataStream &stream, const KonqBasicOperation &op );
-QDataStream &operator>>( QDataStream &stream, KonqBasicOperation &op );
+TQDataStream &operator<<( TQDataStream &stream, const KonqBasicOperation &op );
+TQDataStream &operator>>( TQDataStream &stream, KonqBasicOperation &op );
-QDataStream &operator<<( QDataStream &stream, const KonqCommand &cmd );
-QDataStream &operator>>( QDataStream &stream, KonqCommand &cmd );
+TQDataStream &operator<<( TQDataStream &stream, const KonqCommand &cmd );
+TQDataStream &operator>>( TQDataStream &stream, KonqCommand &cmd );
#endif
diff --git a/libkonq/konq_xmlguiclient.cc b/libkonq/konq_xmlguiclient.cc
index 7737acd7c..5561ced8e 100644
--- a/libkonq/konq_xmlguiclient.cc
+++ b/libkonq/konq_xmlguiclient.cc
@@ -27,7 +27,7 @@ class KonqXMLGUIClient::Private
{
public:
Private() : attrName( "name" ), separatorPending( false ), hasAction( false ) {}
- QString attrName;
+ TQString attrName;
bool separatorPending;
bool hasAction;
};
@@ -46,9 +46,9 @@ KonqXMLGUIClient::KonqXMLGUIClient( KXMLGUIClient *parent ) : KXMLGUIClient(pare
void KonqXMLGUIClient::prepareXMLGUIStuff()
{
- m_doc = QDomDocument( "kpartgui" );
+ m_doc = TQDomDocument( "kpartgui" );
- QDomElement root = m_doc.createElement( "kpartgui" );
+ TQDomElement root = m_doc.createElement( "kpartgui" );
m_doc.appendChild( root );
root.setAttribute( d->attrName, "popupmenu" );
@@ -60,45 +60,45 @@ void KonqXMLGUIClient::prepareXMLGUIStuff()
m_factory = new KXMLGUIFactory( m_builder ); */
}
-QDomElement KonqXMLGUIClient::DomElement() const
+TQDomElement KonqXMLGUIClient::DomElement() const
{
return m_menuElement;
}
-QDomDocument KonqXMLGUIClient::domDocument() const
+TQDomDocument KonqXMLGUIClient::domDocument() const
{
return m_doc;
}
-void KonqXMLGUIClient::addAction( KAction *act, const QDomElement &menu )
+void KonqXMLGUIClient::addAction( KAction *act, const TQDomElement &menu )
{
addAction( act->name(), menu );
}
-void KonqXMLGUIClient::addAction( const char *name, const QDomElement &menu )
+void KonqXMLGUIClient::addAction( const char *name, const TQDomElement &menu )
{
- static const QString& tagAction = KGlobal::staticQString( "action" );
+ static const TQString& tagAction = KGlobal::staticQString( "action" );
if (!kapp->authorizeKAction(name))
return;
handlePendingSeparator();
- QDomElement parent = menu;
+ TQDomElement parent = menu;
if ( parent.isNull() ) {
parent = m_menuElement;
}
- QDomElement e = m_doc.createElement( tagAction );
+ TQDomElement e = m_doc.createElement( tagAction );
parent.appendChild( e );
e.setAttribute( d->attrName, name );
d->hasAction = true;
}
-void KonqXMLGUIClient::addSeparator( const QDomElement &menu )
+void KonqXMLGUIClient::addSeparator( const TQDomElement &menu )
{
- static const QString& tagSeparator = KGlobal::staticQString( "separator" );
+ static const TQString& tagSeparator = KGlobal::staticQString( "separator" );
- QDomElement parent = menu;
+ TQDomElement parent = menu;
if ( parent.isNull() ) {
parent = m_menuElement;
}
@@ -110,24 +110,24 @@ void KonqXMLGUIClient::addSeparator( const QDomElement &menu )
//void KonqXMLGUIClient::addWeakSeparator()
//{
-// static const QString& tagWeakSeparator = KGlobal::staticQString( "weakSeparator" );
+// static const TQString& tagWeakSeparator = KGlobal::staticQString( "weakSeparator" );
// m_menuElement.appendChild( m_doc.createElement( tagWeakSeparator ) );
//}
-void KonqXMLGUIClient::addMerge( const QString &name )
+void KonqXMLGUIClient::addMerge( const TQString &name )
{
// can't call handlePendingSeparator. Merge could be empty
// (testcase: RMB in embedded katepart)
- QDomElement merge = m_doc.createElement( "merge" );
+ TQDomElement merge = m_doc.createElement( "merge" );
m_menuElement.appendChild( merge );
if ( !name.isEmpty() )
merge.setAttribute( d->attrName, name );
}
-void KonqXMLGUIClient::addGroup( const QString &grp )
+void KonqXMLGUIClient::addGroup( const TQString &grp )
{
handlePendingSeparator();
- QDomElement group = m_doc.createElement( "definegroup" );
+ TQDomElement group = m_doc.createElement( "definegroup" );
m_menuElement.appendChild( group );
group.setAttribute( d->attrName, grp );
}
diff --git a/libkonq/konq_xmlguiclient.h b/libkonq/konq_xmlguiclient.h
index 175d991c7..772554dd2 100644
--- a/libkonq/konq_xmlguiclient.h
+++ b/libkonq/konq_xmlguiclient.h
@@ -24,7 +24,7 @@
#include <kaction.h>
#include <kxmlguiclient.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <libkonq_export.h>
/**
@@ -40,26 +40,26 @@ public:
/**
* Reimplemented for internal purpose
*/
- QDomDocument domDocument( ) const;
+ TQDomDocument domDocument( ) const;
- QDomElement DomElement( ) const; // KDE4: s/D/d/
+ TQDomElement DomElement( ) const; // KDE4: s/D/d/
protected:
- void addAction( KAction *action, const QDomElement &menu = QDomElement() );
- void addAction( const char *name, const QDomElement &menu = QDomElement() );
- void addSeparator( const QDomElement &menu = QDomElement() );
+ void addAction( KAction *action, const TQDomElement &menu = TQDomElement() );
+ void addAction( const char *name, const TQDomElement &menu = TQDomElement() );
+ void addSeparator( const TQDomElement &menu = TQDomElement() );
/// only add a separator if an action is added afterwards
void addPendingSeparator();
- void addGroup( const QString &grp );
- void addMerge( const QString &name );
+ void addGroup( const TQString &grp );
+ void addMerge( const TQString &name );
// @return true if addAction was called at least once
bool hasAction() const;
void prepareXMLGUIStuff();
// KDE4: make private
- QDomElement m_menuElement;
- QDomDocument m_doc;
+ TQDomElement m_menuElement;
+ TQDomDocument m_doc;
private:
void handlePendingSeparator();
diff --git a/libkonq/konqbookmarkmanager.h b/libkonq/konqbookmarkmanager.h
index 5fb45f3e6..9774d92e9 100644
--- a/libkonq/konqbookmarkmanager.h
+++ b/libkonq/konqbookmarkmanager.h
@@ -11,7 +11,7 @@ public:
static KBookmarkManager * self() {
if ( !s_bookmarkManager )
{
- QString bookmarksFile = locateLocal("data", QString::fromLatin1("konqueror/bookmarks.xml"));
+ TQString bookmarksFile = locateLocal("data", TQString::fromLatin1("konqueror/bookmarks.xml"));
s_bookmarkManager = KBookmarkManager::managerForFile( bookmarksFile );
}
return s_bookmarkManager;
diff --git a/libkonq/libkonq_export.h b/libkonq/libkonq_export.h
index 88192c0c4..4e10a4ec0 100644
--- a/libkonq/libkonq_export.h
+++ b/libkonq/libkonq_export.h
@@ -25,7 +25,7 @@
#include <kdemacros.h>
/* needed, because e.g. Q_OS_UNIX is so frequently used */
-#include <qglobal.h>
+#include <tqglobal.h>
#ifdef Q_WS_WIN
diff --git a/libkonq/tests/konqdragtest.cpp b/libkonq/tests/konqdragtest.cpp
index ad03b21fc..43d1a28df 100644
--- a/libkonq/tests/konqdragtest.cpp
+++ b/libkonq/tests/konqdragtest.cpp
@@ -20,7 +20,7 @@
#include <kdebug.h>
#include <kurldrag.h>
#include <assert.h>
-#include <qiconview.h>
+#include <tqiconview.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
@@ -36,8 +36,8 @@ void testKonqIconDrag2()
KURL mediaURL = "media:/hda1/tmp/Mat%C3%A9riel";
KURL localURL = "file:///tmp/Mat%C3%A9riel";
KonqIconDrag2 iconDrag( 0 );
- QIconDragItem item;
- iconDrag.append( item, QRect( 1, 2, 3, 4 ), QRect( 5, 6, 7, 8 ),
+ TQIconDragItem item;
+ iconDrag.append( item, TQRect( 1, 2, 3, 4 ), TQRect( 5, 6, 7, 8 ),
mediaURL.url(), localURL.url() );