summaryrefslogtreecommitdiffabout
path: root/kalarmd/simplealarmdaemonimpl.cpp
authorzautrix <zautrix>2005-09-18 23:40:38 (UTC)
committer zautrix <zautrix>2005-09-18 23:40:38 (UTC)
commit2d346e4052fd726e657daee4ac3f2bcc7103f5fb (patch) (side-by-side diff)
tree9952b888e0790bc032ba4e0c3c4165ec283a4139 /kalarmd/simplealarmdaemonimpl.cpp
parent06ebec95579816144ee65981835e6e3482e20a28 (diff)
downloadkdepimpi-2d346e4052fd726e657daee4ac3f2bcc7103f5fb.zip
kdepimpi-2d346e4052fd726e657daee4ac3f2bcc7103f5fb.tar.gz
kdepimpi-2d346e4052fd726e657daee4ac3f2bcc7103f5fb.tar.bz2
wn
Diffstat (limited to 'kalarmd/simplealarmdaemonimpl.cpp') (more/less context) (ignore 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()