summaryrefslogtreecommitdiffstats
path: root/kalarm/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kalarm/mainwindow.cpp')
-rw-r--r--kalarm/mainwindow.cpp106
1 files changed, 53 insertions, 53 deletions
diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp
index d0791216..66a93a9c 100644
--- a/kalarm/mainwindow.cpp
+++ b/kalarm/mainwindow.cpp
@@ -149,14 +149,14 @@ MainWindow::MainWindow(bool restored)
mListView->refresh(); // populate the alarm list
mListView->clearSelection();
- connect(mListView, TQT_SIGNAL(itemDeleted()), TQT_SLOT(slotDeletion()));
- connect(mListView, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelection()));
- connect(mListView, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)),
- TQT_SLOT(slotContextMenuRequested(TQListViewItem*, const TQPoint&, int)));
- connect(mListView, TQT_SIGNAL(mouseButtonClicked(int, TQListViewItem*, const TQPoint&, int)),
- TQT_SLOT(slotMouseClicked(int, TQListViewItem*, const TQPoint&, int)));
- connect(mListView, TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(slotDoubleClicked(TQListViewItem*)));
- connect(mListView->header(), TQT_SIGNAL(indexChange(int, int, int)), TQT_SLOT(columnsReordered()));
+ connect(mListView, TQ_SIGNAL(itemDeleted()), TQ_SLOT(slotDeletion()));
+ connect(mListView, TQ_SIGNAL(selectionChanged()), TQ_SLOT(slotSelection()));
+ connect(mListView, TQ_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)),
+ TQ_SLOT(slotContextMenuRequested(TQListViewItem*, const TQPoint&, int)));
+ connect(mListView, TQ_SIGNAL(mouseButtonClicked(int, TQListViewItem*, const TQPoint&, int)),
+ TQ_SLOT(slotMouseClicked(int, TQListViewItem*, const TQPoint&, int)));
+ connect(mListView, TQ_SIGNAL(executed(TQListViewItem*)), TQ_SLOT(slotDoubleClicked(TQListViewItem*)));
+ connect(mListView->header(), TQ_SIGNAL(indexChange(int, int, int)), TQ_SLOT(columnsReordered()));
initActions();
mWindowList.append(this);
@@ -182,7 +182,7 @@ MainWindow::~MainWindow()
else
theApp()->trayWindow()->removeWindow(this);
}
- MinuteTimer::disconnect(TQT_TQOBJECT(this));
+ MinuteTimer::disconnect(this);
mMinuteTimerActive = false; // to ensure that setUpdateTimer() works correctly
setUpdateTimer();
MainWindow* main = mainMainWindow();
@@ -326,70 +326,70 @@ void MainWindow::columnsReordered()
void MainWindow::initActions()
{
TDEActionCollection* actions = actionCollection();
- mActionTemplates = new TDEAction(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 TDEAction(i18n("Create Tem&plate..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewTemplate()), actions, "createTemplate");
- mActionCopy = new TDEAction(i18n("&Copy..."), "edit-copy", TQt::SHIFT+TQt::Key_Insert, TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actions, "copy");
- mActionModify = new TDEAction(i18n("&Edit..."), "edit", TQt::CTRL+TQt::Key_E, TQT_TQOBJECT(this), TQT_SLOT(slotModify()), actions, "modify");
- mActionDelete = new TDEAction(i18n("&Delete"), "edit-delete", TQt::Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotDelete()), actions, "delete");
- mActionReactivate = new TDEAction(i18n("Reac&tivate"), 0, TQt::CTRL+TQt::Key_R, TQT_TQOBJECT(this), TQT_SLOT(slotReactivate()), actions, "undelete");
- mActionEnable = new TDEAction(TQString(), 0, TQt::CTRL+TQt::Key_B, TQT_TQOBJECT(this), TQT_SLOT(slotEnable()), actions, "disable");
- mActionView = new TDEAction(i18n("&View"), "viewmag", TQt::CTRL+TQt::Key_W, TQT_TQOBJECT(this), TQT_SLOT(slotView()), actions, "view");
- mActionShowTime = new TDEToggleAction(i18n_a_ShowAlarmTimes(), TQt::CTRL+TQt::Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotShowTime()), actions, "showAlarmTimes");
+ mActionTemplates = new TDEAction(i18n("&Templates..."), 0, this, TQ_SLOT(slotTemplates()), actions, "templates");
+ mActionNew = KAlarm::createNewAlarmAction(i18n("&New..."), this, TQ_SLOT(slotNew()), actions, "new");
+ mActionNewFromTemplate = KAlarm::createNewFromTemplateAction(i18n("New &From Template"), this, TQ_SLOT(slotNewFromTemplate(const KAEvent&)), actions, "newFromTempl");
+ mActionCreateTemplate = new TDEAction(i18n("Create Tem&plate..."), 0, this, TQ_SLOT(slotNewTemplate()), actions, "createTemplate");
+ mActionCopy = new TDEAction(i18n("&Copy..."), "edit-copy", TQt::SHIFT+TQt::Key_Insert, this, TQ_SLOT(slotCopy()), actions, "copy");
+ mActionModify = new TDEAction(i18n("&Edit..."), "edit", TQt::CTRL+TQt::Key_E, this, TQ_SLOT(slotModify()), actions, "modify");
+ mActionDelete = new TDEAction(i18n("&Delete"), "edit-delete", TQt::Key_Delete, this, TQ_SLOT(slotDelete()), actions, "delete");
+ mActionReactivate = new TDEAction(i18n("Reac&tivate"), 0, TQt::CTRL+TQt::Key_R, this, TQ_SLOT(slotReactivate()), actions, "undelete");
+ mActionEnable = new TDEAction(TQString(), 0, TQt::CTRL+TQt::Key_B, this, TQ_SLOT(slotEnable()), actions, "disable");
+ mActionView = new TDEAction(i18n("&View"), "viewmag", TQt::CTRL+TQt::Key_W, this, TQ_SLOT(slotView()), actions, "view");
+ mActionShowTime = new TDEToggleAction(i18n_a_ShowAlarmTimes(), TQt::CTRL+TQt::Key_M, this, TQ_SLOT(slotShowTime()), actions, "showAlarmTimes");
mActionShowTime->setCheckedState(i18n("Hide &Alarm Times"));
- mActionShowTimeTo = new TDEToggleAction(i18n_o_ShowTimeToAlarms(), TQt::CTRL+TQt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotShowTimeTo()), actions, "showTimeToAlarms");
+ mActionShowTimeTo = new TDEToggleAction(i18n_o_ShowTimeToAlarms(), TQt::CTRL+TQt::Key_I, this, TQ_SLOT(slotShowTimeTo()), actions, "showTimeToAlarms");
mActionShowTimeTo->setCheckedState(i18n("Hide Time t&o Alarms"));
- mActionShowExpired = new TDEToggleAction(i18n_e_ShowExpiredAlarms(), "history", TQt::CTRL+TQt::Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotShowExpired()), actions, "showExpiredAlarms");
+ mActionShowExpired = new TDEToggleAction(i18n_e_ShowExpiredAlarms(), "history", TQt::CTRL+TQt::Key_P, this, TQ_SLOT(slotShowExpired()), actions, "showExpiredAlarms");
mActionShowExpired->setCheckedState(i18n_e_HideExpiredAlarms());
- mActionToggleTrayIcon = new TDEToggleAction(i18n("Show in System &Tray"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTrayIcon()), actions, "showInSystemTray");
+ mActionToggleTrayIcon = new TDEToggleAction(i18n("Show in System &Tray"), 0, this, TQ_SLOT(slotToggleTrayIcon()), actions, "showInSystemTray");
mActionToggleTrayIcon->setCheckedState(i18n("Hide From System &Tray"));
- new TDEAction(i18n("Import &Alarms..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportAlarms()), actions, "importAlarms");
- new TDEAction(i18n("Import &Birthdays..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBirthdays()), actions, "importBirthdays");
- new TDEAction(i18n("&Refresh Alarms"), "reload", 0, TQT_TQOBJECT(this), TQT_SLOT(slotResetDaemon()), actions, "refreshAlarms");
+ new TDEAction(i18n("Import &Alarms..."), 0, this, TQ_SLOT(slotImportAlarms()), actions, "importAlarms");
+ new TDEAction(i18n("Import &Birthdays..."), 0, this, TQ_SLOT(slotBirthdays()), actions, "importBirthdays");
+ new TDEAction(i18n("&Refresh Alarms"), "reload", 0, this, TQ_SLOT(slotResetDaemon()), actions, "refreshAlarms");
Daemon::createAlarmEnableAction(actions, "alarmEnable");
if (undoText.isNull())
{
// Get standard texts, etc., for Undo and Redo actions
- TDEAction* act = KStdAction::undo(TQT_TQOBJECT(this), 0, actions);
+ TDEAction* act = KStdAction::undo(this, 0, actions);
undoIcon = act->icon();
undoShortcut = act->shortcut();
undoText = act->text();
undoTextStripped = KAlarm::stripAccel(undoText);
delete act;
- act = KStdAction::redo(TQT_TQOBJECT(this), 0, actions);
+ act = KStdAction::redo(this, 0, actions);
redoIcon = act->icon();
redoShortcut = act->shortcut();
redoText = act->text();
redoTextStripped = KAlarm::stripAccel(redoText);
delete act;
}
- mActionUndo = new TDEToolBarPopupAction(undoText, undoIcon, undoShortcut, TQT_TQOBJECT(this), TQT_SLOT(slotUndo()), actions, "edit_undo");
- mActionRedo = new TDEToolBarPopupAction(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);
+ mActionUndo = new TDEToolBarPopupAction(undoText, undoIcon, undoShortcut, this, TQ_SLOT(slotUndo()), actions, "edit_undo");
+ mActionRedo = new TDEToolBarPopupAction(redoText, redoIcon, redoShortcut, this, TQ_SLOT(slotRedo()), actions, "edit_redo");
+ KStdAction::find(mListView, TQ_SLOT(slotFind()), actions);
+ mActionFindNext = KStdAction::findNext(mListView, TQ_SLOT(slotFindNext()), actions);
+ mActionFindPrev = KStdAction::findPrev(mListView, TQ_SLOT(slotFindPrev()), actions);
+ KStdAction::selectAll(mListView, TQ_SLOT(slotSelectAll()), actions);
+ KStdAction::deselect(mListView, TQ_SLOT(slotDeselect()), actions);
+ KStdAction::quit(this, TQ_SLOT(slotQuit()), actions);
+ KStdAction::keyBindings(this, TQ_SLOT(slotConfigureKeys()), actions);
+ KStdAction::configureToolbars(this, TQ_SLOT(slotConfigureToolbar()), actions);
+ KStdAction::preferences(this, TQ_SLOT(slotPreferences()), actions);
setStandardToolBarMenuEnabled(true);
createGUI(UI_FILE);
mContextMenu = static_cast<TDEPopupMenu*>(factory()->container("listContext", this));
mActionsMenu = static_cast<TDEPopupMenu*>(factory()->container("actions", this));
mMenuError = (!mContextMenu || !mActionsMenu);
- connect(mActionsMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(updateActionsMenu()));
- connect(mActionUndo->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotInitUndoMenu()));
- connect(mActionUndo->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotUndoItem(int)));
- connect(mActionRedo->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotInitRedoMenu()));
- connect(mActionRedo->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotRedoItem(int)));
- connect(Undo::instance(), TQT_SIGNAL(changed(const TQString&, const TQString&)), TQT_SLOT(slotUndoStatus(const TQString&, const TQString&)));
- connect(mListView, TQT_SIGNAL(findActive(bool)), TQT_SLOT(slotFindActive(bool)));
- Preferences::connect(TQT_SIGNAL(preferencesChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotPrefsChanged()));
- connect(theApp(), TQT_SIGNAL(trayIconToggled()), TQT_SLOT(updateTrayIconAction()));
+ connect(mActionsMenu, TQ_SIGNAL(aboutToShow()), TQ_SLOT(updateActionsMenu()));
+ connect(mActionUndo->popupMenu(), TQ_SIGNAL(aboutToShow()), TQ_SLOT(slotInitUndoMenu()));
+ connect(mActionUndo->popupMenu(), TQ_SIGNAL(activated(int)), TQ_SLOT(slotUndoItem(int)));
+ connect(mActionRedo->popupMenu(), TQ_SIGNAL(aboutToShow()), TQ_SLOT(slotInitRedoMenu()));
+ connect(mActionRedo->popupMenu(), TQ_SIGNAL(activated(int)), TQ_SLOT(slotRedoItem(int)));
+ connect(Undo::instance(), TQ_SIGNAL(changed(const TQString&, const TQString&)), TQ_SLOT(slotUndoStatus(const TQString&, const TQString&)));
+ connect(mListView, TQ_SIGNAL(findActive(bool)), TQ_SLOT(slotFindActive(bool)));
+ Preferences::connect(TQ_SIGNAL(preferencesChanged()), this, TQ_SLOT(slotPrefsChanged()));
+ connect(theApp(), TQ_SIGNAL(trayIconToggled()), TQ_SLOT(updateTrayIconAction()));
// Set menu item states
setEnableText(true);
@@ -485,13 +485,13 @@ void MainWindow::setUpdateTimer()
{
// Timeout every minute.
needTimer->mMinuteTimerActive = true;
- MinuteTimer::connect(TQT_TQOBJECT(needTimer), TQT_SLOT(slotUpdateTimeTo()));
+ MinuteTimer::connect(needTimer, TQ_SLOT(slotUpdateTimeTo()));
kdDebug(5950) << "MainWindow::setUpdateTimer(): started timer" << endl;
}
else if (!needTimer && timerWindow)
{
timerWindow->mMinuteTimerActive = false;
- MinuteTimer::disconnect(TQT_TQOBJECT(timerWindow));
+ MinuteTimer::disconnect(timerWindow);
kdDebug(5950) << "MainWindow::setUpdateTimer(): stopped timer" << endl;
}
}
@@ -895,7 +895,7 @@ void MainWindow::slotTemplates()
{
mTemplateDlg = TemplateDlg::create(this);
enableTemplateMenuItem(false); // disable menu item in all windows
- connect(mTemplateDlg, TQT_SIGNAL(finished()), TQT_SLOT(slotTemplatesEnd()));
+ connect(mTemplateDlg, TQ_SIGNAL(finished()), TQ_SLOT(slotTemplatesEnd()));
mTemplateDlg->show();
}
}
@@ -1088,7 +1088,7 @@ void MainWindow::slotConfigureToolbar()
{
saveMainWindowSettings(TDEGlobal::config(), WINDOW_NAME);
KEditToolbar dlg(factory());
- connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_TQOBJECT(this), TQT_SLOT(slotNewToolbarConfig()));
+ connect(&dlg, TQ_SIGNAL(newToolbarConfig()), this, TQ_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 != Qt::RightButton && !item)
+ if (button != TQt::RightButton && !item)
{
kdDebug(5950) << "MainWindow::slotMouseClicked(left)" << endl;
mListView->clearSelection();