summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-08-10 17:39:44 (UTC)
committer zautrix <zautrix>2005-08-10 17:39:44 (UTC)
commit1a13e55dd4726cc03c756412fe27b3144a43fc4c (patch) (side-by-side diff)
treee41b3f85d0a011b1416c4ea50a9348ee3863a4df /korganizer
parent1af305e995d99549091c5b1e167b6101a3910f0d (diff)
downloadkdepimpi-1a13e55dd4726cc03c756412fe27b3144a43fc4c.zip
kdepimpi-1a13e55dd4726cc03c756412fe27b3144a43fc4c.tar.gz
kdepimpi-1a13e55dd4726cc03c756412fe27b3144a43fc4c.tar.bz2
alarm save as file
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index d51187a..316826a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1253,2 +1253,17 @@ void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti )
mSuspendTimer->start( ms , true );
+#ifdef DESKTOP_VERSION
+ if ( QApplication::desktop()->width() < 1024 ) {
+ QString mess = qdt.toString( "yyyy-MM-dd hh:mm:ss" ) + "\n" + noti;
+ //qDebug("nextsuspendalarm = \n%s ",mess.latin1() );
+ QString fn = QDir::homeDirPath() + "/.kopi_suspend_alarm";
+ QFile file( fn );
+ if (!file.open( IO_WriteOnly ) ) {
+ qDebug("KO: Error writing next suspend alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1());
+ } else {
+ QTextStream ts( &file );
+ ts << mess;
+ file.close();
+ }
+ }
+#endif
@@ -1266,2 +1281,17 @@ void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
}
+#ifdef DESKTOP_VERSION
+ if ( QApplication::desktop()->width() < 1024 ) {
+ QString mess = qdt.toString( "yyyy-MM-dd hh:mm:ss" ) + "\n" + noti;
+ //qDebug("nextalarm = \n%s ",mess.latin1() );
+ QString fn = QDir::homeDirPath() + "/.kopi_next_alarm";
+ QFile file( fn );
+ if (!file.open( IO_WriteOnly ) ) {
+ qDebug("KO: Error writing next alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1());
+ } else {
+ QTextStream ts( &file );
+ ts << mess;
+ file.close();
+ }
+ }
+#endif
int maxSec;