Diffstat (limited to 'korganizer/koeventeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventeditor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp index 9ede543..3e87197 100644 --- a/korganizer/koeventeditor.cpp +++ b/korganizer/koeventeditor.cpp | |||
@@ -12,32 +12,33 @@ | |||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qtooltip.h> | 24 | #include <qtooltip.h> |
25 | #include <qframe.h> | 25 | #include <qframe.h> |
26 | #include <qpixmap.h> | 26 | #include <qpixmap.h> |
27 | #include <qhbox.h> | 27 | #include <qhbox.h> |
28 | #include <qtimer.h> | ||
28 | #include <qdir.h> | 29 | #include <qdir.h> |
29 | #include <qlayout.h> | 30 | #include <qlayout.h> |
30 | #include <qwidgetstack.h> | 31 | #include <qwidgetstack.h> |
31 | #include <qapplication.h> | 32 | #include <qapplication.h> |
32 | 33 | ||
33 | #include <kiconloader.h> | 34 | #include <kiconloader.h> |
34 | #include <kstandarddirs.h> | 35 | #include <kstandarddirs.h> |
35 | #include <kdebug.h> | 36 | #include <kdebug.h> |
36 | #include <klocale.h> | 37 | #include <klocale.h> |
37 | #include <kfiledialog.h> | 38 | #include <kfiledialog.h> |
38 | #include <kmessagebox.h> | 39 | #include <kmessagebox.h> |
39 | #include <libkcal/calendarresources.h> | 40 | #include <libkcal/calendarresources.h> |
40 | #include <libkcal/resourcecalendar.h> | 41 | #include <libkcal/resourcecalendar.h> |
41 | #include <kresources/resourceselectdialog.h> | 42 | #include <kresources/resourceselectdialog.h> |
42 | 43 | ||
43 | #include <libkdepim/categoryselectdialog.h> | 44 | #include <libkdepim/categoryselectdialog.h> |
@@ -236,32 +237,35 @@ bool KOEventEditor::processInput( bool emitTime ) | |||
236 | 237 | ||
237 | writeEvent(event); | 238 | writeEvent(event); |
238 | if ( emitTime ) { | 239 | if ( emitTime ) { |
239 | globalFlagBlockAgenda = 1; | 240 | globalFlagBlockAgenda = 1; |
240 | emit showAgendaView( false ); | 241 | emit showAgendaView( false ); |
241 | emit jumpToTime( event->dtStart().date() ); | 242 | emit jumpToTime( event->dtStart().date() ); |
242 | globalFlagBlockAgenda = 2; | 243 | globalFlagBlockAgenda = 2; |
243 | 244 | ||
244 | } | 245 | } |
245 | if (mEvent) { | 246 | if (mEvent) { |
246 | event->setRevision(event->revision()+1); | 247 | event->setRevision(event->revision()+1); |
247 | emit eventChanged(event); | 248 | emit eventChanged(event); |
248 | } else { | 249 | } else { |
249 | mCalendar->addEvent(event); | 250 | mCalendar->addEvent(event); |
250 | mEvent = event; | 251 | mEvent = event; |
251 | emit eventAdded(event); | 252 | emit eventAdded(event); |
253 | if ( event->isAlarmEnabled () && !event->alarmEnabled () ) { | ||
254 | QTimer::singleShot( 0, this, SLOT ( alarmWarning() ) ); | ||
255 | } | ||
252 | } | 256 | } |
253 | 257 | ||
254 | return true; | 258 | return true; |
255 | } | 259 | } |
256 | 260 | ||
257 | void KOEventEditor::deleteEvent() | 261 | void KOEventEditor::deleteEvent() |
258 | { | 262 | { |
259 | kdDebug() << "Delete event" << endl; | 263 | kdDebug() << "Delete event" << endl; |
260 | 264 | ||
261 | if (mEvent) { | 265 | if (mEvent) { |
262 | if (KOPrefs::instance()->mConfirm) { | 266 | if (KOPrefs::instance()->mConfirm) { |
263 | switch (msgItemDelete()) { | 267 | switch (msgItemDelete()) { |
264 | case KMessageBox::Continue: // OK | 268 | case KMessageBox::Continue: // OK |
265 | emit eventToBeDeleted(mEvent); | 269 | emit eventToBeDeleted(mEvent); |
266 | emit dialogClose(mEvent); | 270 | emit dialogClose(mEvent); |
267 | mCalendar->deleteEvent(mEvent); | 271 | mCalendar->deleteEvent(mEvent); |