-rw-r--r-- | libopie2/opiepim/opiepim.pro | 3 | ||||
-rw-r--r-- | libopie2/opiepim/stable_pch.h | 53 | ||||
-rw-r--r-- | libopie2/opiepim/ui/opimmainwindow.cpp | 1 |
3 files changed, 56 insertions, 1 deletions
diff --git a/libopie2/opiepim/opiepim.pro b/libopie2/opiepim/opiepim.pro index af8e63d..992fb8b 100644 --- a/libopie2/opiepim/opiepim.pro +++ b/libopie2/opiepim/opiepim.pro @@ -1,23 +1,26 @@ TEMPLATE = lib CONFIG += qt warn_on DESTDIR = $(OPIEDIR)/lib INTERFACES = TARGET = opiepim2 VERSION = 1.8.6 INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lopiecore2 include ( $(OPIEDIR)/gen.pro ) include ( core/core.pro ) include ( backend/backends.pro ) include ( ui/ui.pro ) +include ( private/private.pro ) + +PRECOMPILED_HEADER = stable_pch.h !contains( platform, x11 ) { include ( $(OPIEDIR)/include.pro ) } contains( platform, x11 ) { LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib } diff --git a/libopie2/opiepim/stable_pch.h b/libopie2/opiepim/stable_pch.h new file mode 100644 index 0000000..ea4d0d1 --- a/dev/null +++ b/libopie2/opiepim/stable_pch.h @@ -0,0 +1,53 @@ +#if defined __cplusplus + +#include "core/ocontactaccess.h" +#include "core/odatebookaccess.h" +#include "core/opimaccessfactory.h" +#include "core/opimaccesstemplate.h" +#include "core/opimcache.h" +#include "core/opimcontactfields.h" +#include "core/opimcontact.h" +#include "core/opimdateconversion.h" +#include "core/opimevent.h" +#include "core/opimglobal.h" +#include "core/opimmaintainer.h" +#include "core/opimnotify.h" +#include "core/opimnotifymanager.h" +#include "core/opimoccurrence.h" +#include "core/opimrecord.h" +#include "core/opimrecordlist.h" +#include "core/opimrecurrence.h" +#include "core/opimresolver.h" +#include "core/opimstate.h" +#include "core/opimtemplatebase.h" +#include "core/opimtimezone.h" +#include "core/opimtodo.h" +#include "core/opimxref.h" +#include "core/opimxrefmanager.h" +#include "core/opimxrefpartner.h" +#include "core/otodoaccess.h" +#include "backend/obackendfactory.h" +#include "backend/ocontactaccessbackend.h" +#include "backend/ocontactaccessbackend_vcard.h" +#include "backend/ocontactaccessbackend_xml.h" +#include "backend/odatebookaccessbackend.h" +#include "backend/odatebookaccessbackend_xml.h" +#include "backend/opimaccessbackend.h" +#include "backend/opimbackendoccurrence.h" +#include "backend/otodoaccessbackend.h" +#include "backend/otodoaccessvcal.h" +#include "backend/otodoaccessxml.h" +#include "backend/otodoaccesssql.h" +#include "backend/ocontactaccessbackend_sql.h" +#include "backend/odatebookaccessbackend_sql.h" +#include "ui/opimmainwindow.h" +#include "ui/opimrecurrencewidget.h" +#include "ui/todayconfigwidget.h" +#include "ui/todayplugininterface.h" +#include "private/vobject_p.h" +#include "private/opimoccurrence_p.h" +#include "private/opimsortvector.h" +#include "private/opimtodosortvector.h" + + +#endif diff --git a/libopie2/opiepim/ui/opimmainwindow.cpp b/libopie2/opiepim/ui/opimmainwindow.cpp index 8ce2062..058a428 100644 --- a/libopie2/opiepim/ui/opimmainwindow.cpp +++ b/libopie2/opiepim/ui/opimmainwindow.cpp @@ -30,159 +30,158 @@ #include "opimmainwindow.h" /* OPIE */ #include <opie2/opimresolver.h> #include <opie2/odebug.h> #include <qpe/sound.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> /* QT */ #include <qapplication.h> #include <qdatetime.h> #include <qcopchannel_qws.h> namespace Opie { OPimMainWindow::OPimMainWindow( const QString& service, QWidget* parent, const char* name, WFlags flag ) : QMainWindow( parent, name, flag ), m_rtti(-1), m_service( service ), m_fallBack(0l) { /* * let's generate our QCopChannel */ m_str = QString("QPE/"+m_service).local8Bit(); m_channel= new QCopChannel(m_str, this ); connect(m_channel, SIGNAL(received(const QCString&,const QByteArray&) ), this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); connect(qApp, SIGNAL(appMessage(const QCString&,const QByteArray&) ), this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); /* connect flush and reload */ connect(qApp, SIGNAL(flush() ), this, SLOT(flush() ) ); connect(qApp, SIGNAL(reload() ), this, SLOT(reload() ) ); } OPimMainWindow::~OPimMainWindow() { delete m_channel; } QCopChannel* OPimMainWindow::channel() { return m_channel; } void OPimMainWindow::doSetDocument( const QString& ) { } void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) { bool needShow = false; /* * create demands to create * a new record... */ QDataStream stream(array, IO_ReadOnly); if ( cmd == "create()" ) { raise(); int uid = create(); QCopEnvelope e(m_str, "created(int)" ); e << uid; needShow = true; }else if ( cmd == "remove(int)" ) { int uid; stream >> uid; bool rem = remove( uid ); QCopEnvelope e(m_str, "removed(bool)" ); e << rem; needShow = true; }else if ( cmd == "beam(int)" ) { int uid; stream >> uid; beam( uid); }else if ( cmd == "show(int)" ) { raise(); int uid; stream >> uid; show( uid ); needShow = true; }else if ( cmd == "edit(int)" ) { raise(); int uid; stream >> uid; edit( uid ); }else if ( cmd == "add(int,QByteArray)" ) { int rtti; QByteArray array; stream >> rtti; stream >> array; m_fallBack = record(rtti, array ); if (!m_fallBack) return; add( *m_fallBack ); delete m_fallBack; }else if ( cmd == "alarm(QDateTime,int)" ) { raise(); QDateTime dt; int uid; stream >> dt; stream >> uid; - owarn << " Date: " << dt.toString() << " Uid: " << uid << "" << oendl; QDateTime current = QDateTime::currentDateTime(); if ( current.time().hour() != dt.time().hour() && current.time().minute() != dt.time().minute() ) return; doAlarm( dt, uid ); needShow = true; } if (needShow ) QPEApplication::setKeepRunning(); } /* implement the url scripting here */ void OPimMainWindow::setDocument( const QString& str) { doSetDocument( str ); } /* * we now try to get the array demarshalled * check if the rtti matches this one */ OPimRecord* OPimMainWindow::record( int rtti, const QByteArray& array ) { if ( service() != rtti ) return 0l; OPimRecord* record = OPimResolver::self()->record( rtti ); QDataStream str(array, IO_ReadOnly ); if ( !record || !record->loadFromStream(str) ) { delete record; record = 0l; } return record; } /* * get the rtti for the service */ int OPimMainWindow::service() { if ( m_rtti == -1 ) m_rtti = OPimResolver::self()->serviceId( m_service ); return m_rtti; } void OPimMainWindow::doAlarm( const QDateTime&, int ) { } void OPimMainWindow::startAlarm(int count ) { m_alarmCount = count; m_playedCount = 0; Sound::soundAlarm(); m_timerId = startTimer( 5000 ); } void OPimMainWindow::killAlarm() { killTimer( m_timerId ); } void OPimMainWindow::timerEvent( QTimerEvent* e) { if ( m_playedCount <m_alarmCount ) { m_playedCount++; Sound::soundAlarm(); }else { killTimer( e->timerId() ); } } } |