author | zautrix <zautrix> | 2005-04-25 13:36:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-25 13:36:57 (UTC) |
commit | 3978688cbe832e2b72c8048b96c9a7c43ce11bc9 (patch) (unidiff) | |
tree | 8c459ecc1bb64b5ff67433461618492cbcc2ac4a /kalarmd | |
parent | 119181e56ffd7987ae57749bde85935e29482955 (diff) | |
download | kdepimpi-3978688cbe832e2b72c8048b96c9a7c43ce11bc9.zip kdepimpi-3978688cbe832e2b72c8048b96c9a7c43ce11bc9.tar.gz kdepimpi-3978688cbe832e2b72c8048b96c9a7c43ce11bc9.tar.bz2 |
alarm fix
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index c747dfd..37e7d0d 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -51,18 +51,18 @@ | |||
51 | SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) | 51 | SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) |
52 | : QLabel( parent ) | 52 | : QLabel( parent ) |
53 | { | 53 | { |
54 | mAlarmDialog = new AlarmDialog( 0 ); | 54 | mAlarmDialog = new AlarmDialog( 0 ); |
55 | mPopUp = new QPopupMenu( this ); | 55 | mPopUp = new QPopupMenu( this ); |
56 | mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); | 56 | mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); |
57 | mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); | 57 | mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); |
58 | mPopUp->insertSeparator(); | 58 | mPopUp->insertSeparator(); |
59 | //mPopUp->insertItem( "Todo List", this, SLOT ( showTodo() ) ); | 59 | mPopUp->insertItem( "Todo List", this, SLOT ( showTodo() ) ); |
60 | //mPopUp->insertSeparator(); | 60 | mPopUp->insertSeparator(); |
61 | mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); | 61 | mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); |
62 | mPopUp->insertSeparator(); | 62 | mPopUp->insertSeparator(); |
63 | mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); | 63 | mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); |
64 | mPopUp->insertItem( "New Event", this, SLOT ( newEvent() ) ); | 64 | mPopUp->insertItem( "New Event", this, SLOT ( newEvent() ) ); |
65 | mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); | 65 | mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); |
66 | mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); | 66 | mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); |
67 | mPopUp->insertSeparator(); | 67 | mPopUp->insertSeparator(); |
68 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); | 68 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); |
@@ -104,23 +104,25 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) | |||
104 | mBeepPopUp->insertItem( "300", 300 ); | 104 | mBeepPopUp->insertItem( "300", 300 ); |
105 | mBeepPopUp->insertItem( "180", 180 ); | 105 | mBeepPopUp->insertItem( "180", 180 ); |
106 | mBeepPopUp->insertItem( "60", 60 ); | 106 | mBeepPopUp->insertItem( "60", 60 ); |
107 | mBeepPopUp->insertItem( "30", 30 ); | 107 | mBeepPopUp->insertItem( "30", 30 ); |
108 | mBeepPopUp->insertItem( "10", 10 ); | 108 | mBeepPopUp->insertItem( "10", 10 ); |
109 | mBeepPopUp->insertItem( "3", 3 ); | 109 | mBeepPopUp->insertItem( "3", 3 ); |
110 | mBeepPopUp->insertItem( "1", 1 ); | 110 | mBeepPopUp->insertItem( "1", 1 ); |
111 | mBeepPopUp->insertItem( "Off", 0 ); | 111 | mBeepPopUp->insertItem( "Off", 0 ); |
112 | mBeepPopUp->insertSeparator(); | ||
113 | mBeepPopUp->insertItem( "Simulate", 1000 ); | ||
112 | mBeepPopUp->setCheckable( true ); | 114 | mBeepPopUp->setCheckable( true ); |
113 | mPopUp->insertSeparator(); | 115 | mPopUp->insertSeparator(); |
114 | mPopUp->insertItem( "Play beeps", mBeepPopUp ); | 116 | mPopUp->insertItem( "Play beeps", mBeepPopUp ); |
115 | mPopUp->insertSeparator(); | 117 | mPopUp->insertSeparator(); |
116 | mPopUp->insertItem( "Timer", mTimerPopUp ); | 118 | mPopUp->insertItem( "Timer", mTimerPopUp ); |
117 | mPopUp->insertSeparator(); | 119 | //mPopUp->insertSeparator(); |
118 | mPopUp->insertItem( "Simulate", this, SLOT ( simulate() ) ); | 120 | //mPopUp->insertItem( "Simulate", this, SLOT ( simulate() ) ); |
119 | 121 | ||
120 | mPopUp->resize( mPopUp->sizeHint() ); | 122 | mPopUp->resize( mPopUp->sizeHint() ); |
121 | mPlayBeeps = 60; | 123 | mPlayBeeps = 60; |
122 | mBeepPopUp->setItemChecked ( mPlayBeeps, true ); | 124 | mBeepPopUp->setItemChecked ( mPlayBeeps, true ); |
123 | connect ( mBeepPopUp, SIGNAL( activated ( int ) ), this, SLOT (slotPlayBeep( int ) ) ); | 125 | connect ( mBeepPopUp, SIGNAL( activated ( int ) ), this, SLOT (slotPlayBeep( int ) ) ); |
124 | connect ( mTimerPopUp, SIGNAL( activated ( int ) ), this, SLOT (confTimer( int ) ) ); | 126 | connect ( mTimerPopUp, SIGNAL( activated ( int ) ), this, SLOT (confTimer( int ) ) ); |
125 | connect ( mTimerPopUp, SIGNAL(aboutToShow() ), this, SLOT ( showTimer( ) ) ); | 127 | connect ( mTimerPopUp, SIGNAL(aboutToShow() ), this, SLOT ( showTimer( ) ) ); |
126 | connect ( mSoundPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSound( int ) ) ); | 128 | connect ( mSoundPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSound( int ) ) ); |
@@ -251,16 +253,20 @@ void SimpleAlarmDaemonImpl::confSound( int num ) | |||
251 | } else { | 253 | } else { |
252 | wavAlarm = true; | 254 | wavAlarm = true; |
253 | mSoundPopUp->setItemChecked ( 0, false ); | 255 | mSoundPopUp->setItemChecked ( 0, false ); |
254 | mSoundPopUp->setItemChecked ( 1, true ); | 256 | mSoundPopUp->setItemChecked ( 1, true ); |
255 | } | 257 | } |
256 | } | 258 | } |
257 | void SimpleAlarmDaemonImpl::slotPlayBeep( int num ) | 259 | void SimpleAlarmDaemonImpl::slotPlayBeep( int num ) |
258 | { | 260 | { |
261 | if ( num == 1000 ) { | ||
262 | simulate(); | ||
263 | return; | ||
264 | } | ||
259 | mBeepPopUp->setItemChecked ( mPlayBeeps,false ); | 265 | mBeepPopUp->setItemChecked ( mPlayBeeps,false ); |
260 | mPlayBeeps = num; | 266 | mPlayBeeps = num; |
261 | mBeepPopUp->setItemChecked ( mPlayBeeps, true ); | 267 | mBeepPopUp->setItemChecked ( mPlayBeeps, true ); |
262 | } | 268 | } |
263 | 269 | ||
264 | void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& ) | 270 | void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& ) |
265 | { | 271 | { |
266 | //qDebug("SimpleAlarmDaemonImpl::ALARM RECEIVED! %s", msg.data()); | 272 | //qDebug("SimpleAlarmDaemonImpl::ALARM RECEIVED! %s", msg.data()); |