author | zautrix <zautrix> | 2005-10-29 00:21:37 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-29 00:21:37 (UTC) |
commit | acd1c021e6ddef4285b3220d7515a3917416b92f (patch) (side-by-side diff) | |
tree | 3409f47cc4a9a0b6ffb53313e9a3b4a1d82f70ce | |
parent | 7a90e619147e06e5f4d4facef98364f78a4a04ef (diff) | |
download | kdepimpi-acd1c021e6ddef4285b3220d7515a3917416b92f.zip kdepimpi-acd1c021e6ddef4285b3220d7515a3917416b92f.tar.gz kdepimpi-acd1c021e6ddef4285b3220d7515a3917416b92f.tar.bz2 |
fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 21 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 52 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.h | 4 |
3 files changed, 63 insertions, 14 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 681e433..73f42f1 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -1,18 +1,39 @@ Info about the changes in new versions of KDE-Pim/Pi ********** VERSION 2.2.6 ************ KO/Pi: Made navigation in datepicker more userfriendly when using keyboard for scrolling. +KO/Pi Alarm applet: +Made font size for the two popup menus with larger font configurable: +Change size with menu: +Play Beeps->Font Size +Save settings such that it will be restored after next reboot with menu: +Play Beeps->Config->Save. +KA/Pi: +Big change! Needed for the upcoming Outlook sync: +Telephone number types are now fixed in KA/Pi +(but still compatible with the vCard standard, of cource) +and they are compatible with the types used by the evil empire. +That makes syncing with OL possible and make it possible to sync better with mobile devices. +NOTE: +All your telephone types will be converted automatically at loading/importing! +Such that it may bea good idea to make a backup of the data before starting KA/Pi. +But the editing of phone numbers and types has changed completely such that it is now much faster to edit/change types and numbers. +HINT: +To see whether there was some number for some contact not converted senseful, choose +Menu: View->Modify view +and add "Other Phone" ( in German "Sonst. Telefon") to the view. +If a type was not converted senseful to some of the 18 new, fixed types, it will get the "Other" type. ********** VERSION 2.2.5 ************ Bugfixes in KO/Pi, KA/Pi and OM/Pi. Added possibility to disable auto saving in KO/Pi. How to disable it? Good question! Next question, please? Added info about count of events/todos/journals to calendar info. ********** VERSION 2.2.4 ************ KO/Pi alarm applet: Made font smaller and added a dealy before starting KO/Pi to avoid problems accessing data storage when an alarm did wake up the Z. diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 82873e1..2742610 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp @@ -58,32 +58,35 @@ 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 ); + mPausePopUp = new QPopupMenu( this ); + mFontsizePopup = new QPopupMenu( this ); + mFontsizePopup->insertItem( "10", 10 ); + mFontsizePopup->insertItem( "12", 12 ); + mFontsizePopup->insertItem( "14", 14 ); + mFontsizePopup->insertItem( "16", 16 ); + mFontsizePopup->insertItem( "18", 18 ); + mFontsizePopup->insertItem( "24", 24 ); 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 ); mPausePopUp->insertItem( "10 sec", 10 ); mPausePopUp->insertItem( "30 sec", 30 ); mPausePopUp->insertItem( " 1 min", 60 ); @@ -92,24 +95,25 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) mSuspendPopUp = new QPopupMenu( this ); mSuspendPopUp->insertItem( "Off", 0 ); mSuspendPopUp->insertItem( " 1x", 1 ); mSuspendPopUp->insertItem( " 2x", 2 ); mSuspendPopUp->insertItem( " 3x", 3 ); mSuspendPopUp->insertItem( " 5x", 5 ); mSuspendPopUp->insertItem( "10x", 10 ); mSuspendPopUp->insertItem( "20x", 20 ); mSuspendPopUp->insertItem( "30x", 30 ); mBeepPopUp->insertItem( "Auto suspend",mSuspendPopUp ); mBeepPopUp->insertItem( "Beep interval",mPausePopUp ); mBeepPopUp->insertItem( "Replay",mSoundPopUp ); + mBeepPopUp->insertItem( "Font Size",mFontsizePopup ); 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 ); @@ -120,84 +124,91 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) //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 ) ) ); + connect ( savePopUp, SIGNAL( activated ( int ) ), this, SLOT (saveSlot( int ) ) ); + connect ( mFontsizePopup, SIGNAL( activated ( int ) ), this, SLOT (confFontSize( int ) ) ); mTimerTime = 0; mCustomText = "Custom Text"; mCustomMinutes = 7; mTimerPopupConf = 1; fillTimerPopUp(); mPausePlay = 0; confPause( 1 ); mSuspend = 0; confSuspend( 0 ); if ( QApplication::desktop()->width() < 480 ) { wavAlarm = false; mSoundPopUp->setItemChecked ( 0, true ); } else { wavAlarm = true; mSoundPopUp->setItemChecked ( 1, true ); } - saveSlot( 1 ); mTimerStartLabel = new QLabel( 0, 0, WType_Popup ); //mTimerStartLabel->setCaption( "Timer started!"); mTimerStartLabel->setAlignment ( Qt::AlignCenter ) ; - fon = mTimerPopUp->font(); - fon.setBold( true ); - points = (fon.pointSize()*2); - fon.setPointSize( points ); - mTimerStartLabel->setFont( fon ); + saveSlot( 1 ); + + + } SimpleAlarmDaemonImpl::~SimpleAlarmDaemonImpl() { //delete mPopUp; delete mAlarmDialog; delete mTimerStartLabel; } void SimpleAlarmDaemonImpl::saveSlot( int load ) { QString fileName = QDir::homeDirPath() +"/.kopialarmrc"; //qDebug("save %d ", load ); QFile file( fileName ); if ( load ) { + mPopupFontSize = mTimerPopUp->font().pointSize(); + confFontSize( mPopupFontSize ); if( !QFile::exists( fileName) ) return; if (!file.open( IO_ReadOnly ) ) { return ; } QString line; bool ok; int val; int len; while ( file.readLine( line, 1024 ) > 0 ) { //qDebug("read %s ", line.latin1()); len = line.length(); if ( line.left(4 ) == "PPAU" ) { val = line.mid( 4,len-5).toInt( &ok ); if ( ok ) { confPause( val ); } } + if ( line.left(4 ) == "POFO" ) { + val = line.mid( 4,len-5).toInt( &ok ); + if ( ok ) { + confFontSize( val ); + } + } if ( line.left(4 ) == "SUCO" ) { val = line.mid( 4,len-5).toInt( &ok ); if ( ok ) confSuspend ( val ); } if ( line.left(4 ) == "WAAL" ) { val = line.mid( 4,len-5).toInt( &ok ); if ( ok ) confSound( val ); } if ( line.left(4 ) == "PLBE" ) { @@ -223,24 +234,25 @@ void SimpleAlarmDaemonImpl::saveSlot( int load ) mAlarmDialog->setSuspendTime( val );; } } file.close(); } else { if (!file.open( IO_WriteOnly ) ) { return; } QString configString ; configString += "PPAU " + QString::number( mPausePlay ) + "\n"; configString += "SUCO " + QString::number( mSuspend ) + "\n"; + configString += "POFO " + QString::number( mPopupFontSize ) + "\n"; configString += "WAAL " + QString::number( wavAlarm ) + "\n"; configString += "PLBE " + QString::number( mPlayBeeps ) + "\n"; configString += "CUTE " + mCustomText + "\n"; configString += "CUMI " + QString::number( mCustomMinutes ) + "\n"; configString += "SUTI " + QString::number( mAlarmDialog->getSuspendTime( )) + "\n"; QTextStream ts( &file ); ts << configString ; file.close(); } } void SimpleAlarmDaemonImpl::confSuspend( int num ) @@ -622,24 +634,38 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); mTimerStartLabel->setText( disp + "\n\nTimer started!" ); int w = mTimerStartLabel->sizeHint().width()+20; int h = mTimerStartLabel->sizeHint().height()+40 ; int dw = QApplication::desktop()->width(); int dh = QApplication::desktop()->height(); mTimerStartLabel->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); mTimerStartLabel->show(); QTimer::singleShot( 5000, mTimerStartLabel, SLOT ( hide() ) ); mTimerTime = 1; } +void SimpleAlarmDaemonImpl::confFontSize( int size ) +{ + + mFontsizePopup->setItemChecked( mPopupFontSize, false ); + mPopupFontSize = size; + mFontsizePopup->setItemChecked( mPopupFontSize, true ); + QFont fon = mTimerPopUp->font(); + fon.setPointSize( mPopupFontSize ); + mTimerPopUp->setFont( fon ); + mPopUp->setFont( fon ); + fon.setBold( true ); + fon.setPointSize( mPopupFontSize * 2 ); + mTimerStartLabel->setFont( fon ); +} void SimpleAlarmDaemonImpl::writeFile() { QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); //QCopEnvelope e("QPE/Application/kopi", "-writeFile"); } void SimpleAlarmDaemonImpl::showWN() { QCopEnvelope e("QPE/Application/kopi", "-showWN"); } void SimpleAlarmDaemonImpl::newTodo() { QCopEnvelope e("QPE/Application/kopi", "-newTodo"); diff --git a/kalarmd/simplealarmdaemonimpl.h b/kalarmd/simplealarmdaemonimpl.h index 9b7de94..06ef91b 100644 --- a/kalarmd/simplealarmdaemonimpl.h +++ b/kalarmd/simplealarmdaemonimpl.h @@ -48,50 +48,52 @@ class SimpleAlarmDaemonImpl : public QLabel void simulate(); void showKO(); void showWN(); void showAdd(); void newMail(); void ringSync(); void showTodo(); void writeFile(); void writeJournal(); void slotPlayBeep( int ); void showTimer( ); void confPause( int ); + void confFontSize( int ); void confTimer( int ); void saveSlot( int ); void confSuspend( int ); void confSound( int num ); void startAlarm(QString mess, QString fn ); protected: void mousePressEvent( QMouseEvent * ); private: AlarmDialog *mAlarmDialog; QLabel * mTimerStartLabel; int mPlayBeeps; int mPausePlay; int mSuspend; QString mAlarmMessage; int mTimerTime; int getFileNameLen( QString ); - QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp; + QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp, *mFontsizePopup; QDateTime mRunningTimer; void fillTimerPopUp(); QString timerMesssage; QString mCustomText; QString mRunningTimerText; int mCustomMinutes; int mTimerPopupConf; + int mPopupFontSize; bool wavAlarm; }; class KODateLabel : public QLabel { Q_OBJECT public: KODateLabel( QWidget *parent=0, const char *name=0 ) : QLabel( parent, name ) { hour = 0; minutes = 0; QTimer * ti = new QTimer( this ); |