author | zautrix <zautrix> | 2005-04-25 13:36:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-25 13:36:57 (UTC) |
commit | 3978688cbe832e2b72c8048b96c9a7c43ce11bc9 (patch) (side-by-side diff) | |
tree | 8c459ecc1bb64b5ff67433461618492cbcc2ac4a | |
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 @@ -47,26 +47,26 @@ #include <stdio.h> #include <unistd.h> SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) : QLabel( parent ) { mAlarmDialog = new AlarmDialog( 0 ); mPopUp = new QPopupMenu( this ); mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); mPopUp->insertSeparator(); - //mPopUp->insertItem( "Todo List", this, SLOT ( showTodo() ) ); - //mPopUp->insertSeparator(); + mPopUp->insertItem( "Todo List", this, SLOT ( showTodo() ) ); + mPopUp->insertSeparator(); mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); mPopUp->insertSeparator(); mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); mPopUp->insertItem( "New Event", this, SLOT ( newEvent() ) ); mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); mPopUp->insertSeparator(); mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); mTimerPopUp = new QPopupMenu( this ); QFont fon = mTimerPopUp->font(); fon.setPointSize( fon.pointSize() *3/2 ); mTimerPopUp->setFont( fon ); @@ -100,31 +100,33 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) mBeepPopUp->insertItem( "Auto suspend",mSuspendPopUp ); mBeepPopUp->insertItem( "Beep interval",mPausePopUp ); mBeepPopUp->insertItem( "Replay",mSoundPopUp ); mBeepPopUp->insertItem( "Config",savePopUp ); mBeepPopUp->insertItem( "300", 300 ); mBeepPopUp->insertItem( "180", 180 ); mBeepPopUp->insertItem( "60", 60 ); mBeepPopUp->insertItem( "30", 30 ); mBeepPopUp->insertItem( "10", 10 ); mBeepPopUp->insertItem( "3", 3 ); mBeepPopUp->insertItem( "1", 1 ); mBeepPopUp->insertItem( "Off", 0 ); + mBeepPopUp->insertSeparator(); + mBeepPopUp->insertItem( "Simulate", 1000 ); mBeepPopUp->setCheckable( true ); mPopUp->insertSeparator(); mPopUp->insertItem( "Play beeps", mBeepPopUp ); mPopUp->insertSeparator(); mPopUp->insertItem( "Timer", mTimerPopUp ); - mPopUp->insertSeparator(); - mPopUp->insertItem( "Simulate", this, SLOT ( simulate() ) ); + //mPopUp->insertSeparator(); + //mPopUp->insertItem( "Simulate", this, SLOT ( simulate() ) ); mPopUp->resize( mPopUp->sizeHint() ); mPlayBeeps = 60; mBeepPopUp->setItemChecked ( mPlayBeeps, true ); connect ( mBeepPopUp, SIGNAL( activated ( int ) ), this, SLOT (slotPlayBeep( int ) ) ); connect ( mTimerPopUp, SIGNAL( activated ( int ) ), this, SLOT (confTimer( int ) ) ); connect ( mTimerPopUp, SIGNAL(aboutToShow() ), this, SLOT ( showTimer( ) ) ); connect ( mSoundPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSound( int ) ) ); connect ( mPausePopUp, SIGNAL( activated ( int ) ), this, SLOT (confPause( int ) ) ); connect ( mSuspendPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSuspend( int ) ) ); connect ( savePopUp, SIGNAL( activated ( int ) ), this, SLOT (saveSlot( int ) ) ); mTimerTime = 0; @@ -247,24 +249,28 @@ void SimpleAlarmDaemonImpl::confSound( int num ) if ( num == 0 ) { wavAlarm = false; mSoundPopUp->setItemChecked ( 0, true ); mSoundPopUp->setItemChecked ( 1, false ); } else { wavAlarm = true; mSoundPopUp->setItemChecked ( 0, false ); mSoundPopUp->setItemChecked ( 1, true ); } } void SimpleAlarmDaemonImpl::slotPlayBeep( int num ) { + if ( num == 1000 ) { + simulate(); + return; + } mBeepPopUp->setItemChecked ( mPlayBeeps,false ); mPlayBeeps = num; mBeepPopUp->setItemChecked ( mPlayBeeps, true ); } void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& ) { //qDebug("SimpleAlarmDaemonImpl::ALARM RECEIVED! %s", msg.data()); QString mess = msg; mAlarmMessage = mess.mid( 9 ); QString filename = getenv("QPEDIR") ; filename += "/pics/kdepim/korganizer/koalarm.wav"; |