summaryrefslogtreecommitdiffstats
path: root/kdf
diff options
context:
space:
mode:
Diffstat (limited to 'kdf')
-rw-r--r--kdf/disklist.cpp74
-rw-r--r--kdf/disklist.h9
-rw-r--r--kdf/disks.cpp54
-rw-r--r--kdf/disks.h9
-rw-r--r--kdf/kcmdf.cpp8
-rw-r--r--kdf/kcmdf.h3
-rw-r--r--kdf/kconftest.cpp2
-rw-r--r--kdf/kdf.cpp10
-rw-r--r--kdf/kdf.h3
-rw-r--r--kdf/kdfconfig.cpp8
-rw-r--r--kdf/kdfconfig.h7
-rw-r--r--kdf/kdfwidget.cpp40
-rw-r--r--kdf/kdfwidget.h11
-rw-r--r--kdf/kwikdisk.cpp24
-rw-r--r--kdf/kwikdisk.h1
-rw-r--r--kdf/listview.cpp28
-rw-r--r--kdf/listview.h5
-rw-r--r--kdf/mntconfig.cpp18
-rw-r--r--kdf/mntconfig.h7
-rw-r--r--kdf/optiondialog.cpp6
-rw-r--r--kdf/optiondialog.h3
21 files changed, 170 insertions, 160 deletions
diff --git a/kdf/disklist.cpp b/kdf/disklist.cpp
index 3326320..b6c07b7 100644
--- a/kdf/disklist.cpp
+++ b/kdf/disklist.cpp
@@ -3,7 +3,7 @@
*
* Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -37,8 +37,8 @@
/***************************************************************************
* constructor
**/
-DiskList::DiskList(TQObject *parent, const char *name)
- : TQObject(parent,name)
+DiskList::DiskList(TQObject *tqparent, const char *name)
+ : TQObject(tqparent,name)
{
kdDebug() << k_funcinfo << endl;
@@ -183,27 +183,27 @@ TQFile f(FSTAB);
while (! t.eof()) {
s=t.readLine();
s=s.simplifyWhiteSpace();
- if ( (!s.isEmpty() ) && (s.find(DELIMITER)!=0) ) {
+ if ( (!s.isEmpty() ) && (s.tqfind(DELIMITER)!=0) ) {
// not empty or commented out by '#'
// kdDebug() << "GOT: [" << s << "]" << endl;
disk = new DiskEntry();// Q_CHECK_PTR(disk);
disk->setMounted(FALSE);
- disk->setDeviceName(expandEscapes(s.left(s.find(BLANK))));
- s=s.remove(0,s.find(BLANK)+1 );
+ disk->setDeviceName(expandEscapes(s.left(s.tqfind(BLANK))));
+ s=s.remove(0,s.tqfind(BLANK)+1 );
// kdDebug() << " deviceName: [" << disk->deviceName() << "]" << endl;
#ifdef _OS_SOLARIS_
//device to fsck
- s=s.remove(0,s.find(BLANK)+1 );
+ s=s.remove(0,s.tqfind(BLANK)+1 );
#endif
- disk->setMountPoint(expandEscapes(s.left(s.find(BLANK))));
- s=s.remove(0,s.find(BLANK)+1 );
+ disk->setMountPoint(expandEscapes(s.left(s.tqfind(BLANK))));
+ s=s.remove(0,s.tqfind(BLANK)+1 );
//kdDebug() << " MountPoint: [" << disk->mountPoint() << "]" << endl;
//kdDebug() << " Icon: [" << disk->iconName() << "]" << endl;
- disk->setFsType(s.left(s.find(BLANK)) );
- s=s.remove(0,s.find(BLANK)+1 );
+ disk->setFsType(s.left(s.tqfind(BLANK)) );
+ s=s.remove(0,s.tqfind(BLANK)+1 );
//kdDebug() << " FS-Type: [" << disk->fsType() << "]" << endl;
- disk->setMountOptions(s.left(s.find(BLANK)) );
- s=s.remove(0,s.find(BLANK)+1 );
+ disk->setMountOptions(s.left(s.tqfind(BLANK)) );
+ s=s.remove(0,s.tqfind(BLANK)+1 );
//kdDebug() << " Mount-Options: [" << disk->mountOptions() << "]" << endl;
if ( (disk->deviceName() != "none")
&& (disk->fsType() != "swap")
@@ -211,7 +211,7 @@ TQFile f(FSTAB);
&& (disk->mountPoint() != "/dev/swap")
&& (disk->mountPoint() != "/dev/pts")
&& (disk->mountPoint() != "/dev/shm")
- && (disk->mountPoint().find("/proc") == -1 ) )
+ && (disk->mountPoint().tqfind("/proc") == -1 ) )
replaceDeviceEntry(disk);
else
delete disk;
@@ -243,7 +243,7 @@ void DiskList::receivedDFStdErrOut(KProcess *, char *data, int len )
*/
- TQString tmp = TQString::fromLatin1(data, len);
+ TQString tmp = TQString::tqfromLatin1(data, len);
dfStringErrOut.append(tmp);
}
@@ -295,7 +295,7 @@ void DiskList::dfDone()
if ( !s.isEmpty() ) {
disk = new DiskEntry(); Q_CHECK_PTR(disk);
- if (s.find(BLANK)<0) // devicename was too long, rest in next line
+ if (s.tqfind(BLANK)<0) // devicename was too long, rest in next line
if ( !t.eof() ) { // just appends the next line
v=t.readLine();
s=s.append(v.latin1() );
@@ -305,37 +305,37 @@ void DiskList::dfDone()
//kdDebug() << "EFFECTIVELY GOT " << s.length() << " chars: [" << s << "]" << endl;
- disk->setDeviceName(s.left(s.find(BLANK)) );
- s=s.remove(0,s.find(BLANK)+1 );
+ disk->setDeviceName(s.left(s.tqfind(BLANK)) );
+ s=s.remove(0,s.tqfind(BLANK)+1 );
//kdDebug() << " DeviceName: [" << disk->deviceName() << "]" << endl;
if (NO_FS_TYPE) {
//kdDebug() << "THERE IS NO FS_TYPE_FIELD!" << endl;
disk->setFsType("?");
} else {
- disk->setFsType(s.left(s.find(BLANK)) );
- s=s.remove(0,s.find(BLANK)+1 );
+ disk->setFsType(s.left(s.tqfind(BLANK)) );
+ s=s.remove(0,s.tqfind(BLANK)+1 );
};
//kdDebug() << " FS-Type: [" << disk->fsType() << "]" << endl;
//kdDebug() << " Icon: [" << disk->iconName() << "]" << endl;
- u=s.left(s.find(BLANK));
+ u=s.left(s.tqfind(BLANK));
disk->setKBSize(u.toInt() );
- s=s.remove(0,s.find(BLANK)+1 );
+ s=s.remove(0,s.tqfind(BLANK)+1 );
//kdDebug() << " Size: [" << disk->kBSize() << "]" << endl;
- u=s.left(s.find(BLANK));
+ u=s.left(s.tqfind(BLANK));
disk->setKBUsed(u.toInt() );
- s=s.remove(0,s.find(BLANK)+1 );
+ s=s.remove(0,s.tqfind(BLANK)+1 );
//kdDebug() << " Used: [" << disk->kBUsed() << "]" << endl;
- u=s.left(s.find(BLANK));
+ u=s.left(s.tqfind(BLANK));
disk->setKBAvail(u.toInt() );
- s=s.remove(0,s.find(BLANK)+1 );
+ s=s.remove(0,s.tqfind(BLANK)+1 );
//kdDebug() << " Avail: [" << disk->kBAvail() << "]" << endl;
- s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94%
+ s=s.remove(0,s.tqfind(BLANK)+1 ); // delete the capacity 94%
disk->setMountPoint(s);
//kdDebug() << " MountPoint: [" << disk->mountPoint() << "]" << endl;
@@ -346,7 +346,7 @@ void DiskList::dfDone()
&& (disk->mountPoint() != "/dev/swap")
&& (disk->mountPoint() != "/dev/pts")
&& (disk->mountPoint() != "/dev/shm")
- && (disk->mountPoint().find("/proc") == -1 ) ) {
+ && (disk->mountPoint().tqfind("/proc") == -1 ) ) {
disk->setMounted(TRUE); // its now mounted (df lists only mounted)
replaceDeviceEntry(disk);
} else
@@ -391,10 +391,10 @@ void DiskList::replaceDeviceEntry(DiskEntry *disk)
//
// 1999-27-11 Espen Sand:
- // I can't get find() to work. The Disks::compareItems(..) is
+ // I can't get tqfind() to work. The Disks::compareItems(..) is
// never called.
//
- //int pos=disks->find(disk);
+ //int pos=disks->tqfind(disk);
TQString deviceRealName = disk->deviceRealName();
TQString realMountPoint = disk->realMountPoint();
@@ -426,13 +426,13 @@ void DiskList::replaceDeviceEntry(DiskEntry *disk)
// eg. /cache/cache/.cfs_mnt_points/srv:_home_jesus
// ^ ^
TQString odiskName = olddisk->deviceName();
- int ci=odiskName.find(':'); // goto host-column
- while ((ci =odiskName.find('/',ci)) > 0) {
- odiskName.replace(ci,1,"_");
+ int ci=odiskName.tqfind(':'); // goto host-column
+ while ((ci =odiskName.tqfind('/',ci)) > 0) {
+ odiskName.tqreplace(ci,1,"_");
}//while
// check if there is something that is exactly the tail
// eg. [srv:/tmp3] is exact tail of [/cache/.cfs_mnt_points/srv:_tmp3]
- if ( ( (p=disk->deviceName().findRev(odiskName
+ if ( ( (p=disk->deviceName().tqfindRev(odiskName
,disk->deviceName().length()) )
!= -1)
&& (p + odiskName.length()
@@ -455,10 +455,10 @@ void DiskList::replaceDeviceEntry(DiskEntry *disk)
}
#endif
- if (pos != -1) { // replace
+ if (pos != -1) { // tqreplace
DiskEntry * olddisk = disks->at(pos);
- if ( (-1!=olddisk->mountOptions().find("user")) &&
- (-1==disk->mountOptions().find("user")) ) {
+ if ( (-1!=olddisk->mountOptions().tqfind("user")) &&
+ (-1==disk->mountOptions().tqfind("user")) ) {
// add "user" option to new diskEntry
TQString s=disk->mountOptions();
if (s.length()>0) s.append(",");
diff --git a/kdf/disklist.h b/kdf/disklist.h
index cd9613c..4f01d87 100644
--- a/kdf/disklist.h
+++ b/kdf/disklist.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -93,14 +93,15 @@ private:
};
/***************************************************************************/
-class DiskList : public QObject
+class DiskList : public TQObject
{ Q_OBJECT
+ TQ_OBJECT
public:
- DiskList( TQObject *parent=0, const char *name=0 );
+ DiskList( TQObject *tqparent=0, const char *name=0 );
~DiskList();
int readFSTAB();
int readDF();
- int find(const DiskEntry* disk) {return disks->find(disk);}
+ int tqfind(const DiskEntry* disk) {return disks->tqfind(disk);}
DiskEntry* at(uint index) {return disks->at(index);}
DiskEntry* first() {return disks->first();}
DiskEntry* next() {return disks->next();}
diff --git a/kdf/disks.cpp b/kdf/disks.cpp
index ca8f263..0ae7c2b 100644
--- a/kdf/disks.cpp
+++ b/kdf/disks.cpp
@@ -3,7 +3,7 @@
*
* Copyright (c) 1998 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -65,14 +65,14 @@ void DiskEntry::init()
}
-DiskEntry::DiskEntry(TQObject *parent, const char *name)
- : TQObject (parent, name)
+DiskEntry::DiskEntry(TQObject *tqparent, const char *name)
+ : TQObject (tqparent, name)
{
init();
}
-DiskEntry::DiskEntry(const TQString & deviceName, TQObject *parent, const char *name)
- : TQObject (parent, name)
+DiskEntry::DiskEntry(const TQString & deviceName, TQObject *tqparent, const char *name)
+ : TQObject (tqparent, name)
{
init();
@@ -104,13 +104,13 @@ int DiskEntry::mount()
{
// FreeBSD's mount(8) is picky: -o _must_ go before
// the device and mountpoint.
- cmdS=TQString::fromLatin1("mount -t%t -o%o %d %m");
+ cmdS=TQString::tqfromLatin1("mount -t%t -o%o %d %m");
}
- cmdS.replace(TQString::fromLatin1("%d"),deviceName());
- cmdS.replace(TQString::fromLatin1("%m"),mountPoint());
- cmdS.replace(TQString::fromLatin1("%t"),fsType());
- cmdS.replace(TQString::fromLatin1("%o"),mountOptions());
+ cmdS.tqreplace(TQString::tqfromLatin1("%d"),deviceName());
+ cmdS.tqreplace(TQString::tqfromLatin1("%m"),mountPoint());
+ cmdS.tqreplace(TQString::tqfromLatin1("%t"),fsType());
+ cmdS.tqreplace(TQString::tqfromLatin1("%o"),mountOptions());
kdDebug() << "mount-cmd: [" << cmdS << "]" << endl;
int e=sysCall(cmdS);
@@ -126,8 +126,8 @@ int DiskEntry::umount()
if (cmdS.isEmpty()) // generate default umount cmd
cmdS="umount %d";
- cmdS.replace(TQString::fromLatin1("%d"),deviceName());
- cmdS.replace(TQString::fromLatin1("%m"),mountPoint());
+ cmdS.tqreplace(TQString::tqfromLatin1("%d"),deviceName());
+ cmdS.tqreplace(TQString::tqfromLatin1("%m"),mountPoint());
kdDebug() << "umount-cmd: [" << cmdS << "]" << endl;
int e=sysCall(cmdS);
@@ -193,23 +193,23 @@ TQString DiskEntry::guessIconName()
{
TQString iconName;
// try to be intelligent
- if (-1!=mountPoint().find("cdrom",0,FALSE)) iconName+="cdrom";
- else if (-1!=deviceName().find("cdrom",0,FALSE)) iconName+="cdrom";
- else if (-1!=mountPoint().find("writer",0,FALSE)) iconName+="cdwriter";
- else if (-1!=deviceName().find("writer",0,FALSE)) iconName+="cdwriter";
- else if (-1!=mountPoint().find("mo",0,FALSE)) iconName+="mo";
- else if (-1!=deviceName().find("mo",0,FALSE)) iconName+="mo";
- else if (-1!=deviceName().find("fd",0,FALSE)) {
- if (-1!=deviceName().find("360",0,FALSE)) iconName+="5floppy";
- if (-1!=deviceName().find("1200",0,FALSE)) iconName+="5floppy";
+ if (-1!=mountPoint().tqfind("cdrom",0,FALSE)) iconName+="cdrom";
+ else if (-1!=deviceName().tqfind("cdrom",0,FALSE)) iconName+="cdrom";
+ else if (-1!=mountPoint().tqfind("writer",0,FALSE)) iconName+="cdwriter";
+ else if (-1!=deviceName().tqfind("writer",0,FALSE)) iconName+="cdwriter";
+ else if (-1!=mountPoint().tqfind("mo",0,FALSE)) iconName+="mo";
+ else if (-1!=deviceName().tqfind("mo",0,FALSE)) iconName+="mo";
+ else if (-1!=deviceName().tqfind("fd",0,FALSE)) {
+ if (-1!=deviceName().tqfind("360",0,FALSE)) iconName+="5floppy";
+ if (-1!=deviceName().tqfind("1200",0,FALSE)) iconName+="5floppy";
else iconName+="3floppy";
}
- else if (-1!=mountPoint().find("floppy",0,FALSE)) iconName+="3floppy";
- else if (-1!=mountPoint().find("zip",0,FALSE)) iconName+="zip";
- else if (-1!=fsType().find("nfs",0,FALSE)) iconName+="nfs";
+ else if (-1!=mountPoint().tqfind("floppy",0,FALSE)) iconName+="3floppy";
+ else if (-1!=mountPoint().tqfind("zip",0,FALSE)) iconName+="zip";
+ else if (-1!=fsType().tqfind("nfs",0,FALSE)) iconName+="nfs";
else iconName+="hdd";
mounted() ? iconName+="_mount" : iconName+="_unmount";
-// if ( -1==mountOptions().find("user",0,FALSE) )
+// if ( -1==mountOptions().tqfind("user",0,FALSE) )
// iconName.prepend("root_"); // special root icon, normal user canīt mount
//debug("device %s is %s",deviceName().latin1(),iconName.latin1());
@@ -226,11 +226,11 @@ int DiskEntry::sysCall(const TQString & command)
{
if (readingSysStdErrOut || sysProc->isRunning() ) return -1;
- sysStringErrOut=i18n("Called: %1\n\n").arg(command); // put the called command on ErrOut
+ sysStringErrOut=i18n("Called: %1\n\n").tqarg(command); // put the called command on ErrOut
sysProc->clearArguments();
(*sysProc) << command;
if (!sysProc->start( KProcess::Block, KProcess::AllOutput ))
- kdFatal() << i18n("could not execute %1").arg(command.local8Bit().data()) << endl;
+ kdFatal() << i18n("could not execute %1").tqarg(command.local8Bit().data()) << endl;
if (sysProc->exitStatus()!=0) emit sysCallError(this, sysProc->exitStatus());
diff --git a/kdf/disks.h b/kdf/disks.h
index ed80c3d..d27bc0b 100644
--- a/kdf/disks.h
+++ b/kdf/disks.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 1998 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -37,12 +37,13 @@
#include <kprocess.h>
#include <klocale.h>
-class DiskEntry : public QObject
+class DiskEntry : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- DiskEntry(TQObject *parent=0, const char *name=0);
- DiskEntry(const TQString & deviceName, TQObject *parent=0, const char *name=0);
+ DiskEntry(TQObject *tqparent=0, const char *name=0);
+ DiskEntry(const TQString & deviceName, TQObject *tqparent=0, const char *name=0);
~DiskEntry();
TQString lastSysError() {return sysStringErrOut; }
TQString deviceName() const { return device; }
diff --git a/kdf/kcmdf.cpp b/kdf/kcmdf.cpp
index 2e26113..72389ef 100644
--- a/kdf/kcmdf.cpp
+++ b/kdf/kcmdf.cpp
@@ -32,8 +32,8 @@
#include "kcmdf.h"
-KDiskFreeWidget::KDiskFreeWidget( TQWidget *parent, const char *name )
- : KCModule( parent, name )
+KDiskFreeWidget::KDiskFreeWidget( TQWidget *tqparent, const char *name )
+ : KCModule( tqparent, name )
{
setButtons(Help);
@@ -57,9 +57,9 @@ TQString KDiskFreeWidget::quickHelp() const
extern "C"
{
- KDE_EXPORT KCModule* create_kdf( TQWidget *parent, const char * /*name*/ )
+ KDE_EXPORT KCModule* create_kdf( TQWidget *tqparent, const char * /*name*/ )
{
- return new KDiskFreeWidget( parent , "kdf" );
+ return new KDiskFreeWidget( tqparent , "kdf" );
}
}
diff --git a/kdf/kcmdf.h b/kdf/kcmdf.h
index 030b7dd..a33739c 100644
--- a/kdf/kcmdf.h
+++ b/kdf/kcmdf.h
@@ -33,9 +33,10 @@
class KDiskFreeWidget : public KCModule
{
Q_OBJECT
+ TQ_OBJECT
public:
- KDiskFreeWidget( TQWidget *parent=0, const char *name=0 );
+ KDiskFreeWidget( TQWidget *tqparent=0, const char *name=0 );
~KDiskFreeWidget();
TQString quickHelp() const;
diff --git a/kdf/kconftest.cpp b/kdf/kconftest.cpp
index 6ee63f0..7c0d0a9 100644
--- a/kdf/kconftest.cpp
+++ b/kdf/kconftest.cpp
@@ -27,7 +27,7 @@
/* compile with
-* gcc -I$QTDIR/include -I$KDEDIR/include -L/opt/kde/lib -L/usr/X11R6/lib -lkfm -lkdeui -lkdecore -lqt -lX11 -lXext -fno-rtti kconftest.cpp
+* gcc -I$TQTDIR/include -I$KDEDIR/include -L/opt/kde/lib -L/usr/X11R6/lib -lkfm -lkdeui -lkdecore -lqt -lX11 -lXext -fno-rtti kconftest.cpp
*/
diff --git a/kdf/kdf.cpp b/kdf/kdf.cpp
index 606c44e..f963a12 100644
--- a/kdf/kdf.cpp
+++ b/kdf/kdf.cpp
@@ -41,15 +41,15 @@ KDFTopLevel::KDFTopLevel(TQWidget *, const char *name)
{
kdf = new KDFWidget(this,"kdf",FALSE);
Q_CHECK_PTR(kdf);
- (void) new KAction( i18n( "&Update" ), 0, kdf, TQT_SLOT( updateDF() ), actionCollection(), "updatedf" );
+ (void) new KAction( i18n( "&Update" ), 0, TQT_TQOBJECT(kdf), TQT_SLOT( updateDF() ), actionCollection(), "updatedf" );
- KStdAction::quit(this, TQT_SLOT(close()), actionCollection());
- KStdAction::preferences(kdf, TQT_SLOT(settingsBtnClicked()), actionCollection());
+ KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(kdf), TQT_SLOT(settingsBtnClicked()), actionCollection());
KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()),
actionCollection());
setCentralWidget(kdf);
- // kdf->setMinimumSize(kdf->sizeHint());
- kdf->resize(kdf->sizeHint());
+ // kdf->setMinimumSize(kdf->tqsizeHint());
+ kdf->resize(kdf->tqsizeHint());
setupGUI(KMainWindow::Keys | StatusBar | Save | Create);
}
diff --git a/kdf/kdf.h b/kdf/kdf.h
index 84c0411..176e7b0 100644
--- a/kdf/kdf.h
+++ b/kdf/kdf.h
@@ -31,9 +31,10 @@
class KDFTopLevel : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
- KDFTopLevel(TQWidget *parent=0, const char *name=0);
+ KDFTopLevel(TQWidget *tqparent=0, const char *name=0);
~KDFTopLevel() { };
protected slots:
diff --git a/kdf/kdfconfig.cpp b/kdf/kdfconfig.cpp
index e13ebcd..2478d28 100644
--- a/kdf/kdfconfig.cpp
+++ b/kdf/kdfconfig.cpp
@@ -3,7 +3,7 @@
*
* Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -50,8 +50,8 @@ static bool GUI;
#endif
-KDFConfigWidget::KDFConfigWidget(TQWidget *parent, const char *name, bool init)
- : TQWidget( parent, name)
+KDFConfigWidget::KDFConfigWidget(TQWidget *tqparent, const char *name, bool init)
+ : TQWidget( tqparent, name)
{
mTabName.resize(8);
@@ -99,7 +99,7 @@ KDFConfigWidget::KDFConfigWidget(TQWidget *parent, const char *name, bool init)
mScroll = new TQScrollBar( this );
Q_CHECK_PTR(mScroll);
- mScroll->setOrientation( TQScrollBar::Horizontal );
+ mScroll->setOrientation( Qt::Horizontal );
mScroll->setSteps(1,20);
mScroll->setRange(0, 180 );
gl->addWidget( mScroll, 1, 1 );
diff --git a/kdf/kdfconfig.h b/kdf/kdfconfig.h
index 832738a..b1d8821 100644
--- a/kdf/kdfconfig.h
+++ b/kdf/kdfconfig.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -39,9 +39,10 @@ class TQScrollBar;
class CListView;
-class KDFConfigWidget : public QWidget
+class KDFConfigWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
class CTabName
{
@@ -59,7 +60,7 @@ class KDFConfigWidget : public QWidget
};
public:
- KDFConfigWidget( TQWidget *parent=0, const char *name=0, bool init=false);
+ KDFConfigWidget( TQWidget *tqparent=0, const char *name=0, bool init=false);
~KDFConfigWidget();
public slots:
diff --git a/kdf/kdfwidget.cpp b/kdf/kdfwidget.cpp
index 00f1968..8fcc576 100644
--- a/kdf/kdfwidget.cpp
+++ b/kdf/kdfwidget.cpp
@@ -3,7 +3,7 @@
*
* Copyright (c) 1998-2001 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -56,8 +56,8 @@ static bool GUI;
/**************************************************************/
-CListViewItem::CListViewItem( CListView * parent, TQListViewItem * after )
- :TQListViewItem( parent, after )
+CListViewItem::CListViewItem( CListView * tqparent, TQListViewItem * after )
+ :TQListViewItem( tqparent, after )
{}
int CListViewItem::compare ( TQListViewItem *i, int column, bool ) const
@@ -92,8 +92,8 @@ void CListViewItem::setKeys (int kb_size, int kb_avail, float percent_full)
/**************************************************************/
-KDFWidget::KDFWidget( TQWidget *parent, const char *name, bool init )
- : TQWidget(parent, name), mOptionDialog(0), mPopup(0), mTimer(0)
+KDFWidget::KDFWidget( TQWidget *tqparent, const char *name, bool init )
+ : TQWidget(tqparent, name), mOptionDialog(0), mPopup(0), mTimer(0)
{
connect(&mDiskList , TQT_SIGNAL(readDFDone() ),
this, TQT_SLOT (updateDFDone()) );
@@ -131,7 +131,7 @@ KDFWidget::KDFWidget( TQWidget *parent, const char *name, bool init )
this, TQT_SLOT(columnSizeChanged(int, int, int)) );
makeColumns();
- mIsTopLevel = TQString(parent->className()) == "KDFTopLevel" ? true : false;
+ mIsTopLevel = TQString(tqparent->className()) == "KDFTopLevel" ? true : false;
}
loadSettings();
@@ -156,9 +156,9 @@ void KDFWidget::makeColumns( void )
// 1999-11-29 Espen Sand
// This smells like a bad hack but I need to remove the headers
// first. If I don't, the list look like shit afterwards. The iterator
- // is just used to prevent an endless loop. With my Qt (1999-11-10 ?)
+ // is just used to prevent an endless loop. With my TQt (1999-11-10 ?)
// I only need as many iterations as there are header items but who knows
- // what a new Qt can do!
+ // what a new TQt can do!
//
for( i=1000; mList->header()->count() > 0 && i>0; i-- )
{
@@ -283,7 +283,7 @@ void KDFWidget::setUpdateFrequency( int frequency )
// Kill current timer and restart it if the frequency is
// larger than zero.
//
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
if( frequency > 0 )
{
startTimer( frequency * 1000 );
@@ -343,7 +343,7 @@ void KDFWidget::updateDFDone( void ){
int k=0;
item = new CListViewItem( mList, item );
- bool root = disk->mountOptions().find("user",0,false)==-1 ? true : false;
+ bool root = disk->mountOptions().tqfind("user",0,false)==-1 ? true : false;
item->setPixmap( k++, mList->icon( disk->iconName(), root ) );
item->setText( k++, disk->deviceName() );
item->setText( k++, disk->fsType() );
@@ -377,7 +377,7 @@ void KDFWidget::criticallyFull( DiskEntry *disk )
if( mStd.popupIfFull() == true )
{
TQString msg = i18n("Device [%1] on [%2] is getting critically full!").
- arg(disk->deviceName()).arg(disk->mountPoint());
+ tqarg(disk->deviceName()).tqarg(disk->mountPoint());
KMessageBox::sorry( this, msg, i18n("Warning"));
}
}
@@ -400,10 +400,10 @@ DiskEntry *KDFWidget::selectedDisk( TQListViewItem *item )
DiskEntry disk(item->text(deviceCol));
disk.setMountPoint(item->text(mntCol));
- // I can't get find() to work. The Disks::compareItems(..) is
+ // I can't get tqfind() to work. The Disks::compareItems(..) is
// never called.
//
- //int pos=mDiskList->find(disk);
+ //int pos=mDiskList->tqfind(disk);
int pos = -1;
for( u_int i=0; i<mDiskList.count(); i++ )
@@ -515,10 +515,10 @@ void KDFWidget::popupMenu( TQListViewItem *item, const TQPoint &p )
if( mStd.fileManager().isEmpty() == false )
{
TQString cmd = mStd.fileManager();
- int pos = cmd.find("%m");
+ int pos = cmd.tqfind("%m");
if( pos > 0 )
{
- cmd = cmd.replace( pos, 2, KProcess::quote(disk->mountPoint()) ) + " &";
+ cmd = cmd.tqreplace( pos, 2, KProcess::quote(disk->mountPoint()) ) + " &";
}
else
{
@@ -543,7 +543,7 @@ void KDFWidget::popupMenu( TQListViewItem *item, const TQPoint &p )
/**************************************************************************
- * recalculates and repaints the pixBars
+ * recalculates and tqrepaints the pixBars
**/
void KDFWidget::updateDiskBarPixmaps( void )
{
@@ -569,10 +569,10 @@ void KDFWidget::updateDiskBarPixmaps( void )
int i=0;
for(TQListViewItem *it=mList->firstChild(); it!=0;it=it->nextSibling(),i++ )
{
- // I can't get find() to work. The Disks::compareItems(..) is
+ // I can't get tqfind() to work. The Disks::compareItems(..) is
// never called.
//
- //int pos=mDiskList->find(disk);
+ //int pos=mDiskList->tqfind(disk);
DiskEntry dummy(it->text(deviceCol));
dummy.setMountPoint(it->text(mntCol));
@@ -609,8 +609,8 @@ void KDFWidget::updateDiskBarPixmaps( void )
p.setPen(black);
p.drawRect(0,0,w,h);
TQColor c;
- if ( (disk->iconName().find("cdrom") != -1)
- || (disk->iconName().find("writer") != -1) )
+ if ( (disk->iconName().tqfind("cdrom") != -1)
+ || (disk->iconName().tqfind("writer") != -1) )
c = gray;
else
c = disk->percentFull() > FULL_PERCENT ? red : darkGreen;
diff --git a/kdf/kdfwidget.h b/kdf/kdfwidget.h
index 8c16fb9..af2daa5 100644
--- a/kdf/kdfwidget.h
+++ b/kdf/kdfwidget.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 1998 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -72,10 +72,10 @@ class CTabEntry
// columns with a numeric value are sorted by numerical value.
//
-class CListViewItem : public QListViewItem
+class CListViewItem : public TQListViewItem
{
public:
- CListViewItem ( CListView * parent, TQListViewItem * after );
+ CListViewItem ( CListView * tqparent, TQListViewItem * after );
virtual int compare ( TQListViewItem* i, int col, bool) const;
@@ -89,9 +89,10 @@ class CListViewItem : public QListViewItem
/**************************************************************/
-class KDFWidget : public QWidget
+class KDFWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum ColId
@@ -107,7 +108,7 @@ class KDFWidget : public QWidget
};
public:
- KDFWidget( TQWidget *parent=0, const char *name=0, bool init=false);
+ KDFWidget( TQWidget *tqparent=0, const char *name=0, bool init=false);
~KDFWidget( void );
public slots:
diff --git a/kdf/kwikdisk.cpp b/kdf/kwikdisk.cpp
index 5ca97f5..e6c4020 100644
--- a/kdf/kwikdisk.cpp
+++ b/kdf/kwikdisk.cpp
@@ -134,7 +134,7 @@ void KwikDisk::setUpdateFrequency(int frequency)
// Kill current timer and restart it if the frequency is
// larger than zero.
//
- killTimers();
+ TQT_TQOBJECT(this)->killTimers();
if( frequency > 0 )
{
startTimer(frequency * 1000);
@@ -176,13 +176,13 @@ void KwikDisk::updateDFDone()
{
// FIXME: tool tips are unused atm
TQString toolTipText = i18n("%1 (%2) %3 on %4")
- .arg( disk->mounted() ? i18n("Unmount") : i18n("Mount"))
- .arg(disk->fsType()).arg(disk->deviceName()).arg(disk->mountPoint());
+ .tqarg( disk->mounted() ? i18n("Unmount") : i18n("Mount"))
+ .tqarg(disk->fsType()).tqarg(disk->deviceName()).tqarg(disk->mountPoint());
TQString entryName = disk->mountPoint();
if( disk->mounted() )
{
- entryName += TQString("\t\t\t[%1]").arg(disk->prettyKBAvail());
+ entryName += TQString("\t\t\t[%1]").tqarg(disk->prettyKBAvail());
}
int id = contextMenu()->insertItem("", this, TQT_SLOT(toggleMount(int)) );
contextMenu()->setItemParameter(id, itemNo);
@@ -190,18 +190,18 @@ void KwikDisk::updateDFDone()
TQPixmap *pix = new TQPixmap(KSystemTray::loadIcon(disk->iconName()));
- if( getuid() !=0 && disk->mountOptions().find("user",0, false) == -1 )
+ if( getuid() !=0 && disk->mountOptions().tqfind("user",0, false) == -1 )
{
//
// Special root icon, normal user cant mount.
//
// 2000-01-23 Espen Sand
- // Careful here: If the mask has not been defined we can
- // not use TQPixmap::mask() because it returns 0 => segfault
+ // Careful here: If the tqmask has not been defined we can
+ // not use TQPixmap::tqmask() because it returns 0 => segfault
//
- if( pix->mask() != 0 )
+ if( pix->tqmask() != 0 )
{
- TQBitmap *bm = new TQBitmap(*(pix->mask()));
+ TQBitmap *bm = new TQBitmap(*(pix->tqmask()));
if( bm != 0 )
{
TQPainter qp( bm );
@@ -264,10 +264,10 @@ void KwikDisk::toggleMount(int item)
if( m_options.fileManager().isEmpty() == false )
{
TQString cmd = m_options.fileManager();
- int pos = cmd.find("%m");
+ int pos = cmd.tqfind("%m");
if( pos > 0 )
{
- cmd = cmd.replace( pos, 2, KProcess::quote(disk->mountPoint()) ) + " &";
+ cmd = cmd.tqreplace( pos, 2, KProcess::quote(disk->mountPoint()) ) + " &";
}
else
{
@@ -286,7 +286,7 @@ void KwikDisk::criticallyFull(DiskEntry *disk)
if( m_options.popupIfFull() == true )
{
TQString msg = i18n("Device [%1] on [%2] is getting critically full!")
- .arg(disk->deviceName()).arg(disk->mountPoint());
+ .tqarg(disk->deviceName()).tqarg(disk->mountPoint());
KMessageBox::sorry( this, msg, i18n("Warning"));
}
}
diff --git a/kdf/kwikdisk.h b/kdf/kwikdisk.h
index c404e84..7ac9576 100644
--- a/kdf/kwikdisk.h
+++ b/kdf/kwikdisk.h
@@ -42,6 +42,7 @@
class KwikDisk : public KSystemTray
{
Q_OBJECT
+ TQ_OBJECT
public:
KwikDisk();
diff --git a/kdf/listview.cpp b/kdf/listview.cpp
index 0334101..fc2dde6 100644
--- a/kdf/listview.cpp
+++ b/kdf/listview.cpp
@@ -20,7 +20,7 @@
//
// 1999-11-28 Espen Sand
// The purpose of this class is:
-// 1) Easily set minimum number of visible items and to adjust the sizeHint()
+// 1) Easily set minimum number of visible items and to adjust the tqsizeHint()
// 2) Provide a pixmap collection
//
@@ -34,8 +34,8 @@
template class TQDict<TQPixmap>;
-CListView::CListView( TQWidget *parent, const char *name, int visibleItem )
- :KListView( parent, name ), mVisibleItem(QMAX( 1, visibleItem ))
+CListView::CListView( TQWidget *tqparent, const char *name, int visibleItem )
+ :KListView( tqparent, name ), mVisibleItem(TQMAX( 1, visibleItem ))
{
setVisibleItem(visibleItem);
mPixDict.setAutoDelete(true);
@@ -43,23 +43,23 @@ CListView::CListView( TQWidget *parent, const char *name, int visibleItem )
void CListView::setVisibleItem( int visibleItem, bool updateSize )
{
- mVisibleItem = QMAX( 1, visibleItem );
+ mVisibleItem = TQMAX( 1, visibleItem );
if( updateSize == true )
{
- TQSize s = sizeHint();
- setMinimumSize( s.width() + verticalScrollBar()->sizeHint().width() +
+ TQSize s = tqsizeHint();
+ setMinimumSize( s.width() + verticalScrollBar()->tqsizeHint().width() +
lineWidth() * 2, s.height() );
}
}
-TQSize CListView::sizeHint( void ) const
+TQSize CListView::tqsizeHint( void ) const
{
- TQSize s = TQListView::sizeHint();
+ TQSize s = TQListView::tqsizeHint();
int h = fontMetrics().height() + 2*itemMargin();
if( h % 2 > 0 ) { h++; }
- s.setHeight( h*mVisibleItem + lineWidth()*2 + header()->sizeHint().height());
+ s.setHeight( h*mVisibleItem + lineWidth()*2 + header()->tqsizeHint().height());
return( s );
}
@@ -76,12 +76,12 @@ const TQPixmap &CListView::icon( const TQString &iconName, bool drawBorder )
{
//
// 2000-01-23 Espen Sand
- // Careful here: If the mask has not been defined we can
- // not use TQPixmap::mask() because it returns 0 => segfault
+ // Careful here: If the tqmask has not been defined we can
+ // not use TQPixmap::tqmask() because it returns 0 => segfault
//
- if( pix->mask() != 0 )
+ if( pix->tqmask() != 0 )
{
- TQBitmap *bm = new TQBitmap(*(pix->mask()));
+ TQBitmap *bm = new TQBitmap(*(pix->tqmask()));
if( bm != 0 )
{
TQPainter qp(bm);
@@ -99,7 +99,7 @@ const TQPixmap &CListView::icon( const TQString &iconName, bool drawBorder )
}
}
- mPixDict.replace( iconName, pix );
+ mPixDict.tqreplace( iconName, pix );
}
return( *pix );
diff --git a/kdf/listview.h b/kdf/listview.h
index d051fdf..c937539 100644
--- a/kdf/listview.h
+++ b/kdf/listview.h
@@ -28,12 +28,13 @@
class CListView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- CListView( TQWidget *parent=0, const char *name=0, int visibleItem=10 );
+ CListView( TQWidget *tqparent=0, const char *name=0, int visibleItem=10 );
void setVisibleItem( int visibleItem, bool updateSize=true );
- virtual TQSize sizeHint( void ) const;
+ virtual TQSize tqsizeHint( void ) const;
const TQPixmap &icon( const TQString &iconName, bool drawBorder );
private:
diff --git a/kdf/mntconfig.cpp b/kdf/mntconfig.cpp
index 0186cc4..caf584c 100644
--- a/kdf/mntconfig.cpp
+++ b/kdf/mntconfig.cpp
@@ -3,7 +3,7 @@
*
* Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -47,8 +47,8 @@ static bool GUI;
#endif
-MntConfigWidget::MntConfigWidget(TQWidget *parent, const char *name, bool init)
- : TQWidget(parent, name)
+MntConfigWidget::MntConfigWidget(TQWidget *tqparent, const char *name, bool init)
+ : TQWidget(tqparent, name)
{
mInitializing = false;
@@ -102,7 +102,7 @@ MntConfigWidget::MntConfigWidget(TQWidget *parent, const char *name, bool init)
mIconButton = new KIconButton(mGroupBox);
mIconButton->setIconType(KIcon::Small, KIcon::Device);
Q_CHECK_PTR(mIconButton);
- mIconButton->setFixedWidth( mIconButton->sizeHint().height() );
+ mIconButton->setFixedWidth( mIconButton->tqsizeHint().height() );
connect(mIconButton,TQT_SIGNAL(iconChanged(TQString)),this,TQT_SLOT(iconChangedButton(TQString)));
gl->addWidget( mIconButton, 2, 1 );
@@ -164,7 +164,7 @@ void MntConfigWidget::readDFDone( void )
TQListViewItem *item = 0;
for( DiskEntry *disk=mDiskList.first(); disk!=0; disk=mDiskList.next(),++i )
{
- item = new TQListViewItem( mList, item, TQString::null, disk->deviceName(),
+ item = new TQListViewItem( mList, item, TQString(), disk->deviceName(),
disk->mountPoint(), disk->mountCommand(), disk->umountCommand() );
item->setPixmap( ICONCOL, SmallIcon( disk->iconName() ) );
mDiskLookup[i] = item;
@@ -251,14 +251,14 @@ void MntConfigWidget::iconChangedButton(TQString iconName)
}
void MntConfigWidget::iconChanged(const TQString &iconName)
{
- if( iconName.findRev('_') == 0 ||
- (iconName.right(iconName.length()-iconName.findRev('_'))!="_mount" &&
- iconName.right(iconName.length()-iconName.findRev('_'))!="_unmount"))
+ if( iconName.tqfindRev('_') == 0 ||
+ (iconName.right(iconName.length()-iconName.tqfindRev('_'))!="_mount" &&
+ iconName.right(iconName.length()-iconName.tqfindRev('_'))!="_unmount"))
{
TQString msg = i18n(""
"This filename is not valid: %1\n"
"It must end with "
- "\"_mount\" or \"_unmount\".").arg(iconName);
+ "\"_mount\" or \"_unmount\".").tqarg(iconName);
KMessageBox::sorry( this, msg );
return;
}
diff --git a/kdf/mntconfig.h b/kdf/mntconfig.h
index 931a109..f3f0d56 100644
--- a/kdf/mntconfig.h
+++ b/kdf/mntconfig.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -43,9 +43,10 @@ class TQListViewItem;
/**************************************************************/
-class MntConfigWidget : public QWidget
+class MntConfigWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum ColType
@@ -58,7 +59,7 @@ class MntConfigWidget : public QWidget
};
public:
- MntConfigWidget( TQWidget *parent=0, const char *name=0, bool init=false );
+ MntConfigWidget( TQWidget *tqparent=0, const char *name=0, bool init=false );
~MntConfigWidget();
public slots:
diff --git a/kdf/optiondialog.cpp b/kdf/optiondialog.cpp
index 8da8dc2..39df7a0 100644
--- a/kdf/optiondialog.cpp
+++ b/kdf/optiondialog.cpp
@@ -23,11 +23,11 @@
#include "mntconfig.h"
#include "optiondialog.h"
-COptionDialog::COptionDialog( TQWidget *parent, const char *name, bool modal )
+COptionDialog::COptionDialog( TQWidget *tqparent, const char *name, bool modal )
:KDialogBase( Tabbed, i18n("Configure"), Help|Apply|Ok|Cancel, Ok,
- parent, name, modal )
+ tqparent, name, modal )
{
- setHelp( "kcontrol/kdf/index.html", TQString::null );
+ setHelp( "kcontrol/kdf/index.html", TQString() );
TQFrame *f1 = addPage( i18n("General Settings") );
TQVBoxLayout *l1 = new TQVBoxLayout( f1 );
diff --git a/kdf/optiondialog.h b/kdf/optiondialog.h
index 6a4bb74..ea3f4c3 100644
--- a/kdf/optiondialog.h
+++ b/kdf/optiondialog.h
@@ -28,9 +28,10 @@ class MntConfigWidget;
class COptionDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- COptionDialog( TQWidget *parent=0, const char *name=0, bool modal=true );
+ COptionDialog( TQWidget *tqparent=0, const char *name=0, bool modal=true );
~COptionDialog( void );
protected slots: