summaryrefslogtreecommitdiffstats
path: root/ksysv
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
commitaa3a1ca934bc541bddd3fa136a85f106f7da266e (patch)
tree9ad0b795aed8fa4ac30c2fe0fd1aacb8175714c0 /ksysv
parentb10cf7066791a2f362495890cd50c984e8025412 (diff)
downloadtdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.tar.gz
tdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1157635 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksysv')
-rw-r--r--ksysv/ActionList.cpp14
-rw-r--r--ksysv/ActionList.h10
-rw-r--r--ksysv/Data.cpp20
-rw-r--r--ksysv/Data.h54
-rw-r--r--ksysv/IOCore.cpp88
-rw-r--r--ksysv/IOCore.h28
-rw-r--r--ksysv/OldView.cpp396
-rw-r--r--ksysv/OldView.h76
-rw-r--r--ksysv/PreferencesDialog.cpp78
-rw-r--r--ksysv/PreferencesDialog.h18
-rw-r--r--ksysv/Properties.cpp70
-rw-r--r--ksysv/Properties.h28
-rw-r--r--ksysv/RunlevelAuthIcon.cpp34
-rw-r--r--ksysv/RunlevelAuthIcon.h14
-rw-r--r--ksysv/ServiceDlg.cpp32
-rw-r--r--ksysv/ServiceDlg.h12
-rw-r--r--ksysv/SpinBox.cpp32
-rw-r--r--ksysv/SpinBox.h16
-rw-r--r--ksysv/TopWidget.cpp312
-rw-r--r--ksysv/TopWidget.h6
-rw-r--r--ksysv/kbusymanager.cpp10
-rw-r--r--ksysv/kdltooltip.cpp26
-rw-r--r--ksysv/kdltooltip.h8
-rw-r--r--ksysv/kscroller.cpp56
-rw-r--r--ksysv/kscroller.h30
-rw-r--r--ksysv/ksv_conf.cpp30
-rw-r--r--ksysv/ksv_conf.h58
-rw-r--r--ksysv/ksv_core.cpp60
-rw-r--r--ksysv/ksv_core.h16
-rw-r--r--ksysv/ksv_service.cpp6
-rw-r--r--ksysv/ksv_service.h14
-rw-r--r--ksysv/ksvapplication.cpp2
-rw-r--r--ksysv/ksvconfigwizard.cpp22
-rw-r--r--ksysv/ksvconfigwizard.h10
-rw-r--r--ksysv/ksvdrag.cpp32
-rw-r--r--ksysv/ksvdrag.h10
-rw-r--r--ksysv/ksvdraglist.cpp156
-rw-r--r--ksysv/ksvdraglist.h122
-rw-r--r--ksysv/ksvlookandfeel.cpp14
-rw-r--r--ksysv/ksvlookandfeel.h16
-rw-r--r--ksysv/ksvmiscconfig.cpp6
-rw-r--r--ksysv/ksvmiscconfig.h2
-rw-r--r--ksysv/ksvpathconfig.cpp6
-rw-r--r--ksysv/ksvpathconfig.h2
-rw-r--r--ksysv/trash.cpp44
-rw-r--r--ksysv/trash.h20
46 files changed, 1058 insertions, 1058 deletions
diff --git a/ksysv/ActionList.cpp b/ksysv/ActionList.cpp
index a2e2de8..21caa93 100644
--- a/ksysv/ActionList.cpp
+++ b/ksysv/ActionList.cpp
@@ -12,7 +12,7 @@
* *
***************************************************************************/
-#include <qapplication.h>
+#include <tqapplication.h>
#include "ksvdraglist.h"
#include "ActionList.h"
@@ -147,8 +147,8 @@ void CompoundAction::undo()
// ActionList //
//////////////////////////////////
-ActionList::ActionList (QObject* parent, const char* name)
- : QObject(parent, name)
+ActionList::ActionList (TQObject* parent, const char* name)
+ : TQObject(parent, name)
{
setAutoDelete(false);
}
@@ -162,7 +162,7 @@ void ActionList::undoLast()
if (!count())
return;
- KSVAction* a = QPtrStack<KSVAction>::pop();
+ KSVAction* a = TQPtrStack<KSVAction>::pop();
a->undo();
emit undone();
@@ -182,7 +182,7 @@ void ActionList::redoLast()
if (!count())
return;
- KSVAction* a = QPtrStack<KSVAction>::pop();
+ KSVAction* a = TQPtrStack<KSVAction>::pop();
a->redo();
emit undone();
@@ -199,7 +199,7 @@ void ActionList::redoAll()
void ActionList::push (KSVAction* a)
{
- QPtrStack<KSVAction>::push(a);
+ TQPtrStack<KSVAction>::push(a);
if (count() == 1)
emit filled();
@@ -208,7 +208,7 @@ void ActionList::push (KSVAction* a)
void ActionList::clear()
{
setAutoDelete (true);
- QPtrStack<KSVAction>::clear();
+ TQPtrStack<KSVAction>::clear();
setAutoDelete (false);
emit empty();
diff --git a/ksysv/ActionList.h b/ksysv/ActionList.h
index f420b48..5f5a047 100644
--- a/ksysv/ActionList.h
+++ b/ksysv/ActionList.h
@@ -15,8 +15,8 @@
#ifndef KSV_ACTIONLIST_H
#define KSV_ACTIONLIST_H
-#include <qptrstack.h>
-#include <qobject.h>
+#include <tqptrstack.h>
+#include <tqobject.h>
class KSVData;
class KSVDragList;
@@ -103,15 +103,15 @@ private:
-class ActionList : public QObject, private QPtrStack<KSVAction>
+class ActionList : public TQObject, private TQPtrStack<KSVAction>
{
Q_OBJECT
public:
- ActionList (QObject* parent, const char* name);
+ ActionList (TQObject* parent, const char* name);
virtual ~ActionList ();
- KSVAction* top () const { return QPtrStack<KSVAction>::top(); }
+ KSVAction* top () const { return TQPtrStack<KSVAction>::top(); }
public slots:
void undoLast ();
diff --git a/ksysv/Data.cpp b/ksysv/Data.cpp
index caa4a1b..5b8221c 100644
--- a/ksysv/Data.cpp
+++ b/ksysv/Data.cpp
@@ -1,6 +1,6 @@
// (c) 2000 Peter Putzer
-#include <qdatastream.h>
+#include <tqdatastream.h>
#include <kdatastream.h>
#include "Data.h"
@@ -11,8 +11,8 @@ KSVData::KSVData ()
mNr = mOldNr = 0;
}
-KSVData::KSVData (const QString& file, const QString& path,
- const QString& label, Q_INT8 nr)
+KSVData::KSVData (const TQString& file, const TQString& path,
+ const TQString& label, Q_INT8 nr)
: mPath (path),
mLabel (label), mFilename (file)
{
@@ -94,7 +94,7 @@ bool KSVData::operator< (const KSVData& rhs) const
return mNr< rhs.mNr;
}
-void KSVData::setPath (const QString& s)
+void KSVData::setPath (const TQString& s)
{
if (mPath != s)
mOtherChanged = true;
@@ -102,7 +102,7 @@ void KSVData::setPath (const QString& s)
mPath = s;
}
-void KSVData::setLabel (const QString& s)
+void KSVData::setLabel (const TQString& s)
{
if (!mLabelChanged && mLabel != s)
{
@@ -113,7 +113,7 @@ void KSVData::setLabel (const QString& s)
mLabel = s;
}
-void KSVData::setFilename (const QString& s)
+void KSVData::setFilename (const TQString& s)
{
if (!mFilenameChanged && mFilename != s)
{
@@ -124,7 +124,7 @@ void KSVData::setFilename (const QString& s)
mFilename = s;
}
-void KSVData::setRunlevel (const QString& s)
+void KSVData::setRunlevel (const TQString& s)
{
mRunlevel = s;
}
@@ -146,12 +146,12 @@ void KSVData::setChanged (bool val)
mNrChanged = mLabelChanged = mOtherChanged = mFilenameChanged = val;
}
-void KSVData::setOriginalRunlevel (const QString& rl)
+void KSVData::setOriginalRunlevel (const TQString& rl)
{
mOriginalRunlevel = rl;
}
-QDataStream& operator<< (QDataStream& stream, const KSVData& data)
+TQDataStream& operator<< (TQDataStream& stream, const KSVData& data)
{
return stream << data.mPath
<< data.mFilename
@@ -168,7 +168,7 @@ QDataStream& operator<< (QDataStream& stream, const KSVData& data)
}
-QDataStream& operator>> (QDataStream& stream, KSVData& data)
+TQDataStream& operator>> (TQDataStream& stream, KSVData& data)
{
stream >> data.mPath
>> data.mFilename
diff --git a/ksysv/Data.h b/ksysv/Data.h
index e282346..974194a 100644
--- a/ksysv/Data.h
+++ b/ksysv/Data.h
@@ -9,7 +9,7 @@ class KSVData
{
public:
KSVData ();
- KSVData (const QString& file, const QString& path, const QString& label, Q_INT8 nr);
+ KSVData (const TQString& file, const TQString& path, const TQString& label, Q_INT8 nr);
KSVData (const KSVData& rhs);
inline ~KSVData () {}
@@ -17,19 +17,19 @@ public:
bool operator== (const KSVData& rhs) const;
bool operator< (const KSVData& rhs) const;
- inline QString filenameAndPath () const { return mPath + "/" + mFilename; }
+ inline TQString filenameAndPath () const { return mPath + "/" + mFilename; }
- inline const QString& path () const { return mPath; }
- inline const QString& label () const { return mLabel; }
- inline const QString& filename () const { return mFilename; }
- inline const QString& runlevel () const { return mRunlevel; }
+ inline const TQString& path () const { return mPath; }
+ inline const TQString& label () const { return mLabel; }
+ inline const TQString& filename () const { return mFilename; }
+ inline const TQString& runlevel () const { return mRunlevel; }
inline Q_INT8 number () const { return mNr; }
- inline const QString& numberString () const { return mNumberString; }
+ inline const TQString& numberString () const { return mNumberString; }
- inline const QString& oldLabel () const { return mOldLabel; }
- inline const QString& oldFilename () const { return mOldFilename; }
- inline const QString& originalRunlevel () const { return mOldFilename; }
+ inline const TQString& oldLabel () const { return mOldLabel; }
+ inline const TQString& oldFilename () const { return mOldFilename; }
+ inline const TQString& originalRunlevel () const { return mOldFilename; }
inline Q_INT8 oldNumber () const { return mOldNr; }
inline bool numberChanged () const { return mNrChanged; }
@@ -42,26 +42,26 @@ public:
inline void setNumberChanged (bool val) { mNrChanged = val; }
inline void setNewEntry (bool val) { mNewEntry = val; }
- void setPath (const QString&);
- void setLabel (const QString&);
- void setFilename (const QString&);
- void setRunlevel (const QString&);
- void setOriginalRunlevel (const QString&);
+ void setPath (const TQString&);
+ void setLabel (const TQString&);
+ void setFilename (const TQString&);
+ void setRunlevel (const TQString&);
+ void setOriginalRunlevel (const TQString&);
void setNumber (Q_INT8 nr);
void setChanged (bool);
private:
- friend QDataStream& operator<< (QDataStream&, const KSVData&);
- friend QDataStream& operator>> (QDataStream&, KSVData&);
+ friend TQDataStream& operator<< (TQDataStream&, const KSVData&);
+ friend TQDataStream& operator>> (TQDataStream&, KSVData&);
- QString mPath;
- QString mLabel;
- QString mFilename;
- QString mRunlevel;
+ TQString mPath;
+ TQString mLabel;
+ TQString mFilename;
+ TQString mRunlevel;
Q_INT8 mNr;
- QString mOldLabel;
- QString mOldFilename;
- QString mOriginalRunlevel;
+ TQString mOldLabel;
+ TQString mOldFilename;
+ TQString mOriginalRunlevel;
Q_INT8 mOldNr;
bool mNrChanged;
@@ -70,10 +70,10 @@ private:
bool mFilenameChanged;
bool mNewEntry;
- QString mNumberString;
+ TQString mNumberString;
};
-QDataStream& operator<< (QDataStream& stream, const KSVData& data);
-QDataStream& operator>> (QDataStream& stream, KSVData& data);
+TQDataStream& operator<< (TQDataStream& stream, const KSVData& data);
+TQDataStream& operator>> (TQDataStream& stream, KSVData& data);
#endif // KSV_DATA_H
diff --git a/ksysv/IOCore.cpp b/ksysv/IOCore.cpp
index c61dec6..434d051 100644
--- a/ksysv/IOCore.cpp
+++ b/ksysv/IOCore.cpp
@@ -18,10 +18,10 @@
#include <errno.h>
#include <unistd.h>
-#include <qfileinfo.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqfileinfo.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -36,15 +36,15 @@
#include "ksv_core.h"
#include "ksv_conf.h"
-QString ksv::IO::relToAbs (const QString& dir, const QString& rel)
+TQString ksv::IO::relToAbs (const TQString& dir, const TQString& rel)
{
if (rel.left(1) != "/")
- return QDir::cleanDirPath (dir + "/" + rel);
+ return TQDir::cleanDirPath (dir + "/" + rel);
else
- return QDir::cleanDirPath (rel);
+ return TQDir::cleanDirPath (rel);
}
-void ksv::IO::removeFile (const QFileInfo& info, QDir& dir, QString& rich, QString& plain)
+void ksv::IO::removeFile (const TQFileInfo& info, TQDir& dir, TQString& rich, TQString& plain)
{
if (!dir.remove(info.fileName(), FALSE))
{
@@ -69,26 +69,26 @@ void ksv::IO::removeFile (const QFileInfo& info, QDir& dir, QString& rich, QStri
}
}
-void ksv::IO::dissectFilename (const QString& file, QString& base, int& nr)
+void ksv::IO::dissectFilename (const TQString& file, TQString& base, int& nr)
{
- QString tmp = file.mid(1, file.length());
+ TQString tmp = file.mid(1, file.length());
nr = tmp.left(2).toInt();
base = tmp.mid(2, tmp.length());
}
void ksv::IO::makeSymlink (const KSVData& data, int runlevel, bool start,
- QString& rich, QString& plain)
+ TQString& rich, TQString& plain)
{
- const QString symName = QString("%1%2%3").arg(start ? "S" : "K").arg(data.numberString()).arg(data.label());
- const QString symPath = QString("%1/rc%2.d/").arg(KSVConfig::self()->runlevelPath()).arg(runlevel);
+ const TQString symName = TQString("%1%2%3").arg(start ? "S" : "K").arg(data.numberString()).arg(data.label());
+ const TQString symPath = TQString("%1/rc%2.d/").arg(KSVConfig::self()->runlevelPath()).arg(runlevel);
- const QString symbol = symPath + symName;
- QString target = data.filename();
+ const TQString symbol = symPath + symName;
+ TQString target = data.filename();
- if (QDir::isRelativePath(target))
- target = ksv::IO::makeRelativePath(QDir::cleanDirPath(symPath),
- QDir::cleanDirPath(data.path())) + data.filename();
+ if (TQDir::isRelativePath(target))
+ target = ksv::IO::makeRelativePath(TQDir::cleanDirPath(symPath),
+ TQDir::cleanDirPath(data.path())) + data.filename();
if (symlink(target.local8Bit(), symbol.local8Bit()) == 0)
{
@@ -109,15 +109,15 @@ void ksv::IO::makeSymlink (const KSVData& data, int runlevel, bool start,
}
}
-QString ksv::IO::makeRelativePath (const QString& from, const QString& to)
+TQString ksv::IO::makeRelativePath (const TQString& from, const TQString& to)
{
- if (QDir::isRelativePath(from) || QDir::isRelativePath(to))
- return QString::null;
+ if (TQDir::isRelativePath(from) || TQDir::isRelativePath(to))
+ return TQString::null;
int pos = 0;
const int f_length = from.length();
- QStringList from_list;
+ TQStringList from_list;
while (pos > -1)
{
const int old = pos + 1;
@@ -137,7 +137,7 @@ QString ksv::IO::makeRelativePath (const QString& from, const QString& to)
const int t_length = to.length();
- QStringList to_list;
+ TQStringList to_list;
pos = 0;
while (pos > -1)
@@ -165,7 +165,7 @@ QString ksv::IO::makeRelativePath (const QString& from, const QString& to)
&& *from_list.at(lcp) == *to_list.at(lcp))
lcp++;
- QString result;
+ TQString result;
for (int i = f_c - lcp; i > 0; --i)
result += "../";
@@ -175,11 +175,11 @@ QString ksv::IO::makeRelativePath (const QString& from, const QString& to)
return result;
}
-bool ksv::IO::loadSavedConfiguration (QDataStream& s,
- QValueList<KSVData>* start,
- QValueList<KSVData>* stop)
+bool ksv::IO::loadSavedConfiguration (TQDataStream& s,
+ TQValueList<KSVData>* start,
+ TQValueList<KSVData>* stop)
{
- QCString magic;
+ TQCString magic;
s >> magic;
if (magic != "KSysV")
return false;
@@ -190,18 +190,18 @@ bool ksv::IO::loadSavedConfiguration (QDataStream& s,
if (version != 3)
return false; // too old
- QDateTime saveTime;
+ TQDateTime saveTime;
s >> saveTime;
for (int i = 0; i < ksv::runlevelNumber; ++i)
{
- QString rlMagic;
- QString section;
+ TQString rlMagic;
+ TQString section;
s >> rlMagic;
s >> section;
- if (rlMagic != QString::fromLatin1("RUNLEVEL %1").arg(i))
+ if (rlMagic != TQString::fromLatin1("RUNLEVEL %1").arg(i))
return false;
if (section != "START")
@@ -232,25 +232,25 @@ bool ksv::IO::loadSavedConfiguration (QDataStream& s,
return true;
}
-bool ksv::IO::saveConfiguration (QDataStream& s,
+bool ksv::IO::saveConfiguration (TQDataStream& s,
KSVDragList** start,
KSVDragList** stop)
{
Q_INT32 version = 3;
- s << QCString("KSysV")
+ s << TQCString("KSysV")
<< version
- << QDateTime::currentDateTime(); // save date
+ << TQDateTime::currentDateTime(); // save date
for (int i = 0; i < ksv::runlevelNumber; ++i)
{
Q_INT32 numberOfItems = start[i]->childCount();
- s << QString::fromLatin1 ("RUNLEVEL %1").arg (i)
- << QString::fromLatin1 ("START")
+ s << TQString::fromLatin1 ("RUNLEVEL %1").arg (i)
+ << TQString::fromLatin1 ("START")
<< numberOfItems;
- for (QListViewItemIterator it (start[i]);
+ for (TQListViewItemIterator it (start[i]);
it.current();
++it)
{
@@ -259,10 +259,10 @@ bool ksv::IO::saveConfiguration (QDataStream& s,
numberOfItems = stop[i]->childCount();
- s << QString::fromLatin1 ("STOP")
+ s << TQString::fromLatin1 ("STOP")
<< numberOfItems;
- for (QListViewItemIterator it (stop[i]);
+ for (TQListViewItemIterator it (stop[i]);
it.current();
++it)
{
@@ -273,19 +273,19 @@ bool ksv::IO::saveConfiguration (QDataStream& s,
return true;
}
-KTrader::OfferList ksv::IO::servicesForFile (const QString& filename)
+KTrader::OfferList ksv::IO::servicesForFile (const TQString& filename)
{
static KTrader* trader = KTrader::self();
static KMimeMagic* magic = KMimeMagic::self();
- const QString mimetype = magic->findFileType(filename)->mimeType();
+ const TQString mimetype = magic->findFileType(filename)->mimeType();
return trader->query (mimetype, "Type == 'Application'");
}
-KService::Ptr ksv::IO::preferredServiceForFile (const QString& filename)
+KService::Ptr ksv::IO::preferredServiceForFile (const TQString& filename)
{
static KMimeMagic* magic = KMimeMagic::self();
- const QString mimetype = magic->findFileType(filename)->mimeType();
+ const TQString mimetype = magic->findFileType(filename)->mimeType();
return KServiceTypeProfile::preferredService (mimetype, "Application");
}
diff --git a/ksysv/IOCore.h b/ksysv/IOCore.h
index 37ac4e5..f62611f 100644
--- a/ksysv/IOCore.h
+++ b/ksysv/IOCore.h
@@ -17,8 +17,8 @@
#ifndef KSV_IOCORE_H
#define KSV_IOCORE_H
-#include <qdir.h>
-#include <qstring.h>
+#include <tqdir.h>
+#include <tqstring.h>
#include <ktrader.h>
#include <kservice.h>
@@ -34,28 +34,28 @@ namespace ksv
{
namespace IO
{
- void removeFile (const QFileInfo& info, QDir& dir,
- QString& rich, QString& plain);
+ void removeFile (const TQFileInfo& info, TQDir& dir,
+ TQString& rich, TQString& plain);
- QString relToAbs (const QString& dir, const QString& rel);
+ TQString relToAbs (const TQString& dir, const TQString& rel);
void makeSymlink (const KSVData& data, int runlevel, bool start,
- QString& rich, QString& plain);
+ TQString& rich, TQString& plain);
- void dissectFilename (const QString& file, QString& name, int& nr);
+ void dissectFilename (const TQString& file, TQString& name, int& nr);
- QString makeRelativePath (const QString& from, const QString& to);
+ TQString makeRelativePath (const TQString& from, const TQString& to);
- bool saveConfiguration (QDataStream&,
+ bool saveConfiguration (TQDataStream&,
KSVDragList** start,
KSVDragList** stop);
- bool loadSavedConfiguration (QDataStream&,
- QValueList<KSVData>* start,
- QValueList<KSVData>* stop);
+ bool loadSavedConfiguration (TQDataStream&,
+ TQValueList<KSVData>* start,
+ TQValueList<KSVData>* stop);
- KTrader::OfferList servicesForFile (const QString& filename);
- KService::Ptr preferredServiceForFile (const QString& filename);
+ KTrader::OfferList servicesForFile (const TQString& filename);
+ KService::Ptr preferredServiceForFile (const TQString& filename);
} // namespace IO
} // namespace ksv
diff --git a/ksysv/OldView.cpp b/ksysv/OldView.cpp
index 6e9f7d3..75572b9 100644
--- a/ksysv/OldView.cpp
+++ b/ksysv/OldView.cpp
@@ -22,24 +22,24 @@
#include <config.h>
#endif
-#include <qprogressdialog.h>
-#include <qkeycode.h>
-#include <qmessagebox.h>
-#include <qgroupbox.h>
-#include <qaccel.h>
-#include <qscrollbar.h>
-#include <qtextedit.h>
-#include <qcstring.h>
-#include <qclipboard.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qstylesheet.h>
-#include <qwhatsthis.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qvaluelist.h>
-#include <qsplitter.h>
-#include <qmap.h>
+#include <tqprogressdialog.h>
+#include <tqkeycode.h>
+#include <tqmessagebox.h>
+#include <tqgroupbox.h>
+#include <tqaccel.h>
+#include <tqscrollbar.h>
+#include <tqtextedit.h>
+#include <tqcstring.h>
+#include <tqclipboard.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqstylesheet.h>
+#include <tqwhatsthis.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqvaluelist.h>
+#include <tqsplitter.h>
+#include <tqmap.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -73,14 +73,14 @@
#include "TopWidget.h"
KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const char* name)
- : QSplitter (QSplitter::Vertical, parent, name),
+ : TQSplitter (TQSplitter::Vertical, parent, name),
startRL (new KSVDragList*[ksv::runlevelNumber]),
stopRL (new KSVDragList*[ksv::runlevelNumber]),
conf(KSVConfig::self()),
mScriptBox (0L),
- mRunlevels (new QVBox*[ksv::runlevelNumber]),
+ mRunlevels (new TQVBox*[ksv::runlevelNumber]),
mOrigin (0L),
- mOpenWithMenu (openWithMenu), m_buffer( QCString() )
+ mOpenWithMenu (openWithMenu), m_buffer( TQCString() )
{
setOpaqueResize( KGlobalSettings::opaqueResize() );
@@ -93,7 +93,7 @@ KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const cha
mScriptMenu->insertTitle (i18n ("Services Menu"), -1, 0);
mScroller = new KScroller (this);
- mContent = new QFrame(mScroller, "KSysV Real Content");
+ mContent = new TQFrame(mScroller, "KSysV Real Content");
mScroller->setContent (mContent);
@@ -102,12 +102,12 @@ KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const cha
// watch services dir
KDirWatch* dirwatch = KDirWatch::self();
dirwatch->addDir (conf->scriptPath ());
- connect (dirwatch, SIGNAL (dirty (const QString&)),
- this, SLOT (updateServicesAfterChange (const QString&)));
- connect (dirwatch, SIGNAL (created (const QString&)),
- this, SLOT (updateServicesAfterChange (const QString&)));
- connect (dirwatch, SIGNAL (deleted (const QString&)),
- this, SLOT (updateServicesAfterChange (const QString&)));
+ connect (dirwatch, TQT_SIGNAL (dirty (const TQString&)),
+ this, TQT_SLOT (updateServicesAfterChange (const TQString&)));
+ connect (dirwatch, TQT_SIGNAL (created (const TQString&)),
+ this, TQT_SLOT (updateServicesAfterChange (const TQString&)));
+ connect (dirwatch, TQT_SIGNAL (deleted (const TQString&)),
+ this, TQT_SLOT (updateServicesAfterChange (const TQString&)));
setSizes(KSVContent::panningFactorToSplitter (conf->panningFactor()));
@@ -126,7 +126,7 @@ KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const cha
textDisplay->setStyleSheet (ksv::styleSheet());
// Open With... menu
- connect (mOpenWithMenu, SIGNAL (activated (int)), this, SLOT (openWith (int)));
+ connect (mOpenWithMenu, TQT_SIGNAL (activated (int)), this, TQT_SLOT (openWith (int)));
calcMinSize();
}
@@ -143,7 +143,7 @@ KSVContent::~KSVContent()
}
-void KSVContent::updateServicesAfterChange (const QString& dir)
+void KSVContent::updateServicesAfterChange (const TQString& dir)
{
if (!dir.startsWith(conf->scriptPath()))
return;
@@ -184,30 +184,30 @@ void KSVContent::updateRunlevelsAfterChange ()
void KSVContent::initLList()
{
- QHBoxLayout *lay = new QHBoxLayout( mContent, KDialog::marginHint(), KDialog::spacingHint() );
- mScriptBox = new QVBox (mContent);
+ TQHBoxLayout *lay = new TQHBoxLayout( mContent, KDialog::marginHint(), KDialog::spacingHint() );
+ mScriptBox = new TQVBox (mContent);
lay->addWidget(mScriptBox);
mScriptBox->setSpacing (KDialog::spacingHint());
- QVBox* scriptLabelBox = new QVBox (mScriptBox);
- QLabel* servL = new QLabel (i18n("&Available\n" \
+ TQVBox* scriptLabelBox = new TQVBox (mScriptBox);
+ TQLabel* servL = new TQLabel (i18n("&Available\n" \
"Services"), scriptLabelBox);
// provide quickhelp
- QWhatsThis::add (scriptLabelBox,
+ TQWhatsThis::add (scriptLabelBox,
i18n("<p>These are the <img src=\"small|exec\"/> <strong>services</strong> available on your computer. " \
"To start a service, drag it onto the <em>Start</em> " \
"section of a runlevel.</p>" \
"<p>To stop one, do the same for the <em>Stop</em> section.</p>"));
- QFont bold_font = QFont(KGlobalSettings::generalFont());
+ TQFont bold_font = TQFont(KGlobalSettings::generalFont());
bold_font.setBold(TRUE);
servL->setFont(bold_font);
scripts = new KServiceDragList (scriptLabelBox, "Scripts");
scripts->setAcceptDrops (false);
- scripts->setColumnWidthMode (KSVItem::SortNumber, QListView::Manual);
+ scripts->setColumnWidthMode (KSVItem::SortNumber, TQListView::Manual);
scripts->setColumnWidth(KSVItem::SortNumber,0);
scripts->setSorting (KSVItem::ServiceName);
scripts->header()->setResizeEnabled (false, 0);
@@ -219,26 +219,26 @@ void KSVContent::initLList()
servL->setBuddy(scripts);
// doubleclick && return
- connect (scripts, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotScriptProperties(QListViewItem*)));
- connect (scripts, SIGNAL (returnPressed (QListViewItem*)),
- this, SLOT (slotScriptProperties (QListViewItem*)));
+ connect (scripts, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotScriptProperties(TQListViewItem*)));
+ connect (scripts, TQT_SIGNAL (returnPressed (TQListViewItem*)),
+ this, TQT_SLOT (slotScriptProperties (TQListViewItem*)));
// context menus
- connect (scripts, SIGNAL (contextMenu (KListView*, QListViewItem*, const QPoint&)),
- this, SLOT (popupServicesMenu (KListView*, QListViewItem*, const QPoint&)));
+ connect (scripts, TQT_SIGNAL (contextMenu (KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT (popupServicesMenu (KListView*, TQListViewItem*, const TQPoint&)));
// for cut & copy
- connect (scripts, SIGNAL (newOrigin ()),
- this, SLOT (fwdOrigin ()));
+ connect (scripts, TQT_SIGNAL (newOrigin ()),
+ this, TQT_SLOT (fwdOrigin ()));
// for origin updates
- connect (scripts, SIGNAL (newOrigin (KSVDragList*)),
- this, SLOT (fwdOrigin (KSVDragList*)));
+ connect (scripts, TQT_SIGNAL (newOrigin (KSVDragList*)),
+ this, TQT_SLOT (fwdOrigin (KSVDragList*)));
trash = new KSVTrash(mScriptBox, "Trash");
- connect (trash, SIGNAL (undoAction (KSVAction*)), this, SLOT (fwdUndoAction (KSVAction*)));
- QWhatsThis::add (trash,
+ connect (trash, TQT_SIGNAL (undoAction (KSVAction*)), this, TQT_SLOT (fwdUndoAction (KSVAction*)));
+ TQWhatsThis::add (trash,
i18n ("<p>You can drag services from a runlevel onto " \
"the <img src=\"small|trash\"/> <strong>trashcan</strong> to " \
"delete them from that runlevel.</p><p>The <strong>Undo command</strong> "\
@@ -246,17 +246,17 @@ void KSVContent::initLList()
for(int i = 0; i < ksv::runlevelNumber; ++i)
{
- mRunlevels[i] = new QVBox (mContent);
+ mRunlevels[i] = new TQVBox (mContent);
lay->addWidget(mRunlevels[i]);
mRunlevels[i]->setSpacing (KDialog::spacingHint());
- // create QString for label
- QString _label (i18n("Runlevel &%1").arg(i));
+ // create TQString for label
+ TQString _label (i18n("Runlevel &%1").arg(i));
// and for the name
- QString _name (i18n("Runlevel %1").arg(i));
+ TQString _name (i18n("Runlevel %1").arg(i));
- QVBox* startBox = new QVBox (mRunlevels[i]);
- QWhatsThis::add (startBox,
+ TQVBox* startBox = new TQVBox (mRunlevels[i]);
+ TQWhatsThis::add (startBox,
i18n("<p>These are the services <strong>started</strong> in runlevel %1.</p>" \
"<p>The number shown on the left of the <img src=\"user|ksysv_start\"/> icon " \
"determines the order in which the services are started. " \
@@ -264,17 +264,17 @@ void KSVContent::initLList()
"<em>sorting number</em> can be generated.</p><p>If that's not possible, you have " \
"to change the number manually via the <strong>Properties dialog box</strong>.</p>").arg(i));
- QLabel* rlL = new QLabel(_label, startBox);
- new QLabel(i18n("Start"), startBox);
+ TQLabel* rlL = new TQLabel(_label, startBox);
+ new TQLabel(i18n("Start"), startBox);
rlL->setFont(bold_font);
// create the "START" list:
startRL[i] = new KSVDragList(startBox, (_name + " START").latin1());
startRL[i]->setDefaultIcon(SmallIcon("ksysv_start"));
- QVBox* stopBox = new QVBox (mRunlevels[i]);
- new QLabel(i18n("Stop"), stopBox);
- QWhatsThis::add (stopBox,
+ TQVBox* stopBox = new TQVBox (mRunlevels[i]);
+ new TQLabel(i18n("Stop"), stopBox);
+ TQWhatsThis::add (stopBox,
i18n("<p>These are the services <strong>stopped</strong> in runlevel %1.</p>" \
"<p>The number shown on the left of the <img src=\"user|ksysv_stop\"/> icon " \
"determines the order in which the services are stopped. " \
@@ -290,64 +290,64 @@ void KSVContent::initLList()
rlL->setBuddy(startRL[i]);
// for cut'n'paste
- connect (startRL[i], SIGNAL (newOrigin ()),
- this, SLOT (fwdOrigin ()));
- connect (startRL[i], SIGNAL (newOrigin (KSVDragList*)),
- this, SLOT (fwdOrigin (KSVDragList*)));
-
- connect (stopRL[i], SIGNAL (newOrigin ()),
- this, SLOT (fwdOrigin ()));
- connect (stopRL[i], SIGNAL (newOrigin (KSVDragList*)),
- this, SLOT (fwdOrigin (KSVDragList*)));
+ connect (startRL[i], TQT_SIGNAL (newOrigin ()),
+ this, TQT_SLOT (fwdOrigin ()));
+ connect (startRL[i], TQT_SIGNAL (newOrigin (KSVDragList*)),
+ this, TQT_SLOT (fwdOrigin (KSVDragList*)));
+
+ connect (stopRL[i], TQT_SIGNAL (newOrigin ()),
+ this, TQT_SLOT (fwdOrigin ()));
+ connect (stopRL[i], TQT_SIGNAL (newOrigin (KSVDragList*)),
+ this, TQT_SLOT (fwdOrigin (KSVDragList*)));
}
lay->addStretch(1);
- connect (scripts, SIGNAL(undoAction(KSVAction*)),
- this, SLOT(fwdUndoAction(KSVAction*)));
+ connect (scripts, TQT_SIGNAL(undoAction(KSVAction*)),
+ this, TQT_SLOT(fwdUndoAction(KSVAction*)));
// add text-diplay widget
- textDisplay = new QTextEdit( QString::null, QString::null, this, "TextDisplayWidget" );
+ textDisplay = new TQTextEdit( TQString::null, TQString::null, this, "TextDisplayWidget" );
textDisplay->setTextFormat( Qt::RichText );
textDisplay->setReadOnly( true );
for (int i = 0; i < ksv::runlevelNumber; ++i)
{
- connect (startRL[i], SIGNAL(newOrigin()), stopRL[i], SLOT(slotNewOrigin()));
- connect (stopRL[i], SIGNAL(newOrigin()), startRL[i], SLOT(slotNewOrigin()));
+ connect (startRL[i], TQT_SIGNAL(newOrigin()), stopRL[i], TQT_SLOT(slotNewOrigin()));
+ connect (stopRL[i], TQT_SIGNAL(newOrigin()), startRL[i], TQT_SLOT(slotNewOrigin()));
- connect (startRL[i], SIGNAL(undoAction(KSVAction*)),
- this, SLOT(fwdUndoAction(KSVAction*)));
- connect (stopRL[i], SIGNAL(undoAction(KSVAction*)),
- this, SLOT(fwdUndoAction(KSVAction*)));
+ connect (startRL[i], TQT_SIGNAL(undoAction(KSVAction*)),
+ this, TQT_SLOT(fwdUndoAction(KSVAction*)));
+ connect (stopRL[i], TQT_SIGNAL(undoAction(KSVAction*)),
+ this, TQT_SLOT(fwdUndoAction(KSVAction*)));
// doubleclick && return
- connect (startRL[i], SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotDoubleClick(QListViewItem*)));
- connect (stopRL[i], SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotDoubleClick(QListViewItem*)));
- connect (startRL[i], SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(slotDoubleClick(QListViewItem*)));
- connect (stopRL[i], SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(slotDoubleClick(QListViewItem*)));
+ connect (startRL[i], TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotDoubleClick(TQListViewItem*)));
+ connect (stopRL[i], TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotDoubleClick(TQListViewItem*)));
+ connect (startRL[i], TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(slotDoubleClick(TQListViewItem*)));
+ connect (stopRL[i], TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(slotDoubleClick(TQListViewItem*)));
// context menus
- connect (startRL[i], SIGNAL (contextMenu (KListView*, QListViewItem*, const QPoint&)),
- this, SLOT (popupRunlevelMenu (KListView*, QListViewItem*, const QPoint&)));
- connect (stopRL[i], SIGNAL (contextMenu (KListView*, QListViewItem*, const QPoint&)),
- this, SLOT (popupRunlevelMenu (KListView*, QListViewItem*, const QPoint&)));
+ connect (startRL[i], TQT_SIGNAL (contextMenu (KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT (popupRunlevelMenu (KListView*, TQListViewItem*, const TQPoint&)));
+ connect (stopRL[i], TQT_SIGNAL (contextMenu (KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT (popupRunlevelMenu (KListView*, TQListViewItem*, const TQPoint&)));
// cannot generate sorting number
- connect (startRL[i], SIGNAL(cannotGenerateNumber()),
- this, SLOT(fwdCannotGenerateNumber()));
- connect (stopRL[i], SIGNAL(cannotGenerateNumber()),
- this, SLOT(fwdCannotGenerateNumber()));
+ connect (startRL[i], TQT_SIGNAL(cannotGenerateNumber()),
+ this, TQT_SLOT(fwdCannotGenerateNumber()));
+ connect (stopRL[i], TQT_SIGNAL(cannotGenerateNumber()),
+ this, TQT_SLOT(fwdCannotGenerateNumber()));
// connecting origin things for "Scripts", too
- connect (scripts, SIGNAL(newOrigin()), startRL[i], SLOT(slotNewOrigin()));
- connect (scripts, SIGNAL(newOrigin()), stopRL[i], SLOT(slotNewOrigin()));
- connect (startRL[i], SIGNAL(newOrigin()), scripts, SLOT(slotNewOrigin()));
- connect (stopRL[i], SIGNAL(newOrigin()), scripts, SLOT(slotNewOrigin()));
+ connect (scripts, TQT_SIGNAL(newOrigin()), startRL[i], TQT_SLOT(slotNewOrigin()));
+ connect (scripts, TQT_SIGNAL(newOrigin()), stopRL[i], TQT_SLOT(slotNewOrigin()));
+ connect (startRL[i], TQT_SIGNAL(newOrigin()), scripts, TQT_SLOT(slotNewOrigin()));
+ connect (stopRL[i], TQT_SIGNAL(newOrigin()), scripts, TQT_SLOT(slotNewOrigin()));
// use this loop for setting tooltips
startRL[i]->setToolTip (i18n("Drag here to start services\n" \
@@ -359,11 +359,11 @@ void KSVContent::initLList()
{
if (i != j)
{
- connect (startRL[i], SIGNAL (newOrigin()), startRL[j], SLOT (slotNewOrigin()));
- connect (stopRL[i], SIGNAL (newOrigin()), stopRL[j], SLOT (slotNewOrigin()));
+ connect (startRL[i], TQT_SIGNAL (newOrigin()), startRL[j], TQT_SLOT (slotNewOrigin()));
+ connect (stopRL[i], TQT_SIGNAL (newOrigin()), stopRL[j], TQT_SLOT (slotNewOrigin()));
- connect (startRL[i], SIGNAL(newOrigin()), stopRL[j], SLOT(slotNewOrigin()));
- connect (stopRL[i], SIGNAL(newOrigin()), startRL[j], SLOT(slotNewOrigin()));
+ connect (startRL[i], TQT_SIGNAL(newOrigin()), stopRL[j], TQT_SLOT(slotNewOrigin()));
+ connect (stopRL[i], TQT_SIGNAL(newOrigin()), startRL[j], TQT_SLOT(slotNewOrigin()));
}
}
}
@@ -375,14 +375,14 @@ void KSVContent::fwdUndoAction (KSVAction* a)
}
void KSVContent::initScripts() {
- QDir scriptDir = QDir(conf->scriptPath());
+ TQDir scriptDir = TQDir(conf->scriptPath());
if (!scriptDir.exists())
return;
- scriptDir.setFilter (QDir::Files | QDir::Hidden |
- QDir::NoSymLinks | QDir::Executable);
+ scriptDir.setFilter (TQDir::Files | TQDir::Hidden |
+ TQDir::NoSymLinks | TQDir::Executable);
- scriptDir.setSorting (QDir::Name);
+ scriptDir.setSorting (TQDir::Name);
// const QFileInfoList *scriptList = scriptDir.entryInfoList();
QFileInfoListIterator it (*scriptDir.entryInfoList());
@@ -394,7 +394,7 @@ void KSVContent::initScripts() {
scripts->setEnabled(false);
scripts->clear();
- QFileInfo* fi; QString name;
+ TQFileInfo* fi; TQString name;
while ((fi = it.current()))
{
name = fi->fileName();
@@ -422,18 +422,18 @@ void KSVContent::initRunlevels()
startRL[i]->clear();
stopRL[i]->clear();
- const QString _path = conf->runlevelPath() + QString("/rc%1.d").arg(i);
+ const TQString _path = conf->runlevelPath() + TQString("/rc%1.d").arg(i);
- if (!QDir(_path).exists())
+ if (!TQDir(_path).exists())
continue;
- QDir d = QDir(_path);
- d.setFilter( QDir::Files );
- d.setSorting( QDir::Name );
+ TQDir d = TQDir(_path);
+ d.setFilter( TQDir::Files );
+ d.setSorting( TQDir::Name );
const QFileInfoList *rlList = d.entryInfoList();
QFileInfoListIterator it( *rlList ); // create list iterator
- QFileInfo* fi; // pointer for traversing
+ TQFileInfo* fi; // pointer for traversing
while ( (fi=it.current()) )
{ // for each file...
@@ -446,19 +446,19 @@ void KSVContent::initRunlevels()
}
}
-void KSVContent::info2Widget( QFileInfo* info, int index )
+void KSVContent::info2Widget( TQFileInfo* info, int index )
{
if (!info->exists())
return;
- QString f_name = info->fileName();
+ TQString f_name = info->fileName();
- QFileInfo link_info = QFileInfo(info->readLink());
- QString l_base = link_info.fileName();
+ TQFileInfo link_info = TQFileInfo(info->readLink());
+ TQString l_base = link_info.fileName();
- QString l_path = ksv::IO::relToAbs(conf->scriptPath(), link_info.dirPath(FALSE));
+ TQString l_path = ksv::IO::relToAbs(conf->scriptPath(), link_info.dirPath(FALSE));
- QString name;
+ TQString name;
int number;
ksv::IO::dissectFilename( f_name, name, number );
@@ -483,7 +483,7 @@ void KSVContent::slotWriteSysV()
// process "Start"
KSVItem* item = 0L;
- for (QListViewItemIterator it (startRL[i]);
+ for (TQListViewItemIterator it (startRL[i]);
(item = static_cast<KSVItem*> (it.current()));
++it)
{
@@ -492,7 +492,7 @@ void KSVContent::slotWriteSysV()
}
// process "Stop"
- for (QListViewItemIterator it (stopRL[i]);
+ for (TQListViewItemIterator it (stopRL[i]);
(item = static_cast<KSVItem*> (it.current()));
++it)
{
@@ -507,7 +507,7 @@ void KSVContent::slotWriteSysV()
}
void KSVContent::writeToDisk(const KSVData& _w, int _rl, bool _start) {
- QString rich, plain;
+ TQString rich, plain;
ksv::IO::makeSymlink (_w, _rl, _start, rich, plain);
appendLog(rich, plain);
}
@@ -525,13 +525,13 @@ void KSVContent::repaintRunlevels ()
void KSVContent::clearRL(int _rl)
{
- QString path = conf->runlevelPath() + QString("/rc%1.d").arg(_rl);
+ TQString path = conf->runlevelPath() + TQString("/rc%1.d").arg(_rl);
- QDir dir (path);
+ TQDir dir (path);
KSVData* d = 0L;
- for (QPtrListIterator<KSVData> it (startRL[_rl]->getDeletedItems());
+ for (TQPtrListIterator<KSVData> it (startRL[_rl]->getDeletedItems());
(d = it.current());
++it)
{
@@ -539,9 +539,9 @@ void KSVContent::clearRL(int _rl)
if (d->newEntry() && d->originalRunlevel() != startRL[_rl]->name())
break;
- QFileInfo file (path + QString("/S%1%2").arg(d->numberString()).arg(d->label()));
+ TQFileInfo file (path + TQString("/S%1%2").arg(d->numberString()).arg(d->label()));
- QString rich, plain;
+ TQString rich, plain;
ksv::IO::removeFile (file, dir, rich, plain);
appendLog(rich, plain);
}
@@ -549,7 +549,7 @@ void KSVContent::clearRL(int _rl)
// keep GUI alive
qApp->processEvents();
- for (QPtrListIterator<KSVData> it (stopRL[_rl]->getDeletedItems());
+ for (TQPtrListIterator<KSVData> it (stopRL[_rl]->getDeletedItems());
(d = it.current());
++it)
{
@@ -557,9 +557,9 @@ void KSVContent::clearRL(int _rl)
if (d->newEntry() && d->originalRunlevel() != stopRL[_rl]->name())
break;
- QFileInfo file (path + QString("/K%1%2").arg(d->numberString()).arg(d->label()));
+ TQFileInfo file (path + TQString("/K%1%2").arg(d->numberString()).arg(d->label()));
- QString rich, plain;
+ TQString rich, plain;
ksv::IO::removeFile (file, dir, rich, plain);
appendLog(rich, plain);
}
@@ -574,18 +574,18 @@ void KSVContent::infoOnData (KSVItem* item)
KSVData newState = oldState;
KSVEntryPropertiesDialog* props = new KSVEntryPropertiesDialog (newState, kapp->mainWidget());
- connect (props, SIGNAL (editService (const QString&)),
- this, SLOT (editService (const QString&)));
- connect (props, SIGNAL (startService (const QString&)),
- this, SLOT (startService (const QString&)));
- connect (props, SIGNAL (stopService (const QString&)),
- this, SLOT (stopService (const QString&)));
- connect (props, SIGNAL (restartService (const QString&)),
- this, SLOT (restartService (const QString&)));
+ connect (props, TQT_SIGNAL (editService (const TQString&)),
+ this, TQT_SLOT (editService (const TQString&)));
+ connect (props, TQT_SIGNAL (startService (const TQString&)),
+ this, TQT_SLOT (startService (const TQString&)));
+ connect (props, TQT_SIGNAL (stopService (const TQString&)),
+ this, TQT_SLOT (stopService (const TQString&)));
+ connect (props, TQT_SIGNAL (restartService (const TQString&)),
+ this, TQT_SLOT (restartService (const TQString&)));
int res = props->exec();
- if (res == QDialog::Accepted
+ if (res == TQDialog::Accepted
&& !(oldState == newState && oldState.number() == newState.number()))
{
item->copy (newState);
@@ -601,16 +601,16 @@ void KSVContent::stopService ()
KSVContent::stopService (getOrigin()->currentItem()->filenameAndPath());
}
-void KSVContent::stopService (const QString& path)
+void KSVContent::stopService (const TQString& path)
{
KProcess *_proc = new KProcess();
_proc->clearArguments();
*_proc << path << "stop";
- connect(_proc, SIGNAL(processExited(KProcess*)), this, SLOT(slotExitedProcess(KProcess*)));
- connect(_proc, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int)));
- connect(_proc, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int)));
+ connect(_proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotExitedProcess(KProcess*)));
+ connect(_proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
+ connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
// refresh textDisplay
appendLog(i18n("** <stop>Stopping</stop> <cmd>%1</cmd> **<br/>").arg(path),
@@ -627,16 +627,16 @@ void KSVContent::startService ()
KSVContent::startService (getOrigin()->currentItem()->filenameAndPath());
}
-void KSVContent::startService (const QString& path)
+void KSVContent::startService (const TQString& path)
{
KProcess* _proc = new KProcess();
_proc->clearArguments();
*_proc << path << "start";
- connect(_proc, SIGNAL(processExited(KProcess*)), this, SLOT(slotExitedProcess(KProcess*)));
- connect(_proc, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int)));
- connect(_proc, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int)));
+ connect(_proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotExitedProcess(KProcess*)));
+ connect(_proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
+ connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
// refresh textDisplay
appendLog(i18n("** <start>Starting</start> <cmd>%1</cmd> **<br/>").arg(path),
@@ -653,7 +653,7 @@ void KSVContent::editService()
editService (getOrigin()->currentItem()->filenameAndPath());
}
-void KSVContent::editService (const QString& path)
+void KSVContent::editService (const TQString& path)
{
// unfortunately KRun::run() only takes an URL-list instead of a single
// URL as an argument.
@@ -666,7 +666,7 @@ void KSVContent::restartService ()
KSVContent::restartService (getOrigin()->currentItem()->filenameAndPath());
}
-void KSVContent::restartService (const QString& path)
+void KSVContent::restartService (const TQString& path)
{
// restarting
KProcess *_proc = new KProcess();
@@ -674,9 +674,9 @@ void KSVContent::restartService (const QString& path)
*_proc << path << "restart";
- connect(_proc, SIGNAL(processExited(KProcess*)), this, SLOT(slotExitDuringRestart(KProcess*)));
- connect(_proc, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int)));
- connect(_proc, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int)));
+ connect(_proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotExitDuringRestart(KProcess*)));
+ connect(_proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
+ connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
// refresh textDisplay
appendLog(i18n("** Re-starting <cmd>%1</cmd> **</br>").arg(path),
@@ -690,7 +690,7 @@ void KSVContent::restartService (const QString& path)
void KSVContent::slotOutputOrError( KProcess*, char* _buffer, int _buflen) {
if (_buflen > 0) {
- m_buffer += QCString( _buffer, _buflen + 1 );
+ m_buffer += TQCString( _buffer, _buflen + 1 );
appendLog( m_buffer );
}
}
@@ -707,23 +707,23 @@ void KSVContent::slotScriptsNotRemovable()
emit sigNotRemovable();
}
-void KSVContent::slotDoubleClick (QListViewItem* item) {
+void KSVContent::slotDoubleClick (TQListViewItem* item) {
infoOnData(static_cast<KSVItem*>(item));
}
-void KSVContent::slotScriptProperties(QListViewItem* item)
+void KSVContent::slotScriptProperties(TQListViewItem* item)
{
KSVServicePropertiesDialog* prop =
new KSVServicePropertiesDialog (*static_cast<KSVItem*> (item)->data(), kapp->mainWidget());
- connect (prop, SIGNAL (editService (const QString&)),
- this, SLOT (editService (const QString&)));
- connect (prop, SIGNAL (startService (const QString&)),
- this, SLOT (startService (const QString&)));
- connect (prop, SIGNAL (stopService (const QString&)),
- this, SLOT (stopService (const QString&)));
- connect (prop, SIGNAL (restartService (const QString&)),
- this, SLOT (restartService (const QString&)));
+ connect (prop, TQT_SIGNAL (editService (const TQString&)),
+ this, TQT_SLOT (editService (const TQString&)));
+ connect (prop, TQT_SIGNAL (startService (const TQString&)),
+ this, TQT_SLOT (startService (const TQString&)));
+ connect (prop, TQT_SIGNAL (stopService (const TQString&)),
+ this, TQT_SLOT (stopService (const TQString&)));
+ connect (prop, TQT_SIGNAL (restartService (const TQString&)),
+ this, TQT_SLOT (restartService (const TQString&)));
prop->exec();
@@ -737,9 +737,9 @@ void KSVContent::slotExitDuringRestart( KProcess* proc )
// signals connected that screw up our output
proc->clearArguments();
- connect(proc, SIGNAL(processExited(KProcess*)), this, SLOT(slotExitedProcess(KProcess*)));
- connect(proc, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int)));
- connect(proc, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int)));
+ connect(proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotExitedProcess(KProcess*)));
+ connect(proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
+ connect(proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int)));
proc->start(KProcess::NotifyOnExit, KProcess::AllOutput);
}
@@ -765,7 +765,7 @@ void KSVContent::setDisplayScriptOutput(bool val)
calcMinSize();
}
-int KSVContent::splitterToPanningFactor (const QValueList<int>& list)
+int KSVContent::splitterToPanningFactor (const TQValueList<int>& list)
{
const int cont_size = *list.at(0);
const int log_size = *list.at(1);
@@ -773,9 +773,9 @@ int KSVContent::splitterToPanningFactor (const QValueList<int>& list)
return cont_size * 100 / (cont_size + log_size);
}
-const QValueList<int>& KSVContent::panningFactorToSplitter (int panningFactor)
+const TQValueList<int>& KSVContent::panningFactorToSplitter (int panningFactor)
{
- static QValueList<int> res;
+ static TQValueList<int> res;
res.clear();
res << panningFactor << 100 - panningFactor;
@@ -783,7 +783,7 @@ const QValueList<int>& KSVContent::panningFactorToSplitter (int panningFactor)
return res;
}
-void KSVContent::appendLog (const QString& rich, const QString& plain)
+void KSVContent::appendLog (const TQString& rich, const TQString& plain)
{
static bool changed = false;
@@ -798,21 +798,21 @@ void KSVContent::appendLog (const QString& rich, const QString& plain)
textDisplay->append (rich);
}
-void KSVContent::appendLog(const QCString& _buffer)
+void KSVContent::appendLog(const TQCString& _buffer)
{
- QStringList _lines = QStringList::split( "\n", QString::fromLocal8Bit( _buffer ) );
- for ( QStringList::Iterator it = _lines.begin(); it != _lines.end(); ++it )
+ TQStringList _lines = TQStringList::split( "\n", TQString::fromLocal8Bit( _buffer ) );
+ for ( TQStringList::Iterator it = _lines.begin(); it != _lines.end(); ++it )
appendLog( *it, *it );
- m_buffer = QCString();
+ m_buffer = TQCString();
}
-const QString& KSVContent::log () const
+const TQString& KSVContent::log () const
{
return mLogText;
}
-const QString& KSVContent::xmlLog () const
+const TQString& KSVContent::xmlLog () const
{
return mXMLLogText;
}
@@ -836,11 +836,11 @@ void KSVContent::fwdOrigin (KSVDragList* list)
mOrigin = list;
}
-void KSVContent::showEvent (QShowEvent* e)
+void KSVContent::showEvent (TQShowEvent* e)
{
calcMinSize();
- QSplitter::showEvent (e);
+ TQSplitter::showEvent (e);
}
void KSVContent::reSortRL()
@@ -868,22 +868,22 @@ void KSVContent::pasteAppend()
}
}
-void KSVContent::resizeEvent (QResizeEvent* e)
+void KSVContent::resizeEvent (TQResizeEvent* e)
{
updatePanningFactor();
- QSplitter::resizeEvent (e);
+ TQSplitter::resizeEvent (e);
}
-void KSVContent::moveEvent (QMoveEvent* e)
+void KSVContent::moveEvent (TQMoveEvent* e)
{
- QSplitter::moveEvent (e);
+ TQSplitter::moveEvent (e);
}
-void KSVContent::setColors (const QColor& newNormal,
- const QColor& newSelected,
- const QColor& changedNormal,
- const QColor& changedSelected)
+void KSVContent::setColors (const TQColor& newNormal,
+ const TQColor& newSelected,
+ const TQColor& changedNormal,
+ const TQColor& changedSelected)
{
for (int i = 0; i < ksv::runlevelNumber; ++i)
{
@@ -903,7 +903,7 @@ void KSVContent::setColors (const QColor& newNormal,
void KSVContent::multiplexEnabled (bool val)
{
- QListView* list = getOrigin();
+ TQListView* list = getOrigin();
if (list)
@@ -928,7 +928,7 @@ void KSVContent::multiplexEnabled (bool val)
emit newOrigin ();
KSVConfig *config = KSVConfig::self();
- QFileInfo *file = new QFileInfo( config->scriptPath() );
+ TQFileInfo *file = new TQFileInfo( config->scriptPath() );
if ( !file->exists() )
{
@@ -994,7 +994,7 @@ void KSVContent::showRunlevel (int index)
calcMinSize();
}
-void KSVContent::popupRunlevelMenu (KListView* list, QListViewItem* i, const QPoint& p)
+void KSVContent::popupRunlevelMenu (KListView* list, TQListViewItem* i, const TQPoint& p)
{
if (i)
mItemMenu->exec (p, 1);
@@ -1005,7 +1005,7 @@ void KSVContent::popupRunlevelMenu (KListView* list, QListViewItem* i, const QPo
}
}
-void KSVContent::popupServicesMenu (KListView*, QListViewItem* i, const QPoint& p)
+void KSVContent::popupServicesMenu (KListView*, TQListViewItem* i, const TQPoint& p)
{
if (i)
{
@@ -1026,7 +1026,7 @@ void KSVContent::popupServicesMenu (KListView*, QListViewItem* i, const QPoint&
if (i >= 1)
mOpenWithMenu->insertSeparator();
- mOpenWithMenu->insertItem (i18n ("&Other..."), this, SLOT (openWith()));
+ mOpenWithMenu->insertItem (i18n ("&Other..."), this, TQT_SLOT (openWith()));
mScriptMenu->exec (p, 1);
}
@@ -1080,8 +1080,8 @@ void KSVContent::calcMinSize ()
mContent->layout()->setEnabled(true);
}
-void KSVContent::mergeLoadedPackage (QValueList<KSVData>* start,
- QValueList<KSVData>* stop)
+void KSVContent::mergeLoadedPackage (TQValueList<KSVData>* start,
+ TQValueList<KSVData>* stop)
{
for (int i = 0; i < ksv::runlevelNumber; ++i)
{
@@ -1090,12 +1090,12 @@ void KSVContent::mergeLoadedPackage (QValueList<KSVData>* start,
}
}
-void KSVContent::merge (QValueList<KSVData>& list, KSVDragList* widget)
+void KSVContent::merge (TQValueList<KSVData>& list, KSVDragList* widget)
{
- typedef QMap<KSVData, bool> LoadMap;
+ typedef TQMap<KSVData, bool> LoadMap;
LoadMap loaded;
- for (QValueListIterator<KSVData> it = list.begin();
+ for (TQValueListIterator<KSVData> it = list.begin();
it != list.end();
++it)
{
@@ -1126,10 +1126,10 @@ void KSVContent::merge (QValueList<KSVData>& list, KSVDragList* widget)
kapp->processEvents ();
}
- QPtrList<KSVItem> deleteList;
+ TQPtrList<KSVItem> deleteList;
deleteList.setAutoDelete (true);
- for (QListViewItemIterator it (widget); it.current(); ++it)
+ for (TQListViewItemIterator it (widget); it.current(); ++it)
{
KSVItem* item = static_cast<KSVItem*> (it.current());
diff --git a/ksysv/OldView.h b/ksysv/OldView.h
index 8a6899e..4e2c668 100644
--- a/ksysv/OldView.h
+++ b/ksysv/OldView.h
@@ -15,9 +15,9 @@
#ifndef KSV_VIEW_H
#define KSV_VIEW_H
-#include <qsplitter.h>
-#include <qvaluelist.h>
-#include <qsize.h>
+#include <tqsplitter.h>
+#include <tqvaluelist.h>
+#include <tqsize.h>
#include <ktrader.h>
@@ -54,51 +54,51 @@ public:
KSVDragList* getOrigin();
- const QString& log() const;
- const QString& xmlLog() const;
+ const TQString& log() const;
+ const TQString& xmlLog() const;
- void setColors (const QColor& newNormal,
- const QColor& newSelected,
- const QColor& changedNormal,
- const QColor& changedSelected);
+ void setColors (const TQColor& newNormal,
+ const TQColor& newSelected,
+ const TQColor& changedNormal,
+ const TQColor& changedSelected);
- void mergeLoadedPackage (QValueList<KSVData>* start,
- QValueList<KSVData>* stop);
+ void mergeLoadedPackage (TQValueList<KSVData>* start,
+ TQValueList<KSVData>* stop);
public slots:
void slotWriteSysV();
void infoOnData(KSVItem* data);
void setDisplayScriptOutput(bool val);
- void slotScriptProperties (QListViewItem*);
+ void slotScriptProperties (TQListViewItem*);
void multiplexEnabled (bool);
void hideRunlevel (int index);
void showRunlevel (int index);
protected:
- virtual void resizeEvent (QResizeEvent* e);
- virtual void moveEvent (QMoveEvent* e);
- virtual void showEvent (QShowEvent*);
+ virtual void resizeEvent (TQResizeEvent* e);
+ virtual void moveEvent (TQMoveEvent* e);
+ virtual void showEvent (TQShowEvent*);
private slots:
void calcMinSize ();
void fwdOrigin (KSVDragList*);
void startService();
- void startService (const QString& path);
+ void startService (const TQString& path);
void stopService();
- void stopService (const QString& path);
+ void stopService (const TQString& path);
void restartService();
- void restartService (const QString& path);
+ void restartService (const TQString& path);
void editService();
- void editService (const QString& path);
+ void editService (const TQString& path);
void slotOutputOrError( KProcess* _p, char* _buffer, int _buflen );
void slotExitedProcess(KProcess* proc);
void slotScriptsNotRemovable();
- void slotDoubleClick (QListViewItem*);
+ void slotDoubleClick (TQListViewItem*);
void slotExitDuringRestart(KProcess* proc);
- void appendLog(const QString& rich, const QString& plain);
- void appendLog(const QCString& _buffer);
+ void appendLog(const TQString& rich, const TQString& plain);
+ void appendLog(const TQCString& _buffer);
void fwdCannotGenerateNumber();
void fwdOrigin();
void reSortRL();
@@ -106,10 +106,10 @@ private slots:
void fwdUndoAction(KSVAction*);
void updatePanningFactor();
- void popupRunlevelMenu (KListView*, QListViewItem*, const QPoint&);
- void popupServicesMenu (KListView*, QListViewItem*, const QPoint&);
+ void popupRunlevelMenu (KListView*, TQListViewItem*, const TQPoint&);
+ void popupServicesMenu (KListView*, TQListViewItem*, const TQPoint&);
- void updateServicesAfterChange (const QString&);
+ void updateServicesAfterChange (const TQString&);
void updateRunlevelsAfterChange ();
void repaintRunlevels ();
@@ -119,7 +119,7 @@ private slots:
signals:
void sigUpdateParent();
- void sigRun (const QString&);
+ void sigRun (const TQString&);
void sigStop();
void sigNotRemovable();
void cannotGenerateNumber();
@@ -133,20 +133,20 @@ signals:
void newOrigin();
private:
- static int splitterToPanningFactor (const QValueList<int>&);
- static const QValueList<int>& panningFactorToSplitter (int);
+ static int splitterToPanningFactor (const TQValueList<int>&);
+ static const TQValueList<int>& panningFactorToSplitter (int);
- void merge (QValueList<KSVData>& list, KSVDragList* widget);
+ void merge (TQValueList<KSVData>& list, KSVDragList* widget);
void initLList();
void initScripts();
void initRunlevels();
- void info2Widget (QFileInfo* info, int index);
+ void info2Widget (TQFileInfo* info, int index);
void writeToDisk (const KSVData& _w, int _rl, bool _start);
void clearRL( int _rl );
friend class KSVTopLevel;
- QFrame* mContent;
+ TQFrame* mContent;
KScroller* mScroller;
KSVDragList** startRL;
@@ -157,23 +157,23 @@ private:
KPopupMenu* mContextMenu;
KPopupMenu* mScriptMenu;
KSVTrash* trash;
- QTextEdit* textDisplay;
+ TQTextEdit* textDisplay;
KSVConfig* conf;
- QVBox* mScriptBox;
- QVBox** mRunlevels;
- QWidget* mBuffer;
+ TQVBox* mScriptBox;
+ TQVBox** mRunlevels;
+ TQWidget* mBuffer;
KSVDragList* mOrigin;
- QString mLogText, mXMLLogText;
+ TQString mLogText, mXMLLogText;
- QSize mMinSize;
+ TQSize mMinSize;
KPopupMenu* mOpenWithMenu;
KTrader::OfferList mOpenWithOffers;
- QCString m_buffer;
+ TQCString m_buffer;
};
#endif
diff --git a/ksysv/PreferencesDialog.cpp b/ksysv/PreferencesDialog.cpp
index b0a2c42..b2ad038 100644
--- a/ksysv/PreferencesDialog.cpp
+++ b/ksysv/PreferencesDialog.cpp
@@ -1,14 +1,14 @@
// (c) 2000 Peter Putzer
-#include <qframe.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qgrid.h>
-#include <qdir.h>
-#include <qcheckbox.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqgrid.h>
+#include <tqdir.h>
+#include <tqcheckbox.h>
#include <kdebug.h>
#include <klocale.h>
@@ -28,7 +28,7 @@
#include "PreferencesDialog.h"
-KSVPreferences::KSVPreferences (QWidget* parent)
+KSVPreferences::KSVPreferences (TQWidget* parent)
: KDialogBase (IconList, i18n("Configure"), Help|Ok|Apply|Cancel, Ok,
parent, "KSysV Preferences", true, true),
mConfig (KSVConfig::self())
@@ -38,53 +38,53 @@ KSVPreferences::KSVPreferences (QWidget* parent)
/**
* Look & Feel Page
*/
- QFrame* lafPage = addPage (i18n ("Look & Feel"), QString::null, DesktopIcon ("colorize", 32));
+ TQFrame* lafPage = addPage (i18n ("Look & Feel"), TQString::null, DesktopIcon ("colorize", 32));
mLookAndFeel = new KSVLookAndFeel (lafPage);
- connect( mLookAndFeel, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) );
+ connect( mLookAndFeel, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) );
- QVBoxLayout* lafLayout = new QVBoxLayout (lafPage);
+ TQVBoxLayout* lafLayout = new TQVBoxLayout (lafPage);
lafLayout->addWidget (mLookAndFeel);
// /**
// * Colors Page
// */
-// QFrame* colorPage = addPage (i18n("Colors"), QString::null, DesktopIcon ("colorize", 32));
+// TQFrame* colorPage = addPage (i18n("Colors"), TQString::null, DesktopIcon ("colorize", 32));
// mColorConfig = new KSVColorConfig(colorPage);
-// QVBoxLayout* colorLayout = new QVBoxLayout(colorPage);
+// TQVBoxLayout* colorLayout = new TQVBoxLayout(colorPage);
// colorLayout->addWidget(mColorConfig);
// /**
// * Fonts Page
// */
-// QFrame* fontPage = addPage (i18n("Fonts"), QString::null, DesktopIcon ("fonts", 32));
+// TQFrame* fontPage = addPage (i18n("Fonts"), TQString::null, DesktopIcon ("fonts", 32));
// mFontConfig = new KSVFontConfig(fontPage);
-// QVBoxLayout* fontLayout = new QVBoxLayout (fontPage);
+// TQVBoxLayout* fontLayout = new TQVBoxLayout (fontPage);
// fontLayout->addWidget(mFontConfig);
/**
* Paths Page
*/
- QFrame* pathPage = addPage (i18n ("Paths"), QString::null, DesktopIcon ("kfm", 32));
+ TQFrame* pathPage = addPage (i18n ("Paths"), TQString::null, DesktopIcon ("kfm", 32));
mPathConfig = new KSVPathConfig(pathPage);
- connect( mPathConfig, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) );
+ connect( mPathConfig, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) );
- QVBoxLayout *pathLayout = new QVBoxLayout (pathPage);
+ TQVBoxLayout *pathLayout = new TQVBoxLayout (pathPage);
pathLayout->addWidget (mPathConfig);
/**
* Miscellaneous Page
*/
- QFrame* miscPage = addPage (i18n ("Miscellaneous"), i18n("Settings Not Fitting Anywhere Else"),
+ TQFrame* miscPage = addPage (i18n ("Miscellaneous"), i18n("Settings Not Fitting Anywhere Else"),
DesktopIcon ("misc", 32));
mMiscConfig = new KSVMiscConfig(miscPage);
- connect( mMiscConfig, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) );
+ connect( mMiscConfig, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) );
- QVBoxLayout *miscLayout = new QVBoxLayout (miscPage);
+ TQVBoxLayout *miscLayout = new TQVBoxLayout (miscPage);
miscLayout->addWidget (mMiscConfig);
- connect (mMiscConfig->mShowAll, SIGNAL (clicked()), this, SLOT (showAllMessages()));
+ connect (mMiscConfig->mShowAll, TQT_SIGNAL (clicked()), this, TQT_SLOT (showAllMessages()));
reReadConfig();
enableButton( Apply, false );
@@ -138,7 +138,7 @@ bool KSVPreferences::checkPaths ()
{
bool result = true;
- if (!QDir(mPathConfig->mServicesPath->text()).exists())
+ if (!TQDir(mPathConfig->mServicesPath->text()).exists())
result = (KMessageBox::warningContinueCancel(this,
i18n ("The service folder you specified does "
"not exist.\n"
@@ -148,7 +148,7 @@ bool KSVPreferences::checkPaths ()
i18n ("Warning"))
!= KMessageBox::Cancel);
- if (!QDir(mPathConfig->mRunlevelPath->text()).exists())
+ if (!TQDir(mPathConfig->mRunlevelPath->text()).exists())
result = result
&& (KMessageBox::warningContinueCancel(this,
i18n ("The runlevel folder you specified does "
@@ -171,22 +171,22 @@ void KSVPreferences::slotOk ()
}
}
-QColor KSVPreferences::newNormal() const
+TQColor KSVPreferences::newNormal() const
{
return mLookAndFeel->mNewNormal->color();
}
-QColor KSVPreferences::newSelected() const
+TQColor KSVPreferences::newSelected() const
{
return mLookAndFeel->mNewSelected->color();
}
-QColor KSVPreferences::changedNormal() const
+TQColor KSVPreferences::changedNormal() const
{
return mLookAndFeel->mChangedNormal->color();
}
-QColor KSVPreferences::changedSelected() const
+TQColor KSVPreferences::changedSelected() const
{
return mLookAndFeel->mChangedSelected->color();
}
@@ -203,7 +203,7 @@ void KSVPreferences::setConfig ()
{
// if necessary, update service path
{
- QString sp = mPathConfig->mServicesPath->text();
+ TQString sp = mPathConfig->mServicesPath->text();
if (sp != mConfig->scriptPath())
{
mConfig->setScriptPath (sp);
@@ -214,7 +214,7 @@ void KSVPreferences::setConfig ()
// if necesssary, update root path for runlevels
{
- QString rp = mPathConfig->mRunlevelPath->text();
+ TQString rp = mPathConfig->mRunlevelPath->text();
if (rp != mConfig->runlevelPath ())
{
mConfig->setRunlevelPath (rp);
@@ -233,10 +233,10 @@ void KSVPreferences::setConfig ()
// if necessary, update colors
{
- QColor nn = newNormal();
- QColor ns = newSelected();
- QColor cn = changedNormal();
- QColor cs = changedSelected();
+ TQColor nn = newNormal();
+ TQColor ns = newSelected();
+ TQColor cn = changedNormal();
+ TQColor cs = changedSelected();
if (nn != mConfig->newNormalColor() ||
ns != mConfig->newSelectedColor() ||
@@ -254,8 +254,8 @@ void KSVPreferences::setConfig ()
// if necessary, update fonts
{
- const QFont& sf = mLookAndFeel->serviceFont();
- const QFont& ns = mLookAndFeel->numberFont();
+ const TQFont& sf = mLookAndFeel->serviceFont();
+ const TQFont& ns = mLookAndFeel->numberFont();
if (sf != mConfig->serviceFont() || ns != mConfig->numberFont())
{
@@ -281,7 +281,7 @@ void KSVPreferences::reReadMessages()
mMiscConfig->mWarnSortingNumber->setChecked (mConfig->showMessage (ksv::CouldNotGenerateSortingNumber));
}
-void KSVPreferences::showEvent (QShowEvent* e)
+void KSVPreferences::showEvent (TQShowEvent* e)
{
reReadMessages();
diff --git a/ksysv/PreferencesDialog.h b/ksysv/PreferencesDialog.h
index ba7d938..1615355 100644
--- a/ksysv/PreferencesDialog.h
+++ b/ksysv/PreferencesDialog.h
@@ -3,7 +3,7 @@
#ifndef PREFERENCES_DIALOG_H
#define PREFERENCES_DIALOG_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kdialogbase.h>
class QPushButton;
@@ -22,16 +22,16 @@ public:
static KSVPreferences* self ();
virtual ~KSVPreferences ();
- QColor newNormal () const;
- QColor newSelected () const;
- QColor changedNormal () const;
- QColor changedSelected () const;
+ TQColor newNormal () const;
+ TQColor newSelected () const;
+ TQColor changedNormal () const;
+ TQColor changedSelected () const;
- QString runlevelPath () const;
- QString scriptPath () const;
+ TQString runlevelPath () const;
+ TQString scriptPath () const;
protected:
- virtual void showEvent (QShowEvent* e);
+ virtual void showEvent (TQShowEvent* e);
signals:
void updateColors ();
@@ -52,7 +52,7 @@ private slots:
private:
friend class KSVTopLevel;
- KSVPreferences (QWidget* parent);
+ KSVPreferences (TQWidget* parent);
void setConfig ();
bool checkPaths();
void reReadMessages();
diff --git a/ksysv/Properties.cpp b/ksysv/Properties.cpp
index 7379b74..62f4a65 100644
--- a/ksysv/Properties.cpp
+++ b/ksysv/Properties.cpp
@@ -1,13 +1,13 @@
// (c) 2000 Peter Putzer
-#include <qframe.h>
-#include <qlabel.h>
-#include <qtextview.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qbuttongroup.h>
-#include <qpushbutton.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqtextview.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqbuttongroup.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <klocale.h>
@@ -21,7 +21,7 @@
#include "Data.h"
#include "Properties.h"
-KSVServicePropertiesDialog::KSVServicePropertiesDialog (KSVData& data, QWidget* parent)
+KSVServicePropertiesDialog::KSVServicePropertiesDialog (KSVData& data, TQWidget* parent)
: KPropertiesDialog (KURL(data.filenameAndPath()),
parent, "KSVServicePropertiesDialog", true, false),
mData (data)
@@ -44,31 +44,31 @@ KSVServicesPage::KSVServicesPage (KSVData& data, KPropertiesDialog* props)
{
mPage->setSpacing (KDialog::spacingHint());
- QVBox* desc = new QVBox (mPage);
+ TQVBox* desc = new TQVBox (mPage);
desc->setSpacing (1);
- QLabel* label = new QLabel(i18n("Description:"), desc);
+ TQLabel* label = new TQLabel(i18n("Description:"), desc);
label->setFixedHeight (label->sizeHint().height());
- QString text;
+ TQString text;
ksv::getServiceDescription (data.filename(), text);
- mDesc = new QTextView (QString("<p>%1</p>").arg (text), QString::null, desc);
+ mDesc = new TQTextView (TQString("<p>%1</p>").arg (text), TQString::null, desc);
- QButtonGroup* buttons = new QButtonGroup (1, Vertical, i18n ("Actions"), mPage);
- QPushButton* b = new QPushButton (i18n ("&Edit"), buttons);
- connect (b, SIGNAL (clicked()), props, SLOT (doEdit()));
+ TQButtonGroup* buttons = new TQButtonGroup (1, Vertical, i18n ("Actions"), mPage);
+ TQPushButton* b = new TQPushButton (i18n ("&Edit"), buttons);
+ connect (b, TQT_SIGNAL (clicked()), props, TQT_SLOT (doEdit()));
- QFrame* spacer = new QFrame (buttons);
+ TQFrame* spacer = new TQFrame (buttons);
spacer->setMinimumWidth (KDialog::spacingHint());
- b = new QPushButton (i18n ("&Start"), buttons);
- connect (b, SIGNAL (clicked()), props, SLOT (doStart()));
+ b = new TQPushButton (i18n ("&Start"), buttons);
+ connect (b, TQT_SIGNAL (clicked()), props, TQT_SLOT (doStart()));
- b = new QPushButton (i18n ("S&top"), buttons);
- connect (b, SIGNAL (clicked()), props, SLOT (doStop()));
+ b = new TQPushButton (i18n ("S&top"), buttons);
+ connect (b, TQT_SIGNAL (clicked()), props, TQT_SLOT (doStop()));
- b = new QPushButton (i18n ("&Restart"), buttons);
- connect (b, SIGNAL (clicked()), props, SLOT (doRestart()));
+ b = new TQPushButton (i18n ("&Restart"), buttons);
+ connect (b, TQT_SIGNAL (clicked()), props, TQT_SLOT (doRestart()));
}
KSVServicesPage::~KSVServicesPage ()
@@ -100,7 +100,7 @@ void KSVServicePropertiesDialog::doRestart ()
}
-KSVEntryPropertiesDialog::KSVEntryPropertiesDialog (KSVData& data, QWidget* parent)
+KSVEntryPropertiesDialog::KSVEntryPropertiesDialog (KSVData& data, TQWidget* parent)
: KPropertiesDialog (data.label(), parent, "KSVEntryPropertiesDialog", true),
mData (data)
{
@@ -121,25 +121,25 @@ KSVEntryPage::KSVEntryPage (KSVData& data, KPropertiesDialog* props)
mPage (props->addPage (i18n("&Entry"))),
mIndex (props->pageIndex (mPage))
{
- QGridLayout* top = new QGridLayout (mPage, 4, 2, 0, KDialog::spacingHint());
+ TQGridLayout* top = new TQGridLayout (mPage, 4, 2, 0, KDialog::spacingHint());
- QLabel* labelLabel = new QLabel (i18n ("&Name:"), mPage);
+ TQLabel* labelLabel = new TQLabel (i18n ("&Name:"), mPage);
mLabelEdit = new KLineEdit (mPage);
mLabelEdit->setText (mData.label());
labelLabel->setBuddy (mLabelEdit);
- QLabel* serviceLabel = new QLabel (i18n ("&Points to service:"), mPage);
+ TQLabel* serviceLabel = new TQLabel (i18n ("&Points to service:"), mPage);
mServiceEdit = new KLineEdit (mPage);
mServiceEdit->setCompletionObject (ksv::serviceCompletion(), true);
mServiceEdit->setText (mData.filename());
serviceLabel->setBuddy (mServiceEdit);
- QLabel* numberLabel = new QLabel (i18n ("&Sorting number:"), mPage);
+ TQLabel* numberLabel = new TQLabel (i18n ("&Sorting number:"), mPage);
mNumberEdit = new KSVSpinBox (mPage);
mNumberEdit->setValue (mData.number());
numberLabel->setBuddy (mNumberEdit);
- QLabel* iconLabel = new QLabel (mPage);
+ TQLabel* iconLabel = new TQLabel (mPage);
iconLabel->setPixmap (DesktopIcon ("ksysv", 48));
top->addWidget (labelLabel, 0, 0);
@@ -150,12 +150,12 @@ KSVEntryPage::KSVEntryPage (KSVData& data, KPropertiesDialog* props)
top->addWidget (mNumberEdit, 2, 1);
top->addWidget (iconLabel, 3, 0);
- connect (mServiceEdit, SIGNAL (textChanged (const QString&)),
- this, SLOT (emitChanged()));
- connect (mLabelEdit, SIGNAL (textChanged (const QString&)),
- this, SLOT (emitChanged()));
- connect (mNumberEdit, SIGNAL (valueChanged (int)),
- this, SLOT (emitChanged()));
+ connect (mServiceEdit, TQT_SIGNAL (textChanged (const TQString&)),
+ this, TQT_SLOT (emitChanged()));
+ connect (mLabelEdit, TQT_SIGNAL (textChanged (const TQString&)),
+ this, TQT_SLOT (emitChanged()));
+ connect (mNumberEdit, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (emitChanged()));
}
KSVEntryPage::~KSVEntryPage ()
diff --git a/ksysv/Properties.h b/ksysv/Properties.h
index 0e3225d..d26cb91 100644
--- a/ksysv/Properties.h
+++ b/ksysv/Properties.h
@@ -19,14 +19,14 @@ class KSVServicePropertiesDialog : public KPropertiesDialog
Q_OBJECT
public:
- KSVServicePropertiesDialog (KSVData& data, QWidget* parent);
+ KSVServicePropertiesDialog (KSVData& data, TQWidget* parent);
virtual ~KSVServicePropertiesDialog ();
signals:
- void startService (const QString&);
- void stopService (const QString&);
- void restartService (const QString&);
- void editService (const QString&);
+ void startService (const TQString&);
+ void stopService (const TQString&);
+ void restartService (const TQString&);
+ void editService (const TQString&);
private slots:
void doEdit ();
@@ -44,14 +44,14 @@ class KSVEntryPropertiesDialog : public KPropertiesDialog
Q_OBJECT
public:
- KSVEntryPropertiesDialog (KSVData& data, QWidget* parent);
+ KSVEntryPropertiesDialog (KSVData& data, TQWidget* parent);
virtual ~KSVEntryPropertiesDialog ();
signals:
- void startService (const QString&);
- void stopService (const QString&);
- void restartService (const QString&);
- void editService (const QString&);
+ void startService (const TQString&);
+ void stopService (const TQString&);
+ void restartService (const TQString&);
+ void editService (const TQString&);
private slots:
void doEdit ();
@@ -80,12 +80,12 @@ private slots:
private:
KSVData& mData;
- QFrame* mPage;
+ TQFrame* mPage;
int mIndex;
KLineEdit* mServiceEdit;
KLineEdit* mLabelEdit;
- QSpinBox* mNumberEdit;
+ TQSpinBox* mNumberEdit;
};
class KSVServicesPage : public KPropsDlgPlugin
@@ -102,8 +102,8 @@ public:
private:
KSVData& mData;
- QVBox* mPage;
- QTextView* mDesc;
+ TQVBox* mPage;
+ TQTextView* mDesc;
int mIndex;
};
diff --git a/ksysv/RunlevelAuthIcon.cpp b/ksysv/RunlevelAuthIcon.cpp
index e086df1..bac5b30 100644
--- a/ksysv/RunlevelAuthIcon.cpp
+++ b/ksysv/RunlevelAuthIcon.cpp
@@ -1,9 +1,9 @@
// (c) 2000 Peter Putzer <putzer@kde.org>
-#include <qtimer.h>
-#include <qfileinfo.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqtimer.h>
+#include <tqfileinfo.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -12,14 +12,14 @@
#include "ksv_core.h"
#include "RunlevelAuthIcon.h"
-#include <qlabel.h>
+#include <tqlabel.h>
-RunlevelAuthIcon::RunlevelAuthIcon (const QString& servicesPath, const QString& runlevelPath,
- QWidget* parent, const char* name)
+RunlevelAuthIcon::RunlevelAuthIcon (const TQString& servicesPath, const TQString& runlevelPath,
+ TQWidget* parent, const char* name)
: KAuthIcon (parent, name),
- mTimer (new QTimer (this)),
- mServicesInfo (new QFileInfo (servicesPath)),
- mRLInfo (new QFileInfo* [ksv::runlevelNumber]),
+ mTimer (new TQTimer (this)),
+ mServicesInfo (new TQFileInfo (servicesPath)),
+ mRLInfo (new TQFileInfo* [ksv::runlevelNumber]),
mOld (false),
mInterval (1000),
mCheckEnabled(false)
@@ -36,15 +36,15 @@ RunlevelAuthIcon::RunlevelAuthIcon (const QString& servicesPath, const QString&
lockBox->setPixmap (lockPM);
lockBox->setMargin (1);
- lockBox->setFrameStyle (QFrame::NoFrame);
+ lockBox->setFrameStyle (TQFrame::NoFrame);
lockBox->setFixedSize (lockBox->sizeHint());
- connect (mTimer, SIGNAL (timeout()), this, SLOT (timerEvent()));
+ connect (mTimer, TQT_SIGNAL (timeout()), this, TQT_SLOT (timerEvent()));
mTimer->start (mInterval);
for (int i = 0; i < ksv::runlevelNumber; ++i)
{
- mRLInfo[i] = new QFileInfo ((runlevelPath + "/rc%1.d").arg(i));
+ mRLInfo[i] = new TQFileInfo ((runlevelPath + "/rc%1.d").arg(i));
}
updateStatus();
@@ -75,8 +75,8 @@ void RunlevelAuthIcon::updateStatus ()
lockBox->setPixmap (res ? openLockPM : lockPM);
lockLabel->setText (res ? openLockText : lockText);
- QToolTip::remove (this);
- QToolTip::add (this, lockLabel->text());
+ TQToolTip::remove (this);
+ TQToolTip::add (this, lockLabel->text());
mOld = res;
emit authChanged (res);
@@ -107,7 +107,7 @@ void RunlevelAuthIcon::timerEvent ()
updateStatus();
}
-void RunlevelAuthIcon::setServicesPath (const QString& path)
+void RunlevelAuthIcon::setServicesPath (const TQString& path)
{
mTimer->stop();
@@ -116,7 +116,7 @@ void RunlevelAuthIcon::setServicesPath (const QString& path)
mTimer->start(mInterval);
}
-void RunlevelAuthIcon::setRunlevelPath (const QString& path)
+void RunlevelAuthIcon::setRunlevelPath (const TQString& path)
{
mTimer->stop();
diff --git a/ksysv/RunlevelAuthIcon.h b/ksysv/RunlevelAuthIcon.h
index d33f24d..c4dddd5 100644
--- a/ksysv/RunlevelAuthIcon.h
+++ b/ksysv/RunlevelAuthIcon.h
@@ -13,8 +13,8 @@ class RunlevelAuthIcon : public KAuthIcon
Q_PROPERTY (int refreshInterval READ refreshInterval WRITE setRefreshInterval)
public:
- RunlevelAuthIcon (const QString& scriptPath, const QString& runlevelPath,
- QWidget* parent = 0L, const char* name = 0L);
+ RunlevelAuthIcon (const TQString& scriptPath, const TQString& runlevelPath,
+ TQWidget* parent = 0L, const char* name = 0L);
virtual ~RunlevelAuthIcon ();
@@ -26,8 +26,8 @@ public:
public slots:
virtual void updateStatus ();
- void setServicesPath (const QString& servicesPath);
- void setRunlevelPath (const QString& runlevelPath);
+ void setServicesPath (const TQString& servicesPath);
+ void setRunlevelPath (const TQString& runlevelPath);
void setRefreshInterval (int);
@@ -37,9 +37,9 @@ private slots:
void timerEvent ();
private:
- QTimer* mTimer;
- QFileInfo* mServicesInfo;
- QFileInfo** mRLInfo;
+ TQTimer* mTimer;
+ TQFileInfo* mServicesInfo;
+ TQFileInfo** mRLInfo;
bool mOld;
int mInterval;
diff --git a/ksysv/ServiceDlg.cpp b/ksysv/ServiceDlg.cpp
index 0564028..4b7d4ef 100644
--- a/ksysv/ServiceDlg.cpp
+++ b/ksysv/ServiceDlg.cpp
@@ -12,11 +12,11 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qcombobox.h>
-#include <qstring.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqcombobox.h>
+#include <tqstring.h>
#include <kapplication.h>
#include <klocale.h>
@@ -27,22 +27,22 @@
#define MIN_SIZE(A) A->setMinimumSize(A->sizeHint())
-ServiceDlg::ServiceDlg (const QString& action, const QString& label,
- QWidget* parent, const char* name)
+ServiceDlg::ServiceDlg (const TQString& action, const TQString& label,
+ TQWidget* parent, const char* name)
: KDialogBase (parent, name, false, action, Apply|Close, Apply, true)
{
- QWidget* page = new QWidget (this);
+ TQWidget* page = new TQWidget (this);
- QBoxLayout* top = new QVBoxLayout (page, 0, spacingHint());
+ TQBoxLayout* top = new TQVBoxLayout (page, 0, spacingHint());
- mServices = new QComboBox (false, page);
- QLabel* desc = new QLabel(label, page);
+ mServices = new TQComboBox (false, page);
+ TQLabel* desc = new TQLabel(label, page);
MIN_SIZE(desc);
desc->setBuddy(mServices);
MIN_SIZE(mServices);
mServices->setMinimumWidth(mServices->minimumSize().width() * 2);
- QBoxLayout* serv_layout = new QHBoxLayout();
+ TQBoxLayout* serv_layout = new TQHBoxLayout();
top->addLayout (serv_layout);
serv_layout->addWidget(desc);
serv_layout->addWidget(mServices);
@@ -73,13 +73,13 @@ void ServiceDlg::resetChooser(KSVDragList* list, bool edit)
return;
// initialize the combobox
- for (QListViewItemIterator it (list);
+ for (TQListViewItemIterator it (list);
it.current();
++it)
{
const KSVItem* item = static_cast<KSVItem*> (it.current());
- QFileInfo info (item->filenameAndPath());
+ TQFileInfo info (item->filenameAndPath());
if (edit)
{
@@ -100,14 +100,14 @@ void ServiceDlg::resetChooser(KSVDragList* list, bool edit)
void ServiceDlg::show ()
{
- QDialog::show ();
+ TQDialog::show ();
emit display (true);
}
void ServiceDlg::hide ()
{
- QDialog::hide ();
+ TQDialog::hide ();
emit display (false);
}
diff --git a/ksysv/ServiceDlg.h b/ksysv/ServiceDlg.h
index 34fb69c..84781e7 100644
--- a/ksysv/ServiceDlg.h
+++ b/ksysv/ServiceDlg.h
@@ -16,7 +16,7 @@
#define KSV_SERVICE_DIALOG_H
#include <kdialogbase.h>
-#include <qmap.h>
+#include <tqmap.h>
class KSVDragList;
class KSVItem;
@@ -28,8 +28,8 @@ class ServiceDlg : public KDialogBase
Q_OBJECT
public:
- ServiceDlg (const QString& action, const QString& label,
- QWidget* parent = 0, const char* name = 0);
+ ServiceDlg (const TQString& action, const TQString& label,
+ TQWidget* parent = 0, const char* name = 0);
virtual ~ServiceDlg();
int count() const;
@@ -42,14 +42,14 @@ public slots:
void toggle ();
private:
- QComboBox* mServices;
- QMap<QString,const KSVItem*> mMapServices;
+ TQComboBox* mServices;
+ TQMap<TQString,const KSVItem*> mMapServices;
protected slots:
virtual void slotApply();
signals:
- void doAction (const QString& on);
+ void doAction (const TQString& on);
void display (bool);
};
diff --git a/ksysv/SpinBox.cpp b/ksysv/SpinBox.cpp
index 63a217a..fd93954 100644
--- a/ksysv/SpinBox.cpp
+++ b/ksysv/SpinBox.cpp
@@ -1,14 +1,14 @@
// (c) 2000 Peter Putzer
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kdebug.h>
#include "ksv_core.h"
#include "SpinBox.h"
-KSVSpinBox::KSVSpinBox (QWidget* parent, const char* name)
- : QSpinBox (0, 99, 1, parent, name),
+KSVSpinBox::KSVSpinBox (TQWidget* parent, const char* name)
+ : TQSpinBox (0, 99, 1, parent, name),
KCompletionBase (),
mClearedSelection (false)
{
@@ -17,19 +17,19 @@ KSVSpinBox::KSVSpinBox (QWidget* parent, const char* name)
editor()->installEventFilter (this);
- connect (editor(), SIGNAL (textChanged (const QString&)),
- comp, SLOT (slotMakeCompletion (const QString&)));
- connect (comp, SIGNAL (match (const QString&)),
- this, SLOT (handleMatch (const QString&)));
+ connect (editor(), TQT_SIGNAL (textChanged (const TQString&)),
+ comp, TQT_SLOT (slotMakeCompletion (const TQString&)));
+ connect (comp, TQT_SIGNAL (match (const TQString&)),
+ this, TQT_SLOT (handleMatch (const TQString&)));
}
KSVSpinBox::~KSVSpinBox ()
{
}
-QString KSVSpinBox::mapValueToText (int value)
+TQString KSVSpinBox::mapValueToText (int value)
{
- QString result;
+ TQString result;
if (value < 10)
result.sprintf("%.2i", value);
@@ -39,9 +39,9 @@ QString KSVSpinBox::mapValueToText (int value)
return result;
}
-void KSVSpinBox::setCompletedText (const QString& text)
+void KSVSpinBox::setCompletedText (const TQString& text)
{
- QLineEdit* e = editor ();
+ TQLineEdit* e = editor ();
const int pos = e->cursorPosition();
e->setText (text);
@@ -50,24 +50,24 @@ void KSVSpinBox::setCompletedText (const QString& text)
e->setCursorPosition (pos);
}
-void KSVSpinBox::setCompletedItems (const QStringList& /*items*/)
+void KSVSpinBox::setCompletedItems (const TQStringList& /*items*/)
{
// dont know what is supposed to be in here but it has to be defined
// because else the lack of this damn thing is making it abstract
}
-void KSVSpinBox::handleMatch (const QString& match)
+void KSVSpinBox::handleMatch (const TQString& match)
{
if (!match.isNull() && editor()->text().length() < 2 && !mClearedSelection)
setCompletedText (match);
}
-bool KSVSpinBox::eventFilter (QObject* o, QEvent* e)
+bool KSVSpinBox::eventFilter (TQObject* o, TQEvent* e)
{
Q_UNUSED(o);
- if (e->type() == QEvent::KeyPress)
+ if (e->type() == TQEvent::KeyPress)
{
- QKeyEvent* ke = static_cast<QKeyEvent*> (e);
+ TQKeyEvent* ke = static_cast<TQKeyEvent*> (e);
switch (ke->key())
{
diff --git a/ksysv/SpinBox.h b/ksysv/SpinBox.h
index 147fc88..c48f09e 100644
--- a/ksysv/SpinBox.h
+++ b/ksysv/SpinBox.h
@@ -3,27 +3,27 @@
#ifndef KSV_SPINBOX_H
#define KSV_SPINBOX_H
-#include <qspinbox.h>
+#include <tqspinbox.h>
#include <kcompletion.h>
-class KSVSpinBox : public QSpinBox, public KCompletionBase
+class KSVSpinBox : public TQSpinBox, public KCompletionBase
{
Q_OBJECT
public:
- KSVSpinBox (QWidget* parent, const char* name = 0L);
+ KSVSpinBox (TQWidget* parent, const char* name = 0L);
virtual ~KSVSpinBox ();
- virtual bool eventFilter (QObject*, QEvent*);
- virtual void setCompletedText (const QString&);
- virtual void setCompletedItems (const QStringList&);
+ virtual bool eventFilter (TQObject*, TQEvent*);
+ virtual void setCompletedText (const TQString&);
+ virtual void setCompletedItems (const TQStringList&);
protected:
- virtual QString mapValueToText (int value);
+ virtual TQString mapValueToText (int value);
private slots:
- void handleMatch (const QString&);
+ void handleMatch (const TQString&);
private:
bool mClearedSelection;
diff --git a/ksysv/TopWidget.cpp b/ksysv/TopWidget.cpp
index 854c9cf..6b2e675 100644
--- a/ksysv/TopWidget.cpp
+++ b/ksysv/TopWidget.cpp
@@ -28,28 +28,28 @@
#include <ctype.h>
-#include <qpopupmenu.h>
-#include <qkeycode.h>
-#include <qmessagebox.h>
-#include <qfontmetrics.h>
-#include <qpainter.h>
-#include <qmultilineedit.h>
-#include <qdatetime.h>
+#include <tqpopupmenu.h>
+#include <tqkeycode.h>
+#include <tqmessagebox.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
+#include <tqmultilineedit.h>
+#include <tqdatetime.h>
#include <kprinter.h>
-#include <qpaintdevicemetrics.h>
-#include <qbuttongroup.h>
-#include <qclipboard.h>
-#include <qtooltip.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qregexp.h>
-#include <qdatastream.h>
-#include <qpixmapcache.h>
-#include <qtextview.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qwhatsthis.h>
-#include <qsimplerichtext.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqbuttongroup.h>
+#include <tqclipboard.h>
+#include <tqtooltip.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqregexp.h>
+#include <tqdatastream.h>
+#include <tqpixmapcache.h>
+#include <tqtextview.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqwhatsthis.h>
+#include <tqsimplerichtext.h>
#include <kresolver.h>
#include <ktoolbar.h>
@@ -84,7 +84,7 @@
#include "OldView.h"
#include "IOCore.h"
#include "TopWidget.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kstatusbar.h>
namespace Status
@@ -127,7 +127,7 @@ KSVTopLevel::KSVTopLevel()
mEditDlg (new ServiceDlg (i18n("Edit Service"),
i18n("&Choose which service to edit:"),
this)),
- mVisible (new QCheckBox*[ksv::runlevelNumber])
+ mVisible (new TQCheckBox*[ksv::runlevelNumber])
{
setCaption(false);
@@ -139,27 +139,27 @@ KSVTopLevel::KSVTopLevel()
setCentralWidget(mView);
// ensure that the statusbar gets updated correctly
- connect (mView, SIGNAL(sigRun(const QString&)), this, SLOT(slotUpdateRunning(const QString&)));
- connect (mView, SIGNAL(sigStop()), statusBar(), SLOT(clear()));
- connect (mView, SIGNAL(cannotGenerateNumber()), this, SLOT(catchCannotGenerateNumber()));
- connect (mView, SIGNAL(undoAction(KSVAction*)), this, SLOT(pushUndoAction(KSVAction*)));
- connect (mView, SIGNAL(logChanged()), this, SLOT(enableLogActions()));
+ connect (mView, TQT_SIGNAL(sigRun(const TQString&)), this, TQT_SLOT(slotUpdateRunning(const TQString&)));
+ connect (mView, TQT_SIGNAL(sigStop()), statusBar(), TQT_SLOT(clear()));
+ connect (mView, TQT_SIGNAL(cannotGenerateNumber()), this, TQT_SLOT(catchCannotGenerateNumber()));
+ connect (mView, TQT_SIGNAL(undoAction(KSVAction*)), this, TQT_SLOT(pushUndoAction(KSVAction*)));
+ connect (mView, TQT_SIGNAL(logChanged()), this, TQT_SLOT(enableLogActions()));
// cut & copy
- connect (mView, SIGNAL (newOrigin()),
- this, SLOT (dispatchEdit()));
+ connect (mView, TQT_SIGNAL (newOrigin()),
+ this, TQT_SLOT (dispatchEdit()));
// undo
- connect (mUndoList, SIGNAL(empty()), this, SLOT(disableUndo()));
- connect (mUndoList, SIGNAL(filled()), this, SLOT(enableUndo()));
+ connect (mUndoList, TQT_SIGNAL(empty()), this, TQT_SLOT(disableUndo()));
+ connect (mUndoList, TQT_SIGNAL(filled()), this, TQT_SLOT(enableUndo()));
// and redo
- connect (mRedoList, SIGNAL(empty()), this, SLOT(disableRedo()));
- connect (mRedoList, SIGNAL(filled()), this, SLOT(enableRedo()));
+ connect (mRedoList, TQT_SIGNAL(empty()), this, TQT_SLOT(disableRedo()));
+ connect (mRedoList, TQT_SIGNAL(filled()), this, TQT_SLOT(enableRedo()));
// paste
- connect (kapp->clipboard(), SIGNAL (dataChanged()),
- this, SLOT (dispatchEdit()));
+ connect (kapp->clipboard(), TQT_SIGNAL (dataChanged()),
+ this, TQT_SLOT (dispatchEdit()));
// init mView according to saved preferences
slotReadConfig();
@@ -186,23 +186,23 @@ KSVTopLevel::~KSVTopLevel()
void KSVTopLevel::initTools()
{
- connect (mStartDlg, SIGNAL(doAction(const QString&)),
- mView, SLOT(startService(const QString&)));
- connect (mStopDlg, SIGNAL(doAction(const QString&)),
- mView, SLOT(editService(const QString&)));
- connect (mRestartDlg, SIGNAL(doAction(const QString&)),
- mView, SLOT(restartService(const QString&)));
- connect (mEditDlg, SIGNAL(doAction(const QString&)),
- mView, SLOT(editService(const QString&)));
-
- connect (mStartDlg, SIGNAL (display (bool)),
- this, SLOT (dispatchStartService (bool)));
- connect (mStopDlg, SIGNAL (display (bool)),
- this, SLOT (dispatchStopService (bool)));
- connect (mRestartDlg, SIGNAL (display (bool)),
- this, SLOT (dispatchRestartService (bool)));
- connect (mEditDlg, SIGNAL (display (bool)),
- this, SLOT (dispatchEditService (bool)));
+ connect (mStartDlg, TQT_SIGNAL(doAction(const TQString&)),
+ mView, TQT_SLOT(startService(const TQString&)));
+ connect (mStopDlg, TQT_SIGNAL(doAction(const TQString&)),
+ mView, TQT_SLOT(editService(const TQString&)));
+ connect (mRestartDlg, TQT_SIGNAL(doAction(const TQString&)),
+ mView, TQT_SLOT(restartService(const TQString&)));
+ connect (mEditDlg, TQT_SIGNAL(doAction(const TQString&)),
+ mView, TQT_SLOT(editService(const TQString&)));
+
+ connect (mStartDlg, TQT_SIGNAL (display (bool)),
+ this, TQT_SLOT (dispatchStartService (bool)));
+ connect (mStopDlg, TQT_SIGNAL (display (bool)),
+ this, TQT_SLOT (dispatchStopService (bool)));
+ connect (mRestartDlg, TQT_SIGNAL (display (bool)),
+ this, TQT_SLOT (dispatchRestartService (bool)));
+ connect (mEditDlg, TQT_SIGNAL (display (bool)),
+ this, TQT_SLOT (dispatchEditService (bool)));
}
@@ -211,48 +211,48 @@ void KSVTopLevel::initActions ()
KActionCollection* coll = actionCollection();
// setup File menu
- mFileRevert = KStdAction::revert (this, SLOT (slotClearChanges()), coll);
+ mFileRevert = KStdAction::revert (this, TQT_SLOT (slotClearChanges()), coll);
mFileRevert->setText (i18n("Re&vert Configuration"));
- mFileLoad = KStdAction::open (this, SLOT (load()), coll);
+ mFileLoad = KStdAction::open (this, TQT_SLOT (load()), coll);
mFileLoad->setText (i18n ("&Open..."));
- mFileSave = KStdAction::save(this, SLOT(slotAcceptChanges()), coll);
+ mFileSave = KStdAction::save(this, TQT_SLOT(slotAcceptChanges()), coll);
mFileSave->setText (i18n("&Save Configuration"));
- mFileSaveAs = KStdAction::saveAs (this, SLOT (saveAs ()), coll);
+ mFileSaveAs = KStdAction::saveAs (this, TQT_SLOT (saveAs ()), coll);
- mFileSaveLog = KStdAction::save (this, SLOT(slotSaveLog()), coll, "ksysv_save_log");
+ mFileSaveLog = KStdAction::save (this, TQT_SLOT(slotSaveLog()), coll, "ksysv_save_log");
mFileSaveLog->setText (i18n("Save &Log..."));
mFileSaveLog->setShortcut (Key_L+CTRL);
mFileSaveLog->setEnabled (false);
// disabled due to complexity
- // mFilePrint = KStdAction::print (this, SLOT (print()), coll);
+ // mFilePrint = KStdAction::print (this, TQT_SLOT (print()), coll);
- mFilePrintLog = KStdAction::print(this, SLOT(printLog()), coll, "ksysv_print_log");
+ mFilePrintLog = KStdAction::print(this, TQT_SLOT(printLog()), coll, "ksysv_print_log");
mFilePrintLog->setText( i18n("&Print Log..."));
mFilePrintLog->setEnabled (false);
- mFileQuit = KStdAction::quit(this, SLOT(close()), coll);
+ mFileQuit = KStdAction::quit(this, TQT_SLOT(close()), coll);
// setup Edit menu
- mEditUndo = KStdAction::undo(this, SLOT(editUndo()), coll);
+ mEditUndo = KStdAction::undo(this, TQT_SLOT(editUndo()), coll);
mEditUndo->setEnabled (false);
- mEditRedo = KStdAction::redo(this, SLOT(editRedo()), coll);
+ mEditRedo = KStdAction::redo(this, TQT_SLOT(editRedo()), coll);
mEditUndo->setEnabled (false);
- mEditCut = KStdAction::cut(this, SLOT(editCut()), coll);
- mEditCopy = KStdAction::copy(this, SLOT(editCopy()), coll);
- mEditPaste = KStdAction::paste(this, SLOT(editPaste()), coll);
- mPasteAppend = KStdAction::paste (this, SLOT (pasteAppend()),
+ mEditCut = KStdAction::cut(this, TQT_SLOT(editCut()), coll);
+ mEditCopy = KStdAction::copy(this, TQT_SLOT(editCopy()), coll);
+ mEditPaste = KStdAction::paste(this, TQT_SLOT(editPaste()), coll);
+ mPasteAppend = KStdAction::paste (this, TQT_SLOT (pasteAppend()),
coll, "ksysv_paste_append");
mEditProperties = new KAction (i18n("P&roperties"), 0,
- this, SLOT(properties()),
+ this, TQT_SLOT(properties()),
coll, "ksysv_properties");
mOpenDefault = new KAction (i18n ("&Open"), 0,
- this, SLOT (editService()),
+ this, TQT_SLOT (editService()),
coll, "ksysv_open_service");
mOpenWith = new KActionMenu (i18n ("Open &With"), coll, "ksysv_open_with");
@@ -260,30 +260,30 @@ void KSVTopLevel::initActions ()
// setup Settings menu
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings (this, SLOT(configureKeys()), coll);
- KStdAction::configureToolbars (this, SLOT(configureToolbars()), coll);
- KStdAction::saveOptions(this, SLOT(saveOptions()), coll);
- KStdAction::preferences(this, SLOT(slotShowConfig()), coll);
+ KStdAction::keyBindings (this, TQT_SLOT(configureKeys()), coll);
+ KStdAction::configureToolbars (this, TQT_SLOT(configureToolbars()), coll);
+ KStdAction::saveOptions(this, TQT_SLOT(saveOptions()), coll);
+ KStdAction::preferences(this, TQT_SLOT(slotShowConfig()), coll);
mOptionsToggleLog = new KToggleAction (i18n("Show &Log"), "toggle_log", 0,
- this, SLOT (toggleLog()),
+ this, TQT_SLOT (toggleLog()),
coll, "ksysv_toggle_log");
mOptionsToggleLog->setCheckedState(i18n("Hide &Log"));
// setup Tools menu
mToolsStartService = new KToggleAction (i18n("&Start Service..."), "ksysv_start", 0,
- mStartDlg, SLOT (toggle()),
+ mStartDlg, TQT_SLOT (toggle()),
coll, "ksysv_start_service");
mToolsStopService = new KToggleAction (i18n("&Stop Service..."), "ksysv_stop", 0,
- mStopDlg, SLOT (toggle()),
+ mStopDlg, TQT_SLOT (toggle()),
coll, "ksysv_stop_service");
mToolsRestartService = new KToggleAction (i18n("&Restart Service..."), 0,
- mRestartDlg, SLOT (toggle()),
+ mRestartDlg, TQT_SLOT (toggle()),
coll, "ksysv_restart_service");
mToolsEditService = new KToggleAction (i18n("&Edit Service..."), 0,
- mEditDlg, SLOT (toggle()),
+ mEditDlg, TQT_SLOT (toggle()),
coll, "ksysv_edit_service");
createGUI(xmlFile());
@@ -390,36 +390,36 @@ void KSVTopLevel::initStatusBar()
{
KStatusBar* status = statusBar();
- QHBox* visBox = new QHBox (status, "visBox");
- QButtonGroup* group = new QButtonGroup (this, "visButtonGroup");
+ TQHBox* visBox = new TQHBox (status, "visBox");
+ TQButtonGroup* group = new TQButtonGroup (this, "visButtonGroup");
group->hide();
- connect (group, SIGNAL (clicked (int)), this, SLOT (toggleRunlevel (int)));
+ connect (group, TQT_SIGNAL (clicked (int)), this, TQT_SLOT (toggleRunlevel (int)));
- QWhatsThis::add (visBox, i18n ("<p>Click on the checkboxes to <strong>show</strong> or "\
+ TQWhatsThis::add (visBox, i18n ("<p>Click on the checkboxes to <strong>show</strong> or "\
"<strong>hide</strong> runlevels.</p> " \
"<p>The list of currently visible runlevels is saved "\
"when you use the <strong>Save Options command</strong>.</p>"));
- QToolTip::add (visBox, i18n ("Show only the selected runlevels"));
+ TQToolTip::add (visBox, i18n ("Show only the selected runlevels"));
- new QLabel (i18n("Show runlevels:"), visBox, "visLabel");
+ new TQLabel (i18n("Show runlevels:"), visBox, "visLabel");
for (int i = 0; i < ksv::runlevelNumber; ++i)
{
- QString label; label.setNum (i);
+ TQString label; label.setNum (i);
- mVisible[i] = new QCheckBox (label, visBox, label.latin1());
+ mVisible[i] = new TQCheckBox (label, visBox, label.latin1());
mVisible[i]->setChecked (mConfig->showRunlevel (i));
group->insert (mVisible[i]);
}
- QHBox* authIconBox = new QHBox (status, "AuthIconBox");
- QWidget* strut = new QWidget (authIconBox, "Strut");
+ TQHBox* authIconBox = new TQHBox (status, "AuthIconBox");
+ TQWidget* strut = new TQWidget (authIconBox, "Strut");
strut->setFixedWidth (KDialog::spacingHint());
mAuth = new RunlevelAuthIcon (mConfig->scriptPath(), mConfig->runlevelPath(), authIconBox);
- connect (mAuth, SIGNAL (authChanged(bool)), mView, SLOT(multiplexEnabled(bool)));
- connect (mAuth, SIGNAL (authChanged(bool)), this, SLOT(writingEnabled(bool)));
+ connect (mAuth, TQT_SIGNAL (authChanged(bool)), mView, TQT_SLOT(multiplexEnabled(bool)));
+ connect (mAuth, TQT_SIGNAL (authChanged(bool)), this, TQT_SLOT(writingEnabled(bool)));
- QWhatsThis::add (authIconBox, i18n ("<p>If the lock is closed <img src=\"user|ksysv_locked\"/>, "\
+ TQWhatsThis::add (authIconBox, i18n ("<p>If the lock is closed <img src=\"user|ksysv_locked\"/>, "\
"you don't have the right " \
"<strong>permissions</strong> to edit the init configuration.</p>" \
"<p>Either restart %1 as root (or another more privileged user), " \
@@ -444,20 +444,20 @@ void KSVTopLevel::slotShowConfig()
{
mPreferences = KSVPreferences::self();
- connect (mPreferences, SIGNAL (updateColors ()),
- this, SLOT (updateColors ()));
+ connect (mPreferences, TQT_SIGNAL (updateColors ()),
+ this, TQT_SLOT (updateColors ()));
- connect (mPreferences, SIGNAL (updateServicesPath ()),
- this, SLOT (updateServicesPath ()));
+ connect (mPreferences, TQT_SIGNAL (updateServicesPath ()),
+ this, TQT_SLOT (updateServicesPath ()));
- connect (mPreferences, SIGNAL (updateRunlevelsPath ()),
- this, SLOT (updateRunlevelsPath ()));
+ connect (mPreferences, TQT_SIGNAL (updateRunlevelsPath ()),
+ this, TQT_SLOT (updateRunlevelsPath ()));
- connect (mPreferences, SIGNAL (updateFonts ()),
- mView, SLOT (repaintRunlevels ()));
+ connect (mPreferences, TQT_SIGNAL (updateFonts ()),
+ mView, TQT_SLOT (repaintRunlevels ()));
}
-// mPreferences->setInitialSize (QSize (400,300), true);
+// mPreferences->setInitialSize (TQSize (400,300), true);
mPreferences->exec();
}
@@ -497,7 +497,7 @@ void KSVTopLevel::saveOptions()
mConfig->writeSettings();
}
-void KSVTopLevel::slotUpdateRunning (const QString& text)
+void KSVTopLevel::slotUpdateRunning (const TQString& text)
{
statusBar()->changeItem(text, Status::Changed);
}
@@ -563,7 +563,7 @@ void KSVTopLevel::setChanged (bool val)
mFileSave->setEnabled (val);
// update statusbar
- statusBar()->changeItem(val ? i18n(" Changed") : QString::null, Status::Changed);
+ statusBar()->changeItem(val ? i18n(" Changed") : TQString::null, Status::Changed);
// clear messages
statusBar()->clear();
@@ -632,32 +632,32 @@ void KSVTopLevel::print()
// prt.setDocName(kapp->aboutData()->programName() + " Configuration");
// prt.setCreator(kapp->aboutData()->programName());
-// static QPrintDialog* dlg = new QPrintDialog (&prt, this, "KSysV Print Dialog");
+// static TQPrintDialog* dlg = new TQPrintDialog (&prt, this, "KSysV Print Dialog");
// dlg->setCaption(kapp->makeStdCaption (i18n("Print")));
-// if (dlg->exec() == QDialog::Accepted)
+// if (dlg->exec() == TQDialog::Accepted)
// {
// int y = 10;
-// QPainter p;
+// TQPainter p;
// p.begin( &prt );
-// QPaintDeviceMetrics metrics (&prt);
+// TQPaintDeviceMetrics metrics (&prt);
-// p.setFont (QFont("courier", 20, QFont::Bold));
-// QFontMetrics fm = p.fontMetrics();
+// p.setFont (TQFont("courier", 20, TQFont::Bold));
+// TQFontMetrics fm = p.fontMetrics();
// p.drawText (10, y, i18n("%1 Configuration of %2")
// .arg (kapp->aboutData()->programName())
// .arg (ksv::hostname()));
// y += fm.lineSpacing();
-// p.drawText (10, y, QDateTime::currentDateTime().toString());
+// p.drawText (10, y, TQDateTime::currentDateTime().toString());
// y += fm.lineSpacing() * 2; // an extra empty line
// for (int i = 0; i < ksv::runlevelNumber; ++i)
// {
-// p.setFont (QFont("courier", 16, QFont::Bold));
-// QFontMetrics fm = p.fontMetrics();
+// p.setFont (TQFont("courier", 16, TQFont::Bold));
+// TQFontMetrics fm = p.fontMetrics();
// p.drawText (10, y, i18n ("Runlevel %1").arg(i));
// y += fm.lineSpacing();
@@ -669,10 +669,10 @@ void KSVTopLevel::print()
// checkPage
-// p.setFont (QFont("courier", 10));
+// p.setFont (TQFont("courier", 10));
// fm = p.fontMetrics();
-// for (QListViewItemIterator it (mView->startRL[i]);
+// for (TQListViewItemIterator it (mView->startRL[i]);
// it.current();
// ++it)
// {
@@ -686,7 +686,7 @@ void KSVTopLevel::print()
// }
-// p.setFont (QFont("courier", 16, QFont::Bold));
+// p.setFont (TQFont("courier", 16, TQFont::Bold));
// fm = p.fontMetrics();
// y += fm.lineSpacing(); // an extra empty line
// p.drawText (10, y, i18n ("Stopped Services"));
@@ -694,10 +694,10 @@ void KSVTopLevel::print()
// checkPage
-// p.setFont (QFont("courier", 10));
+// p.setFont (TQFont("courier", 10));
// fm = p.fontMetrics();
-// for (QListViewItemIterator it (mView->stopRL[i]);
+// for (TQListViewItemIterator it (mView->stopRL[i]);
// it.current();
// ++it)
// {
@@ -710,22 +710,22 @@ void KSVTopLevel::print()
// }
// checkPage
-// p.setFont (QFont("courier", 16, QFont::Bold));
+// p.setFont (TQFont("courier", 16, TQFont::Bold));
// fm = p.fontMetrics();
// y += fm.lineSpacing() * 3; // two extra empty line
// }
-// // QStringList lines = QStringList::split ('\n', mView->log(), true);
-// // for(QStringList::Iterator it = lines.begin();
+// // TQStringList lines = TQStringList::split ('\n', mView->log(), true);
+// // for(TQStringList::Iterator it = lines.begin();
// // it != lines.end();
// // ++it)
// // {
// // y += fm.ascent();
-// // QString line = *it;
+// // TQString line = *it;
// // if (line.isNull())
// // line = " ";
-// // line.replace( QRegExp("\t"), " " );
+// // line.replace( TQRegExp("\t"), " " );
// // strncpy(buf,line.data(),160);
@@ -754,33 +754,33 @@ void KSVTopLevel::printLog()
{
KBusyManager::self()->setBusy (true);
- QPainter p (prt);
- QPaintDeviceMetrics pm (prt);
+ TQPainter p (prt);
+ TQPaintDeviceMetrics pm (prt);
const int height = pm.height();
const int width = pm.width();
- QStringList lines = QStringList::split ('\n', mView->xmlLog(), true);
- QStringList::Iterator line = lines.begin();
+ TQStringList lines = TQStringList::split ('\n', mView->xmlLog(), true);
+ TQStringList::Iterator line = lines.begin();
int y = 0;
{
- QSimpleRichText rheading (i18n("<h1>KDE Sys-V Init Editor Log</h1>"),
- QFont("times"), QString::null, ksv::styleSheet(),
- QMimeSourceFactory::defaultFactory());
+ TQSimpleRichText rheading (i18n("<h1>KDE Sys-V Init Editor Log</h1>"),
+ TQFont("times"), TQString::null, ksv::styleSheet(),
+ TQMimeSourceFactory::defaultFactory());
rheading.setWidth (&p, width);
int tmp_h = rheading.height();
- QRegion region (0, y, width, tmp_h);
+ TQRegion region (0, y, width, tmp_h);
rheading.draw (&p, 0, y, region, colorGroup(), 0L);
y += tmp_h;
- QSimpleRichText rdate (i18n("<h3>Printed on %1</h3><br/><br/>").arg(KGlobal::locale()->formatDateTime(QDateTime::currentDateTime())),
- QFont("times"), QString::null, ksv::styleSheet(),
- QMimeSourceFactory::defaultFactory());
+ TQSimpleRichText rdate (i18n("<h3>Printed on %1</h3><br/><br/>").arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime())),
+ TQFont("times"), TQString::null, ksv::styleSheet(),
+ TQMimeSourceFactory::defaultFactory());
rdate.setWidth (&p, width);
tmp_h = rdate.height();
- QRegion r2 (0, y, width, tmp_h);
+ TQRegion r2 (0, y, width, tmp_h);
rdate.draw (&p, 0, y, r2, colorGroup(), 0L);
y += tmp_h;
@@ -790,15 +790,15 @@ void KSVTopLevel::printLog()
{
while (y < height)
{
- QSimpleRichText rich (*line, QFont("times"), QString::null, ksv::styleSheet(),
- QMimeSourceFactory::defaultFactory());
+ TQSimpleRichText rich (*line, TQFont("times"), TQString::null, ksv::styleSheet(),
+ TQMimeSourceFactory::defaultFactory());
rich.setWidth (&p, width);
int tmp_h = rich.height();
if (y + tmp_h > height)
break;
- QRegion region (0, y, width, tmp_h);
+ TQRegion region (0, y, width, tmp_h);
rich.draw (&p, 0, y, region, colorGroup(), 0L);
y += tmp_h;
@@ -842,7 +842,7 @@ void KSVTopLevel::catchCannotGenerateNumber()
5000);
}
-void KSVTopLevel::closeEvent (QCloseEvent* e)
+void KSVTopLevel::closeEvent (TQCloseEvent* e)
{
if (KBusyManager::self()->isBusy())
{
@@ -890,7 +890,7 @@ void KSVTopLevel::dispatchEdit ()
}
else
{
- QMimeSource* mime = kapp->clipboard()->data();
+ TQMimeSource* mime = kapp->clipboard()->data();
if (mime && mime->provides ("application/x-ksysv"))
setPaste (true);
@@ -922,23 +922,23 @@ void KSVTopLevel::disableRedo ()
void KSVTopLevel::slotSaveLog()
{
- static const QString& filter = ksv::logFileFilter();
- static const QString& ext = ksv::logFileExtension();
- QString filename = KFileDialog::getSaveFileName(0L, filter, this);
+ static const TQString& filter = ksv::logFileFilter();
+ static const TQString& ext = ksv::logFileExtension();
+ TQString filename = KFileDialog::getSaveFileName(0L, filter, this);
if (filename.isEmpty())
return;
else if (filename.right(ext.length()) != ext)
filename += ext;
- QFile file(filename);
+ TQFile file(filename);
file.open( IO_WriteOnly | IO_Raw );
- QTextStream s(&file);
+ TQTextStream s(&file);
s << "KDE System V Init Editor"
<< endl
- << QDateTime::currentDateTime().toString()
+ << TQDateTime::currentDateTime().toString()
<< endl << endl
<< mView->log()
<< endl;
@@ -981,7 +981,7 @@ void KSVTopLevel::configureKeys ()
void KSVTopLevel::configureToolbars ()
{
KEditToolbar dlg(filteredActions(), xmlFile(), true, this);
- connect(&dlg, SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() ));
+ connect(&dlg, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ));
dlg.exec();
}
@@ -1034,21 +1034,21 @@ void KSVTopLevel::toggleRunlevel (int index)
void KSVTopLevel::saveAs ()
{
- static const QString& filter = ksv::nativeFileFilter();
- static const QString& ext = ksv::nativeFileExtension();
- QString filename = KFileDialog::getSaveFileName(0L, filter, this);
+ static const TQString& filter = ksv::nativeFileFilter();
+ static const TQString& ext = ksv::nativeFileExtension();
+ TQString filename = KFileDialog::getSaveFileName(0L, filter, this);
if (filename.isEmpty())
return;
else if (filename.right(ext.length()) != ext)
filename += ext;
- QFile file(filename);
+ TQFile file(filename);
// we're busy
KBusyManager::self()->setBusy (true);
file.open (IO_WriteOnly | IO_Raw);
- QDataStream s (&file);
+ TQDataStream s (&file);
if (ksv::IO::saveConfiguration (s, mView->startRL, mView->stopRL))
{
@@ -1066,19 +1066,19 @@ void KSVTopLevel::saveAs ()
void KSVTopLevel::load ()
{
- static const QString& filter = ksv::nativeFileFilter();
- QString filename = KFileDialog::getOpenFileName(0L, filter, this);
+ static const TQString& filter = ksv::nativeFileFilter();
+ TQString filename = KFileDialog::getOpenFileName(0L, filter, this);
if (filename.isEmpty())
return;
- QFile file(filename);
+ TQFile file(filename);
KBusyManager::self()->setBusy (true);
file.open (IO_ReadOnly | IO_Raw);
- QDataStream s (&file);
- QValueList<KSVData>* startLists = new QValueList<KSVData>[ksv::runlevelNumber];
- QValueList<KSVData>* stopLists = new QValueList<KSVData>[ksv::runlevelNumber];
+ TQDataStream s (&file);
+ TQValueList<KSVData>* startLists = new TQValueList<KSVData>[ksv::runlevelNumber];
+ TQValueList<KSVData>* stopLists = new TQValueList<KSVData>[ksv::runlevelNumber];
if (ksv::IO::loadSavedConfiguration (s, startLists, stopLists))
{
diff --git a/ksysv/TopWidget.h b/ksysv/TopWidget.h
index 6415538..e9a852f 100644
--- a/ksysv/TopWidget.h
+++ b/ksysv/TopWidget.h
@@ -49,7 +49,7 @@ public slots:
protected:
virtual bool queryExit();
- virtual void closeEvent( QCloseEvent* e );
+ virtual void closeEvent( TQCloseEvent* e );
void initTools();
void initActions ();
void initStatusBar();
@@ -65,7 +65,7 @@ private slots:
void pasteAppend ();
void toggleLog();
void saveOptions();
- void slotUpdateRunning (const QString&);
+ void slotUpdateRunning (const TQString&);
void editCut();
void editCopy();
void editPaste();
@@ -146,7 +146,7 @@ private:
ServiceDlg* mEditDlg;
RunlevelAuthIcon* mAuth;
- QCheckBox** mVisible;
+ TQCheckBox** mVisible;
};
#endif // KSV_TOPWIDGET_H
diff --git a/ksysv/kbusymanager.cpp b/ksysv/kbusymanager.cpp
index d6c6e9c..ad9c86a 100644
--- a/ksysv/kbusymanager.cpp
+++ b/ksysv/kbusymanager.cpp
@@ -24,8 +24,8 @@
*/
#include "kbusymanager.h"
-#include <qvaluestack.h>
-#include <qapplication.h>
+#include <tqvaluestack.h>
+#include <tqapplication.h>
#include <kcursor.h>
#include <kapplication.h>
@@ -42,7 +42,7 @@ public:
{
}
- QValueStack<bool> Stack;
+ TQValueStack<bool> Stack;
int Size;
};
@@ -64,7 +64,7 @@ void KBusyManager::setBusy (bool val)
d->Size++;
if (val)
- QApplication::setOverrideCursor (KCursor::waitCursor());
+ TQApplication::setOverrideCursor (KCursor::waitCursor());
kapp->mainWidget()->setEnabled (!val);
}
@@ -77,7 +77,7 @@ void KBusyManager::restore ()
bool oldBusy = d->Stack.pop();
if (oldBusy)
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
kapp->mainWidget()->setEnabled (!d->Stack.top());
}
diff --git a/ksysv/kdltooltip.cpp b/ksysv/kdltooltip.cpp
index a0947ce..7b3a421 100644
--- a/ksysv/kdltooltip.cpp
+++ b/ksysv/kdltooltip.cpp
@@ -12,17 +12,17 @@
* *
***************************************************************************/
-#include <qrect.h>
-#include <qscrollbar.h>
-#include <qheader.h>
+#include <tqrect.h>
+#include <tqscrollbar.h>
+#include <tqheader.h>
#include <kdebug.h>
#include "ksvdraglist.h"
#include "kdltooltip.h"
-KDLToolTip::KDLToolTip (KSVDragList *parent, QToolTipGroup* group)
- : QToolTip(parent, group),
+KDLToolTip::KDLToolTip (KSVDragList *parent, TQToolTipGroup* group)
+ : TQToolTip(parent, group),
mParent (parent)
{
}
@@ -31,16 +31,16 @@ KDLToolTip::~KDLToolTip()
{
}
-void KDLToolTip::maybeTip (const QPoint& p)
+void KDLToolTip::maybeTip (const TQPoint& p)
{
if (!mParent->displayToolTips())
return;
- QString text;
- QRect rect;
+ TQString text;
+ TQRect rect;
- const QRect vert = mParent->verticalScrollBar()->geometry();
- const QRect horiz = mParent->horizontalScrollBar()->geometry();
+ const TQRect vert = mParent->verticalScrollBar()->geometry();
+ const TQRect horiz = mParent->horizontalScrollBar()->geometry();
if (vert.contains(p))
{
@@ -62,8 +62,8 @@ void KDLToolTip::maybeTip (const QPoint& p)
}
else
{
- QPoint rp = mParent->viewport()->mapFromParent (p);
- QListViewItem* i = mParent->itemAt (rp);
+ TQPoint rp = mParent->viewport()->mapFromParent (p);
+ TQListViewItem* i = mParent->itemAt (rp);
KSVItem* item = static_cast<KSVItem*> (i);
rect = mParent->header()->geometry();
@@ -82,7 +82,7 @@ void KDLToolTip::maybeTip (const QPoint& p)
{
rect = mParent->rect();
- QListViewItem* last = mParent->lastItem();
+ TQListViewItem* last = mParent->lastItem();
if (last)
rect.setTop (mParent->viewport()->mapToParent (mParent->itemRect(last).bottomRight()).y());
diff --git a/ksysv/kdltooltip.h b/ksysv/kdltooltip.h
index a107383..53685a4 100644
--- a/ksysv/kdltooltip.h
+++ b/ksysv/kdltooltip.h
@@ -15,7 +15,7 @@
#ifndef KDLTOOLTIP_H
#define KDLTOOLTIP_H
-#include <qtooltip.h>
+#include <tqtooltip.h>
class KSVDragList;
@@ -26,14 +26,14 @@ class KSVDragList;
class KDLToolTip : public QToolTip
{
public:
- KDLToolTip (KSVDragList *parent, QToolTipGroup* group = 0L);
+ KDLToolTip (KSVDragList *parent, TQToolTipGroup* group = 0L);
virtual ~KDLToolTip();
protected:
/**
- * Reimplemented from QToolTip for internal reasons.
+ * Reimplemented from TQToolTip for internal reasons.
*/
- virtual void maybeTip (const QPoint&);
+ virtual void maybeTip (const TQPoint&);
private:
KSVDragList* mParent;
diff --git a/ksysv/kscroller.cpp b/ksysv/kscroller.cpp
index 1f69b74..fc71368 100644
--- a/ksysv/kscroller.cpp
+++ b/ksysv/kscroller.cpp
@@ -1,8 +1,8 @@
// (c) 2000 Peter Putzer
-#include <qscrollbar.h>
-#include <qlayout.h>
-#include <qstyle.h>
+#include <tqscrollbar.h>
+#include <tqlayout.h>
+#include <tqstyle.h>
#include <kdebug.h>
#include <kdialog.h>
@@ -20,15 +20,15 @@ public:
~KScrollerPrivate () {}
- QWidget* setCornerWidget;
+ TQWidget* setCornerWidget;
};
-KScroller::KScroller (QWidget* parent, const char* name)
- : QFrame (parent, name),
+KScroller::KScroller (TQWidget* parent, const char* name)
+ : TQFrame (parent, name),
d (new KScrollerPrivate()),
- mVertical (new QScrollBar (QScrollBar::Vertical, this)),
- mHorizontal (new QScrollBar (QScrollBar::Horizontal, this)),
- mCornerWidget (new QWidget (this)),
+ mVertical (new TQScrollBar (TQScrollBar::Vertical, this)),
+ mHorizontal (new TQScrollBar (TQScrollBar::Horizontal, this)),
+ mCornerWidget (new TQWidget (this)),
mContent (0L),
mVerticalOld (0),
mHorizontalOld (0)
@@ -37,10 +37,10 @@ KScroller::KScroller (QWidget* parent, const char* name)
mVertical->hide();
mHorizontal->hide();
- connect (mVertical, SIGNAL (valueChanged (int)),
- this, SLOT (scrollVertical (int)));
- connect (mHorizontal, SIGNAL (valueChanged (int)),
- this, SLOT (scrollHorizontal (int)));
+ connect (mVertical, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (scrollVertical (int)));
+ connect (mHorizontal, TQT_SIGNAL (valueChanged (int)),
+ this, TQT_SLOT (scrollHorizontal (int)));
}
KScroller::~KScroller ()
@@ -48,7 +48,7 @@ KScroller::~KScroller ()
delete d;
}
-void KScroller::setContent (QWidget* content)
+void KScroller::setContent (TQWidget* content)
{
delete mContent;
@@ -56,7 +56,7 @@ void KScroller::setContent (QWidget* content)
updateScrollBars();
}
-void KScroller::setCornerWidget (QWidget* corner)
+void KScroller::setCornerWidget (TQWidget* corner)
{
delete mCornerWidget;
@@ -65,31 +65,31 @@ void KScroller::setCornerWidget (QWidget* corner)
updateScrollBars();
}
-QWidget* KScroller::cornerWidget ()
+TQWidget* KScroller::cornerWidget ()
{
return d->setCornerWidget;
}
-void KScroller::resizeEvent (QResizeEvent* e)
+void KScroller::resizeEvent (TQResizeEvent* e)
{
- QFrame::resizeEvent (e);
+ TQFrame::resizeEvent (e);
updateScrollBars();
}
-QSize KScroller::minimumSizeHint() const
+TQSize KScroller::minimumSizeHint() const
{
- QSize size = sizeHint();
+ TQSize size = sizeHint();
if (size.width() > 300)
size.setWidth(300);
return size;
}
-QSize KScroller::sizeHint() const
+TQSize KScroller::sizeHint() const
{
- QSize size = mContent->minimumSize();
- int extra = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent, 0 );
- size += QSize( extra, extra );
+ TQSize size = mContent->minimumSize();
+ int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 );
+ size += TQSize( extra, extra );
return size;
}
@@ -97,7 +97,7 @@ void KScroller::updateScrollBars ()
{
int w = width();
int h = height();
- QSize cs = mContent->minimumSize();
+ TQSize cs = mContent->minimumSize();
setupVertical ( cs.width(), cs.height(), w, h);
setupHorizontal ( cs.width(), cs.height(), w, h);
@@ -113,7 +113,7 @@ void KScroller::setupHorizontal (int cw, int, int w, int h)
if (cw > w)
{
- int extra = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent, 0 );
+ int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 );
if (!mVertical->isHidden())
w -= extra;
@@ -139,7 +139,7 @@ void KScroller::setupVertical (int, int ch, int w, int h)
if (ch > h)
{
- int extra = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent, 0 );
+ int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 );
mVertical->setRange (0, ch - h);
mVertical->setPageStep (h);
mVertical->setLineStep (25);
@@ -175,7 +175,7 @@ void KScroller::setupCornerWidget (int w, int h)
{
if (!mVertical->isHidden() && !mHorizontal->isHidden())
{
- int extra = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent, 0 );
+ int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 );
mCornerWidget->raise();
mCornerWidget->setGeometry (w - extra, h - extra, extra, extra);
diff --git a/ksysv/kscroller.h b/ksysv/kscroller.h
index 09329f1..dcaba97 100644
--- a/ksysv/kscroller.h
+++ b/ksysv/kscroller.h
@@ -2,7 +2,7 @@
#ifndef KSCROLLER_H
#define KSCROLLER_H
-#include <qframe.h>
+#include <tqframe.h>
class QScrollBar;
@@ -24,7 +24,7 @@ public:
* @param parent the parent of this widget (passed on as ususal).
* @param name the name of this widget (as above).
*/
- KScroller (QWidget* parent = 0L, const char* name = 0L);
+ KScroller (TQWidget* parent = 0L, const char* name = 0L);
/**
* Destructor.
@@ -34,22 +34,22 @@ public:
/**
* @return the vertical scrollbar.
*/
- inline QScrollBar* verticalScrollBar () { return mVertical; }
+ inline TQScrollBar* verticalScrollBar () { return mVertical; }
/**
* @return the horizontal scrollbar.
*/
- inline QScrollBar* horizontalScrollBar () { return mHorizontal; }
+ inline TQScrollBar* horizontalScrollBar () { return mHorizontal; }
/**
* @return the current content, or 0L if none set.
*/
- inline QWidget* content () { return mContent; }
+ inline TQWidget* content () { return mContent; }
/**
* @return the current corner widget, or 0L if none set.
*/
- QWidget* cornerWidget ();
+ TQWidget* cornerWidget ();
public slots:
/**
@@ -58,7 +58,7 @@ public slots:
*
* @param content has to be a child of the KScroller.
*/
- void setContent (QWidget* content);
+ void setContent (TQWidget* content);
/**
* Sets the corner widget (the small widget that's located where the vertical and horizontal scrollbars
@@ -66,7 +66,7 @@ public slots:
*
* @param corner has to be a child of the KScroller.
*/
- void setCornerWidget (QWidget* corner);
+ void setCornerWidget (TQWidget* corner);
/**
* Update the scrollbars. Call whenever you change the contents minimumSize.
@@ -77,17 +77,17 @@ protected:
/**
* Reimplemented for internal reasons, the API is not affected.
*/
- virtual void resizeEvent (QResizeEvent*);
+ virtual void resizeEvent (TQResizeEvent*);
/**
* Reimplemented for internal reasons, the API is not affected.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* Reimplemented for internal reasons, the API is not affected.
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
private slots:
@@ -137,11 +137,11 @@ private:
class KScrollerPrivate;
KScrollerPrivate* d;
- QScrollBar* mVertical;
- QScrollBar* mHorizontal;
- QWidget* mCornerWidget;
+ TQScrollBar* mVertical;
+ TQScrollBar* mHorizontal;
+ TQWidget* mCornerWidget;
- QWidget* mContent;
+ TQWidget* mContent;
int mVerticalOld;
int mHorizontalOld;
diff --git a/ksysv/ksv_conf.cpp b/ksysv/ksv_conf.cpp
index aa7ce8b..8522030 100644
--- a/ksysv/ksv_conf.cpp
+++ b/ksysv/ksv_conf.cpp
@@ -53,7 +53,7 @@ void KSVConfig::readSettings()
mChangedSelectedColor = mConfig->readColorEntry ("Changed Selected Text", &Qt::red);
mConfig->setGroup("Fonts");
- QFont tmp = KGlobalSettings::generalFont();
+ TQFont tmp = KGlobalSettings::generalFont();
mServiceFont = mConfig->readFontEntry ("Service Font", &tmp);
tmp = KGlobalSettings::fixedFont();
mNumberFont = mConfig->readFontEntry ("Number Font", &tmp);
@@ -128,9 +128,9 @@ void KSVConfig::readRunlevels ()
{
mConfig->setGroup ("Runlevels");
- QValueList<int> list = mConfig->readIntListEntry ("Show Runlevels");
+ TQValueList<int> list = mConfig->readIntListEntry ("Show Runlevels");
- for (QValueList<int>::Iterator it = list.begin(); it != list.end(); ++it)
+ for (TQValueList<int>::Iterator it = list.begin(); it != list.end(); ++it)
mShowRunlevel[*it] = true;
if (mShowRunlevel.isEmpty())
@@ -140,9 +140,9 @@ void KSVConfig::readRunlevels ()
void KSVConfig::writeRunlevels ()
{
- QValueList<int> list;
+ TQValueList<int> list;
- for (QMap<int,bool>::Iterator it = mShowRunlevel.begin(); it != mShowRunlevel.end(); ++it)
+ for (TQMap<int,bool>::Iterator it = mShowRunlevel.begin(); it != mShowRunlevel.end(); ++it)
if (it.data())
list.append (it.key());
@@ -155,20 +155,20 @@ void KSVConfig::setShowRunlevel (int index, bool state)
mShowRunlevel[index] = state;
}
-QPoint KSVConfig::position() const
+TQPoint KSVConfig::position() const
{
mConfig->setGroup("Geometry");
- return QPoint(mConfig->readNumEntry("X-Position", 0),
+ return TQPoint(mConfig->readNumEntry("X-Position", 0),
mConfig->readNumEntry("Y-Position", 0));
}
-void KSVConfig::setScriptPath (const QString& path)
+void KSVConfig::setScriptPath (const TQString& path)
{
mScriptPath = path;
}
-void KSVConfig::setRunlevelPath (const QString& path)
+void KSVConfig::setRunlevelPath (const TQString& path)
{
mRunlevelPath = path;
}
@@ -180,32 +180,32 @@ KSVConfig* KSVConfig::self()
return &conf;
}
-void KSVConfig::setNewNormalColor (const QColor& col)
+void KSVConfig::setNewNormalColor (const TQColor& col)
{
mNewNormalColor = col;
}
-void KSVConfig::setNewSelectedColor (const QColor& col)
+void KSVConfig::setNewSelectedColor (const TQColor& col)
{
mNewSelectedColor = col;
}
-void KSVConfig::setChangedNormalColor (const QColor& col)
+void KSVConfig::setChangedNormalColor (const TQColor& col)
{
mChangedNormalColor = col;
}
-void KSVConfig::setChangedSelectedColor (const QColor& col)
+void KSVConfig::setChangedSelectedColor (const TQColor& col)
{
mChangedSelectedColor = col;
}
-void KSVConfig::setNumberFont (const QFont& font)
+void KSVConfig::setNumberFont (const TQFont& font)
{
mNumberFont = font;
}
-void KSVConfig::setServiceFont (const QFont& font)
+void KSVConfig::setServiceFont (const TQFont& font)
{
mServiceFont = font;
}
diff --git a/ksysv/ksv_conf.h b/ksysv/ksv_conf.h
index f17176a..a676270 100644
--- a/ksysv/ksv_conf.h
+++ b/ksysv/ksv_conf.h
@@ -15,11 +15,11 @@
#ifndef KSV_CONF_H
#define KSV_CONF_H
-#include <qstring.h>
-#include <qpoint.h>
-#include <qfont.h>
-#include <qcolor.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqpoint.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqmap.h>
#include "ksv_core.h"
@@ -42,16 +42,16 @@ public:
mShowLog = val;
}
- void setNewNormalColor (const QColor& color);
- void setNewSelectedColor (const QColor& color);
- void setChangedNormalColor (const QColor& color);
- void setChangedSelectedColor (const QColor& color);
+ void setNewNormalColor (const TQColor& color);
+ void setNewSelectedColor (const TQColor& color);
+ void setChangedNormalColor (const TQColor& color);
+ void setChangedSelectedColor (const TQColor& color);
- void setServiceFont (const QFont& font);
- void setNumberFont (const QFont& font);
+ void setServiceFont (const TQFont& font);
+ void setNumberFont (const TQFont& font);
- void setScriptPath (const QString& path);
- void setRunlevelPath (const QString& path);
+ void setScriptPath (const TQString& path);
+ void setRunlevelPath (const TQString& path);
inline void setConfigured( bool val = true )
{
@@ -73,16 +73,16 @@ public:
return mPanningFactor;
}
- inline const QFont& serviceFont () const { return mServiceFont; }
- inline const QFont& numberFont () const { return mNumberFont; }
+ inline const TQFont& serviceFont () const { return mServiceFont; }
+ inline const TQFont& numberFont () const { return mNumberFont; }
- QPoint position() const;
+ TQPoint position() const;
- inline const QColor& newNormalColor () const { return mNewNormalColor; }
- inline const QColor& newSelectedColor () const { return mNewSelectedColor; }
+ inline const TQColor& newNormalColor () const { return mNewNormalColor; }
+ inline const TQColor& newSelectedColor () const { return mNewSelectedColor; }
- inline const QColor& changedNormalColor () const { return mChangedNormalColor; }
- inline const QColor& changedSelectedColor () const { return mChangedSelectedColor; }
+ inline const TQColor& changedNormalColor () const { return mChangedNormalColor; }
+ inline const TQColor& changedSelectedColor () const { return mChangedSelectedColor; }
bool showRunlevel (int index) const;
void setShowRunlevel (int index, bool state);
@@ -98,12 +98,12 @@ public:
return mConfigured;
}
- inline const QString& scriptPath() const
+ inline const TQString& scriptPath() const
{
return mScriptPath;
}
- inline const QString& runlevelPath() const
+ inline const TQString& runlevelPath() const
{
return mRunlevelPath;
}
@@ -121,22 +121,22 @@ public:
private:
KSVConfig ();
- QString mScriptPath;
- QString mRunlevelPath;
+ TQString mScriptPath;
+ TQString mRunlevelPath;
bool mShowLog;
bool mConfigured;
KConfig* mConfig;
int mPanningFactor;
- QColor mNewNormalColor, mNewSelectedColor;
- QColor mChangedNormalColor, mChangedSelectedColor;
+ TQColor mNewNormalColor, mNewSelectedColor;
+ TQColor mChangedNormalColor, mChangedSelectedColor;
bool mShowDescription;
- QMap<int, bool> mShowRunlevel;
+ TQMap<int, bool> mShowRunlevel;
- QFont mServiceFont;
- QFont mNumberFont;
+ TQFont mServiceFont;
+ TQFont mNumberFont;
};
#endif // KSV_CONF_H
diff --git a/ksysv/ksv_core.cpp b/ksysv/ksv_core.cpp
index a4e2b2c..6611211 100644
--- a/ksysv/ksv_core.cpp
+++ b/ksysv/ksv_core.cpp
@@ -12,8 +12,8 @@
* *
***************************************************************************/
-#include <qpushbutton.h>
-#include <qstylesheet.h>
+#include <tqpushbutton.h>
+#include <tqstylesheet.h>
#include <kapplication.h>
#include <kglobalsettings.h>
@@ -29,7 +29,7 @@
const int ksv::runlevelNumber = 7;
KAboutData* ksv::about = 0L;
-bool ksv::getServiceDescription (const QString& path, QString& res)
+bool ksv::getServiceDescription (const TQString& path, TQString& res)
{
KSVService* tmp = KSVService::newService (path, KSVConfig::self()->runlevelPath());
res = i18n ("No description available.");
@@ -46,13 +46,13 @@ bool ksv::getServiceDescription (const QString& path, QString& res)
return result;
}
-QString ksv::breakWords (const QString& s, int amount)
+TQString ksv::breakWords (const TQString& s, int amount)
{
- QString res;
+ TQString res;
int left = s.length();
int maximum = amount;
- QString str = s;
+ TQString str = s;
while (left > maximum)
{
@@ -78,43 +78,43 @@ QString ksv::breakWords (const QString& s, int amount)
return res;
}
-const QString& ksv::copyrightSymbol ()
+const TQString& ksv::copyrightSymbol ()
{
- static QString c = QString::fromUtf8 ("©");
+ static TQString c = TQString::fromUtf8 ("©");
return c;
}
-QStyleSheet* ksv::styleSheet ()
+TQStyleSheet* ksv::styleSheet ()
{
- static QStyleSheet style;
+ static TQStyleSheet style;
static bool initialized = false;
if (!initialized)
{
- QStyleSheetItem* item = new QStyleSheetItem (&style, "vip"); // very important
+ TQStyleSheetItem* item = new TQStyleSheetItem (&style, "vip"); // very important
item->setLogicalFontSize (5);
- item->setFontWeight (QFont::Bold);
- item->setDisplayMode (QStyleSheetItem::DisplayBlock);
+ item->setFontWeight (TQFont::Bold);
+ item->setDisplayMode (TQStyleSheetItem::DisplayBlock);
- item = new QStyleSheetItem (&style, "rl"); // runlevel
+ item = new TQStyleSheetItem (&style, "rl"); // runlevel
item->setLogicalFontSize (4);
- item->setFontWeight (QFont::Bold);
-// item->setDisplayMode (QStyleSheetItem::DisplayBlock);
+ item->setFontWeight (TQFont::Bold);
+// item->setDisplayMode (TQStyleSheetItem::DisplayBlock);
- item = new QStyleSheetItem (&style, "start"); // start section
+ item = new TQStyleSheetItem (&style, "start"); // start section
item->setColor (Qt::green);
// item->setContexts ("rl");
- item = new QStyleSheetItem (&style, "stop"); // stop section
+ item = new TQStyleSheetItem (&style, "stop"); // stop section
item->setColor (Qt::red);
// item->setContexts ("rl");
- item = new QStyleSheetItem (&style, "error"); // signal an error
+ item = new TQStyleSheetItem (&style, "error"); // signal an error
item->setColor (Qt::red);
item->setLogicalFontSizeStep (1);
- item = new QStyleSheetItem (&style, "cmd"); // command line
+ item = new TQStyleSheetItem (&style, "cmd"); // command line
item->setFontFamily (KGlobalSettings::fixedFont().family());
}
@@ -137,7 +137,7 @@ KCompletion* ksv::numberCompletion ()
{
for (int value = 0; value < 100; value += 10)
{
- QString result = QString::number (value);
+ TQString result = TQString::number (value);
if (value < 10)
result.sprintf("%.2i", value);
@@ -149,32 +149,32 @@ KCompletion* ksv::numberCompletion ()
return &comp;
}
-const QString& ksv::logFileFilter ()
+const TQString& ksv::logFileFilter ()
{
- static QString filter = "*" + ksv::logFileExtension() + "|" +
- QString(kapp->caption() + i18n(" log files") + " (*" + ksv::logFileExtension() + ")");
+ static TQString filter = "*" + ksv::logFileExtension() + "|" +
+ TQString(kapp->caption() + i18n(" log files") + " (*" + ksv::logFileExtension() + ")");
return filter;
}
-const QString& ksv::nativeFileFilter ()
+const TQString& ksv::nativeFileFilter ()
{
- static QString filter = "*" + ksv::nativeFileExtension() + "|"
+ static TQString filter = "*" + ksv::nativeFileExtension() + "|"
+ i18n("Saved Init Configurations") + " (*" + ksv::nativeFileExtension() + ")";
return filter;
}
-const QString& ksv::logFileExtension ()
+const TQString& ksv::logFileExtension ()
{
- static QString ext = ".ksysv_log";
+ static TQString ext = ".ksysv_log";
return ext;
}
-const QString& ksv::nativeFileExtension ()
+const TQString& ksv::nativeFileExtension ()
{
- static QString ext = ".ksysv";
+ static TQString ext = ".ksysv";
return ext;
}
diff --git a/ksysv/ksv_core.h b/ksysv/ksv_core.h
index 58d1fa2..6817a5d 100644
--- a/ksysv/ksv_core.h
+++ b/ksysv/ksv_core.h
@@ -23,22 +23,22 @@ class KSVItem;
namespace ksv
{
- bool getServiceDescription (const QString& path, QString& res);
+ bool getServiceDescription (const TQString& path, TQString& res);
- QString breakWords (const QString& s, int amount);
+ TQString breakWords (const TQString& s, int amount);
/**
* \return the Unicode string for the (c) symbol.
*/
- const QString& copyrightSymbol ();
+ const TQString& copyrightSymbol ();
- QStyleSheet* styleSheet ();
+ TQStyleSheet* styleSheet ();
- const QString& logFileFilter ();
- const QString& nativeFileFilter ();
+ const TQString& logFileFilter ();
+ const TQString& nativeFileFilter ();
- const QString& logFileExtension ();
- const QString& nativeFileExtension ();
+ const TQString& logFileExtension ();
+ const TQString& nativeFileExtension ();
KCompletion* serviceCompletion ();
KCompletion* numberCompletion ();
diff --git a/ksysv/ksv_service.cpp b/ksysv/ksv_service.cpp
index e13ab6f..0aa8ffb 100644
--- a/ksysv/ksv_service.cpp
+++ b/ksysv/ksv_service.cpp
@@ -15,14 +15,14 @@
#include <ksv_service.h>
#include "leveldb.h"
-KSVService::KSVService (const QString &name, const QString &basedir)
+KSVService::KSVService (const TQString &name, const TQString &basedir)
: name_ (name),
base_ (basedir)
{
}
-KSVService* KSVService::newService (const QString &name, const QString &basedir)
+KSVService* KSVService::newService (const TQString &name, const TQString &basedir)
{
struct service service;
@@ -70,7 +70,7 @@ int KSVService::set (int level, bool on)
return ::doSetService ("/etc/rc.d", service, level, on);
}
-QString KSVService::description () const
+TQString KSVService::description () const
{
return desc_.stripWhiteSpace();
}
diff --git a/ksysv/ksv_service.h b/ksysv/ksv_service.h
index cdf42e1..9cab355 100644
--- a/ksysv/ksv_service.h
+++ b/ksysv/ksv_service.h
@@ -15,7 +15,7 @@
#ifndef KSV_SERVICE_H
#define KSV_SERVICE_H
-#include <qstring.h>
+#include <tqstring.h>
/**
* The long description for this class goes here
@@ -31,7 +31,7 @@ public:
/**
* Named constructor
*/
- static KSVService* newService (const QString &name, const QString &basedir);
+ static KSVService* newService (const TQString &name, const TQString &basedir);
/**
* Destructor
@@ -56,7 +56,7 @@ public:
/**
* Returns the description of the service
*/
- QString description () const;
+ TQString description () const;
private:
/**
@@ -76,22 +76,22 @@ protected:
/**
* Constructor
*/
- KSVService (const QString &name, const QString &basedir);
+ KSVService (const TQString &name, const TQString &basedir);
/**
* Name of the service
*/
- QString name_;
+ TQString name_;
/**
* Description of the service (i.e. what it does)
*/
- QString desc_;
+ TQString desc_;
/**
* Base dir for storing runlevel dirs
*/
- QString base_;
+ TQString base_;
int levels, kPriority, sPriority;
};
diff --git a/ksysv/ksvapplication.cpp b/ksysv/ksvapplication.cpp
index d305712..d45278c 100644
--- a/ksysv/ksvapplication.cpp
+++ b/ksysv/ksvapplication.cpp
@@ -8,7 +8,7 @@
int KSVApplication::newInstance ()
{
- QWidget* main = mainWidget();
+ TQWidget* main = mainWidget();
if (main)
KWin::activateWindow (main->winId());
diff --git a/ksysv/ksvconfigwizard.cpp b/ksysv/ksvconfigwizard.cpp
index 6a197cb..acbdb04 100644
--- a/ksysv/ksvconfigwizard.cpp
+++ b/ksysv/ksvconfigwizard.cpp
@@ -25,12 +25,12 @@
*/
#include "ksvconfigwizard.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdialog.h>
#include <kfiledialog.h>
#include <klineedit.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
/*
* Constructs a KSVConfigWizard which is a child of 'parent', with the
@@ -39,7 +39,7 @@
* The wizard will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal wizard.
*/
-KSVConfigWizard::KSVConfigWizard (QWidget* parent, const char* name, bool modal, WFlags fl)
+KSVConfigWizard::KSVConfigWizard (TQWidget* parent, const char* name, bool modal, WFlags fl)
: ConfigWizard (parent, name, modal, fl),
mChosenDistribution (Debian)
{
@@ -55,8 +55,8 @@ KSVConfigWizard::KSVConfigWizard (QWidget* parent, const char* name, bool modal,
setFinishEnabled (mFinishedPage, true);
// some connections
- connect (this, SIGNAL (selected (const QString&)),
- this, SLOT (selectedPage (const QString&)));
+ connect (this, TQT_SIGNAL (selected (const TQString&)),
+ this, TQT_SLOT (selectedPage (const TQString&)));
// hide cancel-button
cancelButton()->hide();
@@ -72,7 +72,7 @@ KSVConfigWizard::~KSVConfigWizard()
void KSVConfigWizard::browseServices()
{
- QString path = KFileDialog::getExistingDirectory(mServicesPath->text(), this);
+ TQString path = KFileDialog::getExistingDirectory(mServicesPath->text(), this);
if (!path.isEmpty())
mServicesPath->setText(path);
@@ -82,7 +82,7 @@ void KSVConfigWizard::browseServices()
void KSVConfigWizard::browseRunlevels()
{
- QString path = KFileDialog::getExistingDirectory(mRunlevelPath->text(), this);
+ TQString path = KFileDialog::getExistingDirectory(mRunlevelPath->text(), this);
if (!path.isEmpty())
mRunlevelPath->setText(path);
@@ -90,7 +90,7 @@ void KSVConfigWizard::browseRunlevels()
mRunlevelPath->setFocus();
}
-void KSVConfigWizard::selectedPage (const QString& title)
+void KSVConfigWizard::selectedPage (const TQString& title)
{
if (title == "Configuration Complete")
finishButton()->setDefault (true);
@@ -98,12 +98,12 @@ void KSVConfigWizard::selectedPage (const QString& title)
nextButton()->setDefault (true);
}
-QString KSVConfigWizard::runlevelPath ()
+TQString KSVConfigWizard::runlevelPath ()
{
return mRunlevelPath->text();
}
-QString KSVConfigWizard::servicesPath ()
+TQString KSVConfigWizard::servicesPath ()
{
return mServicesPath->text();
}
@@ -112,7 +112,7 @@ void KSVConfigWizard::chooseDistribution(int which)
{
mChosenDistribution = static_cast<Distribution> (which);
- QString rlpath; QString spath;
+ TQString rlpath; TQString spath;
switch (mChosenDistribution)
{
case Debian:
diff --git a/ksysv/ksvconfigwizard.h b/ksysv/ksvconfigwizard.h
index 35e8c7f..20c11c7 100644
--- a/ksysv/ksvconfigwizard.h
+++ b/ksysv/ksvconfigwizard.h
@@ -27,19 +27,19 @@
#define KSVCONFIGWIZARD_H
#include "configwizard.h"
-#include <qstring.h>
+#include <tqstring.h>
class KSVConfigWizard : public ConfigWizard
{
Q_OBJECT
public:
- KSVConfigWizard( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ KSVConfigWizard( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~KSVConfigWizard();
public:
- QString runlevelPath();
- QString servicesPath();
+ TQString runlevelPath();
+ TQString servicesPath();
protected slots:
void browseRunlevels();
@@ -47,7 +47,7 @@ protected slots:
void browseServices();
private slots:
- void selectedPage (const QString&);
+ void selectedPage (const TQString&);
private:
typedef enum {
diff --git a/ksysv/ksvdrag.cpp b/ksysv/ksvdrag.cpp
index 1f24417..7d94536 100644
--- a/ksysv/ksvdrag.cpp
+++ b/ksysv/ksvdrag.cpp
@@ -1,7 +1,7 @@
// (c) 2000 Peter Putzer
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kurl.h>
@@ -12,27 +12,27 @@
class KSVDrag::Private
{
public:
- QByteArray mNative;
- QString mText;
+ TQByteArray mNative;
+ TQString mText;
KURL mURL;
};
-KSVDrag::KSVDrag (const KSVData& item, QWidget* source, const char* name)
- : QDragObject (source, name),
+KSVDrag::KSVDrag (const KSVData& item, TQWidget* source, const char* name)
+ : TQDragObject (source, name),
d (new Private())
{
- QDataStream ds (d->mNative, IO_ReadWrite);
+ TQDataStream ds (d->mNative, IO_ReadWrite);
ds << item;
d->mText = item.filenameAndPath ();
d->mURL.setPath (item.path() + "/" + item.filename());
}
-KSVDrag::KSVDrag (const KSVItem& item, QWidget* source, const char* name)
- : QDragObject (source, name),
+KSVDrag::KSVDrag (const KSVItem& item, TQWidget* source, const char* name)
+ : TQDragObject (source, name),
d (new Private())
{
- QDataStream ds (d->mNative, IO_ReadWrite);
+ TQDataStream ds (d->mNative, IO_ReadWrite);
ds << *item.data();
d->mText = item.toString();
@@ -65,9 +65,9 @@ const char* KSVDrag::format (int i) const
}
}
-QByteArray KSVDrag::encodedData (const char* format) const
+TQByteArray KSVDrag::encodedData (const char* format) const
{
- QByteArray res;
+ TQByteArray res;
if (!strcmp (format, "application/x-ksysv"))
{
@@ -75,22 +75,22 @@ QByteArray KSVDrag::encodedData (const char* format) const
}
else if (!strcmp (format, "text/plain"))
{
- QDataStream ds (res, IO_ReadWrite);
+ TQDataStream ds (res, IO_ReadWrite);
ds << d->mText;
}
else if (!strcmp (format, "text/uri-list"))
{
- res = QCString(d->mURL.url().latin1()).copy();
+ res = TQCString(d->mURL.url().latin1()).copy();
}
return res;
}
-bool KSVDrag::decodeNative (const QMimeSource* mime, KSVData& data)
+bool KSVDrag::decodeNative (const TQMimeSource* mime, KSVData& data)
{
if (mime && mime->provides ("application/x-ksysv"))
{
- QDataStream ds (mime->encodedData ("application/x-ksysv"), IO_ReadOnly);
+ TQDataStream ds (mime->encodedData ("application/x-ksysv"), IO_ReadOnly);
ds >> data;
return true;
diff --git a/ksysv/ksvdrag.h b/ksysv/ksvdrag.h
index 272f16d..bbbb415 100644
--- a/ksysv/ksvdrag.h
+++ b/ksysv/ksvdrag.h
@@ -3,7 +3,7 @@
#ifndef KSVDRAG_H
#define KSVDRAG_H
-#include <qdragobject.h>
+#include <tqdragobject.h>
class KSVData;
class KSVItem;
@@ -14,14 +14,14 @@ class KSVDrag : public QDragObject
Q_OBJECT
public:
- KSVDrag (const KSVData& item, QWidget* dragSource = 0L, const char* name = 0L);
- KSVDrag (const KSVItem& item, QWidget* dragSource = 0L, const char* name = 0L);
+ KSVDrag (const KSVData& item, TQWidget* dragSource = 0L, const char* name = 0L);
+ KSVDrag (const KSVItem& item, TQWidget* dragSource = 0L, const char* name = 0L);
virtual ~KSVDrag();
virtual const char* format (int i) const;
- QByteArray encodedData (const char*) const;
+ TQByteArray encodedData (const char*) const;
- static bool decodeNative (const QMimeSource*, KSVData&);
+ static bool decodeNative (const TQMimeSource*, KSVData&);
private:
enum
diff --git a/ksysv/ksvdraglist.cpp b/ksysv/ksvdraglist.cpp
index b0bd9bd..ea2e264 100644
--- a/ksysv/ksvdraglist.cpp
+++ b/ksysv/ksvdraglist.cpp
@@ -33,16 +33,16 @@
#include <stdlib.h>
-#include <qpainter.h>
-#include <qdragobject.h>
-#include <qdatastream.h>
-#include <qheader.h>
-#include <qpixmapcache.h>
-#include <qbitmap.h>
-#include <qcursor.h>
-#include <qcolor.h>
-#include <qcstring.h>
-#include <qlabel.h>
+#include <tqpainter.h>
+#include <tqdragobject.h>
+#include <tqdatastream.h>
+#include <tqheader.h>
+#include <tqpixmapcache.h>
+#include <tqbitmap.h>
+#include <tqcursor.h>
+#include <tqcolor.h>
+#include <tqcstring.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <kpopupmenu.h>
@@ -58,7 +58,7 @@
#include "ActionList.h"
KSVItem::KSVItem (KListView* view)
- : QListViewItem (view),
+ : TQListViewItem (view),
mData (new KSVData()),
mConfig (KSVConfig::self()),
mNewNormalColor (mConfig->newNormalColor()),
@@ -69,7 +69,7 @@ KSVItem::KSVItem (KListView* view)
}
KSVItem::KSVItem (const KSVItem& item)
- : QListViewItem (item.listView()),
+ : TQListViewItem (item.listView()),
mData (new KSVData(*item.mData)),
mConfig (KSVConfig::self()),
mNewNormalColor (mConfig->newNormalColor()),
@@ -84,7 +84,7 @@ KSVItem::KSVItem (const KSVItem& item)
}
KSVItem::KSVItem (KSVDragList* view, const KSVData& data)
- : QListViewItem (view),
+ : TQListViewItem (view),
mData (new KSVData (data)),
mConfig (KSVConfig::self()),
mNewNormalColor (mConfig->newNormalColor()),
@@ -105,13 +105,13 @@ void KSVItem::copy (const KSVData& item)
setText (ServiceName, mData->label());
}
-QString KSVItem::key (int, bool) const
+TQString KSVItem::key (int, bool) const
{
return mData->numberString() + mData->label();
}
-KSVItem::KSVItem (KListView* view, QString file, QString path, QString label, Q_INT8 nr )
- : QListViewItem (view),
+KSVItem::KSVItem (KListView* view, TQString file, TQString path, TQString label, Q_INT8 nr )
+ : TQListViewItem (view),
mData (new KSVData (file, path, label, nr)),
mConfig (KSVConfig::self()),
mNewNormalColor (mConfig->newNormalColor()),
@@ -128,7 +128,7 @@ KSVItem::~KSVItem()
delete mData;
}
-void KSVItem::paintCell (QPainter* p, const QColorGroup& cg, int column, int width, int align)
+void KSVItem::paintCell (TQPainter* p, const TQColorGroup& cg, int column, int width, int align)
{
switch (column)
{
@@ -141,30 +141,30 @@ void KSVItem::paintCell (QPainter* p, const QColorGroup& cg, int column, int wid
break;
}
- QColorGroup colors = cg;
+ TQColorGroup colors = cg;
if (mData->newEntry())
{
- colors.setColor (QColorGroup::Text, mNewNormalColor);
- colors.setColor (QColorGroup::HighlightedText, mNewSelectedColor);
+ colors.setColor (TQColorGroup::Text, mNewNormalColor);
+ colors.setColor (TQColorGroup::HighlightedText, mNewSelectedColor);
}
else if (mData->changed())
{
- colors.setColor (QColorGroup::Text, mChangedNormalColor);
- colors.setColor (QColorGroup::HighlightedText, mChangedSelectedColor);
+ colors.setColor (TQColorGroup::Text, mChangedNormalColor);
+ colors.setColor (TQColorGroup::HighlightedText, mChangedSelectedColor);
}
- QListViewItem::paintCell (p, colors, column, width, align);
+ TQListViewItem::paintCell (p, colors, column, width, align);
}
-QString KSVItem::toString() const
+TQString KSVItem::toString() const
{
return filenameAndPath();
}
-QString KSVItem::tooltip () const
+TQString KSVItem::tooltip () const
{
- QString result;
+ TQString result;
if (mConfig->showDescription())
{
@@ -191,20 +191,20 @@ void KSVItem::setNew ( bool val )
}
-QPixmap KSVItem::paintDragIcon (const QFont& font, const QColorGroup&) const
+TQPixmap KSVItem::paintDragIcon (const TQFont& font, const TQColorGroup&) const
{
- QFontMetrics metric (font);
- QRect textRect = metric.boundingRect (label());
- const QPixmap& icon = *pixmap (Icon);
+ TQFontMetrics metric (font);
+ TQRect textRect = metric.boundingRect (label());
+ const TQPixmap& icon = *pixmap (Icon);
const int margin = listView()->itemMargin();
const int width = icon.width() + margin * 2 + textRect.width();
const int height = kMax (icon.height(), textRect.height());
- QPixmap result (width, height);
+ TQPixmap result (width, height);
result.fill (white);
- QPainter p (&result);
+ TQPainter p (&result);
p.drawPixmap (0, 0, icon);
p.setFont (font);
@@ -214,7 +214,7 @@ QPixmap KSVItem::paintDragIcon (const QFont& font, const QColorGroup&) const
label());
p.end();
- QBitmap mask (width, height);
+ TQBitmap mask (width, height);
p.begin (&mask);
p.setFont (font);
@@ -228,35 +228,35 @@ QPixmap KSVItem::paintDragIcon (const QFont& font, const QColorGroup&) const
AlignLeft | AlignVCenter,
label());
- QBrush brush (color0);
+ TQBrush brush (color0);
brush.setStyle(Dense5Pattern);
p.fillRect (0, 0, width, height, brush);
p.end();
result.setMask(mask);
- result.setOptimization(QPixmap::BestOptim);
+ result.setOptimization(TQPixmap::BestOptim);
return result;
}
-void KSVItem::setIcon (const QPixmap& icon)
+void KSVItem::setIcon (const TQPixmap& icon)
{
setPixmap (Icon, icon);
}
-void KSVItem::setLabel (const QString& label)
+void KSVItem::setLabel (const TQString& label)
{
mData->setLabel (label);
setText (ServiceName, label);
}
-void KSVItem::setRunlevel (const QString& runlevel)
+void KSVItem::setRunlevel (const TQString& runlevel)
{
mData->setRunlevel (runlevel);
}
-void KSVItem::setFilename (const QString& file)
+void KSVItem::setFilename (const TQString& file)
{
mData->setFilename (file);
}
@@ -268,27 +268,27 @@ void KSVItem::setNumber (Q_INT8 nr)
setText(SortNumber, mData->numberString());
}
-void KSVItem::setPath (const QString& path)
+void KSVItem::setPath (const TQString& path)
{
mData->setPath (path);
}
-void KSVItem::setNewNormalColor (const QColor& col)
+void KSVItem::setNewNormalColor (const TQColor& col)
{
mNewNormalColor = col;
}
-void KSVItem::setNewSelectedColor (const QColor& col)
+void KSVItem::setNewSelectedColor (const TQColor& col)
{
mNewSelectedColor = col;
}
-void KSVItem::setChangedNormalColor (const QColor& col)
+void KSVItem::setChangedNormalColor (const TQColor& col)
{
mChangedNormalColor = col;
}
-void KSVItem::setChangedSelectedColor (const QColor& col)
+void KSVItem::setChangedSelectedColor (const TQColor& col)
{
mChangedSelectedColor = col;
}
@@ -298,7 +298,7 @@ void KSVItem::setChanged (bool val)
mData->setChanged (val);
}
-void KSVItem::setOriginalRunlevel (const QString& rl)
+void KSVItem::setOriginalRunlevel (const TQString& rl)
{
mData->setOriginalRunlevel (rl);
}
@@ -309,7 +309,7 @@ void KSVItem::setOriginalRunlevel (const QString& rl)
// KSVDragList
//-----------------------
-KSVDragList::KSVDragList ( QWidget* parent, const char* name )
+KSVDragList::KSVDragList ( TQWidget* parent, const char* name )
: KListView (parent, name),
mItemToDrag (0L),
mDragMenu (new KPopupMenu (this)),
@@ -326,7 +326,7 @@ KSVDragList::KSVDragList ( QWidget* parent, const char* name )
setAcceptDrops(true);
setDropVisualizer (true);
- QHeader* h = header();
+ TQHeader* h = header();
h->setClickEnabled (false);
addColumn (i18n("No.")); // SortNumber
@@ -358,8 +358,8 @@ KSVDragList::KSVDragList ( QWidget* parent, const char* name )
mRMList.setAutoDelete(true);
// catch drops
- connect (this, SIGNAL (dropped (QDropEvent*, QListViewItem*)),
- this, SLOT (drop (QDropEvent*, QListViewItem*)));
+ connect (this, TQT_SIGNAL (dropped (TQDropEvent*, TQListViewItem*)),
+ this, TQT_SLOT (drop (TQDropEvent*, TQListViewItem*)));
}
KSVDragList::~KSVDragList()
@@ -370,11 +370,11 @@ KSVDragList::~KSVDragList()
delete toolTip;
}
-void KSVDragList::initItem (QString file, QString path, QString name, Q_INT8 nr)
+void KSVDragList::initItem (TQString file, TQString path, TQString name, Q_INT8 nr)
{
KSVItem* tmp = new KSVItem(this, file, path, name, nr);
- tmp->setRunlevel(QObject::name());
- tmp->setOriginalRunlevel(QObject::name());
+ tmp->setRunlevel(TQObject::name());
+ tmp->setOriginalRunlevel(TQObject::name());
tmp->setIcon (mIcon);
@@ -388,11 +388,11 @@ void KSVDragList::initItem (QString file, QString path, QString name, Q_INT8 nr)
repaint(false);
}
-void KSVDragList::setDefaultIcon (const QPixmap& icon)
+void KSVDragList::setDefaultIcon (const TQPixmap& icon)
{
mIcon = icon;
- for (QListViewItemIterator it (firstChild()); it.current(); ++it)
+ for (TQListViewItemIterator it (firstChild()); it.current(); ++it)
{
static_cast <KSVItem*> (it.current())->setIcon (mIcon);
}
@@ -405,12 +405,12 @@ void KSVDragList::clear ()
clearRMList();
}
-void KSVDragList::setNewNormalColor ( const QColor& col )
+void KSVDragList::setNewNormalColor ( const TQColor& col )
{
mNewNormalColor = col;
KSVItem* item;
- for (QListViewItemIterator it (firstChild());
+ for (TQListViewItemIterator it (firstChild());
(item = static_cast<KSVItem*>(it.current()));
++it)
{
@@ -418,12 +418,12 @@ void KSVDragList::setNewNormalColor ( const QColor& col )
}
}
-void KSVDragList::setNewSelectedColor (const QColor& col)
+void KSVDragList::setNewSelectedColor (const TQColor& col)
{
mNewSelectedColor = col;
KSVItem* item;
- for (QListViewItemIterator it (firstChild());
+ for (TQListViewItemIterator it (firstChild());
(item = static_cast<KSVItem*>(it.current()));
++it)
{
@@ -431,7 +431,7 @@ void KSVDragList::setNewSelectedColor (const QColor& col)
}
}
-Q_INT8 KSVDragList::generateNumber (const QString& label,
+Q_INT8 KSVDragList::generateNumber (const TQString& label,
const KSVData* itemBelow, const KSVData* itemAbove) const
{
Q_INT8 high = itemBelow ? itemBelow->number() : -1;
@@ -468,12 +468,12 @@ Q_INT8 KSVDragList::generateNumber (Q_INT8 high, Q_INT8 low) const
return result;
}
-void KSVDragList::setChangedNormalColor (const QColor& col)
+void KSVDragList::setChangedNormalColor (const TQColor& col)
{
mChangedNormalColor = col;
KSVItem* item;
- for (QListViewItemIterator it (firstChild());
+ for (TQListViewItemIterator it (firstChild());
(item = static_cast<KSVItem*> (it.current()));
++it)
{
@@ -481,12 +481,12 @@ void KSVDragList::setChangedNormalColor (const QColor& col)
}
}
-void KSVDragList::setChangedSelectedColor (const QColor& col)
+void KSVDragList::setChangedSelectedColor (const TQColor& col)
{
mChangedSelectedColor = col;
KSVItem* item;
- for (QListViewItemIterator it (firstChild());
+ for (TQListViewItemIterator it (firstChild());
(item = static_cast<KSVItem*> (it.current()));
++it)
{
@@ -498,7 +498,7 @@ KSVItem* KSVDragList::match (const KSVData& data)
{
KSVItem* res = 0L;
- for (QListViewItemIterator it (this);
+ for (TQListViewItemIterator it (this);
(res = static_cast<KSVItem*> (it.current()));
++it)
{
@@ -539,7 +539,7 @@ void KSVDragList::startDrag ()
}
//KSVDrag* KSVDragList::dragObject ()
-QDragObject* KSVDragList::dragObject ()
+TQDragObject* KSVDragList::dragObject ()
{
if (mItemToDrag)
{
@@ -549,14 +549,14 @@ QDragObject* KSVDragList::dragObject ()
return 0L;
}
-bool KSVDragList::acceptDrag (QDropEvent* e) const
+bool KSVDragList::acceptDrag (TQDropEvent* e) const
{
e->acceptAction ();
return acceptDrops() && e->provides ("application/x-ksysv");
}
-void KSVDragList::focusInEvent (QFocusEvent* e)
+void KSVDragList::focusInEvent (TQFocusEvent* e)
{
KListView::focusInEvent(e);
@@ -575,7 +575,7 @@ bool KSVDragList::removeFromRMList (const KSVData& item)
{
KSVData* res = 0L;
- for (QPtrListIterator<KSVData> it (mRMList);
+ for (TQPtrListIterator<KSVData> it (mRMList);
it.current();
++it)
{
@@ -666,15 +666,15 @@ bool KSVDragList::insert (const KSVData& data, const KSVItem* where, KSVAction*&
return success;
}
-void KSVDragList::drop (QDropEvent* e, QListViewItem* after)
+void KSVDragList::drop (TQDropEvent* e, TQListViewItem* after)
{
KSVData data;
KSVDragList* source = static_cast<KSVDragList*> (e->source());
- QPopupMenu* menu = 0L;
+ TQPopupMenu* menu = 0L;
// hack to empty the cursor stack after DND
- QApplication::restoreOverrideCursor();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if ((!source) || (!strcmp(source->name(), "Scripts")))
menu = mDragCopyMenu;
@@ -687,10 +687,10 @@ void KSVDragList::drop (QDropEvent* e, QListViewItem* after)
{
int res = -1;
- if (e->action() == QDropEvent::Copy && source != this)
+ if (e->action() == TQDropEvent::Copy && source != this)
res = Copy;
else
- res = menu->exec (QCursor::pos(), 1);
+ res = menu->exec (TQCursor::pos(), 1);
if (res == -1) // operation cancelled
return;
@@ -720,7 +720,7 @@ bool KSVDragList::addToRMList (const KSVData& item)
{
KSVData* res = 0L;
- for (QPtrListIterator<KSVData> it (mRMList);
+ for (TQPtrListIterator<KSVData> it (mRMList);
it.current();
++it)
{
@@ -753,7 +753,7 @@ void KSVDragList::setEnabled (bool enable)
if (testWState (WState_Disabled))
{
clearWState (WState_Disabled);
- // setBackgroundFromMode(); // this is private in QWidget...
+ // setBackgroundFromMode(); // this is private in TQWidget...
// well it doesn't really matter in this case
enabledChange( TRUE );
}
@@ -765,7 +765,7 @@ void KSVDragList::setEnabled (bool enable)
if (focusWidget() == this)
focusNextPrevChild (TRUE);
setWState (WState_Disabled);
- // setBackgroundFromMode(); // this is private in QWidget...
+ // setBackgroundFromMode(); // this is private in TQWidget...
// well it doesn't really matter in this case
enabledChange (FALSE);
}
@@ -776,7 +776,7 @@ void KSVDragList::setEnabled (bool enable)
// KServiceDragList
-KServiceDragList::KServiceDragList (QWidget* parent, const char* name)
+KServiceDragList::KServiceDragList (TQWidget* parent, const char* name)
: KSVDragList (parent, name)
{
}
diff --git a/ksysv/ksvdraglist.h b/ksysv/ksvdraglist.h
index f5474b8..dfc9285 100644
--- a/ksysv/ksvdraglist.h
+++ b/ksysv/ksvdraglist.h
@@ -34,9 +34,9 @@
#ifndef KSVDRAGLIST_H
#define KSVDRAGLIST_H
-#include <qstring.h>
-#include <qcolor.h>
-#include <qpixmap.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqpixmap.h>
#include <klistview.h>
@@ -67,10 +67,10 @@ public:
KSVItem (KListView*);
KSVItem (const KSVItem&);
explicit KSVItem (KSVDragList*, const KSVData&);
- KSVItem (KListView* view, QString file, QString path, QString label, Q_INT8 nr );
+ KSVItem (KListView* view, TQString file, TQString path, TQString label, Q_INT8 nr );
virtual ~KSVItem ();
- virtual QString key (int col, bool ascending) const;
+ virtual TQString key (int col, bool ascending) const;
inline bool isChanged() const { return mData->changed(); }
@@ -78,15 +78,15 @@ public:
inline bool isLabelChanged() const { return mData->labelChanged(); }
inline bool isNew() const { return mData->newEntry(); }
- inline const QString& oldFilename() const { return mData->oldFilename(); }
- inline const QString& filename() const { return mData->filename(); }
- inline const QString& oldLabel() const { return mData->oldLabel(); }
- inline const QString& label() const { return mData->label(); }
- inline const QString& runlevel() const { return mData->runlevel(); }
+ inline const TQString& oldFilename() const { return mData->oldFilename(); }
+ inline const TQString& filename() const { return mData->filename(); }
+ inline const TQString& oldLabel() const { return mData->oldLabel(); }
+ inline const TQString& label() const { return mData->label(); }
+ inline const TQString& runlevel() const { return mData->runlevel(); }
- inline QString filenameAndPath() const { return mData->filenameAndPath (); }
+ inline TQString filenameAndPath() const { return mData->filenameAndPath (); }
- inline const QString& path() const { return mData->path(); }
+ inline const TQString& path() const { return mData->path(); }
inline Q_INT8 number() const { return mData->number(); }
inline Q_INT8 oldNumber() const { return mData->oldNumber(); }
@@ -96,46 +96,46 @@ public:
KSVData* data () { return mData; }
const KSVData* data () const { return mData; }
- QString toString () const;
+ TQString toString () const;
inline bool operator== (const KSVItem & rhs) const { return mData == rhs.mData; }
- inline const QColor& newNormalColor () const
+ inline const TQColor& newNormalColor () const
{
return mNewNormalColor;
}
- inline const QColor& changedNormalColor () const
+ inline const TQColor& changedNormalColor () const
{
return mChangedNormalColor;
}
- inline QString originalRunlevel() const { return mData->originalRunlevel(); }
+ inline TQString originalRunlevel() const { return mData->originalRunlevel(); }
- void setIcon (const QPixmap& icon);
- void setLabel (const QString& label);
- void setFilename (const QString& file);
- void setRunlevel (const QString& runlevel);
+ void setIcon (const TQPixmap& icon);
+ void setLabel (const TQString& label);
+ void setFilename (const TQString& file);
+ void setRunlevel (const TQString& runlevel);
void setNumber (Q_INT8 nr);
- void setPath (const QString& path);
+ void setPath (const TQString& path);
void setChanged (bool);
- void setNewNormalColor (const QColor&);
- void setChangedNormalColor (const QColor&);
- void setNewSelectedColor (const QColor&);
- void setChangedSelectedColor (const QColor&);
+ void setNewNormalColor (const TQColor&);
+ void setChangedNormalColor (const TQColor&);
+ void setNewSelectedColor (const TQColor&);
+ void setChangedSelectedColor (const TQColor&);
void setNew (bool);
- void setOriginalRunlevel (const QString&);
+ void setOriginalRunlevel (const TQString&);
inline void setNumberChanged (bool val) { mData->setNumberChanged (val); }
- QString tooltip () const;
- virtual void paintCell (QPainter* p, const QColorGroup& cg, int column, int width, int align);
+ TQString tooltip () const;
+ virtual void paintCell (TQPainter* p, const TQColorGroup& cg, int column, int width, int align);
protected:
friend class KSVDragList;
friend class KServiceDragList;
- QPixmap paintDragIcon (const QFont& f, const QColorGroup& g) const;
+ TQPixmap paintDragIcon (const TQFont& f, const TQColorGroup& g) const;
private:
friend class KSVDrag;
@@ -143,10 +143,10 @@ private:
KSVData* mData;
KSVConfig* mConfig;
- QColor mNewNormalColor;
- QColor mNewSelectedColor;
- QColor mChangedNormalColor;
- QColor mChangedSelectedColor;
+ TQColor mNewNormalColor;
+ TQColor mNewSelectedColor;
+ TQColor mChangedNormalColor;
+ TQColor mChangedSelectedColor;
};
class KSVDragList : public KListView
@@ -154,7 +154,7 @@ class KSVDragList : public KListView
Q_OBJECT
public:
- KSVDragList ( QWidget* parent = 0, const char* name = 0 );
+ KSVDragList ( TQWidget* parent = 0, const char* name = 0 );
virtual ~KSVDragList();
virtual void clear();
@@ -162,12 +162,12 @@ public:
inline bool displayToolTips () const { return mDisplayToolTips; }
inline bool commonToolTips () const { return mCommonToolTips; }
- inline const QString& tooltip () const { return mToolTip; }
- inline const QString& horizontalScrollBarTip () const { return mHorizontalTip; }
- inline const QString& verticalScrollBarTip () const { return mVerticalTip; }
+ inline const TQString& tooltip () const { return mToolTip; }
+ inline const TQString& horizontalScrollBarTip () const { return mHorizontalTip; }
+ inline const TQString& verticalScrollBarTip () const { return mVerticalTip; }
- virtual void initItem (QString file, QString path, QString name, Q_INT8 nr);
- QPtrList<KSVData>& getDeletedItems() { return mRMList; }
+ virtual void initItem (TQString file, TQString path, TQString name, Q_INT8 nr);
+ TQPtrList<KSVData>& getDeletedItems() { return mRMList; }
/**
* @return whether this is the currently "selected" KSVDragList.
@@ -185,7 +185,7 @@ public:
bool insert (const KSVData& data, const KSVItem* where, KSVAction*& action);
- inline const QPixmap& defaultIcon() const { return mIcon; }
+ inline const TQPixmap& defaultIcon() const { return mIcon; }
bool removeFromRMList (const KSVData&);
bool addToRMList (const KSVData&);
@@ -195,29 +195,29 @@ public:
inline void setDisplayToolTips (bool val) { mDisplayToolTips = val; }
inline void setCommonToolTips (bool val) { mCommonToolTips = val; }
- inline void setHorizontalScrollBarTip (const QString& t) { mHorizontalTip = t; }
- inline void setVerticalScrollBarTip (const QString& t) { mVerticalTip = t; }
- inline void setToolTip (const QString& t) { mToolTip = t; }
+ inline void setHorizontalScrollBarTip (const TQString& t) { mHorizontalTip = t; }
+ inline void setVerticalScrollBarTip (const TQString& t) { mVerticalTip = t; }
+ inline void setToolTip (const TQString& t) { mToolTip = t; }
public slots:
- void setNewNormalColor (const QColor &);
- void setChangedNormalColor (const QColor &);
- void setNewSelectedColor (const QColor &);
- void setChangedSelectedColor (const QColor &);
+ void setNewNormalColor (const TQColor &);
+ void setChangedNormalColor (const TQColor &);
+ void setNewSelectedColor (const TQColor &);
+ void setChangedSelectedColor (const TQColor &);
void setOrigin (bool);
inline void slotNewOrigin() { setOrigin (false); }
- void setDefaultIcon (const QPixmap& icon);
+ void setDefaultIcon (const TQPixmap& icon);
- void drop (QDropEvent*, QListViewItem*);
+ void drop (TQDropEvent*, TQListViewItem*);
virtual void setEnabled (bool);
protected:
- virtual void focusInEvent (QFocusEvent*);
- virtual bool acceptDrag (QDropEvent*) const;
- virtual QDragObject* dragObject ();
+ virtual void focusInEvent (TQFocusEvent*);
+ virtual bool acceptDrag (TQDropEvent*) const;
+ virtual TQDragObject* dragObject ();
// virtual KSVDrag* dragObject ();
virtual void startDrag ();
@@ -232,20 +232,20 @@ protected:
/**
* A convenience function that also takes the label into account
*/
- Q_INT8 generateNumber (const QString& label, const KSVData* itemAbove, const KSVData* itemBelow) const;
+ Q_INT8 generateNumber (const TQString& label, const KSVData* itemAbove, const KSVData* itemBelow) const;
KSVItem* mItemToDrag;
private:
- QPixmap mIcon;
+ TQPixmap mIcon;
bool mOrigin;
- QPtrList<KSVData> mRMList;
+ TQPtrList<KSVData> mRMList;
- QColor mNewNormalColor;
- QColor mNewSelectedColor;
- QColor mChangedNormalColor;
- QColor mChangedSelectedColor;
+ TQColor mNewNormalColor;
+ TQColor mNewSelectedColor;
+ TQColor mChangedNormalColor;
+ TQColor mChangedSelectedColor;
KPopupMenu* mDragMenu;
KPopupMenu* mDragCopyMenu;
@@ -253,7 +253,7 @@ private:
KDLToolTip* toolTip;
typedef enum { Copy, Move } DragAction;
- QString mToolTip, mHorizontalTip, mVerticalTip;
+ TQString mToolTip, mHorizontalTip, mVerticalTip;
bool mDisplayToolTips, mCommonToolTips;
signals:
@@ -267,7 +267,7 @@ signals:
class KServiceDragList : public KSVDragList
{
public:
- KServiceDragList (QWidget* parent = 0L, const char* name = 0L);
+ KServiceDragList (TQWidget* parent = 0L, const char* name = 0L);
virtual ~KServiceDragList ();
protected:
diff --git a/ksysv/ksvlookandfeel.cpp b/ksysv/ksvlookandfeel.cpp
index 29e4de5..0e0fa58 100644
--- a/ksysv/ksvlookandfeel.cpp
+++ b/ksysv/ksvlookandfeel.cpp
@@ -25,8 +25,8 @@
*/
#include "ksvlookandfeel.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdialog.h>
#include <kfontdialog.h>
@@ -35,7 +35,7 @@
* Constructs a KSVLookAndFeel which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-KSVLookAndFeel::KSVLookAndFeel( QWidget* parent, const char* name, WFlags fl )
+KSVLookAndFeel::KSVLookAndFeel( TQWidget* parent, const char* name, WFlags fl )
: LookAndFeel( parent, name, fl )
{
mTopLayout->setSpacing (KDialog::spacingHint());
@@ -70,18 +70,18 @@ void KSVLookAndFeel::chooseServiceFont()
emit configChanged();
}
-void KSVLookAndFeel::setServiceFont (const QFont& font)
+void KSVLookAndFeel::setServiceFont (const TQFont& font)
{
mServiceFontPreview->setFont(font);
- mServiceFontPreview->setText(font.family() + " " + QString::number(font.pointSize()));
+ mServiceFontPreview->setText(font.family() + " " + TQString::number(font.pointSize()));
mServiceFont = font;
}
-void KSVLookAndFeel::setNumberFont (const QFont& font)
+void KSVLookAndFeel::setNumberFont (const TQFont& font)
{
mNumberFontPreview->setFont(font);
- mNumberFontPreview->setText(font.family() + " " + QString::number(font.pointSize()));
+ mNumberFontPreview->setText(font.family() + " " + TQString::number(font.pointSize()));
mNumberFont = font;
}
diff --git a/ksysv/ksvlookandfeel.h b/ksysv/ksvlookandfeel.h
index 5e59a91..7f825cf 100644
--- a/ksysv/ksvlookandfeel.h
+++ b/ksysv/ksvlookandfeel.h
@@ -8,20 +8,20 @@
#define KSVLOOKANDFEEL_H
#include "lookandfeelconfig.h"
-#include <qfont.h>
+#include <tqfont.h>
class KSVLookAndFeel : public LookAndFeel
{
Q_OBJECT
public:
- KSVLookAndFeel( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ KSVLookAndFeel( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~KSVLookAndFeel();
- inline const QFont& serviceFont() const { return mServiceFont; }
- inline const QFont& numberFont() const { return mNumberFont; }
+ inline const TQFont& serviceFont() const { return mServiceFont; }
+ inline const TQFont& numberFont() const { return mNumberFont; }
- void setServiceFont (const QFont& font);
- void setNumberFont (const QFont& font);
+ void setServiceFont (const TQFont& font);
+ void setNumberFont (const TQFont& font);
signals:
void configChanged();
@@ -32,8 +32,8 @@ protected slots:
void slotChanged();
private:
- QFont mServiceFont;
- QFont mNumberFont;
+ TQFont mServiceFont;
+ TQFont mNumberFont;
};
#endif // KSVLOOKANDFEEL_H
diff --git a/ksysv/ksvmiscconfig.cpp b/ksysv/ksvmiscconfig.cpp
index 05e9126..a3c27ac 100644
--- a/ksysv/ksvmiscconfig.cpp
+++ b/ksysv/ksvmiscconfig.cpp
@@ -25,8 +25,8 @@
*/
#include "ksvmiscconfig.h"
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include <kdialog.h>
@@ -34,7 +34,7 @@
* Constructs a KSVMiscConfig which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-KSVMiscConfig::KSVMiscConfig( QWidget* parent, const char* name, WFlags fl )
+KSVMiscConfig::KSVMiscConfig( TQWidget* parent, const char* name, WFlags fl )
: MiscConfiguration( parent, name, fl )
{
mSpacer->setFixedHeight (KDialog::spacingHint());
diff --git a/ksysv/ksvmiscconfig.h b/ksysv/ksvmiscconfig.h
index 8195d00..cf332e1 100644
--- a/ksysv/ksvmiscconfig.h
+++ b/ksysv/ksvmiscconfig.h
@@ -32,7 +32,7 @@ class KSVMiscConfig : public MiscConfiguration
Q_OBJECT
public:
- KSVMiscConfig( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ KSVMiscConfig( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~KSVMiscConfig();
signals:
diff --git a/ksysv/ksvpathconfig.cpp b/ksysv/ksvpathconfig.cpp
index bf7be35..cba5b77 100644
--- a/ksysv/ksvpathconfig.cpp
+++ b/ksysv/ksvpathconfig.cpp
@@ -32,7 +32,7 @@
* Constructs a KSVPathConfig which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-KSVPathConfig::KSVPathConfig( QWidget* parent, const char* name, WFlags fl )
+KSVPathConfig::KSVPathConfig( TQWidget* parent, const char* name, WFlags fl )
: PathConfiguration( parent, name, fl )
{
mSpacer->setFixedHeight (KDialog::spacingHint());
@@ -48,7 +48,7 @@ KSVPathConfig::~KSVPathConfig()
void KSVPathConfig::browseServices()
{
- QString path = KFileDialog::getExistingDirectory(mServicesPath->text(), this);
+ TQString path = KFileDialog::getExistingDirectory(mServicesPath->text(), this);
if (!path.isEmpty())
mServicesPath->setText(path);
@@ -58,7 +58,7 @@ void KSVPathConfig::browseServices()
void KSVPathConfig::browseRunlevels()
{
- QString path = KFileDialog::getExistingDirectory(mRunlevelPath->text(), this);
+ TQString path = KFileDialog::getExistingDirectory(mRunlevelPath->text(), this);
if (!path.isEmpty())
mRunlevelPath->setText(path);
diff --git a/ksysv/ksvpathconfig.h b/ksysv/ksvpathconfig.h
index 8cced64..fe73e56 100644
--- a/ksysv/ksvpathconfig.h
+++ b/ksysv/ksvpathconfig.h
@@ -32,7 +32,7 @@ class KSVPathConfig : public PathConfiguration
Q_OBJECT
public:
- KSVPathConfig( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ KSVPathConfig( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~KSVPathConfig();
signals:
diff --git a/ksysv/trash.cpp b/ksysv/trash.cpp
index 8420687..aab746c 100644
--- a/ksysv/trash.cpp
+++ b/ksysv/trash.cpp
@@ -14,9 +14,9 @@
// Trash Can
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qpainter.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
#include <kapplication.h>
#include <kiconloader.h>
@@ -29,23 +29,23 @@
#include "ActionList.h"
#include "trash.h"
-KSVTrash::KSVTrash (QWidget* parent, const char* name)
- : QFrame (parent, name),
+KSVTrash::KSVTrash (TQWidget* parent, const char* name)
+ : TQFrame (parent, name),
mKIL (KGlobal::iconLoader()),
- mLabel (new QLabel(this)),
+ mLabel (new TQLabel(this)),
mOpen (false)
{
setLineWidth(1);
setMidLineWidth(0);
- setFrameStyle (QFrame::StyledPanel | QFrame::Sunken);
+ setFrameStyle (TQFrame::StyledPanel | TQFrame::Sunken);
mLabel->setPixmap(mKIL->loadIcon("trashcan_empty", KIcon::Desktop));
mPixmapWidth = mLabel->pixmap()->width();
mLabel->setGeometry(5, 7, mPixmapWidth, mPixmapWidth);
- QToolTip::add(mLabel, i18n("Drag here to remove services"));
- QToolTip::add(this, i18n("Drag here to remove services"));
+ TQToolTip::add(mLabel, i18n("Drag here to remove services"));
+ TQToolTip::add(this, i18n("Drag here to remove services"));
setMinimumSize(sizeHint());
setAcceptDrops(true);
@@ -58,7 +58,7 @@ KSVTrash::~KSVTrash()
{
}
-void KSVTrash::dropEvent (QDropEvent* e)
+void KSVTrash::dropEvent (TQDropEvent* e)
{
KSVData data;
KSVDragList* list = static_cast<KSVDragList*> (e->source());
@@ -80,12 +80,12 @@ void KSVTrash::dropEvent (QDropEvent* e)
}
}
-void KSVTrash::dragMoveEvent ( QDragMoveEvent* e )
+void KSVTrash::dragMoveEvent ( TQDragMoveEvent* e )
{
if (e->provides ("application/x-ksysv") &&
e->source() && strcmp (e->source()->name(), "Scripts"))
{
- QPainter p;
+ TQPainter p;
p.begin(mLabel);
p.drawPixmap( 0, 0, mKIL->loadIcon("trashcan_full", KIcon::Desktop) );
@@ -98,7 +98,7 @@ void KSVTrash::dragMoveEvent ( QDragMoveEvent* e )
e->ignore();
}
-void KSVTrash::dragLeaveEvent ( QDragLeaveEvent* )
+void KSVTrash::dragLeaveEvent ( TQDragLeaveEvent* )
{
if (mOpen)
{
@@ -107,22 +107,22 @@ void KSVTrash::dragLeaveEvent ( QDragLeaveEvent* )
}
}
-bool KSVTrash::eventFilter( QObject *, QEvent *e )
+bool KSVTrash::eventFilter( TQObject *, TQEvent *e )
{
switch (e->type())
{
- case QEvent::DragMove:
- dragMoveEvent ( static_cast<QDragMoveEvent*> (e) );
+ case TQEvent::DragMove:
+ dragMoveEvent ( static_cast<TQDragMoveEvent*> (e) );
return true;
break;
- case QEvent::DragLeave:
- dragLeaveEvent ( static_cast<QDragLeaveEvent*> (e) );
+ case TQEvent::DragLeave:
+ dragLeaveEvent ( static_cast<TQDragLeaveEvent*> (e) );
return true;
break;
- case QEvent::Drop:
- dropEvent ( static_cast<QDropEvent*> (e) );
+ case TQEvent::Drop:
+ dropEvent ( static_cast<TQDropEvent*> (e) );
return true;
break;
@@ -131,9 +131,9 @@ bool KSVTrash::eventFilter( QObject *, QEvent *e )
}
}
-QSize KSVTrash::sizeHint() const
+TQSize KSVTrash::sizeHint() const
{
- static QSize size = QSize (mPixmapWidth + 2 * 5, mPixmapWidth + 2 * 7);
+ static TQSize size = TQSize (mPixmapWidth + 2 * 5, mPixmapWidth + 2 * 7);
return size;
}
diff --git a/ksysv/trash.h b/ksysv/trash.h
index 7772d19..40925e0 100644
--- a/ksysv/trash.h
+++ b/ksysv/trash.h
@@ -15,9 +15,9 @@
#ifndef KSV_TRASH_H
#define KSV_TRASH_H
-#include <qframe.h>
-#include <qpixmap.h>
-#include <qstring.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
// forward declarations
class QLabel;
@@ -30,32 +30,32 @@ class KSVTrash : public QFrame
Q_OBJECT
public:
- KSVTrash (QWidget* parent = 0, const char* name = 0);
+ KSVTrash (TQWidget* parent = 0, const char* name = 0);
virtual ~KSVTrash();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
protected:
/**
* Overridden from @ref QDropSite
*/
- virtual void dragMoveEvent ( QDragMoveEvent* );
+ virtual void dragMoveEvent ( TQDragMoveEvent* );
/**
* Overridden from @ref QDropSite
*/
- virtual void dragLeaveEvent ( QDragLeaveEvent* );
+ virtual void dragLeaveEvent ( TQDragLeaveEvent* );
/**
* Overridden from @ref QDropSite
*/
- virtual void dropEvent ( QDropEvent* );
+ virtual void dropEvent ( TQDropEvent* );
- virtual bool eventFilter ( QObject*, QEvent* );
+ virtual bool eventFilter ( TQObject*, TQEvent* );
private:
KIconLoader* mKIL;
- QLabel* mLabel;
+ TQLabel* mLabel;
bool mOpen;
int mPixmapWidth;