summaryrefslogtreecommitdiffstats
path: root/ksysv/TopWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksysv/TopWidget.cpp')
-rw-r--r--ksysv/TopWidget.cpp312
1 files changed, 156 insertions, 156 deletions
diff --git a/ksysv/TopWidget.cpp b/ksysv/TopWidget.cpp
index 854c9cf..6b2e675 100644
--- a/ksysv/TopWidget.cpp
+++ b/ksysv/TopWidget.cpp
@@ -28,28 +28,28 @@
#include <ctype.h>
-#include <qpopupmenu.h>
-#include <qkeycode.h>
-#include <qmessagebox.h>
-#include <qfontmetrics.h>
-#include <qpainter.h>
-#include <qmultilineedit.h>
-#include <qdatetime.h>
+#include <tqpopupmenu.h>
+#include <tqkeycode.h>
+#include <tqmessagebox.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
+#include <tqmultilineedit.h>
+#include <tqdatetime.h>
#include <kprinter.h>
-#include <qpaintdevicemetrics.h>
-#include <qbuttongroup.h>
-#include <qclipboard.h>
-#include <qtooltip.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qregexp.h>
-#include <qdatastream.h>
-#include <qpixmapcache.h>
-#include <qtextview.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qwhatsthis.h>
-#include <qsimplerichtext.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqbuttongroup.h>
+#include <tqclipboard.h>
+#include <tqtooltip.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqregexp.h>
+#include <tqdatastream.h>
+#include <tqpixmapcache.h>
+#include <tqtextview.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqwhatsthis.h>
+#include <tqsimplerichtext.h>
#include <kresolver.h>
#include <ktoolbar.h>
@@ -84,7 +84,7 @@
#include "OldView.h"
#include "IOCore.h"
#include "TopWidget.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kstatusbar.h>
namespace Status
@@ -127,7 +127,7 @@ KSVTopLevel::KSVTopLevel()
mEditDlg (new ServiceDlg (i18n("Edit Service"),
i18n("&Choose which service to edit:"),
this)),
- mVisible (new QCheckBox*[ksv::runlevelNumber])
+ mVisible (new TQCheckBox*[ksv::runlevelNumber])
{
setCaption(false);
@@ -139,27 +139,27 @@ KSVTopLevel::KSVTopLevel()
setCentralWidget(mView);
// ensure that the statusbar gets updated correctly
- connect (mView, SIGNAL(sigRun(const QString&)), this, SLOT(slotUpdateRunning(const QString&)));
- connect (mView, SIGNAL(sigStop()), statusBar(), SLOT(clear()));
- connect (mView, SIGNAL(cannotGenerateNumber()), this, SLOT(catchCannotGenerateNumber()));
- connect (mView, SIGNAL(undoAction(KSVAction*)), this, SLOT(pushUndoAction(KSVAction*)));
- connect (mView, SIGNAL(logChanged()), this, SLOT(enableLogActions()));
+ connect (mView, TQT_SIGNAL(sigRun(const TQString&)), this, TQT_SLOT(slotUpdateRunning(const TQString&)));
+ connect (mView, TQT_SIGNAL(sigStop()), statusBar(), TQT_SLOT(clear()));
+ connect (mView, TQT_SIGNAL(cannotGenerateNumber()), this, TQT_SLOT(catchCannotGenerateNumber()));
+ connect (mView, TQT_SIGNAL(undoAction(KSVAction*)), this, TQT_SLOT(pushUndoAction(KSVAction*)));
+ connect (mView, TQT_SIGNAL(logChanged()), this, TQT_SLOT(enableLogActions()));
// cut & copy
- connect (mView, SIGNAL (newOrigin()),
- this, SLOT (dispatchEdit()));
+ connect (mView, TQT_SIGNAL (newOrigin()),
+ this, TQT_SLOT (dispatchEdit()));
// undo
- connect (mUndoList, SIGNAL(empty()), this, SLOT(disableUndo()));
- connect (mUndoList, SIGNAL(filled()), this, SLOT(enableUndo()));
+ connect (mUndoList, TQT_SIGNAL(empty()), this, TQT_SLOT(disableUndo()));
+ connect (mUndoList, TQT_SIGNAL(filled()), this, TQT_SLOT(enableUndo()));
// and redo
- connect (mRedoList, SIGNAL(empty()), this, SLOT(disableRedo()));
- connect (mRedoList, SIGNAL(filled()), this, SLOT(enableRedo()));
+ connect (mRedoList, TQT_SIGNAL(empty()), this, TQT_SLOT(disableRedo()));
+ connect (mRedoList, TQT_SIGNAL(filled()), this, TQT_SLOT(enableRedo()));
// paste
- connect (kapp->clipboard(), SIGNAL (dataChanged()),
- this, SLOT (dispatchEdit()));
+ connect (kapp->clipboard(), TQT_SIGNAL (dataChanged()),
+ this, TQT_SLOT (dispatchEdit()));
// init mView according to saved preferences
slotReadConfig();
@@ -186,23 +186,23 @@ KSVTopLevel::~KSVTopLevel()
void KSVTopLevel::initTools()
{
- connect (mStartDlg, SIGNAL(doAction(const QString&)),
- mView, SLOT(startService(const QString&)));
- connect (mStopDlg, SIGNAL(doAction(const QString&)),
- mView, SLOT(editService(const QString&)));
- connect (mRestartDlg, SIGNAL(doAction(const QString&)),
- mView, SLOT(restartService(const QString&)));
- connect (mEditDlg, SIGNAL(doAction(const QString&)),
- mView, SLOT(editService(const QString&)));
-
- connect (mStartDlg, SIGNAL (display (bool)),
- this, SLOT (dispatchStartService (bool)));
- connect (mStopDlg, SIGNAL (display (bool)),
- this, SLOT (dispatchStopService (bool)));
- connect (mRestartDlg, SIGNAL (display (bool)),
- this, SLOT (dispatchRestartService (bool)));
- connect (mEditDlg, SIGNAL (display (bool)),
- this, SLOT (dispatchEditService (bool)));
+ connect (mStartDlg, TQT_SIGNAL(doAction(const TQString&)),
+ mView, TQT_SLOT(startService(const TQString&)));
+ connect (mStopDlg, TQT_SIGNAL(doAction(const TQString&)),
+ mView, TQT_SLOT(editService(const TQString&)));
+ connect (mRestartDlg, TQT_SIGNAL(doAction(const TQString&)),
+ mView, TQT_SLOT(restartService(const TQString&)));
+ connect (mEditDlg, TQT_SIGNAL(doAction(const TQString&)),
+ mView, TQT_SLOT(editService(const TQString&)));
+
+ connect (mStartDlg, TQT_SIGNAL (display (bool)),
+ this, TQT_SLOT (dispatchStartService (bool)));
+ connect (mStopDlg, TQT_SIGNAL (display (bool)),
+ this, TQT_SLOT (dispatchStopService (bool)));
+ connect (mRestartDlg, TQT_SIGNAL (display (bool)),
+ this, TQT_SLOT (dispatchRestartService (bool)));
+ connect (mEditDlg, TQT_SIGNAL (display (bool)),
+ this, TQT_SLOT (dispatchEditService (bool)));
}
@@ -211,48 +211,48 @@ void KSVTopLevel::initActions ()
KActionCollection* coll = actionCollection();
// setup File menu
- mFileRevert = KStdAction::revert (this, SLOT (slotClearChanges()), coll);
+ mFileRevert = KStdAction::revert (this, TQT_SLOT (slotClearChanges()), coll);
mFileRevert->setText (i18n("Re&vert Configuration"));
- mFileLoad = KStdAction::open (this, SLOT (load()), coll);
+ mFileLoad = KStdAction::open (this, TQT_SLOT (load()), coll);
mFileLoad->setText (i18n ("&Open..."));
- mFileSave = KStdAction::save(this, SLOT(slotAcceptChanges()), coll);
+ mFileSave = KStdAction::save(this, TQT_SLOT(slotAcceptChanges()), coll);
mFileSave->setText (i18n("&Save Configuration"));
- mFileSaveAs = KStdAction::saveAs (this, SLOT (saveAs ()), coll);
+ mFileSaveAs = KStdAction::saveAs (this, TQT_SLOT (saveAs ()), coll);
- mFileSaveLog = KStdAction::save (this, SLOT(slotSaveLog()), coll, "ksysv_save_log");
+ mFileSaveLog = KStdAction::save (this, TQT_SLOT(slotSaveLog()), coll, "ksysv_save_log");
mFileSaveLog->setText (i18n("Save &Log..."));
mFileSaveLog->setShortcut (Key_L+CTRL);
mFileSaveLog->setEnabled (false);
// disabled due to complexity
- // mFilePrint = KStdAction::print (this, SLOT (print()), coll);
+ // mFilePrint = KStdAction::print (this, TQT_SLOT (print()), coll);
- mFilePrintLog = KStdAction::print(this, SLOT(printLog()), coll, "ksysv_print_log");
+ mFilePrintLog = KStdAction::print(this, TQT_SLOT(printLog()), coll, "ksysv_print_log");
mFilePrintLog->setText( i18n("&Print Log..."));
mFilePrintLog->setEnabled (false);
- mFileQuit = KStdAction::quit(this, SLOT(close()), coll);
+ mFileQuit = KStdAction::quit(this, TQT_SLOT(close()), coll);
// setup Edit menu
- mEditUndo = KStdAction::undo(this, SLOT(editUndo()), coll);
+ mEditUndo = KStdAction::undo(this, TQT_SLOT(editUndo()), coll);
mEditUndo->setEnabled (false);
- mEditRedo = KStdAction::redo(this, SLOT(editRedo()), coll);
+ mEditRedo = KStdAction::redo(this, TQT_SLOT(editRedo()), coll);
mEditUndo->setEnabled (false);
- mEditCut = KStdAction::cut(this, SLOT(editCut()), coll);
- mEditCopy = KStdAction::copy(this, SLOT(editCopy()), coll);
- mEditPaste = KStdAction::paste(this, SLOT(editPaste()), coll);
- mPasteAppend = KStdAction::paste (this, SLOT (pasteAppend()),
+ mEditCut = KStdAction::cut(this, TQT_SLOT(editCut()), coll);
+ mEditCopy = KStdAction::copy(this, TQT_SLOT(editCopy()), coll);
+ mEditPaste = KStdAction::paste(this, TQT_SLOT(editPaste()), coll);
+ mPasteAppend = KStdAction::paste (this, TQT_SLOT (pasteAppend()),
coll, "ksysv_paste_append");
mEditProperties = new KAction (i18n("P&roperties"), 0,
- this, SLOT(properties()),
+ this, TQT_SLOT(properties()),
coll, "ksysv_properties");
mOpenDefault = new KAction (i18n ("&Open"), 0,
- this, SLOT (editService()),
+ this, TQT_SLOT (editService()),
coll, "ksysv_open_service");
mOpenWith = new KActionMenu (i18n ("Open &With"), coll, "ksysv_open_with");
@@ -260,30 +260,30 @@ void KSVTopLevel::initActions ()
// setup Settings menu
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings (this, SLOT(configureKeys()), coll);
- KStdAction::configureToolbars (this, SLOT(configureToolbars()), coll);
- KStdAction::saveOptions(this, SLOT(saveOptions()), coll);
- KStdAction::preferences(this, SLOT(slotShowConfig()), coll);
+ KStdAction::keyBindings (this, TQT_SLOT(configureKeys()), coll);
+ KStdAction::configureToolbars (this, TQT_SLOT(configureToolbars()), coll);
+ KStdAction::saveOptions(this, TQT_SLOT(saveOptions()), coll);
+ KStdAction::preferences(this, TQT_SLOT(slotShowConfig()), coll);
mOptionsToggleLog = new KToggleAction (i18n("Show &Log"), "toggle_log", 0,
- this, SLOT (toggleLog()),
+ this, TQT_SLOT (toggleLog()),
coll, "ksysv_toggle_log");
mOptionsToggleLog->setCheckedState(i18n("Hide &Log"));
// setup Tools menu
mToolsStartService = new KToggleAction (i18n("&Start Service..."), "ksysv_start", 0,
- mStartDlg, SLOT (toggle()),
+ mStartDlg, TQT_SLOT (toggle()),
coll, "ksysv_start_service");
mToolsStopService = new KToggleAction (i18n("&Stop Service..."), "ksysv_stop", 0,
- mStopDlg, SLOT (toggle()),
+ mStopDlg, TQT_SLOT (toggle()),
coll, "ksysv_stop_service");
mToolsRestartService = new KToggleAction (i18n("&Restart Service..."), 0,
- mRestartDlg, SLOT (toggle()),
+ mRestartDlg, TQT_SLOT (toggle()),
coll, "ksysv_restart_service");
mToolsEditService = new KToggleAction (i18n("&Edit Service..."), 0,
- mEditDlg, SLOT (toggle()),
+ mEditDlg, TQT_SLOT (toggle()),
coll, "ksysv_edit_service");
createGUI(xmlFile());
@@ -390,36 +390,36 @@ void KSVTopLevel::initStatusBar()
{
KStatusBar* status = statusBar();
- QHBox* visBox = new QHBox (status, "visBox");
- QButtonGroup* group = new QButtonGroup (this, "visButtonGroup");
+ TQHBox* visBox = new TQHBox (status, "visBox");
+ TQButtonGroup* group = new TQButtonGroup (this, "visButtonGroup");
group->hide();
- connect (group, SIGNAL (clicked (int)), this, SLOT (toggleRunlevel (int)));
+ connect (group, TQT_SIGNAL (clicked (int)), this, TQT_SLOT (toggleRunlevel (int)));
- QWhatsThis::add (visBox, i18n ("<p>Click on the checkboxes to <strong>show</strong> or "\
+ TQWhatsThis::add (visBox, i18n ("<p>Click on the checkboxes to <strong>show</strong> or "\
"<strong>hide</strong> runlevels.</p> " \
"<p>The list of currently visible runlevels is saved "\
"when you use the <strong>Save Options command</strong>.</p>"));
- QToolTip::add (visBox, i18n ("Show only the selected runlevels"));
+ TQToolTip::add (visBox, i18n ("Show only the selected runlevels"));
- new QLabel (i18n("Show runlevels:"), visBox, "visLabel");
+ new TQLabel (i18n("Show runlevels:"), visBox, "visLabel");
for (int i = 0; i < ksv::runlevelNumber; ++i)
{
- QString label; label.setNum (i);
+ TQString label; label.setNum (i);
- mVisible[i] = new QCheckBox (label, visBox, label.latin1());
+ mVisible[i] = new TQCheckBox (label, visBox, label.latin1());
mVisible[i]->setChecked (mConfig->showRunlevel (i));
group->insert (mVisible[i]);
}
- QHBox* authIconBox = new QHBox (status, "AuthIconBox");
- QWidget* strut = new QWidget (authIconBox, "Strut");
+ TQHBox* authIconBox = new TQHBox (status, "AuthIconBox");
+ TQWidget* strut = new TQWidget (authIconBox, "Strut");
strut->setFixedWidth (KDialog::spacingHint());
mAuth = new RunlevelAuthIcon (mConfig->scriptPath(), mConfig->runlevelPath(), authIconBox);
- connect (mAuth, SIGNAL (authChanged(bool)), mView, SLOT(multiplexEnabled(bool)));
- connect (mAuth, SIGNAL (authChanged(bool)), this, SLOT(writingEnabled(bool)));
+ connect (mAuth, TQT_SIGNAL (authChanged(bool)), mView, TQT_SLOT(multiplexEnabled(bool)));
+ connect (mAuth, TQT_SIGNAL (authChanged(bool)), this, TQT_SLOT(writingEnabled(bool)));
- QWhatsThis::add (authIconBox, i18n ("<p>If the lock is closed <img src=\"user|ksysv_locked\"/>, "\
+ TQWhatsThis::add (authIconBox, i18n ("<p>If the lock is closed <img src=\"user|ksysv_locked\"/>, "\
"you don't have the right " \
"<strong>permissions</strong> to edit the init configuration.</p>" \
"<p>Either restart %1 as root (or another more privileged user), " \
@@ -444,20 +444,20 @@ void KSVTopLevel::slotShowConfig()
{
mPreferences = KSVPreferences::self();
- connect (mPreferences, SIGNAL (updateColors ()),
- this, SLOT (updateColors ()));
+ connect (mPreferences, TQT_SIGNAL (updateColors ()),
+ this, TQT_SLOT (updateColors ()));
- connect (mPreferences, SIGNAL (updateServicesPath ()),
- this, SLOT (updateServicesPath ()));
+ connect (mPreferences, TQT_SIGNAL (updateServicesPath ()),
+ this, TQT_SLOT (updateServicesPath ()));
- connect (mPreferences, SIGNAL (updateRunlevelsPath ()),
- this, SLOT (updateRunlevelsPath ()));
+ connect (mPreferences, TQT_SIGNAL (updateRunlevelsPath ()),
+ this, TQT_SLOT (updateRunlevelsPath ()));
- connect (mPreferences, SIGNAL (updateFonts ()),
- mView, SLOT (repaintRunlevels ()));
+ connect (mPreferences, TQT_SIGNAL (updateFonts ()),
+ mView, TQT_SLOT (repaintRunlevels ()));
}
-// mPreferences->setInitialSize (QSize (400,300), true);
+// mPreferences->setInitialSize (TQSize (400,300), true);
mPreferences->exec();
}
@@ -497,7 +497,7 @@ void KSVTopLevel::saveOptions()
mConfig->writeSettings();
}
-void KSVTopLevel::slotUpdateRunning (const QString& text)
+void KSVTopLevel::slotUpdateRunning (const TQString& text)
{
statusBar()->changeItem(text, Status::Changed);
}
@@ -563,7 +563,7 @@ void KSVTopLevel::setChanged (bool val)
mFileSave->setEnabled (val);
// update statusbar
- statusBar()->changeItem(val ? i18n(" Changed") : QString::null, Status::Changed);
+ statusBar()->changeItem(val ? i18n(" Changed") : TQString::null, Status::Changed);
// clear messages
statusBar()->clear();
@@ -632,32 +632,32 @@ void KSVTopLevel::print()
// prt.setDocName(kapp->aboutData()->programName() + " Configuration");
// prt.setCreator(kapp->aboutData()->programName());
-// static QPrintDialog* dlg = new QPrintDialog (&prt, this, "KSysV Print Dialog");
+// static TQPrintDialog* dlg = new TQPrintDialog (&prt, this, "KSysV Print Dialog");
// dlg->setCaption(kapp->makeStdCaption (i18n("Print")));
-// if (dlg->exec() == QDialog::Accepted)
+// if (dlg->exec() == TQDialog::Accepted)
// {
// int y = 10;
-// QPainter p;
+// TQPainter p;
// p.begin( &prt );
-// QPaintDeviceMetrics metrics (&prt);
+// TQPaintDeviceMetrics metrics (&prt);
-// p.setFont (QFont("courier", 20, QFont::Bold));
-// QFontMetrics fm = p.fontMetrics();
+// p.setFont (TQFont("courier", 20, TQFont::Bold));
+// TQFontMetrics fm = p.fontMetrics();
// p.drawText (10, y, i18n("%1 Configuration of %2")
// .arg (kapp->aboutData()->programName())
// .arg (ksv::hostname()));
// y += fm.lineSpacing();
-// p.drawText (10, y, QDateTime::currentDateTime().toString());
+// p.drawText (10, y, TQDateTime::currentDateTime().toString());
// y += fm.lineSpacing() * 2; // an extra empty line
// for (int i = 0; i < ksv::runlevelNumber; ++i)
// {
-// p.setFont (QFont("courier", 16, QFont::Bold));
-// QFontMetrics fm = p.fontMetrics();
+// p.setFont (TQFont("courier", 16, TQFont::Bold));
+// TQFontMetrics fm = p.fontMetrics();
// p.drawText (10, y, i18n ("Runlevel %1").arg(i));
// y += fm.lineSpacing();
@@ -669,10 +669,10 @@ void KSVTopLevel::print()
// checkPage
-// p.setFont (QFont("courier", 10));
+// p.setFont (TQFont("courier", 10));
// fm = p.fontMetrics();
-// for (QListViewItemIterator it (mView->startRL[i]);
+// for (TQListViewItemIterator it (mView->startRL[i]);
// it.current();
// ++it)
// {
@@ -686,7 +686,7 @@ void KSVTopLevel::print()
// }
-// p.setFont (QFont("courier", 16, QFont::Bold));
+// p.setFont (TQFont("courier", 16, TQFont::Bold));
// fm = p.fontMetrics();
// y += fm.lineSpacing(); // an extra empty line
// p.drawText (10, y, i18n ("Stopped Services"));
@@ -694,10 +694,10 @@ void KSVTopLevel::print()
// checkPage
-// p.setFont (QFont("courier", 10));
+// p.setFont (TQFont("courier", 10));
// fm = p.fontMetrics();
-// for (QListViewItemIterator it (mView->stopRL[i]);
+// for (TQListViewItemIterator it (mView->stopRL[i]);
// it.current();
// ++it)
// {
@@ -710,22 +710,22 @@ void KSVTopLevel::print()
// }
// checkPage
-// p.setFont (QFont("courier", 16, QFont::Bold));
+// p.setFont (TQFont("courier", 16, TQFont::Bold));
// fm = p.fontMetrics();
// y += fm.lineSpacing() * 3; // two extra empty line
// }
-// // QStringList lines = QStringList::split ('\n', mView->log(), true);
-// // for(QStringList::Iterator it = lines.begin();
+// // TQStringList lines = TQStringList::split ('\n', mView->log(), true);
+// // for(TQStringList::Iterator it = lines.begin();
// // it != lines.end();
// // ++it)
// // {
// // y += fm.ascent();
-// // QString line = *it;
+// // TQString line = *it;
// // if (line.isNull())
// // line = " ";
-// // line.replace( QRegExp("\t"), " " );
+// // line.replace( TQRegExp("\t"), " " );
// // strncpy(buf,line.data(),160);
@@ -754,33 +754,33 @@ void KSVTopLevel::printLog()
{
KBusyManager::self()->setBusy (true);
- QPainter p (prt);
- QPaintDeviceMetrics pm (prt);
+ TQPainter p (prt);
+ TQPaintDeviceMetrics pm (prt);
const int height = pm.height();
const int width = pm.width();
- QStringList lines = QStringList::split ('\n', mView->xmlLog(), true);
- QStringList::Iterator line = lines.begin();
+ TQStringList lines = TQStringList::split ('\n', mView->xmlLog(), true);
+ TQStringList::Iterator line = lines.begin();
int y = 0;
{
- QSimpleRichText rheading (i18n("<h1>KDE Sys-V Init Editor Log</h1>"),
- QFont("times"), QString::null, ksv::styleSheet(),
- QMimeSourceFactory::defaultFactory());
+ TQSimpleRichText rheading (i18n("<h1>KDE Sys-V Init Editor Log</h1>"),
+ TQFont("times"), TQString::null, ksv::styleSheet(),
+ TQMimeSourceFactory::defaultFactory());
rheading.setWidth (&p, width);
int tmp_h = rheading.height();
- QRegion region (0, y, width, tmp_h);
+ TQRegion region (0, y, width, tmp_h);
rheading.draw (&p, 0, y, region, colorGroup(), 0L);
y += tmp_h;
- QSimpleRichText rdate (i18n("<h3>Printed on %1</h3><br/><br/>").arg(KGlobal::locale()->formatDateTime(QDateTime::currentDateTime())),
- QFont("times"), QString::null, ksv::styleSheet(),
- QMimeSourceFactory::defaultFactory());
+ TQSimpleRichText rdate (i18n("<h3>Printed on %1</h3><br/><br/>").arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime())),
+ TQFont("times"), TQString::null, ksv::styleSheet(),
+ TQMimeSourceFactory::defaultFactory());
rdate.setWidth (&p, width);
tmp_h = rdate.height();
- QRegion r2 (0, y, width, tmp_h);
+ TQRegion r2 (0, y, width, tmp_h);
rdate.draw (&p, 0, y, r2, colorGroup(), 0L);
y += tmp_h;
@@ -790,15 +790,15 @@ void KSVTopLevel::printLog()
{
while (y < height)
{
- QSimpleRichText rich (*line, QFont("times"), QString::null, ksv::styleSheet(),
- QMimeSourceFactory::defaultFactory());
+ TQSimpleRichText rich (*line, TQFont("times"), TQString::null, ksv::styleSheet(),
+ TQMimeSourceFactory::defaultFactory());
rich.setWidth (&p, width);
int tmp_h = rich.height();
if (y + tmp_h > height)
break;
- QRegion region (0, y, width, tmp_h);
+ TQRegion region (0, y, width, tmp_h);
rich.draw (&p, 0, y, region, colorGroup(), 0L);
y += tmp_h;
@@ -842,7 +842,7 @@ void KSVTopLevel::catchCannotGenerateNumber()
5000);
}
-void KSVTopLevel::closeEvent (QCloseEvent* e)
+void KSVTopLevel::closeEvent (TQCloseEvent* e)
{
if (KBusyManager::self()->isBusy())
{
@@ -890,7 +890,7 @@ void KSVTopLevel::dispatchEdit ()
}
else
{
- QMimeSource* mime = kapp->clipboard()->data();
+ TQMimeSource* mime = kapp->clipboard()->data();
if (mime && mime->provides ("application/x-ksysv"))
setPaste (true);
@@ -922,23 +922,23 @@ void KSVTopLevel::disableRedo ()
void KSVTopLevel::slotSaveLog()
{
- static const QString& filter = ksv::logFileFilter();
- static const QString& ext = ksv::logFileExtension();
- QString filename = KFileDialog::getSaveFileName(0L, filter, this);
+ static const TQString& filter = ksv::logFileFilter();
+ static const TQString& ext = ksv::logFileExtension();
+ TQString filename = KFileDialog::getSaveFileName(0L, filter, this);
if (filename.isEmpty())
return;
else if (filename.right(ext.length()) != ext)
filename += ext;
- QFile file(filename);
+ TQFile file(filename);
file.open( IO_WriteOnly | IO_Raw );
- QTextStream s(&file);
+ TQTextStream s(&file);
s << "KDE System V Init Editor"
<< endl
- << QDateTime::currentDateTime().toString()
+ << TQDateTime::currentDateTime().toString()
<< endl << endl
<< mView->log()
<< endl;
@@ -981,7 +981,7 @@ void KSVTopLevel::configureKeys ()
void KSVTopLevel::configureToolbars ()
{
KEditToolbar dlg(filteredActions(), xmlFile(), true, this);
- connect(&dlg, SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() ));
+ connect(&dlg, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ));
dlg.exec();
}
@@ -1034,21 +1034,21 @@ void KSVTopLevel::toggleRunlevel (int index)
void KSVTopLevel::saveAs ()
{
- static const QString& filter = ksv::nativeFileFilter();
- static const QString& ext = ksv::nativeFileExtension();
- QString filename = KFileDialog::getSaveFileName(0L, filter, this);
+ static const TQString& filter = ksv::nativeFileFilter();
+ static const TQString& ext = ksv::nativeFileExtension();
+ TQString filename = KFileDialog::getSaveFileName(0L, filter, this);
if (filename.isEmpty())
return;
else if (filename.right(ext.length()) != ext)
filename += ext;
- QFile file(filename);
+ TQFile file(filename);
// we're busy
KBusyManager::self()->setBusy (true);
file.open (IO_WriteOnly | IO_Raw);
- QDataStream s (&file);
+ TQDataStream s (&file);
if (ksv::IO::saveConfiguration (s, mView->startRL, mView->stopRL))
{
@@ -1066,19 +1066,19 @@ void KSVTopLevel::saveAs ()
void KSVTopLevel::load ()
{
- static const QString& filter = ksv::nativeFileFilter();
- QString filename = KFileDialog::getOpenFileName(0L, filter, this);
+ static const TQString& filter = ksv::nativeFileFilter();
+ TQString filename = KFileDialog::getOpenFileName(0L, filter, this);
if (filename.isEmpty())
return;
- QFile file(filename);
+ TQFile file(filename);
KBusyManager::self()->setBusy (true);
file.open (IO_ReadOnly | IO_Raw);
- QDataStream s (&file);
- QValueList<KSVData>* startLists = new QValueList<KSVData>[ksv::runlevelNumber];
- QValueList<KSVData>* stopLists = new QValueList<KSVData>[ksv::runlevelNumber];
+ TQDataStream s (&file);
+ TQValueList<KSVData>* startLists = new TQValueList<KSVData>[ksv::runlevelNumber];
+ TQValueList<KSVData>* stopLists = new TQValueList<KSVData>[ksv::runlevelNumber];
if (ksv::IO::loadSavedConfiguration (s, startLists, stopLists))
{