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

List:       kde-commits
Subject:    KDE/kdepim/korganizer
From:       Andreas Holzammer <andy () kdab ! com>
Date:       2010-11-24 16:13:15
Message-ID: 20101124161315.724EAAC8A2 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1200311 by aholzammer:

- port korgac for wince

 M  +6 -0      CMakeLists.txt  
 M  +18 -2     korgac/CMakeLists.txt  
 M  +21 -2     korgac/koalarmclient.cpp  
 M  +8 -0      korgac/koalarmclient.h  
 M  +8 -0      korgac/korgacmain.cpp  


--- trunk/KDE/kdepim/korganizer/CMakeLists.txt #1200310:1200311
@@ -24,7 +24,9 @@
 # enable exception handling
 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}" )
 
+if(NOT WINCE)
 add_subdirectory( tests )
+endif(NOT WINCE)
 
 add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5850)
 include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/interfaces
@@ -41,6 +43,7 @@
                     ${Boost_INCLUDE_DIRS}
                     ${QT_INCLUDES} ${ZLIB_INCLUDE_DIR} )
 
+if(NOT WINCE)
 add_subdirectory( interfaces )
 if (KDEPIM_BUILD_DESKTOP)
   add_subdirectory( pixmaps )
@@ -48,8 +51,10 @@
   add_subdirectory( plugins )
   add_subdirectory( kcmconfigs )
 endif (KDEPIM_BUILD_DESKTOP)
+endif(NOT WINCE)
 add_subdirectory( korgac )
 
+if(NOT WINCE)
 set( PERL ${PERL_EXECUTABLE} )
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ical2vcal.cmake \
${CMAKE_CURRENT_BINARY_DIR}/ical2vcal @ONLY)  
@@ -251,3 +256,4 @@
   install( FILES org.kde.Korganizer.Calendar.xml org.kde.korganizer.Korganizer.xml \
DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})  
 endif (KDEPIM_BUILD_DESKTOP)
+endif(NOT WINCE)
--- trunk/KDE/kdepim/korganizer/korgac/CMakeLists.txt #1200310:1200311
@@ -12,9 +12,15 @@
 
 set(korgac_SRCS 
    korgacmain.cpp 
+   koalarmclient.cpp)
+
+if(NOT WINCE)   
+set(korgac_SRCS
+   ${korgac_SRCS}
    alarmdialog.cpp 
    alarmdockwindow.cpp 
-   koalarmclient.cpp)
+)
+endif(NOT WINCE)
 
 set(korganizer_xml ${CMAKE_SOURCE_DIR}/korganizer/org.kde.korganizer.Korganizer.xml)
 QT4_ADD_DBUS_INTERFACE(korgac_SRCS ${korganizer_xml} korganizer_interface)
@@ -23,6 +29,9 @@
 
 qt4_add_dbus_adaptor(korgac_SRCS org.kde.korganizer.KOrgac.xml koalarmclient.h \
KOAlarmClient)  
+if (RUNTIME_PLUGINS_STATIC)
+  add_definitions(-DSERIALIZER_PLUGIN_STATIC)
+endif (RUNTIME_PLUGINS_STATIC)
 
 kde4_add_app_icon(korgac_SRCS "${KDE4_ICON_DIR}/oxygen/*/apps/korgac.png")
 
@@ -35,13 +44,20 @@
   ${KDEPIMLIBS_KPIMIDENTITIES_LIBS}
   ${KDEPIMLIBS_AKONADI_LIBS}
   ${KDEPIMLIBS_MAILTRANSPORT_LIBS}
-  korganizer_core
   ${KDEPIMLIBS_KCALCORE_LIBS} 
   ${KDEPIMLIBS_KCALUTILS_LIBS} 
   kdepim
   kdepimdbusinterfaces
 )
 
+if (RUNTIME_PLUGINS_STATIC)
+  target_link_libraries(korgac akonadi_serializer_kcalcore )
+endif (RUNTIME_PLUGINS_STATIC)
+
+if(NOT WINCE)
+target_link_libraries(korgac korganizer_core)
+endif(NOT WINCE)
+
 # TODO: move this to FindQt4.cmake
 find_library( QT_QMAEMO5_LIBRARY QtMaemo5 HINTS ${QT_LIBRARY_DIR} )
 if ( QT_QMAEMO5_LIBRARY )
--- trunk/KDE/kdepim/korganizer/korgac/koalarmclient.cpp #1200310:1200311
@@ -26,8 +26,12 @@
 //krazy:excludeall=kdebug because we use the korgac(check) debug area in here
 
 #include "koalarmclient.h"
+#ifndef _WIN32_WCE
 #include "alarmdialog.h"
 #include "alarmdockwindow.h"
