summaryrefslogtreecommitdiffstats
path: root/kalarm/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm/mainwindow.cpp')
-rw-r--r--kalarm/mainwindow.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp
index 07e976c6a..34b13e5ff 100644
--- a/kalarm/mainwindow.cpp
+++ b/kalarm/mainwindow.cpp
@@ -182,7 +182,7 @@ MainWindow::~MainWindow()
else
theApp()->trayWindow()->removeWindow(this);
}
- MinuteTimer::disconnect(this);
+ MinuteTimer::disconnect(TQT_TQOBJECT(this));
mMinuteTimerActive = false; // to ensure that setUpdateTimer() works correctly
setUpdateTimer();
MainWindow* main = mainMainWindow();
@@ -294,7 +294,7 @@ void MainWindow::show()
// Show error message now that the main window has been displayed.
// Waiting until now lets the user easily associate the message with
// the main window which is faulty.
- KMessageBox::error(this, i18n("Failure to create menus\n(perhaps %1 missing or corrupted)").arg(TQString::tqfromLatin1(UI_FILE)));
+ KMessageBox::error(this, i18n("Failure to create menus\n(perhaps %1 missing or corrupted)").tqarg(TQString::tqfromLatin1(UI_FILE)));
mMenuError = false;
}
}
@@ -326,55 +326,55 @@ void MainWindow::columnsReordered()
void MainWindow::initActions()
{
KActionCollection* actions = actionCollection();
- mActionTemplates = new KAction(i18n("&Templates..."), 0, this, TQT_SLOT(slotTemplates()), actions, "templates");
- mActionNew = KAlarm::createNewAlarmAction(i18n("&New..."), this, TQT_SLOT(slotNew()), actions, "new");
- mActionNewFromTemplate = KAlarm::createNewFromTemplateAction(i18n("New &From Template"), this, TQT_SLOT(slotNewFromTemplate(const KAEvent&)), actions, "newFromTempl");
- mActionCreateTemplate = new KAction(i18n("Create Tem&plate..."), 0, this, TQT_SLOT(slotNewTemplate()), actions, "createTemplate");
- mActionCopy = new KAction(i18n("&Copy..."), "editcopy", TQt::SHIFT+TQt::Key_Insert, this, TQT_SLOT(slotCopy()), actions, "copy");
- mActionModify = new KAction(i18n("&Edit..."), "edit", TQt::CTRL+TQt::Key_E, this, TQT_SLOT(slotModify()), actions, "modify");
- mActionDelete = new KAction(i18n("&Delete"), "editdelete", TQt::Key_Delete, this, TQT_SLOT(slotDelete()), actions, "delete");
- mActionReactivate = new KAction(i18n("Reac&tivate"), 0, TQt::CTRL+TQt::Key_R, this, TQT_SLOT(slotReactivate()), actions, "undelete");
- mActionEnable = new KAction(TQString(), 0, TQt::CTRL+TQt::Key_B, this, TQT_SLOT(slotEnable()), actions, "disable");
- mActionView = new KAction(i18n("&View"), "viewmag", TQt::CTRL+TQt::Key_W, this, TQT_SLOT(slotView()), actions, "view");
- mActionShowTime = new KToggleAction(i18n_a_ShowAlarmTimes(), TQt::CTRL+TQt::Key_M, this, TQT_SLOT(slotShowTime()), actions, "showAlarmTimes");
+ mActionTemplates = new KAction(i18n("&Templates..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTemplates()), actions, "templates");
+ mActionNew = KAlarm::createNewAlarmAction(i18n("&New..."), TQT_TQOBJECT(this), TQT_SLOT(slotNew()), actions, "new");
+ mActionNewFromTemplate = KAlarm::createNewFromTemplateAction(i18n("New &From Template"), TQT_TQOBJECT(this), TQT_SLOT(slotNewFromTemplate(const KAEvent&)), actions, "newFromTempl");
+ mActionCreateTemplate = new KAction(i18n("Create Tem&plate..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewTemplate()), actions, "createTemplate");
+ mActionCopy = new KAction(i18n("&Copy..."), "editcopy", TQt::SHIFT+TQt::Key_Insert, TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actions, "copy");
+ mActionModify = new KAction(i18n("&Edit..."), "edit", TQt::CTRL+TQt::Key_E, TQT_TQOBJECT(this), TQT_SLOT(slotModify()), actions, "modify");
+ mActionDelete = new KAction(i18n("&Delete"), "editdelete", TQt::Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotDelete()), actions, "delete");
+ mActionReactivate = new KAction(i18n("Reac&tivate"), 0, TQt::CTRL+TQt::Key_R, TQT_TQOBJECT(this), TQT_SLOT(slotReactivate()), actions, "undelete");
+ mActionEnable = new KAction(TQString(), 0, TQt::CTRL+TQt::Key_B, TQT_TQOBJECT(this), TQT_SLOT(slotEnable()), actions, "disable");
+ mActionView = new KAction(i18n("&View"), "viewmag", TQt::CTRL+TQt::Key_W, TQT_TQOBJECT(this), TQT_SLOT(slotView()), actions, "view");
+ mActionShowTime = new KToggleAction(i18n_a_ShowAlarmTimes(), TQt::CTRL+TQt::Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotShowTime()), actions, "showAlarmTimes");
mActionShowTime->setCheckedState(i18n("Hide &Alarm Times"));
- mActionShowTimeTo = new KToggleAction(i18n_o_ShowTimeToAlarms(), TQt::CTRL+TQt::Key_I, this, TQT_SLOT(slotShowTimeTo()), actions, "showTimeToAlarms");
+ mActionShowTimeTo = new KToggleAction(i18n_o_ShowTimeToAlarms(), TQt::CTRL+TQt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotShowTimeTo()), actions, "showTimeToAlarms");
mActionShowTimeTo->setCheckedState(i18n("Hide Time t&o Alarms"));
- mActionShowExpired = new KToggleAction(i18n_e_ShowExpiredAlarms(), "history", TQt::CTRL+TQt::Key_P, this, TQT_SLOT(slotShowExpired()), actions, "showExpiredAlarms");
+ mActionShowExpired = new KToggleAction(i18n_e_ShowExpiredAlarms(), "history", TQt::CTRL+TQt::Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotShowExpired()), actions, "showExpiredAlarms");
mActionShowExpired->setCheckedState(i18n_e_HideExpiredAlarms());
- mActionToggleTrayIcon = new KToggleAction(i18n("Show in System &Tray"), 0, this, TQT_SLOT(slotToggleTrayIcon()), actions, "showInSystemTray");
+ mActionToggleTrayIcon = new KToggleAction(i18n("Show in System &Tray"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTrayIcon()), actions, "showInSystemTray");
mActionToggleTrayIcon->setCheckedState(i18n("Hide From System &Tray"));
- new KAction(i18n("Import &Alarms..."), 0, this, TQT_SLOT(slotImportAlarms()), actions, "importAlarms");
- new KAction(i18n("Import &Birthdays..."), 0, this, TQT_SLOT(slotBirthdays()), actions, "importBirthdays");
- new KAction(i18n("&Refresh Alarms"), "reload", 0, this, TQT_SLOT(slotResetDaemon()), actions, "refreshAlarms");
+ new KAction(i18n("Import &Alarms..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportAlarms()), actions, "importAlarms");
+ new KAction(i18n("Import &Birthdays..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBirthdays()), actions, "importBirthdays");
+ new KAction(i18n("&Refresh Alarms"), "reload", 0, TQT_TQOBJECT(this), TQT_SLOT(slotResetDaemon()), actions, "refreshAlarms");
Daemon::createAlarmEnableAction(actions, "alarmEnable");
if (undoText.isNull())
{
// Get standard texts, etc., for Undo and Redo actions
- KAction* act = KStdAction::undo(this, 0, actions);
+ KAction* act = KStdAction::undo(TQT_TQOBJECT(this), 0, actions);
undoIcon = act->icon();
undoShortcut = act->shortcut();
undoText = act->text();
undoTextStripped = KAlarm::stripAccel(undoText);
delete act;
- act = KStdAction::redo(this, 0, actions);
+ act = KStdAction::redo(TQT_TQOBJECT(this), 0, actions);
redoIcon = act->icon();
redoShortcut = act->shortcut();
redoText = act->text();
redoTextStripped = KAlarm::stripAccel(redoText);
delete act;
}
- mActionUndo = new KToolBarPopupAction(undoText, undoIcon, undoShortcut, this, TQT_SLOT(slotUndo()), actions, "edit_undo");
- mActionRedo = new KToolBarPopupAction(redoText, redoIcon, redoShortcut, this, TQT_SLOT(slotRedo()), actions, "edit_redo");
- KStdAction::tqfind(mListView, TQT_SLOT(slotFind()), actions);
- mActionFindNext = KStdAction::findNext(mListView, TQT_SLOT(slotFindNext()), actions);
- mActionFindPrev = KStdAction::findPrev(mListView, TQT_SLOT(slotFindPrev()), actions);
- KStdAction::selectAll(mListView, TQT_SLOT(slotSelectAll()), actions);
- KStdAction::deselect(mListView, TQT_SLOT(slotDeselect()), actions);
- KStdAction::quit(this, TQT_SLOT(slotQuit()), actions);
- KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()), actions);
- KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbar()), actions);
- KStdAction::preferences(this, TQT_SLOT(slotPreferences()), actions);
+ mActionUndo = new KToolBarPopupAction(undoText, undoIcon, undoShortcut, TQT_TQOBJECT(this), TQT_SLOT(slotUndo()), actions, "edit_undo");
+ mActionRedo = new KToolBarPopupAction(redoText, redoIcon, redoShortcut, TQT_TQOBJECT(this), TQT_SLOT(slotRedo()), actions, "edit_redo");
+ KStdAction::find(TQT_TQOBJECT(mListView), TQT_SLOT(slotFind()), actions);
+ mActionFindNext = KStdAction::findNext(TQT_TQOBJECT(mListView), TQT_SLOT(slotFindNext()), actions);
+ mActionFindPrev = KStdAction::findPrev(TQT_TQOBJECT(mListView), TQT_SLOT(slotFindPrev()), actions);
+ KStdAction::selectAll(TQT_TQOBJECT(mListView), TQT_SLOT(slotSelectAll()), actions);
+ KStdAction::deselect(TQT_TQOBJECT(mListView), TQT_SLOT(slotDeselect()), actions);
+ KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actions);
+ KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureKeys()), actions);
+ KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureToolbar()), actions);
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), actions);
setStandardToolBarMenuEnabled(true);
createGUI(UI_FILE);
@@ -388,7 +388,7 @@ void MainWindow::initActions()
connect(mActionRedo->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotRedoItem(int)));
connect(Undo::instance(), TQT_SIGNAL(changed(const TQString&, const TQString&)), TQT_SLOT(slotUndotqStatus(const TQString&, const TQString&)));
connect(mListView, TQT_SIGNAL(findActive(bool)), TQT_SLOT(slotFindActive(bool)));
- Preferences::connect(TQT_SIGNAL(preferencesChanged()), this, TQT_SLOT(slotPrefsChanged()));
+ Preferences::connect(TQT_SIGNAL(preferencesChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotPrefsChanged()));
connect(theApp(), TQT_SIGNAL(trayIconToggled()), TQT_SLOT(updateTrayIconAction()));
// Set menu item states
@@ -485,13 +485,13 @@ void MainWindow::setUpdateTimer()
{
// Timeout every minute.
needTimer->mMinuteTimerActive = true;
- MinuteTimer::connect(needTimer, TQT_SLOT(slotUpdateTimeTo()));
+ MinuteTimer::connect(TQT_TQOBJECT(needTimer), TQT_SLOT(slotUpdateTimeTo()));
kdDebug(5950) << "MainWindow::setUpdateTimer(): started timer" << endl;
}
else if (!needTimer && timerWindow)
{
timerWindow->mMinuteTimerActive = false;
- MinuteTimer::disconnect(timerWindow);
+ MinuteTimer::disconnect(TQT_TQOBJECT(timerWindow));
kdDebug(5950) << "MainWindow::setUpdateTimer(): stopped timer" << endl;
}
}
@@ -1023,8 +1023,8 @@ void MainWindow::initUndoMenu(KPopupMenu* menu, Undo::Type type)
TQString actText = Undo::actionText(type, id);
TQString descrip = Undo::description(type, id);
TQString text = descrip.isEmpty()
- ? i18n("Undo/Redo [action]", "%1 %2").arg(action).arg(actText)
- : i18n("Undo [action]: message", "%1 %2: %3").arg(action).arg(actText).arg(descrip);
+ ? i18n("Undo/Redo [action]", "%1 %2").tqarg(action).tqarg(actText)
+ : i18n("Undo [action]: message", "%1 %2: %3").tqarg(action).tqarg(actText).tqarg(descrip);
menu->insertItem(text, id);
}
}
@@ -1043,7 +1043,7 @@ void MainWindow::slotUndotqStatus(const TQString& undo, const TQString& redo)
else
{
mActionUndo->setEnabled(true);
- mActionUndo->setText(TQString("%1 %2").arg(undoText).arg(undo));
+ mActionUndo->setText(TQString("%1 %2").tqarg(undoText).tqarg(undo));
}
if (redo.isNull())
{
@@ -1053,7 +1053,7 @@ void MainWindow::slotUndotqStatus(const TQString& undo, const TQString& redo)
else
{
mActionRedo->setEnabled(true);
- mActionRedo->setText(TQString("%1 %2").arg(redoText).arg(redo));
+ mActionRedo->setText(TQString("%1 %2").tqarg(redoText).tqarg(redo));
}
}
@@ -1088,7 +1088,7 @@ void MainWindow::slotConfigureToolbar()
{
saveMainWindowSettings(KGlobal::config(), WINDOW_NAME);
KEditToolbar dlg(factory());
- connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_TQOBJECT(this), TQT_SLOT(slotNewToolbarConfig()));
dlg.exec();
}
@@ -1350,7 +1350,7 @@ void MainWindow::slotContextMenuRequested(TQListViewItem* item, const TQPoint& p
*/
void MainWindow::slotMouseClicked(int button, TQListViewItem* item, const TQPoint& pt, int)
{
- if (button != TQt::RightButton && !item)
+ if (button != Qt::RightButton && !item)
{
kdDebug(5950) << "MainWindow::slotMouseClicked(left)" << endl;
mListView->clearSelection();