From b09bffed6b43262948018dfb0f11890850ddf7c1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 18 Jun 2011 20:34:22 +0000 Subject: TQt4 port kdeadmin This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1237416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksysv/ActionList.cpp | 4 +- ksysv/ActionList.h | 3 +- ksysv/Data.cpp | 4 +- ksysv/Data.h | 12 ++--- ksysv/IOCore.cpp | 64 +++++++++++++-------------- ksysv/OldView.cpp | 96 ++++++++++++++++++++-------------------- ksysv/OldView.h | 7 +-- ksysv/PreferencesDialog.cpp | 14 +++--- ksysv/PreferencesDialog.h | 3 +- ksysv/Properties.cpp | 14 +++--- ksysv/Properties.h | 8 +++- ksysv/RunlevelAuthIcon.cpp | 10 ++--- ksysv/RunlevelAuthIcon.h | 5 ++- ksysv/ServiceDlg.cpp | 10 ++--- ksysv/ServiceDlg.h | 3 +- ksysv/SpinBox.cpp | 6 +-- ksysv/SpinBox.h | 3 +- ksysv/TopWidget.cpp | 104 ++++++++++++++++++++++---------------------- ksysv/TopWidget.h | 1 + ksysv/configwizard.ui | 80 +++++++++++++++++----------------- ksysv/kdltooltip.cpp | 22 +++++----- ksysv/kdltooltip.h | 4 +- ksysv/kscroller.cpp | 26 +++++------ ksysv/kscroller.h | 13 +++--- ksysv/ksv_conf.cpp | 16 +++---- ksysv/ksv_core.cpp | 8 ++-- ksysv/ksvapplication.h | 1 + ksysv/ksvconfigwizard.cpp | 8 ++-- ksysv/ksvconfigwizard.h | 3 +- ksysv/ksvdrag.cpp | 4 +- ksysv/ksvdrag.h | 5 ++- ksysv/ksvdraglist.cpp | 52 +++++++++++----------- ksysv/ksvdraglist.h | 21 ++++----- ksysv/ksvlookandfeel.cpp | 8 ++-- ksysv/ksvlookandfeel.h | 3 +- ksysv/ksvmiscconfig.cpp | 8 ++-- ksysv/ksvmiscconfig.h | 3 +- ksysv/ksvpathconfig.cpp | 8 ++-- ksysv/ksvpathconfig.h | 3 +- ksysv/lookandfeelconfig.ui | 70 ++++++++++++++--------------- ksysv/main.cpp | 4 +- ksysv/miscconfig.ui | 36 +++++++-------- ksysv/pathconfig.ui | 42 +++++++++--------- ksysv/trash.cpp | 12 ++--- ksysv/trash.h | 13 +++--- 45 files changed, 432 insertions(+), 412 deletions(-) (limited to 'ksysv') diff --git a/ksysv/ActionList.cpp b/ksysv/ActionList.cpp index 21caa93..a5eba09 100644 --- a/ksysv/ActionList.cpp +++ b/ksysv/ActionList.cpp @@ -147,8 +147,8 @@ void CompoundAction::undo() // ActionList // ////////////////////////////////// -ActionList::ActionList (TQObject* parent, const char* name) - : TQObject(parent, name) +ActionList::ActionList (TQObject* tqparent, const char* name) + : TQObject(tqparent, name) { setAutoDelete(false); } diff --git a/ksysv/ActionList.h b/ksysv/ActionList.h index 5f5a047..2b4549e 100644 --- a/ksysv/ActionList.h +++ b/ksysv/ActionList.h @@ -106,9 +106,10 @@ private: class ActionList : public TQObject, private TQPtrStack { Q_OBJECT + TQ_OBJECT public: - ActionList (TQObject* parent, const char* name); + ActionList (TQObject* tqparent, const char* name); virtual ~ActionList (); KSVAction* top () const { return TQPtrStack::top(); } diff --git a/ksysv/Data.cpp b/ksysv/Data.cpp index 5b8221c..dd5ecba 100644 --- a/ksysv/Data.cpp +++ b/ksysv/Data.cpp @@ -12,7 +12,7 @@ KSVData::KSVData () } KSVData::KSVData (const TQString& file, const TQString& path, - const TQString& label, Q_INT8 nr) + const TQString& label, TQ_INT8 nr) : mPath (path), mLabel (label), mFilename (file) { @@ -129,7 +129,7 @@ void KSVData::setRunlevel (const TQString& s) mRunlevel = s; } -void KSVData::setNumber (Q_INT8 nr) +void KSVData::setNumber (TQ_INT8 nr) { if (!mNrChanged && mNr != nr) { diff --git a/ksysv/Data.h b/ksysv/Data.h index a942b12..3ce788a 100644 --- a/ksysv/Data.h +++ b/ksysv/Data.h @@ -9,7 +9,7 @@ class KSVData { public: KSVData (); - KSVData (const TQString& file, const TQString& path, const TQString& label, Q_INT8 nr); + KSVData (const TQString& file, const TQString& path, const TQString& label, TQ_INT8 nr); KSVData (const KSVData& rhs); inline ~KSVData () {} @@ -23,14 +23,14 @@ public: 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 TQ_INT8 number () const { return mNr; } inline const TQString& numberString () const { return mNumberString; } 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 TQ_INT8 oldNumber () const { return mOldNr; } inline bool numberChanged () const { return mNrChanged; } inline bool labelChanged () const { return mLabelChanged; } @@ -47,7 +47,7 @@ public: void setFilename (const TQString&); void setRunlevel (const TQString&); void setOriginalRunlevel (const TQString&); - void setNumber (Q_INT8 nr); + void setNumber (TQ_INT8 nr); void setChanged (bool); private: @@ -58,11 +58,11 @@ private: TQString mLabel; TQString mFilename; TQString mRunlevel; - Q_INT8 mNr; + TQ_INT8 mNr; TQString mOldLabel; TQString mOldFilename; TQString mOriginalRunlevel; - Q_INT8 mOldNr; + TQ_INT8 mOldNr; bool mNrChanged; bool mLabelChanged; diff --git a/ksysv/IOCore.cpp b/ksysv/IOCore.cpp index 434d051..3535317 100644 --- a/ksysv/IOCore.cpp +++ b/ksysv/IOCore.cpp @@ -49,23 +49,23 @@ void ksv::IO::removeFile (const TQFileInfo& info, TQDir& dir, TQString& rich, TQ if (!dir.remove(info.fileName(), FALSE)) { rich = (i18n ("FAILED to remove %1 from %2: \"%3\"
") - .arg(info.fileName()) - .arg(dir.path()) - .arg(strerror(errno))); + .tqarg(info.fileName()) + .tqarg(dir.path()) + .tqarg(strerror(errno))); plain = (i18n ("FAILED to remove %1 from %2: \"%3\"\n") - .arg(info.fileName()) - .arg(dir.path()) - .arg(strerror(errno))); + .tqarg(info.fileName()) + .tqarg(dir.path()) + .tqarg(strerror(errno))); } else { rich = i18n("removed %1 from %2
") - .arg(info.fileName()) - .arg(dir.path()); + .tqarg(info.fileName()) + .tqarg(dir.path()); plain = i18n("removed %1 from %2\n") - .arg(info.fileName()) - .arg(dir.path()); + .tqarg(info.fileName()) + .tqarg(dir.path()); } } @@ -80,8 +80,8 @@ void ksv::IO::dissectFilename (const TQString& file, TQString& base, int& nr) void ksv::IO::makeSymlink (const KSVData& data, int runlevel, bool start, TQString& rich, TQString& plain) { - 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 TQString symName = TQString("%1%2%3").tqarg(start ? "S" : "K").tqarg(data.numberString()).tqarg(data.label()); + const TQString symPath = TQString("%1/rc%2.d/").tqarg(KSVConfig::self()->runlevelPath()).tqarg(runlevel); const TQString symbol = symPath + symName; TQString target = data.filename(); @@ -92,27 +92,27 @@ void ksv::IO::makeSymlink (const KSVData& data, int runlevel, bool start, if (symlink(target.local8Bit(), symbol.local8Bit()) == 0) { - rich = i18n("created %1 in %2
").arg(symName).arg(symPath); - plain = i18n("created %1 in %2\n").arg(symName).arg(symPath); + rich = i18n("created %1 in %2
").tqarg(symName).tqarg(symPath); + plain = i18n("created %1 in %2\n").tqarg(symName).tqarg(symPath); } else { rich = i18n("FAILED to create %1 in %2: \"%3\"
") - .arg(symName) - .arg(symPath) - .arg(strerror(errno)); + .tqarg(symName) + .tqarg(symPath) + .tqarg(strerror(errno)); plain = i18n("FAILED to create %1 in %2: \"%3\"\n") - .arg(symName) - .arg(symPath) - .arg(strerror(errno)); + .tqarg(symName) + .tqarg(symPath) + .tqarg(strerror(errno)); } } TQString ksv::IO::makeRelativePath (const TQString& from, const TQString& to) { if (TQDir::isRelativePath(from) || TQDir::isRelativePath(to)) - return TQString::null; + return TQString(); int pos = 0; const int f_length = from.length(); @@ -121,7 +121,7 @@ TQString ksv::IO::makeRelativePath (const TQString& from, const TQString& to) while (pos > -1) { const int old = pos + 1; - const int res = from.find('/', old); + const int res = from.tqfind('/', old); int length = 0; @@ -143,7 +143,7 @@ TQString ksv::IO::makeRelativePath (const TQString& from, const TQString& to) while (pos > -1) { const int old = pos + 1; - const int res = to.find('/', old); + const int res = to.tqfind('/', old); int length = 0; @@ -184,7 +184,7 @@ bool ksv::IO::loadSavedConfiguration (TQDataStream& s, if (magic != "KSysV") return false; - Q_INT32 version = 0; + TQ_INT32 version = 0; s >> version; if (version != 3) @@ -201,13 +201,13 @@ bool ksv::IO::loadSavedConfiguration (TQDataStream& s, s >> rlMagic; s >> section; - if (rlMagic != TQString::fromLatin1("RUNLEVEL %1").arg(i)) + if (rlMagic != TQString::tqfromLatin1("RUNLEVEL %1").tqarg(i)) return false; if (section != "START") return false; - Q_INT32 numberOfItems; + TQ_INT32 numberOfItems; s >> numberOfItems; KSVData data; @@ -236,18 +236,18 @@ bool ksv::IO::saveConfiguration (TQDataStream& s, KSVDragList** start, KSVDragList** stop) { - Q_INT32 version = 3; + TQ_INT32 version = 3; s << TQCString("KSysV") << version - << TQDateTime::currentDateTime(); // save date + << TQDateTime::tqcurrentDateTime(); // save date for (int i = 0; i < ksv::runlevelNumber; ++i) { - Q_INT32 numberOfItems = start[i]->childCount(); + TQ_INT32 numberOfItems = start[i]->childCount(); - s << TQString::fromLatin1 ("RUNLEVEL %1").arg (i) - << TQString::fromLatin1 ("START") + s << TQString::tqfromLatin1 ("RUNLEVEL %1").arg (i) + << TQString::tqfromLatin1 ("START") << numberOfItems; for (TQListViewItemIterator it (start[i]); @@ -259,7 +259,7 @@ bool ksv::IO::saveConfiguration (TQDataStream& s, numberOfItems = stop[i]->childCount(); - s << TQString::fromLatin1 ("STOP") + s << TQString::tqfromLatin1 ("STOP") << numberOfItems; for (TQListViewItemIterator it (stop[i]); diff --git a/ksysv/OldView.cpp b/ksysv/OldView.cpp index 75572b9..b7a7617 100644 --- a/ksysv/OldView.cpp +++ b/ksysv/OldView.cpp @@ -72,8 +72,8 @@ #include "ActionList.h" #include "TopWidget.h" -KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const char* name) - : TQSplitter (TQSplitter::Vertical, parent, name), +KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* tqparent, const char* name) + : TQSplitter (Qt::Vertical, tqparent, name), startRL (new KSVDragList*[ksv::runlevelNumber]), stopRL (new KSVDragList*[ksv::runlevelNumber]), conf(KSVConfig::self()), @@ -84,12 +84,12 @@ KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const cha { setOpaqueResize( KGlobalSettings::opaqueResize() ); - KXMLGUIFactory* factory = parent->factory(); - mItemMenu = static_cast (factory->container ("item_menu", parent)); + KXMLGUIFactory* factory = tqparent->factory(); + mItemMenu = static_cast (factory->container ("item_menu", tqparent)); mItemMenu->insertTitle (i18n ("Runlevel Menu"), -1, 0); - mContextMenu = static_cast (factory->container ("list_menu", parent)); + mContextMenu = static_cast (factory->container ("list_menu", tqparent)); mContextMenu->insertTitle (i18n ("Runlevel Menu"), -1, 0); - mScriptMenu = static_cast (factory->container ("script_menu", parent)); + mScriptMenu = static_cast (factory->container ("script_menu", tqparent)); mScriptMenu->insertTitle (i18n ("Services Menu"), -1, 0); mScroller = new KScroller (this); @@ -175,7 +175,7 @@ void KSVContent::updateRunlevelsAfterChange () } // refresh GUI - qApp->processEvents(); + tqApp->processEvents(); scripts->setFocus(); @@ -251,9 +251,9 @@ void KSVContent::initLList() mRunlevels[i]->setSpacing (KDialog::spacingHint()); // create TQString for label - TQString _label (i18n("Runlevel &%1").arg(i)); + TQString _label (i18n("Runlevel &%1").tqarg(i)); // and for the name - TQString _name (i18n("Runlevel %1").arg(i)); + TQString _name (i18n("Runlevel %1").tqarg(i)); TQVBox* startBox = new TQVBox (mRunlevels[i]); TQWhatsThis::add (startBox, @@ -262,7 +262,7 @@ void KSVContent::initLList() "determines the order in which the services are started. " \ "You can arrange them via drag and drop, as long as a suitable " \ "sorting number can be generated.

If that's not possible, you have " \ - "to change the number manually via the Properties dialog box.

").arg(i)); + "to change the number manually via the Properties dialog box.

").tqarg(i)); TQLabel* rlL = new TQLabel(_label, startBox); new TQLabel(i18n("Start"), startBox); @@ -280,7 +280,7 @@ void KSVContent::initLList() "determines the order in which the services are stopped. " \ "You can arrange them via drag and drop, as long as a suitable " \ "sorting number can be generated.

If that's not possible, you have " \ - "to change the number manually via the Properties dialog box.

").arg(i)); + "to change the number manually via the Properties dialog box.

").tqarg(i)); // create the "STOP" list: stopRL[i] = new KSVDragList(stopBox, (_name + " STOP").latin1()); @@ -307,8 +307,8 @@ void KSVContent::initLList() this, TQT_SLOT(fwdUndoAction(KSVAction*))); // add text-diplay widget - textDisplay = new TQTextEdit( TQString::null, TQString::null, this, "TextDisplayWidget" ); - textDisplay->setTextFormat( Qt::RichText ); + textDisplay = new TQTextEdit( TQString(), TQString(), this, "TextDisplayWidget" ); + textDisplay->setTextFormat( TQt::RichText ); textDisplay->setReadOnly( true ); for (int i = 0; i < ksv::runlevelNumber; ++i) @@ -351,9 +351,9 @@ void KSVContent::initLList() // use this loop for setting tooltips startRL[i]->setToolTip (i18n("Drag here to start services\n" \ - "when entering runlevel %1").arg(i)); + "when entering runlevel %1").tqarg(i)); stopRL[i]->setToolTip (i18n("Drag here to stop services\n" \ - "when entering runlevel %1").arg(i)); + "when entering runlevel %1").tqarg(i)); for (int j = 0; j < ksv::runlevelNumber; ++j) { @@ -384,8 +384,8 @@ void KSVContent::initScripts() { scriptDir.setSorting (TQDir::Name); - // const QFileInfoList *scriptList = scriptDir.entryInfoList(); - QFileInfoListIterator it (*scriptDir.entryInfoList()); + // const TQFileInfoList *scriptList = scriptDir.entryInfoList(); + TQFileInfoListIterator it (*scriptDir.entryInfoList()); KCompletion* comp = ksv::serviceCompletion(); comp->clear (); @@ -407,7 +407,7 @@ void KSVContent::initScripts() { ++it; // keep GUI alive - qApp->processEvents(); + tqApp->processEvents(); } scripts->setEnabled(true); @@ -422,7 +422,7 @@ void KSVContent::initRunlevels() startRL[i]->clear(); stopRL[i]->clear(); - const TQString _path = conf->runlevelPath() + TQString("/rc%1.d").arg(i); + const TQString _path = conf->runlevelPath() + TQString("/rc%1.d").tqarg(i); if (!TQDir(_path).exists()) continue; @@ -431,8 +431,8 @@ void KSVContent::initRunlevels() d.setFilter( TQDir::Files ); d.setSorting( TQDir::Name ); - const QFileInfoList *rlList = d.entryInfoList(); - QFileInfoListIterator it( *rlList ); // create list iterator + const TQFileInfoList *rlList = d.entryInfoList(); + TQFileInfoListIterator it( *rlList ); // create list iterator TQFileInfo* fi; // pointer for traversing while ( (fi=it.current()) ) @@ -441,7 +441,7 @@ void KSVContent::initRunlevels() ++it; // goto next list element // keep GUI alive - qApp->processEvents(); + tqApp->processEvents(); } } } @@ -476,8 +476,8 @@ void KSVContent::slotWriteSysV() for (int i = 0; i < ksv::runlevelNumber; ++i) { - appendLog(i18n("RUNLEVEL %1").arg(i), - i18n("** RUNLEVEL %1 **").arg(i)); + appendLog(i18n("RUNLEVEL %1").tqarg(i), + i18n("** RUNLEVEL %1 **").tqarg(i)); clearRL(i); // rm changed/deleted entries @@ -512,7 +512,7 @@ void KSVContent::writeToDisk(const KSVData& _w, int _rl, bool _start) { appendLog(rich, plain); } -void KSVContent::repaintRunlevels () +void KSVContent::tqrepaintRunlevels () { for (int i = 0; i < ksv::runlevelNumber; ++i) { @@ -525,7 +525,7 @@ void KSVContent::repaintRunlevels () void KSVContent::clearRL(int _rl) { - TQString path = conf->runlevelPath() + TQString("/rc%1.d").arg(_rl); + TQString path = conf->runlevelPath() + TQString("/rc%1.d").tqarg(_rl); TQDir dir (path); @@ -539,7 +539,7 @@ void KSVContent::clearRL(int _rl) if (d->newEntry() && d->originalRunlevel() != startRL[_rl]->name()) break; - TQFileInfo file (path + TQString("/S%1%2").arg(d->numberString()).arg(d->label())); + TQFileInfo file (path + TQString("/S%1%2").tqarg(d->numberString()).tqarg(d->label())); TQString rich, plain; ksv::IO::removeFile (file, dir, rich, plain); @@ -547,7 +547,7 @@ void KSVContent::clearRL(int _rl) } // keep GUI alive - qApp->processEvents(); + tqApp->processEvents(); for (TQPtrListIterator it (stopRL[_rl]->getDeletedItems()); (d = it.current()); @@ -557,7 +557,7 @@ void KSVContent::clearRL(int _rl) if (d->newEntry() && d->originalRunlevel() != stopRL[_rl]->name()) break; - TQFileInfo file (path + TQString("/K%1%2").arg(d->numberString()).arg(d->label())); + TQFileInfo file (path + TQString("/K%1%2").tqarg(d->numberString()).tqarg(d->label())); TQString rich, plain; ksv::IO::removeFile (file, dir, rich, plain); @@ -565,7 +565,7 @@ void KSVContent::clearRL(int _rl) } // keep GUI alive - qApp->processEvents(); + tqApp->processEvents(); } void KSVContent::infoOnData (KSVItem* item) @@ -613,12 +613,12 @@ void KSVContent::stopService (const TQString& path) connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); // refresh textDisplay - appendLog(i18n("** Stopping %1 **
").arg(path), - i18n("** Stopping %1 **").arg(path)); + appendLog(i18n("** Stopping %1 **
").tqarg(path), + i18n("** Stopping %1 **").tqarg(path)); _proc->start(KProcess::NotifyOnExit, KProcess::AllOutput); - // notify parent + // notify tqparent emit sigRun(path + i18n(" stop")); } @@ -639,12 +639,12 @@ void KSVContent::startService (const TQString& path) connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); // refresh textDisplay - appendLog(i18n("** Starting %1 **
").arg(path), - i18n("** Starting %1 **").arg(path)); + appendLog(i18n("** Starting %1 **
").tqarg(path), + i18n("** Starting %1 **").tqarg(path)); _proc->start(KProcess::NotifyOnExit, KProcess::AllOutput); - // notify parent + // notify tqparent emit sigRun(path + i18n(" start")); } @@ -679,12 +679,12 @@ void KSVContent::restartService (const TQString& path) connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); // refresh textDisplay - appendLog(i18n("** Re-starting %1 **
").arg(path), - i18n("** Re-starting %1 **").arg(path)); + appendLog(i18n("** Re-starting %1 **
").tqarg(path), + i18n("** Re-starting %1 **").tqarg(path)); _proc->start(KProcess::NotifyOnExit, KProcess::AllOutput); - // notify parent + // notify tqparent emit sigRun(path + i18n(" restart")); } @@ -856,7 +856,7 @@ void KSVContent::pasteAppend() { KSVData data; - if (KSVDrag::decodeNative (kapp->clipboard()->data(), data)) + if (KSVDrag::decodeNative (kapp->tqclipboard()->data(), data)) { KSVAction* action = 0L; @@ -1059,25 +1059,25 @@ void KSVContent::openWith (int index) void KSVContent::calcMinSize () { // Cryptic code alert: Changing w or h will change mMinSize - QCOORD& w = mMinSize.rwidth(); - QCOORD& h = mMinSize.rheight(); + TQCOORD& w = mMinSize.rwidth(); + TQCOORD& h = mMinSize.rheight(); - w = 2 * KDialog::marginHint() + mScriptBox->sizeHint().width(); - h = 2 * KDialog::marginHint() + mScriptBox->sizeHint().height(); + w = 2 * KDialog::marginHint() + mScriptBox->tqsizeHint().width(); + h = 2 * KDialog::marginHint() + mScriptBox->tqsizeHint().height(); for (int i = 0; i < ksv::runlevelNumber; ++i) { if (mRunlevels[i]->isHidden()) continue; - w += KDialog::spacingHint() + mRunlevels[i]->sizeHint().width(); - h = kMax (h, mRunlevels[i]->sizeHint().height()); + w += KDialog::spacingHint() + mRunlevels[i]->tqsizeHint().width(); + h = kMax (h, mRunlevels[i]->tqsizeHint().height()); } - mContent->layout()->setEnabled(false); + mContent->tqlayout()->setEnabled(false); mContent->setMinimumSize(mMinSize); mScroller->updateScrollBars(); - mContent->layout()->setEnabled(true); + mContent->tqlayout()->setEnabled(true); } void KSVContent::mergeLoadedPackage (TQValueList* start, diff --git a/ksysv/OldView.h b/ksysv/OldView.h index e2e765c..b667839 100644 --- a/ksysv/OldView.h +++ b/ksysv/OldView.h @@ -44,12 +44,13 @@ class KSVItem; class KSVAction; class KSVTopLevel; -class KSVContent : public QSplitter +class KSVContent : public TQSplitter { Q_OBJECT + TQ_OBJECT public: - KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent = 0, const char* name = 0); + KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* tqparent = 0, const char* name = 0); ~KSVContent(); KSVDragList* getOrigin(); @@ -112,7 +113,7 @@ private slots: void updateServicesAfterChange (const TQString&); void updateRunlevelsAfterChange (); - void repaintRunlevels (); + void tqrepaintRunlevels (); void openWith (); void openWith (int index); diff --git a/ksysv/PreferencesDialog.cpp b/ksysv/PreferencesDialog.cpp index b2ad038..759fbd8 100644 --- a/ksysv/PreferencesDialog.cpp +++ b/ksysv/PreferencesDialog.cpp @@ -28,17 +28,17 @@ #include "PreferencesDialog.h" -KSVPreferences::KSVPreferences (TQWidget* parent) +KSVPreferences::KSVPreferences (TQWidget* tqparent) : KDialogBase (IconList, i18n("Configure"), Help|Ok|Apply|Cancel, Ok, - parent, "KSysV Preferences", true, true), + tqparent, "KSysV Preferences", true, true), mConfig (KSVConfig::self()) { - setMinimumSize (sizeHint ()); + setMinimumSize (tqsizeHint ()); /** * Look & Feel Page */ - TQFrame* lafPage = addPage (i18n ("Look & Feel"), TQString::null, DesktopIcon ("colorize", 32)); + TQFrame* lafPage = addPage (i18n ("Look & Feel"), TQString(), DesktopIcon ("colorize", 32)); mLookAndFeel = new KSVLookAndFeel (lafPage); connect( mLookAndFeel, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); @@ -48,7 +48,7 @@ KSVPreferences::KSVPreferences (TQWidget* parent) // /** // * Colors Page // */ -// TQFrame* colorPage = addPage (i18n("Colors"), TQString::null, DesktopIcon ("colorize", 32)); +// TQFrame* colorPage = addPage (i18n("Colors"), TQString(), DesktopIcon ("colorize", 32)); // mColorConfig = new KSVColorConfig(colorPage); // TQVBoxLayout* colorLayout = new TQVBoxLayout(colorPage); @@ -57,7 +57,7 @@ KSVPreferences::KSVPreferences (TQWidget* parent) // /** // * Fonts Page // */ -// TQFrame* fontPage = addPage (i18n("Fonts"), TQString::null, DesktopIcon ("fonts", 32)); +// TQFrame* fontPage = addPage (i18n("Fonts"), TQString(), DesktopIcon ("fonts", 32)); // mFontConfig = new KSVFontConfig(fontPage); // TQVBoxLayout* fontLayout = new TQVBoxLayout (fontPage); @@ -66,7 +66,7 @@ KSVPreferences::KSVPreferences (TQWidget* parent) /** * Paths Page */ - TQFrame* pathPage = addPage (i18n ("Paths"), TQString::null, DesktopIcon ("kfm", 32)); + TQFrame* pathPage = addPage (i18n ("Paths"), TQString(), DesktopIcon ("kfm", 32)); mPathConfig = new KSVPathConfig(pathPage); connect( mPathConfig, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); diff --git a/ksysv/PreferencesDialog.h b/ksysv/PreferencesDialog.h index a061331..7486911 100644 --- a/ksysv/PreferencesDialog.h +++ b/ksysv/PreferencesDialog.h @@ -17,6 +17,7 @@ class KSVConfig; class KSVPreferences : public KDialogBase { Q_OBJECT + TQ_OBJECT public: static KSVPreferences* self (); @@ -52,7 +53,7 @@ private slots: private: friend class KSVTopLevel; - KSVPreferences (TQWidget* parent); + KSVPreferences (TQWidget* tqparent); void setConfig (); bool checkPaths(); void reReadMessages(); diff --git a/ksysv/Properties.cpp b/ksysv/Properties.cpp index 62f4a65..bab4d44 100644 --- a/ksysv/Properties.cpp +++ b/ksysv/Properties.cpp @@ -21,9 +21,9 @@ #include "Data.h" #include "Properties.h" -KSVServicePropertiesDialog::KSVServicePropertiesDialog (KSVData& data, TQWidget* parent) +KSVServicePropertiesDialog::KSVServicePropertiesDialog (KSVData& data, TQWidget* tqparent) : KPropertiesDialog (KURL(data.filenameAndPath()), - parent, "KSVServicePropertiesDialog", true, false), + tqparent, "KSVServicePropertiesDialog", true, false), mData (data) { KSVServicesPage* page = new KSVServicesPage (data, this); @@ -48,13 +48,13 @@ KSVServicesPage::KSVServicesPage (KSVData& data, KPropertiesDialog* props) desc->setSpacing (1); TQLabel* label = new TQLabel(i18n("Description:"), desc); - label->setFixedHeight (label->sizeHint().height()); + label->setFixedHeight (label->tqsizeHint().height()); TQString text; ksv::getServiceDescription (data.filename(), text); - mDesc = new TQTextView (TQString("

%1

").arg (text), TQString::null, desc); + mDesc = new TQTextView (TQString("

%1

").arg (text), TQString(), desc); - TQButtonGroup* buttons = new TQButtonGroup (1, Vertical, i18n ("Actions"), mPage); + TQButtonGroup* buttons = new TQButtonGroup (1,Qt::Vertical, i18n ("Actions"), mPage); TQPushButton* b = new TQPushButton (i18n ("&Edit"), buttons); connect (b, TQT_SIGNAL (clicked()), props, TQT_SLOT (doEdit())); @@ -100,8 +100,8 @@ void KSVServicePropertiesDialog::doRestart () } -KSVEntryPropertiesDialog::KSVEntryPropertiesDialog (KSVData& data, TQWidget* parent) - : KPropertiesDialog (data.label(), parent, "KSVEntryPropertiesDialog", true), +KSVEntryPropertiesDialog::KSVEntryPropertiesDialog (KSVData& data, TQWidget* tqparent) + : KPropertiesDialog (data.label(), tqparent, "KSVEntryPropertiesDialog", true), mData (data) { KSVEntryPage* page1 = new KSVEntryPage (data, this); diff --git a/ksysv/Properties.h b/ksysv/Properties.h index 603cb98..b9d7a66 100644 --- a/ksysv/Properties.h +++ b/ksysv/Properties.h @@ -17,9 +17,10 @@ class KSVData; class KSVServicePropertiesDialog : public KPropertiesDialog { Q_OBJECT + TQ_OBJECT public: - KSVServicePropertiesDialog (KSVData& data, TQWidget* parent); + KSVServicePropertiesDialog (KSVData& data, TQWidget* tqparent); virtual ~KSVServicePropertiesDialog (); signals: @@ -42,9 +43,10 @@ private: class KSVEntryPropertiesDialog : public KPropertiesDialog { Q_OBJECT + TQ_OBJECT public: - KSVEntryPropertiesDialog (KSVData& data, TQWidget* parent); + KSVEntryPropertiesDialog (KSVData& data, TQWidget* tqparent); virtual ~KSVEntryPropertiesDialog (); signals: @@ -66,6 +68,7 @@ private: class KSVEntryPage : public KPropsDlgPlugin { Q_OBJECT + TQ_OBJECT public: KSVEntryPage (KSVData& data, KPropertiesDialog* props); @@ -91,6 +94,7 @@ private: class KSVServicesPage : public KPropsDlgPlugin { Q_OBJECT + TQ_OBJECT public: KSVServicesPage (KSVData& data, KPropertiesDialog* props); diff --git a/ksysv/RunlevelAuthIcon.cpp b/ksysv/RunlevelAuthIcon.cpp index bac5b30..391fe3f 100644 --- a/ksysv/RunlevelAuthIcon.cpp +++ b/ksysv/RunlevelAuthIcon.cpp @@ -15,8 +15,8 @@ #include RunlevelAuthIcon::RunlevelAuthIcon (const TQString& servicesPath, const TQString& runlevelPath, - TQWidget* parent, const char* name) - : KAuthIcon (parent, name), + TQWidget* tqparent, const char* name) + : KAuthIcon (tqparent, name), mTimer (new TQTimer (this)), mServicesInfo (new TQFileInfo (servicesPath)), mRLInfo (new TQFileInfo* [ksv::runlevelNumber]), @@ -37,14 +37,14 @@ RunlevelAuthIcon::RunlevelAuthIcon (const TQString& servicesPath, const TQString lockBox->setMargin (1); lockBox->setFrameStyle (TQFrame::NoFrame); - lockBox->setFixedSize (lockBox->sizeHint()); + lockBox->setFixedSize (lockBox->tqsizeHint()); connect (mTimer, TQT_SIGNAL (timeout()), this, TQT_SLOT (timerEvent())); mTimer->start (mInterval); for (int i = 0; i < ksv::runlevelNumber; ++i) { - mRLInfo[i] = new TQFileInfo ((runlevelPath + "/rc%1.d").arg(i)); + mRLInfo[i] = new TQFileInfo ((runlevelPath + "/rc%1.d").tqarg(i)); } updateStatus(); @@ -122,7 +122,7 @@ void RunlevelAuthIcon::setRunlevelPath (const TQString& path) for (int i = 0; i < ksv::runlevelNumber; ++i) { - mRLInfo[i]->setFile ((path + "/rc%1.d").arg(i)); + mRLInfo[i]->setFile ((path + "/rc%1.d").tqarg(i)); } mTimer->start(mInterval); diff --git a/ksysv/RunlevelAuthIcon.h b/ksysv/RunlevelAuthIcon.h index 172f6be..ff514a5 100644 --- a/ksysv/RunlevelAuthIcon.h +++ b/ksysv/RunlevelAuthIcon.h @@ -10,11 +10,12 @@ class TQFileInfo; class RunlevelAuthIcon : public KAuthIcon { Q_OBJECT - Q_PROPERTY (int refreshInterval READ refreshInterval WRITE setRefreshInterval) + TQ_OBJECT + TQ_PROPERTY (int refreshInterval READ refreshInterval WRITE setRefreshInterval) public: RunlevelAuthIcon (const TQString& scriptPath, const TQString& runlevelPath, - TQWidget* parent = 0L, const char* name = 0L); + TQWidget* tqparent = 0L, const char* name = 0L); virtual ~RunlevelAuthIcon (); diff --git a/ksysv/ServiceDlg.cpp b/ksysv/ServiceDlg.cpp index 4b7d4ef..aac5bca 100644 --- a/ksysv/ServiceDlg.cpp +++ b/ksysv/ServiceDlg.cpp @@ -25,11 +25,11 @@ #include "ksvdraglist.h" #include "ServiceDlg.h" -#define MIN_SIZE(A) A->setMinimumSize(A->sizeHint()) +#define MIN_SIZE(A) A->setMinimumSize(A->tqsizeHint()) ServiceDlg::ServiceDlg (const TQString& action, const TQString& label, - TQWidget* parent, const char* name) - : KDialogBase (parent, name, false, action, Apply|Close, Apply, true) + TQWidget* tqparent, const char* name) + : KDialogBase (tqparent, name, false, action, Apply|Close, Apply, true) { TQWidget* page = new TQWidget (this); @@ -40,14 +40,14 @@ ServiceDlg::ServiceDlg (const TQString& action, const TQString& label, MIN_SIZE(desc); desc->setBuddy(mServices); MIN_SIZE(mServices); - mServices->setMinimumWidth(mServices->minimumSize().width() * 2); + mServices->setMinimumWidth(mServices->tqminimumSize().width() * 2); TQBoxLayout* serv_layout = new TQHBoxLayout(); top->addLayout (serv_layout); serv_layout->addWidget(desc); serv_layout->addWidget(mServices); - setFixedSize (sizeHint()); + setFixedSize (tqsizeHint()); } ServiceDlg::~ServiceDlg() diff --git a/ksysv/ServiceDlg.h b/ksysv/ServiceDlg.h index 432a934..2cec43e 100644 --- a/ksysv/ServiceDlg.h +++ b/ksysv/ServiceDlg.h @@ -26,10 +26,11 @@ class TQComboBox; class ServiceDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: ServiceDlg (const TQString& action, const TQString& label, - TQWidget* parent = 0, const char* name = 0); + TQWidget* tqparent = 0, const char* name = 0); virtual ~ServiceDlg(); int count() const; diff --git a/ksysv/SpinBox.cpp b/ksysv/SpinBox.cpp index fd93954..fae199b 100644 --- a/ksysv/SpinBox.cpp +++ b/ksysv/SpinBox.cpp @@ -7,8 +7,8 @@ #include "ksv_core.h" #include "SpinBox.h" -KSVSpinBox::KSVSpinBox (TQWidget* parent, const char* name) - : TQSpinBox (0, 99, 1, parent, name), +KSVSpinBox::KSVSpinBox (TQWidget* tqparent, const char* name) + : TQSpinBox (0, 99, 1, tqparent, name), KCompletionBase (), mClearedSelection (false) { @@ -67,7 +67,7 @@ bool KSVSpinBox::eventFilter (TQObject* o, TQEvent* e) Q_UNUSED(o); if (e->type() == TQEvent::KeyPress) { - TQKeyEvent* ke = static_cast (e); + TQKeyEvent* ke = TQT_TQKEYEVENT(e); switch (ke->key()) { diff --git a/ksysv/SpinBox.h b/ksysv/SpinBox.h index c48f09e..ce679bb 100644 --- a/ksysv/SpinBox.h +++ b/ksysv/SpinBox.h @@ -10,9 +10,10 @@ class KSVSpinBox : public TQSpinBox, public KCompletionBase { Q_OBJECT + TQ_OBJECT public: - KSVSpinBox (TQWidget* parent, const char* name = 0L); + KSVSpinBox (TQWidget* tqparent, const char* name = 0L); virtual ~KSVSpinBox (); virtual bool eventFilter (TQObject*, TQEvent*); diff --git a/ksysv/TopWidget.cpp b/ksysv/TopWidget.cpp index 6b2e675..7f33abc 100644 --- a/ksysv/TopWidget.cpp +++ b/ksysv/TopWidget.cpp @@ -1,5 +1,5 @@ /* - Requires the Qt widget libraries, available at no cost at + Requires the TQt widget libraries, available at no cost at http://www.troll.no Copyright (C) 1997-2000 Peter Putzer @@ -87,12 +87,12 @@ #include #include -namespace Status +namespace tqStatus { enum { Changed, Checklist, Writable }; -} // namespace Status +} // namespace tqStatus KSVTopLevel::KSVTopLevel() : KMainWindow(0, 0L, WStyle_ContextHelp|WDestructiveClose), @@ -113,8 +113,8 @@ KSVTopLevel::KSVTopLevel() mOpenWith (0L), mOpenDefault (0L), - mUndoList (new ActionList (this, "UndoList")), - mRedoList (new ActionList (this, "RedoList")), + mUndoList (new ActionList (TQT_TQOBJECT(this), "UndoList")), + mRedoList (new ActionList (TQT_TQOBJECT(this), "RedoList")), mStartDlg (new ServiceDlg (i18n("Start Service"), i18n("&Choose which service to start:"), this)), @@ -211,18 +211,18 @@ void KSVTopLevel::initActions () KActionCollection* coll = actionCollection(); // setup File menu - mFileRevert = KStdAction::revert (this, TQT_SLOT (slotClearChanges()), coll); + mFileRevert = KStdAction::revert (TQT_TQOBJECT(this), TQT_SLOT (slotClearChanges()), coll); mFileRevert->setText (i18n("Re&vert Configuration")); - mFileLoad = KStdAction::open (this, TQT_SLOT (load()), coll); + mFileLoad = KStdAction::open (TQT_TQOBJECT(this), TQT_SLOT (load()), coll); mFileLoad->setText (i18n ("&Open...")); - mFileSave = KStdAction::save(this, TQT_SLOT(slotAcceptChanges()), coll); + mFileSave = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotAcceptChanges()), coll); mFileSave->setText (i18n("&Save Configuration")); - mFileSaveAs = KStdAction::saveAs (this, TQT_SLOT (saveAs ()), coll); + mFileSaveAs = KStdAction::saveAs (TQT_TQOBJECT(this), TQT_SLOT (saveAs ()), coll); - mFileSaveLog = KStdAction::save (this, TQT_SLOT(slotSaveLog()), coll, "ksysv_save_log"); + mFileSaveLog = KStdAction::save (TQT_TQOBJECT(this), TQT_SLOT(slotSaveLog()), coll, "ksysv_save_log"); mFileSaveLog->setText (i18n("Save &Log...")); mFileSaveLog->setShortcut (Key_L+CTRL); mFileSaveLog->setEnabled (false); @@ -230,29 +230,29 @@ void KSVTopLevel::initActions () // disabled due to complexity // mFilePrint = KStdAction::print (this, TQT_SLOT (print()), coll); - mFilePrintLog = KStdAction::print(this, TQT_SLOT(printLog()), coll, "ksysv_print_log"); + mFilePrintLog = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(printLog()), coll, "ksysv_print_log"); mFilePrintLog->setText( i18n("&Print Log...")); mFilePrintLog->setEnabled (false); - mFileQuit = KStdAction::quit(this, TQT_SLOT(close()), coll); + mFileQuit = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), coll); // setup Edit menu - mEditUndo = KStdAction::undo(this, TQT_SLOT(editUndo()), coll); + mEditUndo = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(editUndo()), coll); mEditUndo->setEnabled (false); - mEditRedo = KStdAction::redo(this, TQT_SLOT(editRedo()), coll); + mEditRedo = KStdAction::redo(TQT_TQOBJECT(this), TQT_SLOT(editRedo()), coll); mEditUndo->setEnabled (false); - 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()), + mEditCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(editCut()), coll); + mEditCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(editCopy()), coll); + mEditPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(editPaste()), coll); + mPasteAppend = KStdAction::paste (TQT_TQOBJECT(this), TQT_SLOT (pasteAppend()), coll, "ksysv_paste_append"); mEditProperties = new KAction (i18n("P&roperties"), 0, - this, TQT_SLOT(properties()), + TQT_TQOBJECT(this), TQT_SLOT(properties()), coll, "ksysv_properties"); mOpenDefault = new KAction (i18n ("&Open"), 0, - this, TQT_SLOT (editService()), + TQT_TQOBJECT(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, 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); + KStdAction::keyBindings (TQT_TQOBJECT(this), TQT_SLOT(configureKeys()), coll); + KStdAction::configureToolbars (TQT_TQOBJECT(this), TQT_SLOT(configureToolbars()), coll); + KStdAction::saveOptions(TQT_TQOBJECT(this), TQT_SLOT(saveOptions()), coll); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotShowConfig()), coll); mOptionsToggleLog = new KToggleAction (i18n("Show &Log"), "toggle_log", 0, - this, TQT_SLOT (toggleLog()), + TQT_TQOBJECT(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, TQT_SLOT (toggle()), + TQT_TQOBJECT(mStartDlg), TQT_SLOT (toggle()), coll, "ksysv_start_service"); mToolsStopService = new KToggleAction (i18n("&Stop Service..."), "ksysv_stop", 0, - mStopDlg, TQT_SLOT (toggle()), + TQT_TQOBJECT(mStopDlg), TQT_SLOT (toggle()), coll, "ksysv_stop_service"); mToolsRestartService = new KToggleAction (i18n("&Restart Service..."), 0, - mRestartDlg, TQT_SLOT (toggle()), + TQT_TQOBJECT(mRestartDlg), TQT_SLOT (toggle()), coll, "ksysv_restart_service"); mToolsEditService = new KToggleAction (i18n("&Edit Service..."), 0, - mEditDlg, TQT_SLOT (toggle()), + TQT_TQOBJECT(mEditDlg), TQT_SLOT (toggle()), coll, "ksysv_edit_service"); createGUI(xmlFile()); @@ -426,16 +426,16 @@ void KSVTopLevel::initStatusBar() "or ask your sysadmin to install %1 suid or " \ "sgid.

The latter way is not "\ "recommended though, due to security issues.

") - .arg (kapp->aboutData()->programName()).arg(kapp->aboutData()->programName())); + .tqarg (kapp->aboutData()->programName()).tqarg(kapp->aboutData()->programName())); - authIconBox->setMinimumSize (authIconBox->minimumSizeHint()); - visBox->setMinimumSize (visBox->minimumSizeHint()); + authIconBox->setMinimumSize (authIconBox->tqminimumSizeHint()); + visBox->setMinimumSize (visBox->tqminimumSizeHint()); status->addWidget (authIconBox, 0, false); - status->insertItem ("", Status::Changed, 100); + status->insertItem ("", tqStatus::Changed, 100); status->addWidget (visBox, 0, true); - status->setItemAlignment (Status::Changed, AlignLeft|AlignVCenter); + status->setItemAlignment (tqStatus::Changed, AlignLeft|AlignVCenter); } void KSVTopLevel::slotShowConfig() @@ -454,7 +454,7 @@ void KSVTopLevel::slotShowConfig() this, TQT_SLOT (updateRunlevelsPath ())); connect (mPreferences, TQT_SIGNAL (updateFonts ()), - mView, TQT_SLOT (repaintRunlevels ())); + mView, TQT_SLOT (tqrepaintRunlevels ())); } // mPreferences->setInitialSize (TQSize (400,300), true); @@ -499,7 +499,7 @@ void KSVTopLevel::saveOptions() void KSVTopLevel::slotUpdateRunning (const TQString& text) { - statusBar()->changeItem(text, Status::Changed); + statusBar()->changeItem(text, tqStatus::Changed); } void KSVTopLevel::editCut() { @@ -508,7 +508,7 @@ void KSVTopLevel::editCut() { if (list && list->currentItem()) { KSVDrag* mime = new KSVDrag (*list->currentItem()->data(), 0L, 0L); - kapp->clipboard()->setData (mime); + kapp->tqclipboard()->setData (mime); KSVData data = *list->currentItem()->data(); delete list->currentItem(); @@ -525,7 +525,7 @@ void KSVTopLevel::editCopy() if (list) { KSVDrag* mime = new KSVDrag (*static_cast (list->currentItem()), 0L, 0L); - kapp->clipboard()->setData (mime); + kapp->tqclipboard()->setData (mime); } } @@ -537,7 +537,7 @@ void KSVTopLevel::editPaste() { KSVData data; - if (KSVDrag::decodeNative (kapp->clipboard()->data(), data)) + if (KSVDrag::decodeNative (kapp->tqclipboard()->data(), data)) { KSVAction* action = 0L; @@ -563,7 +563,7 @@ void KSVTopLevel::setChanged (bool val) mFileSave->setEnabled (val); // update statusbar - statusBar()->changeItem(val ? i18n(" Changed") : TQString::null, Status::Changed); + statusBar()->changeItem(val ? i18n(" Changed") : TQString(), tqStatus::Changed); // clear messages statusBar()->clear(); @@ -651,7 +651,7 @@ void KSVTopLevel::print() // .arg (ksv::hostname())); // y += fm.lineSpacing(); -// p.drawText (10, y, TQDateTime::currentDateTime().toString()); +// p.drawText (10, y, TQDateTime::tqcurrentDateTime().toString()); // y += fm.lineSpacing() * 2; // an extra empty line // for (int i = 0; i < ksv::runlevelNumber; ++i) @@ -659,7 +659,7 @@ void KSVTopLevel::print() // p.setFont (TQFont("courier", 16, TQFont::Bold)); // TQFontMetrics fm = p.fontMetrics(); -// p.drawText (10, y, i18n ("Runlevel %1").arg(i)); +// p.drawText (10, y, i18n ("Runlevel %1").tqarg(i)); // y += fm.lineSpacing(); // checkPage @@ -725,7 +725,7 @@ void KSVTopLevel::print() // // if (line.isNull()) // // line = " "; -// // line.replace( TQRegExp("\t"), " " ); +// // line.tqreplace( TQRegExp("\t"), " " ); // // strncpy(buf,line.data(),160); @@ -766,22 +766,22 @@ void KSVTopLevel::printLog() { TQSimpleRichText rheading (i18n("

KDE Sys-V Init Editor Log

"), - TQFont("times"), TQString::null, ksv::styleSheet(), + TQFont("times"), TQString(), ksv::styleSheet(), TQMimeSourceFactory::defaultFactory()); rheading.setWidth (&p, width); int tmp_h = rheading.height(); TQRegion region (0, y, width, tmp_h); - rheading.draw (&p, 0, y, region, colorGroup(), 0L); + rheading.draw (&p, 0, y, region, tqcolorGroup(), 0L); y += tmp_h; - TQSimpleRichText rdate (i18n("

Printed on %1



").arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime())), - TQFont("times"), TQString::null, ksv::styleSheet(), + TQSimpleRichText rdate (i18n("

Printed on %1



").tqarg(KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime())), + TQFont("times"), TQString(), ksv::styleSheet(), TQMimeSourceFactory::defaultFactory()); rdate.setWidth (&p, width); tmp_h = rdate.height(); TQRegion r2 (0, y, width, tmp_h); - rdate.draw (&p, 0, y, r2, colorGroup(), 0L); + rdate.draw (&p, 0, y, r2, tqcolorGroup(), 0L); y += tmp_h; } @@ -790,7 +790,7 @@ void KSVTopLevel::printLog() { while (y < height) { - TQSimpleRichText rich (*line, TQFont("times"), TQString::null, ksv::styleSheet(), + TQSimpleRichText rich (*line, TQFont("times"), TQString(), ksv::styleSheet(), TQMimeSourceFactory::defaultFactory()); rich.setWidth (&p, width); @@ -799,7 +799,7 @@ void KSVTopLevel::printLog() break; TQRegion region (0, y, width, tmp_h); - rich.draw (&p, 0, y, region, colorGroup(), 0L); + rich.draw (&p, 0, y, region, tqcolorGroup(), 0L); y += tmp_h; ++line; @@ -890,7 +890,7 @@ void KSVTopLevel::dispatchEdit () } else { - TQMimeSource* mime = kapp->clipboard()->data(); + TQMimeSource* mime = kapp->tqclipboard()->data(); if (mime && mime->provides ("application/x-ksysv")) setPaste (true); @@ -938,7 +938,7 @@ void KSVTopLevel::slotSaveLog() s << "KDE System V Init Editor" << endl - << TQDateTime::currentDateTime().toString() + << TQDateTime::tqcurrentDateTime().toString() << endl << endl << mView->log() << endl; diff --git a/ksysv/TopWidget.h b/ksysv/TopWidget.h index e39a944..517be58 100644 --- a/ksysv/TopWidget.h +++ b/ksysv/TopWidget.h @@ -39,6 +39,7 @@ class RunlevelAuthIcon; class KSVTopLevel : public KMainWindow { Q_OBJECT + TQ_OBJECT public: KSVTopLevel(); diff --git a/ksysv/configwizard.ui b/ksysv/configwizard.ui index 8edc980..7053ceb 100644 --- a/ksysv/configwizard.ui +++ b/ksysv/configwizard.ui @@ -4,13 +4,13 @@ klocale.h DesktopIcon - QWizard + TQWizard name ConfigWizard - geometry + tqgeometry 0 0 @@ -23,13 +23,13 @@ Configuration Wizard - layoutMargin + tqlayoutMargin - layoutSpacing + tqlayoutSpacing - QWidget + TQWidget name mOSPage @@ -48,7 +48,7 @@ 0 - QLabel + TQLabel name TextLabel1_2 @@ -59,7 +59,7 @@ - QFrame + TQFrame name mOSSpacer @@ -81,7 +81,7 @@ - QButtonGroup + TQButtonGroup name mOSBox @@ -100,7 +100,7 @@ 6 - QRadioButton + TQRadioButton name RadioButton7 @@ -111,7 +111,7 @@ - QRadioButton + TQRadioButton name RadioButton8 @@ -137,7 +137,7 @@ Expanding - sizeHint + tqsizeHint 20 20 @@ -147,7 +147,7 @@ - QWidget + TQWidget name mDistributionPage @@ -166,7 +166,7 @@ 0 - QButtonGroup + TQButtonGroup name mDistributionBox @@ -185,7 +185,7 @@ 6 - QRadioButton + TQRadioButton name mDistrib1 @@ -200,7 +200,7 @@ - QRadioButton + TQRadioButton name mDistrib2 @@ -211,7 +211,7 @@ - QRadioButton + TQRadioButton name mDistrib3 @@ -222,7 +222,7 @@ - QRadioButton + TQRadioButton name mDistrib4 @@ -233,7 +233,7 @@ - QRadioButton + TQRadioButton name mDistrib5 @@ -244,7 +244,7 @@ - QRadioButton + TQRadioButton name mDistrib6 @@ -255,7 +255,7 @@ - QRadioButton + TQRadioButton name mDistrib7 @@ -281,7 +281,7 @@ Expanding - sizeHint + tqsizeHint 20 20 @@ -291,7 +291,7 @@ - QWidget + TQWidget name mPathsPage @@ -310,16 +310,16 @@ 0 - QLayoutWidget + TQLayoutWidget name mServicesLayout - layoutMargin + tqlayoutMargin - layoutSpacing + tqlayoutSpacing @@ -331,7 +331,7 @@ 0 - QLabel + TQLabel name mServicesLabel @@ -346,7 +346,7 @@ - QLayoutWidget + TQLayoutWidget name mServicesButtonLayout @@ -367,7 +367,7 @@ mServicesPath - minimumSize + tqminimumSize 100 0 @@ -390,7 +390,7 @@ - QPushButton + TQPushButton name mBrowseServices @@ -409,7 +409,7 @@ - QFrame + TQFrame name mSpacer @@ -430,7 +430,7 @@ - minimumSize + tqminimumSize 0 10 @@ -438,7 +438,7 @@ - QLayoutWidget + TQLayoutWidget name mRunlevelLayout @@ -453,7 +453,7 @@ 0 - QLabel + TQLabel name mRunlevelLabel @@ -468,7 +468,7 @@ - QLayoutWidget + TQLayoutWidget name mRunlevelButtonLayout @@ -489,7 +489,7 @@ mRunlevelPath - minimumSize + tqminimumSize 100 0 @@ -512,7 +512,7 @@ - QPushButton + TQPushButton name mBrowseRunlevel @@ -544,7 +544,7 @@ Expanding - sizeHint + tqsizeHint 20 20 @@ -554,7 +554,7 @@ - QWidget + TQWidget name mFinishedPage @@ -573,7 +573,7 @@ 0 - QLabel + TQLabel name TextLabel1 @@ -590,7 +590,7 @@ You have finished the initial configuration of SysV-Init Editor. <b>Press& RichText - alignment + tqalignment AlignTop|AlignLeft diff --git a/ksysv/kdltooltip.cpp b/ksysv/kdltooltip.cpp index 7b3a421..1b98fa4 100644 --- a/ksysv/kdltooltip.cpp +++ b/ksysv/kdltooltip.cpp @@ -21,9 +21,9 @@ #include "ksvdraglist.h" #include "kdltooltip.h" -KDLToolTip::KDLToolTip (KSVDragList *parent, TQToolTipGroup* group) - : TQToolTip(parent, group), - mParent (parent) +KDLToolTip::KDLToolTip (KSVDragList *tqparent, TQToolTipGroup* group) + : TQToolTip(tqparent, group), + mParent (tqparent) { } @@ -39,10 +39,10 @@ void KDLToolTip::maybeTip (const TQPoint& p) TQString text; TQRect rect; - const TQRect vert = mParent->verticalScrollBar()->geometry(); - const TQRect horiz = mParent->horizontalScrollBar()->geometry(); + const TQRect vert = mParent->verticalScrollBar()->tqgeometry(); + const TQRect horiz = mParent->horizontalScrollBar()->tqgeometry(); - if (vert.contains(p)) + if (vert.tqcontains(p)) { rect = vert; @@ -51,7 +51,7 @@ void KDLToolTip::maybeTip (const TQPoint& p) else text = mParent->tooltip(); } - else if (horiz.contains(p)) + else if (horiz.tqcontains(p)) { rect = horiz; if (!mParent->commonToolTips()) @@ -66,14 +66,14 @@ void KDLToolTip::maybeTip (const TQPoint& p) TQListViewItem* i = mParent->itemAt (rp); KSVItem* item = static_cast (i); - rect = mParent->header()->geometry(); - if (rect.contains (p)) + rect = mParent->header()->tqgeometry(); + if (rect.tqcontains (p)) { text = mParent->tooltip(); } else if (item) { - rect = mParent->itemRect (i); + rect = mParent->tqitemRect (i); rect.moveTopLeft (mParent->viewport()->mapToParent (rect.topLeft())); text = item->tooltip(); @@ -84,7 +84,7 @@ void KDLToolTip::maybeTip (const TQPoint& p) TQListViewItem* last = mParent->lastItem(); if (last) - rect.setTop (mParent->viewport()->mapToParent (mParent->itemRect(last).bottomRight()).y()); + rect.setTop (mParent->viewport()->mapToParent (mParent->tqitemRect(last).bottomRight()).y()); text = mParent->tooltip(); } diff --git a/ksysv/kdltooltip.h b/ksysv/kdltooltip.h index 53685a4..66edff7 100644 --- a/ksysv/kdltooltip.h +++ b/ksysv/kdltooltip.h @@ -23,10 +23,10 @@ class KSVDragList; * @short custom tooltip for use in @ref KDragList * @author Peter Putzer */ -class KDLToolTip : public QToolTip +class KDLToolTip : public TQToolTip { public: - KDLToolTip (KSVDragList *parent, TQToolTipGroup* group = 0L); + KDLToolTip (KSVDragList *tqparent, TQToolTipGroup* group = 0L); virtual ~KDLToolTip(); protected: diff --git a/ksysv/kscroller.cpp b/ksysv/kscroller.cpp index fc71368..4ac01cc 100644 --- a/ksysv/kscroller.cpp +++ b/ksysv/kscroller.cpp @@ -23,11 +23,11 @@ public: TQWidget* setCornerWidget; }; -KScroller::KScroller (TQWidget* parent, const char* name) - : TQFrame (parent, name), +KScroller::KScroller (TQWidget* tqparent, const char* name) + : TQFrame (tqparent, name), d (new KScrollerPrivate()), - mVertical (new TQScrollBar (TQScrollBar::Vertical, this)), - mHorizontal (new TQScrollBar (TQScrollBar::Horizontal, this)), + mVertical (new TQScrollBar (Qt::Vertical, this)), + mHorizontal (new TQScrollBar (Qt::Horizontal, this)), mCornerWidget (new TQWidget (this)), mContent (0L), mVerticalOld (0), @@ -77,18 +77,18 @@ void KScroller::resizeEvent (TQResizeEvent* e) updateScrollBars(); } -TQSize KScroller::minimumSizeHint() const +TQSize KScroller::tqminimumSizeHint() const { - TQSize size = sizeHint(); + TQSize size = tqsizeHint(); if (size.width() > 300) size.setWidth(300); return size; } -TQSize KScroller::sizeHint() const +TQSize KScroller::tqsizeHint() const { - TQSize size = mContent->minimumSize(); - int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 ); + TQSize size = mContent->tqminimumSize(); + int extra = kapp->tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent, 0 ); size += TQSize( extra, extra ); return size; } @@ -97,7 +97,7 @@ void KScroller::updateScrollBars () { int w = width(); int h = height(); - TQSize cs = mContent->minimumSize(); + TQSize cs = mContent->tqminimumSize(); 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( TQStyle::PM_ScrollBarExtent, 0 ); + int extra = kapp->tqstyle().tqpixelMetric( 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( TQStyle::PM_ScrollBarExtent, 0 ); + int extra = kapp->tqstyle().tqpixelMetric( 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( TQStyle::PM_ScrollBarExtent, 0 ); + int extra = kapp->tqstyle().tqpixelMetric( 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 ae57487..9bcddab 100644 --- a/ksysv/kscroller.h +++ b/ksysv/kscroller.h @@ -13,18 +13,19 @@ class TQScrollBar; * @author Peter Putzer * @version $Id$ */ -class KScroller : public QFrame +class KScroller : public TQFrame { Q_OBJECT + TQ_OBJECT public: /** * Constructor. * - * @param parent the parent of this widget (passed on as ususal). + * @param tqparent the tqparent of this widget (passed on as ususal). * @param name the name of this widget (as above). */ - KScroller (TQWidget* parent = 0L, const char* name = 0L); + KScroller (TQWidget* tqparent = 0L, const char* name = 0L); /** * Destructor. @@ -69,7 +70,7 @@ public slots: void setCornerWidget (TQWidget* corner); /** - * Update the scrollbars. Call whenever you change the contents minimumSize. + * Update the scrollbars. Call whenever you change the contents tqminimumSize. */ void updateScrollBars (); @@ -82,12 +83,12 @@ protected: /** * Reimplemented for internal reasons, the API is not affected. */ - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; /** * Reimplemented for internal reasons, the API is not affected. */ - virtual TQSize minimumSizeHint() const; + virtual TQSize tqminimumSizeHint() const; private slots: diff --git a/ksysv/ksv_conf.cpp b/ksysv/ksv_conf.cpp index 8522030..e279193 100644 --- a/ksysv/ksv_conf.cpp +++ b/ksysv/ksv_conf.cpp @@ -47,10 +47,10 @@ void KSVConfig::readSettings() mShowDescription = mConfig->readBoolEntry("ShowDescription", true); mConfig->setGroup("Colors"); - mNewNormalColor = mConfig->readColorEntry ("New Text", &Qt::blue); - mNewSelectedColor = mConfig->readColorEntry ("New Selected Text", &Qt::blue); - mChangedNormalColor = mConfig->readColorEntry ("Changed Text", &Qt::red); - mChangedSelectedColor = mConfig->readColorEntry ("Changed Selected Text", &Qt::red); + mNewNormalColor = mConfig->readColorEntry ("New Text", &TQt::blue); + mNewSelectedColor = mConfig->readColorEntry ("New Selected Text", &TQt::blue); + mChangedNormalColor = mConfig->readColorEntry ("Changed Text", &TQt::red); + mChangedSelectedColor = mConfig->readColorEntry ("Changed Selected Text", &TQt::red); mConfig->setGroup("Fonts"); TQFont tmp = KGlobalSettings::generalFont(); @@ -75,8 +75,8 @@ void KSVConfig::readLegacySettings () mPanningFactor = mConfig->readNumEntry("PanningFactor", 80); mShowDescription = mConfig->readBoolEntry("ShowDescription", true); mConfig->setGroup("Colors"); - mNewNormalColor = mConfig->readColorEntry("New", &Qt::blue); - mChangedNormalColor = mConfig->readColorEntry("Changed", &Qt::red); + mNewNormalColor = mConfig->readColorEntry("New", &TQt::blue); + mChangedNormalColor = mConfig->readColorEntry("Changed", &TQt::red); } void KSVConfig::writeSettings() { @@ -100,7 +100,7 @@ void KSVConfig::writeSettings() { mConfig->writeEntry("Service Font", mServiceFont); mConfig->writeEntry("Number Font", mNumberFont); - // save screen geometry + // save screen tqgeometry KMainWindow* mw = static_cast(kapp->mainWidget()); if (mw) @@ -118,7 +118,7 @@ void KSVConfig::writeSettings() { bool KSVConfig::showRunlevel (int index) const { - if (mShowRunlevel.contains (index)) + if (mShowRunlevel.tqcontains (index)) return mShowRunlevel[index]; else return false; diff --git a/ksysv/ksv_core.cpp b/ksysv/ksv_core.cpp index 6611211..87d5528 100644 --- a/ksysv/ksv_core.cpp +++ b/ksysv/ksv_core.cpp @@ -59,7 +59,7 @@ TQString ksv::breakWords (const TQString& s, int amount) int pos = -1; for (int i = 1; i < amount; ++i) { - if ((pos = str.find(' ', amount - i, false)) < 0 || (pos > maximum + i)) + if ((pos = str.tqfind(' ', amount - i, false)) < 0 || (pos > maximum + i)) continue; else break; @@ -103,15 +103,15 @@ TQStyleSheet* ksv::styleSheet () // item->setDisplayMode (TQStyleSheetItem::DisplayBlock); item = new TQStyleSheetItem (&style, "start"); // start section - item->setColor (Qt::green); + item->setColor (TQt::green); // item->setContexts ("rl"); item = new TQStyleSheetItem (&style, "stop"); // stop section - item->setColor (Qt::red); + item->setColor (TQt::red); // item->setContexts ("rl"); item = new TQStyleSheetItem (&style, "error"); // signal an error - item->setColor (Qt::red); + item->setColor (TQt::red); item->setLogicalFontSizeStep (1); item = new TQStyleSheetItem (&style, "cmd"); // command line diff --git a/ksysv/ksvapplication.h b/ksysv/ksvapplication.h index 95c4b45..a86a98f 100644 --- a/ksysv/ksvapplication.h +++ b/ksysv/ksvapplication.h @@ -8,6 +8,7 @@ class KSVApplication : public KUniqueApplication { Q_OBJECT + TQ_OBJECT public: inline KSVApplication() {} diff --git a/ksysv/ksvconfigwizard.cpp b/ksysv/ksvconfigwizard.cpp index acbdb04..a70ea7d 100644 --- a/ksysv/ksvconfigwizard.cpp +++ b/ksysv/ksvconfigwizard.cpp @@ -33,14 +33,14 @@ #include /* - * Constructs a KSVConfigWizard which is a child of 'parent', with the + * Constructs a KSVConfigWizard which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f' * * The wizard will by default be modeless, unless you set 'modal' to * TRUE to construct a modal wizard. */ -KSVConfigWizard::KSVConfigWizard (TQWidget* parent, const char* name, bool modal, WFlags fl) - : ConfigWizard (parent, name, modal, fl), +KSVConfigWizard::KSVConfigWizard (TQWidget* tqparent, const char* name, bool modal, WFlags fl) + : ConfigWizard (tqparent, name, modal, fl), mChosenDistribution (Debian) { mDistributionBoxLayout->setSpacing (KDialog::spacingHint()); @@ -67,7 +67,7 @@ KSVConfigWizard::KSVConfigWizard (TQWidget* parent, const char* name, bool modal */ KSVConfigWizard::~KSVConfigWizard() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } void KSVConfigWizard::browseServices() diff --git a/ksysv/ksvconfigwizard.h b/ksysv/ksvconfigwizard.h index 20c11c7..0598520 100644 --- a/ksysv/ksvconfigwizard.h +++ b/ksysv/ksvconfigwizard.h @@ -32,9 +32,10 @@ class KSVConfigWizard : public ConfigWizard { Q_OBJECT + TQ_OBJECT public: - KSVConfigWizard( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + KSVConfigWizard( TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~KSVConfigWizard(); public: diff --git a/ksysv/ksvdrag.cpp b/ksysv/ksvdrag.cpp index 7d94536..e524bef 100644 --- a/ksysv/ksvdrag.cpp +++ b/ksysv/ksvdrag.cpp @@ -65,7 +65,7 @@ const char* KSVDrag::format (int i) const } } -TQByteArray KSVDrag::encodedData (const char* format) const +TQByteArray KSVDrag::tqencodedData (const char* format) const { TQByteArray res; @@ -90,7 +90,7 @@ bool KSVDrag::decodeNative (const TQMimeSource* mime, KSVData& data) { if (mime && mime->provides ("application/x-ksysv")) { - TQDataStream ds (mime->encodedData ("application/x-ksysv"), IO_ReadOnly); + TQDataStream ds (mime->tqencodedData ("application/x-ksysv"), IO_ReadOnly); ds >> data; return true; diff --git a/ksysv/ksvdrag.h b/ksysv/ksvdrag.h index c83928c..00bb1a3 100644 --- a/ksysv/ksvdrag.h +++ b/ksysv/ksvdrag.h @@ -9,9 +9,10 @@ class KSVData; class KSVItem; class TQWidget; -class KSVDrag : public QDragObject +class KSVDrag : public TQDragObject { Q_OBJECT + TQ_OBJECT public: KSVDrag (const KSVData& item, TQWidget* dragSource = 0L, const char* name = 0L); @@ -19,7 +20,7 @@ public: virtual ~KSVDrag(); virtual const char* format (int i) const; - TQByteArray encodedData (const char*) const; + TQByteArray tqencodedData (const char*) const; static bool decodeNative (const TQMimeSource*, KSVData&); diff --git a/ksysv/ksvdraglist.cpp b/ksysv/ksvdraglist.cpp index ea2e264..52e8ad6 100644 --- a/ksysv/ksvdraglist.cpp +++ b/ksysv/ksvdraglist.cpp @@ -110,7 +110,7 @@ TQString KSVItem::key (int, bool) const return mData->numberString() + mData->label(); } -KSVItem::KSVItem (KListView* view, TQString file, TQString path, TQString label, Q_INT8 nr ) +KSVItem::KSVItem (KListView* view, TQString file, TQString path, TQString label, TQ_INT8 nr ) : TQListViewItem (view), mData (new KSVData (file, path, label, nr)), mConfig (KSVConfig::self()), @@ -214,8 +214,8 @@ TQPixmap KSVItem::paintDragIcon (const TQFont& font, const TQColorGroup&) const label()); p.end(); - TQBitmap mask (width, height); - p.begin (&mask); + TQBitmap tqmask (width, height); + p.begin (&tqmask); p.setFont (font); p.fillRect (0, 0, width, height, color0); @@ -229,12 +229,12 @@ TQPixmap KSVItem::paintDragIcon (const TQFont& font, const TQColorGroup&) const label()); TQBrush brush (color0); - brush.setStyle(Dense5Pattern); + brush.setStyle(Qt::Dense5Pattern); p.fillRect (0, 0, width, height, brush); p.end(); - result.setMask(mask); + result.setMask(tqmask); result.setOptimization(TQPixmap::BestOptim); return result; } @@ -261,7 +261,7 @@ void KSVItem::setFilename (const TQString& file) mData->setFilename (file); } -void KSVItem::setNumber (Q_INT8 nr) +void KSVItem::setNumber (TQ_INT8 nr) { mData->setNumber (nr); @@ -309,8 +309,8 @@ void KSVItem::setOriginalRunlevel (const TQString& rl) // KSVDragList //----------------------- -KSVDragList::KSVDragList ( TQWidget* parent, const char* name ) - : KListView (parent, name), +KSVDragList::KSVDragList ( TQWidget* tqparent, const char* name ) + : KListView (tqparent, name), mItemToDrag (0L), mDragMenu (new KPopupMenu (this)), mDragCopyMenu (new KPopupMenu (this)), @@ -370,22 +370,22 @@ KSVDragList::~KSVDragList() delete toolTip; } -void KSVDragList::initItem (TQString file, TQString path, TQString name, Q_INT8 nr) +void KSVDragList::initItem (TQString file, TQString path, TQString name, TQ_INT8 nr) { KSVItem* tmp = new KSVItem(this, file, path, name, nr); - tmp->setRunlevel(TQObject::name()); - tmp->setOriginalRunlevel(TQObject::name()); + tmp->setRunlevel(TQT_TQOBJECT(this)->name()); + tmp->setOriginalRunlevel(TQT_TQOBJECT(this)->name()); tmp->setIcon (mIcon); setUpdatesEnabled(false); - // marked as new in insert, we don´t want that + // marked as new in insert, we don�t want that tmp->setNew(false); tmp->setChanged (false); setUpdatesEnabled(true); - repaint(false); + tqrepaint(false); } void KSVDragList::setDefaultIcon (const TQPixmap& icon) @@ -431,12 +431,12 @@ void KSVDragList::setNewSelectedColor (const TQColor& col) } } -Q_INT8 KSVDragList::generateNumber (const TQString& label, +TQ_INT8 KSVDragList::generateNumber (const TQString& label, const KSVData* itemBelow, const KSVData* itemAbove) const { - Q_INT8 high = itemBelow ? itemBelow->number() : -1; - Q_INT8 low = itemAbove ? itemAbove->number() : -1; - Q_INT8 result = generateNumber (high, low); + TQ_INT8 high = itemBelow ? itemBelow->number() : -1; + TQ_INT8 low = itemAbove ? itemAbove->number() : -1; + TQ_INT8 result = generateNumber (high, low); if (high == result && result != -1 && label >= itemBelow->label()) result = -1; @@ -447,11 +447,11 @@ Q_INT8 KSVDragList::generateNumber (const TQString& label, return result; } -Q_INT8 KSVDragList::generateNumber (Q_INT8 high, Q_INT8 low) const +TQ_INT8 KSVDragList::generateNumber (TQ_INT8 high, TQ_INT8 low) const { Q_ASSERT (high >= low || high == -1); - Q_INT8 result = -1; + TQ_INT8 result = -1; if (low < 0) { @@ -532,7 +532,7 @@ void KSVDragList::startDrag () if (d) { - d->setPixmap (mItemToDrag->paintDragIcon (font(), colorGroup())); + d->setPixmap (mItemToDrag->paintDragIcon (font(), tqcolorGroup())); d->drag(); } @@ -595,7 +595,7 @@ bool KSVDragList::removeFromRMList (const KSVData& item) bool KSVDragList::insert (const KSVData& data, const KSVData* above, const KSVData* below) { - Q_INT8 nr = generateNumber (data.label(), below, above); + TQ_INT8 nr = generateNumber (data.label(), below, above); if (nr > -1) { @@ -639,7 +639,7 @@ bool KSVDragList::insert (const KSVData& data, const KSVItem* where, KSVAction*& if (exists->data() == above || exists->data() == below) return false; - Q_INT8 nr = generateNumber (exists->label(), below, above); + TQ_INT8 nr = generateNumber (exists->label(), below, above); if (nr == -1) { @@ -762,7 +762,7 @@ void KSVDragList::setEnabled (bool enable) { if (!testWState(WState_Disabled)) { - if (focusWidget() == this) + if (tqfocusWidget() == this) focusNextPrevChild (TRUE); setWState (WState_Disabled); // setBackgroundFromMode(); // this is private in TQWidget... @@ -776,8 +776,8 @@ void KSVDragList::setEnabled (bool enable) // KServiceDragList -KServiceDragList::KServiceDragList (TQWidget* parent, const char* name) - : KSVDragList (parent, name) +KServiceDragList::KServiceDragList (TQWidget* tqparent, const char* name) + : KSVDragList (tqparent, name) { } @@ -793,7 +793,7 @@ void KServiceDragList::startDrag () if (d) { - d->setPixmap (mItemToDrag->paintDragIcon (font(), colorGroup())); + d->setPixmap (mItemToDrag->paintDragIcon (font(), tqcolorGroup())); d->dragCopy(); } diff --git a/ksysv/ksvdraglist.h b/ksysv/ksvdraglist.h index b710c44..6b1ab7e 100644 --- a/ksysv/ksvdraglist.h +++ b/ksysv/ksvdraglist.h @@ -50,7 +50,7 @@ class KPopupMenu; class KSVConfig; class KDLToolTip; -class KSVItem : public QListViewItem +class KSVItem : public TQListViewItem { public: typedef enum { @@ -67,7 +67,7 @@ public: KSVItem (KListView*); KSVItem (const KSVItem&); explicit KSVItem (KSVDragList*, const KSVData&); - KSVItem (KListView* view, TQString file, TQString path, TQString label, Q_INT8 nr ); + KSVItem (KListView* view, TQString file, TQString path, TQString label, TQ_INT8 nr ); virtual ~KSVItem (); virtual TQString key (int col, bool ascending) const; @@ -88,8 +88,8 @@ public: inline const TQString& path() const { return mData->path(); } - inline Q_INT8 number() const { return mData->number(); } - inline Q_INT8 oldNumber() const { return mData->oldNumber(); } + inline TQ_INT8 number() const { return mData->number(); } + inline TQ_INT8 oldNumber() const { return mData->oldNumber(); } void copy (const KSVData&); @@ -116,7 +116,7 @@ public: void setLabel (const TQString& label); void setFilename (const TQString& file); void setRunlevel (const TQString& runlevel); - void setNumber (Q_INT8 nr); + void setNumber (TQ_INT8 nr); void setPath (const TQString& path); void setChanged (bool); void setNewNormalColor (const TQColor&); @@ -152,9 +152,10 @@ private: class KSVDragList : public KListView { Q_OBJECT + TQ_OBJECT public: - KSVDragList ( TQWidget* parent = 0, const char* name = 0 ); + KSVDragList ( TQWidget* tqparent = 0, const char* name = 0 ); virtual ~KSVDragList(); virtual void clear(); @@ -166,7 +167,7 @@ public: inline const TQString& horizontalScrollBarTip () const { return mHorizontalTip; } inline const TQString& verticalScrollBarTip () const { return mVerticalTip; } - virtual void initItem (TQString file, TQString path, TQString name, Q_INT8 nr); + virtual void initItem (TQString file, TQString path, TQString name, TQ_INT8 nr); TQPtrList& getDeletedItems() { return mRMList; } /** @@ -227,12 +228,12 @@ protected: * the given index by taking the average of the item * above and the item below. */ - Q_INT8 generateNumber (Q_INT8 high, Q_INT8 low) const; + TQ_INT8 generateNumber (TQ_INT8 high, TQ_INT8 low) const; /** * A convenience function that also takes the label into account */ - Q_INT8 generateNumber (const TQString& label, const KSVData* itemAbove, const KSVData* itemBelow) const; + TQ_INT8 generateNumber (const TQString& label, const KSVData* itemAbove, const KSVData* itemBelow) const; KSVItem* mItemToDrag; @@ -267,7 +268,7 @@ signals: class KServiceDragList : public KSVDragList { public: - KServiceDragList (TQWidget* parent = 0L, const char* name = 0L); + KServiceDragList (TQWidget* tqparent = 0L, const char* name = 0L); virtual ~KServiceDragList (); protected: diff --git a/ksysv/ksvlookandfeel.cpp b/ksysv/ksvlookandfeel.cpp index 0e0fa58..c63c49d 100644 --- a/ksysv/ksvlookandfeel.cpp +++ b/ksysv/ksvlookandfeel.cpp @@ -32,11 +32,11 @@ #include /* - * Constructs a KSVLookAndFeel which is a child of 'parent', with the + * Constructs a KSVLookAndFeel which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f' */ -KSVLookAndFeel::KSVLookAndFeel( TQWidget* parent, const char* name, WFlags fl ) - : LookAndFeel( parent, name, fl ) +KSVLookAndFeel::KSVLookAndFeel( TQWidget* tqparent, const char* name, WFlags fl ) + : LookAndFeel( tqparent, name, fl ) { mTopLayout->setSpacing (KDialog::spacingHint()); mColorGrid->setSpacing (KDialog::spacingHint()); @@ -47,7 +47,7 @@ KSVLookAndFeel::KSVLookAndFeel( TQWidget* parent, const char* name, WFlags fl ) */ KSVLookAndFeel::~KSVLookAndFeel() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } /* diff --git a/ksysv/ksvlookandfeel.h b/ksysv/ksvlookandfeel.h index 7f825cf..009c4a6 100644 --- a/ksysv/ksvlookandfeel.h +++ b/ksysv/ksvlookandfeel.h @@ -12,9 +12,10 @@ class KSVLookAndFeel : public LookAndFeel { Q_OBJECT + TQ_OBJECT public: - KSVLookAndFeel( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + KSVLookAndFeel( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~KSVLookAndFeel(); inline const TQFont& serviceFont() const { return mServiceFont; } diff --git a/ksysv/ksvmiscconfig.cpp b/ksysv/ksvmiscconfig.cpp index a3c27ac..69b596a 100644 --- a/ksysv/ksvmiscconfig.cpp +++ b/ksysv/ksvmiscconfig.cpp @@ -31,11 +31,11 @@ #include /* - * Constructs a KSVMiscConfig which is a child of 'parent', with the + * Constructs a KSVMiscConfig which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f' */ -KSVMiscConfig::KSVMiscConfig( TQWidget* parent, const char* name, WFlags fl ) - : MiscConfiguration( parent, name, fl ) +KSVMiscConfig::KSVMiscConfig( TQWidget* tqparent, const char* name, WFlags fl ) + : MiscConfiguration( tqparent, name, fl ) { mSpacer->setFixedHeight (KDialog::spacingHint()); @@ -57,7 +57,7 @@ void KSVMiscConfig::slotChanged() */ KSVMiscConfig::~KSVMiscConfig() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } #include "ksvmiscconfig.moc" diff --git a/ksysv/ksvmiscconfig.h b/ksysv/ksvmiscconfig.h index cf332e1..6d1d1db 100644 --- a/ksysv/ksvmiscconfig.h +++ b/ksysv/ksvmiscconfig.h @@ -30,9 +30,10 @@ class KSVMiscConfig : public MiscConfiguration { Q_OBJECT + TQ_OBJECT public: - KSVMiscConfig( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + KSVMiscConfig( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~KSVMiscConfig(); signals: diff --git a/ksysv/ksvpathconfig.cpp b/ksysv/ksvpathconfig.cpp index cba5b77..f7e5f52 100644 --- a/ksysv/ksvpathconfig.cpp +++ b/ksysv/ksvpathconfig.cpp @@ -29,11 +29,11 @@ #include /* - * Constructs a KSVPathConfig which is a child of 'parent', with the + * Constructs a KSVPathConfig which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f' */ -KSVPathConfig::KSVPathConfig( TQWidget* parent, const char* name, WFlags fl ) - : PathConfiguration( parent, name, fl ) +KSVPathConfig::KSVPathConfig( TQWidget* tqparent, const char* name, WFlags fl ) + : PathConfiguration( tqparent, name, fl ) { mSpacer->setFixedHeight (KDialog::spacingHint()); } @@ -43,7 +43,7 @@ KSVPathConfig::KSVPathConfig( TQWidget* parent, const char* name, WFlags fl ) */ KSVPathConfig::~KSVPathConfig() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } void KSVPathConfig::browseServices() diff --git a/ksysv/ksvpathconfig.h b/ksysv/ksvpathconfig.h index fe73e56..cf06bf2 100644 --- a/ksysv/ksvpathconfig.h +++ b/ksysv/ksvpathconfig.h @@ -30,9 +30,10 @@ class KSVPathConfig : public PathConfiguration { Q_OBJECT + TQ_OBJECT public: - KSVPathConfig( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + KSVPathConfig( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~KSVPathConfig(); signals: diff --git a/ksysv/lookandfeelconfig.ui b/ksysv/lookandfeelconfig.ui index bedd940..4497567 100644 --- a/ksysv/lookandfeelconfig.ui +++ b/ksysv/lookandfeelconfig.ui @@ -2,7 +2,7 @@ LookAndFeel Look & Feel configuration for SysV-Init Editor Peter Putzer - + LookAndFeel @@ -17,9 +17,9 @@ Look & Feel - + - + @@ -31,7 +31,7 @@ 0 - + mFontBox @@ -48,7 +48,7 @@ 6 - + mTopLayout @@ -62,7 +62,7 @@ 6 - + mChooseNumberFont @@ -70,7 +70,7 @@ C&hoose... - + mServiceFontPreview @@ -82,7 +82,7 @@ 0 - + 200 0 @@ -98,7 +98,7 @@ dummy-font - + mNumberFontPreview @@ -110,7 +110,7 @@ 0 - + 200 0 @@ -126,14 +126,14 @@ dummy-font - + mServiceFontLabel Services: - + AlignVCenter|AlignRight @@ -142,14 +142,14 @@ - + mNumberFontLabel Sorting numbers: - + AlignVCenter|AlignRight @@ -158,7 +158,7 @@ - + mChooseServiceFont @@ -170,7 +170,7 @@ - + mSpacer @@ -182,7 +182,7 @@ 0 - + 0 10 @@ -195,7 +195,7 @@ Plain - + mColorBox @@ -212,7 +212,7 @@ 6 - + mColorGrid @@ -238,7 +238,7 @@ 0 - + 80 0 @@ -258,14 +258,14 @@ <p>Changed service entries will be distinguished by this color.</p> - + mChangedNormalLabel &Changed: - + AlignVCenter|AlignRight @@ -286,7 +286,7 @@ 0 - + 80 0 @@ -306,14 +306,14 @@ <p>New service entries will be distinguished by this color.</p> - + mNewNormalLabel &New: - + AlignVCenter|AlignRight @@ -334,7 +334,7 @@ 0 - + 80 0 @@ -366,7 +366,7 @@ 0 - + 80 0 @@ -386,14 +386,14 @@ <p>New service entries will be distinguished by this color while they are selected.</p> - + mNewSelectedLabel New && &selected: - + AlignVCenter|AlignRight @@ -402,14 +402,14 @@ - + mChangedSelectedLabel Changed && s&elected: - + AlignVCenter|AlignRight @@ -432,7 +432,7 @@ Expanding - + 20 20 @@ -490,11 +490,11 @@ klocale.h - + chooseNumberFont() chooseServiceFont() slotChanged() - + DesktopIcon - + diff --git a/ksysv/main.cpp b/ksysv/main.cpp index 4dd0e09..31735c4 100644 --- a/ksysv/main.cpp +++ b/ksysv/main.cpp @@ -36,7 +36,7 @@ using namespace std; #define KSYSV_DEBUG(x) do { } while (0) #endif -static void myMessageOutput( QtMsgType type, const char *msg ) +static void myMessageOutput( TQtMsgType type, const char *msg ) { switch ( type ) { case QtDebugMsg: @@ -53,7 +53,7 @@ static void myMessageOutput( QtMsgType type, const char *msg ) int main( int argc, char **argv ) { // install own message handler that ignores debug-msg when DEBUG is not defined - qInstallMsgHandler(myMessageOutput); + tqInstallMsgHandler(myMessageOutput); KAboutData about("ksysv", I18N_NOOP("SysV-Init Editor"), KSYSV_VERSION_STRING, I18N_NOOP ("Editor for Sys-V like init configurations"), diff --git a/ksysv/miscconfig.ui b/ksysv/miscconfig.ui index 0cfebe2..898a99a 100644 --- a/ksysv/miscconfig.ui +++ b/ksysv/miscconfig.ui @@ -1,7 +1,7 @@ MiscConfiguration Peter Putzer - + MiscConfiguration @@ -16,9 +16,9 @@ Miscellaneous - + - + @@ -30,14 +30,14 @@ 0 - + mMessagesBox Informational Messages - + @@ -49,11 +49,11 @@ 6 - + Layout12 - + @@ -65,7 +65,7 @@ 0 - + mShowAllLabel @@ -83,14 +83,14 @@ Expanding - + 20 20 - + mShowAll @@ -100,7 +100,7 @@ - + mWarnReadOnly @@ -108,7 +108,7 @@ &Warn if not allowed to write configuration - + mWarnSortingNumber @@ -118,7 +118,7 @@ - + mSpacer @@ -130,7 +130,7 @@ 0 - + 0 10 @@ -153,7 +153,7 @@ Expanding - + 20 20 @@ -179,8 +179,8 @@ klocale.h - + slotChanged() - - + + diff --git a/ksysv/pathconfig.ui b/ksysv/pathconfig.ui index c59a96f..d0eb5d3 100644 --- a/ksysv/pathconfig.ui +++ b/ksysv/pathconfig.ui @@ -2,7 +2,7 @@ PathConfiguration Path configuration for KSysV Peter Putzer - + PathConfiguration @@ -25,9 +25,9 @@ Path Configuration - + - + @@ -39,13 +39,13 @@ 0 - + mServicesLayout - + - + @@ -57,7 +57,7 @@ 0 - + mServicesLabel @@ -68,7 +68,7 @@ mServicesPath - + mServicesButtonLayout @@ -94,7 +94,7 @@ 0 - + 100 0 @@ -107,7 +107,7 @@ Enter the path to the folder containing the services - + mBrowseServices @@ -122,7 +122,7 @@ - + mSpacer @@ -134,7 +134,7 @@ 0 - + 0 10 @@ -147,7 +147,7 @@ Plain - + mRunlevelLayout @@ -161,7 +161,7 @@ 0 - + mRunlevelLabel @@ -172,7 +172,7 @@ mRunlevelPath - + mRunlevelButtonLayout @@ -198,7 +198,7 @@ 0 - + 100 0 @@ -211,7 +211,7 @@ Enter the path to the folder containing the runlevel folders - + mBrowseRunlevel @@ -236,7 +236,7 @@ Expanding - + 20 20 @@ -281,12 +281,12 @@ klocale.h kdialog.h - + browseServices() browseRunlevels() slotChanged() - - + + klineedit.h klineedit.h diff --git a/ksysv/trash.cpp b/ksysv/trash.cpp index aab746c..dcbce00 100644 --- a/ksysv/trash.cpp +++ b/ksysv/trash.cpp @@ -29,8 +29,8 @@ #include "ActionList.h" #include "trash.h" -KSVTrash::KSVTrash (TQWidget* parent, const char* name) - : TQFrame (parent, name), +KSVTrash::KSVTrash (TQWidget* tqparent, const char* name) + : TQFrame (tqparent, name), mKIL (KGlobal::iconLoader()), mLabel (new TQLabel(this)), mOpen (false) @@ -47,7 +47,7 @@ KSVTrash::KSVTrash (TQWidget* parent, const char* name) TQToolTip::add(mLabel, i18n("Drag here to remove services")); TQToolTip::add(this, i18n("Drag here to remove services")); - setMinimumSize(sizeHint()); + setMinimumSize(tqsizeHint()); setAcceptDrops(true); mLabel->installEventFilter(this); @@ -75,7 +75,7 @@ void KSVTrash::dropEvent (TQDropEvent* e) if (mOpen) { - mLabel->repaint(); + mLabel->tqrepaint(); mOpen = false; } } @@ -102,7 +102,7 @@ void KSVTrash::dragLeaveEvent ( TQDragLeaveEvent* ) { if (mOpen) { - mLabel->repaint(); + mLabel->tqrepaint(); mOpen = false; } } @@ -131,7 +131,7 @@ bool KSVTrash::eventFilter( TQObject *, TQEvent *e ) } } -TQSize KSVTrash::sizeHint() const +TQSize KSVTrash::tqsizeHint() const { static TQSize size = TQSize (mPixmapWidth + 2 * 5, mPixmapWidth + 2 * 7); diff --git a/ksysv/trash.h b/ksysv/trash.h index 4cbf5c5..e341647 100644 --- a/ksysv/trash.h +++ b/ksysv/trash.h @@ -25,29 +25,30 @@ class KIconLoader; class KSVItem; class KSVAction; -class KSVTrash : public QFrame +class KSVTrash : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KSVTrash (TQWidget* parent = 0, const char* name = 0); + KSVTrash (TQWidget* tqparent = 0, const char* name = 0); virtual ~KSVTrash(); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; protected: /** - * Overridden from @ref QDropSite + * Overridden from @ref TQDropSite */ virtual void dragMoveEvent ( TQDragMoveEvent* ); /** - * Overridden from @ref QDropSite + * Overridden from @ref TQDropSite */ virtual void dragLeaveEvent ( TQDragLeaveEvent* ); /** - * Overridden from @ref QDropSite + * Overridden from @ref TQDropSite */ virtual void dropEvent ( TQDropEvent* ); -- cgit v1.2.3