libopie PIM API Documentation

opimmainwindow.h

Go to the documentation of this file.
00001 #ifndef OPIE_PIM_MAINWINDOW_H
00002 #define OPIE_PIM_MAINWINDOW_H
00003 
00004 #include <qmainwindow.h>
00005 
00006 #include <opie/opimrecord.h>
00007 
00014 /*
00015  * due Qt and Templates with signal and slots
00016  * do not work that good :(
00017  * (Ok how to moc a template ;) )
00018  * We will have the mainwindow which calls a struct which
00019  * is normally reimplemented as a template ;)
00020  */
00021 
00022 class QCopChannel;
00023 class QDateTime;
00024 class OPimMainWindow : public QMainWindow {
00025     Q_OBJECT
00026 public:
00027     enum TransPort { BlueTooth=0,
00028                      IrDa };
00029 
00030     OPimMainWindow(  const QString& service, QWidget *parent = 0,  const char* name = 0,
00031                      WFlags f = WType_TopLevel);
00032     virtual ~OPimMainWindow();
00033 
00034 
00035 protected slots:
00036     /*
00037      * called when a setDocument
00038      * couldn't be handled by this window
00039      */
00040     virtual void doSetDocument( const QString& );
00041     /* for syncing */
00042     virtual void flush()  = 0;
00043     virtual void reload() = 0;
00044 
00046     virtual int create() = 0;
00048     virtual bool remove( int uid ) = 0;
00050     virtual void beam( int uid ) = 0;
00051 
00053     virtual void show( int uid ) = 0;
00055     virtual void edit( int uid ) = 0;
00056 
00058     virtual void add( const OPimRecord& ) = 0;
00059 
00060     virtual void doAlarm( const QDateTime&, int uid );
00061 
00062     QCopChannel* channel();
00063 
00064 protected:
00069     void startAlarm(int count = 10);
00070     void killAlarm();
00071     void timerEvent( QTimerEvent* );
00072 
00073 private slots:
00074     void appMessage( const QCString&, const QByteArray& );
00075     void setDocument( const QString& );
00076 
00077 
00078 private:
00079     class Private;
00080     Private* d;
00081 
00082     int m_rtti;
00083     QCopChannel* m_channel;
00084     QString m_service;
00085     QCString m_str;
00086     OPimRecord* m_fallBack;
00087     int m_alarmCount;
00088     int m_playedCount;
00089     int m_timerId;
00090     /* I would love to do this as a template
00091      * but can't think of a right way
00092      * because I need signal and slots -zecke
00093      */
00094     virtual OPimRecord* record( int rtti, const QByteArray& ) ;
00095     int service();
00096 };
00097 
00098 
00099 #endif
KDE Logo
This file is part of the documentation for OPIE Version 1.1.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:25:20 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001