summaryrefslogtreecommitdiffabout
path: root/kalarmd/simplealarmdaemonimpl.cpp
Side-by-side diff
Diffstat (limited to 'kalarmd/simplealarmdaemonimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp
index a0ac232..8ea8a73 100644
--- a/kalarmd/simplealarmdaemonimpl.cpp
+++ b/kalarmd/simplealarmdaemonimpl.cpp
@@ -58,24 +58,29 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent )
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();
+ int points = (fon.pointSize()*4)/3;
+ fon.setPointSize( points );
+ mTimerPopUp->setFont( fon );
+ mPopUp->setFont( fon );
mBeepPopUp = new QPopupMenu( this );
mSoundPopUp = new QPopupMenu( this );
mPausePopUp = new QPopupMenu( this );
QPopupMenu* savePopUp = new QPopupMenu( this );
savePopUp->insertItem( "Save", 0 );
savePopUp->insertItem( "Load", 1 );
mSoundPopUp->insertItem( "Buzzer", 0 );
mSoundPopUp->insertItem( "Wav file", 1 );
mPausePopUp->insertItem( " 1 sec", 1 );
mPausePopUp->insertItem( " 2 sec", 2 );
mPausePopUp->insertItem( " 3 sec", 3 );
mPausePopUp->insertItem( " 5 sec", 5 );
@@ -304,25 +309,25 @@ void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& )
if ( !QFile::exists( tempfilename ) )
error = true;
}
if ( error ) {
mAlarmMessage = "Procedure Alarm\nError - File not found\n";
mAlarmMessage += mess.mid( 10+len+3+9 );
} else {
//qDebug("-----system command %s ",tempfilename.latin1() );
if ( vfork () == 0 ) {
execl ( tempfilename.latin1(), 0 );
return;
}
- QTimer::singleShot( 10000, this, SLOT ( writeFile() ) );
+ QTimer::singleShot( 5000, this, SLOT ( writeFile() ) );
return;
}
//qDebug("+++++++system command %s ",tempfilename.latin1() );
}
if ( mess.left( 11 ) == "audio_alarm") {
bool error = false;
int len = mess.mid( 11 ).find("+++");
if ( len < 2 )
error = true;
else {
tempfilename = mess.mid( 11, len );
@@ -330,25 +335,25 @@ void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& )
error = true;
}
if ( ! error ) {
filename = tempfilename;
}
mAlarmMessage = mess.mid( 11+len+3+9 );
//qDebug("audio file command %s ",tempfilename.latin1() );
}
if ( mess.left( 9 ) == "cal_alarm") {
mAlarmMessage = mess.mid( 9 ) ;
}
- QTimer::singleShot( 10000, this, SLOT ( writeFile() ) );
+ QTimer::singleShot( 5000, this, SLOT ( writeFile() ) );
startAlarm( mAlarmMessage, filename );
}
int SimpleAlarmDaemonImpl::getFileNameLen( QString mess )
{
return 0;
}
void SimpleAlarmDaemonImpl::startAlarm( QString mess, QString filename )
{
//mAlarmDialog->show();
//mAlarmDialog->raise();
@@ -633,25 +638,25 @@ void SimpleAlarmDaemonImpl::showAdd()
}
void SimpleAlarmDaemonImpl::ringSync()
{
QCopEnvelope e("QPE/Application/kopi", "-ringSync");
}
void SimpleAlarmDaemonImpl::newCountdown()
{
//recieve("cal_alarm", 10 );
}
void SimpleAlarmDaemonImpl::simulate()
{
- QTimer::singleShot( 10000, this, SLOT ( writeFile() ) );
+ QTimer::singleShot( 5000, this, SLOT ( writeFile() ) );
QString filename = getenv("QPEDIR") ;
filename += "/pics/kdepim/korganizer/koalarm.wav";
startAlarm("Alarm simulation", filename );
}
void SimpleAlarmDaemonImpl::showKO()
{
QCopEnvelope e("QPE/Application/kopi", "-showKO");
// testing only
//QCopEnvelope e("QPE/Application/kopi", "nextView()");
}
void SimpleAlarmDaemonImpl::showTodo()