-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 16 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.h | 1 |
2 files changed, 10 insertions, 7 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 2bc6643..471836b 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -36,46 +36,45 @@ | |||
36 | #include <qdialog.h> | 36 | #include <qdialog.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
38 | #include <qtextstream.h> | 38 | #include <qtextstream.h> |
39 | #include <qtopia/qcopenvelope_qws.h> | 39 | #include <qtopia/qcopenvelope_qws.h> |
40 | #include <qtopia/alarmserver.h> | 40 | #include <qtopia/alarmserver.h> |
41 | 41 | ||
42 | #include <stdlib.h> | 42 | #include <stdlib.h> |
43 | #include <stdio.h> | 43 | #include <stdio.h> |
44 | #include <unistd.h> | 44 | #include <unistd.h> |
45 | 45 | ||
46 | 46 | ||
47 | SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) | 47 | SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) |
48 | : QLabel( parent ) | 48 | : QLabel( parent ) |
49 | { | 49 | { |
50 | mAlarmDialog = new AlarmDialog( 0 ); | 50 | mAlarmDialog = new AlarmDialog( 0 ); |
51 | mPopUp = new QPopupMenu( 0 ); | 51 | mPopUp = new QPopupMenu( 0 ); |
52 | mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); | ||
53 | mPopUp->insertSeparator(); | ||
54 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); | ||
55 | mPopUp->insertSeparator(); | ||
56 | mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); | 52 | mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); |
53 | mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); | ||
57 | mPopUp->insertSeparator(); | 54 | mPopUp->insertSeparator(); |
58 | mPopUp->insertItem( "What's Todo?", this, SLOT ( showTodo() ) ); | 55 | mPopUp->insertItem( "What's Todo?", this, SLOT ( showTodo() ) ); |
59 | mPopUp->insertSeparator(); | 56 | mPopUp->insertSeparator(); |
60 | mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); | 57 | mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); |
61 | mPopUp->insertSeparator(); | 58 | mPopUp->insertSeparator(); |
62 | mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); | 59 | mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); |
63 | mPopUp->insertSeparator(); | ||
64 | mPopUp->insertItem( "New Event", this, SLOT ( newEvent() ) ); | 60 | mPopUp->insertItem( "New Event", this, SLOT ( newEvent() ) ); |
65 | mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); | 61 | mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); |
62 | mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); | ||
63 | mPopUp->insertSeparator(); | ||
64 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); | ||
66 | mTimerPopUp = new QPopupMenu( mPopUp ); | 65 | mTimerPopUp = new QPopupMenu( mPopUp ); |
67 | 66 | ||
68 | mBeepPopUp = new QPopupMenu( mPopUp ); | 67 | mBeepPopUp = new QPopupMenu( mPopUp ); |
69 | mSoundPopUp = new QPopupMenu( mBeepPopUp ); | 68 | mSoundPopUp = new QPopupMenu( mBeepPopUp ); |
70 | mPausePopUp = new QPopupMenu( mBeepPopUp ); | 69 | mPausePopUp = new QPopupMenu( mBeepPopUp ); |
71 | QPopupMenu* savePopUp = new QPopupMenu( mBeepPopUp ); | 70 | QPopupMenu* savePopUp = new QPopupMenu( mBeepPopUp ); |
72 | savePopUp->insertItem( "Save", 0 ); | 71 | savePopUp->insertItem( "Save", 0 ); |
73 | savePopUp->insertItem( "Load", 1 ); | 72 | savePopUp->insertItem( "Load", 1 ); |
74 | mSoundPopUp->insertItem( "Buzzer", 0 ); | 73 | mSoundPopUp->insertItem( "Buzzer", 0 ); |
75 | mSoundPopUp->insertItem( "Wav file", 1 ); | 74 | mSoundPopUp->insertItem( "Wav file", 1 ); |
76 | mPausePopUp->insertItem( " 1 sec", 1 ); | 75 | mPausePopUp->insertItem( " 1 sec", 1 ); |
77 | mPausePopUp->insertItem( " 2 sec", 2 ); | 76 | mPausePopUp->insertItem( " 2 sec", 2 ); |
78 | mPausePopUp->insertItem( " 3 sec", 3 ); | 77 | mPausePopUp->insertItem( " 3 sec", 3 ); |
79 | mPausePopUp->insertItem( " 5 sec", 5 ); | 78 | mPausePopUp->insertItem( " 5 sec", 5 ); |
80 | mPausePopUp->insertItem( "10 sec", 10 ); | 79 | mPausePopUp->insertItem( "10 sec", 10 ); |
81 | mPausePopUp->insertItem( "30 sec", 30 ); | 80 | mPausePopUp->insertItem( "30 sec", 30 ); |
@@ -493,33 +492,36 @@ void SimpleAlarmDaemonImpl::writeFile() | |||
493 | QCopEnvelope e("QPE/Application/kopi", "-writeFile"); | 492 | QCopEnvelope e("QPE/Application/kopi", "-writeFile"); |
494 | } | 493 | } |
495 | void SimpleAlarmDaemonImpl::showWN() | 494 | void SimpleAlarmDaemonImpl::showWN() |
496 | { | 495 | { |
497 | QCopEnvelope e("QPE/Application/kopi", "-showWN"); | 496 | QCopEnvelope e("QPE/Application/kopi", "-showWN"); |
498 | } | 497 | } |
499 | void SimpleAlarmDaemonImpl::newTodo() | 498 | void SimpleAlarmDaemonImpl::newTodo() |
500 | { | 499 | { |
501 | QCopEnvelope e("QPE/Application/kopi", "-newTodo"); | 500 | QCopEnvelope e("QPE/Application/kopi", "-newTodo"); |
502 | } | 501 | } |
503 | 502 | ||
504 | void SimpleAlarmDaemonImpl::newEvent() | 503 | void SimpleAlarmDaemonImpl::newEvent() |
505 | { | 504 | { |
506 | QCopEnvelope e("QPE/Application/kopi", "-newEvent"); | 505 | QCopEnvelope e("QPE/Application/kopi", "-newEvent"); |
507 | 506 | ||
508 | } | 507 | } |
509 | 508 | void SimpleAlarmDaemonImpl::newMail() | |
509 | { | ||
510 | QCopEnvelope e("QPE/Application/kmpi", "newMail()"); | ||
511 | } | ||
510 | void SimpleAlarmDaemonImpl::showAdd() | 512 | void SimpleAlarmDaemonImpl::showAdd() |
511 | { | 513 | { |
512 | QCopEnvelope e("QPE/Application/kapi", " "); | 514 | QCopEnvelope e("QPE/Application/kapi", " "); |
513 | } | 515 | } |
514 | void SimpleAlarmDaemonImpl::ringSync() | 516 | void SimpleAlarmDaemonImpl::ringSync() |
515 | { | 517 | { |
516 | QCopEnvelope e("QPE/Application/kopi", "-ringSync"); | 518 | QCopEnvelope e("QPE/Application/kopi", "-ringSync"); |
517 | 519 | ||
518 | } | 520 | } |
519 | void SimpleAlarmDaemonImpl::newCountdown() | 521 | void SimpleAlarmDaemonImpl::newCountdown() |
520 | { | 522 | { |
521 | //recieve("cal_alarm", 10 ); | 523 | //recieve("cal_alarm", 10 ); |
522 | } | 524 | } |
523 | void SimpleAlarmDaemonImpl::simulate() | 525 | void SimpleAlarmDaemonImpl::simulate() |
524 | { | 526 | { |
525 | writeFile(); | 527 | writeFile(); |
diff --git a/kalarmd/simplealarmdaemonimpl.h b/kalarmd/simplealarmdaemonimpl.h index 1c16af8..32a3867 100644 --- a/kalarmd/simplealarmdaemonimpl.h +++ b/kalarmd/simplealarmdaemonimpl.h | |||
@@ -35,32 +35,33 @@ class SimpleAlarmDaemonImpl : public QLabel | |||
35 | { | 35 | { |
36 | Q_OBJECT | 36 | Q_OBJECT |
37 | public: | 37 | public: |
38 | SimpleAlarmDaemonImpl( QWidget *parent = 0 ); | 38 | SimpleAlarmDaemonImpl( QWidget *parent = 0 ); |
39 | 39 | ||
40 | ~SimpleAlarmDaemonImpl(); | 40 | ~SimpleAlarmDaemonImpl(); |
41 | 41 | ||
42 | protected slots: | 42 | protected slots: |
43 | void recieve( const QCString& msg, const QByteArray& data ); | 43 | void recieve( const QCString& msg, const QByteArray& data ); |
44 | void newTodo(); | 44 | void newTodo(); |
45 | void newEvent(); | 45 | void newEvent(); |
46 | void newCountdown(); | 46 | void newCountdown(); |
47 | void simulate(); | 47 | void simulate(); |
48 | void showKO(); | 48 | void showKO(); |
49 | void showWN(); | 49 | void showWN(); |
50 | void showAdd(); | 50 | void showAdd(); |
51 | void newMail(); | ||
51 | void ringSync(); | 52 | void ringSync(); |
52 | void showTodo(); | 53 | void showTodo(); |
53 | void writeFile(); | 54 | void writeFile(); |
54 | void writeJournal(); | 55 | void writeJournal(); |
55 | void slotPlayBeep( int ); | 56 | void slotPlayBeep( int ); |
56 | void showTimer( ); | 57 | void showTimer( ); |
57 | void confPause( int ); | 58 | void confPause( int ); |
58 | void confTimer( int ); | 59 | void confTimer( int ); |
59 | void saveSlot( int ); | 60 | void saveSlot( int ); |
60 | void confSuspend( int ); | 61 | void confSuspend( int ); |
61 | void confSound( int num ); | 62 | void confSound( int num ); |
62 | void startAlarm(QString mess, QString fn ); | 63 | void startAlarm(QString mess, QString fn ); |
63 | 64 | ||
64 | protected: | 65 | protected: |
65 | void mousePressEvent( QMouseEvent * ); | 66 | void mousePressEvent( QMouseEvent * ); |
66 | 67 | ||