diff options
Diffstat (limited to 'ksysv/OldView.cpp')
-rw-r--r-- | ksysv/OldView.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
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<KPopupMenu*> (factory->container ("item_menu", parent)); + KXMLGUIFactory* factory = tqparent->factory(); + mItemMenu = static_cast<KPopupMenu*> (factory->container ("item_menu", tqparent)); mItemMenu->insertTitle (i18n ("Runlevel Menu"), -1, 0); - mContextMenu = static_cast<KPopupMenu*> (factory->container ("list_menu", parent)); + mContextMenu = static_cast<KPopupMenu*> (factory->container ("list_menu", tqparent)); mContextMenu->insertTitle (i18n ("Runlevel Menu"), -1, 0); - mScriptMenu = static_cast<KPopupMenu*> (factory->container ("script_menu", parent)); + mScriptMenu = static_cast<KPopupMenu*> (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 " \ "<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)); + "to change the number manually via the <strong>Properties dialog box</strong>.</p>").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 " \ "<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)); + "to change the number manually via the <strong>Properties dialog box</strong>.</p>").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("<rl>RUNLEVEL %1</rl>").arg(i), - i18n("** RUNLEVEL %1 **").arg(i)); + appendLog(i18n("<rl>RUNLEVEL %1</rl>").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<KSVData> 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("** <stop>Stopping</stop> <cmd>%1</cmd> **<br/>").arg(path), - i18n("** Stopping %1 **").arg(path)); + appendLog(i18n("** <stop>Stopping</stop> <cmd>%1</cmd> **<br/>").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("** <start>Starting</start> <cmd>%1</cmd> **<br/>").arg(path), - i18n("** Starting %1 **").arg(path)); + appendLog(i18n("** <start>Starting</start> <cmd>%1</cmd> **<br/>").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 <cmd>%1</cmd> **</br>").arg(path), - i18n("** Re-starting %1 **").arg(path)); + appendLog(i18n("** Re-starting <cmd>%1</cmd> **</br>").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<KSVData>* start, |