author | zautrix <zautrix> | 2004-07-03 16:13:47 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-03 16:13:47 (UTC) |
commit | 2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (patch) (side-by-side diff) | |
tree | b8474ca04d5e1bf79ca956ecaefc0c5d62280e8c /kalarmd | |
parent | a95f7085c5dd7234c254750e32e44941599f3390 (diff) | |
download | kdepimpi-2dd6ac0b2d24c91d35ce674a6c26351352df2b15.zip kdepimpi-2dd6ac0b2d24c91d35ce674a6c26351352df2b15.tar.gz kdepimpi-2dd6ac0b2d24c91d35ce674a6c26351352df2b15.tar.bz2 |
Popupmenu rearrangeg
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 16 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.h | 1 |
2 files changed, 10 insertions, 7 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 2bc6643..471836b 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp @@ -20,78 +20,77 @@ with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include "simplealarmdaemonimpl.h" #include "alarmdialog.h" #include <qpopupmenu.h> #include <qapp.h> #include <qdir.h> #include <qfile.h> #include <qhbox.h> #include <qtimer.h> #include <qfile.h> #include <qlayout.h> #include <qlineedit.h> #include <qdialog.h> #include <qspinbox.h> #include <qtextstream.h> #include <qtopia/qcopenvelope_qws.h> #include <qtopia/alarmserver.h> #include <stdlib.h> #include <stdio.h> #include <unistd.h> SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) : QLabel( parent ) { mAlarmDialog = new AlarmDialog( 0 ); mPopUp = new QPopupMenu( 0 ); - mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); - mPopUp->insertSeparator(); - mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); - mPopUp->insertSeparator(); mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); + mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); mPopUp->insertSeparator(); mPopUp->insertItem( "What's Todo?", this, SLOT ( showTodo() ) ); mPopUp->insertSeparator(); - mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); + mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); mPopUp->insertSeparator(); mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); - mPopUp->insertSeparator(); 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( mPopUp ); mBeepPopUp = new QPopupMenu( mPopUp ); mSoundPopUp = new QPopupMenu( mBeepPopUp ); mPausePopUp = new QPopupMenu( mBeepPopUp ); QPopupMenu* savePopUp = new QPopupMenu( mBeepPopUp ); 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 ); mPausePopUp->insertItem( " 5 min", 300 ); mPausePopUp->insertItem( "10 min", 600 ); mSuspendPopUp = new QPopupMenu( mBeepPopUp ); 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( "Config",savePopUp ); @@ -477,65 +476,68 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) mCustomMinutes = 1440; mess += mCustomText; minutes = mCustomMinutes; } else mess+= QString::number ( minutes ) + ( " minutes are past!"); } //minutes = 1; mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); timerMesssage = mess; AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.latin1()); mTimerTime = 1; } void SimpleAlarmDaemonImpl::writeFile() { QCopEnvelope e("QPE/Application/kopi", "-writeFile"); } void SimpleAlarmDaemonImpl::showWN() { QCopEnvelope e("QPE/Application/kopi", "-showWN"); } void SimpleAlarmDaemonImpl::newTodo() { QCopEnvelope e("QPE/Application/kopi", "-newTodo"); } void SimpleAlarmDaemonImpl::newEvent() { QCopEnvelope e("QPE/Application/kopi", "-newEvent"); } - +void SimpleAlarmDaemonImpl::newMail() +{ + QCopEnvelope e("QPE/Application/kmpi", "newMail()"); +} void SimpleAlarmDaemonImpl::showAdd() { QCopEnvelope e("QPE/Application/kapi", " "); } void SimpleAlarmDaemonImpl::ringSync() { QCopEnvelope e("QPE/Application/kopi", "-ringSync"); } void SimpleAlarmDaemonImpl::newCountdown() { //recieve("cal_alarm", 10 ); } void SimpleAlarmDaemonImpl::simulate() { writeFile(); QString filename = getenv("QPEDIR") ; filename += "/pics/kdepim/korganizer/koalarm.wav"; startAlarm("Alarm simulation", filename ); } void SimpleAlarmDaemonImpl::showKO() { QCopEnvelope e("QPE/Application/kopi", "-showKO"); } void SimpleAlarmDaemonImpl::showTodo() { QCopEnvelope e("QPE/Application/kopi", "-showTodo"); } void SimpleAlarmDaemonImpl::writeJournal() { diff --git a/kalarmd/simplealarmdaemonimpl.h b/kalarmd/simplealarmdaemonimpl.h index 1c16af8..32a3867 100644 --- a/kalarmd/simplealarmdaemonimpl.h +++ b/kalarmd/simplealarmdaemonimpl.h @@ -19,64 +19,65 @@ As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef SIMPLEALARMDAEMONIMPL_H #define SIMPLEALARMDAEMONIMPL_H //#include "simplealarmdaemon.h" #include <qdatetime.h> #include <qlabel.h> class QLabel; class QTimer; class QPopupMenu; class AlarmDialog; class SimpleAlarmDaemonImpl : public QLabel { Q_OBJECT public: SimpleAlarmDaemonImpl( QWidget *parent = 0 ); ~SimpleAlarmDaemonImpl(); protected slots: void recieve( const QCString& msg, const QByteArray& data ); void newTodo(); void newEvent(); void newCountdown(); 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 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; int mPlayBeeps; int mPausePlay; int mSuspend; QString mAlarmMessage; int mTimerTime; int getFileNameLen( QString ); QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp; QDateTime mRunningTimer; void fillTimerPopUp(); QString timerMesssage; QString mCustomText; int mCustomMinutes; int mTimerPopupConf; bool wavAlarm; |