+#else
+#include <KNotification>
+#endif
 #include "korgacadaptor.h"
 
 #include <Akonadi/Item>
@@ -66,12 +70,14 @@
   KConfigGroup generalGroup( &korgConfig, "General" );
   bool showDock = generalGroup.readEntry( "ShowReminderDaemon", true );
 
+#ifndef _WIN32_WCE
   if ( showDock ) {
     mDocker = new AlarmDockWindow;
 
     connect( this, SIGNAL(reminderCount(int)), mDocker, SLOT(slotUpdate(int)) );
     connect( mDocker, SIGNAL(quitSignal()), SLOT(slotQuit()) );
   }
+#endif
 
   const KTimeZone zone = KSystemTimeZones::local();
   Akonadi::Session *session = new Akonadi::Session( "KOAlarmClient", this );
@@ -139,7 +145,9 @@
 KOAlarmClient::~KOAlarmClient()
 {
   delete mCalendar;
+#ifndef _WIN32_WCE
   delete mDocker;
+#endif
   delete mDialog;
 }
 
@@ -177,7 +185,7 @@
     return;
   }
 
-#ifndef Q_WS_MAEMO_5
+#if !defined(Q_WS_MAEMO_5) && !defined(_WIN32_WCE)
   if ( !mDialog ) {
     mDialog = new AlarmDialog( calendar );
     connect( this, SIGNAL(saveAllSignal()), mDialog, SLOT(slotSave()) );
@@ -193,9 +201,14 @@
 
   mDialog->addIncidence( aitem, dt, displayText );
   mDialog->wakeUp();
+#elif defined(Q_WS_MAEMO_5)
+  const Incidence::Ptr incidence = CalendarSupport::incidence( aitem );
+  QMaemo5InformationBox::information( 0, incidence->summary(), \
QMaemo5InformationBox::NoTimeout );  #else
   const Incidence::Ptr incidence = CalendarSupport::incidence( aitem );
-  QMaemo5InformationBox::information( 0, incidence->summary(), \
QMaemo5InformationBox::NoTimeout ); +  KNotification *notify = new KNotification( \
"reminder", 0L, KNotification::Persistent ); +  notify->setText( incidence->summary() \
); +  notify->sendEvent(); 
 #endif
   saveLastCheckTime();
 }
@@ -220,12 +233,14 @@
   kapp->quit();
 }
 
+#ifndef _WIN32_WCE
 bool KOAlarmClient::commitData( QSessionManager & )
 {
   emit saveAllSignal();
   saveLastCheckTime();
   return true;
 }
+#endif
 
 void KOAlarmClient::forceAlarmCheck()
 {
@@ -270,12 +285,15 @@
 
 void KOAlarmClient::hide()
 {
+#ifndef _WIN32_WCE
   delete mDocker;
   mDocker = 0;
+#endif
 }
 
 void KOAlarmClient::show()
 {
+#ifndef _WIN32_WCE
   if ( !mDocker ) {
     mDocker = new AlarmDockWindow;
 
@@ -291,6 +309,7 @@
                mDialog, SLOT(dismissAll()) );
     }
   }
+#endif
 }
 
 #include "koalarmclient.moc"
--- trunk/KDE/kdepim/korganizer/korgac/koalarmclient.h #1200310:1200311
@@ -26,7 +26,9 @@
 #ifndef KOALARMCLIENT_H
 #define KOALARMCLIENT_H
 
+#ifndef _WIN32_WCE
 #include <KSessionManager>
+#endif
 
 #include <QTimer>
 #include <QDateTime>
@@ -42,14 +44,20 @@
   class Item;
 }
 
+#ifndef _WIN32_WCE
 class KOAlarmClient : public QObject, public KSessionManager
+#else
+class KOAlarmClient : public QObject
+#endif
 {
   Q_OBJECT
   public:
     KOAlarmClient( QObject *parent = 0 );
     ~KOAlarmClient();
 
+#ifndef _WIN32_WCE
     bool commitData( QSessionManager & );
+#endif
 
     // DBUS interface
     void quit();
--- trunk/KDE/kdepim/korganizer/korgac/korgacmain.cpp #1200310:1200311
@@ -30,6 +30,12 @@
 
 #include <stdlib.h>
 
+#ifdef SERIALIZER_PLUGIN_STATIC
+#include <QtPlugin>
+
+Q_IMPORT_PLUGIN(akonadi_serializer_kcalcore)
+#endif
+
 class ReminderDaemonApp : public KUniqueApplication
 {
   public:
@@ -82,7 +88,9 @@
   }
 
   ReminderDaemonApp app;
+#ifndef _WIN32_WCE
   app.disableSessionManagement();
+#endif
 
   return app.exec();
 }


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

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