diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kalarm/mainwindow.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/mainwindow.cpp')
-rw-r--r-- | kalarm/mainwindow.cpp | 274 |
1 files changed, 137 insertions, 137 deletions
diff --git a/kalarm/mainwindow.cpp b/kalarm/mainwindow.cpp index 01ddc83d3..a3e8e423f 100644 --- a/kalarm/mainwindow.cpp +++ b/kalarm/mainwindow.cpp @@ -20,9 +20,9 @@ #include "kalarm.h" -#include <qiconset.h> -#include <qdragobject.h> -#include <qheader.h> +#include <tqiconset.h> +#include <tqdragobject.h> +#include <tqheader.h> #include <kmenubar.h> #include <ktoolbar.h> @@ -71,19 +71,19 @@ using namespace KCal; static const char* UI_FILE = "kalarmui.rc"; static const char* WINDOW_NAME = "MainWindow"; -static const QString VIEW_GROUP = QString::fromLatin1("View"); -static const QString SHOW_TIME_KEY = QString::fromLatin1("ShowAlarmTime"); -static const QString SHOW_TIME_TO_KEY = QString::fromLatin1("ShowTimeToAlarm"); -static const QString SHOW_ARCHIVED_KEY = QString::fromLatin1("ShowArchivedAlarms"); -static const QString SHOW_RESOURCES_KEY = QString::fromLatin1("ShowResources"); +static const TQString VIEW_GROUP = TQString::fromLatin1("View"); +static const TQString SHOW_TIME_KEY = TQString::fromLatin1("ShowAlarmTime"); +static const TQString SHOW_TIME_TO_KEY = TQString::fromLatin1("ShowTimeToAlarm"); +static const TQString SHOW_ARCHIVED_KEY = TQString::fromLatin1("ShowArchivedAlarms"); +static const TQString SHOW_RESOURCES_KEY = TQString::fromLatin1("ShowResources"); -static QString undoText; -static QString undoTextStripped; -static QString undoIcon; +static TQString undoText; +static TQString undoTextStripped; +static TQString undoIcon; static KShortcut undoShortcut; -static QString redoText; -static QString redoTextStripped; -static QString redoIcon; +static TQString redoText; +static TQString redoTextStripped; +static TQString redoIcon; static KShortcut redoShortcut; @@ -96,14 +96,14 @@ TemplateDlg* MainWindow::mTemplateDlg = 0; // Collect these widget labels together to ensure consistent wording and // translations across different modules. -QString MainWindow::i18n_a_ShowAlarmTimes() { return i18n("Show &Alarm Times"); } -QString MainWindow::i18n_m_ShowAlarmTime() { return i18n("Show alarm ti&me"); } -QString MainWindow::i18n_o_ShowTimeToAlarms() { return i18n("Show Time t&o Alarms"); } -QString MainWindow::i18n_l_ShowTimeToAlarm() { return i18n("Show time unti&l alarm"); } -QString MainWindow::i18n_ShowExpiredAlarms() { return i18n("Show Expired Alarms"); } -QString MainWindow::i18n_e_ShowExpiredAlarms() { return i18n("Show &Expired Alarms"); } -QString MainWindow::i18n_HideExpiredAlarms() { return i18n("Hide Expired Alarms"); } -QString MainWindow::i18n_e_HideExpiredAlarms() { return i18n("Hide &Expired Alarms"); } +TQString MainWindow::i18n_a_ShowAlarmTimes() { return i18n("Show &Alarm Times"); } +TQString MainWindow::i18n_m_ShowAlarmTime() { return i18n("Show alarm ti&me"); } +TQString MainWindow::i18n_o_ShowTimeToAlarms() { return i18n("Show Time t&o Alarms"); } +TQString MainWindow::i18n_l_ShowTimeToAlarm() { return i18n("Show time unti&l alarm"); } +TQString MainWindow::i18n_ShowExpiredAlarms() { return i18n("Show Expired Alarms"); } +TQString MainWindow::i18n_e_ShowExpiredAlarms() { return i18n("Show &Expired Alarms"); } +TQString MainWindow::i18n_HideExpiredAlarms() { return i18n("Hide Expired Alarms"); } +TQString MainWindow::i18n_e_HideExpiredAlarms() { return i18n("Hide &Expired Alarms"); } /****************************************************************************** @@ -123,7 +123,7 @@ MainWindow::MainWindow(bool restored) mHiddenTrayParent(false) { kdDebug(5950) << "MainWindow::MainWindow()\n"; - setAutoSaveSettings(QString::fromLatin1(WINDOW_NAME)); // save window sizes etc. + setAutoSaveSettings(TQString::fromLatin1(WINDOW_NAME)); // save window sizes etc. setPlainCaption(kapp->aboutData()->programName()); KConfig* config = KGlobal::config(); config->setGroup(VIEW_GROUP); @@ -132,12 +132,12 @@ MainWindow::MainWindow(bool restored) mShowTimeTo = config->readBoolEntry(SHOW_TIME_TO_KEY, false); if (!restored) { - QSize s; + TQSize s; if (KAlarm::readConfigWindowSize(WINDOW_NAME, s)) resize(s); } - config->setGroup(QString::fromLatin1(WINDOW_NAME)); - QValueList<int> order = config->readIntListEntry(QString::fromLatin1("ColumnOrder")); + config->setGroup(TQString::fromLatin1(WINDOW_NAME)); + TQValueList<int> order = config->readIntListEntry(TQString::fromLatin1("ColumnOrder")); setAcceptDrops(true); // allow drag-and-drop onto this window if (!mShowTimeTo) @@ -149,14 +149,14 @@ MainWindow::MainWindow(bool restored) mListView->refresh(); // populate the alarm list mListView->clearSelection(); - connect(mListView, SIGNAL(itemDeleted()), SLOT(slotDeletion())); - connect(mListView, SIGNAL(selectionChanged()), SLOT(slotSelection())); - connect(mListView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), - SLOT(slotContextMenuRequested(QListViewItem*, const QPoint&, int))); - connect(mListView, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint&, int)), - SLOT(slotMouseClicked(int, QListViewItem*, const QPoint&, int))); - connect(mListView, SIGNAL(executed(QListViewItem*)), SLOT(slotDoubleClicked(QListViewItem*))); - connect(mListView->header(), SIGNAL(indexChange(int, int, int)), SLOT(columnsReordered())); + 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())); initActions(); mWindowList.append(this); @@ -201,10 +201,10 @@ MainWindow::~MainWindow() */ void MainWindow::saveProperties(KConfig* config) { - config->writeEntry(QString::fromLatin1("HiddenTrayParent"), isTrayParent() && isHidden()); - config->writeEntry(QString::fromLatin1("ShowExpired"), mShowExpired); - config->writeEntry(QString::fromLatin1("ShowTime"), mShowTime); - config->writeEntry(QString::fromLatin1("ShowTimeTo"), mShowTimeTo); + config->writeEntry(TQString::fromLatin1("HiddenTrayParent"), isTrayParent() && isHidden()); + config->writeEntry(TQString::fromLatin1("ShowExpired"), mShowExpired); + config->writeEntry(TQString::fromLatin1("ShowTime"), mShowTime); + config->writeEntry(TQString::fromLatin1("ShowTimeTo"), mShowTimeTo); } /****************************************************************************** @@ -214,10 +214,10 @@ void MainWindow::saveProperties(KConfig* config) */ void MainWindow::readProperties(KConfig* config) { - mHiddenTrayParent = config->readBoolEntry(QString::fromLatin1("HiddenTrayParent")); - mShowExpired = config->readBoolEntry(QString::fromLatin1("ShowExpired")); - mShowTime = config->readBoolEntry(QString::fromLatin1("ShowTime")); - mShowTimeTo = config->readBoolEntry(QString::fromLatin1("ShowTimeTo")); + mHiddenTrayParent = config->readBoolEntry(TQString::fromLatin1("HiddenTrayParent")); + mShowExpired = config->readBoolEntry(TQString::fromLatin1("ShowExpired")); + mShowTime = config->readBoolEntry(TQString::fromLatin1("ShowTime")); + mShowTimeTo = config->readBoolEntry(TQString::fromLatin1("ShowTimeTo")); } /****************************************************************************** @@ -263,7 +263,7 @@ void MainWindow::closeAll() * edge of the list view. * Records the new size in the config file. */ -void MainWindow::resizeEvent(QResizeEvent* re) +void MainWindow::resizeEvent(TQResizeEvent* re) { // Save the window's new size only if it's the first main window if (mainMainWindow() == this) @@ -276,7 +276,7 @@ void MainWindow::resizeEvent(QResizeEvent* re) * Sets the last column in the list view to extend at least to the right hand * edge of the list view. */ -void MainWindow::showEvent(QShowEvent* se) +void MainWindow::showEvent(TQShowEvent* se) { setUpdateTimer(); slotUpdateTimeTo(); @@ -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(QString::fromLatin1(UI_FILE))); + KMessageBox::error(this, i18n("Failure to create menus\n(perhaps %1 missing or corrupted)").arg(TQString::fromLatin1(UI_FILE))); mMenuError = false; } } @@ -302,7 +302,7 @@ void MainWindow::show() /****************************************************************************** * Called after the window is hidden. */ -void MainWindow::hideEvent(QHideEvent* he) +void MainWindow::hideEvent(TQHideEvent* he) { setUpdateTimer(); MainWindowBase::hideEvent(he); @@ -315,8 +315,8 @@ void MainWindow::hideEvent(QHideEvent* he) void MainWindow::columnsReordered() { KConfig* config = KGlobal::config(); - config->setGroup(QString::fromLatin1(WINDOW_NAME)); - config->writeEntry(QString::fromLatin1("ColumnOrder"), mListView->columnOrder()); + config->setGroup(TQString::fromLatin1(WINDOW_NAME)); + config->writeEntry(TQString::fromLatin1("ColumnOrder"), mListView->columnOrder()); config->sync(); } @@ -326,27 +326,27 @@ void MainWindow::columnsReordered() void MainWindow::initActions() { KActionCollection* actions = actionCollection(); - mActionTemplates = new KAction(i18n("&Templates..."), 0, this, SLOT(slotTemplates()), actions, "templates"); - mActionNew = KAlarm::createNewAlarmAction(i18n("&New..."), this, SLOT(slotNew()), actions, "new"); - mActionNewFromTemplate = KAlarm::createNewFromTemplateAction(i18n("New &From Template"), this, SLOT(slotNewFromTemplate(const KAEvent&)), actions, "newFromTempl"); - mActionCreateTemplate = new KAction(i18n("Create Tem&plate..."), 0, this, SLOT(slotNewTemplate()), actions, "createTemplate"); - mActionCopy = new KAction(i18n("&Copy..."), "editcopy", Qt::SHIFT+Qt::Key_Insert, this, SLOT(slotCopy()), actions, "copy"); - mActionModify = new KAction(i18n("&Edit..."), "edit", Qt::CTRL+Qt::Key_E, this, SLOT(slotModify()), actions, "modify"); - mActionDelete = new KAction(i18n("&Delete"), "editdelete", Qt::Key_Delete, this, SLOT(slotDelete()), actions, "delete"); - mActionReactivate = new KAction(i18n("Reac&tivate"), 0, Qt::CTRL+Qt::Key_R, this, SLOT(slotReactivate()), actions, "undelete"); - mActionEnable = new KAction(QString::null, 0, Qt::CTRL+Qt::Key_B, this, SLOT(slotEnable()), actions, "disable"); - mActionView = new KAction(i18n("&View"), "viewmag", Qt::CTRL+Qt::Key_W, this, SLOT(slotView()), actions, "view"); - mActionShowTime = new KToggleAction(i18n_a_ShowAlarmTimes(), Qt::CTRL+Qt::Key_M, this, SLOT(slotShowTime()), actions, "showAlarmTimes"); + 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", Qt::SHIFT+Qt::Key_Insert, this, TQT_SLOT(slotCopy()), actions, "copy"); + mActionModify = new KAction(i18n("&Edit..."), "edit", Qt::CTRL+Qt::Key_E, this, TQT_SLOT(slotModify()), actions, "modify"); + mActionDelete = new KAction(i18n("&Delete"), "editdelete", Qt::Key_Delete, this, TQT_SLOT(slotDelete()), actions, "delete"); + mActionReactivate = new KAction(i18n("Reac&tivate"), 0, Qt::CTRL+Qt::Key_R, this, TQT_SLOT(slotReactivate()), actions, "undelete"); + mActionEnable = new KAction(TQString::null, 0, Qt::CTRL+Qt::Key_B, this, TQT_SLOT(slotEnable()), actions, "disable"); + mActionView = new KAction(i18n("&View"), "viewmag", Qt::CTRL+Qt::Key_W, this, TQT_SLOT(slotView()), actions, "view"); + mActionShowTime = new KToggleAction(i18n_a_ShowAlarmTimes(), Qt::CTRL+Qt::Key_M, this, TQT_SLOT(slotShowTime()), actions, "showAlarmTimes"); mActionShowTime->setCheckedState(i18n("Hide &Alarm Times")); - mActionShowTimeTo = new KToggleAction(i18n_o_ShowTimeToAlarms(), Qt::CTRL+Qt::Key_I, this, SLOT(slotShowTimeTo()), actions, "showTimeToAlarms"); + mActionShowTimeTo = new KToggleAction(i18n_o_ShowTimeToAlarms(), Qt::CTRL+Qt::Key_I, this, TQT_SLOT(slotShowTimeTo()), actions, "showTimeToAlarms"); mActionShowTimeTo->setCheckedState(i18n("Hide Time t&o Alarms")); - mActionShowExpired = new KToggleAction(i18n_e_ShowExpiredAlarms(), "history", Qt::CTRL+Qt::Key_P, this, SLOT(slotShowExpired()), actions, "showExpiredAlarms"); + mActionShowExpired = new KToggleAction(i18n_e_ShowExpiredAlarms(), "history", Qt::CTRL+Qt::Key_P, this, TQT_SLOT(slotShowExpired()), actions, "showExpiredAlarms"); mActionShowExpired->setCheckedState(i18n_e_HideExpiredAlarms()); - mActionToggleTrayIcon = new KToggleAction(i18n("Show in System &Tray"), 0, this, SLOT(slotToggleTrayIcon()), actions, "showInSystemTray"); + mActionToggleTrayIcon = new KToggleAction(i18n("Show in System &Tray"), 0, this, TQT_SLOT(slotToggleTrayIcon()), actions, "showInSystemTray"); mActionToggleTrayIcon->setCheckedState(i18n("Hide From System &Tray")); - new KAction(i18n("Import &Alarms..."), 0, this, SLOT(slotImportAlarms()), actions, "importAlarms"); - new KAction(i18n("Import &Birthdays..."), 0, this, SLOT(slotBirthdays()), actions, "importBirthdays"); - new KAction(i18n("&Refresh Alarms"), "reload", 0, this, SLOT(slotResetDaemon()), actions, "refreshAlarms"); + 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"); Daemon::createAlarmEnableAction(actions, "alarmEnable"); if (undoText.isNull()) { @@ -364,32 +364,32 @@ void MainWindow::initActions() redoTextStripped = KAlarm::stripAccel(redoText); delete act; } - mActionUndo = new KToolBarPopupAction(undoText, undoIcon, undoShortcut, this, SLOT(slotUndo()), actions, "edit_undo"); - mActionRedo = new KToolBarPopupAction(redoText, redoIcon, redoShortcut, this, SLOT(slotRedo()), actions, "edit_redo"); - KStdAction::find(mListView, SLOT(slotFind()), actions); - mActionFindNext = KStdAction::findNext(mListView, SLOT(slotFindNext()), actions); - mActionFindPrev = KStdAction::findPrev(mListView, SLOT(slotFindPrev()), actions); - KStdAction::selectAll(mListView, SLOT(slotSelectAll()), actions); - KStdAction::deselect(mListView, SLOT(slotDeselect()), actions); - KStdAction::quit(this, SLOT(slotQuit()), actions); - KStdAction::keyBindings(this, SLOT(slotConfigureKeys()), actions); - KStdAction::configureToolbars(this, SLOT(slotConfigureToolbar()), actions); - KStdAction::preferences(this, SLOT(slotPreferences()), actions); + 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::find(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); setStandardToolBarMenuEnabled(true); createGUI(UI_FILE); mContextMenu = static_cast<KPopupMenu*>(factory()->container("listContext", this)); mActionsMenu = static_cast<KPopupMenu*>(factory()->container("actions", this)); mMenuError = (!mContextMenu || !mActionsMenu); - connect(mActionsMenu, SIGNAL(aboutToShow()), SLOT(updateActionsMenu())); - connect(mActionUndo->popupMenu(), SIGNAL(aboutToShow()), SLOT(slotInitUndoMenu())); - connect(mActionUndo->popupMenu(), SIGNAL(activated(int)), SLOT(slotUndoItem(int))); - connect(mActionRedo->popupMenu(), SIGNAL(aboutToShow()), SLOT(slotInitRedoMenu())); - connect(mActionRedo->popupMenu(), SIGNAL(activated(int)), SLOT(slotRedoItem(int))); - connect(Undo::instance(), SIGNAL(changed(const QString&, const QString&)), SLOT(slotUndoStatus(const QString&, const QString&))); - connect(mListView, SIGNAL(findActive(bool)), SLOT(slotFindActive(bool))); - Preferences::connect(SIGNAL(preferencesChanged()), this, SLOT(slotPrefsChanged())); - connect(theApp(), SIGNAL(trayIconToggled()), SLOT(updateTrayIconAction())); + 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()), this, TQT_SLOT(slotPrefsChanged())); + connect(theApp(), TQT_SIGNAL(trayIconToggled()), TQT_SLOT(updateTrayIconAction())); // Set menu item states setEnableText(true); @@ -485,7 +485,7 @@ void MainWindow::setUpdateTimer() { // Timeout every minute. needTimer->mMinuteTimerActive = true; - MinuteTimer::connect(needTimer, SLOT(slotUpdateTimeTo())); + MinuteTimer::connect(needTimer, TQT_SLOT(slotUpdateTimeTo())); kdDebug(5950) << "MainWindow::setUpdateTimer(): started timer" << endl; } else if (!needTimer && timerWindow) @@ -512,7 +512,7 @@ void MainWindow::slotUpdateTimeTo() /****************************************************************************** * Select an alarm in the displayed list. */ -void MainWindow::selectEvent(const QString& eventID) +void MainWindow::selectEvent(const TQString& eventID) { mListView->clearSelection(); AlarmListViewItem* item = mListView->getEntry(eventID); @@ -541,7 +541,7 @@ void MainWindow::executeNew(MainWindow* win, const KAEvent* evnt, KAEvent::Actio EditAlarmDlg editDlg(false, i18n("New Alarm"), win, 0, evnt); if (!text.isEmpty()) editDlg.setAction(action, text); - if (editDlg.exec() == QDialog::Accepted) + if (editDlg.exec() == TQDialog::Accepted) { KAEvent event; editDlg.getEvent(event); @@ -609,7 +609,7 @@ void MainWindow::slotModify() void MainWindow::executeEdit(KAEvent& event, MainWindow* win) { EditAlarmDlg editDlg(false, i18n("Edit Alarm"), win, 0, &event); - if (editDlg.exec() == QDialog::Accepted) + if (editDlg.exec() == TQDialog::Accepted) { KAEvent newEvent; bool changeDeferral = !editDlg.getEvent(newEvent); @@ -656,12 +656,12 @@ void MainWindow::slotView() */ void MainWindow::slotDelete() { - QValueList<EventListViewItemBase*> items = mListView->selectedItems(); + TQValueList<EventListViewItemBase*> items = mListView->selectedItems(); // Copy the events to be deleted, in case any are deleted by being // triggered while the confirmation prompt is displayed. - QValueList<KAEvent> events; - QValueList<KAEvent> origEvents; - for (QValueList<EventListViewItemBase*>::Iterator iit = items.begin(); iit != items.end(); ++iit) + TQValueList<KAEvent> events; + TQValueList<KAEvent> origEvents; + for (TQValueList<EventListViewItemBase*>::Iterator iit = items.begin(); iit != items.end(); ++iit) { AlarmListViewItem* item = (AlarmListViewItem*)(*iit); events.append(item->event()); @@ -683,7 +683,7 @@ void MainWindow::slotDelete() int warnKOrg = 0; AlarmCalendar::activeCalendar()->startUpdate(); // prevent multiple saves of the calendars until we're finished AlarmCalendar::expiredCalendar()->startUpdate(); - for (QValueList<KAEvent>::Iterator it = events.begin(); it != events.end(); ++it) + for (TQValueList<KAEvent>::Iterator it = events.begin(); it != events.end(); ++it) { // Delete the event from the calendar and displays switch (KAlarm::deleteEvent(*it)) @@ -719,12 +719,12 @@ void MainWindow::slotReactivate() { int warnErr = 0; int warnKOrg = 0; - QValueList<KAEvent> events; - QValueList<EventListViewItemBase*> items = mListView->selectedItems(); + TQValueList<KAEvent> events; + TQValueList<EventListViewItemBase*> items = mListView->selectedItems(); mListView->clearSelection(); AlarmCalendar::activeCalendar()->startUpdate(); // prevent multiple saves of the calendars until we're finished AlarmCalendar::expiredCalendar()->startUpdate(); - for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it) + for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it) { // Add the alarm to the displayed lists and to the calendar file AlarmListViewItem* item = (AlarmListViewItem*)(*it); @@ -763,9 +763,9 @@ void MainWindow::slotEnable() { bool enable = mActionEnableEnable; // save since changed in response to KAlarm::enableEvent() int warnErr = 0; - QValueList<EventListViewItemBase*> items = mListView->selectedItems(); + TQValueList<EventListViewItemBase*> items = mListView->selectedItems(); AlarmCalendar::activeCalendar()->startUpdate(); // prevent multiple saves of the calendars until we're finished - for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it) + for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it) { AlarmListViewItem* item = (AlarmListViewItem*)(*it); KAEvent event = item->event(); @@ -851,15 +851,15 @@ void MainWindow::slotImportAlarms() void MainWindow::slotBirthdays() { BirthdayDlg dlg(this); - if (dlg.exec() == QDialog::Accepted) + if (dlg.exec() == TQDialog::Accepted) { - QValueList<KAEvent> events = dlg.events(); + TQValueList<KAEvent> events = dlg.events(); if (events.count()) { mListView->clearSelection(); int warnErr = 0; int warnKOrg = 0; - for (QValueList<KAEvent>::Iterator ev = events.begin(); ev != events.end(); ++ev) + for (TQValueList<KAEvent>::Iterator ev = events.begin(); ev != events.end(); ++ev) { // Add alarm to the displayed lists and to the calendar file switch (KAlarm::addEvent(*ev, mListView)) @@ -895,7 +895,7 @@ void MainWindow::slotTemplates() { mTemplateDlg = TemplateDlg::create(this); enableTemplateMenuItem(false); // disable menu item in all windows - connect(mTemplateDlg, SIGNAL(finished()), SLOT(slotTemplatesEnd())); + connect(mTemplateDlg, TQT_SIGNAL(finished()), TQT_SLOT(slotTemplatesEnd())); mTemplateDlg->show(); } } @@ -1015,14 +1015,14 @@ void MainWindow::slotInitRedoMenu() void MainWindow::initUndoMenu(KPopupMenu* menu, Undo::Type type) { menu->clear(); - const QString& action = (type == Undo::UNDO) ? undoTextStripped : redoTextStripped; - QValueList<int> ids = Undo::ids(type); - for (QValueList<int>::ConstIterator it = ids.begin(); it != ids.end(); ++it) + const TQString& action = (type == Undo::UNDO) ? undoTextStripped : redoTextStripped; + TQValueList<int> ids = Undo::ids(type); + for (TQValueList<int>::ConstIterator it = ids.begin(); it != ids.end(); ++it) { int id = *it; - QString actText = Undo::actionText(type, id); - QString descrip = Undo::description(type, id); - QString text = descrip.isEmpty() + 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); menu->insertItem(text, id); @@ -1033,7 +1033,7 @@ void MainWindow::initUndoMenu(KPopupMenu* menu, Undo::Type type) * Called when the status of the Undo or Redo list changes. * Change the Undo or Redo text to include the action which would be undone/redone. */ -void MainWindow::slotUndoStatus(const QString& undo, const QString& redo) +void MainWindow::slotUndoStatus(const TQString& undo, const TQString& redo) { if (undo.isNull()) { @@ -1043,7 +1043,7 @@ void MainWindow::slotUndoStatus(const QString& undo, const QString& redo) else { mActionUndo->setEnabled(true); - mActionUndo->setText(QString("%1 %2").arg(undoText).arg(undo)); + mActionUndo->setText(TQString("%1 %2").arg(undoText).arg(undo)); } if (redo.isNull()) { @@ -1053,7 +1053,7 @@ void MainWindow::slotUndoStatus(const QString& undo, const QString& redo) else { mActionRedo->setEnabled(true); - mActionRedo->setText(QString("%1 %2").arg(redoText).arg(redo)); + mActionRedo->setText(TQString("%1 %2").arg(redoText).arg(redo)); } } @@ -1088,7 +1088,7 @@ void MainWindow::slotConfigureToolbar() { saveMainWindowSettings(KGlobal::config(), WINDOW_NAME); KEditToolbar dlg(factory()); - connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig())); dlg.exec(); } @@ -1113,7 +1113,7 @@ void MainWindow::slotQuit() /****************************************************************************** * Called when the user or the session manager attempts to close the window. */ -void MainWindow::closeEvent(QCloseEvent* ce) +void MainWindow::closeEvent(TQCloseEvent* ce) { if (!theApp()->sessionClosingDown() && isTrayParent()) { @@ -1150,7 +1150,7 @@ void MainWindow::slotDeletion() /****************************************************************************** * Called when the drag cursor enters the window. */ -void MainWindow::dragEnterEvent(QDragEnterEvent* e) +void MainWindow::dragEnterEvent(TQDragEnterEvent* e) { executeDragEnterEvent(e); } @@ -1159,12 +1159,12 @@ void MainWindow::dragEnterEvent(QDragEnterEvent* e) * Called when the drag cursor enters a main or system tray window, to accept * or reject the dragged object. */ -void MainWindow::executeDragEnterEvent(QDragEnterEvent* e) +void MainWindow::executeDragEnterEvent(TQDragEnterEvent* e) { if (KCal::ICalDrag::canDecode(e)) e->accept(!AlarmListView::dragging()); // don't accept "text/calendar" objects from KAlarm else - e->accept(QTextDrag::canDecode(e) + e->accept(TQTextDrag::canDecode(e) || KURLDrag::canDecode(e) || KPIM::MailListDrag::canDecode(e)); } @@ -1173,33 +1173,33 @@ void MainWindow::executeDragEnterEvent(QDragEnterEvent* e) * Called when an object is dropped on the window. * If the object is recognised, the edit alarm dialog is opened appropriately. */ -void MainWindow::dropEvent(QDropEvent* e) +void MainWindow::dropEvent(TQDropEvent* e) { executeDropEvent(this, e); } -static QString getMailHeader(const char* header, KMime::Content& content) +static TQString getMailHeader(const char* header, KMime::Content& content) { KMime::Headers::Base* hd = content.getHeaderByType(header); - return hd ? hd->asUnicodeString() : QString::null; + return hd ? hd->asUnicodeString() : TQString::null; } /****************************************************************************** * Called when an object is dropped on a main or system tray window, to * evaluate the action required and extract the text. */ -void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e) +void MainWindow::executeDropEvent(MainWindow* win, TQDropEvent* e) { KAEvent::Action action = KAEvent::MESSAGE; - QString text; - QByteArray bytes; + TQString text; + TQByteArray bytes; AlarmText alarmText; KPIM::MailList mailList; KURL::List files; - KCal::CalendarLocal calendar(QString::fromLatin1("UTC")); + KCal::CalendarLocal calendar(TQString::fromLatin1("UTC")); calendar.setLocalTime(); // default to local time (i.e. no time zone) #ifndef NDEBUG - QCString fmts; + TQCString fmts; for (int idbg = 0; e->format(idbg); ++idbg) { if (idbg) fmts += ", "; @@ -1217,11 +1217,11 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e) { // Email message(s). Ignore all but the first. kdDebug(5950) << "MainWindow::executeDropEvent(email)" << endl; - QCString mails(bytes.data(), bytes.size()); + TQCString mails(bytes.data(), bytes.size()); KMime::Content content; content.setContent(mails); content.parse(); - QString body; + TQString body; if (content.textContent()) content.textContent()->decodedText(body, true, true); // strip trailing newlines & spaces unsigned long sernum = 0; @@ -1254,10 +1254,10 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e) if (!mailList.count()) return; KPIM::MailSummary& summary = mailList.first(); - QDateTime dt; + TQDateTime dt; dt.setTime_t(summary.date()); - QString body = KAMail::getMailBody(summary.serialNumber()); - alarmText.setEmail(summary.to(), summary.from(), QString::null, + TQString body = KAMail::getMailBody(summary.serialNumber()); + alarmText.setEmail(summary.to(), summary.from(), TQString::null, KGlobal::locale()->formatDateTime(dt), summary.subject(), body, summary.serialNumber()); } @@ -1273,7 +1273,7 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e) } return; } - else if (QTextDrag::decode(e, text)) + else if (TQTextDrag::decode(e, text)) { kdDebug(5950) << "MainWindow::executeDropEvent(text)" << endl; alarmText.setText(text); @@ -1292,15 +1292,15 @@ void MainWindow::executeDropEvent(MainWindow* win, QDropEvent* e) void MainWindow::slotSelection() { // Find which item has been selected, and whether more than one is selected - QValueList<EventListViewItemBase*> items = mListView->selectedItems(); + TQValueList<EventListViewItemBase*> items = mListView->selectedItems(); int count = items.count(); AlarmListViewItem* item = (AlarmListViewItem*)((count == 1) ? items.first() : 0); bool enableReactivate = true; bool enableEnableDisable = true; bool enableEnable = false; bool enableDisable = false; - QDateTime now = QDateTime::currentDateTime(); - for (QValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it) + TQDateTime now = TQDateTime::currentDateTime(); + for (TQValueList<EventListViewItemBase*>::Iterator it = items.begin(); it != items.end(); ++it) { const KAEvent& event = ((AlarmListViewItem*)(*it))->event(); if (enableReactivate @@ -1336,7 +1336,7 @@ void MainWindow::slotSelection() * Called when a context menu is requested either by a mouse click or by a * key press. */ -void MainWindow::slotContextMenuRequested(QListViewItem* item, const QPoint& pt, int) +void MainWindow::slotContextMenuRequested(TQListViewItem* item, const TQPoint& pt, int) { kdDebug(5950) << "MainWindow::slotContextMenuRequested()" << endl; if (mContextMenu) @@ -1348,7 +1348,7 @@ void MainWindow::slotContextMenuRequested(QListViewItem* item, const QPoint& pt, * Deselects the current item and disables the actions if appropriate. * Note that if a right button click is handled by slotContextMenuRequested(). */ -void MainWindow::slotMouseClicked(int button, QListViewItem* item, const QPoint& pt, int) +void MainWindow::slotMouseClicked(int button, TQListViewItem* item, const TQPoint& pt, int) { if (button != Qt::RightButton && !item) { @@ -1368,7 +1368,7 @@ void MainWindow::slotMouseClicked(int button, QListViewItem* item, const QPoint& * Called when the mouse is double clicked on the ListView. * Displays the Edit Alarm dialog, for the clicked item if applicable. */ -void MainWindow::slotDoubleClicked(QListViewItem* item) +void MainWindow::slotDoubleClicked(TQListViewItem* item) { kdDebug(5950) << "MainWindow::slotDoubleClicked()\n"; if (item) |