author | kergoth <kergoth> | 2003-08-09 17:29:36 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 17:29:36 (UTC) |
commit | a0bab0e281fbaf6f6ebbb1a48e5c06426bfbbb93 (patch) (unidiff) | |
tree | 5ce78e1a5dedd31b7851d53bf9f072bd44edd1b0 /core/applets | |
parent | a7e015198a8c5ad3b6e144a9032b059086253e00 (diff) | |
download | opie-a0bab0e281fbaf6f6ebbb1a48e5c06426bfbbb93.zip opie-a0bab0e281fbaf6f6ebbb1a48e5c06426bfbbb93.tar.gz opie-a0bab0e281fbaf6f6ebbb1a48e5c06426bfbbb93.tar.bz2 |
Merge from BRANCH_1_0
-rw-r--r-- | core/applets/batteryapplet/battery.cpp | 14 | ||||
-rw-r--r-- | core/applets/batteryapplet/batterystatus.cpp | 2 | ||||
-rw-r--r-- | core/applets/cardmon/cardmon.cpp | 4 | ||||
-rw-r--r-- | core/applets/homeapplet/home.h | 4 | ||||
-rw-r--r-- | core/applets/restartapplet2/.cvsignore | 1 | ||||
-rw-r--r-- | core/applets/suspendapplet/suspend.h | 4 |
6 files changed, 11 insertions, 18 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp index 480d261..078ce8d 100644 --- a/core/applets/batteryapplet/battery.cpp +++ b/core/applets/batteryapplet/battery.cpp | |||
@@ -77,100 +77,90 @@ void BatteryMeter::mouseReleaseEvent( QMouseEvent* e) | |||
77 | batteryView->raise(); | 77 | batteryView->raise(); |
78 | batteryView->show(); | 78 | batteryView->show(); |
79 | } | 79 | } |
80 | } | 80 | } |
81 | 81 | ||
82 | void BatteryMeter::timerEvent( QTimerEvent * ) | 82 | void BatteryMeter::timerEvent( QTimerEvent * ) |
83 | { | 83 | { |
84 | PowerStatus prev = *ps; | 84 | PowerStatus prev = *ps; |
85 | 85 | ||
86 | *ps = PowerStatusManager::readStatus(); | 86 | *ps = PowerStatusManager::readStatus(); |
87 | 87 | ||
88 | if ( prev != *ps ) { | 88 | if ( prev != *ps ) { |
89 | percent = ps->batteryPercentRemaining(); | 89 | percent = ps->batteryPercentRemaining(); |
90 | if ( !charging && ps->batteryStatus() == PowerStatus::Charging && percent < 0 ) { | 90 | if ( !charging && ps->batteryStatus() == PowerStatus::Charging && percent < 0 ) { |
91 | percent = 0; | 91 | percent = 0; |
92 | charging = true; | 92 | charging = true; |
93 | chargeTimer->start( 500 ); | 93 | chargeTimer->start( 500 ); |
94 | } else if ( charging && ps->batteryStatus() != PowerStatus::Charging ) { | 94 | } else if ( charging && ps->batteryStatus() != PowerStatus::Charging ) { |
95 | charging = false; | 95 | charging = false; |
96 | chargeTimer->stop(); | 96 | chargeTimer->stop(); |
97 | if ( batteryView ) | 97 | if ( batteryView ) |
98 | batteryView->updatePercent( percent ); | 98 | batteryView->updatePercent( percent ); |
99 | } | 99 | } |
100 | repaint( style != 0 ); | 100 | repaint( style != 0 ); |
101 | if ( batteryView ) | 101 | if ( batteryView ) |
102 | batteryView->repaint(); | 102 | batteryView->repaint(); |
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | void BatteryMeter::chargeTimeout() | 106 | void BatteryMeter::chargeTimeout() |
107 | { | 107 | { |
108 | percent += 20; | 108 | percent += 20; |
109 | if ( percent > 100 ) | 109 | if ( percent > 100 ) |
110 | percent = 0; | 110 | percent = 0; |
111 | 111 | ||
112 | repaint(FALSE); | 112 | repaint(FALSE); |
113 | if ( batteryView ) | 113 | if ( batteryView ) |
114 | batteryView->updatePercent( percent ); | 114 | batteryView->updatePercent( percent ); |
115 | } | 115 | } |
116 | 116 | ||
117 | void BatteryMeter::paintEvent( QPaintEvent* ) | 117 | void BatteryMeter::paintEvent( QPaintEvent* ) |
118 | { | 118 | { |
119 | if ( style == 1 ) | 119 | if ( style == 1 ) |
120 | { | 120 | { |
121 | QPainter p(this); | 121 | QPainter p(this); |
122 | QFont f( "Fixed", AppLnk::smallIconSize()/2 ); | 122 | QFont f( "Fixed", AppLnk::smallIconSize()/2 ); |
123 | QFontMetrics fm( f ); | 123 | QFontMetrics fm( f ); |
124 | p.setFont( f ); | 124 | p.setFont( f ); |
125 | if ( percent > 98 ) { | 125 | p.drawText( 0, AppLnk::smallIconSize()/2, QString::number( percent ) ); |
126 | p.drawText( 0, 0, width(), height(), Qt::AlignCenter, tr( "F" ) ); | 126 | p.drawText( AppLnk::smallIconSize()/4, AppLnk::smallIconSize(), "%" ); |
127 | } | ||
128 | else if ( percent < 5 ) | ||
129 | { | ||
130 | p.drawText( 0, 0, width(), height(), Qt::AlignCenter, tr( "E" ) ); | ||
131 | } | ||
132 | else | ||
133 | { | ||
134 | p.drawText( 0, AppLnk::smallIconSize()/2, QString::number( percent ) ); | ||
135 | p.drawText( AppLnk::smallIconSize()/4, AppLnk::smallIconSize(), "%" ); | ||
136 | } | ||
137 | return; | 127 | return; |
138 | } | 128 | } |
139 | 129 | ||
140 | QPainter p(this); | 130 | QPainter p(this); |
141 | QColor color; | 131 | QColor color; |
142 | QColor g = gray.light( 160 ); | 132 | QColor g = gray.light( 160 ); |
143 | switch ( ps->acStatus() ) | 133 | switch ( ps->acStatus() ) |
144 | { | 134 | { |
145 | case PowerStatus::Offline: color = blue.light( 150 ); break; | 135 | case PowerStatus::Offline: color = blue.light( 150 ); break; |
146 | case PowerStatus::Online: color = green.dark( 130 ).light( 180 ); break; | 136 | case PowerStatus::Online: color = green.dark( 130 ).light( 180 ); break; |
147 | default: color = red.light( 160 ); | 137 | default: color = red.light( 160 ); |
148 | } | 138 | } |
149 | 139 | ||
150 | int w = height() / 2; | 140 | int w = height() / 2; |
151 | if ( !(w%2) ) w--; // should have an odd value to get a real middle line | 141 | if ( !(w%2) ) w--; // should have an odd value to get a real middle line |
152 | int h = height() - 4; | 142 | int h = height() - 4; |
153 | int pix = (percent * h) / 100; | 143 | int pix = (percent * h) / 100; |
154 | int y2 = height() -2; | 144 | int y2 = height() -2; |
155 | int y = y2 - pix; | 145 | int y = y2 - pix; |
156 | int x1 = (width() - w ) / 2; | 146 | int x1 = (width() - w ) / 2; |
157 | 147 | ||
158 | p.setPen(QColor(80,80,80)); | 148 | p.setPen(QColor(80,80,80)); |
159 | p.drawLine(x1+w/4,0,x1+w/4+w/2+1,0); // header | 149 | p.drawLine(x1+w/4,0,x1+w/4+w/2+1,0); // header |
160 | p.drawRect(x1,1,w,height()-1); // corpus | 150 | p.drawRect(x1,1,w,height()-1); // corpus |
161 | p.setBrush(color); | 151 | p.setBrush(color); |
162 | 152 | ||
163 | int extra = ((percent * h) % 100)/(100/4); | 153 | int extra = ((percent * h) % 100)/(100/4); |
164 | 154 | ||
165 | int middle = w/2; | 155 | int middle = w/2; |
166 | for ( int i = 0; i < middle; i++ ) | 156 | for ( int i = 0; i < middle; i++ ) |
167 | { | 157 | { |
168 | p.setPen( gray.dark( 100+i*20 ) ); | 158 | p.setPen( gray.dark( 100+i*20 ) ); |
169 | p.drawLine( x1+middle-i, 2, x1+middle-i, y-1 ); | 159 | p.drawLine( x1+middle-i, 2, x1+middle-i, y-1 ); |
170 | p.drawLine( x1+middle+i, 2, x1+middle+i, y-1 ); | 160 | p.drawLine( x1+middle+i, 2, x1+middle+i, y-1 ); |
171 | p.setPen( color.dark( 100+i*20 ) ); | 161 | p.setPen( color.dark( 100+i*20 ) ); |
172 | p.drawLine( x1+middle-i, y, x1+middle-i, y2 ); | 162 | p.drawLine( x1+middle-i, y, x1+middle-i, y2 ); |
173 | p.drawLine( x1+middle+i, y, x1+middle+i, y2 ); | 163 | p.drawLine( x1+middle+i, y, x1+middle+i, y2 ); |
174 | } | 164 | } |
175 | } | 165 | } |
176 | 166 | ||
diff --git a/core/applets/batteryapplet/batterystatus.cpp b/core/applets/batteryapplet/batterystatus.cpp index 092a48d..5936b5d 100644 --- a/core/applets/batteryapplet/batterystatus.cpp +++ b/core/applets/batteryapplet/batterystatus.cpp | |||
@@ -195,61 +195,61 @@ void BatteryStatus::paintEvent( QPaintEvent * ) { | |||
195 | } | 195 | } |
196 | 196 | ||
197 | QColor c; | 197 | QColor c; |
198 | QColor darkc; | 198 | QColor darkc; |
199 | QColor lightc; | 199 | QColor lightc; |
200 | if ( ps->acStatus() == PowerStatus::Offline ) { | 200 | if ( ps->acStatus() == PowerStatus::Offline ) { |
201 | c = blue.light(120); | 201 | c = blue.light(120); |
202 | darkc = c.dark(280); | 202 | darkc = c.dark(280); |
203 | lightc = c.light(145); | 203 | lightc = c.light(145); |
204 | } else if ( ps->acStatus() == PowerStatus::Online ) { | 204 | } else if ( ps->acStatus() == PowerStatus::Online ) { |
205 | c = green.dark(130); | 205 | c = green.dark(130); |
206 | darkc = c.dark(200); | 206 | darkc = c.dark(200); |
207 | lightc = c.light(220); | 207 | lightc = c.light(220); |
208 | } else { | 208 | } else { |
209 | c = red; | 209 | c = red; |
210 | darkc = c.dark(280); | 210 | darkc = c.dark(280); |
211 | lightc = c.light(140); | 211 | lightc = c.light(140); |
212 | } | 212 | } |
213 | if ( percent < 0 ) | 213 | if ( percent < 0 ) |
214 | return; | 214 | return; |
215 | 215 | ||
216 | int rightEnd1 = screenWidth - 47; | 216 | int rightEnd1 = screenWidth - 47; |
217 | int rightEnd2 = screenWidth - 35; | 217 | int rightEnd2 = screenWidth - 35; |
218 | int percent2 = ( percent / 100.0 ) * rightEnd1 ; | 218 | int percent2 = ( percent / 100.0 ) * rightEnd1 ; |
219 | p.setPen( black ); | 219 | p.setPen( black ); |
220 | qDrawShadePanel( &p, 9, 30, rightEnd1 , 39, colorGroup(), TRUE, 1, NULL); | 220 | qDrawShadePanel( &p, 9, 30, rightEnd1 , 39, colorGroup(), TRUE, 1, NULL); |
221 | qDrawShadePanel( &p, rightEnd2, 37, 12, 24, colorGroup(), TRUE, 1, NULL); | 221 | qDrawShadePanel( &p, rightEnd2, 37, 12, 24, colorGroup(), TRUE, 1, NULL); |
222 | drawSegment( &p, QRect( 10, 30, percent2, 40 ), lightc, darkc, lightc.light(115), 6 ); | 222 | drawSegment( &p, QRect( 10, 30, percent2, 40 ), lightc, darkc, lightc.light(115), 6 ); |
223 | drawSegment( &p, QRect( 11 + percent2, 30, rightEnd1 - percent2, 40 ), white.light(80), black, white.light(90), 6 ); | 223 | drawSegment( &p, QRect( 11 + percent2, 30, rightEnd1 - percent2, 40 ), white.light(80), black, white.light(90), 6 ); |
224 | drawSegment( &p, QRect( rightEnd2, 37, 10, 25 ), white.light(80), black, white.light(90), 2 ); | 224 | drawSegment( &p, QRect( rightEnd2, 37, 10, 25 ), white.light(80), black, white.light(90), 2 ); |
225 | p.setPen( black); | 225 | p.setPen( black); |
226 | 226 | ||
227 | 227 | ||
228 | if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) { | 228 | if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) { |
229 | 229 | ||
230 | p.drawText(15, 50, tr ("Ipaq " + ipaqChem)); | 230 | p.drawText(15, 50, tr ("Ipaq " + ipaqChem)); |
231 | 231 | ||
232 | QString jacketMsg; | 232 | QString jacketMsg; |
233 | if (bat2) { | 233 | if (bat2) { |
234 | p.setPen(black); | 234 | p.setPen(black); |
235 | p.drawText(10,220, tr("Percentage battery remaining: ") + perc2 + " " + jackStatus); | 235 | p.drawText(10,220, tr("Percentage battery remaining: ") + perc2 + " " + jackStatus); |
236 | p.drawText(10,240, tr("Battery time remaining: ") + sec2); | 236 | p.drawText(10,240, tr("Battery time remaining: ") + sec2); |
237 | jacketMsg = tr("Jacket " + jackChem); | 237 | jacketMsg = tr("Jacket " + jackChem); |
238 | } else { | 238 | } else { |
239 | jackPercent = 0; | 239 | jackPercent = 0; |
240 | jacketMsg = tr("No jacket with battery inserted"); | 240 | jacketMsg = tr("No jacket with battery inserted"); |
241 | } | 241 | } |
242 | 242 | ||
243 | int jackPerc = ( jackPercent / 100.0 ) * screenWidth - 47; | 243 | int jackPerc = ( jackPercent / 100.0 ) * ( screenWidth - 47 ) ; |
244 | 244 | ||
245 | qDrawShadePanel( &p, 9, 160, rightEnd1, 39, colorGroup(), TRUE, 1, NULL); | 245 | qDrawShadePanel( &p, 9, 160, rightEnd1, 39, colorGroup(), TRUE, 1, NULL); |
246 | qDrawShadePanel( &p, rightEnd2, 167, 12, 24, colorGroup(), TRUE, 1, NULL); | 246 | qDrawShadePanel( &p, rightEnd2, 167, 12, 24, colorGroup(), TRUE, 1, NULL); |
247 | drawSegment( &p, QRect( 10, 160, jackPerc, 40 ), lightc, darkc, lightc.light(115), 6 ); | 247 | drawSegment( &p, QRect( 10, 160, jackPerc, 40 ), lightc, darkc, lightc.light(115), 6 ); |
248 | drawSegment( &p, QRect( 11 + jackPerc, 160, rightEnd1 - jackPerc, 40 ), white.light(80), black, white.light(90), 6 ); | 248 | drawSegment( &p, QRect( 11 + jackPerc, 160, rightEnd1 - jackPerc, 40 ), white.light(80), black, white.light(90), 6 ); |
249 | drawSegment( &p, QRect( rightEnd2, 167, 10, 25 ), white.light(80), black, white.light(90), 2 ); | 249 | drawSegment( &p, QRect( rightEnd2, 167, 10, 25 ), white.light(80), black, white.light(90), 2 ); |
250 | p.setPen( black ); | 250 | p.setPen( black ); |
251 | p.drawText(15, 180, jacketMsg); | 251 | p.drawText(15, 180, jacketMsg); |
252 | } | 252 | } |
253 | 253 | ||
254 | } | 254 | } |
255 | 255 | ||
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index b8c4553..4ed09b8 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp | |||
@@ -227,123 +227,127 @@ bool CardMonitor::getStatusPcmcia(int showPopUp) | |||
227 | } | 227 | } |
228 | } else if ((*line).startsWith("Socket 1:")) { | 228 | } else if ((*line).startsWith("Socket 1:")) { |
229 | if ((*line).startsWith("Socket 1: empty") && cardInPcmcia1) { | 229 | if ((*line).startsWith("Socket 1: empty") && cardInPcmcia1) { |
230 | cardInPcmcia1 = FALSE; | 230 | cardInPcmcia1 = FALSE; |
231 | } else if (!(*line).startsWith("Socket 1: empty") | 231 | } else if (!(*line).startsWith("Socket 1: empty") |
232 | && !cardInPcmcia1) { | 232 | && !cardInPcmcia1) { |
233 | cardInPcmcia1Name = | 233 | cardInPcmcia1Name = |
234 | (*line).mid(((*line).find(':') + 1), | 234 | (*line).mid(((*line).find(':') + 1), |
235 | (*line).length() - 9); | 235 | (*line).length() - 9); |
236 | cardInPcmcia1Name.stripWhiteSpace(); | 236 | cardInPcmcia1Name.stripWhiteSpace(); |
237 | cardInPcmcia1 = TRUE; | 237 | cardInPcmcia1 = TRUE; |
238 | show(); | 238 | show(); |
239 | line++; | 239 | line++; |
240 | int pos = (*line).find('\t') + 1; | 240 | int pos = (*line).find('\t') + 1; |
241 | cardInPcmcia1Type = | 241 | cardInPcmcia1Type = |
242 | (*line).mid(pos, (*line).find("\t", pos) - pos); | 242 | (*line).mid(pos, (*line).find("\t", pos) - pos); |
243 | } | 243 | } |
244 | } | 244 | } |
245 | } | 245 | } |
246 | f.close(); | 246 | f.close(); |
247 | 247 | ||
248 | if (!showPopUp | 248 | if (!showPopUp |
249 | && (cardWas0 != cardInPcmcia0 || cardWas1 != cardInPcmcia1)) { | 249 | && (cardWas0 != cardInPcmcia0 || cardWas1 != cardInPcmcia1)) { |
250 | QString text = QString::null; | 250 | QString text = QString::null; |
251 | QString what = QString::null; | 251 | QString what = QString::null; |
252 | if (cardWas0 != cardInPcmcia0) { | 252 | if (cardWas0 != cardInPcmcia0) { |
253 | if (cardInPcmcia0) { | 253 | if (cardInPcmcia0) { |
254 | text += tr("New card: "); | 254 | text += tr("New card: "); |
255 | what = "on"; | 255 | what = "on"; |
256 | } else { | 256 | } else { |
257 | text += tr("Ejected: "); | 257 | text += tr("Ejected: "); |
258 | what = "off"; | 258 | what = "off"; |
259 | } | 259 | } |
260 | text += cardInPcmcia0Name; | 260 | text += cardInPcmcia0Name; |
261 | popUp(text, "cardmon/" + cardInPcmcia0Type); | 261 | popUp(text, "cardmon/" + cardInPcmcia0Type); |
262 | } | 262 | } |
263 | 263 | ||
264 | if (cardWas1 != cardInPcmcia1) { | 264 | if (cardWas1 != cardInPcmcia1) { |
265 | if (cardInPcmcia1) { | 265 | if (cardInPcmcia1) { |
266 | text += tr("New card: "); | 266 | text += tr("New card: "); |
267 | what = "on"; | 267 | what = "on"; |
268 | } else { | 268 | } else { |
269 | text += tr("Ejected: "); | 269 | text += tr("Ejected: "); |
270 | what = "off"; | 270 | what = "off"; |
271 | } | 271 | } |
272 | text += cardInPcmcia1Name; | 272 | text += cardInPcmcia1Name; |
273 | popUp(text, "cardmon/" + cardInPcmcia1Type); | 273 | popUp(text, "cardmon/" + cardInPcmcia1Type); |
274 | } | 274 | } |
275 | #ifndef QT_NO_SOUND | ||
275 | QSound::play(Resource::findSound("cardmon/card" + what)); | 276 | QSound::play(Resource::findSound("cardmon/card" + what)); |
277 | #endif | ||
276 | } | 278 | } |
277 | } else { | 279 | } else { |
278 | // no file found | 280 | // no file found |
279 | qDebug("no file found"); | 281 | qDebug("no file found"); |
280 | cardInPcmcia0 = FALSE; | 282 | cardInPcmcia0 = FALSE; |
281 | cardInPcmcia1 = FALSE; | 283 | cardInPcmcia1 = FALSE; |
282 | } | 284 | } |
283 | repaint( FALSE ); | 285 | repaint( FALSE ); |
284 | return ((cardWas0 == cardInPcmcia0 | 286 | return ((cardWas0 == cardInPcmcia0 |
285 | && cardWas1 == cardInPcmcia1) ? FALSE : TRUE); | 287 | && cardWas1 == cardInPcmcia1) ? FALSE : TRUE); |
286 | 288 | ||
287 | } | 289 | } |
288 | 290 | ||
289 | 291 | ||
290 | bool CardMonitor::getStatusSd(int showPopUp) | 292 | bool CardMonitor::getStatusSd(int showPopUp) |
291 | { | 293 | { |
292 | 294 | ||
293 | bool cardWas = cardInSd;// remember last state | 295 | bool cardWas = cardInSd;// remember last state |
294 | cardInSd = FALSE; | 296 | cardInSd = FALSE; |
295 | 297 | ||
296 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | 298 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) |
297 | struct mntent *me; | 299 | struct mntent *me; |
298 | FILE *mntfp = setmntent("/etc/mtab", "r"); | 300 | FILE *mntfp = setmntent("/etc/mtab", "r"); |
299 | 301 | ||
300 | if (mntfp) { | 302 | if (mntfp) { |
301 | while ((me = getmntent(mntfp)) != 0) { | 303 | while ((me = getmntent(mntfp)) != 0) { |
302 | QString fs = me->mnt_fsname; | 304 | QString fs = me->mnt_fsname; |
303 | //qDebug( fs ); | 305 | //qDebug( fs ); |
304 | if (fs.left(14) == "/dev/mmc/part1" || fs.left(7) == "/dev/sd" | 306 | if (fs.left(14) == "/dev/mmc/part1" || fs.left(7) == "/dev/sd" |
305 | || fs.left(9) == "/dev/mmcd") { | 307 | || fs.left(9) == "/dev/mmcd") { |
306 | cardInSd = TRUE; | 308 | cardInSd = TRUE; |
307 | show(); | 309 | show(); |
308 | } | 310 | } |
309 | // else { | 311 | // else { |
310 | // cardInSd = FALSE; | 312 | // cardInSd = FALSE; |
311 | // } | 313 | // } |
312 | } | 314 | } |
313 | endmntent(mntfp); | 315 | endmntent(mntfp); |
314 | } | 316 | } |
315 | 317 | ||
316 | if (!showPopUp && cardWas != cardInSd) { | 318 | if (!showPopUp && cardWas != cardInSd) { |
317 | QString text = QString::null; | 319 | QString text = QString::null; |
318 | QString what = QString::null; | 320 | QString what = QString::null; |
319 | if (cardInSd) { | 321 | if (cardInSd) { |
320 | text += "New card: SD/MMC"; | 322 | text += "New card: SD/MMC"; |
321 | what = "on"; | 323 | what = "on"; |
322 | } else { | 324 | } else { |
323 | text += "Ejected: SD/MMC"; | 325 | text += "Ejected: SD/MMC"; |
324 | what = "off"; | 326 | what = "off"; |
325 | } | 327 | } |
326 | //qDebug("TEXT: " + text ); | 328 | //qDebug("TEXT: " + text ); |
329 | #ifndef QT_NO_SOUND | ||
327 | QSound::play(Resource::findSound("cardmon/card" + what)); | 330 | QSound::play(Resource::findSound("cardmon/card" + what)); |
331 | #endif | ||
328 | popUp(text, "cardmon/ide");// XX add SD pic | 332 | popUp(text, "cardmon/ide");// XX add SD pic |
329 | } | 333 | } |
330 | #else | 334 | #else |
331 | #error "Not on Linux" | 335 | #error "Not on Linux" |
332 | #endif | 336 | #endif |
333 | repaint( FALSE ); | 337 | repaint( FALSE ); |
334 | return ((cardWas == cardInSd) ? FALSE : TRUE); | 338 | return ((cardWas == cardInSd) ? FALSE : TRUE); |
335 | } | 339 | } |
336 | 340 | ||
337 | void CardMonitor::paintEvent(QPaintEvent *) | 341 | void CardMonitor::paintEvent(QPaintEvent *) |
338 | { | 342 | { |
339 | 343 | ||
340 | QPainter p(this); | 344 | QPainter p(this); |
341 | 345 | ||
342 | if ( cardInPcmcia0 || cardInPcmcia1 || cardInSd ) { | 346 | if ( cardInPcmcia0 || cardInPcmcia1 || cardInSd ) { |
343 | p.drawPixmap(0, 0, pm ); | 347 | p.drawPixmap(0, 0, pm ); |
344 | show(); | 348 | show(); |
345 | } else { | 349 | } else { |
346 | //p.eraseRect(rect()); | 350 | //p.eraseRect(rect()); |
347 | hide(); | 351 | hide(); |
348 | } | 352 | } |
349 | } | 353 | } |
diff --git a/core/applets/homeapplet/home.h b/core/applets/homeapplet/home.h index 64af97d..1186caf 100644 --- a/core/applets/homeapplet/home.h +++ b/core/applets/homeapplet/home.h | |||
@@ -1,49 +1,49 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef __OPIE_HOME_APPLET_H__ | 20 | #ifndef __OPIE_HOME_APPLET_H__ |
21 | #define __OPIE_HOME_APPLET_H__ | 21 | #define __OPIE_HOME_APPLET_H__ |
22 | 22 | ||
23 | #include <qpe/menuappletinterface.h> | 23 | #include <qpe/menuappletinterface.h> |
24 | 24 | ||
25 | class HomeApplet : public QObject, public MenuAppletInterface | 25 | class HomeApplet : public QObject, public MenuAppletInterface |
26 | { | 26 | { |
27 | public: | 27 | public: |
28 | HomeApplet ( ); | 28 | HomeApplet ( ); |
29 | virtual ~HomeApplet ( ); | 29 | virtual ~HomeApplet ( ); |
30 | 30 | ||
31 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); | 31 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); |
32 | Q_REFCOUNT | 32 | Q_REFCOUNT |
33 | 33 | ||
34 | virtual int position() const; | 34 | virtual int position() const; |
35 | 35 | ||
36 | virtual QString name ( ) const; | 36 | virtual QString name ( ) const; |
37 | virtual QIconSet icon ( ) const; | 37 | virtual QIconSet icon ( ) const; |
38 | virtual QString text ( ) const; | 38 | virtual QString text ( ) const; |
39 | virtual QString tr( const char* ) const; | 39 | virtual QString tr( const char* ) const; |
40 | virtual QString tr( const char*, const char* ) const; | 40 | virtual QString tr( const char*, const char* ) const; |
41 | virtual QPopupMenu *popup ( QWidget *parent ) const; | 41 | virtual QPopupMenu *popup ( QWidget *parent ) const; |
42 | 42 | ||
43 | virtual void activated ( ); | 43 | virtual void activated ( ); |
44 | 44 | ||
45 | private: | 45 | private: |
46 | ulong ref; | 46 | ulong ref; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | #endif | 49 | #endif |
diff --git a/core/applets/restartapplet2/.cvsignore b/core/applets/restartapplet2/.cvsignore index a403d26..4943911 100644 --- a/core/applets/restartapplet2/.cvsignore +++ b/core/applets/restartapplet2/.cvsignore | |||
@@ -1,7 +1,6 @@ | |||
1 | *.moc | 1 | *.moc |
2 | *.~ | 2 | *.~ |
3 | Makefile* | 3 | Makefile* |
4 | config.in | 4 | config.in |
5 | moc_* | 5 | moc_* |
6 | opieobjconfig.in | 6 | opieobjconfig.in |
7 | opieobj | ||
diff --git a/core/applets/suspendapplet/suspend.h b/core/applets/suspendapplet/suspend.h index 0c92bcb..75467c1 100644 --- a/core/applets/suspendapplet/suspend.h +++ b/core/applets/suspendapplet/suspend.h | |||
@@ -1,49 +1,49 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef __OPIE_SUSPEND_APPLET_H__ | 20 | #ifndef __OPIE_SUSPEND_APPLET_H__ |
21 | #define __OPIE_SUSPEND_APPLET_H__ | 21 | #define __OPIE_SUSPEND_APPLET_H__ |
22 | 22 | ||
23 | #include <qpe/menuappletinterface.h> | 23 | #include <qpe/menuappletinterface.h> |
24 | 24 | ||
25 | class SuspendApplet : public QObject, public MenuAppletInterface | 25 | class SuspendApplet : public QObject, public MenuAppletInterface |
26 | { | 26 | { |
27 | public: | 27 | public: |
28 | SuspendApplet ( ); | 28 | SuspendApplet ( ); |
29 | virtual ~SuspendApplet ( ); | 29 | virtual ~SuspendApplet ( ); |
30 | 30 | ||
31 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); | 31 | QRESULT queryInterface( const QUuid&, QUnknownInterface** ); |
32 | Q_REFCOUNT | 32 | Q_REFCOUNT |
33 | 33 | ||
34 | virtual int position() const; | 34 | virtual int position() const; |
35 | 35 | ||
36 | virtual QString name ( ) const; | 36 | virtual QString name ( ) const; |
37 | virtual QIconSet icon ( ) const; | 37 | virtual QIconSet icon ( ) const; |
38 | virtual QString text ( ) const; | 38 | virtual QString text ( ) const; |
39 | virtual QString tr( const char* ) const; | 39 | virtual QString tr( const char* ) const; |
40 | virtual QString tr( const char*, const char* ) const; | 40 | virtual QString tr( const char*, const char* ) const; |
41 | virtual QPopupMenu *popup ( QWidget *parent ) const; | 41 | virtual QPopupMenu *popup ( QWidget *parent ) const; |
42 | 42 | ||
43 | virtual void activated ( ); | 43 | virtual void activated ( ); |
44 | 44 | ||
45 | private: | 45 | private: |
46 | ulong ref; | 46 | ulong ref; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | #endif | 49 | #endif |