summaryrefslogtreecommitdiffstats
path: root/ksysv/TopWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksysv/TopWidget.cpp')
-rw-r--r--ksysv/TopWidget.cpp172
1 files changed, 86 insertions, 86 deletions
diff --git a/ksysv/TopWidget.cpp b/ksysv/TopWidget.cpp
index 2dfa585..43f043a 100644
--- a/ksysv/TopWidget.cpp
+++ b/ksysv/TopWidget.cpp
@@ -113,8 +113,8 @@ KSVTopLevel::KSVTopLevel()
mOpenWith (0L), mOpenDefault (0L),
- mUndoList (new ActionList (TQT_TQOBJECT(this), "UndoList")),
- mRedoList (new ActionList (TQT_TQOBJECT(this), "RedoList")),
+ mUndoList (new ActionList (this, "UndoList")),
+ mRedoList (new ActionList (this, "RedoList")),
mStartDlg (new ServiceDlg (i18n("Start Service"),
i18n("&Choose which service to start:"),
this)),
@@ -139,27 +139,27 @@ KSVTopLevel::KSVTopLevel()
setCentralWidget(mView);
// ensure that the statusbar gets updated correctly
- 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()));
+ connect (mView, TQ_SIGNAL(sigRun(const TQString&)), this, TQ_SLOT(slotUpdateRunning(const TQString&)));
+ connect (mView, TQ_SIGNAL(sigStop()), statusBar(), TQ_SLOT(clear()));
+ connect (mView, TQ_SIGNAL(cannotGenerateNumber()), this, TQ_SLOT(catchCannotGenerateNumber()));
+ connect (mView, TQ_SIGNAL(undoAction(KSVAction*)), this, TQ_SLOT(pushUndoAction(KSVAction*)));
+ connect (mView, TQ_SIGNAL(logChanged()), this, TQ_SLOT(enableLogActions()));
// cut & copy
- connect (mView, TQT_SIGNAL (newOrigin()),
- this, TQT_SLOT (dispatchEdit()));
+ connect (mView, TQ_SIGNAL (newOrigin()),
+ this, TQ_SLOT (dispatchEdit()));
// undo
- connect (mUndoList, TQT_SIGNAL(empty()), this, TQT_SLOT(disableUndo()));
- connect (mUndoList, TQT_SIGNAL(filled()), this, TQT_SLOT(enableUndo()));
+ connect (mUndoList, TQ_SIGNAL(empty()), this, TQ_SLOT(disableUndo()));
+ connect (mUndoList, TQ_SIGNAL(filled()), this, TQ_SLOT(enableUndo()));
// and redo
- connect (mRedoList, TQT_SIGNAL(empty()), this, TQT_SLOT(disableRedo()));
- connect (mRedoList, TQT_SIGNAL(filled()), this, TQT_SLOT(enableRedo()));
+ connect (mRedoList, TQ_SIGNAL(empty()), this, TQ_SLOT(disableRedo()));
+ connect (mRedoList, TQ_SIGNAL(filled()), this, TQ_SLOT(enableRedo()));
// paste
- connect (kapp->clipboard(), TQT_SIGNAL (dataChanged()),
- this, TQT_SLOT (dispatchEdit()));
+ connect (tdeApp->clipboard(), TQ_SIGNAL (dataChanged()),
+ this, TQ_SLOT (dispatchEdit()));
// init mView according to saved preferences
slotReadConfig();
@@ -186,23 +186,23 @@ KSVTopLevel::~KSVTopLevel()
void KSVTopLevel::initTools()
{
- 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)));
+ connect (mStartDlg, TQ_SIGNAL(doAction(const TQString&)),
+ mView, TQ_SLOT(startService(const TQString&)));
+ connect (mStopDlg, TQ_SIGNAL(doAction(const TQString&)),
+ mView, TQ_SLOT(editService(const TQString&)));
+ connect (mRestartDlg, TQ_SIGNAL(doAction(const TQString&)),
+ mView, TQ_SLOT(restartService(const TQString&)));
+ connect (mEditDlg, TQ_SIGNAL(doAction(const TQString&)),
+ mView, TQ_SLOT(editService(const TQString&)));
+
+ connect (mStartDlg, TQ_SIGNAL (display (bool)),
+ this, TQ_SLOT (dispatchStartService (bool)));
+ connect (mStopDlg, TQ_SIGNAL (display (bool)),
+ this, TQ_SLOT (dispatchStopService (bool)));
+ connect (mRestartDlg, TQ_SIGNAL (display (bool)),
+ this, TQ_SLOT (dispatchRestartService (bool)));
+ connect (mEditDlg, TQ_SIGNAL (display (bool)),
+ this, TQ_SLOT (dispatchEditService (bool)));
}
@@ -211,48 +211,48 @@ void KSVTopLevel::initActions ()
TDEActionCollection* coll = actionCollection();
// setup File menu
- mFileRevert = KStdAction::revert (TQT_TQOBJECT(this), TQT_SLOT (slotClearChanges()), coll);
+ mFileRevert = KStdAction::revert (this, TQ_SLOT (slotClearChanges()), coll);
mFileRevert->setText (i18n("Re&vert Configuration"));
- mFileLoad = KStdAction::open (TQT_TQOBJECT(this), TQT_SLOT (load()), coll);
+ mFileLoad = KStdAction::open (this, TQ_SLOT (load()), coll);
mFileLoad->setText (i18n ("&Open..."));
- mFileSave = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotAcceptChanges()), coll);
+ mFileSave = KStdAction::save(this, TQ_SLOT(slotAcceptChanges()), coll);
mFileSave->setText (i18n("&Save Configuration"));
- mFileSaveAs = KStdAction::saveAs (TQT_TQOBJECT(this), TQT_SLOT (saveAs ()), coll);
+ mFileSaveAs = KStdAction::saveAs (this, TQ_SLOT (saveAs ()), coll);
- mFileSaveLog = KStdAction::save (TQT_TQOBJECT(this), TQT_SLOT(slotSaveLog()), coll, "ksysv_save_log");
+ mFileSaveLog = KStdAction::save (this, TQ_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, TQT_SLOT (print()), coll);
+ // mFilePrint = KStdAction::print (this, TQ_SLOT (print()), coll);
- mFilePrintLog = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(printLog()), coll, "ksysv_print_log");
+ mFilePrintLog = KStdAction::print(this, TQ_SLOT(printLog()), coll, "ksysv_print_log");
mFilePrintLog->setText( i18n("&Print Log..."));
mFilePrintLog->setEnabled (false);
- mFileQuit = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), coll);
+ mFileQuit = KStdAction::quit(this, TQ_SLOT(close()), coll);
// setup Edit menu
- mEditUndo = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(editUndo()), coll);
+ mEditUndo = KStdAction::undo(this, TQ_SLOT(editUndo()), coll);
mEditUndo->setEnabled (false);
- mEditRedo = KStdAction::redo(TQT_TQOBJECT(this), TQT_SLOT(editRedo()), coll);
+ mEditRedo = KStdAction::redo(this, TQ_SLOT(editRedo()), coll);
mEditUndo->setEnabled (false);
- 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()),
+ mEditCut = KStdAction::cut(this, TQ_SLOT(editCut()), coll);
+ mEditCopy = KStdAction::copy(this, TQ_SLOT(editCopy()), coll);
+ mEditPaste = KStdAction::paste(this, TQ_SLOT(editPaste()), coll);
+ mPasteAppend = KStdAction::paste (this, TQ_SLOT (pasteAppend()),
coll, "ksysv_paste_append");
mEditProperties = new TDEAction (i18n("P&roperties"), 0,
- TQT_TQOBJECT(this), TQT_SLOT(properties()),
+ this, TQ_SLOT(properties()),
coll, "ksysv_properties");
mOpenDefault = new TDEAction (i18n ("&Open"), 0,
- TQT_TQOBJECT(this), TQT_SLOT (editService()),
+ this, TQ_SLOT (editService()),
coll, "ksysv_open_service");
mOpenWith = new TDEActionMenu (i18n ("Open &With"), coll, "ksysv_open_with");
@@ -260,30 +260,30 @@ void KSVTopLevel::initActions ()
// setup Settings menu
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- 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);
+ KStdAction::keyBindings (this, TQ_SLOT(configureKeys()), coll);
+ KStdAction::configureToolbars (this, TQ_SLOT(configureToolbars()), coll);
+ KStdAction::saveOptions(this, TQ_SLOT(saveOptions()), coll);
+ KStdAction::preferences(this, TQ_SLOT(slotShowConfig()), coll);
mOptionsToggleLog = new TDEToggleAction (i18n("Show &Log"), "toggle_log", 0,
- TQT_TQOBJECT(this), TQT_SLOT (toggleLog()),
+ this, TQ_SLOT (toggleLog()),
coll, "ksysv_toggle_log");
mOptionsToggleLog->setCheckedState(i18n("Hide &Log"));
// setup Tools menu
mToolsStartService = new TDEToggleAction (i18n("&Start Service..."), "ksysv_start", 0,
- TQT_TQOBJECT(mStartDlg), TQT_SLOT (toggle()),
+ mStartDlg, TQ_SLOT (toggle()),
coll, "ksysv_start_service");
mToolsStopService = new TDEToggleAction (i18n("&Stop Service..."), "ksysv_stop", 0,
- TQT_TQOBJECT(mStopDlg), TQT_SLOT (toggle()),
+ mStopDlg, TQ_SLOT (toggle()),
coll, "ksysv_stop_service");
mToolsRestartService = new TDEToggleAction (i18n("&Restart Service..."), 0,
- TQT_TQOBJECT(mRestartDlg), TQT_SLOT (toggle()),
+ mRestartDlg, TQ_SLOT (toggle()),
coll, "ksysv_restart_service");
mToolsEditService = new TDEToggleAction (i18n("&Edit Service..."), 0,
- TQT_TQOBJECT(mEditDlg), TQT_SLOT (toggle()),
+ mEditDlg, TQ_SLOT (toggle()),
coll, "ksysv_edit_service");
createGUI(xmlFile());
@@ -295,7 +295,7 @@ bool KSVTopLevel::queryExit()
uint res = KMessageBox::Continue;
if (mChanged) {
- res = KMessageBox::warningContinueCancel(kapp->mainWidget(),
+ res = KMessageBox::warningContinueCancel(tdeApp->mainWidget(),
i18n("There are unsaved changes. Are you sure you want to quit?"),
i18n("Quit"),
KStdGuiItem::quit());
@@ -309,7 +309,7 @@ void KSVTopLevel::slotClearChanges()
{
if (mChanged &&
KMessageBox::Yes ==
- KMessageBox::questionYesNo(kapp->mainWidget(),
+ KMessageBox::questionYesNo(tdeApp->mainWidget(),
i18n("Do you really want to revert all unsaved changes?"),
i18n("Revert Configuration"),
i18n("&Revert"),
@@ -322,7 +322,7 @@ void KSVTopLevel::slotClearChanges()
void KSVTopLevel::slotAcceptChanges() {
if (KMessageBox::Continue ==
- KMessageBox::warningContinueCancel(kapp->mainWidget(),
+ KMessageBox::warningContinueCancel(tdeApp->mainWidget(),
i18n("You're about to save the changes made to your init "
"configuration. Wrong settings can "
"make your system hang on startup.\n"
@@ -393,7 +393,7 @@ void KSVTopLevel::initStatusBar()
TQHBox* visBox = new TQHBox (status, "visBox");
TQButtonGroup* group = new TQButtonGroup (this, "visButtonGroup");
group->hide();
- connect (group, TQT_SIGNAL (clicked (int)), this, TQT_SLOT (toggleRunlevel (int)));
+ connect (group, TQ_SIGNAL (clicked (int)), this, TQ_SLOT (toggleRunlevel (int)));
TQWhatsThis::add (visBox, i18n ("<p>Click on the checkboxes to <strong>show</strong> or "\
"<strong>hide</strong> runlevels.</p> " \
@@ -416,8 +416,8 @@ void KSVTopLevel::initStatusBar()
TQWidget* strut = new TQWidget (authIconBox, "Strut");
strut->setFixedWidth (KDialog::spacingHint());
mAuth = new RunlevelAuthIcon (mConfig->scriptPath(), mConfig->runlevelPath(), authIconBox);
- connect (mAuth, TQT_SIGNAL (authChanged(bool)), mView, TQT_SLOT(multiplexEnabled(bool)));
- connect (mAuth, TQT_SIGNAL (authChanged(bool)), this, TQT_SLOT(writingEnabled(bool)));
+ connect (mAuth, TQ_SIGNAL (authChanged(bool)), mView, TQ_SLOT(multiplexEnabled(bool)));
+ connect (mAuth, TQ_SIGNAL (authChanged(bool)), this, TQ_SLOT(writingEnabled(bool)));
TQWhatsThis::add (authIconBox, i18n ("<p>If the lock is closed <img src=\"user|ksysv_locked\"/>, "\
"you don't have the right " \
@@ -426,7 +426,7 @@ void KSVTopLevel::initStatusBar()
"or ask your sysadmin to install %1 <em>suid</em> or " \
"<em>sgid</em>.</p><p>The latter way is <strong>not</strong> "\
"recommended though, due to security issues.</p>")
- .arg (kapp->aboutData()->programName()).arg(kapp->aboutData()->programName()));
+ .arg (tdeApp->aboutData()->programName()).arg(tdeApp->aboutData()->programName()));
authIconBox->setMinimumSize (authIconBox->minimumSizeHint());
visBox->setMinimumSize (visBox->minimumSizeHint());
@@ -444,17 +444,17 @@ void KSVTopLevel::slotShowConfig()
{
mPreferences = KSVPreferences::self();
- connect (mPreferences, TQT_SIGNAL (updateColors ()),
- this, TQT_SLOT (updateColors ()));
+ connect (mPreferences, TQ_SIGNAL (updateColors ()),
+ this, TQ_SLOT (updateColors ()));
- connect (mPreferences, TQT_SIGNAL (updateServicesPath ()),
- this, TQT_SLOT (updateServicesPath ()));
+ connect (mPreferences, TQ_SIGNAL (updateServicesPath ()),
+ this, TQ_SLOT (updateServicesPath ()));
- connect (mPreferences, TQT_SIGNAL (updateRunlevelsPath ()),
- this, TQT_SLOT (updateRunlevelsPath ()));
+ connect (mPreferences, TQ_SIGNAL (updateRunlevelsPath ()),
+ this, TQ_SLOT (updateRunlevelsPath ()));
- connect (mPreferences, TQT_SIGNAL (updateFonts ()),
- mView, TQT_SLOT (repaintRunlevels ()));
+ connect (mPreferences, TQ_SIGNAL (updateFonts ()),
+ mView, TQ_SLOT (repaintRunlevels ()));
}
// mPreferences->setInitialSize (TQSize (400,300), true);
@@ -508,7 +508,7 @@ void KSVTopLevel::editCut() {
if (list && list->currentItem())
{
KSVDrag* mime = new KSVDrag (*list->currentItem()->data(), 0L, 0L);
- kapp->clipboard()->setData (mime);
+ tdeApp->clipboard()->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<KSVItem*> (list->currentItem()), 0L, 0L);
- kapp->clipboard()->setData (mime);
+ tdeApp->clipboard()->setData (mime);
}
}
@@ -537,7 +537,7 @@ void KSVTopLevel::editPaste()
{
KSVData data;
- if (KSVDrag::decodeNative (kapp->clipboard()->data(), data))
+ if (KSVDrag::decodeNative (tdeApp->clipboard()->data(), data))
{
KSVAction* action = 0L;
@@ -629,11 +629,11 @@ void KSVTopLevel::print()
// #define checkPage if (metrics.height() - y < fm.lineSpacing()) prt.newPage();
// static KPrinter prt;
-// prt.setDocName(kapp->aboutData()->programName() + " Configuration");
-// prt.setCreator(kapp->aboutData()->programName());
+// prt.setDocName(tdeApp->aboutData()->programName() + " Configuration");
+// prt.setCreator(tdeApp->aboutData()->programName());
// static TQPrintDialog* dlg = new TQPrintDialog (&prt, this, "KSysV Print Dialog");
-// dlg->setCaption(kapp->makeStdCaption (i18n("Print")));
+// dlg->setCaption(tdeApp->makeStdCaption (i18n("Print")));
// if (dlg->exec() == TQDialog::Accepted)
// {
@@ -647,7 +647,7 @@ void KSVTopLevel::print()
// TQFontMetrics fm = p.fontMetrics();
// p.drawText (10, y, i18n("%1 Configuration of %2")
-// .arg (kapp->aboutData()->programName())
+// .arg (tdeApp->aboutData()->programName())
// .arg (ksv::hostname()));
// y += fm.lineSpacing();
@@ -747,8 +747,8 @@ void KSVTopLevel::print()
void KSVTopLevel::printLog()
{
KPrinter *prt = new KPrinter();
- prt->setDocName(kapp->aboutData()->programName() + " Log File");
- prt->setCreator(kapp->aboutData()->programName());
+ prt->setDocName(tdeApp->aboutData()->programName() + " Log File");
+ prt->setCreator(tdeApp->aboutData()->programName());
if (prt->setup(this, i18n("Print Log File")))
{
@@ -807,7 +807,7 @@ void KSVTopLevel::printLog()
if (line == lines.end())
goto printing_finished;
- kapp->processEvents();
+ tdeApp->processEvents();
}
prt->newPage();
@@ -826,7 +826,7 @@ void KSVTopLevel::printLog()
void KSVTopLevel::catchCannotGenerateNumber()
{
if (mConfig->showMessage (ksv::CouldNotGenerateSortingNumber)) {
- KMessageBox::information (kapp->mainWidget(),
+ KMessageBox::information (tdeApp->mainWidget(),
i18n ("<p>Unable to generate a valid " \
"sorting number for this position. This means " \
"that there was no number available between "\
@@ -890,7 +890,7 @@ void KSVTopLevel::dispatchEdit ()
}
else
{
- TQMimeSource* mime = kapp->clipboard()->data();
+ TQMimeSource* mime = tdeApp->clipboard()->data();
if (mime && mime->provides ("application/x-ksysv"))
setPaste (true);
@@ -954,7 +954,7 @@ void KSVTopLevel::enableLogActions ()
void KSVTopLevel::setCaption (bool changed)
{
- setPlainCaption (kapp->makeStdCaption(KNetwork::KResolver::localHostName(), true, changed));
+ setPlainCaption (tdeApp->makeStdCaption(KNetwork::KResolver::localHostName(), true, changed));
}
TDEActionCollection* KSVTopLevel::filteredActions ()
@@ -981,7 +981,7 @@ void KSVTopLevel::configureKeys ()
void KSVTopLevel::configureToolbars ()
{
KEditToolbar dlg(filteredActions(), xmlFile(), true, this);
- connect(&dlg, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ));
+ connect(&dlg, TQ_SIGNAL( newToolbarConfig() ), this, TQ_SLOT( slotNewToolbarConfig() ));
dlg.exec();
}