-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 2acfacf..a0ac232 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -22,104 +22,96 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include "simplealarmdaemonimpl.h" | 24 | #include "simplealarmdaemonimpl.h" |
25 | 25 | ||
26 | #include "alarmdialog.h" | 26 | #include "alarmdialog.h" |
27 | #include <qpopupmenu.h> | 27 | #include <qpopupmenu.h> |
28 | #include <qapp.h> | 28 | #include <qapp.h> |
29 | #include <qdir.h> | 29 | #include <qdir.h> |
30 | #include <qfile.h> | 30 | #include <qfile.h> |
31 | #include <qhbox.h> | 31 | #include <qhbox.h> |
32 | #include <qtimer.h> | 32 | #include <qtimer.h> |
33 | #include <qfile.h> | 33 | #include <qfile.h> |
34 | #include <qdatetime.h> | 34 | #include <qdatetime.h> |
35 | #include <qpushbutton.h> | 35 | #include <qpushbutton.h> |
36 | #include <qlayout.h> | 36 | #include <qlayout.h> |
37 | #include <qlineedit.h> | 37 | #include <qlineedit.h> |
38 | #include <qdialog.h> | 38 | #include <qdialog.h> |
39 | #define protected public | 39 | #define protected public |
40 | #include <qspinbox.h> | 40 | #include <qspinbox.h> |
41 | #undef protected | 41 | #undef protected |
42 | #include <qtextstream.h> | 42 | #include <qtextstream.h> |
43 | #include <qtopia/qcopenvelope_qws.h> | 43 | #include <qtopia/qcopenvelope_qws.h> |
44 | #include <qtopia/alarmserver.h> | 44 | #include <qtopia/alarmserver.h> |
45 | 45 | ||
46 | #include <stdlib.h> | 46 | #include <stdlib.h> |
47 | #include <stdio.h> | 47 | #include <stdio.h> |
48 | #include <unistd.h> | 48 | #include <unistd.h> |
49 | 49 | ||
50 | 50 | ||
51 | SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) | 51 | SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) |
52 | : QLabel( parent ) | 52 | : QLabel( parent ) |
53 | { | 53 | { |
54 | mAlarmDialog = new AlarmDialog( 0 ); | 54 | mAlarmDialog = new AlarmDialog( 0 ); |
55 | mPopUp = new QPopupMenu( this ); | 55 | mPopUp = new QPopupMenu( this ); |
56 | mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); | 56 | mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); |
57 | mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); | 57 | mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); |
58 | mPopUp->insertSeparator(); | 58 | mPopUp->insertSeparator(); |
59 | mPopUp->insertItem( "Todo List", this, SLOT ( showTodo() ) ); | 59 | mPopUp->insertItem( "Todo List", this, SLOT ( showTodo() ) ); |
60 | mPopUp->insertSeparator(); | 60 | mPopUp->insertSeparator(); |
61 | mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); | 61 | mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); |
62 | mPopUp->insertSeparator(); | 62 | mPopUp->insertSeparator(); |
63 | mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); | 63 | mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); |
64 | mPopUp->insertItem( "New Event", this, SLOT ( newEvent() ) ); | 64 | mPopUp->insertItem( "New Event", this, SLOT ( newEvent() ) ); |
65 | mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); | 65 | mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); |
66 | mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); | 66 | mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); |
67 | mPopUp->insertSeparator(); | 67 | mPopUp->insertSeparator(); |
68 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); | 68 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); |
69 | mTimerPopUp = new QPopupMenu( this ); | 69 | mTimerPopUp = new QPopupMenu( this ); |
70 | QFont fon = mTimerPopUp->font(); | ||
71 | int points = 16; | ||
72 | if ( QApplication::desktop()->width() < 480 ) | ||
73 | points = 12; | ||
74 | fon.setPointSize( points ); | ||
75 | //qDebug("point s %d ", fon.pointSize()); | ||
76 | mTimerPopUp->setFont( fon ); | ||
77 | mPopUp->setFont( fon ); | ||
78 | mBeepPopUp = new QPopupMenu( this ); | 70 | mBeepPopUp = new QPopupMenu( this ); |
79 | mSoundPopUp = new QPopupMenu( this ); | 71 | mSoundPopUp = new QPopupMenu( this ); |
80 | mPausePopUp = new QPopupMenu( this ); | 72 | mPausePopUp = new QPopupMenu( this ); |
81 | QPopupMenu* savePopUp = new QPopupMenu( this ); | 73 | QPopupMenu* savePopUp = new QPopupMenu( this ); |
82 | savePopUp->insertItem( "Save", 0 ); | 74 | savePopUp->insertItem( "Save", 0 ); |
83 | savePopUp->insertItem( "Load", 1 ); | 75 | savePopUp->insertItem( "Load", 1 ); |
84 | mSoundPopUp->insertItem( "Buzzer", 0 ); | 76 | mSoundPopUp->insertItem( "Buzzer", 0 ); |
85 | mSoundPopUp->insertItem( "Wav file", 1 ); | 77 | mSoundPopUp->insertItem( "Wav file", 1 ); |
86 | mPausePopUp->insertItem( " 1 sec", 1 ); | 78 | mPausePopUp->insertItem( " 1 sec", 1 ); |
87 | mPausePopUp->insertItem( " 2 sec", 2 ); | 79 | mPausePopUp->insertItem( " 2 sec", 2 ); |
88 | mPausePopUp->insertItem( " 3 sec", 3 ); | 80 | mPausePopUp->insertItem( " 3 sec", 3 ); |
89 | mPausePopUp->insertItem( " 5 sec", 5 ); | 81 | mPausePopUp->insertItem( " 5 sec", 5 ); |
90 | mPausePopUp->insertItem( "10 sec", 10 ); | 82 | mPausePopUp->insertItem( "10 sec", 10 ); |
91 | mPausePopUp->insertItem( "30 sec", 30 ); | 83 | mPausePopUp->insertItem( "30 sec", 30 ); |
92 | mPausePopUp->insertItem( " 1 min", 60 ); | 84 | mPausePopUp->insertItem( " 1 min", 60 ); |
93 | mPausePopUp->insertItem( " 5 min", 300 ); | 85 | mPausePopUp->insertItem( " 5 min", 300 ); |
94 | mPausePopUp->insertItem( "10 min", 600 ); | 86 | mPausePopUp->insertItem( "10 min", 600 ); |
95 | mSuspendPopUp = new QPopupMenu( this ); | 87 | mSuspendPopUp = new QPopupMenu( this ); |
96 | mSuspendPopUp->insertItem( "Off", 0 ); | 88 | mSuspendPopUp->insertItem( "Off", 0 ); |
97 | mSuspendPopUp->insertItem( " 1x", 1 ); | 89 | mSuspendPopUp->insertItem( " 1x", 1 ); |
98 | mSuspendPopUp->insertItem( " 2x", 2 ); | 90 | mSuspendPopUp->insertItem( " 2x", 2 ); |
99 | mSuspendPopUp->insertItem( " 3x", 3 ); | 91 | mSuspendPopUp->insertItem( " 3x", 3 ); |
100 | mSuspendPopUp->insertItem( " 5x", 5 ); | 92 | mSuspendPopUp->insertItem( " 5x", 5 ); |
101 | mSuspendPopUp->insertItem( "10x", 10 ); | 93 | mSuspendPopUp->insertItem( "10x", 10 ); |
102 | mSuspendPopUp->insertItem( "20x", 20 ); | 94 | mSuspendPopUp->insertItem( "20x", 20 ); |
103 | mSuspendPopUp->insertItem( "30x", 30 ); | 95 | mSuspendPopUp->insertItem( "30x", 30 ); |
104 | mBeepPopUp->insertItem( "Auto suspend",mSuspendPopUp ); | 96 | mBeepPopUp->insertItem( "Auto suspend",mSuspendPopUp ); |
105 | mBeepPopUp->insertItem( "Beep interval",mPausePopUp ); | 97 | mBeepPopUp->insertItem( "Beep interval",mPausePopUp ); |
106 | mBeepPopUp->insertItem( "Replay",mSoundPopUp ); | 98 | mBeepPopUp->insertItem( "Replay",mSoundPopUp ); |
107 | mBeepPopUp->insertItem( "Config",savePopUp ); | 99 | mBeepPopUp->insertItem( "Config",savePopUp ); |
108 | mBeepPopUp->insertItem( "300", 300 ); | 100 | mBeepPopUp->insertItem( "300", 300 ); |
109 | mBeepPopUp->insertItem( "180", 180 ); | 101 | mBeepPopUp->insertItem( "180", 180 ); |
110 | mBeepPopUp->insertItem( "60", 60 ); | 102 | mBeepPopUp->insertItem( "60", 60 ); |
111 | mBeepPopUp->insertItem( "30", 30 ); | 103 | mBeepPopUp->insertItem( "30", 30 ); |
112 | mBeepPopUp->insertItem( "10", 10 ); | 104 | mBeepPopUp->insertItem( "10", 10 ); |
113 | mBeepPopUp->insertItem( "3", 3 ); | 105 | mBeepPopUp->insertItem( "3", 3 ); |
114 | mBeepPopUp->insertItem( "1", 1 ); | 106 | mBeepPopUp->insertItem( "1", 1 ); |
115 | mBeepPopUp->insertItem( "Off", 0 ); | 107 | mBeepPopUp->insertItem( "Off", 0 ); |
116 | mBeepPopUp->insertSeparator(); | 108 | mBeepPopUp->insertSeparator(); |
117 | mBeepPopUp->insertItem( "Simulate", 1000 ); | 109 | mBeepPopUp->insertItem( "Simulate", 1000 ); |
118 | mBeepPopUp->setCheckable( true ); | 110 | mBeepPopUp->setCheckable( true ); |
119 | mPopUp->insertSeparator(); | 111 | mPopUp->insertSeparator(); |
120 | mPopUp->insertItem( "Play beeps", mBeepPopUp ); | 112 | mPopUp->insertItem( "Play beeps", mBeepPopUp ); |
121 | mPopUp->insertSeparator(); | 113 | mPopUp->insertSeparator(); |
122 | mPopUp->insertItem( "Timer", mTimerPopUp ); | 114 | mPopUp->insertItem( "Timer", mTimerPopUp ); |
123 | //mPopUp->insertSeparator(); | 115 | //mPopUp->insertSeparator(); |
124 | //mPopUp->insertItem( "Simulate", this, SLOT ( simulate() ) ); | 116 | //mPopUp->insertItem( "Simulate", this, SLOT ( simulate() ) ); |
125 | 117 | ||