summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-10-30 03:18:28 (UTC)
committer zautrix <zautrix>2005-10-30 03:18:28 (UTC)
commit760f042066478106b87a63d6aba1ac1473a58dae (patch) (unidiff)
treeefa26bd696cd152e36552317e2d26a615db0866a
parent54d04eb1b2cb8ec4a3b2cf3dfdfbade45dc7ae7a (diff)
downloadkdepimpi-760f042066478106b87a63d6aba1ac1473a58dae.zip
kdepimpi-760f042066478106b87a63d6aba1ac1473a58dae.tar.gz
kdepimpi-760f042066478106b87a63d6aba1ac1473a58dae.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/phonenumber.cpp2
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp
index 897c56d..12b9b09 100644
--- a/kabc/phonenumber.cpp
+++ b/kabc/phonenumber.cpp
@@ -191,97 +191,97 @@ int PhoneNumber::type() const
191{ 191{
192 return mType; 192 return mType;
193} 193}
194 194
195QString PhoneNumber::typeLabel() const 195QString PhoneNumber::typeLabel() const
196{ 196{
197 QString label; 197 QString label;
198 bool first = true; 198 bool first = true;
199 199
200 TypeList list = typeList(); 200 TypeList list = typeList();
201 201
202 TypeList::Iterator it; 202 TypeList::Iterator it;
203 for ( it = list.begin(); it != list.end(); ++it ) { 203 for ( it = list.begin(); it != list.end(); ++it ) {
204 if ( ( type() & (*it) ) && ( (*it) != Pref ) ) { 204 if ( ( type() & (*it) ) && ( (*it) != Pref ) ) {
205 label.append( ( first ? "" : "/" ) + typeLabel( *it ) ); 205 label.append( ( first ? "" : "/" ) + typeLabel( *it ) );
206 if ( first ) 206 if ( first )
207 first = false; 207 first = false;
208 } 208 }
209 } 209 }
210 210
211 return label; 211 return label;
212} 212}
213 213
214QString PhoneNumber::label() const 214QString PhoneNumber::label() const
215{ 215{
216 return typeLabel( type() ); 216 return typeLabel( type() );
217} 217}
218 218
219PhoneNumber::TypeList PhoneNumber::typeList() 219PhoneNumber::TypeList PhoneNumber::typeList()
220{ 220{
221 TypeList list; 221 TypeList list;
222 222
223 list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video 223 list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video
224 << Bbs << Modem << Car << Isdn << Pcs << Pager; 224 << Bbs << Modem << Car << Isdn << Pcs << Pager;
225 225
226 return list; 226 return list;
227} 227}
228PhoneNumber::TypeList PhoneNumber::supportedTypeList() 228PhoneNumber::TypeList PhoneNumber::supportedTypeList()
229{ 229{
230 static TypeList list; 230 static TypeList list;
231 if ( list.count() == 0 ) 231 if ( list.count() == 0 )
232 list << (Home| Pref) << (Work| Pref) << Cell <<(Pcs|Pref)<< (Pcs|Voice)<< Home << Work << Car << Pcs <<(Work| Msg | Voice) << (Work| Msg) << (Home | Fax) << (Work| Fax) << Fax<< Pager << Isdn << Msg << Pref << Voice; 232 list << (Home| Pref) << (Work| Pref) << Cell <<(Pcs|Pref)<< (Pcs|Voice)<< Home << Work << Car << Pcs <<(Work| Msg | Voice) << (Work| Msg) << (Home | Fax) << (Work| Fax) << Fax<< Pager << Isdn << Msg << Pref << Voice;
233 return list; 233 return list;
234} 234}
235QStringList PhoneNumber::supportedTypeListNames() 235QStringList PhoneNumber::supportedTypeListNames()
236{ 236{
237 static QStringList list; 237 static QStringList list;
238 if ( list.count() == 0 ) 238 if ( list.count() == 0 )
239 list << i18n("Home") << i18n("Work") << i18n("Mobile") << i18n("SIP") << i18n("VoIP") <<i18n("Home2")<< i18n("Work2") << i18n("Mobile2") << i18n("SIP2") << i18n("Assistent") << i18n("Company") << i18n("Fax (Home)") << i18n("Fax (Work)") << i18n("Fax (Other)") << i18n("Pager") << i18n("ISDN") << i18n("Callback") << i18n("Primary")<< i18n("Other"); 239 list << i18n("Home") << i18n("Work") << i18n("Mobile") << i18n("SiP") << i18n("VoIP") <<i18n("Home2")<< i18n("Work2") << i18n("Mobile2") << i18n("SiP2") << i18n("Assistent") << i18n("Company") << i18n("Fax (Home)") << i18n("Fax (Work)") << i18n("Fax (Other)") << i18n("Pager") << i18n("ISDN") << i18n("Callback") << i18n("Primary")<< i18n("Other");
240 return list; 240 return list;
241} 241}
242 242
243int PhoneNumber::typeListIndex4Type(int type ) 243int PhoneNumber::typeListIndex4Type(int type )
244{ 244{
245 TypeList list = supportedTypeList(); 245 TypeList list = supportedTypeList();
246 int i = 0; 246 int i = 0;
247 while ( i < list.count() ) { 247 while ( i < list.count() ) {
248 if ( list [i] == type ) 248 if ( list [i] == type )
249 return i; 249 return i;
250 ++i; 250 ++i;
251 } 251 }
252 return list.count()-1; 252 return list.count()-1;
253} 253}
254 254
255QString PhoneNumber::label( int type ) 255QString PhoneNumber::label( int type )
256{ 256{
257 return typeLabel( type ); 257 return typeLabel( type );
258} 258}
259 259
260QString PhoneNumber::typeLabel( int type ) 260QString PhoneNumber::typeLabel( int type )
261{ 261{
262 if ((type & Cell) == Cell) 262 if ((type & Cell) == Cell)
263 return i18n("Mobile"); 263 return i18n("Mobile");
264 if ((type & Home) == Home) { 264 if ((type & Home) == Home) {
265 if ((type & Pref) == Pref) 265 if ((type & Pref) == Pref)
266 return i18n("Home"); 266 return i18n("Home");
267 if ((type & Fax) == Fax) 267 if ((type & Fax) == Fax)
268 return i18n("Fax (Home)"); 268 return i18n("Fax (Home)");
269 return i18n("Home2"); 269 return i18n("Home2");
270 } 270 }
271 271
272 if ((type & Work) == Work) { 272 if ((type & Work) == Work) {
273 if ((type & Pref) == Pref) 273 if ((type & Pref) == Pref)
274 return i18n("Work"); 274 return i18n("Work");
275 if ((type & Fax) == Fax) 275 if ((type & Fax) == Fax)
276 return i18n("Fax (Work)"); 276 return i18n("Fax (Work)");
277 if ((type & Msg) == Msg) { 277 if ((type & Msg) == Msg) {
278 if ((type & Voice) == Voice) 278 if ((type & Voice) == Voice)
279 return i18n("Assistent"); 279 return i18n("Assistent");
280 return i18n("Company"); 280 return i18n("Company");
281 } 281 }
282 return i18n("Work2"); 282 return i18n("Work2");
283 } 283 }
284 if ((type & Pcs) == Pcs) { 284 if ((type & Pcs) == Pcs) {
285 if ((type & Pref) == Pref) 285 if ((type & Pref) == Pref)
286 return i18n("SiP"); 286 return i18n("SiP");
287 if ((type & Voice) == Voice) 287 if ((type & Voice) == Voice)
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp
index fe9ff5a..141a9ce 100644
--- a/kalarmd/simplealarmdaemonimpl.cpp
+++ b/kalarmd/simplealarmdaemonimpl.cpp
@@ -50,117 +50,117 @@
50 50
51SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) 51SimpleAlarmDaemonImpl::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 70
71 mBeepPopUp = new QPopupMenu( this ); 71 mBeepPopUp = new QPopupMenu( this );
72 mSoundPopUp = new QPopupMenu( this ); 72 mSoundPopUp = new QPopupMenu( this );
73 mPausePopUp = new QPopupMenu( this ); 73 mPausePopUp = new QPopupMenu( this );
74 mFontsizePopup = new QPopupMenu( this ); 74 mFontsizePopup = new QPopupMenu( this );
75 mFontsizePopup->insertItem( "10", 10 ); 75 mFontsizePopup->insertItem( "10", 10 );
76 mFontsizePopup->insertItem( "12", 12 ); 76 mFontsizePopup->insertItem( "12", 12 );
77 mFontsizePopup->insertItem( "14", 14 ); 77 mFontsizePopup->insertItem( "14", 14 );
78 mFontsizePopup->insertItem( "16", 16 ); 78 mFontsizePopup->insertItem( "16", 16 );
79 mFontsizePopup->insertItem( "18", 18 ); 79 mFontsizePopup->insertItem( "18", 18 );
80 mFontsizePopup->insertItem( "20", 20 ); 80 mFontsizePopup->insertItem( "20", 20 );
81 mFontsizePopup->insertItem( "22", 22 ); 81 mFontsizePopup->insertItem( "22", 22 );
82 mFontsizePopup->insertItem( "24", 24 ); 82 mFontsizePopup->insertItem( "24", 24 );
83 mFontsizePopup->insertItem( "26", 26 ); 83 mFontsizePopup->insertItem( "26", 26 );
84 mFontsizePopup->insertItem( "28", 28 ); 84 mFontsizePopup->insertItem( "28", 28 );
85 mFontsizePopup->insertItem( "30", 30 ); 85 mFontsizePopup->insertItem( "30", 30 );
86 mFontsizePopup->insertItem( "32", 32 ); 86 mFontsizePopup->insertItem( "32", 32 );
87 mFontsizePopup->insertItem( "36", 36 ); 87 mFontsizePopup->insertItem( "36", 36 );
88 QPopupMenu* savePopUp = new QPopupMenu( this ); 88 QPopupMenu* savePopUp = new QPopupMenu( this );
89 savePopUp->insertItem( "Save", 0 ); 89 savePopUp->insertItem( "Save", 0 );
90 savePopUp->insertItem( "Load", 1 ); 90 savePopUp->insertItem( "Load", 1 );
91 mSoundPopUp->insertItem( "Buzzer", 0 ); 91 mSoundPopUp->insertItem( "Buzzer", 0 );
92 mSoundPopUp->insertItem( "Wav file", 1 ); 92 mSoundPopUp->insertItem( "Wav file", 1 );
93 mPausePopUp->insertItem( " 1 sec", 1 ); 93 mPausePopUp->insertItem( " 1 sec", 1 );
94 mPausePopUp->insertItem( " 2 sec", 2 ); 94 mPausePopUp->insertItem( " 2 sec", 2 );
95 mPausePopUp->insertItem( " 3 sec", 3 ); 95 mPausePopUp->insertItem( " 3 sec", 3 );
96 mPausePopUp->insertItem( " 5 sec", 5 ); 96 mPausePopUp->insertItem( " 5 sec", 5 );
97 mPausePopUp->insertItem( "10 sec", 10 ); 97 mPausePopUp->insertItem( "10 sec", 10 );
98 mPausePopUp->insertItem( "15 sec", 15 );
98 mPausePopUp->insertItem( "30 sec", 30 ); 99 mPausePopUp->insertItem( "30 sec", 30 );
99 mPausePopUp->insertItem( " 1 min", 60 ); 100 mPausePopUp->insertItem( " 1 min", 60 );
100 mPausePopUp->insertItem( " 5 min", 300 ); 101 mPausePopUp->insertItem( " 5 min", 300 );
101 mPausePopUp->insertItem( "10 min", 600 );
102 mSuspendPopUp = new QPopupMenu( this ); 102 mSuspendPopUp = new QPopupMenu( this );
103 mSuspendPopUp->insertItem( "Off", 0 ); 103 mSuspendPopUp->insertItem( "Off", 0 );
104 mSuspendPopUp->insertItem( " 1x", 1 ); 104 mSuspendPopUp->insertItem( " 1x", 1 );
105 mSuspendPopUp->insertItem( " 2x", 2 ); 105 mSuspendPopUp->insertItem( " 2x", 2 );
106 mSuspendPopUp->insertItem( " 3x", 3 ); 106 mSuspendPopUp->insertItem( " 3x", 3 );
107 mSuspendPopUp->insertItem( " 5x", 5 ); 107 mSuspendPopUp->insertItem( " 5x", 5 );
108 mSuspendPopUp->insertItem( "10x", 10 ); 108 mSuspendPopUp->insertItem( "10x", 10 );
109 mSuspendPopUp->insertItem( "20x", 20 ); 109 mSuspendPopUp->insertItem( "20x", 20 );
110 mSuspendPopUp->insertItem( "30x", 30 ); 110 mSuspendPopUp->insertItem( "30x", 30 );
111 mBeepPopUp->insertItem( "Config",savePopUp ); 111 mBeepPopUp->insertItem( "Config",savePopUp );
112 mBeepPopUp->insertItem( "Replay",mSoundPopUp ); 112 mBeepPopUp->insertItem( "Replay",mSoundPopUp );
113 mBeepPopUp->insertItem( "Font Size",mFontsizePopup ); 113 mBeepPopUp->insertItem( "Font Size",mFontsizePopup );
114 mBeepPopUp->insertItem( "Auto suspend",mSuspendPopUp ); 114 mBeepPopUp->insertItem( "Auto suspend",mSuspendPopUp );
115 mBeepPopUp->insertItem( "Beep interval",mPausePopUp ); 115 mBeepPopUp->insertItem( "Beep interval",mPausePopUp );
116 mBeepPopUp->insertItem( "180", 180 ); 116 mBeepPopUp->insertItem( "100", 100 );
117 mBeepPopUp->insertItem( "60", 60 ); 117 mBeepPopUp->insertItem( "50", 50 );
118 mBeepPopUp->insertItem( "30", 30 ); 118 mBeepPopUp->insertItem( "25", 25 );
119 mBeepPopUp->insertItem( "17", 17 ); 119 mBeepPopUp->insertItem( "17", 17 );
120 mBeepPopUp->insertItem( "10", 10 ); 120 mBeepPopUp->insertItem( "10", 10 );
121 mBeepPopUp->insertItem( "3", 3 ); 121 mBeepPopUp->insertItem( "3", 3 );
122 mBeepPopUp->insertItem( "1", 1 ); 122 mBeepPopUp->insertItem( "1", 1 );
123 mBeepPopUp->insertItem( "Off", 0 ); 123 mBeepPopUp->insertItem( "Off", 0 );
124 mBeepPopUp->insertSeparator(); 124 mBeepPopUp->insertSeparator();
125 mBeepPopUp->insertItem( "Simulate", 1000 ); 125 mBeepPopUp->insertItem( "Simulate", 1000 );
126 mBeepPopUp->setCheckable( true ); 126 mBeepPopUp->setCheckable( true );
127 mPopUp->insertSeparator(); 127 mPopUp->insertSeparator();
128 mPopUp->insertItem( "Play beeps", mBeepPopUp ); 128 mPopUp->insertItem( "Play beeps", mBeepPopUp );
129 mPopUp->insertSeparator(); 129 mPopUp->insertSeparator();
130 mPopUp->insertItem( "Timer", mTimerPopUp ); 130 mPopUp->insertItem( "Timer", mTimerPopUp );
131 //mPopUp->insertSeparator(); 131 //mPopUp->insertSeparator();
132 //mPopUp->insertItem( "Simulate", this, SLOT ( simulate() ) ); 132 //mPopUp->insertItem( "Simulate", this, SLOT ( simulate() ) );
133 133
134 mPopUp->resize( mPopUp->sizeHint() ); 134 mPopUp->resize( mPopUp->sizeHint() );
135 mPlayBeeps = 60; 135 mPlayBeeps = 60;
136 mBeepPopUp->setItemChecked ( mPlayBeeps, true ); 136 mBeepPopUp->setItemChecked ( mPlayBeeps, true );
137 connect ( mBeepPopUp, SIGNAL( activated ( int ) ), this, SLOT (slotPlayBeep( int ) ) ); 137 connect ( mBeepPopUp, SIGNAL( activated ( int ) ), this, SLOT (slotPlayBeep( int ) ) );
138 connect ( mTimerPopUp, SIGNAL( activated ( int ) ), this, SLOT (confTimer( int ) ) ); 138 connect ( mTimerPopUp, SIGNAL( activated ( int ) ), this, SLOT (confTimer( int ) ) );
139 connect ( mTimerPopUp, SIGNAL(aboutToShow() ), this, SLOT ( showTimer( ) ) ); 139 connect ( mTimerPopUp, SIGNAL(aboutToShow() ), this, SLOT ( showTimer( ) ) );
140 connect ( mSoundPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSound( int ) ) ); 140 connect ( mSoundPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSound( int ) ) );
141 connect ( mPausePopUp, SIGNAL( activated ( int ) ), this, SLOT (confPause( int ) ) ); 141 connect ( mPausePopUp, SIGNAL( activated ( int ) ), this, SLOT (confPause( int ) ) );
142 connect ( mSuspendPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSuspend( int ) ) ); 142 connect ( mSuspendPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSuspend( int ) ) );
143 connect ( savePopUp, SIGNAL( activated ( int ) ), this, SLOT (saveSlot( int ) ) ); 143 connect ( savePopUp, SIGNAL( activated ( int ) ), this, SLOT (saveSlot( int ) ) );
144 connect ( mFontsizePopup, SIGNAL( activated ( int ) ), this, SLOT (confFontSize( int ) ) ); 144 connect ( mFontsizePopup, SIGNAL( activated ( int ) ), this, SLOT (confFontSize( int ) ) );
145 mTimerTime = 0; 145 mTimerTime = 0;
146 mCustomText = "Custom Text"; 146 mCustomText = "Custom Text";
147 mCustomMinutes = 7; 147 mCustomMinutes = 7;
148 mTimerPopupConf = 1; 148 mTimerPopupConf = 1;
149 fillTimerPopUp(); 149 fillTimerPopUp();
150 mPausePlay = 0; 150 mPausePlay = 0;
151 confPause( 1 ); 151 confPause( 1 );
152 mSuspend = 0; 152 mSuspend = 0;
153 confSuspend( 0 ); 153 confSuspend( 0 );
154 if ( QApplication::desktop()->width() < 480 ) { 154 if ( QApplication::desktop()->width() < 480 ) {
155 wavAlarm = false; 155 wavAlarm = false;
156 mSoundPopUp->setItemChecked ( 0, true ); 156 mSoundPopUp->setItemChecked ( 0, true );
157 } 157 }
158 else { 158 else {
159 wavAlarm = true; 159 wavAlarm = true;
160 mSoundPopUp->setItemChecked ( 1, true ); 160 mSoundPopUp->setItemChecked ( 1, true );
161 } 161 }
162 mTimerStartLabel = new QLabel( 0, 0, WType_Popup ); 162 mTimerStartLabel = new QLabel( 0, 0, WType_Popup );
163 //mTimerStartLabel->setCaption( "Timer started!"); 163 //mTimerStartLabel->setCaption( "Timer started!");
164 mTimerStartLabel->setAlignment ( Qt::AlignCenter ) ; 164 mTimerStartLabel->setAlignment ( Qt::AlignCenter ) ;
165 saveSlot( 1 ); 165 saveSlot( 1 );
166 166