summaryrefslogtreecommitdiffstats
path: root/kdesktop
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 /kdesktop
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 'kdesktop')
-rw-r--r--kdesktop/KBackgroundIface.h14
-rw-r--r--kdesktop/KDesktopIface.h8
-rw-r--r--kdesktop/bgmanager.cc98
-rw-r--r--kdesktop/bgmanager.h34
-rw-r--r--kdesktop/desktop.cc186
-rw-r--r--kdesktop/desktop.h28
-rw-r--r--kdesktop/init.cc68
-rw-r--r--kdesktop/kcustommenu.cc30
-rw-r--r--kdesktop/kcustommenu.h4
-rw-r--r--kdesktop/kdesktopbindings.cpp10
-rw-r--r--kdesktop/kdesktopshadowsettings.cpp4
-rw-r--r--kdesktop/kdesktopshadowsettings.h10
-rw-r--r--kdesktop/kdiconview.cc378
-rw-r--r--kdesktop/kdiconview.h68
-rw-r--r--kdesktop/kfileividesktop.cpp50
-rw-r--r--kdesktop/kfileividesktop.h30
-rw-r--r--kdesktop/krootwm.cc134
-rw-r--r--kdesktop/krootwm.h30
-rw-r--r--kdesktop/kshadowengine.cpp16
-rw-r--r--kdesktop/kshadowengine.h16
-rw-r--r--kdesktop/kshadowsettings.cpp10
-rw-r--r--kdesktop/kshadowsettings.h12
-rw-r--r--kdesktop/kwebdesktop/kwebdesktop.cpp44
-rw-r--r--kdesktop/kwebdesktop/kwebdesktop.h14
-rw-r--r--kdesktop/lock/autologout.cc46
-rw-r--r--kdesktop/lock/autologout.h16
-rw-r--r--kdesktop/lock/infodlg.cc48
-rw-r--r--kdesktop/lock/infodlg.h18
-rw-r--r--kdesktop/lock/lockdlg.cc194
-rw-r--r--kdesktop/lock/lockdlg.h30
-rw-r--r--kdesktop/lock/lockprocess.cc164
-rw-r--r--kdesktop/lock/lockprocess.h44
-rw-r--r--kdesktop/lock/main.cc6
-rw-r--r--kdesktop/lock/querydlg.cc56
-rw-r--r--kdesktop/lock/querydlg.h18
-rw-r--r--kdesktop/lockeng.cc30
-rw-r--r--kdesktop/lockeng.h8
-rw-r--r--kdesktop/main.cc10
-rw-r--r--kdesktop/minicli.cpp184
-rw-r--r--kdesktop/minicli.h40
-rw-r--r--kdesktop/pixmapserver.cc14
-rw-r--r--kdesktop/pixmapserver.h38
-rw-r--r--kdesktop/startupid.cpp60
-rw-r--r--kdesktop/startupid.h22
-rw-r--r--kdesktop/xautolock.cc6
-rw-r--r--kdesktop/xautolock.h4
46 files changed, 1176 insertions, 1176 deletions
diff --git a/kdesktop/KBackgroundIface.h b/kdesktop/KBackgroundIface.h
index bd2a6ba05..47818021a 100644
--- a/kdesktop/KBackgroundIface.h
+++ b/kdesktop/KBackgroundIface.h
@@ -6,7 +6,7 @@
#define __KBackgroundIface_h__
#include <dcopobject.h>
-#include <qcolor.h>
+#include <tqcolor.h>
class KBackgroundIface : virtual public DCOPObject
{
@@ -38,17 +38,17 @@ k_dcop:
* @param desk desktop number, or 0 for the current visible desktop.
* @param wallpaper The (local) path to the wallpaper.
* @param mode The tiling mode. */
- virtual void setWallpaper(int desk, QString wallpaper, int mode) = 0;
+ virtual void setWallpaper(int desk, TQString wallpaper, int mode) = 0;
/** Change the wallpaper.
* @param wallpaper The (local) path to the wallpaper.
* @param mode The tiling mode. */
- virtual void setWallpaper(QString wallpaper, int mode) = 0;
+ virtual void setWallpaper(TQString wallpaper, int mode) = 0;
/** Set color.
* @param c The color.
* @param isColorA true for foreground and false for background color. */
- virtual void setColor(const QColor &c, bool isColorA) = 0;
+ virtual void setColor(const TQColor &c, bool isColorA) = 0;
/** Change the wallpaper in "multi mode". */
virtual void changeWallpaper() = 0;
@@ -59,17 +59,17 @@ k_dcop:
/** Return the current wallpaper for specified desk.
* @param desk desktop number, or 0 for the current visible desktop.
*/
- virtual QString currentWallpaper( int desk ) = 0;
+ virtual TQString currentWallpaper( int desk ) = 0;
/** Return the wallpaper list for specified desk.
* @param desk desktop number, or 0 for the current visible desktop.
*/
- virtual QStringList wallpaperList(int desk) = 0;
+ virtual TQStringList wallpaperList(int desk) = 0;
/** Return the wallpaper files for specified desk.
* @param desk desktop number, or 0 for the current visible desktop.
*/
- virtual QStringList wallpaperFiles(int desk) = 0;
+ virtual TQStringList wallpaperFiles(int desk) = 0;
};
#endif // __KBackgroundIface_h__
diff --git a/kdesktop/KDesktopIface.h b/kdesktop/KDesktopIface.h
index bbd1852ab..1aa90e538 100644
--- a/kdesktop/KDesktopIface.h
+++ b/kdesktop/KDesktopIface.h
@@ -2,7 +2,7 @@
#ifndef __KDesktopIface_h__
#define __KDesktopIface_h__
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <dcopobject.h>
#include <dcopref.h>
@@ -44,7 +44,7 @@ k_dcop:
/**
* @return the urls of selected icons
*/
- virtual QStringList selectedURLs() = 0;
+ virtual TQStringList selectedURLs() = 0;
/**
* Re-read KDesktop's configuration
@@ -58,7 +58,7 @@ k_dcop:
* Display the "Run Command" dialog (minicli) and prefill
* @since 3.4
*/
- virtual void popupExecuteCommand(const QString& command) = 0;
+ virtual void popupExecuteCommand(const TQString& command) = 0;
/**
* Get the background dcop interface (KBackgroundIface)
*/
@@ -106,7 +106,7 @@ k_dcop:
* slot for kicker; called when the number or size of panels change the available
* space for desktop icons
*/
- virtual void desktopIconsAreaChanged(const QRect &area, int screen) = 0;
+ virtual void desktopIconsAreaChanged(const TQRect &area, int screen) = 0;
};
#endif
diff --git a/kdesktop/bgmanager.cc b/kdesktop/bgmanager.cc
index c3317708c..6d106a484 100644
--- a/kdesktop/bgmanager.cc
+++ b/kdesktop/bgmanager.cc
@@ -18,8 +18,8 @@
#include <assert.h>
-#include <qtimer.h>
-#include <qscrollview.h>
+#include <tqtimer.h>
+#include <tqscrollview.h>
#include <kiconloader.h>
#include <kconfig.h>
@@ -47,9 +47,9 @@
#include "pixmapserver.h"
-template class QPtrVector<KBackgroundRenderer>;
-template class QPtrVector<KBackgroundCacheEntry>;
-template class QMemArray<int>;
+template class TQPtrVector<KBackgroundRenderer>;
+template class TQPtrVector<KBackgroundCacheEntry>;
+template class TQMemArray<int>;
static Atom prop_root;
static bool properties_inited = false;
@@ -59,7 +59,7 @@ extern KDesktopApp *myApp;
/**** KBackgroundManager ****/
-KBackgroundManager::KBackgroundManager(QWidget *desktop, KWinModule* kwinModule)
+KBackgroundManager::KBackgroundManager(TQWidget *desktop, KWinModule* kwinModule)
: DCOPObject("KBackgroundIface")
{
if( !properties_inited )
@@ -91,36 +91,36 @@ KBackgroundManager::KBackgroundManager(QWidget *desktop, KWinModule* kwinModule)
m_Cache[i]->hash = 0;
m_Cache[i]->exp_from = -1;
m_Renderer.insert (i, new KVirtualBGRenderer(i,m_pConfig));
- connect(m_Renderer[i], SIGNAL(imageDone(int)), SLOT(slotImageDone(int)));
+ connect(m_Renderer[i], TQT_SIGNAL(imageDone(int)), TQT_SLOT(slotImageDone(int)));
m_Renderer[i]->enableTiling( true ); // optimize
}
#ifdef COMPOSITE
m_tPixmap = new KPixmap(kapp->desktop()->size());
- m_tPixmap->fill(QColor(0, 0x0));
- connect(myApp, SIGNAL(cmBackgroundChanged( bool )),
- SLOT(slotCmBackgroundChanged( bool )));
+ m_tPixmap->fill(TQColor(0, 0x0));
+ connect(myApp, TQT_SIGNAL(cmBackgroundChanged( bool )),
+ TQT_SLOT(slotCmBackgroundChanged( bool )));
#endif
configure();
- m_pTimer = new QTimer(this);
- connect(m_pTimer, SIGNAL(timeout()), SLOT(slotTimeout()));
+ m_pTimer = new TQTimer(this);
+ connect(m_pTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
m_pTimer->start( 60000 );
- connect(m_pKwinmodule, SIGNAL(currentDesktopChanged(int)),
- SLOT(slotChangeDesktop(int)));
- connect(m_pKwinmodule, SIGNAL(numberOfDesktopsChanged(int)),
- SLOT(slotChangeNumberOfDesktops(int)));
- connect(m_pKwinmodule, SIGNAL(currentDesktopViewportChanged(int, const QPoint&)),
- SLOT(slotChangeViewport(int, const QPoint&)));
+ connect(m_pKwinmodule, TQT_SIGNAL(currentDesktopChanged(int)),
+ TQT_SLOT(slotChangeDesktop(int)));
+ connect(m_pKwinmodule, TQT_SIGNAL(numberOfDesktopsChanged(int)),
+ TQT_SLOT(slotChangeNumberOfDesktops(int)));
+ connect(m_pKwinmodule, TQT_SIGNAL(currentDesktopViewportChanged(int, const TQPoint&)),
+ TQT_SLOT(slotChangeViewport(int, const TQPoint&)));
#if (QT_VERSION-0 >= 0x030200)
- connect( kapp->desktop(), SIGNAL( resized( int )), SLOT( desktopResized())); // RANDR support
+ connect( kapp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( desktopResized())); // RANDR support
#endif
- QSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
+ TQSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
m_numberOfViewports = s.width() * s.height();
if (m_numberOfViewports < 1) {
m_numberOfViewports = 1;
@@ -245,7 +245,7 @@ void KBackgroundManager::configure()
slotChangeDesktop(0);
// Redraw all desktops so that applications relying on exported data, e.g. kpager, continue to work properly
- QSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
+ TQSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
m_numberOfViewports = s.width() * s.height();
if (m_numberOfViewports < 1) {
m_numberOfViewports = 1;
@@ -266,7 +266,7 @@ int KBackgroundManager::realDesktop()
int KBackgroundManager::effectiveDesktop()
{
- QSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
+ TQSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
m_numberOfViewports = s.width() * s.height();
if (m_numberOfViewports > 1) {
@@ -274,7 +274,7 @@ int KBackgroundManager::effectiveDesktop()
return 0;
}
else {
- QPoint vx(m_pKwinmodule->currentViewport(m_pKwinmodule->currentDesktop()));
+ TQPoint vx(m_pKwinmodule->currentViewport(m_pKwinmodule->currentDesktop()));
return (realDesktop() * m_numberOfViewports) + ((vx.x() * vx.y()) - 1);
}
}
@@ -289,7 +289,7 @@ int KBackgroundManager::effectiveDesktop()
*/
void KBackgroundManager::slotChangeNumberOfDesktops(int num)
{
- QSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
+ TQSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
m_numberOfViewports = s.width() * s.height();
if (m_numberOfViewports < 1) {
m_numberOfViewports = 1;
@@ -325,7 +325,7 @@ void KBackgroundManager::slotChangeNumberOfDesktops(int num)
m_Cache[i]->hash = 0;
m_Cache[i]->exp_from = -1;
m_Renderer.insert(i, new KVirtualBGRenderer(i,m_pConfig));
- connect(m_Renderer[i], SIGNAL(imageDone(int)), SLOT(slotImageDone(int)));
+ connect(m_Renderer[i], TQT_SIGNAL(imageDone(int)), TQT_SLOT(slotImageDone(int)));
m_Renderer[i]->enableTiling( true ); // optimize
}
}
@@ -338,7 +338,7 @@ void KBackgroundManager::slotChangeNumberOfDesktops(int num)
*/
void KBackgroundManager::slotChangeDesktop(int desk)
{
- QSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
+ TQSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
m_numberOfViewports = s.width() * s.height();
if (m_numberOfViewports < 1) {
m_numberOfViewports = 1;
@@ -396,9 +396,9 @@ void KBackgroundManager::slotChangeDesktop(int desk)
* Desk is in KWin convention: [1..desks], instead of [0..desks-1].
* 0 repaints the current viewport.
*/
-void KBackgroundManager::slotChangeViewport(int desk, const QPoint& viewport)
+void KBackgroundManager::slotChangeViewport(int desk, const TQPoint& viewport)
{
- QSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
+ TQSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
m_numberOfViewports = s.width() * s.height();
if (m_numberOfViewports < 1) {
m_numberOfViewports = 1;
@@ -436,7 +436,7 @@ void KBackgroundManager::slotChangeViewport(int desk, const QPoint& viewport)
continue;
// kdDebug() << "slotChangeDesktop i=" << i << endl;
- //KPixmap * viewport_background = new KPixmap(QPixmap(m_Cache[i]->pixmap->width()*s.width(), m_Cache[i]->pixmap->height()*s.height()));
+ //KPixmap * viewport_background = new KPixmap(TQPixmap(m_Cache[i]->pixmap->width()*s.width(), m_Cache[i]->pixmap->height()*s.height()));
//setPixmap(viewport_background, m_Cache[i]->hash, i);
//delete viewport_background;
@@ -516,7 +516,7 @@ void KBackgroundManager::setPixmap(KPixmap *pm, int hash, int desk)
if (m_pDesktop)
{
- QScrollView* sv = dynamic_cast<QScrollView*>( m_pDesktop );
+ TQScrollView* sv = dynamic_cast<TQScrollView*>( m_pDesktop );
if ( sv ) {
// Qt eats repaint events in this case :-((
sv->viewport()->update();
@@ -527,7 +527,7 @@ void KBackgroundManager::setPixmap(KPixmap *pm, int hash, int desk)
if( !root_cleared )
{ // clear the root window pixmap set by kdm
root_cleared = true;
- QTimer::singleShot( 0, this, SLOT( clearRoot()));
+ TQTimer::singleShot( 0, this, TQT_SLOT( clearRoot()));
// but make the pixmap visible until m_pDesktop is visible
KApplication::desktop()->screen()->setErasePixmap(*ep);
KApplication::desktop()->screen()->erase();
@@ -556,7 +556,7 @@ void KBackgroundManager::setPixmap(KPixmap *pm, int hash, int desk)
void KBackgroundManager::clearRoot()
{
- KApplication::desktop()->screen()->setErasePixmap( QPixmap());
+ KApplication::desktop()->screen()->setErasePixmap( TQPixmap());
KApplication::desktop()->screen()->erase();
}
@@ -582,7 +582,7 @@ void KBackgroundManager::renderBackground(int desk)
void KBackgroundManager::slotImageDone(int desk)
{
bool t_useViewports = 1;
- QSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
+ TQSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
m_numberOfViewports = s.width() * s.height();
if (m_numberOfViewports < 1) {
m_numberOfViewports = 1;
@@ -598,7 +598,7 @@ void KBackgroundManager::slotImageDone(int desk)
bool current = (r->hash() == m_Renderer[effectiveDesktop()]->hash());
if (current)
{
- //KPixmap * viewport_background = new KPixmap(QPixmap(pm->width()*s.width(), pm->height()*s.height()));
+ //KPixmap * viewport_background = new KPixmap(TQPixmap(pm->width()*s.width(), pm->height()*s.height()));
//printf("slotImageDone(): x: %d y: %d\n\r", viewport_background->size().width(), viewport_background->size().height());
//setPixmap(viewport_background, r->hash(), desk);
//delete viewport_background;
@@ -608,7 +608,7 @@ void KBackgroundManager::slotImageDone(int desk)
{
m_bBgInitDone = true;
emit initDone();
- QTimer::singleShot( 30000, this, SLOT( saveImages()));
+ TQTimer::singleShot( 30000, this, TQT_SLOT( saveImages()));
do_cleanup = false;
}
}
@@ -639,9 +639,9 @@ void KBackgroundManager::saveImages()
}
/*
- * Size in bytes of a QPixmap. For use in the pixmap cache.
+ * Size in bytes of a TQPixmap. For use in the pixmap cache.
*/
-int KBackgroundManager::pixmapSize(QPixmap *pm)
+int KBackgroundManager::pixmapSize(TQPixmap *pm)
{
return (pm->width() * pm->height()) * ((pm->depth() + 7) / 8);
}
@@ -721,7 +721,7 @@ bool KBackgroundManager::freeCache(int size)
/*
- * Try to add a pixmap to the pixmap cache. We don't use QPixmapCache here
+ * Try to add a pixmap to the pixmap cache. We don't use TQPixmapCache here
* because if we're exporting pixmaps, this needs special care.
*/
void KBackgroundManager::addCache(KPixmap *pm, int hash, int desk)
@@ -749,7 +749,7 @@ void KBackgroundManager::addCache(KPixmap *pm, int hash, int desk)
*/
void KBackgroundManager::slotTimeout()
{
- QMemArray<int> running(m_Renderer.size());
+ TQMemArray<int> running(m_Renderer.size());
running.fill(0);
int NumDesks = m_Renderer.size();
@@ -798,7 +798,7 @@ int KBackgroundManager::validateDesk(int desk)
// DCOP exported
// Return current wallpaper for specified desk.
// 0 is for the current visible desktop.
-QString KBackgroundManager::currentWallpaper(int desk)
+TQString KBackgroundManager::currentWallpaper(int desk)
{
//TODO Is the behaviour of this function appropriate for multiple screens?
KBackgroundRenderer *r = m_Renderer[validateDesk(desk)]->renderer(0);
@@ -833,7 +833,7 @@ void KBackgroundManager::setCommon(int common)
}
// DCOP exported
-void KBackgroundManager::setWallpaper(QString wallpaper, int mode)
+void KBackgroundManager::setWallpaper(TQString wallpaper, int mode)
{
if (mode < 0 || mode >= KBackgroundSettings::lastWallpaperMode) {
kdDebug() << "Invalid background mode " << mode << " passed to " << k_funcinfo << "\n";
@@ -853,7 +853,7 @@ void KBackgroundManager::setWallpaper(QString wallpaper, int mode)
slotChangeDesktop(0);
}
-void KBackgroundManager::setWallpaper(QString wallpaper)
+void KBackgroundManager::setWallpaper(TQString wallpaper)
{
//TODO Is the behaviour of this function appropriate for multiple screens?
KBackgroundRenderer *r = m_Renderer[effectiveDesktop()]->renderer(0);
@@ -866,7 +866,7 @@ void KBackgroundManager::setWallpaper(QString wallpaper)
// DCOP exported
// Returns the filenames of all wallpaper entries for specified desk
// 0 is for current visible desktop.
-QStringList KBackgroundManager::wallpaperFiles(int desk)
+TQStringList KBackgroundManager::wallpaperFiles(int desk)
{
//TODO Is the behaviour of this function appropriate for multiple screens?
KBackgroundRenderer *r = m_Renderer[validateDesk(desk)]->renderer(0);
@@ -877,7 +877,7 @@ QStringList KBackgroundManager::wallpaperFiles(int desk)
// DCOP exported
// Returns the list of wallpaper entries (viewable in background slide
// show window) for specified desk. 0 is for current visible desktop.
-QStringList KBackgroundManager::wallpaperList(int desk)
+TQStringList KBackgroundManager::wallpaperList(int desk)
{
//TODO Is the behaviour of this function appropriate for multiple screens?
KBackgroundRenderer *r = m_Renderer[validateDesk(desk)]->renderer(0);;
@@ -895,7 +895,7 @@ void KBackgroundManager::setCache( int bLimit, int size )
}
// DCOP exported
-void KBackgroundManager::setWallpaper(int desk, QString wallpaper, int mode)
+void KBackgroundManager::setWallpaper(int desk, TQString wallpaper, int mode)
{
if (mode < 0 || mode >= KBackgroundSettings::lastWallpaperMode) {
kdDebug() << "Invalid background mode " << mode << " passed to " << k_funcinfo << "\n";
@@ -947,7 +947,7 @@ void KBackgroundManager::desktopResized()
if (m_tPixmap)
delete m_tPixmap;
m_tPixmap = new KPixmap(kapp->desktop()->size());
- m_tPixmap->fill(QColor(0, 0x0));
+ m_tPixmap->fill(TQColor(0, 0x0));
#endif
m_Hash = 0;
@@ -958,7 +958,7 @@ void KBackgroundManager::desktopResized()
repaintBackground();
// Redraw all desktops so that applications relying on exported data, e.g. kpager, continue to work properly
- QSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
+ TQSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop()));
m_numberOfViewports = s.width() * s.height();
if (m_numberOfViewports < 1) {
m_numberOfViewports = 1;
@@ -969,7 +969,7 @@ void KBackgroundManager::desktopResized()
}
// DCOP exported
-void KBackgroundManager::setColor(const QColor & c, bool isColorA)
+void KBackgroundManager::setColor(const TQColor & c, bool isColorA)
{
//TODO Is the behaviour of this function appropriate for multiple screens?
for (unsigned i=0; i < m_Renderer[effectiveDesktop()]->numRenderers(); ++i)
@@ -1016,7 +1016,7 @@ void KBackgroundManager::setBackgroundEnabled( const bool enable )
#ifdef COMPOSITE
void KBackgroundManager::slotCmBackgroundChanged( bool )
{
- m_tPixmap->fill(QColor(0, 0x0));
+ m_tPixmap->fill(TQColor(0, 0x0));
m_Hash = 0;
slotChangeDesktop(0);
}
diff --git a/kdesktop/bgmanager.h b/kdesktop/bgmanager.h
index 455e3a3ad..8396f161a 100644
--- a/kdesktop/bgmanager.h
+++ b/kdesktop/bgmanager.h
@@ -10,8 +10,8 @@
#ifndef __BGManager_h_Included__
#define __BGManager_h_Included__
-#include <qstring.h>
-#include <qptrvector.h>
+#include <tqstring.h>
+#include <tqptrvector.h>
#include <KBackgroundIface.h>
@@ -50,13 +50,13 @@ struct KBackgroundCacheEntry
*/
class KBackgroundManager
- : public QObject,
+ : public TQObject,
virtual public KBackgroundIface
{
Q_OBJECT
public:
- KBackgroundManager(QWidget *desktop, KWinModule* kwinModule);
+ KBackgroundManager(TQWidget *desktop, KWinModule* kwinModule);
~KBackgroundManager();
void configure();
@@ -65,15 +65,15 @@ public:
void setExport(int);
bool isExport() { return m_bExport; };
void setCache(int, int);
- void setWallpaper(int desk, QString wallpaper, int mode);
- void setWallpaper(QString wallpaper, int mode);
- void setWallpaper(QString wallpaper);
+ void setWallpaper(int desk, TQString wallpaper, int mode);
+ void setWallpaper(TQString wallpaper, int mode);
+ void setWallpaper(TQString wallpaper);
void changeWallpaper();
- QString currentWallpaper(int desk);
- void setColor(const QColor & c, bool isColorA = true);
+ TQString currentWallpaper(int desk);
+ void setColor(const TQColor & c, bool isColorA = true);
void setBackgroundEnabled(const bool enable);
- QStringList wallpaperList(int desk);
- QStringList wallpaperFiles(int desk);
+ TQStringList wallpaperList(int desk);
+ TQStringList wallpaperFiles(int desk);
signals:
void initDone();
@@ -82,7 +82,7 @@ private slots:
void slotTimeout();
void slotImageDone(int desk);
void slotChangeDesktop(int);
- void slotChangeViewport(int, const QPoint&);
+ void slotChangeViewport(int, const TQPoint&);
void slotChangeNumberOfDesktops(int);
void repaintBackground();
void desktopResized();
@@ -105,7 +105,7 @@ private:
void renderBackground(int desk);
void exportBackground(int pixmap, int desk);
- int pixmapSize(QPixmap *pm);
+ int pixmapSize(TQPixmap *pm);
int cacheSize();
void removeCache(int desk);
bool freeCache(int size);
@@ -121,15 +121,15 @@ private:
int m_Serial, m_Hash, m_Current;
KConfig *m_pConfig;
- QWidget *m_pDesktop;
- QTimer *m_pTimer;
+ TQWidget *m_pDesktop;
+ TQTimer *m_pTimer;
#ifdef COMPOSITE
KPixmap *m_tPixmap;
#endif
- QPtrVector<KVirtualBGRenderer> m_Renderer;
- QPtrVector<KBackgroundCacheEntry> m_Cache;
+ TQPtrVector<KVirtualBGRenderer> m_Renderer;
+ TQPtrVector<KBackgroundCacheEntry> m_Cache;
KWinModule *m_pKwinmodule;
KPixmapServer *m_pPixmapServer;
diff --git a/kdesktop/desktop.cc b/kdesktop/desktop.cc
index 18cb69fb4..54513e962 100644
--- a/kdesktop/desktop.cc
+++ b/kdesktop/desktop.cc
@@ -33,9 +33,9 @@
#include <kcolordrag.h>
#include <kurldrag.h>
-#include <qdir.h>
-#include <qevent.h>
-#include <qtooltip.h>
+#include <tqdir.h>
+#include <tqevent.h>
+#include <tqtooltip.h>
#include <netwm.h>
#include <dcopclient.h>
@@ -63,31 +63,31 @@
//#include <kaccelbase.h>
extern int kdesktop_screen_number;
-extern QCString kdesktop_name, kicker_name, kwin_name;
+extern TQCString kdesktop_name, kicker_name, kwin_name;
-KRootWidget::KRootWidget() : QObject()
+KRootWidget::KRootWidget() : TQObject()
{
kapp->desktop()->installEventFilter(this);
kapp->desktop()->setAcceptDrops( true );
}
-bool KRootWidget::eventFilter ( QObject *, QEvent * e )
+bool KRootWidget::eventFilter ( TQObject *, TQEvent * e )
{
- if (e->type() == QEvent::MouseButtonPress)
+ if (e->type() == TQEvent::MouseButtonPress)
{
- QMouseEvent *me = static_cast<QMouseEvent *>(e);
+ TQMouseEvent *me = static_cast<TQMouseEvent *>(e);
KRootWm::self()->mousePressed( me->globalPos(), me->button() );
return true;
}
- else if (e->type() == QEvent::Wheel)
+ else if (e->type() == TQEvent::Wheel)
{
- QWheelEvent *we = static_cast<QWheelEvent *>(e);
+ TQWheelEvent *we = static_cast<TQWheelEvent *>(e);
emit wheelRolled(we->delta());
return true;
}
- else if ( e->type() == QEvent::DragEnter )
+ else if ( e->type() == TQEvent::DragEnter )
{
- QDragEnterEvent* de = static_cast<QDragEnterEvent *>( e );
+ TQDragEnterEvent* de = static_cast<TQDragEnterEvent *>( e );
bool b = !KGlobal::config()->isImmutable() && !KGlobal::dirs()->isRestrictedResource( "wallpaper" );
bool imageURL = false;
@@ -102,16 +102,16 @@ bool KRootWidget::eventFilter ( QObject *, QEvent * e )
imageURL = true;
}
- b = b && ( KColorDrag::canDecode( de ) || QImageDrag::canDecode( de ) || imageURL );
+ b = b && ( KColorDrag::canDecode( de ) || TQImageDrag::canDecode( de ) || imageURL );
de->accept( b );
return true;
}
- else if ( e->type() == QEvent::Drop )
+ else if ( e->type() == TQEvent::Drop )
{
- QDropEvent* de = static_cast<QDropEvent*>( e );
+ TQDropEvent* de = static_cast<TQDropEvent*>( e );
if ( KColorDrag::canDecode( de ) )
emit colorDropEvent( de );
- else if ( QImageDrag::canDecode( de ) )
+ else if ( TQImageDrag::canDecode( de ) )
emit imageDropEvent( de );
else if ( KURLDrag::canDecode( de ) ) {
KURL::List list;
@@ -132,7 +132,7 @@ const char* KDesktop::m_wheelDirectionStrings[2] = { "Forward", "Reverse" };
KDesktop::KDesktop( bool x_root_hack, bool wait_for_kded ) :
DCOPObject( "KDesktopIface" ),
- QWidget( 0L, "desktop", WResizeNoErase | ( x_root_hack ? (WStyle_Customize | WStyle_NoBorder) : 0) ),
+ TQWidget( 0L, "desktop", WResizeNoErase | ( x_root_hack ? (WStyle_Customize | WStyle_NoBorder) : 0) ),
// those two WStyle_ break kdesktop when the root-hack isn't used (no Dnd)
startup_id( NULL ), m_waitForKicker(0)
{
@@ -149,8 +149,8 @@ KDesktop::KDesktop( bool x_root_hack, bool wait_for_kded ) :
m_pKwinmodule = new KWinModule( this );
kapp->dcopClient()->setNotifications(true);
- kapp->dcopClient()->connectDCOPSignal(kicker_name, kicker_name, "desktopIconsAreaChanged(QRect, int)",
- "KDesktopIface", "desktopIconsAreaChanged(QRect, int)", false);
+ kapp->dcopClient()->connectDCOPSignal(kicker_name, kicker_name, "desktopIconsAreaChanged(TQRect, int)",
+ "KDesktopIface", "desktopIconsAreaChanged(TQRect, int)", false);
// Dont repaint on configuration changes during construction
m_bInit = true;
@@ -172,31 +172,31 @@ KDesktop::KDesktop( bool x_root_hack, bool wait_for_kded ) :
}
- setGeometry( QApplication::desktop()->geometry() );
+ setGeometry( TQApplication::desktop()->geometry() );
lower();
- connect( kapp, SIGNAL( shutDown() ),
- this, SLOT( slotShutdown() ) );
+ connect( kapp, TQT_SIGNAL( shutDown() ),
+ this, TQT_SLOT( slotShutdown() ) );
- connect(kapp, SIGNAL(settingsChanged(int)),
- this, SLOT(slotSettingsChanged(int)));
+ connect(kapp, TQT_SIGNAL(settingsChanged(int)),
+ this, TQT_SLOT(slotSettingsChanged(int)));
kapp->addKipcEventMask(KIPC::SettingsChanged);
kapp->addKipcEventMask(KIPC::IconChanged);
- connect(kapp, SIGNAL(iconChanged(int)), this, SLOT(slotIconChanged(int)));
+ connect(kapp, TQT_SIGNAL(iconChanged(int)), this, TQT_SLOT(slotIconChanged(int)));
- connect(KSycoca::self(), SIGNAL(databaseChanged()),
- this, SLOT(slotDatabaseChanged()));
+ connect(KSycoca::self(), TQT_SIGNAL(databaseChanged()),
+ this, TQT_SLOT(slotDatabaseChanged()));
m_pIconView = 0;
m_pRootWidget = 0;
bgMgr = 0;
initRoot();
- QTimer::singleShot(0, this, SLOT( slotStart() ));
+ TQTimer::singleShot(0, this, TQT_SLOT( slotStart() ));
#if (QT_VERSION-0 >= 0x030200) // XRANDR support
- connect( kapp->desktop(), SIGNAL( resized( int )), SLOT( desktopResized()));
+ connect( kapp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( desktopResized()));
#endif
}
@@ -219,8 +219,8 @@ KDesktop::initRoot()
m_pIconView = 0;
{ // trigger creation of QToolTipManager, it does XSelectInput() on the root window
- QWidget w;
- QToolTip::add( &w, "foo" );
+ TQWidget w;
+ TQToolTip::add( &w, "foo" );
}
// NOTE: If mouse clicks stop working again, it's most probably something doing XSelectInput()
// on the root window after this, and setting it to some fixed value instead of adding its mask.
@@ -229,21 +229,21 @@ KDesktop::initRoot()
XSelectInput(dpy, root, attrs.your_event_mask | ButtonPressMask);
m_pRootWidget = new KRootWidget;
- connect(m_pRootWidget, SIGNAL(wheelRolled(int)), this, SLOT(slotSwitchDesktops(int)));
- connect(m_pRootWidget, SIGNAL(colorDropEvent(QDropEvent*)), this, SLOT(handleColorDropEvent(QDropEvent*)) );
- connect(m_pRootWidget, SIGNAL(imageDropEvent(QDropEvent*)), this, SLOT(handleImageDropEvent(QDropEvent*)) );
- connect(m_pRootWidget, SIGNAL(newWallpaper(const KURL&)), this, SLOT(slotNewWallpaper(const KURL&)) );
+ connect(m_pRootWidget, TQT_SIGNAL(wheelRolled(int)), this, TQT_SLOT(slotSwitchDesktops(int)));
+ connect(m_pRootWidget, TQT_SIGNAL(colorDropEvent(TQDropEvent*)), this, TQT_SLOT(handleColorDropEvent(TQDropEvent*)) );
+ connect(m_pRootWidget, TQT_SIGNAL(imageDropEvent(TQDropEvent*)), this, TQT_SLOT(handleImageDropEvent(TQDropEvent*)) );
+ connect(m_pRootWidget, TQT_SIGNAL(newWallpaper(const KURL&)), this, TQT_SLOT(slotNewWallpaper(const KURL&)) );
// Geert Jansen: backgroundmanager belongs here
// TODO tell KBackgroundManager if we change widget()
bgMgr = new KBackgroundManager( m_pIconView, m_pKwinmodule );
bgMgr->setExport(1);
- connect( bgMgr, SIGNAL( initDone()), SLOT( backgroundInitDone()));
+ connect( bgMgr, TQT_SIGNAL( initDone()), TQT_SLOT( backgroundInitDone()));
if (!m_bInit)
{
delete KRootWm::self();
KRootWm* krootwm = new KRootWm( this ); // handler for root menu (used by kdesktop on RMB click)
- keys->setSlot("Lock Session", krootwm, SLOT(slotLock()));
+ keys->setSlot("Lock Session", krootwm, TQT_SLOT(slotLock()));
keys->updateConnections();
}
}
@@ -254,21 +254,21 @@ KDesktop::initRoot()
delete m_pRootWidget;
m_pRootWidget = 0;
m_pIconView = new KDIconView( this, 0 );
- connect( m_pIconView, SIGNAL( imageDropEvent( QDropEvent * ) ),
- this, SLOT( handleImageDropEvent( QDropEvent * ) ) );
- connect( m_pIconView, SIGNAL( colorDropEvent( QDropEvent * ) ),
- this, SLOT( handleColorDropEvent( QDropEvent * ) ) );
- connect( m_pIconView, SIGNAL( newWallpaper( const KURL & ) ),
- this, SLOT( slotNewWallpaper( const KURL & ) ) );
- connect( m_pIconView, SIGNAL( wheelRolled( int ) ),
- this, SLOT( slotSwitchDesktops( int ) ) );
+ connect( m_pIconView, TQT_SIGNAL( imageDropEvent( TQDropEvent * ) ),
+ this, TQT_SLOT( handleImageDropEvent( TQDropEvent * ) ) );
+ connect( m_pIconView, TQT_SIGNAL( colorDropEvent( TQDropEvent * ) ),
+ this, TQT_SLOT( handleColorDropEvent( TQDropEvent * ) ) );
+ connect( m_pIconView, TQT_SIGNAL( newWallpaper( const KURL & ) ),
+ this, TQT_SLOT( slotNewWallpaper( const KURL & ) ) );
+ connect( m_pIconView, TQT_SIGNAL( wheelRolled( int ) ),
+ this, TQT_SLOT( slotSwitchDesktops( int ) ) );
// All the QScrollView/QWidget-specific stuff should go here, so that we can use
// another qscrollview/widget instead of the iconview and use the same code
- m_pIconView->setVScrollBarMode( QScrollView::AlwaysOff );
- m_pIconView->setHScrollBarMode( QScrollView::AlwaysOff );
+ m_pIconView->setVScrollBarMode( TQScrollView::AlwaysOff );
+ m_pIconView->setHScrollBarMode( TQScrollView::AlwaysOff );
m_pIconView->setDragAutoScroll( false );
- m_pIconView->setFrameStyle( QFrame::NoFrame );
+ m_pIconView->setFrameStyle( TQFrame::NoFrame );
m_pIconView->viewport()->setBackgroundMode( X11ParentRelative );
m_pIconView->setFocusPolicy( StrongFocus );
m_pIconView->viewport()->setFocusPolicy( StrongFocus );
@@ -279,23 +279,23 @@ KDesktop::initRoot()
// TODO tell KBackgroundManager if we change widget()
bgMgr = new KBackgroundManager( m_pIconView, m_pKwinmodule );
bgMgr->setExport(1);
- connect( bgMgr, SIGNAL( initDone()), SLOT( backgroundInitDone()));
+ connect( bgMgr, TQT_SIGNAL( initDone()), TQT_SLOT( backgroundInitDone()));
// make sure it is initialized before we first call updateWorkArea()
m_pIconView->initConfig( m_bInit );
// set the size of the area for desktop icons placement
{
- QByteArray data, result;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, result;
+ TQDataStream arg(data, IO_WriteOnly);
arg << kdesktop_screen_number;
- QCString replyType;
- QRect area;
+ TQCString replyType;
+ TQRect area;
if ( kapp->dcopClient()->call(kicker_name, kicker_name, "desktopIconsArea(int)",
data, replyType, result, false, 2000) )
{
- QDataStream res(result, IO_ReadOnly);
+ TQDataStream res(result, IO_ReadOnly);
res >> area;
m_pIconView->updateWorkArea(area);
@@ -305,8 +305,8 @@ KDesktop::initRoot()
{
// if we failed to get the information from kicker wait a little - probably
// this is the KDE startup and kicker is simply not running yet
- m_waitForKicker = new QTimer(this);
- connect(m_waitForKicker, SIGNAL(timeout()), this, SLOT(slotNoKicker()));
+ m_waitForKicker = new TQTimer(this);
+ connect(m_waitForKicker, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotNoKicker()));
m_waitForKicker->start(15000, true);
}
else // we are not called from the ctor, so kicker should already run
@@ -321,12 +321,12 @@ KDesktop::initRoot()
m_pIconView->start();
delete KRootWm::self();
KRootWm* krootwm = new KRootWm( this ); // handler for root menu (used by kdesktop on RMB click)
- keys->setSlot("Lock Session", krootwm, SLOT(slotLock()));
+ keys->setSlot("Lock Session", krootwm, TQT_SLOT(slotLock()));
keys->updateConnections();
}
} else {
DCOPRef r( "ksmserver", "ksmserver" );
- r.send( "resumeStartup", QCString( "kdesktop" ));
+ r.send( "resumeStartup", TQCString( "kdesktop" ));
}
KWin::setType( winId(), NET::Desktop );
@@ -349,7 +349,7 @@ KDesktop::backgroundInitDone()
// avoid flicker
if (m_bDesktopEnabled)
{
- const QPixmap *bg = QApplication::desktop()->screen()->backgroundPixmap();
+ const TQPixmap *bg = TQApplication::desktop()->screen()->backgroundPixmap();
if ( bg )
m_pIconView->setErasePixmap( *bg );
@@ -358,7 +358,7 @@ KDesktop::backgroundInitDone()
}
DCOPRef r( "ksmserver", "ksmserver" );
- r.send( "resumeStartup", QCString( "kdesktop" ));
+ r.send( "resumeStartup", TQCString( "kdesktop" ));
}
void
@@ -394,9 +394,9 @@ KDesktop::slotStart()
keys->readSettings();
keys->updateConnections();
- connect(kapp, SIGNAL(appearanceChanged()), SLOT(slotConfigure()));
+ connect(kapp, TQT_SIGNAL(appearanceChanged()), TQT_SLOT(slotConfigure()));
- QTimer::singleShot(300, this, SLOT( slotUpAndRunning() ));
+ TQTimer::singleShot(300, this, TQT_SLOT( slotUpAndRunning() ));
}
void
@@ -405,10 +405,10 @@ KDesktop::runAutoStart()
// now let's execute all the stuff in the autostart folder.
// the stuff will actually be really executed when the event loop is
// entered, since KRun internally uses a QTimer
- QDir dir( KGlobalSettings::autostartPath() );
- QStringList entries = dir.entryList( QDir::Files );
- QStringList::Iterator it = entries.begin();
- QStringList::Iterator end = entries.end();
+ TQDir dir( KGlobalSettings::autostartPath() );
+ TQStringList entries = dir.entryList( TQDir::Files );
+ TQStringList::Iterator it = entries.begin();
+ TQStringList::Iterator end = entries.end();
for (; it != end; ++it )
{
// Don't execute backup files
@@ -489,7 +489,7 @@ void KDesktop::popupExecuteCommand()
popupExecuteCommand("");
}
-void KDesktop::popupExecuteCommand(const QString& command)
+void KDesktop::popupExecuteCommand(const TQString& command)
{
if (m_bInit)
return;
@@ -518,7 +518,7 @@ void KDesktop::popupExecuteCommand(const QString& command)
} else {
NETRootInfo i( qt_xdisplay(), NET::Supported );
if( !i.isSupported( NET::WM2FullPlacement )) {
- QRect rect = KGlobalSettings::desktopGeometry(QCursor::pos());
+ TQRect rect = KGlobalSettings::desktopGeometry(TQCursor::pos());
m_miniCli->move(rect.x() + (rect.width() - m_miniCli->width())/2,
rect.y() + (rect.height() - m_miniCli->height())/2);
}
@@ -576,11 +576,11 @@ void KDesktop::unselectAll()
m_pIconView->selectAll( false );
}
-QStringList KDesktop::selectedURLs()
+TQStringList KDesktop::selectedURLs()
{
if (m_pIconView)
return m_pIconView->selectedURLs();
- return QStringList();
+ return TQStringList();
}
void KDesktop::refreshIcons()
@@ -689,7 +689,7 @@ void KDesktop::slotSetVRoot()
return;
if (KWin::windowInfo(winId()).mappingState() == NET::Withdrawn) {
- QTimer::singleShot(100, this, SLOT(slotSetVRoot()));
+ TQTimer::singleShot(100, this, TQT_SLOT(slotSetVRoot()));
return;
}
@@ -728,12 +728,12 @@ void KDesktop::slotShutdown()
}
// don't hide when someone presses Alt-F4 on us
-void KDesktop::closeEvent(QCloseEvent *e)
+void KDesktop::closeEvent(TQCloseEvent *e)
{
e->ignore();
}
-void KDesktop::desktopIconsAreaChanged(const QRect &area, int screen)
+void KDesktop::desktopIconsAreaChanged(const TQRect &area, int screen)
{
// hurra! kicker is alive
if ( m_waitForKicker ) m_waitForKicker->stop();
@@ -768,14 +768,14 @@ void KDesktop::slotSwitchDesktops(int delta)
}
}
-void KDesktop::handleColorDropEvent(QDropEvent * e)
+void KDesktop::handleColorDropEvent(TQDropEvent * e)
{
KPopupMenu popup;
popup.insertItem(SmallIconSet("colors"),i18n("Set as Primary Background Color"), 1);
popup.insertItem(SmallIconSet("colors"),i18n("Set as Secondary Background Color"), 2);
int result = popup.exec(e->pos());
- QColor c;
+ TQColor c;
KColorDrag::decode(e, c);
switch (result) {
case 1: bgMgr->setColor(c, true); break;
@@ -785,7 +785,7 @@ void KDesktop::handleColorDropEvent(QDropEvent * e)
bgMgr->setWallpaper(0,0);
}
-void KDesktop::handleImageDropEvent(QDropEvent * e)
+void KDesktop::handleImageDropEvent(TQDropEvent * e)
{
KPopupMenu popup;
if ( m_pIconView )
@@ -799,7 +799,7 @@ void KDesktop::handleImageDropEvent(QDropEvent * e)
if (result == 1)
{
bool ok = true;
- QString filename = KInputDialog::getText(QString::null, i18n("Enter a name for the image below:"), QString::null, &ok, m_pIconView);
+ TQString filename = KInputDialog::getText(TQString::null, i18n("Enter a name for the image below:"), TQString::null, &ok, m_pIconView);
if (!ok)
{
@@ -815,9 +815,9 @@ void KDesktop::handleImageDropEvent(QDropEvent * e)
filename += ".png";
}
- QImage i;
- QImageDrag::decode(e, i);
- KTempFile tmpFile(QString::null, filename);
+ TQImage i;
+ TQImageDrag::decode(e, i);
+ KTempFile tmpFile(TQString::null, filename);
i.save(tmpFile.name(), "PNG");
// We pass 0 as parent window because passing the desktop is not a good idea
KURL src;
@@ -829,8 +829,8 @@ void KDesktop::handleImageDropEvent(QDropEvent * e)
}
else if (result == 2)
{
- QImage i;
- QImageDrag::decode(e, i);
+ TQImage i;
+ TQImageDrag::decode(e, i);
KTempFile tmpFile(KGlobal::dirs()->saveLocation("wallpaper"), ".png");
i.save(tmpFile.name(), "PNG");
kdDebug(1204) << "KDesktop::contentsDropEvent " << tmpFile.name() << endl;
@@ -847,9 +847,9 @@ void KDesktop::slotNewWallpaper(const KURL &url)
else
{
// Figure out extension
- QString fileName = url.fileName();
- QFileInfo fileInfo( fileName );
- QString ext = fileInfo.extension();
+ TQString fileName = url.fileName();
+ TQFileInfo fileInfo( fileName );
+ TQString ext = fileInfo.extension();
// Store tempfile in a place where it will still be available after a reboot
KTempFile tmpFile( KGlobal::dirs()->saveLocation("wallpaper"), "." + ext );
KURL localURL; localURL.setPath( tmpFile.name() );
@@ -948,16 +948,16 @@ void KDesktop::desktopResized()
m_pIconView->resize(kapp->desktop()->size());
// get new desktopIconsArea from kicker
- QByteArray data, result;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data, result;
+ TQDataStream arg(data, IO_WriteOnly);
arg << kdesktop_screen_number;
- QCString replyType;
- QRect area;
+ TQCString replyType;
+ TQRect area;
if ( kapp->dcopClient()->call(kicker_name, kicker_name, "desktopIconsArea(int)",
data, replyType, result, false, 2000) )
{
- QDataStream res(result, IO_ReadOnly);
+ TQDataStream res(result, IO_ReadOnly);
res >> area;
}
else
@@ -976,14 +976,14 @@ void KDesktop::switchDesktops( int delta )
m_bWheelSwitchesWorkspace = old;
}
-bool KDesktop::event(QEvent * e)
+bool KDesktop::event(TQEvent * e)
{
- if ( e->type() == QEvent::WindowDeactivate)
+ if ( e->type() == TQEvent::WindowDeactivate)
{
if (m_pIconView)
m_pIconView->clearSelection();
}
- return QWidget::event(e);
+ return TQWidget::event(e);
}
#include "desktop.moc"
diff --git a/kdesktop/desktop.h b/kdesktop/desktop.h
index 0407fbe4f..0ad57ce7b 100644
--- a/kdesktop/desktop.h
+++ b/kdesktop/desktop.h
@@ -22,8 +22,8 @@
#include "KDesktopIface.h"
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <kapplication.h> // for logout parameters
@@ -45,11 +45,11 @@ class KRootWidget : public QObject
Q_OBJECT
public:
KRootWidget();
- bool eventFilter( QObject *, QEvent * e );
+ bool eventFilter( TQObject *, TQEvent * e );
signals:
void wheelRolled( int delta );
- void colorDropEvent( QDropEvent* e );
- void imageDropEvent( QDropEvent* e );
+ void colorDropEvent( TQDropEvent* e );
+ void imageDropEvent( TQDropEvent* e );
void newWallpaper( const KURL& url );
};
@@ -58,7 +58,7 @@ signals:
* It handles the background, the screensaver and all the rest of the global stuff.
* The icon view is a child widget of KDesktop.
*/
-class KDesktop : public QWidget, virtual public KDesktopIface
+class KDesktop : public TQWidget, virtual public KDesktopIface
{
Q_OBJECT
@@ -75,11 +75,11 @@ public:
virtual void selectAll();
virtual void unselectAll();
virtual void refreshIcons();
- virtual QStringList selectedURLs();
+ virtual TQStringList selectedURLs();
virtual void configure();
virtual void popupExecuteCommand();
- virtual void popupExecuteCommand(const QString& content);
+ virtual void popupExecuteCommand(const TQString& content);
virtual void refresh();
virtual void logout();
virtual void clearCommandHistory();
@@ -87,7 +87,7 @@ public:
virtual void switchDesktops( int delta );
- virtual void desktopIconsAreaChanged(const QRect &area, int screen);
+ virtual void desktopIconsAreaChanged(const TQRect &area, int screen);
void logout( KApplication::ShutdownConfirm confirm, KApplication::ShutdownType sdtype );
@@ -141,8 +141,8 @@ private slots:
void slotSetVRoot();
/** Connected to KDIconView */
- void handleImageDropEvent( QDropEvent * );
- void handleColorDropEvent( QDropEvent * );
+ void handleImageDropEvent( TQDropEvent * );
+ void handleColorDropEvent( TQDropEvent * );
void slotNewWallpaper(const KURL &url);
/** Connected to KDIconView and KRootWidget */
@@ -155,14 +155,14 @@ protected:
void initConfig();
void initRoot();
- virtual void closeEvent(QCloseEvent *e);
+ virtual void closeEvent(TQCloseEvent *e);
virtual bool isVRoot() { return set_vroot; }
virtual void setVRoot( bool enable );
virtual bool isIconsEnabled() { return m_bDesktopEnabled; }
virtual void setIconsEnabled( bool enable );
- virtual bool event ( QEvent * e );
+ virtual bool event ( TQEvent * e );
private slots:
void desktopResized();
@@ -195,7 +195,7 @@ private:
/** Whether or not to switch desktops when mouse wheel is rolled */
bool m_bWheelSwitchesWorkspace;
- QTimer *m_waitForKicker;
+ TQTimer *m_waitForKicker;
/** Default mouse wheel direction (Fwd means mwheel up switches to
lower desktop)
diff --git a/kdesktop/init.cc b/kdesktop/init.cc
index c0c2502d5..27441b170 100644
--- a/kdesktop/init.cc
+++ b/kdesktop/init.cc
@@ -29,9 +29,9 @@
#include <kdebug.h>
#include <kdesktopsettings.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -52,20 +52,20 @@ extern int kdesktop_screen_number;
* @param _showMsg show a message box if we created the dir
* @return true if the dir was just created (e.g. so that we can populate it)
*/
-static bool testDir( const QString &_name )
+static bool testDir( const TQString &_name )
{
DIR *dp;
- dp = opendir( QFile::encodeName(_name) );
+ dp = opendir( TQFile::encodeName(_name) );
if ( dp == NULL )
{
- QString m = _name;
+ TQString m = _name;
if ( m.endsWith( "/" ) )
m.truncate( m.length() - 1 );
- QCString path = QFile::encodeName(m);
+ TQCString path = TQFile::encodeName(m);
bool ok = ::mkdir( path, S_IRWXU ) == 0;
if ( !ok && errno == EEXIST ) {
- int ret = KMessageBox::warningYesNo( 0, i18n("%1 is a file, but KDE needs it to be a directory; move it to %2.orig and create directory?").arg(m).arg(m), QString::null, i18n("Move It"), i18n("Do Not Move") );
+ int ret = KMessageBox::warningYesNo( 0, i18n("%1 is a file, but KDE needs it to be a directory; move it to %2.orig and create directory?").arg(m).arg(m), TQString::null, i18n("Move It"), i18n("Do Not Move") );
if ( ret == KMessageBox::Yes ) {
if ( ::rename( path, path + ".orig" ) == 0 ) {
ok = ::mkdir( path, S_IRWXU ) == 0;
@@ -97,32 +97,32 @@ static bool testDir( const QString &_name )
* @param dir destination directory
* @param force if false, don't copy if destination file already exists
*/
-static void copyDirectoryFile(const QString &fileName, const QString& dir, bool force)
+static void copyDirectoryFile(const TQString &fileName, const TQString& dir, bool force)
{
- if (force || !QFile::exists(dir + "/.directory")) {
- QString cmd = "cp ";
- cmd += KProcess::quote(locate("data", QString("kdesktop/") + fileName));
+ if (force || !TQFile::exists(dir + "/.directory")) {
+ TQString cmd = "cp ";
+ cmd += KProcess::quote(locate("data", TQString("kdesktop/") + fileName));
cmd += " ";
cmd += KProcess::quote(dir+"/.directory");
- system( QFile::encodeName(cmd) );
+ system( TQFile::encodeName(cmd) );
}
}
-static void copyFile( const QString& src, const QString& dest )
+static void copyFile( const TQString& src, const TQString& dest )
{
- QCString cmd = "cp ";
- cmd += QFile::encodeName(KProcess::quote(src));
+ TQCString cmd = "cp ";
+ cmd += TQFile::encodeName(KProcess::quote(src));
cmd += " ";
- cmd += QFile::encodeName(KProcess::quote(dest));
+ cmd += TQFile::encodeName(KProcess::quote(dest));
system( cmd );
}
-static QString realDesktopPath()
+static TQString realDesktopPath()
{
- QString desktopPath = KGlobalSettings::desktopPath();
+ TQString desktopPath = KGlobalSettings::desktopPath();
if (kdesktop_screen_number != 0) {
- QString dn = "Desktop";
- dn += QString::number(kdesktop_screen_number);
+ TQString dn = "Desktop";
+ dn += TQString::number(kdesktop_screen_number);
desktopPath.replace("Desktop", dn);
}
return desktopPath;
@@ -139,12 +139,12 @@ static void copyDesktopLinks()
if (!config->readBoolEntry("CopyDesktopLinks", true))
return;
- QStringList list =
+ TQStringList list =
KGlobal::dirs()->findAllResources("appdata", "DesktopLinks/*", false, true);
- QString desktopPath = realDesktopPath();
+ TQString desktopPath = realDesktopPath();
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); it++) {
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); it++) {
KDesktopFile desk( *it );
if (desk.readBoolEntry("Hidden"))
continue;
@@ -191,7 +191,7 @@ void testLocalInstallation()
{
const bool newRelease = isNewRelease();
- const QString desktopPath = realDesktopPath();
+ const TQString desktopPath = realDesktopPath();
const bool emptyDesktop = testDir( desktopPath );
// Do not force copying that one (it would lose the icon positions)
@@ -205,13 +205,13 @@ void testLocalInstallation()
copyDesktopLinks();
// Take care of creating or updating trash.desktop
- const QString trashDir = KGlobal::dirs()->localxdgdatadir() + "Trash";
- const bool firstTimeWithNewTrash = !QFile::exists( trashDir );
- const QString trashDesktopPath = desktopPath + "/trash.desktop";
- const bool trashDesktopExists = QFile::exists( trashDesktopPath );
+ const TQString trashDir = KGlobal::dirs()->localxdgdatadir() + "Trash";
+ const bool firstTimeWithNewTrash = !TQFile::exists( trashDir );
+ const TQString trashDesktopPath = desktopPath + "/trash.desktop";
+ const bool trashDesktopExists = TQFile::exists( trashDesktopPath );
const bool installNewTrashi18n = newRelease && trashDesktopExists; // not if deleted by user
if ( emptyDesktop || firstTimeWithNewTrash || installNewTrashi18n ) {
- QString oldIcon, oldEmptyIcon;
+ TQString oldIcon, oldEmptyIcon;
if ( trashDesktopExists ) {
KDesktopFile trashDesktop( trashDesktopPath, true );
oldIcon = trashDesktop.readIcon();
@@ -227,8 +227,8 @@ void testLocalInstallation()
}
if ( firstTimeWithNewTrash ) { // migrate pre-kde-3.4 trash contents
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)2;
KIO::Job* job = KIO::special( "trash:/", packedArgs );
(void)KIO::NetAccess::synchronousRun( job, 0 );
@@ -236,9 +236,9 @@ void testLocalInstallation()
// OK the only thing missing is to convert the icon position...
KSimpleConfig cfg( locateLocal("appdata", "IconPositions") );
if ( cfg.hasGroup( "IconPosition::Trash" ) && !cfg.hasGroup( "IconPosition::trash.desktop" ) ) {
- const QMap<QString, QString> entries = cfg.entryMap( "IconPosition::Trash" );
+ const TQMap<TQString, TQString> entries = cfg.entryMap( "IconPosition::Trash" );
cfg.setGroup( "IconPosition::trash.desktop" );
- for( QMap<QString,QString>::ConstIterator it = entries.begin(); it != entries.end(); ++it ) {
+ for( TQMap<TQString,TQString>::ConstIterator it = entries.begin(); it != entries.end(); ++it ) {
cfg.writeEntry( it.key(), it.data() );
}
}
diff --git a/kdesktop/kcustommenu.cc b/kdesktop/kcustommenu.cc
index 675dab098..1d39a093d 100644
--- a/kdesktop/kcustommenu.cc
+++ b/kdesktop/kcustommenu.cc
@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qimage.h>
-#include <qregexp.h>
+#include <tqimage.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kiconloader.h>
@@ -29,11 +29,11 @@
class KCustomMenu::KCustomMenuPrivate
{
public:
- QMap<int,KService::Ptr> entryMap;
+ TQMap<int,KService::Ptr> entryMap;
};
-KCustomMenu::KCustomMenu(const QString &configfile, QWidget *parent)
- : QPopupMenu(parent, "kcustom_menu")
+KCustomMenu::KCustomMenu(const TQString &configfile, TQWidget *parent)
+ : TQPopupMenu(parent, "kcustom_menu")
{
d = new KCustomMenuPrivate;
@@ -41,7 +41,7 @@ KCustomMenu::KCustomMenu(const QString &configfile, QWidget *parent)
int count = cfg.readNumEntry("NrOfItems");
for(int i = 0; i < count; i++)
{
- QString entry = cfg.readEntry(QString("Item%1").arg(i+1));
+ TQString entry = cfg.readEntry(TQString("Item%1").arg(i+1));
if (entry.isEmpty())
continue;
@@ -57,7 +57,7 @@ KCustomMenu::KCustomMenu(const QString &configfile, QWidget *parent)
insertMenuItem( menuItem, -1 );
}
- connect(this, SIGNAL(activated(int)), this, SLOT(slotActivated(int)));
+ connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)));
}
KCustomMenu::~KCustomMenu()
@@ -78,31 +78,31 @@ KCustomMenu::slotActivated(int id)
void
KCustomMenu::insertMenuItem(KService::Ptr & s, int nId, int nIndex/*= -1*/)
{
- QString serviceName = s->name();
+ TQString serviceName = s->name();
// item names may contain ampersands. To avoid them being converted
// to accelators, replace them with two ampersands.
serviceName.replace("&", "&&");
- QPixmap normal = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small,
+ TQPixmap normal = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small,
0, KIcon::DefaultState, 0L, true);
- QPixmap active = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small,
+ TQPixmap active = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small,
0, KIcon::ActiveState, 0L, true);
// make sure they are not larger than 16x16
if (normal.width() > 16 || normal.height() > 16) {
- QImage tmp = normal.convertToImage();
+ TQImage tmp = normal.convertToImage();
tmp = tmp.smoothScale(16, 16);
normal.convertFromImage(tmp);
}
if (active.width() > 16 || active.height() > 16) {
- QImage tmp = active.convertToImage();
+ TQImage tmp = active.convertToImage();
tmp = tmp.smoothScale(16, 16);
active.convertFromImage(tmp);
}
- QIconSet iconset;
- iconset.setPixmap(normal, QIconSet::Small, QIconSet::Normal);
- iconset.setPixmap(active, QIconSet::Small, QIconSet::Active);
+ TQIconSet iconset;
+ iconset.setPixmap(normal, TQIconSet::Small, TQIconSet::Normal);
+ iconset.setPixmap(active, TQIconSet::Small, TQIconSet::Active);
int newId = insertItem(iconset, serviceName, nId, nIndex);
d->entryMap.insert(newId, s);
diff --git a/kdesktop/kcustommenu.h b/kdesktop/kcustommenu.h
index 3a678ae7a..602a09584 100644
--- a/kdesktop/kcustommenu.h
+++ b/kdesktop/kcustommenu.h
@@ -20,7 +20,7 @@
#ifndef __kcustommenu_h__
#define __kcustommenu_h__
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kservice.h>
/*
@@ -34,7 +34,7 @@ public:
/**
* Create a custome menu described by @p configfile.
*/
- KCustomMenu(const QString &configfile, QWidget *parent=0);
+ KCustomMenu(const TQString &configfile, TQWidget *parent=0);
/**
* Destructor
diff --git a/kdesktop/kdesktopbindings.cpp b/kdesktop/kdesktopbindings.cpp
index c50eb7c30..4e46a2013 100644
--- a/kdesktop/kdesktopbindings.cpp
+++ b/kdesktop/kdesktopbindings.cpp
@@ -1,13 +1,13 @@
#ifndef NOSLOTS
# define DEF( name, key3, key4, fnSlot ) \
- keys->insert( name, i18n(name), QString::null, key3, key4, this, SLOT(fnSlot) )
+ keys->insert( name, i18n(name), TQString::null, key3, key4, this, TQT_SLOT(fnSlot) )
# define DEF2( name, key3, key4, receiver, slot ) \
- keys->insert( name, i18n(name), QString::null, key3, key4, receiver, slot );
+ keys->insert( name, i18n(name), TQString::null, key3, key4, receiver, slot );
#else
# define DEF( name, key3, key4, fnSlot ) \
- keys->insert( name, i18n(name), QString::null, key3, key4 )
+ keys->insert( name, i18n(name), TQString::null, key3, key4 )
# define DEF2( name, key3, key4, receiver, slot ) \
- keys->insert( name, i18n(name), QString::null, key3, key4 )
+ keys->insert( name, i18n(name), TQString::null, key3, key4 )
#endif
#define WIN KKey::QtWIN
@@ -28,7 +28,7 @@
if (kapp->authorize("lock_screen"))
{
#endif
- DEF2( I18N_NOOP("Lock Session"), ALT+CTRL+Qt::Key_L, WIN+Qt::Key_ScrollLock, KRootWm::self(), SLOT(slotLock()) );
+ DEF2( I18N_NOOP("Lock Session"), ALT+CTRL+Qt::Key_L, WIN+Qt::Key_ScrollLock, KRootWm::self(), TQT_SLOT(slotLock()) );
#ifndef NOSLOTS
}
if (kapp->authorize("logout"))
diff --git a/kdesktop/kdesktopshadowsettings.cpp b/kdesktop/kdesktopshadowsettings.cpp
index 8ebdc89a8..474d645b1 100644
--- a/kdesktop/kdesktopshadowsettings.cpp
+++ b/kdesktop/kdesktopshadowsettings.cpp
@@ -21,7 +21,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include "kdesktopshadowsettings.h"
@@ -30,7 +30,7 @@
KDesktopShadowSettings::KDesktopShadowSettings(KConfig *cfg) :
KShadowSettings(),
- m_textColor(QColor(255,255,255)),
+ m_textColor(TQColor(255,255,255)),
_UID(0L)
{
setConfig(cfg);
diff --git a/kdesktop/kdesktopshadowsettings.h b/kdesktop/kdesktopshadowsettings.h
index 7ee3b1451..f97e703ca 100644
--- a/kdesktop/kdesktopshadowsettings.h
+++ b/kdesktop/kdesktopshadowsettings.h
@@ -23,7 +23,7 @@
#ifndef __FX_DATA_DESKTOP
#define __FX_DATA_DESKTOP
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kstandarddirs.h>
#include <kconfig.h>
@@ -77,13 +77,13 @@ class KDesktopShadowSettings : public KShadowSettings
* Returns the text color as definied in the configuraiton
* @return the text color as definied in the configuraiton
*/
- QColor &textColor(){ return m_textColor; };
+ TQColor &textColor(){ return m_textColor; };
/**
* Returns the shadow color as definied in the configuraiton
* @return the shadow color as definied in the configuraiton
*/
- QColor &bgColor() { return m_bgColor; };
+ TQColor &bgColor() { return m_bgColor; };
/**
* Returns true if the shadow engine is enabled.
@@ -105,8 +105,8 @@ class KDesktopShadowSettings : public KShadowSettings
private:
KConfig *config;
- QColor m_textColor;
- QColor m_bgColor;
+ TQColor m_textColor;
+ TQColor m_bgColor;
bool m_isEnabled;
// uid of the object. Use this to determine the oportunity of a new
diff --git a/kdesktop/kdiconview.cc b/kdesktop/kdiconview.cc
index b143dc231..caa68feb9 100644
--- a/kdesktop/kdiconview.cc
+++ b/kdesktop/kdiconview.cc
@@ -48,10 +48,10 @@
#include <fixx11h.h>
-#include <qclipboard.h>
-#include <qdir.h>
-#include <qevent.h>
-#include <qregexp.h>
+#include <tqclipboard.h>
+#include <tqdir.h>
+#include <tqevent.h>
+#include <tqregexp.h>
#include <unistd.h>
@@ -64,11 +64,11 @@ extern int kdesktop_screen_number;
// -----------------------------------------------------------------------------
-QRect KDIconView::desktopRect()
+TQRect KDIconView::desktopRect()
{
return ( kdesktop_screen_number == 0 )
- ? QApplication::desktop()->geometry() // simple case, or xinerama
- : QApplication::desktop()->screenGeometry( kdesktop_screen_number ); // multi-head
+ ? TQApplication::desktop()->geometry() // simple case, or xinerama
+ : TQApplication::desktop()->screenGeometry( kdesktop_screen_number ); // multi-head
}
// -----------------------------------------------------------------------------
@@ -80,8 +80,8 @@ void KDIconView::saveIconPosition(KSimpleConfig *config, int x, int y)
config->writeEntry("Yabs", y);
// save also mentioning desktop size
- QRect desk = desktopRect();
- QString sizeStr = QString( "_%1x%2" ).arg(desk.width()).arg(desk.height());
+ TQRect desk = desktopRect();
+ TQString sizeStr = TQString( "_%1x%2" ).arg(desk.width()).arg(desk.height());
config->writeEntry("Xabs" + sizeStr, x);
config->writeEntry("Yabs" + sizeStr, y);
@@ -92,8 +92,8 @@ void KDIconView::saveIconPosition(KSimpleConfig *config, int x, int y)
void KDIconView::readIconPosition(KSimpleConfig *config, int &x, int &y)
{
// check if we have the position for the current desktop size
- QRect desk = desktopRect();
- QString sizeStr = QString( "_%1x%2" ).arg(desk.width()).arg(desk.height());
+ TQRect desk = desktopRect();
+ TQString sizeStr = TQString( "_%1x%2" ).arg(desk.width()).arg(desk.height());
x = config->readNumEntry("Xabs" + sizeStr, -99999);
@@ -112,9 +112,9 @@ void KDIconView::readIconPosition(KSimpleConfig *config, int &x, int &y)
// desktopIconsArea, the relative position do not make sense
// workaround: use desktopRect() as the allowed size
- QRect desk = desktopRect();
- QString X_w = QString("X %1").arg(desk.width() );
- QString Y_h = QString("Y %1").arg(desk.height());
+ TQRect desk = desktopRect();
+ TQString X_w = TQString("X %1").arg(desk.width() );
+ TQString Y_h = TQString("Y %1").arg(desk.height());
x = config->readNumEntry(X_w, -99999);
if ( x != -99999 ) x = config->readNumEntry("X");
@@ -129,7 +129,7 @@ void KDIconView::readIconPosition(KSimpleConfig *config, int &x, int &y)
// -----------------------------------------------------------------------------
-KDIconView::KDIconView( QWidget *parent, const char* name )
+KDIconView::KDIconView( TQWidget *parent, const char* name )
: KonqIconViewWidget( parent, name, WResizeNoErase, true ),
m_actionCollection( this, "KDIconView::m_actionCollection" ),
m_accel( 0L ),
@@ -155,33 +155,33 @@ KDIconView::KDIconView( QWidget *parent, const char* name )
// Initialise the shadow data objects...
m_shadowEngine = new KShadowEngine(new KDesktopShadowSettings(KGlobal::config()));
- connect( QApplication::clipboard(), SIGNAL(dataChanged()),
- this, SLOT(slotClipboardDataChanged()) );
+ connect( TQApplication::clipboard(), TQT_SIGNAL(dataChanged()),
+ this, TQT_SLOT(slotClipboardDataChanged()) );
setURL( desktopURL() ); // sets m_url
m_desktopDirs = KGlobal::dirs()->findDirs( "appdata", "Desktop" );
initDotDirectories();
- connect( this, SIGNAL( executed( QIconViewItem * ) ),
- SLOT( slotExecuted( QIconViewItem * ) ) );
- connect( this, SIGNAL( returnPressed( QIconViewItem * ) ),
- SLOT( slotReturnPressed( QIconViewItem * ) ) );
- connect( this, SIGNAL( mouseButtonPressed(int, QIconViewItem*, const QPoint&)),
- SLOT( slotMouseButtonPressed(int, QIconViewItem*, const QPoint&)) );
- connect( this, SIGNAL( mouseButtonClicked(int, QIconViewItem*, const QPoint&)),
- SLOT( slotMouseButtonClickedKDesktop(int, QIconViewItem*, const QPoint&)) );
- connect( this, SIGNAL( contextMenuRequested(QIconViewItem*, const QPoint&)),
- SLOT( slotContextMenuRequested(QIconViewItem*, const QPoint&)) );
+ connect( this, TQT_SIGNAL( executed( TQIconViewItem * ) ),
+ TQT_SLOT( slotExecuted( TQIconViewItem * ) ) );
+ connect( this, TQT_SIGNAL( returnPressed( TQIconViewItem * ) ),
+ TQT_SLOT( slotReturnPressed( TQIconViewItem * ) ) );
+ connect( this, TQT_SIGNAL( mouseButtonPressed(int, TQIconViewItem*, const TQPoint&)),
+ TQT_SLOT( slotMouseButtonPressed(int, TQIconViewItem*, const TQPoint&)) );
+ connect( this, TQT_SIGNAL( mouseButtonClicked(int, TQIconViewItem*, const TQPoint&)),
+ TQT_SLOT( slotMouseButtonClickedKDesktop(int, TQIconViewItem*, const TQPoint&)) );
+ connect( this, TQT_SIGNAL( contextMenuRequested(TQIconViewItem*, const TQPoint&)),
+ TQT_SLOT( slotContextMenuRequested(TQIconViewItem*, const TQPoint&)) );
- connect( this, SIGNAL( enableAction( const char * , bool ) ),
- SLOT( slotEnableAction( const char * , bool ) ) );
+ connect( this, TQT_SIGNAL( enableAction( const char * , bool ) ),
+ TQT_SLOT( slotEnableAction( const char * , bool ) ) );
// Hack: KonqIconViewWidget::slotItemRenamed is not virtual :-(
- disconnect( this, SIGNAL(itemRenamed(QIconViewItem *, const QString &)),
- this, SLOT(slotItemRenamed(QIconViewItem *, const QString &)) );
- connect( this, SIGNAL(itemRenamed(QIconViewItem *, const QString &)),
- this, SLOT(slotItemRenamed(QIconViewItem *, const QString &)) );
+ disconnect( this, TQT_SIGNAL(itemRenamed(TQIconViewItem *, const TQString &)),
+ this, TQT_SLOT(slotItemRenamed(TQIconViewItem *, const TQString &)) );
+ connect( this, TQT_SIGNAL(itemRenamed(TQIconViewItem *, const TQString &)),
+ this, TQT_SLOT(slotItemRenamed(TQIconViewItem *, const TQString &)) );
if (!m_bEditableDesktopIcons)
{
@@ -203,15 +203,15 @@ KDIconView::~KDIconView()
void KDIconView::initDotDirectories()
{
- QStringList dirs = m_desktopDirs;
+ TQStringList dirs = m_desktopDirs;
KURL u = desktopURL();
if (u.isLocalFile())
dirs.prepend(u.path());
- QString prefix = iconPositionGroupPrefix();
- QString dotFileName = locateLocal("appdata", "IconPositions");
+ TQString prefix = iconPositionGroupPrefix();
+ TQString dotFileName = locateLocal("appdata", "IconPositions");
if (kdesktop_screen_number != 0)
- dotFileName += "_Desktop" + QString::number(kdesktop_screen_number);
+ dotFileName += "_Desktop" + TQString::number(kdesktop_screen_number);
if (m_dotDirectory && !m_bEditableDesktopIcons)
m_dotDirectory->rollback(false); // Don't save positions
@@ -222,29 +222,29 @@ void KDIconView::initDotDirectories()
// If we don't allow editable desktop icons, empty m_dotDirectory
if (!m_bEditableDesktopIcons)
{
- QStringList groups = m_dotDirectory->groupList();
- QStringList::ConstIterator gIt = groups.begin();
- QStringList::ConstIterator gEnd = groups.end();
+ TQStringList groups = m_dotDirectory->groupList();
+ TQStringList::ConstIterator gIt = groups.begin();
+ TQStringList::ConstIterator gEnd = groups.end();
for (; gIt != gEnd; ++gIt )
{
m_dotDirectory->deleteGroup(*gIt, true);
}
}
- QRect desk = desktopRect();
- QString X_w = QString( "X %1" ).arg( desk.width() );
- QString Y_h = QString( "Y %1" ).arg( desk.height() );
- for ( QStringList::ConstIterator it = dirs.begin() ; it != dirs.end() ; ++it )
+ TQRect desk = desktopRect();
+ TQString X_w = TQString( "X %1" ).arg( desk.width() );
+ TQString Y_h = TQString( "Y %1" ).arg( desk.height() );
+ for ( TQStringList::ConstIterator it = dirs.begin() ; it != dirs.end() ; ++it )
{
kdDebug(1204) << "KDIconView::initDotDirectories found dir " << *it << endl;
- QString dotFileName = *it + "/.directory";
+ TQString dotFileName = *it + "/.directory";
- if (QFile::exists(dotFileName))
+ if (TQFile::exists(dotFileName))
{
KSimpleConfig dotDir(dotFileName, true); // Read only
- QStringList groups = dotDir.groupList();
- QStringList::ConstIterator gIt = groups.begin();
- QStringList::ConstIterator gEnd = groups.end();
+ TQStringList groups = dotDir.groupList();
+ TQStringList::ConstIterator gIt = groups.begin();
+ TQStringList::ConstIterator gEnd = groups.end();
for (; gIt != gEnd; ++gIt )
{
if ( (*gIt).startsWith(prefix) )
@@ -284,7 +284,7 @@ void KDIconView::initConfig( bool init )
setMaySetWallpaper(!config->isImmutable() && !KGlobal::dirs()->isRestrictedResource("wallpaper"));
m_bShowDot = KDesktopSettings::showHidden();
m_bVertAlign = KDesktopSettings::vertAlign();
- QStringList oldPreview = previewSettings();
+ TQStringList oldPreview = previewSettings();
setPreviewSettings( KDesktopSettings::preview() );
// read arrange configuration
@@ -292,13 +292,13 @@ void KDIconView::initConfig( bool init )
m_bSortDirectoriesFirst = KDesktopSettings::directoriesFirst();
m_itemsAlwaysFirst = KDesktopSettings::alwaysFirstItems(); // Distributor plug-in
- if (KProtocolInfo::isKnownProtocol(QString::fromLatin1("media")))
+ if (KProtocolInfo::isKnownProtocol(TQString::fromLatin1("media")))
m_enableMedia=KDesktopSettings::mediaEnabled();
else
m_enableMedia=false;
- QString tmpList=KDesktopSettings::exclude();
+ TQString tmpList=KDesktopSettings::exclude();
kdDebug(1204)<<"m_excludeList"<<tmpList<<endl;
- m_excludedMedia=QStringList::split(",",tmpList,false);
+ m_excludedMedia=TQStringList::split(",",tmpList,false);
kdDebug(1204)<<" m_excludeList / item count:" <<m_excludedMedia.count()<<endl;
if ( m_dirLister ) // only when called while running - not on first startup
{
@@ -316,7 +316,7 @@ void KDIconView::initConfig( bool init )
if ( previewSettings().count() )
{
- for ( QStringList::ConstIterator it = oldPreview.begin(); it != oldPreview.end(); ++it)
+ for ( TQStringList::ConstIterator it = oldPreview.begin(); it != oldPreview.end(); ++it)
if ( !previewSettings().contains( *it ) ){
kdDebug(1204) << "Disabling preview for " << *it << endl;
if ( *it == "audio/" )
@@ -331,7 +331,7 @@ void KDIconView::initConfig( bool init )
}
}
}
- startImagePreview( QStringList(), true );
+ startImagePreview( TQStringList(), true );
}
else
{
@@ -357,16 +357,16 @@ void KDIconView::start()
m_bNeedSave = false;
- connect( m_dirLister, SIGNAL( clear() ), this, SLOT( slotClear() ) );
- connect( m_dirLister, SIGNAL( started(const KURL&) ),
- this, SLOT( slotStarted(const KURL&) ) );
- connect( m_dirLister, SIGNAL( completed() ), this, SLOT( slotCompleted() ) );
- connect( m_dirLister, SIGNAL( newItems( const KFileItemList & ) ),
- this, SLOT( slotNewItems( const KFileItemList & ) ) );
- connect( m_dirLister, SIGNAL( deleteItem( KFileItem * ) ),
- this, SLOT( slotDeleteItem( KFileItem * ) ) );
- connect( m_dirLister, SIGNAL( refreshItems( const KFileItemList & ) ),
- this, SLOT( slotRefreshItems( const KFileItemList & ) ) );
+ connect( m_dirLister, TQT_SIGNAL( clear() ), this, TQT_SLOT( slotClear() ) );
+ connect( m_dirLister, TQT_SIGNAL( started(const KURL&) ),
+ this, TQT_SLOT( slotStarted(const KURL&) ) );
+ connect( m_dirLister, TQT_SIGNAL( completed() ), this, TQT_SLOT( slotCompleted() ) );
+ connect( m_dirLister, TQT_SIGNAL( newItems( const KFileItemList & ) ),
+ this, TQT_SLOT( slotNewItems( const KFileItemList & ) ) );
+ connect( m_dirLister, TQT_SIGNAL( deleteItem( KFileItem * ) ),
+ this, TQT_SLOT( slotDeleteItem( KFileItem * ) ) );
+ connect( m_dirLister, TQT_SIGNAL( refreshItems( const KFileItemList & ) ),
+ this, TQT_SLOT( slotRefreshItems( const KFileItemList & ) ) );
// Start the directory lister !
m_dirLister->setShowingDotFiles( m_bShowDot );
@@ -414,35 +414,35 @@ void KDIconView::createActions()
{
if (m_bEditableDesktopIcons)
{
- KAction *undo = KStdAction::undo( KonqUndoManager::self(), SLOT( undo() ), &m_actionCollection, "undo" );
- connect( KonqUndoManager::self(), SIGNAL( undoAvailable( bool ) ),
- undo, SLOT( setEnabled( bool ) ) );
- connect( KonqUndoManager::self(), SIGNAL( undoTextChanged( const QString & ) ),
- undo, SLOT( setText( const QString & ) ) );
+ KAction *undo = KStdAction::undo( KonqUndoManager::self(), TQT_SLOT( undo() ), &m_actionCollection, "undo" );
+ connect( KonqUndoManager::self(), TQT_SIGNAL( undoAvailable( bool ) ),
+ undo, TQT_SLOT( setEnabled( bool ) ) );
+ connect( KonqUndoManager::self(), TQT_SIGNAL( undoTextChanged( const TQString & ) ),
+ undo, TQT_SLOT( setText( const TQString & ) ) );
undo->setEnabled( KonqUndoManager::self()->undoAvailable() );
- KAction* paCut = KStdAction::cut( this, SLOT( slotCut() ), &m_actionCollection, "cut" );
+ KAction* paCut = KStdAction::cut( this, TQT_SLOT( slotCut() ), &m_actionCollection, "cut" );
KShortcut cutShortCut = paCut->shortcut();
cutShortCut.remove( KKey( SHIFT + Key_Delete ) ); // used for deleting files
paCut->setShortcut( cutShortCut );
- KStdAction::copy( this, SLOT( slotCopy() ), &m_actionCollection, "copy" );
- KStdAction::paste( this, SLOT( slotPaste() ), &m_actionCollection, "paste" );
- KAction *pasteTo = KStdAction::paste( this, SLOT( slotPopupPasteTo() ), &m_actionCollection, "pasteto" );
+ KStdAction::copy( this, TQT_SLOT( slotCopy() ), &m_actionCollection, "copy" );
+ KStdAction::paste( this, TQT_SLOT( slotPaste() ), &m_actionCollection, "paste" );
+ KAction *pasteTo = KStdAction::paste( this, TQT_SLOT( slotPopupPasteTo() ), &m_actionCollection, "pasteto" );
pasteTo->setEnabled( false ); // only enabled during popupMenu()
KShortcut reloadShortcut = KStdAccel::shortcut(KStdAccel::Reload);
- new KAction( i18n( "&Reload" ), "reload", reloadShortcut, this, SLOT( refreshIcons() ), &m_actionCollection, "reload" );
+ new KAction( i18n( "&Reload" ), "reload", reloadShortcut, this, TQT_SLOT( refreshIcons() ), &m_actionCollection, "reload" );
- (void) new KAction( i18n( "&Rename" ), /*"editrename",*/ Key_F2, this, SLOT( renameSelectedItem() ), &m_actionCollection, "rename" );
- (void) new KAction( i18n( "&Properties" ), ALT+Key_Return, this, SLOT( slotProperties() ), &m_actionCollection, "properties" );
+ (void) new KAction( i18n( "&Rename" ), /*"editrename",*/ Key_F2, this, TQT_SLOT( renameSelectedItem() ), &m_actionCollection, "rename" );
+ (void) new KAction( i18n( "&Properties" ), ALT+Key_Return, this, TQT_SLOT( slotProperties() ), &m_actionCollection, "properties" );
KAction* trash = new KAction( i18n( "&Move to Trash" ), "edittrash", Key_Delete, &m_actionCollection, "trash" );
- connect( trash, SIGNAL( activated( KAction::ActivationReason, Qt::ButtonState ) ),
- this, SLOT( slotTrashActivated( KAction::ActivationReason, Qt::ButtonState ) ) );
+ connect( trash, TQT_SIGNAL( activated( KAction::ActivationReason, Qt::ButtonState ) ),
+ this, TQT_SLOT( slotTrashActivated( KAction::ActivationReason, Qt::ButtonState ) ) );
KConfig config("kdeglobals", true, false);
config.setGroup( "KDE" );
- (void) new KAction( i18n( "&Delete" ), "editdelete", SHIFT+Key_Delete, this, SLOT( slotDelete() ), &m_actionCollection, "del" );
+ (void) new KAction( i18n( "&Delete" ), "editdelete", SHIFT+Key_Delete, this, TQT_SLOT( slotDelete() ), &m_actionCollection, "del" );
// Initial state of the actions (cut/copy/paste/...)
slotSelectionChanged();
@@ -464,10 +464,10 @@ void KDIconView::rearrangeIcons()
sort(); // calls arrangeItemsInGrid() which does not honor iconArea()
if ( m_autoAlign )
- lineupIcons( m_bVertAlign ? QIconView::TopToBottom : QIconView::LeftToRight ); // also saves position
+ lineupIcons( m_bVertAlign ? TQIconView::TopToBottom : TQIconView::LeftToRight ); // also saves position
else
{
- KonqIconViewWidget::lineupIcons(m_bVertAlign ? QIconView::TopToBottom : QIconView::LeftToRight);
+ KonqIconViewWidget::lineupIcons(m_bVertAlign ? TQIconView::TopToBottom : TQIconView::LeftToRight);
saveIconPositions();
}
}
@@ -486,8 +486,8 @@ void KDIconView::setAutoAlign( bool b )
// Auto line-up icons
if ( b ) {
if (!KRootWm::self()->startup) lineupIcons(); else KRootWm::self()->startup = false;
- connect( this, SIGNAL( iconMoved() ),
- this, SLOT( lineupIcons() ) );
+ connect( this, TQT_SIGNAL( iconMoved() ),
+ this, TQT_SLOT( lineupIcons() ) );
}
else {
// change maxItemWidth, because when grid-align was active, it changed this for the grid
@@ -495,8 +495,8 @@ void KDIconView::setAutoAlign( bool b )
setMaxItemWidth( QMAX( QMAX( sz, previewIconSize( iconSize() ) ), KonqFMSettings::settings()->iconTextWidth() ) );
setFont( font() ); // Force calcRect()
- disconnect( this, SIGNAL( iconMoved() ),
- this, SLOT( lineupIcons() ) );
+ disconnect( this, TQT_SIGNAL( iconMoved() ),
+ this, TQT_SLOT( lineupIcons() ) );
}
}
@@ -510,7 +510,7 @@ void KDIconView::startDirLister()
// Gather the list of directories to merge into the desktop
// (the main URL is desktopURL(), no need for it in the m_mergeDirs list)
m_mergeDirs.clear();
- for ( QStringList::ConstIterator it = m_desktopDirs.begin() ; it != m_desktopDirs.end() ; ++it )
+ for ( TQStringList::ConstIterator it = m_desktopDirs.begin() ; it != m_desktopDirs.end() ; ++it )
{
kdDebug(1204) << "KDIconView::desktopResized found merge dir " << *it << endl;
KURL u;
@@ -523,9 +523,9 @@ void KDIconView::startDirLister()
configureMedia();
}
-void KDIconView::lineupIcons(QIconView::Arrangement align)
+void KDIconView::lineupIcons(TQIconView::Arrangement align)
{
- m_bVertAlign = ( align == QIconView::TopToBottom );
+ m_bVertAlign = ( align == TQIconView::TopToBottom );
setArrangement( m_bVertAlign ? TopToBottom : LeftToRight );
if ( m_autoAlign )
@@ -541,11 +541,11 @@ void KDIconView::lineupIcons(QIconView::Arrangement align)
}
// Only used for DCOP
-QStringList KDIconView::selectedURLs()
+TQStringList KDIconView::selectedURLs()
{
- QStringList seq;
+ TQStringList seq;
- QIconViewItem *it = firstItem();
+ TQIconViewItem *it = firstItem();
for (; it; it = it->nextItem() )
if ( it->isSelected() ) {
KFileItem *fItem = ((KFileIVI *)it)->item();
@@ -573,10 +573,10 @@ void KDIconView::recheckDesktopURL()
KURL KDIconView::desktopURL()
{
// Support both paths and URLs
- QString desktopPath = KGlobalSettings::desktopPath();
+ TQString desktopPath = KGlobalSettings::desktopPath();
if (kdesktop_screen_number != 0) {
- QString dn = "Desktop";
- dn += QString::number(kdesktop_screen_number);
+ TQString dn = "Desktop";
+ dn += TQString::number(kdesktop_screen_number);
desktopPath.replace("Desktop", dn);
}
@@ -589,21 +589,21 @@ KURL KDIconView::desktopURL()
Q_ASSERT( desktopURL.isValid() );
if ( !desktopURL.isValid() ) { // should never happen
KURL u;
- u.setPath( QDir::homeDirPath() + "/" + "Desktop" + "/" );
+ u.setPath( TQDir::homeDirPath() + "/" + "Desktop" + "/" );
return u;
}
return desktopURL;
}
-void KDIconView::contentsMousePressEvent( QMouseEvent *e )
+void KDIconView::contentsMousePressEvent( TQMouseEvent *e )
{
if (!m_dirLister) return;
//kdDebug(1204) << "KDIconView::contentsMousePressEvent" << endl;
- // QIconView, as of Qt 2.2, doesn't emit mouseButtonPressed for LMB on background
+ // TQIconView, as of Qt 2.2, doesn't emit mouseButtonPressed for LMB on background
if ( e->button() == LeftButton && KRootWm::self()->hasLeftButtonMenu() )
{
- QIconViewItem *item = findItem( e->pos() );
+ TQIconViewItem *item = findItem( e->pos() );
if ( !item )
{
// Left click menu
@@ -614,17 +614,17 @@ void KDIconView::contentsMousePressEvent( QMouseEvent *e )
KonqIconViewWidget::contentsMousePressEvent( e );
}
-void KDIconView::mousePressEvent( QMouseEvent *e )
+void KDIconView::mousePressEvent( TQMouseEvent *e )
{
KRootWm::self()->mousePressed( e->globalPos(), e->button() );
}
-void KDIconView::wheelEvent( QWheelEvent* e )
+void KDIconView::wheelEvent( TQWheelEvent* e )
{
if (!m_dirLister) return;
//kdDebug(1204) << "KDIconView::wheelEvent" << endl;
- QIconViewItem *item = findItem( e->pos() );
+ TQIconViewItem *item = findItem( e->pos() );
if ( !item )
{
emit wheelRolled( e->delta() );
@@ -644,7 +644,7 @@ void KDIconView::slotProperties()
(void) new KPropertiesDialog( selectedFiles );
}
-void KDIconView::slotContextMenuRequested(QIconViewItem *_item, const QPoint& _global)
+void KDIconView::slotContextMenuRequested(TQIconViewItem *_item, const TQPoint& _global)
{
if (_item)
{
@@ -653,16 +653,16 @@ void KDIconView::slotContextMenuRequested(QIconViewItem *_item, const QPoint& _g
}
}
-void KDIconView::slotMouseButtonPressed(int _button, QIconViewItem* _item, const QPoint& _global)
+void KDIconView::slotMouseButtonPressed(int _button, TQIconViewItem* _item, const TQPoint& _global)
{
//kdDebug(1204) << "KDIconView::slotMouseButtonPressed" << endl;
if (!m_dirLister) return;
- m_lastDeletedIconPos = QPoint(); // user action -> not renaming an icon
+ m_lastDeletedIconPos = TQPoint(); // user action -> not renaming an icon
if(!_item)
KRootWm::self()->mousePressed( _global, _button );
}
-void KDIconView::slotMouseButtonClickedKDesktop(int _button, QIconViewItem* _item, const QPoint&)
+void KDIconView::slotMouseButtonClickedKDesktop(int _button, TQIconViewItem* _item, const TQPoint&)
{
if (!m_dirLister) return;
//kdDebug(1204) << "KDIconView::slotMouseButtonClickedKDesktop" << endl;
@@ -672,7 +672,7 @@ void KDIconView::slotMouseButtonClickedKDesktop(int _button, QIconViewItem* _ite
// -----------------------------------------------------------------------------
-void KDIconView::slotReturnPressed( QIconViewItem *item )
+void KDIconView::slotReturnPressed( TQIconViewItem *item )
{
if (item && item->isSelected())
slotExecuted(item);
@@ -680,10 +680,10 @@ void KDIconView::slotReturnPressed( QIconViewItem *item )
// -----------------------------------------------------------------------------
-void KDIconView::slotExecuted( QIconViewItem *item )
+void KDIconView::slotExecuted( TQIconViewItem *item )
{
kapp->propagateSessionManager();
- m_lastDeletedIconPos = QPoint(); // user action -> not renaming an icon
+ m_lastDeletedIconPos = TQPoint(); // user action -> not renaming an icon
if (item) {
visualActivate(item);
((KFileIVI*)item)->returnPressed();
@@ -735,11 +735,11 @@ bool KDIconView::deleteGlobalDesktopFiles()
if (!desktop_URL.isLocalFile())
return false; // Dunno how to do this.
- QString desktopPath = desktop_URL.path();
+ TQString desktopPath = desktop_URL.path();
bool itemsLeft = false;
- QIconViewItem *it = 0;
- QIconViewItem *nextIt = firstItem();
+ TQIconViewItem *it = 0;
+ TQIconViewItem *nextIt = firstItem();
for (; (it = nextIt); )
{
nextIt = it->nextItem();
@@ -790,7 +790,7 @@ void KDIconView::slotDelete()
// This method is called when right-clicking over one or more items
// Not to be confused with the global popup-menu, KRootWm, when doing RMB on the desktop
-void KDIconView::popupMenu( const QPoint &_global, const KFileItemList& _items )
+void KDIconView::popupMenu( const TQPoint &_global, const KFileItemList& _items )
{
if (!kapp->authorize("action/kdesktop_rmb")) return;
if (!m_dirLister) return;
@@ -838,7 +838,7 @@ void KDIconView::slotNewMenuActivated()
void KDIconView::slotEnableAction( const char * name, bool enabled )
{
//kdDebug(1204) << "slotEnableAction " << name << " enabled=" << enabled << endl;
- QCString sName( name );
+ TQCString sName( name );
// No such actions here... konqpopupmenu provides them.
if ( sName == "properties" || sName == "editMimeType" )
return;
@@ -861,21 +861,21 @@ bool KDIconView::isDesktopFile( KFileItem * _item ) const
if ( !S_ISREG( _item->mode() ) )
return false;
- QString t( _item->url().path() );
+ TQString t( _item->url().path() );
// only if readable
- if ( access( QFile::encodeName(t), R_OK ) != 0 )
+ if ( access( TQFile::encodeName(t), R_OK ) != 0 )
return false;
// return true if desktop file
- return ( _item->mimetype() == QString::fromLatin1("application/x-desktop") );
+ return ( _item->mimetype() == TQString::fromLatin1("application/x-desktop") );
}
-QString KDIconView::stripDesktopExtension( const QString & text )
+TQString KDIconView::stripDesktopExtension( const TQString & text )
{
- if (text.right(7) == QString::fromLatin1(".kdelnk"))
+ if (text.right(7) == TQString::fromLatin1(".kdelnk"))
return text.left(text.length() - 7);
- else if (text.right(8) == QString::fromLatin1(".desktop"))
+ else if (text.right(8) == TQString::fromLatin1(".desktop"))
return text.left(text.length() - 8);
return text;
}
@@ -883,7 +883,7 @@ QString KDIconView::stripDesktopExtension( const QString & text )
bool KDIconView::makeFriendlyText( KFileIVI *fileIVI )
{
KFileItem *item = fileIVI->item();
- QString desktopFile;
+ TQString desktopFile;
if ( item->isDir() && item->isLocalFile() )
{
KURL u( item->url() );
@@ -908,7 +908,7 @@ bool KDIconView::makeFriendlyText( KFileIVI *fileIVI )
if (cfg.readBoolEntry( "NoDisplay", false ))
return false;
- QStringList tmpList;
+ TQStringList tmpList;
if (cfg.hasKey("OnlyShowIn"))
{
if (!cfg.readListEntry("OnlyShowIn", ';').contains("KDE"))
@@ -925,7 +925,7 @@ bool KDIconView::makeFriendlyText( KFileIVI *fileIVI )
return false;
}
- QString name = cfg.readEntry("Name");
+ TQString name = cfg.readEntry("Name");
if ( !name.isEmpty() )
fileIVI->setText( name );
else
@@ -950,10 +950,10 @@ void KDIconView::slotNewItems( const KFileItemList & entries )
// delay updates until all new items have been created
setUpdatesEnabled( false );
- QRect area = iconArea();
- setIconArea( QRect( 0, 0, -1, -1 ) );
+ TQRect area = iconArea();
+ setIconArea( TQRect( 0, 0, -1, -1 ) );
- QString desktopPath;
+ TQString desktopPath;
KURL desktop_URL = desktopURL();
if (desktop_URL.isLocalFile())
desktopPath = desktop_URL.path();
@@ -967,11 +967,11 @@ void KDIconView::slotNewItems( const KFileItemList & entries )
KURL url = it.current()->url();
if (!desktopPath.isEmpty() && url.isLocalFile() && !url.path().startsWith(desktopPath))
{
- QString fileName = url.fileName();
- if (QFile::exists(desktopPath + fileName))
+ TQString fileName = url.fileName();
+ if (TQFile::exists(desktopPath + fileName))
continue; // Don't duplicate entry
- QString mostLocal = locate("appdata", "Desktop/"+fileName);
+ TQString mostLocal = locate("appdata", "Desktop/"+fileName);
if (!mostLocal.isEmpty() && (mostLocal != url.path()))
continue; // Don't duplicate entry
}
@@ -992,13 +992,13 @@ void KDIconView::slotNewItems( const KFileItemList & entries )
{
kdDebug(1214) << "slotNewItems : using popupmenu position " << m_nextItemPos.x() << "," << m_nextItemPos.y() << endl;
fileIVI->move( m_nextItemPos.x(), m_nextItemPos.y() );
- m_nextItemPos = QPoint();
+ m_nextItemPos = TQPoint();
}
else
{
kdDebug(1214) << "slotNewItems : trying to read position from .directory file"<<endl;
- QString group = iconPositionGroupPrefix();
- QString filename = url.fileName();
+ TQString group = iconPositionGroupPrefix();
+ TQString filename = url.fileName();
if ( filename.endsWith(".part") && !m_dotDirectory->hasGroup( group + filename ) )
filename = filename.left( filename.length() - 5 );
group.append( filename );
@@ -1012,9 +1012,9 @@ void KDIconView::slotNewItems( const KFileItemList & entries )
kdDebug(1214)<<"slotNewItems() x: "<<x<<" y: "<<y<<endl;
- QRect oldPos = fileIVI->rect();
+ TQRect oldPos = fileIVI->rect();
fileIVI->move( x, y );
- if ( !firstRun && !isFreePosition( fileIVI ) ) // if we can't put it there, then let QIconView decide
+ if ( !firstRun && !isFreePosition( fileIVI ) ) // if we can't put it there, then let TQIconView decide
{
kdDebug(1214)<<"slotNewItems() pos was not free :-("<<endl;
fileIVI->move( oldPos.x(), oldPos.y() );
@@ -1058,7 +1058,7 @@ void KDIconView::slotRefreshItems( const KFileItemList & entries )
for (; rit.current(); ++rit)
{
bool found = false;
- QIconViewItem *it = firstItem();
+ TQIconViewItem *it = firstItem();
for ( ; it ; it = it->nextItem() )
{
KFileIVI * fileIVI = static_cast<KFileIVI *>(it);
@@ -1088,7 +1088,7 @@ void KDIconView::slotRefreshItems( const KFileItemList & entries )
}
if ( bNeedPreviewJob && previewSettings().count() )
{
- startImagePreview( QStringList(), false );
+ startImagePreview( TQStringList(), false );
}
else
{
@@ -1102,7 +1102,7 @@ void KDIconView::slotRefreshItems( const KFileItemList & entries )
void KDIconView::refreshIcons()
{
- QIconViewItem *it = firstItem();
+ TQIconViewItem *it = firstItem();
for ( ; it ; it = it->nextItem() )
{
KFileIVI * fileIVI = static_cast<KFileIVI *>(it);
@@ -1130,7 +1130,7 @@ void KDIconView::FilesRemoved( const KURL::List & fileList )
void KDIconView::refreshTrashIcon()
{
- QIconViewItem *it = firstItem();
+ TQIconViewItem *it = firstItem();
for ( ; it ; it = it->nextItem() )
{
KFileIVI * fileIVI = static_cast<KFileIVI *>(it);
@@ -1152,14 +1152,14 @@ void KDIconView::slotDeleteItem( KFileItem * _fileitem )
{
kdDebug(1204) << "KDIconView::slotDeleteItems" << endl;
// we need to find out the KFileIVI containing the fileitem
- QIconViewItem *it = firstItem();
+ TQIconViewItem *it = firstItem();
while ( it ) {
KFileIVI * fileIVI = static_cast<KFileIVI *>(it);
if ( fileIVI->item() == _fileitem ) { // compare the pointers
// Delete this item.
//kdDebug(1204) << fileIVI->text() << endl;
- QString group = iconPositionGroupPrefix();
+ TQString group = iconPositionGroupPrefix();
group.append( fileIVI->item()->url().fileName() );
if ( m_dotDirectory->hasGroup( group ) )
m_dotDirectory->deleteGroup( group );
@@ -1187,7 +1187,7 @@ void KDIconView::slotCompleted()
setRootItem( m_dirLister->rootItem() );
if ( previewSettings().count() )
- startImagePreview( QStringList(), true );
+ startImagePreview( TQStringList(), true );
else
{
stopImagePreview();
@@ -1221,14 +1221,14 @@ void KDIconView::slotClipboardDataChanged()
// This is very related to KonqDirPart::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 );
disableIcons( lst );
- QString actionText = KIO::pasteActionText();
+ TQString actionText = KIO::pasteActionText();
bool paste = !actionText.isEmpty();
if ( paste ) {
KAction* pasteAction = m_actionCollection.action( "paste" );
@@ -1238,7 +1238,7 @@ void KDIconView::slotClipboardDataChanged()
slotEnableAction( "paste", paste );
}
-void KDIconView::renameDesktopFile(const QString &path, const QString &name)
+void KDIconView::renameDesktopFile(const TQString &path, const TQString &name)
{
KDesktopFile cfg( path, false );
@@ -1255,10 +1255,10 @@ void KDIconView::renameDesktopFile(const QString &path, const QString &name)
cfg.sync();
}
-void KDIconView::slotItemRenamed(QIconViewItem* _item, const QString &name)
+void KDIconView::slotItemRenamed(TQIconViewItem* _item, const TQString &name)
{
kdDebug(1204) << "KDIconView::slotItemRenamed(item, \"" << name << "\" )" << endl;
- QString newName(name);
+ TQString newName(name);
if ( _item)
{
KFileIVI *fileItem = static_cast< KFileIVI* >( _item );
@@ -1266,7 +1266,7 @@ void KDIconView::slotItemRenamed(QIconViewItem* _item, const QString &name)
m_lastDeletedIconPos = fileItem->pos();
if ( fileItem->item() && !fileItem->item()->isLink() )
{
- QString desktopFile( fileItem->item()->url().path() );
+ TQString desktopFile( fileItem->item()->url().path() );
if (!desktopFile.isEmpty())
{
// first and foremost, we make sure that this is a .desktop file
@@ -1285,7 +1285,7 @@ void KDIconView::slotItemRenamed(QIconViewItem* _item, const QString &name)
bDesktopFile = true;
}
- if (QFile(desktopFile).exists() && bDesktopFile)
+ if (TQFile(desktopFile).exists() && bDesktopFile)
{
renameDesktopFile(desktopFile, name);
return;
@@ -1296,7 +1296,7 @@ void KDIconView::slotItemRenamed(QIconViewItem* _item, const QString &name)
KonqIconViewWidget::slotItemRenamed(_item, newName);
}
-void KDIconView::slotAboutToCreate(const QPoint &pos, const QValueList<KIO::CopyInfo> &files)
+void KDIconView::slotAboutToCreate(const TQPoint &pos, const TQValueList<KIO::CopyInfo> &files)
{
if (pos.isNull())
return;
@@ -1307,9 +1307,9 @@ void KDIconView::slotAboutToCreate(const QPoint &pos, const QValueList<KIO::Copy
m_lastDropPos = pos;
}
- QString dir = url().path(-1); // Strip trailing /
+ TQString dir = url().path(-1); // Strip trailing /
- QValueList<KIO::CopyInfo>::ConstIterator it = files.begin();
+ TQValueList<KIO::CopyInfo>::ConstIterator it = files.begin();
int gridX = gridXValue();
int gridY = 120; // 120 pixels should be enough for everyone (tm)
@@ -1323,9 +1323,9 @@ void KDIconView::slotAboutToCreate(const QPoint &pos, const QValueList<KIO::Copy
int dX = m_lastDropPos.x() - m_dropPos.x();
int dY = m_lastDropPos.y() - m_dropPos.y();
if ((QABS(dX) > QABS(dY)) || (m_lastDropPos.x() + 2*gridX > width()))
- m_lastDropPos = QPoint(m_dropPos.x(), m_lastDropPos.y() + gridY);
+ m_lastDropPos = TQPoint(m_dropPos.x(), m_lastDropPos.y() + gridY);
else
- m_lastDropPos = QPoint(m_lastDropPos.x() + gridX, m_lastDropPos.y());
+ m_lastDropPos = TQPoint(m_lastDropPos.x() + gridX, m_lastDropPos.y());
}
}
m_dotDirectory->sync();
@@ -1333,27 +1333,27 @@ void KDIconView::slotAboutToCreate(const QPoint &pos, const QValueList<KIO::Copy
// -----------------------------------------------------------------------------
-void KDIconView::showEvent( QShowEvent *e )
+void KDIconView::showEvent( TQShowEvent *e )
{
- //HACK to avoid QIconView calling arrangeItemsInGrid (Simon)
- //EVEN MORE HACK: unfortunately, QScrollView has no concept of
+ //HACK to avoid TQIconView calling arrangeItemsInGrid (Simon)
+ //EVEN MORE HACK: unfortunately, TQScrollView has no concept of
//TopToBottom, therefore, it always adds LeftToRight. So, if any of
- //the icons have a setting, we'll use QScrollView.. but otherwise,
+ //the icons have a setting, we'll use TQScrollView.. but otherwise,
//we use the iconview
//kdDebug(1204)<<"showEvent() m_hasExistingPos: "<<(m_hasExistingPos?(int)1:(int)0)<<endl;
if (m_hasExistingPos)
- QScrollView::showEvent( e );
+ TQScrollView::showEvent( e );
else
KIconView::showEvent( e );
}
-void KDIconView::contentsDropEvent( QDropEvent * e )
+void KDIconView::contentsDropEvent( TQDropEvent * e )
{
- kdDebug(1204)<<"void KDIconView::contentsDropEvent( QDropEvent * e )\n";
+ kdDebug(1204)<<"void KDIconView::contentsDropEvent( TQDropEvent * e )\n";
// mind: if it's a filedrag which itself is an image, libkonq is called. There's a popup for drops as well
// that contains the same line "Set as Wallpaper" in void KonqOperations::asyncDrop
bool isColorDrag = KColorDrag::canDecode(e);
- bool isImageDrag = QImageDrag::canDecode(e);
+ bool isImageDrag = TQImageDrag::canDecode(e);
bool isUrlDrag = KURLDrag::canDecode(e);
bool isImmutable = KGlobal::config()->isImmutable();
@@ -1383,13 +1383,13 @@ void KDIconView::contentsDropEvent( QDropEvent * e )
// Check if any items have been moved outside the desktop area.
// If we find any, move them right back in there. (#40418)
- QRect desk = desktopRect();
+ TQRect desk = desktopRect();
bool adjustedAnyItems = false;
- for( QIconViewItem *item = firstItem(); item; item = item->nextItem() )
+ for( TQIconViewItem *item = firstItem(); item; item = item->nextItem() )
{
if( !desk.contains( item->rect(), true ))
{
- QRect r = item->rect();
+ TQRect r = item->rect();
if( r.top() < 0 )
r.moveTop( 0 );
@@ -1412,7 +1412,7 @@ void KDIconView::contentsDropEvent( QDropEvent * e )
viewport()->update();
}
- if (QIconDrag::canDecode(e)) {
+ if (TQIconDrag::canDecode(e)) {
emit iconMoved();
if ( !m_autoAlign ) // if autoAlign, positions were saved in lineupIcons
saveIconPositions();
@@ -1420,18 +1420,18 @@ void KDIconView::contentsDropEvent( QDropEvent * e )
}
// don't scroll when someone uses his nifty mouse wheel
-void KDIconView::viewportWheelEvent( QWheelEvent * e )
+void KDIconView::viewportWheelEvent( TQWheelEvent * e )
{
e->accept();
}
-void KDIconView::updateWorkArea( const QRect &wr )
+void KDIconView::updateWorkArea( const TQRect &wr )
{
m_gotIconsArea = true; // now we have it!
if ( iconArea() == wr ) return; // nothing changed; avoid repaint/saveIconPosition ...
- QRect oldArea = iconArea();
+ TQRect oldArea = iconArea();
setIconArea( wr );
kdDebug(1204) << "KDIconView::updateWorkArea wr: " << wr.x() << "," << wr.y()
@@ -1443,7 +1443,7 @@ void KDIconView::updateWorkArea( const QRect &wr )
int dummy = 0; //lineupIcons();
else {
bool needRepaint = false;
- QIconViewItem* item;
+ TQIconViewItem* item;
int dx, dy;
dx = wr.left() - oldArea.left();
@@ -1469,7 +1469,7 @@ void KDIconView::updateWorkArea( const QRect &wr )
}
for ( item = firstItem(); item; item = item->nextItem() ) {
- QRect r( item->rect() );
+ TQRect r( item->rect() );
int dx = 0, dy = 0;
if ( r.bottom() > wr.bottom() )
dy = wr.bottom() - r.bottom() - 1;
@@ -1491,18 +1491,18 @@ void KDIconView::updateWorkArea( const QRect &wr )
void KDIconView::setupSortKeys()
{
// can't use sorting in KFileIVI::setKey()
- setProperty("sortDirectoriesFirst", QVariant(false, 0));
+ setProperty("sortDirectoriesFirst", TQVariant(false, 0));
- for (QIconViewItem *it = firstItem(); it; it = it->nextItem())
+ for (TQIconViewItem *it = firstItem(); it; it = it->nextItem())
{
- QString strKey;
+ TQString strKey;
if (!m_itemsAlwaysFirst.isEmpty())
{
- QString strFileName = static_cast<KFileIVI *>( it )->item()->url().fileName();
+ TQString strFileName = static_cast<KFileIVI *>( it )->item()->url().fileName();
int nFind = m_itemsAlwaysFirst.findIndex(strFileName);
if (nFind >= 0)
- strKey = "0" + QString::number(nFind);
+ strKey = "0" + TQString::number(nFind);
}
if (strKey.isEmpty())
@@ -1523,7 +1523,7 @@ void KDIconView::setupSortKeys()
strKey = static_cast<KFileIVI *>( it )->item()->mimetype() + '~' + it->text().lower();
break;
case Date:
- QDateTime dayt;
+ TQDateTime dayt;
dayt.setTime_t( static_cast<KFileIVI *>( it )->
item()->time( KIO::UDS_MODIFICATION_TIME ) );
strKey = dayt.toString( "yyyyMMddhhmmss" );
@@ -1545,10 +1545,10 @@ void KDIconView::setupSortKeys()
}
}
-bool KDIconView::isFreePosition( const QIconViewItem *item ) const
+bool KDIconView::isFreePosition( const TQIconViewItem *item ) const
{
- QRect r = item->rect();
- QIconViewItem *it = firstItem();
+ TQRect r = item->rect();
+ TQIconViewItem *it = firstItem();
for (; it; it = it->nextItem() )
{
if ( !it->rect().isValid() || it == item )
@@ -1561,9 +1561,9 @@ bool KDIconView::isFreePosition( const QIconViewItem *item ) const
return true;
}
-bool KDIconView::isFreePosition( const QIconViewItem *item ,const QRect& rect) const
+bool KDIconView::isFreePosition( const TQIconViewItem *item ,const TQRect& rect) const
{
- QIconViewItem *it = firstItem();
+ TQIconViewItem *it = firstItem();
for (; it; it = it->nextItem() )
{
if ( !rect.isValid() || it == item )
@@ -1576,12 +1576,12 @@ bool KDIconView::isFreePosition( const QIconViewItem *item ,const QRect& rect) c
return true;
}
-void KDIconView::setLastIconPosition( const QPoint &_pos )
+void KDIconView::setLastIconPosition( const TQPoint &_pos )
{
m_lastDeletedIconPos = _pos;
}
-void KDIconView::moveToFreePosition(QIconViewItem *item )
+void KDIconView::moveToFreePosition(TQIconViewItem *item )
{
bool success;
// It may be that a file has been renamed. In this case,
@@ -1595,17 +1595,17 @@ void KDIconView::moveToFreePosition(QIconViewItem *item )
{
kdDebug(1214) << "Moving " << item->text() << " to position of last deleted icon." << endl;
item->move( m_lastDeletedIconPos );
- m_lastDeletedIconPos = QPoint();
+ m_lastDeletedIconPos = TQPoint();
return;
}
//try to find a free place to put the item, honouring the m_bVertAlign property
- QRect rect=item->rect();
+ TQRect rect=item->rect();
if (m_bVertAlign)
{
kdDebug(1214)<<"moveToFreePosition for vertical alignment"<<endl;
- rect.moveTopLeft(QPoint(spacing(),spacing()));
+ rect.moveTopLeft(TQPoint(spacing(),spacing()));
do
{
success=false;
@@ -1624,7 +1624,7 @@ void KDIconView::moveToFreePosition(QIconViewItem *item )
if (!success)
{
- rect.moveTopLeft(QPoint(rect.right()+spacing(),spacing()));
+ rect.moveTopLeft(TQPoint(rect.right()+spacing(),spacing()));
} else break;
}
while (item->rect().right()<width());
@@ -1645,8 +1645,8 @@ void KDIconView::saveIconPositions()
if (!m_bEditableDesktopIcons)
return; // Don't save position
- QString prefix = iconPositionGroupPrefix();
- QIconViewItem *it = firstItem();
+ TQString prefix = iconPositionGroupPrefix();
+ TQIconViewItem *it = firstItem();
if ( !it )
return; // No more icons. Maybe we're closing and they've been removed already
diff --git a/kdesktop/kdiconview.h b/kdesktop/kdiconview.h
index a92d39712..715a0eb5e 100644
--- a/kdesktop/kdiconview.h
+++ b/kdesktop/kdiconview.h
@@ -45,7 +45,7 @@ class KDIconView : public KonqIconViewWidget, public KDirNotify
Q_OBJECT
public:
- KDIconView( QWidget *parent, const char* name = 0L );
+ KDIconView( TQWidget *parent, const char* name = 0L );
~KDIconView();
virtual void initConfig( bool init );
@@ -67,11 +67,11 @@ public:
*/
void rearrangeIcons();
- void lineupIcons(QIconView::Arrangement);
+ void lineupIcons(TQIconView::Arrangement);
void setAutoAlign( bool b );
- QStringList selectedURLs();
+ TQStringList selectedURLs();
/**
* Save the icon positions
@@ -86,13 +86,13 @@ public:
/**
* Called when the desktop icons area has changed
*/
- void updateWorkArea( const QRect &wr );
+ void updateWorkArea( const TQRect &wr );
/**
* Reimplemented from KonqIconViewWidget (for image drops)
*/
virtual void setWallpaper(const KURL &url) { emit newWallpaper( url ); }
- void setLastIconPosition( const QPoint & );
+ void setLastIconPosition( const TQPoint & );
static KURL desktopURL();
@@ -106,15 +106,15 @@ public:
protected slots:
// slots connected to the icon view
- void slotReturnPressed( QIconViewItem *item );
- void slotExecuted( QIconViewItem *item );
- void slotMouseButtonPressed(int _button, QIconViewItem* _item, const QPoint& _global);
- void slotMouseButtonClickedKDesktop(int _button, QIconViewItem* _item, const QPoint& _global);
- void slotContextMenuRequested(QIconViewItem* _item, const QPoint& _global);
+ void slotReturnPressed( TQIconViewItem *item );
+ void slotExecuted( TQIconViewItem *item );
+ void slotMouseButtonPressed(int _button, TQIconViewItem* _item, const TQPoint& _global);
+ void slotMouseButtonClickedKDesktop(int _button, TQIconViewItem* _item, const TQPoint& _global);
+ void slotContextMenuRequested(TQIconViewItem* _item, const TQPoint& _global);
void slotEnableAction( const char * name, bool enabled );
- void slotAboutToCreate(const QPoint &pos, const QValueList<KIO::CopyInfo> &files);
+ void slotAboutToCreate(const TQPoint &pos, const TQValueList<KIO::CopyInfo> &files);
- void slotItemRenamed(QIconViewItem*, const QString &name);
+ void slotItemRenamed(TQIconViewItem*, const TQString &name);
// slots connected to the directory lister
void slotStarted( const KURL& url );
@@ -137,8 +137,8 @@ protected slots:
// For communication with KDesktop
signals:
- void colorDropEvent( QDropEvent *e );
- void imageDropEvent( QDropEvent *e );
+ void colorDropEvent( TQDropEvent *e );
+ void imageDropEvent( TQDropEvent *e );
void newWallpaper( const KURL & );
void iconMoved();
void wheelRolled( int delta );
@@ -159,28 +159,28 @@ protected:
void initDotDirectories();
bool makeFriendlyText( KFileIVI *fileIVI );
- static QString stripDesktopExtension( const QString & text );
+ static TQString stripDesktopExtension( const TQString & text );
bool isDesktopFile( KFileItem * _item ) const;
- bool isFreePosition( const QIconViewItem *item ) const;
- bool isFreePosition( const QIconViewItem *item, const QRect& rect ) const;
- void moveToFreePosition(QIconViewItem *item );
+ bool isFreePosition( const TQIconViewItem *item ) const;
+ bool isFreePosition( const TQIconViewItem *item, const TQRect& rect ) const;
+ void moveToFreePosition(TQIconViewItem *item );
bool deleteGlobalDesktopFiles();
- static void renameDesktopFile(const QString &path, const QString &name);
+ static void renameDesktopFile(const TQString &path, const TQString &name);
- void popupMenu( const QPoint &_global, const KFileItemList& _items );
- virtual void showEvent( QShowEvent *e );
- virtual void contentsDropEvent( QDropEvent *e );
- virtual void viewportWheelEvent( QWheelEvent * );
- virtual void contentsMousePressEvent( QMouseEvent *e );
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void wheelEvent( QWheelEvent* e );
+ void popupMenu( const TQPoint &_global, const KFileItemList& _items );
+ virtual void showEvent( TQShowEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *e );
+ virtual void viewportWheelEvent( TQWheelEvent * );
+ virtual void contentsMousePressEvent( TQMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
+ virtual void wheelEvent( TQWheelEvent* e );
private:
void refreshTrashIcon();
- static QRect desktopRect();
+ static TQRect desktopRect();
static void saveIconPosition(KSimpleConfig *config, int x, int y);
static void readIconPosition(KSimpleConfig *config, int &x, int &y);
@@ -213,18 +213,18 @@ private:
KURL::List m_mergeDirs;
/** The list of dirs to be merged into the desktop, in addition to desktopURL **/
- QStringList m_desktopDirs;
+ TQStringList m_desktopDirs;
/** The desktop's .directory, used for storing icon positions */
KSimpleConfig *m_dotDirectory;
/** Position of last deleted icon - used when renaming a file */
- QPoint m_lastDeletedIconPos;
+ TQPoint m_lastDeletedIconPos;
/** Sorting */
SortCriterion m_eSortCriterion;
bool m_bSortDirectoriesFirst;
- QStringList m_itemsAlwaysFirst;
+ TQStringList m_itemsAlwaysFirst;
/**
* The shadow object
@@ -233,20 +233,20 @@ private:
/** Position where to move the next item.
* It is set to the KRootWm position when "new file" is chosen. */
- QPoint m_nextItemPos;
+ TQPoint m_nextItemPos;
/** Position where the last drop occurred */
- QPoint m_dropPos;
+ TQPoint m_dropPos;
/** Position for the last dropped item */
- QPoint m_lastDropPos;
+ TQPoint m_lastDropPos;
/** URL of the items which is being RMB'ed - when only one */
KURL m_popupURL;
/** media list management */
bool m_enableMedia;
- QStringList m_excludedMedia;
+ TQStringList m_excludedMedia;
// did we already get the correct desktopIconsArea (from kicker)
// needed when we want to line up icons on a grid
diff --git a/kdesktop/kfileividesktop.cpp b/kdesktop/kfileividesktop.cpp
index f9ea12a51..90c6a213d 100644
--- a/kdesktop/kfileividesktop.cpp
+++ b/kdesktop/kfileividesktop.cpp
@@ -23,11 +23,11 @@
#include <stdio.h>
-#include <qcolor.h>
-#include <qpalette.h>
-#include <qstring.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqcolor.h>
+#include <tqpalette.h>
+#include <tqstring.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
#include <kwordwrap.h>
#include <kiconview.h>
#include <kdebug.h>
@@ -61,7 +61,7 @@ KFileIVIDesktop::~KFileIVIDesktop()
delete m_normalImage;
}
-void KFileIVIDesktop::calcRect( const QString& _text )
+void KFileIVIDesktop::calcRect( const TQString& _text )
{
KIconViewItem::calcRect( _text );
@@ -71,8 +71,8 @@ void KFileIVIDesktop::calcRect( const QString& _text )
return;
int spread = shadowThickness();
- QRect itemTextRect = textRect();
- QRect itemRect = rect();
+ TQRect itemTextRect = textRect();
+ TQRect itemRect = rect();
itemTextRect.setBottom( itemTextRect.bottom() + spread );
itemTextRect.setRight( itemTextRect.right() + spread );
@@ -83,11 +83,11 @@ void KFileIVIDesktop::calcRect( const QString& _text )
setItemRect( itemRect );
}
-void KFileIVIDesktop::paintItem( QPainter *p, const QColorGroup &cg)
+void KFileIVIDesktop::paintItem( TQPainter *p, const TQColorGroup &cg)
{
- QColorGroup colors = updateColors(cg);
+ TQColorGroup colors = updateColors(cg);
- QIconView* view = iconView();
+ TQIconView* view = iconView();
Q_ASSERT( view );
if ( !view )
@@ -119,7 +119,7 @@ void KFileIVIDesktop::paintItem( QPainter *p, const QColorGroup &cg)
bool KFileIVIDesktop::shouldUpdateShadow(bool selected)
{
unsigned long uid = (static_cast<KDesktopShadowSettings *> (m_shadow->shadowSettings()))->UID();
- QString wrapped = wordWrap()->wrappedString();
+ TQString wrapped = wordWrap()->wrappedString();
if (wrapped != oldText){
oldText = wrapped;
@@ -136,11 +136,11 @@ bool KFileIVIDesktop::shouldUpdateShadow(bool selected)
-void KFileIVIDesktop::drawShadowedText( QPainter *p, const QColorGroup &cg )
+void KFileIVIDesktop::drawShadowedText( TQPainter *p, const TQColorGroup &cg )
{
int textX = textRect( FALSE ).x() + 4;
int textY = textRect( FALSE ).y();
- int align = ((KIconView *) iconView())->itemTextPos() == QIconView::Bottom
+ int align = ((KIconView *) iconView())->itemTextPos() == TQIconView::Bottom
? AlignHCenter : AlignAuto;
bool rebuild = shouldUpdateShadow(isSelected());
@@ -150,17 +150,17 @@ void KFileIVIDesktop::drawShadowedText( QPainter *p, const QColorGroup &cg )
p->setFont(iconView()->font());
paintFontUpdate(p);
- QColor shadow;
- QColor text;
+ TQColor shadow;
+ TQColor text;
int spread = shadowThickness();
if ( isSelected() && settings->selectionType() != KShadowSettings::InverseVideoOnSelection ) {
text = cg.highlightedText();
- QRect rect = textRect( false );
+ TQRect rect = textRect( false );
rect.setRight( rect.right() - spread );
rect.setBottom( rect.bottom() - spread + 1 );
- p->setBrush( QBrush( cg.highlight() ) );
- p->setPen( QPen( cg.highlight() ) );
+ p->setBrush( TQBrush( cg.highlight() ) );
+ p->setPen( TQPen( cg.highlight() ) );
p->drawRoundRect( rect,
1000 / rect.width(),
1000 / rect.height() );
@@ -201,16 +201,16 @@ void KFileIVIDesktop::drawShadowedText( QPainter *p, const QColorGroup &cg )
}
-QImage *KFileIVIDesktop::buildShadow( QPainter *p, const int align,
- QColor &shadowColor )
+TQImage *KFileIVIDesktop::buildShadow( TQPainter *p, const int align,
+ TQColor &shadowColor )
{
- QPainter pixPainter;
+ TQPainter pixPainter;
int spread = shadowThickness();
- QPixmap textPixmap(textRect( FALSE ).width() + spread * 2 + 2,
+ TQPixmap textPixmap(textRect( FALSE ).width() + spread * 2 + 2,
textRect( FALSE ).height() + spread * 2 + 2);
- textPixmap.fill(QColor(0,0,0));
+ textPixmap.fill(TQColor(0,0,0));
textPixmap.setMask( textPixmap.createHeuristicMask(TRUE) );
pixPainter.begin(&textPixmap);
@@ -219,7 +219,7 @@ QImage *KFileIVIDesktop::buildShadow( QPainter *p, const int align,
wordWrap()->drawText( &pixPainter, spread, spread, align | KWordWrap::Truncate );
pixPainter.end();
- return new QImage(m_shadow->makeShadow(textPixmap, shadowColor));
+ return new TQImage(m_shadow->makeShadow(textPixmap, shadowColor));
}
int KFileIVIDesktop::shadowThickness() const
diff --git a/kdesktop/kfileividesktop.h b/kdesktop/kfileividesktop.h
index c245a6800..32166d9d1 100644
--- a/kdesktop/kfileividesktop.h
+++ b/kdesktop/kfileividesktop.h
@@ -24,10 +24,10 @@
#ifndef KFILE_IVI_DESKTOP
#define KFILE_IVI_DESKTOP
-#include <qcolor.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qstring.h>
+#include <tqcolor.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqstring.h>
#include <kfileivi.h>
/*
@@ -69,7 +69,7 @@ class KFileIVIDesktop : public KFileIVI
* Reimplements KIconView::calcRect to take the shadow metrics
* into account
*/
- virtual void calcRect( const QString& _text );
+ virtual void calcRect( const TQString& _text );
/**
* Paints this item. Takes care of using the normal or alpha
@@ -77,7 +77,7 @@ class KFileIVIDesktop : public KFileIVI
* @param p the painter for drawing the item
* @param cg the base color group
*/
- virtual void paintItem(QPainter *p, const QColorGroup &cg);
+ virtual void paintItem(TQPainter *p, const TQColorGroup &cg);
/**
@@ -85,7 +85,7 @@ class KFileIVIDesktop : public KFileIVI
* @param p the painter for drawing the item
* @param cg the base color group
*/
- virtual void drawShadowedText(QPainter *p, const QColorGroup &cg);
+ virtual void drawShadowedText(TQPainter *p, const TQColorGroup &cg);
/**
* Builds the shadow. As the algorithm is pretty slow (at pixel level),
@@ -94,14 +94,14 @@ class KFileIVIDesktop : public KFileIVI
* @param align the shadow alignment
* @param shadowColor the shadow color
*/
- virtual QImage *buildShadow(QPainter *p, const int align, QColor &shadowColor);
+ virtual TQImage *buildShadow(TQPainter *p, const int align, TQColor &shadowColor);
protected:
- void setNormalImage(QImage *newImage) { delete m_normalImage; m_normalImage = newImage; };
- void setSelectedImage(QImage *newImage) { delete m_selectedImage; m_selectedImage = newImage; };
+ void setNormalImage(TQImage *newImage) { delete m_normalImage; m_normalImage = newImage; };
+ void setSelectedImage(TQImage *newImage) { delete m_selectedImage; m_selectedImage = newImage; };
- QImage *normalImage() { return m_normalImage; };
- QImage *selectedImage() { return m_selectedImage; };
+ TQImage *normalImage() { return m_normalImage; };
+ TQImage *selectedImage() { return m_selectedImage; };
private:
bool shouldUpdateShadow(bool selected);
@@ -109,10 +109,10 @@ class KFileIVIDesktop : public KFileIVI
KShadowEngine *m_shadow;
- QImage *m_selectedImage;
- QImage *m_normalImage;
+ TQImage *m_selectedImage;
+ TQImage *m_normalImage;
- QString oldText;
+ TQString oldText;
unsigned long _selectedUID;
unsigned long _normalUID;
diff --git a/kdesktop/krootwm.cc b/kdesktop/krootwm.cc
index 145360b65..7e83f6779 100644
--- a/kdesktop/krootwm.cc
+++ b/kdesktop/krootwm.cc
@@ -50,7 +50,7 @@
#include <kmenubar.h>
#include <kmessagebox.h>
#include <kuser.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "krootwm.h"
#include "kdiconview.h"
@@ -66,9 +66,9 @@
KRootWm * KRootWm::s_rootWm = 0;
-extern QCString kdesktop_name, kicker_name, kwin_name;
+extern TQCString kdesktop_name, kicker_name, kwin_name;
-KRootWm::KRootWm(KDesktop* _desktop) : QObject(_desktop)
+KRootWm::KRootWm(KDesktop* _desktop) : TQObject(_desktop)
{
s_rootWm = this;
m_actionCollection = new KActionCollection(_desktop, this, "KRootWm::m_actionCollection");
@@ -85,10 +85,10 @@ KRootWm::KRootWm(KDesktop* _desktop) : QObject(_desktop)
if (m_bDesktopEnabled && kapp->authorize("editable_desktop_icons"))
{
menuNew = new KNewMenu( m_actionCollection, "new_menu" );
- connect(menuNew->popupMenu(), SIGNAL( aboutToShow() ),
- this, SLOT( slotFileNewAboutToShow() ) );
- connect( menuNew, SIGNAL( activated() ),
- m_pDesktop->iconView(), SLOT( slotNewMenuActivated() ) );
+ connect(menuNew->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( slotFileNewAboutToShow() ) );
+ connect( menuNew, TQT_SIGNAL( activated() ),
+ m_pDesktop->iconView(), TQT_SLOT( slotNewMenuActivated() ) );
}
if (kapp->authorizeKAction("bookmarks"))
@@ -110,8 +110,8 @@ KRootWm::KRootWm(KDesktop* _desktop) : QObject(_desktop)
// so we create them here
desktopMenu = new QPopupMenu;
windowListMenu = new KWindowListMenu;
- connect( windowListMenu, SIGNAL( aboutToShow() ),
- this, SLOT( slotWindowListAboutToShow() ) );
+ connect( windowListMenu, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( slotWindowListAboutToShow() ) );
// Create the actions
#if 0
@@ -130,77 +130,77 @@ KRootWm::KRootWm(KDesktop* _desktop) : QObject(_desktop)
if (kapp->authorize("run_command"))
{
- new KAction(i18n("Run Command..."), "run", 0, m_pDesktop, SLOT( slotExecuteCommand() ), m_actionCollection, "exec" );
+ new KAction(i18n("Run Command..."), "run", 0, m_pDesktop, TQT_SLOT( slotExecuteCommand() ), m_actionCollection, "exec" );
}
if (!KGlobal::config()->isImmutable())
{
- new KAction(i18n("Configure Desktop..."), "configure", 0, this, SLOT( slotConfigureDesktop() ),
+ new KAction(i18n("Configure Desktop..."), "configure", 0, this, TQT_SLOT( slotConfigureDesktop() ),
m_actionCollection, "configdesktop" );
- new KAction(i18n("Disable Desktop Menu"), 0, this, SLOT( slotToggleDesktopMenu() ),
+ new KAction(i18n("Disable Desktop Menu"), 0, this, TQT_SLOT( slotToggleDesktopMenu() ),
m_actionCollection, "togglemenubar" );
}
- new KAction(i18n("Unclutter Windows"), 0, this, SLOT( slotUnclutterWindows() ),
+ new KAction(i18n("Unclutter Windows"), 0, this, TQT_SLOT( slotUnclutterWindows() ),
m_actionCollection, "unclutter" );
- new KAction(i18n("Cascade Windows"), 0, this, SLOT( slotCascadeWindows() ),
+ new KAction(i18n("Cascade Windows"), 0, this, TQT_SLOT( slotCascadeWindows() ),
m_actionCollection, "cascade" );
// arrange menu actions
if (m_bDesktopEnabled && kapp->authorize("editable_desktop_icons"))
{
- new KAction(i18n("By Name (Case Sensitive)"), 0, this, SLOT( slotArrangeByNameCS() ),
+ new KAction(i18n("By Name (Case Sensitive)"), 0, this, TQT_SLOT( slotArrangeByNameCS() ),
m_actionCollection, "sort_ncs");
- new KAction(i18n("By Name (Case Insensitive)"), 0, this, SLOT( slotArrangeByNameCI() ),
+ new KAction(i18n("By Name (Case Insensitive)"), 0, this, TQT_SLOT( slotArrangeByNameCI() ),
m_actionCollection, "sort_nci");
- new KAction(i18n("By Size"), 0, this, SLOT( slotArrangeBySize() ),
+ new KAction(i18n("By Size"), 0, this, TQT_SLOT( slotArrangeBySize() ),
m_actionCollection, "sort_size");
- new KAction(i18n("By Type"), 0, this, SLOT( slotArrangeByType() ),
+ new KAction(i18n("By Type"), 0, this, TQT_SLOT( slotArrangeByType() ),
m_actionCollection, "sort_type");
- new KAction(i18n("By Date"), 0, this, SLOT( slotArrangeByDate() ),
+ new KAction(i18n("By Date"), 0, this, TQT_SLOT( slotArrangeByDate() ),
m_actionCollection, "sort_date");
KToggleAction *aSortDirsFirst = new KToggleAction( i18n("Directories First"), 0, m_actionCollection, "sort_directoriesfirst" );
- connect( aSortDirsFirst, SIGNAL( toggled( bool ) ),
- this, SLOT( slotToggleDirFirst( bool ) ) );
+ connect( aSortDirsFirst, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotToggleDirFirst( bool ) ) );
new KAction(i18n("Line Up Horizontally"), 0,
- this, SLOT( slotLineupIconsHoriz() ),
+ this, TQT_SLOT( slotLineupIconsHoriz() ),
m_actionCollection, "lineupHoriz" );
new KAction(i18n("Line Up Vertically"), 0,
- this, SLOT( slotLineupIconsVert() ),
+ this, TQT_SLOT( slotLineupIconsVert() ),
m_actionCollection, "lineupVert" );
KToggleAction *aAutoAlign = new KToggleAction(i18n("Align to Grid"), 0,
m_actionCollection, "realign" );
- connect( aAutoAlign, SIGNAL( toggled( bool ) ),
- this, SLOT( slotToggleAutoAlign( bool ) ) );
+ connect( aAutoAlign, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotToggleAutoAlign( bool ) ) );
KToggleAction *aLockIcons = new KToggleAction(i18n("Lock in Place"), 0, m_actionCollection, "lock_icons");
- connect( aLockIcons, SIGNAL( toggled( bool ) ),
- this, SLOT( slotToggleLockIcons( bool ) ) );
+ connect( aLockIcons, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotToggleLockIcons( bool ) ) );
}
if (m_bDesktopEnabled)
{
- new KAction(i18n("Refresh Desktop"), "desktop", 0, this, SLOT( slotRefreshDesktop() ),
+ new KAction(i18n("Refresh Desktop"), "desktop", 0, this, TQT_SLOT( slotRefreshDesktop() ),
m_actionCollection, "refresh" );
}
// Icons in sync with kicker
if (kapp->authorize("lock_screen"))
{
- new KAction(i18n("Lock Session"), "lock", 0, this, SLOT( slotLock() ),
+ new KAction(i18n("Lock Session"), "lock", 0, this, TQT_SLOT( slotLock() ),
m_actionCollection, "lock" );
}
if (kapp->authorize("logout"))
{
new KAction(i18n("Log Out \"%1\"...").arg(KUser().loginName()), "exit", 0,
- this, SLOT( slotLogout() ), m_actionCollection, "logout" );
+ this, TQT_SLOT( slotLogout() ), m_actionCollection, "logout" );
}
if (kapp->authorize("start_new_session") && DM().isSwitchable())
{
new KAction(i18n("Start New Session"), "fork", 0, this,
- SLOT( slotNewSession() ), m_actionCollection, "newsession" );
+ TQT_SLOT( slotNewSession() ), m_actionCollection, "newsession" );
if (kapp->authorize("lock_screen"))
{
new KAction(i18n("Lock Current && Start New Session"), "lock", 0, this,
- SLOT( slotLockNNewSession() ), m_actionCollection, "lockNnewsession" );
+ TQT_SLOT( slotLockNNewSession() ), m_actionCollection, "lockNnewsession" );
}
}
@@ -226,7 +226,7 @@ void KRootWm::initConfig()
// read configuration for clicks on root window
static const char * const s_choices[choiceCount] = { "", "WindowListMenu", "DesktopMenu", "AppMenu", "CustomMenu1", "CustomMenu2", "BookmarksMenu" };
leftButtonChoice = middleButtonChoice = rightButtonChoice = NOTHING;
- QString s = KDesktopSettings::left();
+ TQString s = KDesktopSettings::left();
for ( int c = 0 ; c < choiceCount ; c ++ )
if (s == s_choices[c])
{ leftButtonChoice = (menuChoice) c; break; }
@@ -279,8 +279,8 @@ void KRootWm::buildMenus()
}
// create Arrange menu
- QPopupMenu *pArrangeMenu = 0;
- QPopupMenu *pLineupMenu = 0;
+ TQPopupMenu *pArrangeMenu = 0;
+ TQPopupMenu *pLineupMenu = 0;
KAction *action;
help = new KHelpMenu(0, 0, false);
help->menu()->removeItem( KHelpMenu::menuAboutApp );
@@ -307,8 +307,8 @@ void KRootWm::buildMenus()
if (m_actionCollection->action("newsession"))
{
sessionsMenu = new QPopupMenu;
- connect( sessionsMenu, SIGNAL(aboutToShow()), SLOT(slotPopulateSessions()) );
- connect( sessionsMenu, SIGNAL(activated(int)), SLOT(slotSessionActivated(int)) );
+ connect( sessionsMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotPopulateSessions()) );
+ connect( sessionsMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSessionActivated(int)) );
}
if (menuBar) {
@@ -415,7 +415,7 @@ void KRootWm::buildMenus()
if (m_bDesktopEnabled && m_actionCollection->action("realign"))
{
- QPopupMenu* pIconOperationsMenu = new QPopupMenu;
+ TQPopupMenu* pIconOperationsMenu = new QPopupMenu;
pIconOperationsMenu->insertItem(i18n("Sort Icons"), pArrangeMenu);
pIconOperationsMenu->insertSeparator();
@@ -430,7 +430,7 @@ void KRootWm::buildMenus()
desktopMenu->insertItem(SmallIconSet("icons"), i18n("Icons"), pIconOperationsMenu);
}
- QPopupMenu* pWindowOperationsMenu = new QPopupMenu;
+ TQPopupMenu* pWindowOperationsMenu = new QPopupMenu;
m_actionCollection->action("cascade")->plug( pWindowOperationsMenu );
m_actionCollection->action("unclutter")->plug( pWindowOperationsMenu );
desktopMenu->insertItem(SmallIconSet("window_list"), i18n("Windows"), pWindowOperationsMenu);
@@ -472,7 +472,7 @@ void KRootWm::buildMenus()
desktopMenu->removeItem(lastSep);
}
- connect( desktopMenu, SIGNAL( aboutToShow() ), this, SLOT( slotFileNewAboutToShow() ) );
+ connect( desktopMenu, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotFileNewAboutToShow() ) );
if (menuBar) {
menuBar->insertItem(i18n("File"), file);
@@ -529,7 +529,7 @@ void KRootWm::slotWindowListAboutToShow()
windowListMenu->init();
}
-void KRootWm::activateMenu( menuChoice choice, const QPoint& global )
+void KRootWm::activateMenu( menuChoice choice, const TQPoint& global )
{
switch ( choice )
{
@@ -574,7 +574,7 @@ void KRootWm::activateMenu( menuChoice choice, const QPoint& global )
}
}
-void KRootWm::mousePressed( const QPoint& _global, int _button )
+void KRootWm::mousePressed( const TQPoint& _global, int _button )
{
if (!desktopMenu) return; // initialisation not yet done
switch ( _button ) {
@@ -599,38 +599,38 @@ void KRootWm::mousePressed( const QPoint& _global, int _button )
void KRootWm::slotWindowList() {
// kdDebug() << "KRootWm::slotWindowList" << endl;
// Popup at the center of the screen, this is from keyboard shortcut.
- QDesktopWidget* desktop = KApplication::desktop();
- QRect r;
+ TQDesktopWidget* desktop = KApplication::desktop();
+ TQRect r;
if (desktop->numScreens() < 2)
r = desktop->geometry();
else
- r = desktop->screenGeometry( desktop->screenNumber(QCursor::pos()));
+ r = desktop->screenGeometry( desktop->screenNumber(TQCursor::pos()));
windowListMenu->init();
- disconnect( windowListMenu, SIGNAL( aboutToShow() ),
- this, SLOT( slotWindowListAboutToShow() ) ); // avoid calling init() twice
+ disconnect( windowListMenu, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( slotWindowListAboutToShow() ) ); // avoid calling init() twice
// windowListMenu->rect() is not valid before showing, use sizeHint()
- windowListMenu->popup(r.center() - QRect( QPoint( 0, 0 ), windowListMenu->sizeHint()).center());
+ windowListMenu->popup(r.center() - TQRect( TQPoint( 0, 0 ), windowListMenu->sizeHint()).center());
windowListMenu->selectActiveWindow(); // make the popup more useful
- connect( windowListMenu, SIGNAL( aboutToShow() ),
- this, SLOT( slotWindowListAboutToShow() ) );
+ connect( windowListMenu, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( slotWindowListAboutToShow() ) );
}
void KRootWm::slotSwitchUser() {
// kdDebug() << "KRootWm::slotSwitchUser" << endl;
if (!sessionsMenu)
return;
- QDesktopWidget* desktop = KApplication::desktop();
- QRect r;
+ TQDesktopWidget* desktop = KApplication::desktop();
+ TQRect r;
if (desktop->numScreens() < 2)
r = desktop->geometry();
else
- r = desktop->screenGeometry( desktop->screenNumber(QCursor::pos()));
+ r = desktop->screenGeometry( desktop->screenNumber(TQCursor::pos()));
slotPopulateSessions();
- disconnect( sessionsMenu, SIGNAL( aboutToShow() ),
- this, SLOT( slotPopulateSessions() ) ); // avoid calling init() twice
- sessionsMenu->popup(r.center() - QRect( QPoint( 0, 0 ), sessionsMenu->sizeHint()).center());
- connect( sessionsMenu, SIGNAL( aboutToShow() ),
- SLOT( slotPopulateSessions() ) );
+ disconnect( sessionsMenu, TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( slotPopulateSessions() ) ); // avoid calling init() twice
+ sessionsMenu->popup(r.center() - TQRect( TQPoint( 0, 0 ), sessionsMenu->sizeHint()).center());
+ connect( sessionsMenu, TQT_SIGNAL( aboutToShow() ),
+ TQT_SLOT( slotPopulateSessions() ) );
}
void KRootWm::slotArrangeByNameCS()
@@ -681,14 +681,14 @@ void KRootWm::slotArrangeByType()
void KRootWm::slotLineupIconsHoriz() {
if (m_bDesktopEnabled)
{
- m_pDesktop->iconView()->lineupIcons(QIconView::LeftToRight);
+ m_pDesktop->iconView()->lineupIcons(TQIconView::LeftToRight);
}
}
void KRootWm::slotLineupIconsVert() {
if (m_bDesktopEnabled)
{
- m_pDesktop->iconView()->lineupIcons(QIconView::TopToBottom);
+ m_pDesktop->iconView()->lineupIcons(TQIconView::TopToBottom);
}
}
@@ -716,8 +716,8 @@ void KRootWm::slotRefreshDesktop() {
}
}
-QStringList KRootWm::configModules() {
- QStringList args;
+TQStringList KRootWm::configModules() {
+ TQStringList args;
args << "kde-background.desktop" << "kde-desktopbehavior.desktop" << "kde-desktop.desktop"
<< "kde-screensaver.desktop" << "kde-display.desktop";
return args;
@@ -726,11 +726,11 @@ QStringList KRootWm::configModules() {
void KRootWm::slotConfigureDesktop() {
if (!m_configDialog)
{
- m_configDialog = new KCMultiDialog( (QWidget*)0, "configureDialog" );
- connect(m_configDialog, SIGNAL(finished()), this, SLOT(slotConfigClosed()));
+ m_configDialog = new KCMultiDialog( (TQWidget*)0, "configureDialog" );
+ connect(m_configDialog, TQT_SIGNAL(finished()), this, TQT_SLOT(slotConfigClosed()));
- QStringList modules = configModules();
- for (QStringList::const_iterator it = modules.constBegin(); it != modules.constEnd(); ++it)
+ TQStringList modules = configModules();
+ for (TQStringList::const_iterator it = modules.constBegin(); it != modules.constEnd(); ++it)
{
if (kapp->authorizeControlModule(*it))
{
@@ -755,7 +755,7 @@ void KRootWm::slotToggleDesktopMenu()
KDesktopSettings::setShowMenubar( !(m_bShowMenuBar && menuBar) );
KDesktopSettings::writeConfig();
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->send( kdesktop_name, "KDesktopIface", "configure()", data);
// for the standalone menubar setting
kapp->dcopClient()->send( "menuapplet*", "menuapplet", "configure()", data );
diff --git a/kdesktop/krootwm.h b/kdesktop/krootwm.h
index 3363fbf42..8bbf83817 100644
--- a/kdesktop/krootwm.h
+++ b/kdesktop/krootwm.h
@@ -23,8 +23,8 @@
#ifndef __krootwm_h__
#define __krootwm_h__
-#include <qpixmap.h>
-#include <qobject.h>
+#include <tqpixmap.h>
+#include <tqobject.h>
// we need Window but do not want to include X.h since it
// #defines way too many constants
@@ -59,7 +59,7 @@ enum {
/**
* This class is the handler for the menus (root popup menu and desktop menubar)
*/
-class KRootWm: public QObject {
+class KRootWm: public TQObject {
Q_OBJECT
public:
@@ -67,7 +67,7 @@ public:
~KRootWm();
bool startup;
- void mousePressed( const QPoint& _global, int _button );
+ void mousePressed( const TQPoint& _global, int _button );
bool hasLeftButtonMenu() { return leftButtonChoice != NOTHING; }
/**
@@ -83,7 +83,7 @@ public:
/**
* The position of the (usually RMB) click that opened the 'desktop' menu
*/
- QPoint desktopMenuPosition() const { return m_desktopMenuPosition; }
+ TQPoint desktopMenuPosition() const { return m_desktopMenuPosition; }
/**
* Read and apply configuration
@@ -93,7 +93,7 @@ public:
/**
* List of config modules used by Configure Desktop
*/
- static QStringList configModules();
+ static TQStringList configModules();
public slots:
void slotArrangeByNameCS();
@@ -126,10 +126,10 @@ private:
// The five root menus :
KWindowListMenu* windowListMenu;
- QPopupMenu* desktopMenu;
+ TQPopupMenu* desktopMenu;
// the appMenu is (will be) provided by kicker
- QPopupMenu* customMenu1;
- QPopupMenu* customMenu2;
+ TQPopupMenu* customMenu1;
+ TQPopupMenu* customMenu2;
KCMultiDialog* m_configDialog;
// Configuration for the root menus :
@@ -142,9 +142,9 @@ private:
KActionMenu* bookmarks;
KBookmarkMenu* bookmarkMenu;
KActionCollection * m_actionCollection;
- QPoint m_desktopMenuPosition;
+ TQPoint m_desktopMenuPosition;
- void activateMenu( menuChoice choice, const QPoint& global );
+ void activateMenu( menuChoice choice, const TQPoint& global );
void buildMenus();
bool m_bShowMenuBar;
@@ -153,14 +153,14 @@ private:
bool m_bDesktopEnabled;
KMenuBar *menuBar;
- QPopupMenu *file;
- QPopupMenu *desk;
+ TQPopupMenu *file;
+ TQPopupMenu *desk;
KHelpMenu *help;
- QPixmap defaultPixmap;
+ TQPixmap defaultPixmap;
void doNewSession( bool lock );
- QPopupMenu *sessionsMenu;
+ TQPopupMenu *sessionsMenu;
static KRootWm * s_rootWm;
diff --git a/kdesktop/kshadowengine.cpp b/kdesktop/kshadowengine.cpp
index 12d0319d3..893eac8e0 100644
--- a/kdesktop/kshadowengine.cpp
+++ b/kdesktop/kshadowengine.cpp
@@ -22,7 +22,7 @@
*/
#include "kshadowengine.h"
-#include <qcolor.h>
+#include <tqcolor.h>
#include "kshadowsettings.h"
KShadowEngine::KShadowEngine() :
@@ -54,9 +54,9 @@ KShadowSettings *KShadowEngine::shadowSettings()
return m_shadowSettings;
}
-QImage KShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor)
+TQImage KShadowEngine::makeShadow(const TQPixmap& textPixmap, const TQColor &bgColor)
{
- QImage result;
+ TQImage result;
// create a new image for for the shaddow
int w = textPixmap.width();
@@ -74,7 +74,7 @@ QImage KShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColo
/*
* This is the source pixmap
*/
- QImage img = textPixmap.convertToImage().convertDepth(32);
+ TQImage img = textPixmap.convertToImage().convertDepth(32);
/*
* Resize the image if necessary
@@ -121,7 +121,7 @@ QImage KShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColo
// Multiplication factor for pixels diagonal to the text
#define DIAGONAL_FACTOR 1.0
-double KShadowEngine::defaultDecay(QImage& source, int i, int j)
+double KShadowEngine::defaultDecay(TQImage& source, int i, int j)
{
if ((i < 1) || (j < 1) || (i > source.width() - 2) || (j > source.height() - 2))
return 0;
@@ -140,19 +140,19 @@ double KShadowEngine::defaultDecay(QImage& source, int i, int j)
return alphaShadow;
}
-double KShadowEngine::doubleLinearDecay(QImage& source, int i, int j)
+double KShadowEngine::doubleLinearDecay(TQImage& source, int i, int j)
{
//printf("img: %p, %d %d\n", (char *) &source, i, j);
return defaultDecay( source, i, j ); // for now
}
-double KShadowEngine::radialDecay(QImage& source, int i, int j)
+double KShadowEngine::radialDecay(TQImage& source, int i, int j)
{
//printf("img: %p, %d %d\n", (char *) &source, i, j);
return defaultDecay( source, i, j ); // for now
}
-double KShadowEngine::noDecay(QImage& source, int i, int j)
+double KShadowEngine::noDecay(TQImage& source, int i, int j)
{
// create a new image for for the shaddow
int w = source.width();
diff --git a/kdesktop/kshadowengine.h b/kdesktop/kshadowengine.h
index 3649ea3f4..33391e464 100644
--- a/kdesktop/kshadowengine.h
+++ b/kdesktop/kshadowengine.h
@@ -24,9 +24,9 @@
#ifndef __FX_SHADOW
#define __FX_SHADOW
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qcolor.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqcolor.h>
class KShadowSettings;
@@ -77,7 +77,7 @@ class KShadowEngine
* @param bgColor the background color
* @return the resulting image
*/
- QImage makeShadow(const QPixmap& textPixmap, const QColor &bgColor);
+ TQImage makeShadow(const TQPixmap& textPixmap, const TQColor &bgColor);
private:
// No static objects in libs, and no static deleters in kdefx...
@@ -88,24 +88,24 @@ class KShadowEngine
/*
* a simple algorithm with 3 pixels thickness
*/
- double defaultDecay(QImage& source, int x, int y);
+ double defaultDecay(TQImage& source, int x, int y);
/*
* a slower algorithm where the influence of a pixel
* is qGray(px)/(abs(dx) + abs(dy) +1).
*/
- double doubleLinearDecay(QImage& source, int x, int y);
+ double doubleLinearDecay(TQImage& source, int x, int y);
/*
* a very slow algorithm where the influence of a pixel
* is qGray(px)/(sqrt(sqr(dx) + sqr(dy)) +1).
*/
- double radialDecay(QImage& source, int x, int y);
+ double radialDecay(TQImage& source, int x, int y);
/*
* a nice/fast algorithm proposed by Bernardo Hung
*/
- double noDecay(QImage& source, int x, int y);
+ double noDecay(TQImage& source, int x, int y);
void *d;
};
diff --git a/kdesktop/kshadowsettings.cpp b/kdesktop/kshadowsettings.cpp
index 9c935d30f..4d6bce5c3 100644
--- a/kdesktop/kshadowsettings.cpp
+++ b/kdesktop/kshadowsettings.cpp
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "kshadowsettings.h"
KShadowSettings::KShadowSettings()
@@ -30,7 +30,7 @@ KShadowSettings::KShadowSettings()
}
// load/save methods
-void KShadowSettings::fromString(const QString &val)
+void KShadowSettings::fromString(const TQString &val)
{
setOffsetX(val.section(',', OFFSET_X, OFFSET_X).toInt());
setOffsetY(val.section(',', OFFSET_Y, OFFSET_Y).toInt());
@@ -41,9 +41,9 @@ void KShadowSettings::fromString(const QString &val)
setSelectionType((SelectionType)val.section(',', SELECTION_TYPE, SELECTION_TYPE).toInt());
}
-QString KShadowSettings::toString() const
+TQString KShadowSettings::toString() const
{
- QString result;
+ TQString result;
result.sprintf("%d,%d,%f,%f,%d,%d,%d",
offsetX(),
offsetY(),
diff --git a/kdesktop/kshadowsettings.h b/kdesktop/kshadowsettings.h
index 9b707a853..1af544898 100644
--- a/kdesktop/kshadowsettings.h
+++ b/kdesktop/kshadowsettings.h
@@ -22,12 +22,12 @@
#ifndef __FX_DATA
#define __FX_DATA
-#define SHADOW_CONFIG_ENTRY QString("ShadowParameters")
-#define SHADOW_TEXT_COLOR QString("ShadowTextColor")
-#define SHADOW_TEXT_BACKGROUND QString("ShadowTextBackground")
+#define SHADOW_CONFIG_ENTRY TQString("ShadowParameters")
+#define SHADOW_TEXT_COLOR TQString("ShadowTextColor")
+#define SHADOW_TEXT_BACKGROUND TQString("ShadowTextBackground")
// fallback configuration string
-#define DEFAULT_SHADOW_CONFIGURATION QString("0,0,4.0,120.0,2,1,1,0,0,0")
+#define DEFAULT_SHADOW_CONFIGURATION TQString("0,0,4.0,120.0,2,1,1,0,0,0")
/**
* This class is the implementation of a structure for the
@@ -90,13 +90,13 @@ class KShadowSettings
* @param the string to load from (comma-separated values)
* @see ConfigurationOrder
*/
- virtual void fromString(const QString &s);
+ virtual void fromString(const TQString &s);
/**
* Saves the configuration to a string.
* @return the configuration (comma-separated values)
* @see ConfigurationOrder
*/
- virtual QString toString() const;
+ virtual TQString toString() const;
// get methods
/**
diff --git a/kdesktop/kwebdesktop/kwebdesktop.cpp b/kdesktop/kwebdesktop/kwebdesktop.cpp
index e7010f06d..7d5897ac7 100644
--- a/kdesktop/kwebdesktop/kwebdesktop.cpp
+++ b/kdesktop/kwebdesktop/kwebdesktop.cpp
@@ -30,7 +30,7 @@
#include <kurifilter.h>
#include <kio/job.h>
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include "kwebdesktop.h"
#include <kmimetype.h>
#include <kparts/componentfactory.h>
@@ -52,18 +52,18 @@ KWebDesktopRun::KWebDesktopRun( KWebDesktop* webDesktop, const KURL & url )
{
kdDebug() << "KWebDesktopRun::KWebDesktopRun starting get" << endl;
KIO::Job * job = KIO::get(m_url, false, false);
- connect( job, SIGNAL( result( KIO::Job *)),
- this, SLOT( slotFinished(KIO::Job *)));
- connect( job, SIGNAL( mimetype( KIO::Job *, const QString &)),
- this, SLOT( slotMimetype(KIO::Job *, const QString &)));
+ connect( job, TQT_SIGNAL( result( KIO::Job *)),
+ this, TQT_SLOT( slotFinished(KIO::Job *)));
+ connect( job, TQT_SIGNAL( mimetype( KIO::Job *, const TQString &)),
+ this, TQT_SLOT( slotMimetype(KIO::Job *, const TQString &)));
}
-void KWebDesktopRun::slotMimetype( KIO::Job *job, const QString &_type )
+void KWebDesktopRun::slotMimetype( KIO::Job *job, const TQString &_type )
{
KIO::SimpleJob *sjob = static_cast<KIO::SimpleJob *>(job);
// Update our URL in case of a redirection
m_url = sjob->url();
- QString type = _type; // necessary copy if we plan to use it
+ TQString type = _type; // necessary copy if we plan to use it
sjob->putOnHold();
kdDebug() << "slotMimetype : " << type << endl;
@@ -105,12 +105,12 @@ int main( int argc, char **argv )
args->usage();
return 1;
}
- const int width = QCString(args->arg(0)).toInt();
- const int height = QCString(args->arg(1)).toInt();
- QCString imageFile = args->arg(2);
- QString url;
+ const int width = TQCString(args->arg(0)).toInt();
+ const int height = TQCString(args->arg(1)).toInt();
+ TQCString imageFile = args->arg(2);
+ TQString url;
if (args->count() == 4)
- url = QString::fromLocal8Bit(args->arg(3));
+ url = TQString::fromLocal8Bit(args->arg(3));
KWebDesktop *webDesktop = new KWebDesktop( 0, imageFile, width, height );
@@ -138,13 +138,13 @@ void KWebDesktop::slotCompleted()
{
kdDebug() << "KWebDesktop::slotCompleted" << endl;
// Dump image to m_imageFile
- QPixmap snapshot = QPixmap::grabWidget( m_part->widget() );
+ TQPixmap snapshot = TQPixmap::grabWidget( m_part->widget() );
snapshot.save( m_imageFile, "PNG" );
// And terminate the app.
kapp->quit();
}
-KParts::ReadOnlyPart* KWebDesktop::createPart( const QString& mimeType )
+KParts::ReadOnlyPart* KWebDesktop::createPart( const TQString& mimeType )
{
delete m_part;
m_part = 0;
@@ -161,26 +161,26 @@ KParts::ReadOnlyPart* KWebDesktop::createPart( const QString& mimeType )
htmlPart->setJScriptEnabled(false);
htmlPart->setJavaEnabled(false);
- ((QScrollView *)htmlPart->widget())->setHScrollBarMode( QScrollView::AlwaysOff );
- ((QScrollView *)htmlPart->widget())->setVScrollBarMode( QScrollView::AlwaysOff );
+ ((TQScrollView *)htmlPart->widget())->setHScrollBarMode( TQScrollView::AlwaysOff );
+ ((TQScrollView *)htmlPart->widget())->setVScrollBarMode( TQScrollView::AlwaysOff );
- connect( htmlPart, SIGNAL( completed() ), this, SLOT( slotCompleted() ) );
+ connect( htmlPart, TQT_SIGNAL( completed() ), this, TQT_SLOT( slotCompleted() ) );
m_part = htmlPart;
} else {
// Try to find an appropriate viewer component
m_part = KParts::ComponentFactory::createPartInstanceFromQuery<KParts::ReadOnlyPart>
- ( mimeType, QString::null, 0, 0, this, 0 );
+ ( mimeType, TQString::null, 0, 0, this, 0 );
if ( !m_part )
kdWarning() << "No handler found for " << mimeType << endl;
else {
kdDebug() << "Loaded " << m_part->className() << endl;
- connect( m_part, SIGNAL( completed() ),
- this, SLOT( slotCompleted() ) );
+ connect( m_part, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( slotCompleted() ) );
}
}
if ( m_part ) {
- connect( m_part, SIGNAL( canceled(const QString &) ),
- this, SLOT( slotCompleted() ) );
+ connect( m_part, TQT_SIGNAL( canceled(const TQString &) ),
+ this, TQT_SLOT( slotCompleted() ) );
}
return m_part;
}
diff --git a/kdesktop/kwebdesktop/kwebdesktop.h b/kdesktop/kwebdesktop/kwebdesktop.h
index d364f8022..7ec81338e 100644
--- a/kdesktop/kwebdesktop/kwebdesktop.h
+++ b/kdesktop/kwebdesktop/kwebdesktop.h
@@ -19,8 +19,8 @@
#ifndef KWEBDESKTOP_H
#define KWEBDESKTOP_H
-#include <qobject.h>
-#include <qcstring.h>
+#include <tqobject.h>
+#include <tqcstring.h>
#include <kparts/browserextension.h>
#include <khtml_part.h>
@@ -30,22 +30,22 @@ class KWebDesktop : public QObject
{
Q_OBJECT
public:
- KWebDesktop( QObject* parent, const QCString & imageFile, int width, int height )
- : QObject( parent ),
+ KWebDesktop( TQObject* parent, const TQCString & imageFile, int width, int height )
+ : TQObject( parent ),
m_part( 0 ),
m_imageFile( imageFile ),
m_width( width ),
m_height( height ) {}
~KWebDesktop();
- KParts::ReadOnlyPart* createPart( const QString& mimeType );
+ KParts::ReadOnlyPart* createPart( const TQString& mimeType );
private slots:
void slotCompleted();
private:
KParts::ReadOnlyPart* m_part;
- QCString m_imageFile;
+ TQCString m_imageFile;
int m_width;
int m_height;
};
@@ -59,7 +59,7 @@ public:
~KWebDesktopRun() {}
protected slots:
- void slotMimetype( KIO::Job *job, const QString &_type );
+ void slotMimetype( KIO::Job *job, const TQString &_type );
void slotFinished( KIO::Job * job );
private:
diff --git a/kdesktop/lock/autologout.cc b/kdesktop/lock/autologout.cc
index f351fe2e7..b51791d98 100644
--- a/kdesktop/lock/autologout.cc
+++ b/kdesktop/lock/autologout.cc
@@ -17,39 +17,39 @@
#include <kmessagebox.h>
#include <kdialog.h>
-#include <qlayout.h>
-#include <qmessagebox.h>
-#include <qlabel.h>
-#include <qstyle.h>
-#include <qapplication.h>
-#include <qdialog.h>
-#include <qprogressbar.h>
+#include <tqlayout.h>
+#include <tqmessagebox.h>
+#include <tqlabel.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
+#include <tqdialog.h>
+#include <tqprogressbar.h>
#define COUNTDOWN 30
-AutoLogout::AutoLogout(LockProcess *parent) : QDialog(parent, "password dialog", true, WX11BypassWM)
+AutoLogout::AutoLogout(LockProcess *parent) : TQDialog(parent, "password dialog", true, WX11BypassWM)
{
- frame = new QFrame(this);
- frame->setFrameStyle(QFrame::Panel | QFrame::Raised);
+ frame = new TQFrame(this);
+ frame->setFrameStyle(TQFrame::Panel | TQFrame::Raised);
frame->setLineWidth(2);
- QLabel *pixLabel = new QLabel( frame, "pixlabel" );
+ TQLabel *pixLabel = new TQLabel( frame, "pixlabel" );
pixLabel->setPixmap(DesktopIcon("exit"));
- QLabel *greetLabel = new QLabel(i18n("<nobr><qt><b>Automatic Log Out</b></qt><nobr>"), frame);
- QLabel *infoLabel = new QLabel(i18n("<qt>To prevent being logged out, resume using this session by moving the mouse or pressing a key.</qt>"), frame);
+ TQLabel *greetLabel = new TQLabel(i18n("<nobr><qt><b>Automatic Log Out</b></qt><nobr>"), frame);
+ TQLabel *infoLabel = new TQLabel(i18n("<qt>To prevent being logged out, resume using this session by moving the mouse or pressing a key.</qt>"), frame);
- mStatusLabel = new QLabel("<b> </b>", frame);
- mStatusLabel->setAlignment(QLabel::AlignCenter);
+ mStatusLabel = new TQLabel("<b> </b>", frame);
+ mStatusLabel->setAlignment(TQLabel::AlignCenter);
- QLabel *mProgressLabel = new QLabel("Time Remaining:", frame);
- mProgressRemaining = new QProgressBar(frame);
+ TQLabel *mProgressLabel = new TQLabel("Time Remaining:", frame);
+ mProgressRemaining = new TQProgressBar(frame);
mProgressRemaining->setPercentageVisible(false);
- QVBoxLayout *unlockDialogLayout = new QVBoxLayout( this );
+ TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this );
unlockDialogLayout->addWidget( frame );
- frameLayout = new QGridLayout(frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint());
+ frameLayout = new TQGridLayout(frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint());
frameLayout->addMultiCellWidget(pixLabel, 0, 2, 0, 0, Qt::AlignCenter | Qt::AlignTop);
frameLayout->addWidget(greetLabel, 0, 1);
frameLayout->addWidget(mStatusLabel, 1, 1);
@@ -66,7 +66,7 @@ AutoLogout::AutoLogout(LockProcess *parent) : QDialog(parent, "password dialog",
mCountdownTimerId = startTimer(1000/25);
- connect(qApp, SIGNAL(activity()), SLOT(slotActivity()));
+ connect(qApp, TQT_SIGNAL(activity()), TQT_SLOT(slotActivity()));
}
AutoLogout::~AutoLogout()
@@ -82,7 +82,7 @@ void AutoLogout::updateInfo(int timeout)
mProgressRemaining->setProgress(timeout);
}
-void AutoLogout::timerEvent(QTimerEvent *ev)
+void AutoLogout::timerEvent(TQTimerEvent *ev)
{
if (ev->timerId() == mCountdownTimerId)
{
@@ -108,8 +108,8 @@ void AutoLogout::logout()
void AutoLogout::show()
{
- QDialog::show();
- QApplication::flushX();
+ TQDialog::show();
+ TQApplication::flushX();
}
#include "autologout.moc"
diff --git a/kdesktop/lock/autologout.h b/kdesktop/lock/autologout.h
index e48716575..20c7afc6c 100644
--- a/kdesktop/lock/autologout.h
+++ b/kdesktop/lock/autologout.h
@@ -9,9 +9,9 @@
#ifndef __TIMEOUT_H__
#define __TIMEOUT_H__
-#include <qstringlist.h>
+#include <tqstringlist.h>
-#include <qlayout.h>
+#include <tqlayout.h>
class LockProcess;
class QFrame;
@@ -30,20 +30,20 @@ public:
virtual void show();
protected:
- virtual void timerEvent(QTimerEvent *);
+ virtual void timerEvent(TQTimerEvent *);
private slots:
void slotActivity();
private:
void updateInfo(int);
- QFrame *frame;
- QGridLayout *frameLayout;
- QLabel *mStatusLabel;
+ TQFrame *frame;
+ TQGridLayout *frameLayout;
+ TQLabel *mStatusLabel;
int mCountdownTimerId;
int mRemaining;
- QTimer countDownTimer;
- QProgressBar *mProgressRemaining;
+ TQTimer countDownTimer;
+ TQProgressBar *mProgressRemaining;
void logout();
};
diff --git a/kdesktop/lock/infodlg.cc b/kdesktop/lock/infodlg.cc
index 66b54c0bc..2249dc46e 100644
--- a/kdesktop/lock/infodlg.cc
+++ b/kdesktop/lock/infodlg.cc
@@ -25,18 +25,18 @@
#include <dcopref.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qmessagebox.h>
-#include <qsimplerichtext.h>
-#include <qlabel.h>
-#include <qstringlist.h>
-#include <qfontmetrics.h>
-#include <qstyle.h>
-#include <qapplication.h>
-#include <qlistview.h>
-#include <qheader.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqmessagebox.h>
+#include <tqsimplerichtext.h>
+#include <tqlabel.h>
+#include <tqstringlist.h>
+#include <tqfontmetrics.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
+#include <tqlistview.h>
+#include <tqheader.h>
+#include <tqcheckbox.h>
#include <ctype.h>
#include <unistd.h>
@@ -59,28 +59,28 @@
// Simple dialog for displaying an unlock status or recurring error message
//
InfoDlg::InfoDlg(LockProcess *parent)
- : QDialog(parent, "information dialog", true, WX11BypassWM),
+ : TQDialog(parent, "information dialog", true, WX11BypassWM),
mUnlockingFailed(false)
{
- frame = new QFrame( this );
- frame->setFrameStyle( QFrame::Panel | QFrame::Raised );
+ frame = new TQFrame( this );
+ frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
frame->setLineWidth( 2 );
- mpixLabel = new QLabel( frame, "pixlabel" );
+ mpixLabel = new TQLabel( frame, "pixlabel" );
mpixLabel->setPixmap(DesktopIcon("unlock"));
KUser user;
- mStatusLabel = new QLabel( "<b> </b>", frame );
- mStatusLabel->setAlignment( QLabel::AlignCenter );
+ mStatusLabel = new TQLabel( "<b> </b>", frame );
+ mStatusLabel->setAlignment( TQLabel::AlignCenter );
- QVBoxLayout *unlockDialogLayout = new QVBoxLayout( this );
+ TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this );
unlockDialogLayout->addWidget( frame );
- QHBoxLayout *layStatus = new QHBoxLayout( 0, 0, KDialog::spacingHint());
+ TQHBoxLayout *layStatus = new TQHBoxLayout( 0, 0, KDialog::spacingHint());
layStatus->addWidget( mStatusLabel );
- frameLayout = new QGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
+ frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
frameLayout->addMultiCellWidget( mpixLabel, 0, 2, 0, 0, AlignTop );
frameLayout->addLayout( layStatus, 1, 1 );
@@ -92,7 +92,7 @@ InfoDlg::~InfoDlg()
hide();
}
-void InfoDlg::updateLabel(QString &txt)
+void InfoDlg::updateLabel(TQString &txt)
{
mStatusLabel->setPaletteForegroundColor(Qt::black);
mStatusLabel->setText("<b>" + txt + "</b>");
@@ -125,8 +125,8 @@ void InfoDlg::setErrorIcon()
void InfoDlg::show()
{
- QDialog::show();
- QApplication::flushX();
+ TQDialog::show();
+ TQApplication::flushX();
}
#include "infodlg.moc"
diff --git a/kdesktop/lock/infodlg.h b/kdesktop/lock/infodlg.h
index ffe8364c2..b0e98150f 100644
--- a/kdesktop/lock/infodlg.h
+++ b/kdesktop/lock/infodlg.h
@@ -8,8 +8,8 @@
#ifndef __INFODLG_H__
#define __INFODLG_H__
-#include <qdialog.h>
-#include <qstringlist.h>
+#include <tqdialog.h>
+#include <tqstringlist.h>
class QFrame;
class QGridLayout;
@@ -31,7 +31,7 @@ public:
~InfoDlg();
virtual void show();
- void updateLabel( QString &txt );
+ void updateLabel( TQString &txt );
void setUnlockIcon();
void setKDEIcon();
void setInfoIcon();
@@ -39,14 +39,14 @@ public:
void setErrorIcon();
private:
- QFrame *frame;
- QGridLayout *frameLayout;
- QLabel *mStatusLabel;
- QLabel *mpixLabel;
+ TQFrame *frame;
+ TQGridLayout *frameLayout;
+ TQLabel *mStatusLabel;
+ TQLabel *mpixLabel;
int mCapsLocked;
bool mUnlockingFailed;
- QStringList layoutsList;
- QStringList::iterator currLayout;
+ TQStringList layoutsList;
+ TQStringList::iterator currLayout;
int sPid, sFd;
};
diff --git a/kdesktop/lock/lockdlg.cc b/kdesktop/lock/lockdlg.cc
index 8006cf29d..2efe56a8a 100644
--- a/kdesktop/lock/lockdlg.cc
+++ b/kdesktop/lock/lockdlg.cc
@@ -29,18 +29,18 @@
#include <dcopref.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qmessagebox.h>
-#include <qsimplerichtext.h>
-#include <qlabel.h>
-#include <qstringlist.h>
-#include <qfontmetrics.h>
-#include <qstyle.h>
-#include <qapplication.h>
-#include <qlistview.h>
-#include <qheader.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqmessagebox.h>
+#include <tqsimplerichtext.h>
+#include <tqlabel.h>
+#include <tqstringlist.h>
+#include <tqfontmetrics.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
+#include <tqlistview.h>
+#include <tqheader.h>
+#include <tqcheckbox.h>
#include <ctype.h>
#include <unistd.h>
@@ -65,27 +65,27 @@
// Simple dialog for entering a password.
//
PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin)
- : QDialog(parent, "password dialog", true, WX11BypassWM),
+ : TQDialog(parent, "password dialog", true, WX11BypassWM),
mPlugin( plugin ),
mCapsLocked(-1),
mUnlockingFailed(false)
{
- frame = new QFrame( this );
- frame->setFrameStyle( QFrame::Panel | QFrame::Raised );
+ frame = new TQFrame( this );
+ frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
frame->setLineWidth( 2 );
- QLabel *pixLabel = new QLabel( frame, "pixlabel" );
+ TQLabel *pixLabel = new TQLabel( frame, "pixlabel" );
pixLabel->setPixmap(DesktopIcon("lock"));
KUser user;
- QLabel *greetLabel = new QLabel( user.fullName().isEmpty() ?
+ TQLabel *greetLabel = new TQLabel( user.fullName().isEmpty() ?
i18n("<nobr><b>The session is locked</b><br>") :
i18n("<nobr><b>The session was locked by %1</b><br>").arg( user.fullName() ), frame );
- mStatusLabel = new QLabel( "<b> </b>", frame );
- mStatusLabel->setAlignment( QLabel::AlignCenter );
+ mStatusLabel = new TQLabel( "<b> </b>", frame );
+ mStatusLabel->setAlignment( TQLabel::AlignCenter );
- mLayoutButton = new QPushButton( frame );
+ mLayoutButton = new TQPushButton( frame );
mLayoutButton->setFlat( true );
KSeparator *sep = new KSeparator( KSeparator::HLine, frame );
@@ -94,24 +94,24 @@ PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin)
ok = new KPushButton( i18n("Unl&ock"), frame );
cancel = new KPushButton( KStdGuiItem::cancel(), frame );
- greet = plugin->info->create( this, 0, this, mLayoutButton, QString::null,
+ greet = plugin->info->create( this, 0, this, mLayoutButton, TQString::null,
KGreeterPlugin::Authenticate, KGreeterPlugin::ExUnlock );
- QVBoxLayout *unlockDialogLayout = new QVBoxLayout( this );
+ TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this );
unlockDialogLayout->addWidget( frame );
- QHBoxLayout *layStatus = new QHBoxLayout( 0, 0, KDialog::spacingHint());
+ TQHBoxLayout *layStatus = new TQHBoxLayout( 0, 0, KDialog::spacingHint());
layStatus->addWidget( mStatusLabel );
layStatus->addWidget( mLayoutButton );
- QHBoxLayout *layButtons = new QHBoxLayout( 0, 0, KDialog::spacingHint());
+ TQHBoxLayout *layButtons = new TQHBoxLayout( 0, 0, KDialog::spacingHint());
layButtons->addWidget( mNewSessButton );
layButtons->addStretch();
layButtons->addWidget( ok );
layButtons->addWidget( cancel );
- frameLayout = new QGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
+ frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
frameLayout->addMultiCellWidget( pixLabel, 0, 2, 0, 0, AlignTop );
frameLayout->addWidget( greetLabel, 0, 1 );
frameLayout->addItem( greet->getLayoutItem(), 1, 1 );
@@ -123,10 +123,10 @@ PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin)
setTabOrder( cancel, mNewSessButton );
setTabOrder( mNewSessButton, mLayoutButton );
- connect(mLayoutButton, SIGNAL(clicked()), this, SLOT(layoutClicked()));
- connect(cancel, SIGNAL(clicked()), SLOT(reject()));
- connect(ok, SIGNAL(clicked()), SLOT(slotOK()));
- connect(mNewSessButton, SIGNAL(clicked()), SLOT(slotSwitchUser()));
+ connect(mLayoutButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(layoutClicked()));
+ connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
+ connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(slotOK()));
+ connect(mNewSessButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotSwitchUser()));
if (!DM().isSwitchable() || !kapp->authorize("switch_user"))
mNewSessButton->hide();
@@ -135,14 +135,14 @@ PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin)
mFailedTimerId = 0;
mTimeoutTimerId = startTimer(PASSDLG_HIDE_TIMEOUT);
- connect(qApp, SIGNAL(activity()), SLOT(slotActivity()) );
+ connect(qApp, TQT_SIGNAL(activity()), TQT_SLOT(slotActivity()) );
greet->start();
DCOPRef kxkb("kxkb", "kxkb");
if( !kxkb.isNull() ) {
layoutsList = kxkb.call("getLayoutsList");
- QString currentLayout = kxkb.call("getCurrentLayout");
+ TQString currentLayout = kxkb.call("getCurrentLayout");
if( !currentLayout.isEmpty() && layoutsList.count() > 1 ) {
currLayout = layoutsList.find(currentLayout);
if (currLayout == layoutsList.end())
@@ -175,11 +175,11 @@ void PasswordDlg::layoutClicked()
}
-void PasswordDlg::setLayoutText( const QString &txt )
+void PasswordDlg::setLayoutText( const TQString &txt )
{
mLayoutButton->setText( txt );
- QSize sz = mLayoutButton->fontMetrics().size( 0, txt );
- int mrg = mLayoutButton->style().pixelMetric( QStyle::PM_ButtonMargin ) * 2;
+ TQSize sz = mLayoutButton->fontMetrics().size( 0, txt );
+ int mrg = mLayoutButton->style().pixelMetric( TQStyle::PM_ButtonMargin ) * 2;
mLayoutButton->setFixedSize( sz.width() + mrg, sz.height() + mrg );
}
@@ -206,7 +206,7 @@ void PasswordDlg::updateLabel()
//
// Handle timer events.
//
-void PasswordDlg::timerEvent(QTimerEvent *ev)
+void PasswordDlg::timerEvent(TQTimerEvent *ev)
{
if (ev->timerId() == mTimeoutTimerId)
{
@@ -227,9 +227,9 @@ void PasswordDlg::timerEvent(QTimerEvent *ev)
}
}
-bool PasswordDlg::eventFilter(QObject *, QEvent *ev)
+bool PasswordDlg::eventFilter(TQObject *, TQEvent *ev)
{
- if (ev->type() == QEvent::KeyPress || ev->type() == QEvent::KeyRelease)
+ if (ev->type() == TQEvent::KeyPress || ev->type() == TQEvent::KeyRelease)
capsLocked();
return false;
}
@@ -371,14 +371,14 @@ void PasswordDlg::handleVerify()
if (!GRecvArr( &arr ))
break;
if (!greet->textMessage( arr, false ))
- static_cast< LockProcess* >(parent())->msgBox( QMessageBox::Information, QString::fromLocal8Bit( arr ) );
+ static_cast< LockProcess* >(parent())->msgBox( TQMessageBox::Information, TQString::fromLocal8Bit( arr ) );
::free( arr );
continue;
case ConvPutError:
if (!GRecvArr( &arr ))
break;
if (!greet->textMessage( arr, true ))
- static_cast< LockProcess* >(parent())->msgBox( QMessageBox::Warning, QString::fromLocal8Bit( arr ) );
+ static_cast< LockProcess* >(parent())->msgBox( TQMessageBox::Warning, TQString::fromLocal8Bit( arr ) );
::free( arr );
continue;
}
@@ -411,7 +411,7 @@ void PasswordDlg::gplugReturnBinary( const char *data )
handleVerify();
}
-void PasswordDlg::gplugSetUser( const QString & )
+void PasswordDlg::gplugSetUser( const TQString & )
{
// ignore ...
}
@@ -419,7 +419,7 @@ void PasswordDlg::gplugSetUser( const QString & )
void PasswordDlg::cantCheck()
{
greet->failed();
- static_cast< LockProcess* >(parent())->msgBox( QMessageBox::Critical,
+ static_cast< LockProcess* >(parent())->msgBox( TQMessageBox::Critical,
i18n("Cannot unlock the session because the authentication system failed to work;\n"
"you must kill kdesktop_lock (pid %1) manually.").arg(getpid()) );
greet->revive();
@@ -466,24 +466,24 @@ void PasswordDlg::gplugActivity()
slotActivity();
}
-void PasswordDlg::gplugMsgBox( QMessageBox::Icon type, const QString &text )
+void PasswordDlg::gplugMsgBox( TQMessageBox::Icon type, const TQString &text )
{
- QDialog dialog( this, 0, true, WX11BypassWM );
- QFrame *winFrame = new QFrame( &dialog );
- winFrame->setFrameStyle( QFrame::WinPanel | QFrame::Raised );
+ TQDialog dialog( this, 0, true, WX11BypassWM );
+ TQFrame *winFrame = new TQFrame( &dialog );
+ winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
winFrame->setLineWidth( 2 );
- QVBoxLayout *vbox = new QVBoxLayout( &dialog );
+ TQVBoxLayout *vbox = new TQVBoxLayout( &dialog );
vbox->addWidget( winFrame );
- QLabel *label1 = new QLabel( winFrame );
- label1->setPixmap( QMessageBox::standardIcon( type ) );
- QLabel *label2 = new QLabel( text, winFrame );
+ TQLabel *label1 = new TQLabel( winFrame );
+ label1->setPixmap( TQMessageBox::standardIcon( type ) );
+ TQLabel *label2 = new TQLabel( text, winFrame );
KPushButton *button = new KPushButton( KStdGuiItem::ok(), winFrame );
button->setDefault( true );
- button->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
- connect( button, SIGNAL( clicked() ), SLOT( accept() ) );
+ button->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) );
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( accept() ) );
- QGridLayout *grid = new QGridLayout( winFrame, 2, 2, 10 );
+ TQGridLayout *grid = new TQGridLayout( winFrame, 2, 2, 10 );
grid->addWidget( label1, 0, 0, Qt::AlignCenter );
grid->addWidget( label2, 0, 1, Qt::AlignCenter );
grid->addMultiCellWidget( button, 1,1, 0,1, Qt::AlignCenter );
@@ -499,8 +499,8 @@ void PasswordDlg::slotOK()
void PasswordDlg::show()
{
- QDialog::show();
- QApplication::flushX();
+ TQDialog::show();
+ TQApplication::flushX();
}
void PasswordDlg::slotStartNewSession()
@@ -513,16 +513,16 @@ void PasswordDlg::slotStartNewSession()
killTimer(mTimeoutTimerId);
mTimeoutTimerId = 0;
- QDialog *dialog = new QDialog( this, "warnbox", true, WX11BypassWM );
- QFrame *winFrame = new QFrame( dialog );
- winFrame->setFrameStyle( QFrame::WinPanel | QFrame::Raised );
+ TQDialog *dialog = new TQDialog( this, "warnbox", true, WX11BypassWM );
+ TQFrame *winFrame = new TQFrame( dialog );
+ winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
winFrame->setLineWidth( 2 );
- QVBoxLayout *vbox = new QVBoxLayout( dialog );
+ TQVBoxLayout *vbox = new TQVBoxLayout( dialog );
vbox->addWidget( winFrame );
- QLabel *label1 = new QLabel( winFrame );
- label1->setPixmap( QMessageBox::standardIcon( QMessageBox::Warning ) );
- QString qt_text =
+ TQLabel *label1 = new TQLabel( winFrame );
+ label1->setPixmap( TQMessageBox::standardIcon( TQMessageBox::Warning ) );
+ TQString qt_text =
i18n("You have chosen to open another desktop session "
"instead of resuming the current one.<br>"
"The current session will be hidden "
@@ -535,23 +535,23 @@ void PasswordDlg::slotStartNewSession()
"Additionally, the KDE Panel and Desktop menus have "
"actions for switching between sessions.")
.arg(7).arg(8);
- QLabel *label2 = new QLabel( qt_text, winFrame );
+ TQLabel *label2 = new TQLabel( qt_text, winFrame );
KPushButton *okbutton = new KPushButton( KGuiItem(i18n("&Start New Session"), "fork"), winFrame );
okbutton->setDefault( true );
- connect( okbutton, SIGNAL( clicked() ), dialog, SLOT( accept() ) );
+ connect( okbutton, TQT_SIGNAL( clicked() ), dialog, TQT_SLOT( accept() ) );
KPushButton *cbutton = new KPushButton( KStdGuiItem::cancel(), winFrame );
- connect( cbutton, SIGNAL( clicked() ), dialog, SLOT( reject() ) );
+ connect( cbutton, TQT_SIGNAL( clicked() ), dialog, TQT_SLOT( reject() ) );
- QBoxLayout *mbox = new QVBoxLayout( winFrame, KDialog::marginHint(), KDialog::spacingHint() );
+ TQBoxLayout *mbox = new TQVBoxLayout( winFrame, KDialog::marginHint(), KDialog::spacingHint() );
- QGridLayout *grid = new QGridLayout( mbox, 2, 2, 2 * KDialog::spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( mbox, 2, 2, 2 * KDialog::spacingHint() );
grid->setMargin( KDialog::marginHint() );
grid->addWidget( label1, 0, 0, Qt::AlignCenter );
grid->addWidget( label2, 0, 1, Qt::AlignCenter );
- QCheckBox *cb = new QCheckBox( i18n("&Do not ask again"), winFrame );
+ TQCheckBox *cb = new TQCheckBox( i18n("&Do not ask again"), winFrame );
grid->addMultiCellWidget( cb, 1,1, 0,1 );
- QBoxLayout *hbox = new QHBoxLayout( mbox, KDialog::spacingHint() );
+ TQBoxLayout *hbox = new TQHBoxLayout( mbox, KDialog::spacingHint() );
hbox->addStretch( 1 );
hbox->addWidget( okbutton );
hbox->addStretch( 1 );
@@ -563,8 +563,8 @@ void PasswordDlg::slotStartNewSession()
int pref_height = 0;
// Calculate a proper size for the text.
{
- QSimpleRichText rt(qt_text, dialog->font());
- QRect rect = KGlobalSettings::desktopGeometry(dialog);
+ TQSimpleRichText rt(qt_text, dialog->font());
+ TQRect rect = KGlobalSettings::desktopGeometry(dialog);
pref_width = rect.width() / 3;
rt.setWidth(pref_width);
@@ -593,13 +593,13 @@ void PasswordDlg::slotStartNewSession()
pref_width = used_width;
}
}
- label2->setFixedSize(QSize(pref_width+10, pref_height));
+ label2->setFixedSize(TQSize(pref_width+10, pref_height));
int ret = static_cast< LockProcess* >( parent())->execDialog( dialog );
delete dialog;
- if (ret == QDialog::Accepted) {
+ if (ret == TQDialog::Accepted) {
if (cb->isChecked())
KMessageBox::saveDontShowAgainContinue( ":confirmNewSession" );
DM().startReserve();
@@ -608,11 +608,11 @@ void PasswordDlg::slotStartNewSession()
mTimeoutTimerId = startTimer(PASSDLG_HIDE_TIMEOUT);
}
-class LockListViewItem : public QListViewItem {
+class LockListViewItem : public TQListViewItem {
public:
- LockListViewItem( QListView *parent,
- const QString &sess, const QString &loc, int _vt )
- : QListViewItem( parent )
+ LockListViewItem( TQListView *parent,
+ const TQString &sess, const TQString &loc, int _vt )
+ : TQListViewItem( parent )
, vt( _vt )
{
setText( 0, sess );
@@ -627,33 +627,33 @@ void PasswordDlg::slotSwitchUser()
int p = 0;
DM dm;
- QDialog dialog( this, "sessbox", true, WX11BypassWM );
- QFrame *winFrame = new QFrame( &dialog );
- winFrame->setFrameStyle( QFrame::WinPanel | QFrame::Raised );
+ TQDialog dialog( this, "sessbox", true, WX11BypassWM );
+ TQFrame *winFrame = new TQFrame( &dialog );
+ winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
winFrame->setLineWidth( 2 );
- QBoxLayout *vbox = new QVBoxLayout( &dialog );
+ TQBoxLayout *vbox = new TQVBoxLayout( &dialog );
vbox->addWidget( winFrame );
- QBoxLayout *hbox = new QHBoxLayout( winFrame, KDialog::marginHint(), KDialog::spacingHint() );
+ TQBoxLayout *hbox = new TQHBoxLayout( winFrame, KDialog::marginHint(), KDialog::spacingHint() );
- QBoxLayout *vbox1 = new QVBoxLayout( hbox, KDialog::spacingHint() );
- QBoxLayout *vbox2 = new QVBoxLayout( hbox, KDialog::spacingHint() );
+ TQBoxLayout *vbox1 = new TQVBoxLayout( hbox, KDialog::spacingHint() );
+ TQBoxLayout *vbox2 = new TQVBoxLayout( hbox, KDialog::spacingHint() );
KPushButton *btn;
SessList sess;
if (dm.localSessions( sess )) {
- lv = new QListView( winFrame );
- connect( lv, SIGNAL(doubleClicked(QListViewItem *, const QPoint&, int)), SLOT(slotSessionActivated()) );
- connect( lv, SIGNAL(doubleClicked(QListViewItem *, const QPoint&, int)), &dialog, SLOT(reject()) );
+ lv = new TQListView( winFrame );
+ connect( lv, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), TQT_SLOT(slotSessionActivated()) );
+ connect( lv, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), &dialog, TQT_SLOT(reject()) );
lv->setAllColumnsShowFocus( true );
lv->addColumn( i18n("Session") );
lv->addColumn( i18n("Location") );
- lv->setColumnWidthMode( 0, QListView::Maximum );
- lv->setColumnWidthMode( 1, QListView::Maximum );
- QListViewItem *itm = 0;
- QString user, loc;
+ lv->setColumnWidthMode( 0, TQListView::Maximum );
+ lv->setColumnWidthMode( 1, TQListView::Maximum );
+ TQListViewItem *itm = 0;
+ TQString user, loc;
int ns = 0;
for (SessList::ConstIterator it = sess.begin(); it != sess.end(); ++it) {
DM::sess2Str2( *it, user, loc );
@@ -667,17 +667,17 @@ void PasswordDlg::slotSwitchUser()
ns++;
}
int fw = lv->frameWidth() * 2;
- QSize hds( lv->header()->sizeHint() );
+ TQSize hds( lv->header()->sizeHint() );
lv->setMinimumWidth( fw + hds.width() +
- (ns > 10 ? style().pixelMetric(QStyle::PM_ScrollBarExtent) : 0 ) );
+ (ns > 10 ? style().pixelMetric(TQStyle::PM_ScrollBarExtent) : 0 ) );
lv->setFixedHeight( fw + hds.height() +
itm->height() * (ns < 6 ? 6 : ns > 10 ? 10 : ns) );
lv->header()->adjustHeaderSize();
vbox1->addWidget( lv );
btn = new KPushButton( KGuiItem(i18n("session", "&Activate"), "fork"), winFrame );
- connect( btn, SIGNAL(clicked()), SLOT(slotSessionActivated()) );
- connect( btn, SIGNAL(clicked()), &dialog, SLOT(reject()) );
+ connect( btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotSessionActivated()) );
+ connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(reject()) );
vbox2->addWidget( btn );
vbox2->addStretch( 2 );
}
@@ -685,8 +685,8 @@ void PasswordDlg::slotSwitchUser()
if (kapp->authorize("start_new_session") && (p = dm.numReserve()) >= 0)
{
btn = new KPushButton( KGuiItem(i18n("Start &New Session"), "fork"), winFrame );
- connect( btn, SIGNAL(clicked()), SLOT(slotStartNewSession()) );
- connect( btn, SIGNAL(clicked()), &dialog, SLOT(reject()) );
+ connect( btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotStartNewSession()) );
+ connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(reject()) );
if (!p)
btn->setEnabled( false );
vbox2->addWidget( btn );
@@ -694,7 +694,7 @@ void PasswordDlg::slotSwitchUser()
}
btn = new KPushButton( KStdGuiItem::cancel(), winFrame );
- connect( btn, SIGNAL(clicked()), &dialog, SLOT(reject()) );
+ connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(reject()) );
vbox2->addWidget( btn );
static_cast< LockProcess* >(parent())->execDialog( &dialog );
diff --git a/kdesktop/lock/lockdlg.h b/kdesktop/lock/lockdlg.h
index 4bb468c03..592acd7ce 100644
--- a/kdesktop/lock/lockdlg.h
+++ b/kdesktop/lock/lockdlg.h
@@ -11,8 +11,8 @@
#include <kgreeterplugin.h>
-#include <qdialog.h>
-#include <qstringlist.h>
+#include <tqdialog.h>
+#include <tqstringlist.h>
struct GreeterPluginHandle;
class LockProcess;
@@ -27,7 +27,7 @@ class QListView;
// Simple dialog for entering a password.
// It does not handle password validation.
//
-class PasswordDlg : public QDialog, public KGreeterPluginHandler
+class PasswordDlg : public TQDialog, public KGreeterPluginHandler
{
Q_OBJECT
@@ -39,14 +39,14 @@ public:
// from KGreetPluginHandler
virtual void gplugReturnText( const char *text, int tag );
virtual void gplugReturnBinary( const char *data );
- virtual void gplugSetUser( const QString & );
+ virtual void gplugSetUser( const TQString & );
virtual void gplugStart();
virtual void gplugActivity();
- virtual void gplugMsgBox( QMessageBox::Icon type, const QString &text );
+ virtual void gplugMsgBox( TQMessageBox::Icon type, const TQString &text );
protected:
- virtual void timerEvent(QTimerEvent *);
- virtual bool eventFilter(QObject *, QEvent *);
+ virtual void timerEvent(TQTimerEvent *);
+ virtual bool eventFilter(TQObject *, TQEvent *);
private slots:
void slotSwitchUser();
@@ -57,7 +57,7 @@ private slots:
void slotActivity();
private:
- void setLayoutText( const QString &txt );
+ void setLayoutText( const TQString &txt );
void capsLocked();
void updateLabel();
int Reader (void *buf, int count);
@@ -73,19 +73,19 @@ private:
void cantCheck();
GreeterPluginHandle *mPlugin;
KGreeterPlugin *greet;
- QFrame *frame;
- QGridLayout *frameLayout;
- QLabel *mStatusLabel;
+ TQFrame *frame;
+ TQGridLayout *frameLayout;
+ TQLabel *mStatusLabel;
KPushButton *mNewSessButton, *ok, *cancel;
- QPushButton *mLayoutButton;
+ TQPushButton *mLayoutButton;
int mFailedTimerId;
int mTimeoutTimerId;
int mCapsLocked;
bool mUnlockingFailed;
- QStringList layoutsList;
- QStringList::iterator currLayout;
+ TQStringList layoutsList;
+ TQStringList::iterator currLayout;
int sPid, sFd;
- QListView *lv;
+ TQListView *lv;
};
#endif
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index 968eca7d7..d589232a1 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -40,17 +40,17 @@
#include <kpixmapeffect.h>
#include <kpixmap.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcursor.h>
-#include <qtimer.h>
-#include <qfile.h>
-#include <qsocketnotifier.h>
-#include <qvaluevector.h>
-#include <qtooltip.h>
-
-#include <qdatetime.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqsocketnotifier.h>
+#include <tqvaluevector.h>
+#include <tqtooltip.h>
+
+#include <tqdatetime.h>
#include <stdlib.h>
#include <assert.h>
@@ -125,7 +125,7 @@ static void segv_handler(int)
// starting screensaver hacks, and password entry.f
//
LockProcess::LockProcess(bool child, bool useBlankOnly)
- : QWidget(0L, "saver window", WX11BypassWM),
+ : TQWidget(0L, "saver window", WX11BypassWM),
mOpenGLVisual(0),
child_saver(child),
mParent(0),
@@ -155,8 +155,8 @@ LockProcess::LockProcess(bool child, bool useBlankOnly)
mRootWidth = rootAttr.width;
mRootHeight = rootAttr.height;
{ // trigger creation of QToolTipManager, it does XSelectInput() on the root window
- QWidget w;
- QToolTip::add( &w, "foo" );
+ TQWidget w;
+ TQToolTip::add( &w, "foo" );
}
XSelectInput( qt_xdisplay(), qt_xrootwin(),
SubstructureNotifyMask | rootAttr.your_event_mask );
@@ -167,7 +167,7 @@ LockProcess::LockProcess(bool child, bool useBlankOnly)
"System/ScreenSavers/");
// Add KDE specific screensaver path
- QString relPath="System/ScreenSavers/";
+ TQString relPath="System/ScreenSavers/";
KServiceGroup::Ptr servGroup = KServiceGroup::baseGroup( "screensavers");
if (servGroup)
{
@@ -182,15 +182,15 @@ LockProcess::LockProcess(bool child, bool useBlankOnly)
gXA_VROOT = XInternAtom (qt_xdisplay(), "__SWM_VROOT", False);
gXA_SCREENSAVER_VERSION = XInternAtom (qt_xdisplay(), "_SCREENSAVER_VERSION", False);
- connect(&mHackProc, SIGNAL(processExited(KProcess *)),
- SLOT(hackExited(KProcess *)));
+ connect(&mHackProc, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(hackExited(KProcess *)));
- connect(&mSuspendTimer, SIGNAL(timeout()), SLOT(suspend()));
+ connect(&mSuspendTimer, TQT_SIGNAL(timeout()), TQT_SLOT(suspend()));
- QStringList dmopt =
- QStringList::split(QChar(','),
- QString::fromLatin1( ::getenv( "XDM_MANAGED" )));
- for (QStringList::ConstIterator it = dmopt.begin(); it != dmopt.end(); ++it)
+ TQStringList dmopt =
+ TQStringList::split(TQChar(','),
+ TQString::fromLatin1( ::getenv( "XDM_MANAGED" )));
+ for (TQStringList::ConstIterator it = dmopt.begin(); it != dmopt.end(); ++it)
if ((*it).startsWith("method="))
mMethod = (*it).mid(7);
@@ -203,7 +203,7 @@ LockProcess::LockProcess(bool child, bool useBlankOnly)
DPMSInfo(qt_xdisplay(), &state, &on);
if (on)
{
- connect(&mCheckDPMS, SIGNAL(timeout()), SLOT(checkDPMSActive()));
+ connect(&mCheckDPMS, TQT_SIGNAL(timeout()), TQT_SLOT(checkDPMSActive()));
// we can save CPU if we stop it as quickly as possible
// but we waste CPU if we check too often -> so take 10s
mCheckDPMS.start(10000);
@@ -212,7 +212,7 @@ LockProcess::LockProcess(bool child, bool useBlankOnly)
#endif
#if (QT_VERSION-0 >= 0x030200) // XRANDR support
- connect( kapp->desktop(), SIGNAL( resized( int )), SLOT( desktopResized()));
+ connect( kapp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( desktopResized()));
#endif
greetPlugin.library = 0;
@@ -250,7 +250,7 @@ static void sighup_handler(int)
::write( signal_pipe[1], &tmp, 1);
}
-void LockProcess::timerEvent(QTimerEvent *ev)
+void LockProcess::timerEvent(TQTimerEvent *ev)
{
if (mAutoLogout && ev->timerId() == mAutoLogoutTimerId)
{
@@ -271,7 +271,7 @@ void LockProcess::setupPipe()
mPipe_fd = open(FIFO_FILE, O_RDONLY | O_NONBLOCK);
if (mPipe_fd > -1) {
mPipeOpen = true;
- QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) );
+ TQTimer::singleShot( PIPE_CHECK_INTERVAL, this, TQT_SLOT(checkPipe()) );
}
mknod(FIFO_FILE_OUT, S_IFIFO|0600, 0);
@@ -287,7 +287,7 @@ void LockProcess::checkPipe()
{
char readbuf[128];
int numread;
- QString to_display;
+ TQString to_display;
const char * pin_entry;
if (mPipeOpen == true) {
@@ -318,7 +318,7 @@ void LockProcess::checkPipe()
}
mDialogControlLock = false;
// Display info message dialog
- QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) );
+ TQTimer::singleShot( PIPE_CHECK_INTERVAL, this, TQT_SLOT(checkPipe()) );
InfoDlg inDlg( this );
inDlg.updateLabel(to_display);
inDlg.setUnlockIcon();
@@ -339,7 +339,7 @@ void LockProcess::checkPipe()
}
mDialogControlLock = false;
// Display info message dialog
- QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) );
+ TQTimer::singleShot( PIPE_CHECK_INTERVAL, this, TQT_SLOT(checkPipe()) );
InfoDlg inDlg( this );
inDlg.updateLabel(to_display);
if (readbuf[0] == 'K') inDlg.setKDEIcon();
@@ -363,7 +363,7 @@ void LockProcess::checkPipe()
}
mDialogControlLock = false;
// Display query dialog
- QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) );
+ TQTimer::singleShot( PIPE_CHECK_INTERVAL, this, TQT_SLOT(checkPipe()) );
QueryDlg qryDlg( this );
qryDlg.updateLabel(to_display);
qryDlg.setUnlockIcon();
@@ -381,7 +381,7 @@ void LockProcess::checkPipe()
return;
}
}
- QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) );
+ TQTimer::singleShot( PIPE_CHECK_INTERVAL, this, TQT_SLOT(checkPipe()) );
}
}
@@ -414,9 +414,9 @@ void LockProcess::setupSignals()
sigaction(SIGHUP, &act, 0L);
pipe(signal_pipe);
- QSocketNotifier* notif = new QSocketNotifier(signal_pipe[0],
- QSocketNotifier::Read, this );
- connect( notif, SIGNAL(activated(int)), SLOT(signalPipeSignal()));
+ TQSocketNotifier* notif = new TQSocketNotifier(signal_pipe[0],
+ TQSocketNotifier::Read, this );
+ connect( notif, TQT_SIGNAL(activated(int)), TQT_SLOT(signalPipeSignal()));
}
@@ -444,7 +444,7 @@ bool LockProcess::lock()
mBusy = true;
if (startLock())
{
- QTimer::singleShot(1000, this, SLOT(slotDeadTimePassed()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotDeadTimePassed()));
return true;
}
stopSaver();
@@ -464,7 +464,7 @@ bool LockProcess::defaultSave()
mLocked = false;
if (startSaver()) {
if (mLockGrace >= 0)
- QTimer::singleShot(mLockGrace, this, SLOT(startLock()));
+ TQTimer::singleShot(mLockGrace, this, TQT_SLOT(startLock()));
return true;
}
return false;
@@ -527,7 +527,7 @@ void LockProcess::configure()
mPlugins = KDesktopSettings::pluginsUnlock();
if (mPlugins.isEmpty())
- mPlugins = QStringList("classic");
+ mPlugins = TQStringList("classic");
mPluginOptions = KDesktopSettings::pluginOptions();
}
@@ -539,15 +539,15 @@ void LockProcess::readSaver()
{
if (!mSaver.isEmpty())
{
- QString file = locate("scrsav", mSaver);
+ TQString file = locate("scrsav", mSaver);
bool opengl = kapp->authorize("opengl_screensavers");
bool manipulatescreen = kapp->authorize("manipulatescreen_screensavers");
KDesktopFile config(file, true);
if (config.readEntry("X-KDE-Type").utf8())
{
- QString saverType = config.readEntry("X-KDE-Type").utf8();
- QStringList saverTypes = QStringList::split(";", saverType);
+ TQString saverType = config.readEntry("X-KDE-Type").utf8();
+ TQStringList saverTypes = TQStringList::split(";", saverType);
for (uint i = 0; i < saverTypes.count(); i++)
{
if ((saverTypes[i] == "ManipulateScreen") && !manipulatescreen)
@@ -652,7 +652,7 @@ void LockProcess::createSaverWindow()
// set NoBackground so that the saver can capture the current
// screen state if necessary
- setBackgroundMode(QWidget::NoBackground);
+ setBackgroundMode(TQWidget::NoBackground);
setCursor( blankCursor );
setGeometry(0, 0, mRootWidth, mRootHeight);
@@ -677,8 +677,8 @@ void LockProcess::desktopResized()
// This slot needs to be able to execute very rapidly so as to prevent the user's desktop from ever
// being displayed, so we finish the hack restarting/display prettying operations in a separate timed slot
if (resizeTimer == NULL) {
- resizeTimer = new QTimer( this );
- connect( resizeTimer, SIGNAL(timeout()), this, SLOT(doDesktopResizeFinish()) );
+ resizeTimer = new TQTimer( this );
+ connect( resizeTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(doDesktopResizeFinish()) );
}
resizeTimer->start( 100, TRUE ); // 100 millisecond single shot timer; should allow display switching operations to finish before hack is started
}
@@ -817,7 +817,7 @@ void LockProcess::removeVRoot(Window win)
//
bool LockProcess::grabKeyboard()
{
- int rv = XGrabKeyboard( qt_xdisplay(), QApplication::desktop()->winId(),
+ int rv = XGrabKeyboard( qt_xdisplay(), TQApplication::desktop()->winId(),
True, GrabModeAsync, GrabModeAsync, CurrentTime );
return (rv == GrabSuccess);
@@ -832,7 +832,7 @@ bool LockProcess::grabKeyboard()
//
bool LockProcess::grabMouse()
{
- int rv = XGrabPointer( qt_xdisplay(), QApplication::desktop()->winId(),
+ int rv = XGrabPointer( qt_xdisplay(), TQApplication::desktop()->winId(),
True, GRABEVENTS, GrabModeAsync, GrabModeAsync, None,
blankCursor.handle(), CurrentTime );
@@ -898,8 +898,8 @@ bool LockProcess::startSaver()
saveVRoot();
if (mParent) {
- QSocketNotifier *notifier = new QSocketNotifier(mParent, QSocketNotifier::Read, this, "notifier");
- connect(notifier, SIGNAL( activated (int)), SLOT( quitSaver()));
+ TQSocketNotifier *notifier = new TQSocketNotifier(mParent, TQSocketNotifier::Read, this, "notifier");
+ connect(notifier, TQT_SIGNAL( activated (int)), TQT_SLOT( quitSaver()));
}
createSaverWindow();
move(0, 0);
@@ -929,26 +929,26 @@ void LockProcess::stopSaver()
DM().setLock( false );
ungrabInput();
const char *out = "GOAWAY!";
- for (QValueList<int>::ConstIterator it = child_sockets.begin(); it != child_sockets.end(); ++it)
+ for (TQValueList<int>::ConstIterator it = child_sockets.begin(); it != child_sockets.end(); ++it)
write(*it, out, sizeof(out));
}
}
// private static
-QVariant LockProcess::getConf(void *ctx, const char *key, const QVariant &dflt)
+TQVariant LockProcess::getConf(void *ctx, const char *key, const TQVariant &dflt)
{
LockProcess *that = (LockProcess *)ctx;
- QString fkey = QString::fromLatin1( key ) + '=';
- for (QStringList::ConstIterator it = that->mPluginOptions.begin();
+ TQString fkey = TQString::fromLatin1( key ) + '=';
+ for (TQStringList::ConstIterator it = that->mPluginOptions.begin();
it != that->mPluginOptions.end(); ++it)
if ((*it).startsWith( fkey ))
return (*it).mid( fkey.length() );
return dflt;
}
-void LockProcess::cantLock( const QString &txt)
+void LockProcess::cantLock( const TQString &txt)
{
- msgBox( QMessageBox::Critical, i18n("Will not lock the session, as unlocking would be impossible:\n") + txt );
+ msgBox( TQMessageBox::Critical, i18n("Will not lock the session, as unlocking would be impossible:\n") + txt );
}
#if 0 // placeholders for later
@@ -962,9 +962,9 @@ i18n("<i>kcheckpass</i> is unable to operate. Possibly it is not SetUID root.");
//
bool LockProcess::startLock()
{
- for (QStringList::ConstIterator it = mPlugins.begin(); it != mPlugins.end(); ++it) {
+ for (TQStringList::ConstIterator it = mPlugins.begin(); it != mPlugins.end(); ++it) {
GreeterPluginHandle plugin;
- QString path = KLibLoader::self()->findLibrary(
+ TQString path = KLibLoader::self()->findLibrary(
((*it)[0] == '/' ? *it : "kgreet_" + *it ).latin1() );
if (path.isEmpty()) {
kdWarning(1204) << "GreeterPlugin " << *it << " does not exist" << endl;
@@ -1018,10 +1018,10 @@ bool LockProcess::startHack()
mHackProc.clearArguments();
- QTextStream ts(&mSaverExec, IO_ReadOnly);
- QString word;
+ TQTextStream ts(&mSaverExec, IO_ReadOnly);
+ TQString word;
ts >> word;
- QString path = KStandardDirs::findExe(word);
+ TQString path = KStandardDirs::findExe(word);
if (!path.isEmpty())
{
@@ -1089,8 +1089,8 @@ void LockProcess::suspend()
if(!mSuspended)
{
mHackProc.kill(SIGSTOP);
- QApplication::syncX();
- mSavedScreen = QPixmap::grabWindow( winId());
+ TQApplication::syncX();
+ mSavedScreen = TQPixmap::grabWindow( winId());
}
mSuspended = true;
}
@@ -1103,7 +1103,7 @@ void LockProcess::resume( bool force )
{
XForceScreenSaver(qt_xdisplay(), ScreenSaverReset );
bitBlt( this, 0, 0, &mSavedScreen );
- QApplication::syncX();
+ TQApplication::syncX();
mHackProc.kill(SIGCONT);
}
mSuspended = false;
@@ -1124,7 +1124,7 @@ bool LockProcess::checkPass()
int ret = execDialog( &passDlg );
if (mForceReject == true) {
- ret = QDialog::Rejected;
+ ret = TQDialog::Rejected;
}
mForceReject = false;
@@ -1138,7 +1138,7 @@ bool LockProcess::checkPass()
SubstructureNotifyMask | rootAttr.your_event_mask );
}
- return ret == QDialog::Accepted;
+ return ret == TQDialog::Accepted;
}
else {
return 0;
@@ -1161,13 +1161,13 @@ static void fakeFocusIn( WId window )
XSendEvent( qt_xdisplay(), window, False, NoEventMask, &ev );
}
-int LockProcess::execDialog( QDialog *dlg )
+int LockProcess::execDialog( TQDialog *dlg )
{
currentDialog=dlg;
dlg->adjustSize();
- QRect rect = dlg->geometry();
- rect.moveCenter(KGlobalSettings::desktopGeometry(QCursor::pos()).center());
+ TQRect rect = dlg->geometry();
+ rect.moveCenter(KGlobalSettings::desktopGeometry(TQCursor::pos()).center());
dlg->move( rect.topLeft() );
if (mDialogs.isEmpty())
@@ -1193,14 +1193,14 @@ int LockProcess::execDialog( QDialog *dlg )
void LockProcess::preparePopup()
{
- QWidget *dlg = (QWidget *)sender();
+ TQWidget *dlg = (TQWidget *)sender();
mDialogs.prepend( dlg );
fakeFocusIn( dlg->winId() );
}
void LockProcess::cleanupPopup()
{
- QWidget *dlg = (QWidget *)sender();
+ TQWidget *dlg = (TQWidget *)sender();
mDialogs.remove( dlg );
fakeFocusIn( mDialogs.first()->winId() );
}
@@ -1208,7 +1208,7 @@ void LockProcess::cleanupPopup()
void LockProcess::doFunctionKeyBroadcast() {
// Provide a clean, pretty display switch by hiding the password dialog here
mBusy=true;
- QTimer::singleShot(1000, this, SLOT(slotDeadTimePassed()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotDeadTimePassed()));
if (mkeyCode == XKeysymToKeycode(qt_xdisplay(), XF86XK_Display)) {
while (mDialogControlLock == true) sleep(1);
mDialogControlLock = true;
@@ -1244,7 +1244,7 @@ bool LockProcess::x11Event(XEvent *event)
(event->xkey.keycode == XKeysymToKeycode(event->xkey.display, XF86XK_AudioRaiseVolume)) || \
(event->xkey.keycode == XKeysymToKeycode(event->xkey.display, XF86XK_AudioLowerVolume))) {
mkeyCode = event->xkey.keycode;
- QTimer::singleShot( 100, this, SLOT(doFunctionKeyBroadcast()) );
+ TQTimer::singleShot( 100, this, TQT_SLOT(doFunctionKeyBroadcast()) );
return true;
}
}
@@ -1330,7 +1330,7 @@ void LockProcess::stayOnTop()
// and stack others below it
Window* stack = new Window[ mDialogs.count() + 1 ];
int count = 0;
- for( QValueList< QWidget* >::ConstIterator it = mDialogs.begin();
+ for( TQValueList< TQWidget* >::ConstIterator it = mDialogs.begin();
it != mDialogs.end();
++it )
stack[ count++ ] = (*it)->winId();
@@ -1404,23 +1404,23 @@ void LockProcess::unlockXF86()
}
#endif
-void LockProcess::msgBox( QMessageBox::Icon type, const QString &txt )
+void LockProcess::msgBox( TQMessageBox::Icon type, const TQString &txt )
{
- QDialog box( 0, "messagebox", true, WX11BypassWM );
- QFrame *winFrame = new QFrame( &box );
- winFrame->setFrameStyle( QFrame::WinPanel | QFrame::Raised );
+ TQDialog box( 0, "messagebox", true, WX11BypassWM );
+ TQFrame *winFrame = new TQFrame( &box );
+ winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
winFrame->setLineWidth( 2 );
- QLabel *label1 = new QLabel( winFrame );
- label1->setPixmap( QMessageBox::standardIcon( type ) );
- QLabel *label2 = new QLabel( txt, winFrame );
+ TQLabel *label1 = new TQLabel( winFrame );
+ label1->setPixmap( TQMessageBox::standardIcon( type ) );
+ TQLabel *label2 = new TQLabel( txt, winFrame );
KPushButton *button = new KPushButton( KStdGuiItem::ok(), winFrame );
button->setDefault( true );
- button->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
- connect( button, SIGNAL( clicked() ), &box, SLOT( accept() ) );
+ button->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) );
+ connect( button, TQT_SIGNAL( clicked() ), &box, TQT_SLOT( accept() ) );
- QVBoxLayout *vbox = new QVBoxLayout( &box );
+ TQVBoxLayout *vbox = new TQVBoxLayout( &box );
vbox->addWidget( winFrame );
- QGridLayout *grid = new QGridLayout( winFrame, 2, 2, 10 );
+ TQGridLayout *grid = new TQGridLayout( winFrame, 2, 2, 10 );
grid->addWidget( label1, 0, 0, Qt::AlignCenter );
grid->addWidget( label2, 0, 1, Qt::AlignCenter );
grid->addMultiCellWidget( button, 1,1, 0,1, Qt::AlignCenter );
diff --git a/kdesktop/lock/lockprocess.h b/kdesktop/lock/lockprocess.h
index e99034c71..cdbeb0da1 100644
--- a/kdesktop/lock/lockprocess.h
+++ b/kdesktop/lock/lockprocess.h
@@ -14,11 +14,11 @@
#include <kprocess.h>
#include <kpixmap.h>
-#include <qwidget.h>
-#include <qtimer.h>
-#include <qvaluestack.h>
-#include <qmessagebox.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
+#include <tqvaluestack.h>
+#include <tqmessagebox.h>
+#include <tqpixmap.h>
#include <X11/Xlib.h>
@@ -53,11 +53,11 @@ public:
bool dontLock();
- void setChildren(QValueList<int> children) { child_sockets = children; }
+ void setChildren(TQValueList<int> children) { child_sockets = children; }
void setParent(int fd) { mParent = fd; }
- void msgBox( QMessageBox::Icon type, const QString &txt );
- int execDialog( QDialog* dlg );
+ void msgBox( TQMessageBox::Icon type, const TQString &txt );
+ int execDialog( TQDialog* dlg );
public slots:
void quitSaver();
@@ -70,7 +70,7 @@ public slots:
protected:
virtual bool x11Event(XEvent *);
- virtual void timerEvent(QTimerEvent *);
+ virtual void timerEvent(TQTimerEvent *);
private slots:
void hackExited(KProcess *);
@@ -92,7 +92,7 @@ private:
bool grabMouse();
bool grabInput();
void ungrabInput();
- void cantLock(const QString &reason);
+ void cantLock(const TQString &reason);
bool startSaver();
void stopSaver();
bool startHack();
@@ -104,7 +104,7 @@ private:
void lockXF86();
void unlockXF86();
void resume( bool force );
- static QVariant getConf(void *ctx, const char *key, const QVariant &dflt);
+ static TQVariant getConf(void *ctx, const char *key, const TQVariant &dflt);
bool mLocked;
int mLockGrace;
@@ -113,30 +113,30 @@ private:
KProcess mHackProc;
int mRootWidth;
int mRootHeight;
- QString mSaverExec;
- QString mSaver;
+ TQString mSaverExec;
+ TQString mSaver;
bool mOpenGLVisual;
bool child_saver;
- QValueList<int> child_sockets;
+ TQValueList<int> child_sockets;
int mParent;
bool mUseBlankOnly;
bool mSuspended;
- QTimer mSuspendTimer;
+ TQTimer mSuspendTimer;
bool mVisibility;
bool mDPMSDepend;
- QTimer mCheckDPMS;
- QValueStack< QWidget* > mDialogs;
+ TQTimer mCheckDPMS;
+ TQValueStack< TQWidget* > mDialogs;
bool mRestoreXF86Lock;
bool mForbidden;
- QStringList mPlugins, mPluginOptions;
- QString mMethod;
+ TQStringList mPlugins, mPluginOptions;
+ TQString mMethod;
GreeterPluginHandle greetPlugin;
- QPixmap mSavedScreen;
+ TQPixmap mSavedScreen;
int mAutoLogoutTimerId;
int mAutoLogoutTimeout;
bool mAutoLogout;
bool mInfoMessageDisplayed;
- QDialog *currentDialog;
+ TQDialog *currentDialog;
bool mDialogControlLock;
bool mForceReject;
@@ -145,7 +145,7 @@ private:
bool mPipeOpen_out;
int mPipe_fd_out;
- QTimer *resizeTimer;
+ TQTimer *resizeTimer;
unsigned int mkeyCode;
};
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc
index b55e67ea6..6e032bebb 100644
--- a/kdesktop/lock/main.cc
+++ b/kdesktop/lock/main.cc
@@ -76,7 +76,7 @@ int main( int argc, char **argv )
bool child = false;
int parent_connection = 0; // socket to the parent saver
- QValueList<int> child_sockets;
+ TQValueList<int> child_sockets;
if (KGlobalSettings::isMultiHead())
{
@@ -91,7 +91,7 @@ int main( int argc, char **argv )
int number_of_screens = ScreenCount(dpy);
starting_screen = kdesktop_screen_number = DefaultScreen(dpy);
int pos;
- QCString display_name = XDisplayString(dpy);
+ TQCString display_name = XDisplayString(dpy);
XCloseDisplay(dpy);
kdDebug() << "screen " << number_of_screens << " " << kdesktop_screen_number << " " << display_name << " " << starting_screen << endl;
dpy = 0;
@@ -99,7 +99,7 @@ int main( int argc, char **argv )
if ((pos = display_name.findRev('.')) != -1)
display_name.remove(pos, 10);
- QCString env;
+ TQCString env;
if (number_of_screens != 1) {
for (int i = 0; i < number_of_screens; i++) {
if (i != starting_screen) {
diff --git a/kdesktop/lock/querydlg.cc b/kdesktop/lock/querydlg.cc
index 7bdedf0e8..d4ad06e88 100644
--- a/kdesktop/lock/querydlg.cc
+++ b/kdesktop/lock/querydlg.cc
@@ -25,18 +25,18 @@
#include <dcopref.h>
#include <kmessagebox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qmessagebox.h>
-#include <qsimplerichtext.h>
-#include <qlabel.h>
-#include <qstringlist.h>
-#include <qfontmetrics.h>
-#include <qstyle.h>
-#include <qapplication.h>
-#include <qlistview.h>
-#include <qheader.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqmessagebox.h>
+#include <tqsimplerichtext.h>
+#include <tqlabel.h>
+#include <tqstringlist.h>
+#include <tqfontmetrics.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
+#include <tqlistview.h>
+#include <tqheader.h>
+#include <tqcheckbox.h>
#include <ctype.h>
#include <unistd.h>
@@ -59,49 +59,49 @@
// Simple dialog for displaying a password/PIN entry dialog
//
QueryDlg::QueryDlg(LockProcess *parent)
- : QDialog(parent, "query dialog", true, WX11BypassWM),
+ : TQDialog(parent, "query dialog", true, WX11BypassWM),
mUnlockingFailed(false)
{
- frame = new QFrame( this );
- frame->setFrameStyle( QFrame::Panel | QFrame::Raised );
+ frame = new TQFrame( this );
+ frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
frame->setLineWidth( 2 );
- mpixLabel = new QLabel( frame, "pixlabel" );
+ mpixLabel = new TQLabel( frame, "pixlabel" );
mpixLabel->setPixmap(DesktopIcon("unlock"));
KUser user;
- mStatusLabel = new QLabel( "<b> </b>", frame );
- //mStatusLabel->setAlignment( QLabel::AlignCenter );
- mStatusLabel->setAlignment( QLabel::AlignLeft );
+ mStatusLabel = new TQLabel( "<b> </b>", frame );
+ //mStatusLabel->setAlignment( TQLabel::AlignCenter );
+ mStatusLabel->setAlignment( TQLabel::AlignLeft );
KSeparator *sep = new KSeparator( KSeparator::HLine, frame );
ok = new KPushButton( i18n("Unl&ock"), frame );
- QVBoxLayout *unlockDialogLayout = new QVBoxLayout( this );
+ TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this );
unlockDialogLayout->addWidget( frame );
- QHBoxLayout *layStatus = new QHBoxLayout( 0, 0, KDialog::spacingHint());
+ TQHBoxLayout *layStatus = new TQHBoxLayout( 0, 0, KDialog::spacingHint());
layStatus->addWidget( mStatusLabel );
- QHBoxLayout *layPin = new QHBoxLayout( 0, 0, KDialog::spacingHint());
+ TQHBoxLayout *layPin = new TQHBoxLayout( 0, 0, KDialog::spacingHint());
pin_box = new KPasswordEdit( this, "pin_box" );
layPin->addWidget( pin_box );
pin_box->setFocus();
- QHBoxLayout *layButtons = new QHBoxLayout( 0, 0, KDialog::spacingHint());
+ TQHBoxLayout *layButtons = new TQHBoxLayout( 0, 0, KDialog::spacingHint());
layButtons->addStretch();
layButtons->addWidget( ok );
- frameLayout = new QGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
+ frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
frameLayout->addMultiCellWidget( mpixLabel, 0, 2, 0, 0, AlignTop );
frameLayout->addLayout( layStatus, 0, 1 );
frameLayout->addLayout( layPin, 2, 1 );
frameLayout->addMultiCellWidget( sep, 3, 3, 0, 1 );
frameLayout->addMultiCellLayout( layButtons, 4, 4, 0, 1 );
- connect(ok, SIGNAL(clicked()), SLOT(slotOK()));
+ connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(slotOK()));
installEventFilter(this);
}
@@ -121,7 +121,7 @@ const char * QueryDlg::getEntry()
return pin_box->password();
}
-void QueryDlg::updateLabel(QString &txt)
+void QueryDlg::updateLabel(TQString &txt)
{
mStatusLabel->setPaletteForegroundColor(Qt::black);
mStatusLabel->setText("<b>" + txt + "</b>");
@@ -139,8 +139,8 @@ void QueryDlg::setWarningIcon()
void QueryDlg::show()
{
- QDialog::show();
- QApplication::flushX();
+ TQDialog::show();
+ TQApplication::flushX();
}
#include "querydlg.moc"
diff --git a/kdesktop/lock/querydlg.h b/kdesktop/lock/querydlg.h
index caf73c180..d3f8f4be7 100644
--- a/kdesktop/lock/querydlg.h
+++ b/kdesktop/lock/querydlg.h
@@ -8,8 +8,8 @@
#ifndef __QUERYDLG_H__
#define __QUERYDLG_H__
-#include <qdialog.h>
-#include <qstringlist.h>
+#include <tqdialog.h>
+#include <tqstringlist.h>
#include <kpassdlg.h>
@@ -33,7 +33,7 @@ public:
~QueryDlg();
virtual void show();
- void updateLabel( QString &txt );
+ void updateLabel( TQString &txt );
void setUnlockIcon();
void setWarningIcon();
const char * getEntry();
@@ -42,14 +42,14 @@ private slots:
void slotOK();
private:
- QFrame *frame;
- QGridLayout *frameLayout;
- QLabel *mStatusLabel;
- QLabel *mpixLabel;
+ TQFrame *frame;
+ TQGridLayout *frameLayout;
+ TQLabel *mStatusLabel;
+ TQLabel *mpixLabel;
int mCapsLocked;
bool mUnlockingFailed;
- QStringList layoutsList;
- QStringList::iterator currLayout;
+ TQStringList layoutsList;
+ TQStringList::iterator currLayout;
int sPid, sFd;
KPushButton *ok;
KPasswordEdit *pin_box;
diff --git a/kdesktop/lockeng.cc b/kdesktop/lockeng.cc
index a8b9ddeea..43c39f19f 100644
--- a/kdesktop/lockeng.cc
+++ b/kdesktop/lockeng.cc
@@ -15,7 +15,7 @@
#include <kservicegroup.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <dcopclient.h>
#include <assert.h>
@@ -35,7 +35,7 @@ extern xautolock_corner_t xautolock_corners[ 4 ];
//
SaverEngine::SaverEngine()
: DCOPObject("KScreensaverIface"),
- QWidget(),
+ TQWidget(),
mBlankOnly(false)
{
// Save X screensaver parameters
@@ -46,8 +46,8 @@ SaverEngine::SaverEngine()
mXAutoLock = 0;
mEnabled = false;
- connect(&mLockProcess, SIGNAL(processExited(KProcess *)),
- SLOT(lockProcessExited()));
+ connect(&mLockProcess, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(lockProcessExited()));
configure();
}
@@ -92,12 +92,12 @@ void SaverEngine::lock()
void SaverEngine::processLockTransactions()
{
- for( QValueVector< DCOPClientTransaction* >::ConstIterator it = mLockTransactions.begin();
+ for( TQValueVector< DCOPClientTransaction* >::ConstIterator it = mLockTransactions.begin();
it != mLockTransactions.end();
++it )
{
- QCString replyType = "void";
- QByteArray arr;
+ TQCString replyType = "void";
+ TQByteArray arr;
kapp->dcopClient()->endTransaction( *it, replyType, arr );
}
mLockTransactions.clear();
@@ -153,7 +153,7 @@ bool SaverEngine::enable( bool e )
{
if ( !mXAutoLock ) {
mXAutoLock = new XAutoLock();
- connect(mXAutoLock, SIGNAL(timeout()), SLOT(idleTimeout()));
+ connect(mXAutoLock, TQT_SIGNAL(timeout()), TQT_SLOT(idleTimeout()));
}
mXAutoLock->setTimeout(mTimeout);
mXAutoLock->setDPMS(true);
@@ -241,14 +241,14 @@ bool SaverEngine::startLockProcess( LockType lock_type )
return true;
kdDebug(1204) << "SaverEngine: starting saver" << endl;
- emitDCOPSignal("KDE_start_screensaver()", QByteArray());
+ emitDCOPSignal("KDE_start_screensaver()", TQByteArray());
if (mLockProcess.isRunning())
{
stopLockProcess();
}
mLockProcess.clearArguments();
- QString path = KStandardDirs::findExe( "kdesktop_lock" );
+ TQString path = KStandardDirs::findExe( "kdesktop_lock" );
if( path.isEmpty())
{
kdDebug( 1204 ) << "Can't find kdesktop_lock!" << endl;
@@ -258,16 +258,16 @@ bool SaverEngine::startLockProcess( LockType lock_type )
switch( lock_type )
{
case ForceLock:
- mLockProcess << QString( "--forcelock" );
+ mLockProcess << TQString( "--forcelock" );
break;
case DontLock:
- mLockProcess << QString( "--dontlock" );
+ mLockProcess << TQString( "--dontlock" );
break;
default:
break;
}
if (mBlankOnly)
- mLockProcess << QString( "--blank" );
+ mLockProcess << TQString( "--blank" );
if (mLockProcess.start() == false )
{
@@ -296,7 +296,7 @@ void SaverEngine::stopLockProcess()
return;
}
kdDebug(1204) << "SaverEngine: stopping lock" << endl;
- emitDCOPSignal("KDE_stop_screensaver()", QByteArray());
+ emitDCOPSignal("KDE_stop_screensaver()", TQByteArray());
mLockProcess.kill();
@@ -318,7 +318,7 @@ void SaverEngine::lockProcessExited()
kdDebug(1204) << "SaverEngine: lock exited" << endl;
if( mState == Waiting )
return;
- emitDCOPSignal("KDE_stop_screensaver()", QByteArray());
+ emitDCOPSignal("KDE_stop_screensaver()", TQByteArray());
if (mEnabled)
{
if (mXAutoLock)
diff --git a/kdesktop/lockeng.h b/kdesktop/lockeng.h
index 0eb67f9d6..72131a05c 100644
--- a/kdesktop/lockeng.h
+++ b/kdesktop/lockeng.h
@@ -8,9 +8,9 @@
#ifndef __LOCKENG_H__
#define __LOCKENG_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kprocess.h>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include "KScreensaverIface.h"
#include "xautolock.h"
#include "xautolock_c.h"
@@ -23,7 +23,7 @@ class DCOPClientTransaction;
* hacks, and password entry.
*/
class SaverEngine
- : public QWidget,
+ : public TQWidget,
virtual public KScreensaverIface
{
Q_OBJECT
@@ -106,7 +106,7 @@ protected:
int mXExposures;
bool mBlankOnly; // only use the blanker, not the defined saver
- QValueVector< DCOPClientTransaction* > mLockTransactions;
+ TQValueVector< DCOPClientTransaction* > mLockTransactions;
};
#endif
diff --git a/kdesktop/main.cc b/kdesktop/main.cc
index 3a9c4911a..695392165 100644
--- a/kdesktop/main.cc
+++ b/kdesktop/main.cc
@@ -76,7 +76,7 @@ KDesktopApp *myApp = NULL;
// -----------------------------------------------------------------------------
int kdesktop_screen_number = 0;
-QCString kdesktop_name, kicker_name, kwin_name;
+TQCString kdesktop_name, kicker_name, kwin_name;
static void crashHandler(int sigId)
{
@@ -125,14 +125,14 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
int number_of_screens = ScreenCount(dpy);
kdesktop_screen_number = DefaultScreen(dpy);
int pos;
- QCString display_name = XDisplayString(dpy);
+ TQCString display_name = XDisplayString(dpy);
XCloseDisplay(dpy);
dpy = 0;
if ((pos = display_name.findRev('.')) != -1)
display_name.remove(pos, 10);
- QCString env;
+ TQCString env;
if (number_of_screens != 1) {
for (int i = 0; i < number_of_screens; i++) {
if (i != kdesktop_screen_number && fork() == 0) {
@@ -192,7 +192,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
cl->attach();
DCOPRef r( "ksmserver", "ksmserver" );
r.setDCOPClient( cl );
- r.send( "suspendStartup", QCString( "kdesktop" ));
+ r.send( "suspendStartup", TQCString( "kdesktop" ));
delete cl;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
@@ -237,7 +237,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv )
}
}
}
- // The QApplication ctor used is normally intended for applications not using Qt
+ // The TQApplication ctor used is normally intended for applications not using Qt
// as the primary toolkit (e.g. Motif apps also using Qt), with some slightly
// unpleasant side effects (e.g. #83974). This code checks if qt-copy patch #0078
// is applied, which allows turning this off.
diff --git a/kdesktop/minicli.cpp b/kdesktop/minicli.cpp
index 2cf225bcc..caef6197a 100644
--- a/kdesktop/minicli.cpp
+++ b/kdesktop/minicli.cpp
@@ -35,17 +35,17 @@
#include <string.h>
#include <errno.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qbitmap.h>
-#include <qfile.h>
-#include <qslider.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
-#include <qstylesheet.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqbitmap.h>
+#include <tqfile.h>
+#include <tqslider.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
+#include <tqstylesheet.h>
#include <dcopclient.h>
#include <klocale.h>
@@ -75,7 +75,7 @@
#define KDESU_ERR strerror(errno)
-Minicli::Minicli( QWidget *parent, const char *name)
+Minicli::Minicli( TQWidget *parent, const char *name)
:KDialog( parent, name, false, WType_TopLevel ),
m_autoCheckedRunInTerm(false)
{
@@ -84,7 +84,7 @@ Minicli::Minicli( QWidget *parent, const char *name)
setPlainCaption( i18n("Run Command") );
KWin::setIcons( winId(), DesktopIcon("run"), SmallIcon("run") );
- QVBoxLayout* mainLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout* mainLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
m_dlg = new MinicliDlgUI (this);
mainLayout->addWidget(m_dlg);
@@ -116,7 +116,7 @@ Minicli::Minicli( QWidget *parent, const char *name)
m_filterData = new KURIFilterData();
// Create a timer object...
- m_parseTimer = new QTimer(this);
+ m_parseTimer = new TQTimer(this);
m_FocusWidget = 0;
@@ -131,29 +131,29 @@ Minicli::Minicli( QWidget *parent, const char *name)
m_histfilesystemAutocomplete = 0;
m_pURLCompletion = new KURLCompletion();
//m_pURLCompletion->setCompletionMode( KGlobalSettings::completionMode() );
- connect( m_pURLCompletion, SIGNAL( match(const QString&) ), SLOT( slotMatch(const QString&) ));
+ connect( m_pURLCompletion, TQT_SIGNAL( match(const TQString&) ), TQT_SLOT( slotMatch(const TQString&) ));
// Main widget buttons...
- connect( m_dlg->pbRun, SIGNAL(clicked()), this, SLOT(accept()) );
- connect( m_dlg->pbCancel, SIGNAL(clicked()), this, SLOT(reject()) );
- connect( m_dlg->pbOptions, SIGNAL(clicked()), SLOT(slotAdvanced()) );
- connect( m_parseTimer, SIGNAL(timeout()), SLOT(slotParseTimer()) );
+ connect( m_dlg->pbRun, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()) );
+ connect( m_dlg->pbCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()) );
+ connect( m_dlg->pbOptions, TQT_SIGNAL(clicked()), TQT_SLOT(slotAdvanced()) );
+ connect( m_parseTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotParseTimer()) );
- connect( m_dlg->cbCommand, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotCmdChanged(const QString&) ) );
+ connect( m_dlg->cbCommand, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotCmdChanged(const TQString&) ) );
- connect( m_dlg->cbCommand, SIGNAL( returnPressed() ),
- m_dlg->pbRun, SLOT( animateClick() ) );
+ connect( m_dlg->cbCommand, TQT_SIGNAL( returnPressed() ),
+ m_dlg->pbRun, TQT_SLOT( animateClick() ) );
// Advanced group box...
- connect(m_dlg->cbPriority, SIGNAL(toggled(bool)), SLOT(slotChangeScheduler(bool)));
- connect(m_dlg->slPriority, SIGNAL(valueChanged(int)), SLOT(slotPriority(int)));
- connect(m_dlg->cbRealtime, SIGNAL(toggled(bool)), SLOT(slotRealtime(bool)));
- connect(m_dlg->cbAutocomplete, SIGNAL(toggled(bool)), SLOT(slotAutocompleteToggled(bool)));
- connect(m_dlg->cbAutohistory, SIGNAL(toggled(bool)), SLOT(slotAutohistoryToggled(bool)));
- connect(m_dlg->cbRunAsOther, SIGNAL(toggled(bool)), SLOT(slotChangeUid(bool)));
- connect(m_dlg->leUsername, SIGNAL(lostFocus()), SLOT(updateAuthLabel()));
- connect(m_dlg->cbRunInTerminal, SIGNAL(toggled(bool)), SLOT(slotTerminal(bool)));
+ connect(m_dlg->cbPriority, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChangeScheduler(bool)));
+ connect(m_dlg->slPriority, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotPriority(int)));
+ connect(m_dlg->cbRealtime, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotRealtime(bool)));
+ connect(m_dlg->cbAutocomplete, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAutocompleteToggled(bool)));
+ connect(m_dlg->cbAutohistory, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAutohistoryToggled(bool)));
+ connect(m_dlg->cbRunAsOther, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChangeUid(bool)));
+ connect(m_dlg->leUsername, TQT_SIGNAL(lostFocus()), TQT_SLOT(updateAuthLabel()));
+ connect(m_dlg->cbRunInTerminal, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTerminal(bool)));
m_dlg->slPriority->setValue(50);
@@ -166,7 +166,7 @@ Minicli::~Minicli()
delete m_pURLCompletion;
}
-void Minicli::setCommand(const QString& command)
+void Minicli::setCommand(const TQString& command)
{
m_dlg->cbCommand->lineEdit()->setText(command);
m_dlg->cbCommand->lineEdit()->deselect();
@@ -176,9 +176,9 @@ void Minicli::setCommand(const QString& command)
}
}
-QSize Minicli::sizeHint() const
+TQSize Minicli::sizeHint() const
{
- int maxWidth = qApp->desktop()->screenGeometry((QWidget*)this).width();
+ int maxWidth = qApp->desktop()->screenGeometry((TQWidget*)this).width();
if (maxWidth < 603)
{
// a sensible max for smaller screens
@@ -189,7 +189,7 @@ QSize Minicli::sizeHint() const
maxWidth = maxWidth * 2 / 5;
}
- return QSize(maxWidth, -1);
+ return TQSize(maxWidth, -1);
}
void Minicli::show()
@@ -200,7 +200,7 @@ void Minicli::show()
void Minicli::loadConfig()
{
- QStringList histList = KDesktopSettings::history();
+ TQStringList histList = KDesktopSettings::history();
int maxHistory = KDesktopSettings::historyLength();
m_terminalAppList = KDesktopSettings::terminalApps();
@@ -226,7 +226,7 @@ void Minicli::loadConfig()
m_dlg->cbAutocomplete->setDisabled( false );
}
- QStringList compList = KDesktopSettings::completionItems();
+ TQStringList compList = KDesktopSettings::completionItems();
if( compList.isEmpty() )
m_dlg->cbCommand->completionObject()->setItems( histList );
else
@@ -247,12 +247,12 @@ void Minicli::loadConfig()
// Provide username completions. Use saner and configurable maximum values.
int maxEntries = KDesktopSettings::maxUsernameCompletions();
- QStringList users;
+ TQStringList users;
struct passwd *pw;
setpwent();
for (int count=0; ((pw = getpwent()) != 0L) && (count < maxEntries); count++)
- users << QString::fromLocal8Bit(pw->pw_name);
+ users << TQString::fromLocal8Bit(pw->pw_name);
endpwent();
KCompletion *completion = new KCompletion;
@@ -284,11 +284,11 @@ void Minicli::clearHistory()
void Minicli::accept()
{
- QString cmd = m_dlg->cbCommand->currentText().stripWhiteSpace();
+ TQString cmd = m_dlg->cbCommand->currentText().stripWhiteSpace();
if (!cmd.isEmpty() && (cmd[0].isNumber() || (cmd[0] == '(')) &&
- (QRegExp("[a-zA-Z\\]\\[]").search(cmd) == -1))
+ (TQRegExp("[a-zA-Z\\]\\[]").search(cmd) == -1))
{
- QString result = calculate(cmd);
+ TQString result = calculate(cmd);
if (!result.isEmpty())
m_dlg->cbCommand->setCurrentText(result);
return;
@@ -301,7 +301,7 @@ void Minicli::accept()
m_dlg->cbCommand->addToHistory( m_dlg->cbCommand->currentText().stripWhiteSpace() );
reset();
saveConfig();
- QDialog::accept();
+ TQDialog::accept();
if ( logout )
{
@@ -313,7 +313,7 @@ void Minicli::accept()
void Minicli::reject()
{
reset();
- QDialog::reject();
+ TQDialog::reject();
}
void Minicli::reset()
@@ -345,15 +345,15 @@ void Minicli::reset()
m_dlg->lePassword->erase();
m_FocusWidget = 0;
- m_iconName = QString::null;
- m_prevIconName = QString::null;
+ m_iconName = TQString::null;
+ m_prevIconName = TQString::null;
m_prevCached = false;
updateAuthLabel();
setIcon();
}
-void Minicli::keyPressEvent( QKeyEvent* e )
+void Minicli::keyPressEvent( TQKeyEvent* e )
{
if ( e->key() == Qt::Key_Escape )
{
@@ -362,19 +362,19 @@ void Minicli::keyPressEvent( QKeyEvent* e )
return;
}
- QDialog::keyPressEvent( e );
+ TQDialog::keyPressEvent( e );
}
-QString Minicli::terminalCommand (const QString& cmd, const QString& args)
+TQString Minicli::terminalCommand (const TQString& cmd, const TQString& args)
{
- QString terminal = KDesktopSettings::terminalApplication().stripWhiteSpace();
+ TQString terminal = KDesktopSettings::terminalApplication().stripWhiteSpace();
if (terminal.endsWith("konsole"))
terminal += " --noclose";
if( args.isEmpty() )
- terminal += QString(" -e /bin/sh -c \"%1\"").arg(cmd);
+ terminal += TQString(" -e /bin/sh -c \"%1\"").arg(cmd);
else
- terminal += QString(" -e /bin/sh -c \"%1 %2\"").arg(cmd).arg(args);
+ terminal += TQString(" -e /bin/sh -c \"%1 %2\"").arg(cmd).arg(args);
if (!m_terminalAppList.contains(cmd))
m_terminalAppList << cmd;
@@ -393,14 +393,14 @@ int Minicli::runCommand()
if ( m_dlg->cbCommand->currentText().isEmpty() )
return 1;
- QString cmd;
+ TQString cmd;
KURL uri = m_filterData->uri();
if ( uri.isLocalFile() && !uri.hasRef() && uri.query().isEmpty() )
cmd = uri.path();
else
cmd = uri.url();
- QCString asn;
+ TQCString asn;
if( qApp->desktop()->isVirtualDesktop())
{
asn = KStartupInfo::createNewStartupId();
@@ -422,7 +422,7 @@ int Minicli::runCommand()
if( needsKDEsu() )
{
- QCString user;
+ TQCString user;
struct passwd *pw;
if (m_dlg->cbRunAsOther)
@@ -470,7 +470,7 @@ int Minicli::runCommand()
}
}
- QApplication::flushX();
+ TQApplication::flushX();
int pid = fork();
@@ -494,7 +494,7 @@ int Minicli::runCommand()
proc.setScheduler(m_iScheduler);
}
- QCString command;
+ TQCString command;
if (useTerminal)
command = terminalCommand( cmd, m_filterData->argsAndOptions() ).local8Bit();
@@ -519,7 +519,7 @@ int Minicli::runCommand()
}
else
{
- QString exec;
+ TQString exec;
// yes, this is a hack, but there is no way of doing it
// through SuProcess without providing the user password
@@ -527,7 +527,7 @@ int Minicli::runCommand()
{
// from kdesu_stub.c
int val = 20 - (int) (((double) m_iPriority) * 40 / 100 + 0.5);
- cmd = "nice -n " + QString::number( val ) + " " + cmd;
+ cmd = "nice -n " + TQString::number( val ) + " " + cmd;
}
if (useTerminal)
@@ -579,7 +579,7 @@ int Minicli::runCommand()
KMessageBox::sorry( this, i18n("<center><b>%1</b></center>\n"
"You do not have permission to execute "
"this command.")
- .arg( QStyleSheet::convertFromPlainText(cmd) ));
+ .arg( TQStyleSheet::convertFromPlainText(cmd) ));
return 1;
}
}
@@ -606,7 +606,7 @@ int Minicli::runCommand()
KMessageBox::sorry( this, i18n("<center><b>%1</b></center>\n"
"Could not run the specified command.")
- .arg( QStyleSheet::convertFromPlainText(cmd) ));
+ .arg( TQStyleSheet::convertFromPlainText(cmd) ));
return 1;
}
}
@@ -627,15 +627,15 @@ void Minicli::notifyServiceStarted(KService::Ptr service)
{
// Inform other applications (like the quickstarter applet)
// that an application was started
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << "minicli" << service->storageId();
kdDebug() << "minicli appLauncher dcop signal: " << service->storageId() << endl;
KApplication::kApplication()->dcopClient()->emitDCOPSignal("appLauncher",
- "serviceStartedByStorageId(QString,QString)", params);
+ "serviceStartedByStorageId(TQString,TQString)", params);
}
-void Minicli::slotCmdChanged(const QString& text)
+void Minicli::slotCmdChanged(const TQString& text)
{
bool isEmpty = text.isEmpty();
m_dlg->pbRun->setEnabled( !isEmpty );
@@ -649,7 +649,7 @@ void Minicli::slotCmdChanged(const QString& text)
slotTerminal(false);
// Reset the icon if needed...
- const QPixmap pixmap = DesktopIcon("kmenu");
+ const TQPixmap pixmap = DesktopIcon("kmenu");
if ( pixmap.serialNumber() != m_dlg->lbRunIcon->pixmap()->serialNumber())
m_dlg->lbRunIcon->setPixmap(pixmap);
@@ -662,7 +662,7 @@ void Minicli::slotCmdChanged(const QString& text)
m_urlCompletionStarted = true; // flag for slotMatch()
if ((text.startsWith( "/" ) || text.startsWith( "~" ) || (text.contains("://", false) != 0)) && (text.contains("http://", false) == 0)) {
- QString completion = m_pURLCompletion->makeCompletion( text );
+ TQString completion = m_pURLCompletion->makeCompletion( text );
}
}
@@ -670,10 +670,10 @@ void Minicli::slotCmdChanged(const QString& text)
}
// Handle match() from m_pURLCompletion
-void Minicli::slotMatch( const QString &match )
+void Minicli::slotMatch( const TQString &match )
{
- QString current_text;
- QStringList histList = KDesktopSettings::history();
+ TQString current_text;
+ TQStringList histList = KDesktopSettings::history();
int maxHistory = KDesktopSettings::historyLength();
int maxAutocompletion = KDesktopSettings::miniCLIAutocompletionLength();
@@ -687,7 +687,7 @@ void Minicli::slotMatch( const QString &match )
if (m_filesystemAutocomplete == true) {
bool block = m_dlg->cbCommand->signalsBlocked();
m_dlg->cbCommand->blockSignals( true );
- QStringList items = m_pURLCompletion->allMatches();
+ TQStringList items = m_pURLCompletion->allMatches();
items.sort();
if (m_histfilesystemAutocomplete == true) {
// Add the history to the list
@@ -741,7 +741,7 @@ void Minicli::slotParseTimer()
void Minicli::parseLine( bool final )
{
- QString cmd = m_dlg->cbCommand->currentText().stripWhiteSpace();
+ TQString cmd = m_dlg->cbCommand->currentText().stripWhiteSpace();
m_filterData->setData( cmd );
if( final )
@@ -779,25 +779,25 @@ void Minicli::parseLine( bool final )
void Minicli::setIcon ()
{
if( m_iconName.isEmpty() || m_iconName == "unknown" || m_iconName == "kde" )
- m_iconName = QString::fromLatin1("kmenu");
+ m_iconName = TQString::fromLatin1("kmenu");
- QPixmap icon = DesktopIcon( m_iconName );
+ TQPixmap icon = DesktopIcon( m_iconName );
if ( m_iconName == "www" )
{
// Not using KIconEffect::overlay as that requires the same size
// for the icon and the overlay, also the overlay definately doesn't
// have a more that one-bit alpha channel here
- QPixmap overlay( locate ( "icon", KMimeType::favIconForURL( m_filterData->uri() ) + ".png" ) );
+ TQPixmap overlay( locate ( "icon", KMimeType::favIconForURL( m_filterData->uri() ) + ".png" ) );
if ( !overlay.isNull() )
{
int x = icon.width() - overlay.width();
int y = icon.height() - overlay.height();
if ( icon.mask() )
{
- QBitmap mask = *icon.mask();
+ TQBitmap mask = *icon.mask();
bitBlt( &mask, x, y,
- overlay.mask() ? const_cast<QBitmap *>(overlay.mask()) : &overlay,
+ overlay.mask() ? const_cast<TQBitmap *>(overlay.mask()) : &overlay,
0, 0, overlay.width(), overlay.height(),
overlay.mask() ? OrROP : SetROP );
icon.setMask(mask);
@@ -824,9 +824,9 @@ void Minicli::updateAuthLabel()
m_prevChecked = m_dlg->cbRunAsOther->isChecked();
m_prevCached = true;
}
- if (m_dlg->leUsername->text() != QString::fromLatin1("root"))
- m_dlg->lePassword->setText(QString::null);
- m_dlg->leUsername->setText(QString::fromLatin1("root"));
+ if (m_dlg->leUsername->text() != TQString::fromLatin1("root"))
+ m_dlg->lePassword->setText(TQString::null);
+ m_dlg->leUsername->setText(TQString::fromLatin1("root"));
m_dlg->cbRunAsOther->setChecked(true);
m_dlg->cbRunAsOther->setEnabled(false);
m_dlg->leUsername->setEnabled(false);
@@ -871,7 +871,7 @@ void Minicli::slotTerminal(bool enable)
if (enable)
{
m_prevIconName = m_iconName;
- m_iconName = QString::fromLatin1( "konsole" );
+ m_iconName = TQString::fromLatin1( "konsole" );
setIcon();
}
else if (!m_prevIconName.isEmpty())
@@ -921,7 +921,7 @@ void Minicli::slotRealtime(bool enabled)
i18n("Running a realtime application can be very dangerous. "
"If the application misbehaves, the system might hang "
"unrecoverably.\nAre you sure you want to continue?"),
- i18n("Warning - Run Command"), KGuiItem(i18n("&Run Realtime")),QString::null,KMessageBox::Notify|KMessageBox::PlainCaption)
+ i18n("Warning - Run Command"), KGuiItem(i18n("&Run Realtime")),TQString::null,KMessageBox::Notify|KMessageBox::PlainCaption)
!= KMessageBox::Continue )
{
m_iScheduler = StubProcess::SchedNormal;
@@ -944,7 +944,7 @@ void Minicli::slotAutocompleteToggled(bool enabled)
m_filesystemAutocomplete = false;
}
- QString current_text = m_dlg->cbCommand->currentText();
+ TQString current_text = m_dlg->cbCommand->currentText();
m_dlg->cbCommand->setCurrentText( current_text ); // Force an update of the autocompletion list
}
@@ -964,7 +964,7 @@ void Minicli::slotAutohistoryToggled(bool enabled)
m_dlg->cbAutocomplete->setDisabled ( false );
}
- QString current_text = m_dlg->cbCommand->currentText();
+ TQString current_text = m_dlg->cbCommand->currentText();
m_dlg->cbCommand->setCurrentText( current_text ); // Force an update of the autocompletion list
}
@@ -982,19 +982,19 @@ void Minicli::slotPriority(int priority)
updateAuthLabel();
}
-QString Minicli::calculate(const QString &exp)
+TQString Minicli::calculate(const TQString &exp)
{
- QString result, cmd;
- const QString bc = KStandardDirs::findExe("bc");
+ TQString result, cmd;
+ const TQString bc = KStandardDirs::findExe("bc");
if ( !bc.isEmpty() )
- cmd = QString("echo %1 | %2").arg(KProcess::quote(QString("scale=8; ")+exp), KProcess::quote(bc));
+ cmd = TQString("echo %1 | %2").arg(KProcess::quote(TQString("scale=8; ")+exp), KProcess::quote(bc));
else
- cmd = QString("echo $((%1))").arg(exp);
- FILE *fs = popen(QFile::encodeName(cmd).data(), "r");
+ cmd = TQString("echo $((%1))").arg(exp);
+ FILE *fs = popen(TQFile::encodeName(cmd).data(), "r");
if (fs)
{
{ // scope for QTextStream
- QTextStream ts(fs, IO_ReadOnly);
+ TQTextStream ts(fs, IO_ReadOnly);
result = ts.read().stripWhiteSpace();
}
pclose(fs);
@@ -1002,7 +1002,7 @@ QString Minicli::calculate(const QString &exp)
return result;
}
-void Minicli::fontChange( const QFont & )
+void Minicli::fontChange( const TQFont & )
{
adjustSize();
}
diff --git a/kdesktop/minicli.h b/kdesktop/minicli.h
index a4215582f..f70035464 100644
--- a/kdesktop/minicli.h
+++ b/kdesktop/minicli.h
@@ -31,8 +31,8 @@
#ifndef MINICLI_H
#define MINICLI_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kdialog.h>
#include <kservice.h>
@@ -49,16 +49,16 @@ class Minicli : public KDialog
Q_OBJECT
public:
- Minicli( QWidget *parent=0, const char *name=0 );
+ Minicli( TQWidget *parent=0, const char *name=0 );
virtual ~Minicli();
- void setCommand(const QString& command);
+ void setCommand(const TQString& command);
void reset();
void saveConfig();
void clearHistory();
virtual void show();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected slots:
virtual void accept();
@@ -68,8 +68,8 @@ protected slots:
protected:
void loadConfig();
bool needsKDEsu();
- virtual void keyPressEvent( QKeyEvent* );
- virtual void fontChange( const QFont & );
+ virtual void keyPressEvent( TQKeyEvent* );
+ virtual void fontChange( const TQFont & );
private slots:
void slotAdvanced();
@@ -81,35 +81,35 @@ private slots:
void slotTerminal(bool);
void slotChangeUid(bool);
void slotChangeScheduler(bool);
- void slotCmdChanged(const QString&);
- void slotMatch( const QString&);
+ void slotCmdChanged(const TQString&);
+ void slotMatch( const TQString&);
private:
void setIcon();
int runCommand();
void parseLine( bool final );
- QString terminalCommand (const QString&, const QString&);
- QString calculate(const QString &exp);
+ TQString terminalCommand (const TQString&, const TQString&);
+ TQString calculate(const TQString &exp);
void notifyServiceStarted(KService::Ptr service);
int m_iPriority;
int m_iScheduler;
- QString m_iconName;
- QString m_prevIconName;
- QStringList m_terminalAppList;
- QStringList m_middleFilters;
- QStringList m_finalFilters;
+ TQString m_iconName;
+ TQString m_prevIconName;
+ TQStringList m_terminalAppList;
+ TQStringList m_middleFilters;
+ TQStringList m_finalFilters;
- QTimer* m_parseTimer;
- QWidget* m_FocusWidget;
+ TQTimer* m_parseTimer;
+ TQWidget* m_FocusWidget;
MinicliDlgUI* m_dlg;
KURIFilterData* m_filterData;
// Cached values
- QString m_prevUser;
- QString m_prevPass;
+ TQString m_prevUser;
+ TQString m_prevPass;
bool m_prevChecked;
bool m_prevCached;
bool m_autoCheckedRunInTerm;
diff --git a/kdesktop/pixmapserver.cc b/kdesktop/pixmapserver.cc
index ba66ef966..bc869d341 100644
--- a/kdesktop/pixmapserver.cc
+++ b/kdesktop/pixmapserver.cc
@@ -37,7 +37,7 @@
KPixmapServer::KPixmapServer()
- : QWidget(0L, "shpixmap comm window")
+ : TQWidget(0L, "shpixmap comm window")
{
kapp->installX11EventFilter(this);
pixmap = XInternAtom(qt_xdisplay(), "PIXMAP", false);
@@ -56,7 +56,7 @@ KPixmapServer::~KPixmapServer()
}
-void KPixmapServer::add(QString name, QPixmap *pm, bool overwrite)
+void KPixmapServer::add(TQString name, TQPixmap *pm, bool overwrite)
{
if (m_Names.contains(name))
{
@@ -65,7 +65,7 @@ void KPixmapServer::add(QString name, QPixmap *pm, bool overwrite)
else return;
}
- QString str = QString("KDESHPIXMAP:%1").arg(name);
+ TQString str = TQString("KDESHPIXMAP:%1").arg(name);
Atom sel = XInternAtom(qt_xdisplay(), str.latin1(), false);
KPixmapInode pi;
pi.handle = pm->handle();
@@ -92,7 +92,7 @@ void KPixmapServer::add(QString name, QPixmap *pm, bool overwrite)
}
-void KPixmapServer::remove(QString name)
+void KPixmapServer::remove(TQString name)
{
// Remove the name
NameIterator it = m_Names.find(name);
@@ -119,9 +119,9 @@ void KPixmapServer::remove(QString name)
}
-QStringList KPixmapServer::list()
+TQStringList KPixmapServer::list()
{
- QStringList lst;
+ TQStringList lst;
NameIterator it;
for (it=m_Names.begin(); it!=m_Names.end(); it++)
lst += it.key();
@@ -129,7 +129,7 @@ QStringList KPixmapServer::list()
}
-void KPixmapServer::setOwner(QString name)
+void KPixmapServer::setOwner(TQString name)
{
NameIterator it = m_Names.find(name);
if (it == m_Names.end())
diff --git a/kdesktop/pixmapserver.h b/kdesktop/pixmapserver.h
index e0f871988..009b70fc8 100644
--- a/kdesktop/pixmapserver.h
+++ b/kdesktop/pixmapserver.h
@@ -10,10 +10,10 @@
#ifndef __PixmapServer_h_Included__
#define __PixmapServer_h_Included__
-#include <qwindowdefs.h>
+#include <tqwindowdefs.h>
-#include <qwidget.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
#include <X11/X.h>
#include <X11/Xlib.h>
@@ -30,7 +30,7 @@ struct KPixmapInode
struct KPixmapData
{
- QPixmap *pixmap;
+ TQPixmap *pixmap;
int usecount;
int refcount;
};
@@ -38,7 +38,7 @@ struct KPixmapData
struct KSelectionInode
{
Qt::HANDLE handle;
- QString name;
+ TQString name;
};
/**
@@ -70,7 +70,7 @@ public:
* @param pm A pointer to the pixmap.
* @param overwrite Should an pixmap with the same name be overwritten?
*/
- void add(QString name, QPixmap *pm, bool overwrite=true);
+ void add(TQString name, TQPixmap *pm, bool overwrite=true);
/**
* Remove a pixmap from the server. This will delete the pixmap after
@@ -78,21 +78,21 @@ public:
*
* @param name The name of the shared pixmap.
*/
- void remove(QString name);
+ void remove(TQString name);
/**
* List all pixmaps currently served by this server.
*
- * @return A QStringList containing all the shared pixmaps.
+ * @return A TQStringList containing all the shared pixmaps.
*/
- QStringList list();
+ TQStringList list();
/**
* Re-set ownership of the selection providing the shared pixmap.
*
* @param name The name of the shared pixmap.
*/
- void setOwner(QString name);
+ void setOwner(TQString name);
signals:
/**
@@ -101,7 +101,7 @@ signals:
* this server, though it can be served by another. You can re-aqcuire
* the selection by calling setOwner().
*/
- void selectionCleared(QString name);
+ void selectionCleared(TQString name);
protected:
bool x11Event(XEvent *);
@@ -109,15 +109,15 @@ protected:
private:
Atom pixmap;
- QMap<QString,KPixmapInode> m_Names;
- QMap<Atom,KSelectionInode> m_Selections;
- QMap<HANDLE,KPixmapData> m_Data;
- QMap<Atom,HANDLE> m_Active;
+ TQMap<TQString,KPixmapInode> m_Names;
+ TQMap<Atom,KSelectionInode> m_Selections;
+ TQMap<HANDLE,KPixmapData> m_Data;
+ TQMap<Atom,HANDLE> m_Active;
- typedef QMap<QString,KPixmapInode>::Iterator NameIterator;
- typedef QMap<Atom,KSelectionInode>::Iterator SelectionIterator;
- typedef QMap<HANDLE,KPixmapData>::Iterator DataIterator;
- typedef QMap<Atom,HANDLE>::Iterator AtomIterator;
+ typedef TQMap<TQString,KPixmapInode>::Iterator NameIterator;
+ typedef TQMap<Atom,KSelectionInode>::Iterator SelectionIterator;
+ typedef TQMap<HANDLE,KPixmapData>::Iterator DataIterator;
+ typedef TQMap<Atom,HANDLE>::Iterator AtomIterator;
};
diff --git a/kdesktop/startupid.cpp b/kdesktop/startupid.cpp
index 7f0549ff4..720dd4bba 100644
--- a/kdesktop/startupid.cpp
+++ b/kdesktop/startupid.cpp
@@ -23,10 +23,10 @@
#include "klaunchsettings.h"
#include <kiconloader.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kapplication.h>
-#include <qimage.h>
-#include <qbitmap.h>
+#include <tqimage.h>
+#include <tqbitmap.h>
#include <kconfig.h>
#include <X11/Xlib.h>
@@ -40,14 +40,14 @@ enum kde_startup_status_enum { StartupPre, StartupIn, StartupDone };
static kde_startup_status_enum kde_startup_status = StartupPre;
static Atom kde_splash_progress;
-StartupId::StartupId( QWidget* parent, const char* name )
- : QWidget( parent, name ),
+StartupId::StartupId( TQWidget* parent, const char* name )
+ : TQWidget( parent, name ),
startup_info( KStartupInfo::CleanOnCantDetect ),
startup_widget( NULL ),
blinking( true ),
bouncing( false )
{
- hide(); // is QWidget only because of x11Event()
+ hide(); // is TQWidget only because of x11Event()
if( kde_startup_status == StartupPre )
{
kde_splash_progress = XInternAtom( qt_xdisplay(), "_KDE_SPLASH_PROGRESS", False );
@@ -56,16 +56,16 @@ StartupId::StartupId( QWidget* parent, const char* name )
XSelectInput( qt_xdisplay(), qt_xrootwin(), attrs.your_event_mask | SubstructureNotifyMask);
kapp->installX11EventFilter( this );
}
- connect( &update_timer, SIGNAL( timeout()), SLOT( update_startupid()));
+ connect( &update_timer, TQT_SIGNAL( timeout()), TQT_SLOT( update_startupid()));
connect( &startup_info,
- SIGNAL( gotNewStartup( const KStartupInfoId&, const KStartupInfoData& )),
- SLOT( gotNewStartup( const KStartupInfoId&, const KStartupInfoData& )));
+ TQT_SIGNAL( gotNewStartup( const KStartupInfoId&, const KStartupInfoData& )),
+ TQT_SLOT( gotNewStartup( const KStartupInfoId&, const KStartupInfoData& )));
connect( &startup_info,
- SIGNAL( gotStartupChange( const KStartupInfoId&, const KStartupInfoData& )),
- SLOT( gotStartupChange( const KStartupInfoId&, const KStartupInfoData& )));
+ TQT_SIGNAL( gotStartupChange( const KStartupInfoId&, const KStartupInfoData& )),
+ TQT_SLOT( gotStartupChange( const KStartupInfoId&, const KStartupInfoData& )));
connect( &startup_info,
- SIGNAL( gotRemoveStartup( const KStartupInfoId&, const KStartupInfoData& )),
- SLOT( gotRemoveStartup( const KStartupInfoId& )));
+ TQT_SIGNAL( gotRemoveStartup( const KStartupInfoId&, const KStartupInfoData& )),
+ TQT_SLOT( gotRemoveStartup( const KStartupInfoId& )));
}
StartupId::~StartupId()
@@ -82,7 +82,7 @@ void StartupId::configure()
void StartupId::gotNewStartup( const KStartupInfoId& id_P, const KStartupInfoData& data_P )
{
- QString icon = data_P.findIcon();
+ TQString icon = data_P.findIcon();
current_startup = id_P;
startups[ id_P ] = icon;
start_startupid( icon );
@@ -92,7 +92,7 @@ void StartupId::gotStartupChange( const KStartupInfoId& id_P, const KStartupInfo
{
if( current_startup == id_P )
{
- QString icon = data_P.findIcon();
+ TQString icon = data_P.findIcon();
if( !icon.isEmpty() && icon != startups[ current_startup ] )
{
startups[ id_P ] = icon;
@@ -129,10 +129,10 @@ bool StartupId::x11Event( XEvent* e )
if( startups.count() == 0 )
start_startupid( KDE_STARTUP_ICON );
// 60(?) sec timeout - shouldn't be hopefully needed anyway, ksmserver should have it too
- QTimer::singleShot( 60000, this, SLOT( finishKDEStartup()));
+ TQTimer::singleShot( 60000, this, TQT_SLOT( finishKDEStartup()));
}
else if( strcmp( s, "session ready" ) == 0 && kde_startup_status < StartupDone )
- QTimer::singleShot( 2000, this, SLOT( finishKDEStartup()));
+ TQTimer::singleShot( 2000, this, TQT_SLOT( finishKDEStartup()));
}
return false;
}
@@ -153,16 +153,16 @@ void StartupId::stop_startupid()
for( int i = 0;
i < NUM_BLINKING_PIXMAPS;
++i )
- pixmaps[ i ] = QPixmap(); // null
+ pixmaps[ i ] = TQPixmap(); // null
update_timer.stop();
}
-static QPixmap scalePixmap( const QPixmap& pm, int w, int h )
+static TQPixmap scalePixmap( const TQPixmap& pm, int w, int h )
{
#if QT_VERSION >= 0x030200
- QPixmap result( 20, 20, pm.depth() );
- result.setMask( QBitmap( 20, 20, true ) );
- QPixmap scaled( pm.convertToImage().smoothScale( w, h ) );
+ TQPixmap result( 20, 20, pm.depth() );
+ result.setMask( TQBitmap( 20, 20, true ) );
+ TQPixmap scaled( pm.convertToImage().smoothScale( w, h ) );
copyBlt( &result, (20 - w) / 2, (20 - h) / 2, &scaled, 0, 0, w, h );
return result;
#else
@@ -172,20 +172,20 @@ static QPixmap scalePixmap( const QPixmap& pm, int w, int h )
#endif
}
-void StartupId::start_startupid( const QString& icon_P )
+void StartupId::start_startupid( const TQString& icon_P )
{
- const QColor startup_colors[ StartupId::NUM_BLINKING_PIXMAPS ]
+ const TQColor startup_colors[ StartupId::NUM_BLINKING_PIXMAPS ]
= { Qt::black, Qt::darkGray, Qt::lightGray, Qt::white, Qt::white };
- QPixmap icon_pixmap = KGlobal::iconLoader()->loadIcon( icon_P, KIcon::Small, 0,
+ TQPixmap icon_pixmap = KGlobal::iconLoader()->loadIcon( icon_P, KIcon::Small, 0,
KIcon::DefaultState, 0, true ); // return null pixmap if not found
if( icon_pixmap.isNull())
icon_pixmap = SmallIcon( "exec" );
if( startup_widget == NULL )
{
- startup_widget = new QWidget( NULL, NULL, WX11BypassWM );
+ startup_widget = new TQWidget( NULL, NULL, WX11BypassWM );
XSetWindowAttributes attr;
attr.save_under = True; // useful saveunder if possible to avoid redrawing
XChangeWindowAttributes( qt_xdisplay(), startup_widget->winId(), CWSaveUnder, &attr );
@@ -200,7 +200,7 @@ void StartupId::start_startupid( const QString& icon_P )
i < NUM_BLINKING_PIXMAPS;
++i )
{
- pixmaps[ i ] = QPixmap( window_w, window_h );
+ pixmaps[ i ] = TQPixmap( window_w, window_h );
pixmaps[ i ].fill( startup_colors[ i ] );
bitBlt( &pixmaps[ i ], 0, 0, &icon_pixmap );
}
@@ -255,7 +255,7 @@ void StartupId::update_startupid()
else if( bouncing )
{
yoffset = frame_to_yoffset[ frame ];
- QPixmap pm = pixmaps[ frame_to_pixmap[ frame ] ];
+ TQPixmap pm = pixmaps[ frame_to_pixmap[ frame ] ];
startup_widget->setBackgroundPixmap( pm );
if ( pm.mask() != NULL )
startup_widget->setMask( *pm.mask() );
@@ -274,7 +274,7 @@ void StartupId::update_startupid()
update_timer.start( 100, true );
return;
}
- QPoint c_pos( x, y );
+ TQPoint c_pos( x, y );
int cursor_size = 0;
#ifdef HAVE_XCURSOR
cursor_size = XcursorGetDefaultSize( qt_xdisplay());
@@ -295,7 +295,7 @@ void StartupId::update_startupid()
startup_widget->show();
XRaiseWindow( qt_xdisplay(), startup_widget->winId());
update_timer.start( bouncing ? 30 : 100, true );
- QApplication::flushX();
+ TQApplication::flushX();
}
#include "startupid.moc"
diff --git a/kdesktop/startupid.h b/kdesktop/startupid.h
index 986c45c3f..941e4165c 100644
--- a/kdesktop/startupid.h
+++ b/kdesktop/startupid.h
@@ -22,11 +22,11 @@
#include <sys/types.h>
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qtimer.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqmap.h>
#include <kstartupinfo.h>
class QStyle;
@@ -36,12 +36,12 @@ class StartupId
{
Q_OBJECT
public:
- StartupId( QWidget* parent = 0, const char* name = 0 );
+ StartupId( TQWidget* parent = 0, const char* name = 0 );
virtual ~StartupId();
void configure();
protected:
virtual bool x11Event( XEvent* e );
- void start_startupid( const QString& icon );
+ void start_startupid( const TQString& icon );
void stop_startupid();
protected slots:
void update_startupid();
@@ -51,16 +51,16 @@ class StartupId
void finishKDEStartup();
protected:
KStartupInfo startup_info;
- QWidget* startup_widget;
- QTimer update_timer;
- QMap< KStartupInfoId, QString > startups; // QString == pixmap
+ TQWidget* startup_widget;
+ TQTimer update_timer;
+ TQMap< KStartupInfoId, TQString > startups; // TQString == pixmap
KStartupInfoId current_startup;
bool blinking;
bool bouncing;
unsigned int color_index;
unsigned int frame;
enum { NUM_BLINKING_PIXMAPS = 5 };
- QPixmap pixmaps[ NUM_BLINKING_PIXMAPS ];
+ TQPixmap pixmaps[ NUM_BLINKING_PIXMAPS ];
};
#endif
diff --git a/kdesktop/xautolock.cc b/kdesktop/xautolock.cc
index d8f4bbfbe..b69325f17 100644
--- a/kdesktop/xautolock.cc
+++ b/kdesktop/xautolock.cc
@@ -174,7 +174,7 @@ void XAutoLock::setTrigger( time_t t )
//
// Process new windows and check the mouse.
//
-void XAutoLock::timerEvent(QTimerEvent *ev)
+void XAutoLock::timerEvent(TQTimerEvent *ev)
{
if (ev->timerId() != mTimerId)
{
@@ -258,14 +258,14 @@ bool XAutoLock::x11Event( XEvent* ev )
// don't futher process key events that were received only because XAutoLock wants them
if( ev->type == KeyPress && !ev->xkey.send_event
&& !xautolock_useXidle && !xautolock_useMit
- && !QWidget::find( ev->xkey.window ))
+ && !TQWidget::find( ev->xkey.window ))
return true;
return false;
}
bool XAutoLock::ignoreWindow( WId w )
{
- if( w != qt_xrootwin() && QWidget::find( w ))
+ if( w != qt_xrootwin() && TQWidget::find( w ))
return true;
return false;
}
diff --git a/kdesktop/xautolock.h b/kdesktop/xautolock.h
index aa618f252..35b53207a 100644
--- a/kdesktop/xautolock.h
+++ b/kdesktop/xautolock.h
@@ -8,7 +8,7 @@
#ifndef __XAUTOLOCK_H__
#define __XAUTOLOCK_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <X11/Xlib.h>
@@ -62,7 +62,7 @@ signals:
void timeout();
protected:
- virtual void timerEvent(QTimerEvent *ev);
+ virtual void timerEvent(TQTimerEvent *ev);
virtual bool x11Event( XEvent* );
protected: