[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdepim/knotes
From:       Michael Brade <brade () kde ! org>
Date:       2005-01-31 15:35:27
Message-ID: 20050131153527.D6EA91D004 () office ! kde ! org
[Download RAW message or body]

CVS commit by brade: 

Implemented alarm logic. Cornelius, I wasn't quite able to reuse the korgac, 
the number of common lines of code is at about 15. korgac doesn't support KConfigXT,
and the alarmdialog references korganizer, something that KNotes must not do, obviously.
I also think it's overkill to store the open alarm dialogs on program exit, but that
might be just me?

We have to think about if it indeed makes sense to create a shared lib for just that
little bit of code and the dialog. But I wanted to finally get a first implementation,
users are waiting for this for a couple of years already...


  A            knotesalarm.cpp   1.1 [GPL (v2+) (+Qt exception)]
  A            knotesalarm.h   1.1 [GPL (v2+) (+Qt exception)]
  M +3 -2      Makefile.am   1.80
  M +0 -3      knotealarmdlg.cpp   1.5
  M +0 -1      knotealarmdlg.h   1.4
  M +4 -0      knotesapp.cpp   1.112
  M +2 -0      knotesapp.h   1.46
  M +8 -0      knotesglobalconfig.kcfg   1.6


--- kdepim/knotes/knotealarmdlg.cpp  #1.4:1.5
@@ -73,7 +73,4 @@ KNoteAlarmDlg::KNoteAlarmDlg( const QStr
 }
 
-KNoteAlarmDlg::~KNoteAlarmDlg()
-{
-}
 
 void KNoteAlarmDlg::setIncidence( KCal::Journal *journal )

--- kdepim/knotes/knotealarmdlg.h  #1.3:1.4
@@ -49,5 +49,4 @@ class KNoteAlarmDlg : public KDialogBase
 public:
     KNoteAlarmDlg( const QString& caption, QWidget *parent=0, const char *name=0 );
-    ~KNoteAlarmDlg();
 
     void setIncidence( KCal::Journal *journal );

--- kdepim/knotes/Makefile.am  #1.79:1.80
@@ -8,5 +8,5 @@
 noinst_HEADERS  = knotesapp.h knote.h knoteedit.h knotebutton.h knoteconfigdlg.h \
                   knoteslegacy.h resourcemanager.h resourcenotes.h resourcelocal.h \
-                  knotesnetrecv.h knotesnetsend.h knotehostdlg.h knotealarmdlg.h
+                  knotesnetrecv.h knotesnetsend.h knotehostdlg.h knotealarmdlg.h knotesalarm.h
 
 noinst_LTLIBRARIES = libknote.la libknoteseditor.la libknoteslegacy.la libknotesconfig.la \
@@ -18,5 +18,6 @@
 libknotesnetwork_la_SOURCES = knotesnetrecv.cpp knotesnetsend.cpp
 libknotesresources_la_SOURCES = resourcemanager.cpp resourcenotes.cpp resourcelocal.cpp
-libknote_la_SOURCES = knote.cpp knotebutton.cpp knoteconfigdlg.cpp knotehostdlg.cpp knotealarmdlg.cpp
+libknote_la_SOURCES = knote.cpp knotebutton.cpp knoteconfigdlg.cpp knotehostdlg.cpp \
+                                                         knotealarmdlg.cpp knotesalarm.cpp
 
 knotes_SOURCES  = main.cpp knotesapp.cpp KNotesAppIface.skel

--- kdepim/knotes/knotesapp.cpp  #1.111:1.112
@@ -46,4 +46,5 @@
 #include "knotesapp.h"
 #include "knote.h"
+#include "knotesalarm.h"
 #include "knoteconfigdlg.h"
 #include "knotesglobalconfig.h"
@@ -188,4 +189,7 @@ KNotesApp::KNotesApp()
     }
 
+    // set up the alarm reminder
+    m_alarm = new KNotesAlarm( m_manager, this );
+
     // create the socket and possibly start listening for connections
     m_listener = new KExtendedSocket();

--- kdepim/knotes/knotesapp.h  #1.45:1.46
@@ -42,4 +42,5 @@ class KXMLGUIFactory;
 class KXMLGUIBuilder;
 class KExtendedSocket;
+class KNotesAlarm;
 class KNotesResourceManager;
 
@@ -125,4 +126,5 @@ private:
     KNotesResourceManager *m_manager;
 
+    KNotesAlarm     *m_alarm;
     KExtendedSocket *m_listener;
 

--- kdepim/knotes/knotesglobalconfig.kcfg  #1.5:1.6
@@ -10,4 +10,12 @@
   </group>
 
+  <group name="Alarms">
+    <entry name="CheckInterval" type="UInt">
+      <default>60</default>
+    </entry>
+
+    <entry name="AlarmsLastChecked" type="DateTime"/>
+  </group>
+
   <group name="Network">
     <entry name="ReceiveNotes" type="Bool">


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic