27 #include "alarmtext.h"
28 #include "mainwindowbase.h"
33 class TDEToggleAction;
34 class TDEToolBarPopupAction;
36 class ActionAlarmsEnabled;
39 class TemplateMenuAction;
48 static MainWindow* create(
bool restored =
false);
50 bool isTrayParent()
const;
51 bool isHiddenTrayParent()
const {
return mHiddenTrayParent; }
52 bool showingExpired()
const {
return mShowExpired; }
53 void selectEvent(
const TQString& eventID);
55 static void refresh();
56 static void updateExpired();
57 static void addEvent(
const KAEvent&, MainWindow*);
58 static void executeNew(MainWindow* w = 0, KAEvent::Action a = KAEvent::MESSAGE,
const AlarmText& t = AlarmText())
59 { executeNew(w, 0, a, t); }
60 static void executeNew(
const KAEvent& e, MainWindow* w = 0)
61 { executeNew(w, &e); }
62 static void executeEdit(
KAEvent&, MainWindow* = 0);
63 static void executeDragEnterEvent(TQDragEnterEvent*);
64 static void executeDropEvent(MainWindow*, TQDropEvent*);
65 static void closeAll();
66 static MainWindow* toggleWindow(MainWindow*);
67 static MainWindow* mainMainWindow();
68 static MainWindow* firstWindow() {
return mWindowList.first(); }
69 static int count() {
return mWindowList.count(); }
71 static TQString i18n_a_ShowAlarmTimes();
72 static TQString i18n_m_ShowAlarmTime();
73 static TQString i18n_o_ShowTimeToAlarms();
74 static TQString i18n_l_ShowTimeToAlarm();
75 static TQString i18n_ShowExpiredAlarms();
76 static TQString i18n_e_ShowExpiredAlarms();
77 static TQString i18n_HideExpiredAlarms();
78 static TQString i18n_e_HideExpiredAlarms();
84 virtual void resizeEvent(TQResizeEvent*);
85 virtual void showEvent(TQShowEvent*);
86 virtual void hideEvent(TQHideEvent*);
87 virtual void closeEvent(TQCloseEvent*);
88 virtual void dragEnterEvent(TQDragEnterEvent*);
89 virtual void dropEvent(TQDropEvent*);
90 virtual void saveProperties(TDEConfig*);
91 virtual void readProperties(TDEConfig*);
95 void slotNewFromTemplate(
const KAEvent&);
96 void slotNewTemplate();
100 void slotReactivate();
103 void slotToggleTrayIcon();
104 void slotResetDaemon();
105 void slotImportAlarms();
106 void slotBirthdays();
107 void slotTemplates();
108 void slotTemplatesEnd();
109 void slotPreferences();
110 void slotConfigureKeys();
111 void slotConfigureToolbar();
112 void slotNewToolbarConfig();
115 void slotSelection();
116 void slotContextMenuRequested(TQListViewItem*,
const TQPoint&,
int);
117 void slotMouseClicked(
int button, TQListViewItem*,
const TQPoint&,
int);
118 void slotDoubleClicked(TQListViewItem*);
120 void slotShowTimeTo();
121 void slotShowExpired();
122 void slotUpdateTimeTo();
124 void slotUndoItem(
int id);
126 void slotRedoItem(
int id);
127 void slotInitUndoMenu();
128 void slotInitRedoMenu();
129 void slotUndoStatus(
const TQString&,
const TQString&);
130 void slotFindActive(
bool);
131 void slotPrefsChanged();
132 void updateTrayIconAction();
133 void updateActionsMenu();
134 void columnsReordered();
137 typedef TQValueList<MainWindow*> WindowList;
139 MainWindow(
bool restored);
140 void createListView(
bool recreate);
142 void setEnableText(
bool enable);
143 static KAEvent::Action getDropAction(TQDropEvent*, TQString& text);
144 static void executeNew(MainWindow*,
const KAEvent*, KAEvent::Action = KAEvent::MESSAGE,
const AlarmText& = AlarmText());
145 static void initUndoMenu(TDEPopupMenu*, Undo::Type);
146 static void setUpdateTimer();
147 static void enableTemplateMenuItem(
bool);
149 static WindowList mWindowList;
150 static TemplateDlg* mTemplateDlg;
152 AlarmListView* mListView;
153 TDEAction* mActionTemplates;
154 TDEAction* mActionNew;
155 TemplateMenuAction* mActionNewFromTemplate;
156 TDEAction* mActionCreateTemplate;
157 TDEAction* mActionCopy;
158 TDEAction* mActionModify;
159 TDEAction* mActionView;
160 TDEAction* mActionDelete;
161 TDEAction* mActionReactivate;
162 TDEAction* mActionEnable;
163 TDEAction* mActionFindNext;
164 TDEAction* mActionFindPrev;
165 TDEToolBarPopupAction* mActionUndo;
166 TDEToolBarPopupAction* mActionRedo;
167 TDEToggleAction* mActionToggleTrayIcon;
168 TDEToggleAction* mActionShowTime;
169 TDEToggleAction* mActionShowTimeTo;
170 TDEToggleAction* mActionShowExpired;
171 TDEPopupMenu* mActionsMenu;
172 TDEPopupMenu* mContextMenu;
173 bool mMinuteTimerActive;
174 bool mHiddenTrayParent;
178 bool mActionEnableEnable;
represents calendar alarms and events
KAEvent corresponds to a KCal::Event instance.
The MainWindowBase class is a base class for KAlarm's main window and message window.