summaryrefslogtreecommitdiffstats
path: root/ksysv/OldView.cpp
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/OldView.cpp
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/OldView.cpp')
-rw-r--r--ksysv/OldView.cpp396
1 files changed, 198 insertions, 198 deletions
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());