author | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
commit | 0d59c780513da78033f4d9040475dee9db0256d4 (patch) (unidiff) | |
tree | 503d320b4aa3daae9982082e7b34e3e2c48bdfb7 /core/applets/screenshotapplet/screenshot.cpp | |
parent | a0981652d61776d70f25980f035748b21339e946 (diff) | |
download | opie-0d59c780513da78033f4d9040475dee9db0256d4.zip opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.gz opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.bz2 |
run the optimize_connect script
the whole cvs is tagged with "before_optimize_connect" if there are problems you
can check the diff (but it had compiled and run here)
Diffstat (limited to 'core/applets/screenshotapplet/screenshot.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/screenshotapplet/screenshot.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/applets/screenshotapplet/screenshot.cpp b/core/applets/screenshotapplet/screenshot.cpp index 5d6bce4..20e1c9b 100644 --- a/core/applets/screenshotapplet/screenshot.cpp +++ b/core/applets/screenshotapplet/screenshot.cpp | |||
@@ -254,99 +254,99 @@ static char * snapshot_xpm[] = { | |||
254 | static const char *SCAP_hostname = "www.handhelds.org"; | 254 | static const char *SCAP_hostname = "www.handhelds.org"; |
255 | static const int SCAP_port = 80; | 255 | static const int SCAP_port = 80; |
256 | 256 | ||
257 | 257 | ||
258 | ScreenshotControl::ScreenshotControl( QWidget *parent, const char *name ) | 258 | ScreenshotControl::ScreenshotControl( QWidget *parent, const char *name ) |
259 | : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup ) | 259 | : QFrame( parent, name, WDestructiveClose | WStyle_StaysOnTop | WType_Popup ) |
260 | { | 260 | { |
261 | setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); | 261 | setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); |
262 | QVBoxLayout *vbox = new QVBoxLayout ( this, 5, 3 ); | 262 | QVBoxLayout *vbox = new QVBoxLayout ( this, 5, 3 ); |
263 | QHBoxLayout *hbox; | 263 | QHBoxLayout *hbox; |
264 | 264 | ||
265 | hbox = new QHBoxLayout ( vbox ); | 265 | hbox = new QHBoxLayout ( vbox ); |
266 | 266 | ||
267 | QLabel *l = new QLabel ( tr( "Delay" ), this ); | 267 | QLabel *l = new QLabel ( tr( "Delay" ), this ); |
268 | hbox-> addWidget ( l ); | 268 | hbox-> addWidget ( l ); |
269 | 269 | ||
270 | delaySpin = new QSpinBox( 0, 60, 1, this, "Spinner" ); | 270 | delaySpin = new QSpinBox( 0, 60, 1, this, "Spinner" ); |
271 | delaySpin-> setButtonSymbols ( QSpinBox::PlusMinus ); | 271 | delaySpin-> setButtonSymbols ( QSpinBox::PlusMinus ); |
272 | delaySpin-> setSuffix ( tr( "sec" )); | 272 | delaySpin-> setSuffix ( tr( "sec" )); |
273 | delaySpin-> setFocusPolicy( QWidget::NoFocus ); | 273 | delaySpin-> setFocusPolicy( QWidget::NoFocus ); |
274 | delaySpin-> setValue ( 1 ); | 274 | delaySpin-> setValue ( 1 ); |
275 | hbox-> addWidget ( delaySpin ); | 275 | hbox-> addWidget ( delaySpin ); |
276 | 276 | ||
277 | saveNamedCheck = new QCheckBox ( tr( "Save named" ), this); | 277 | saveNamedCheck = new QCheckBox ( tr( "Save named" ), this); |
278 | saveNamedCheck-> setFocusPolicy ( QWidget::NoFocus ); | 278 | saveNamedCheck-> setFocusPolicy ( QWidget::NoFocus ); |
279 | vbox->addWidget( saveNamedCheck); | 279 | vbox->addWidget( saveNamedCheck); |
280 | 280 | ||
281 | vbox-> addSpacing ( 3 ); | 281 | vbox-> addSpacing ( 3 ); |
282 | 282 | ||
283 | l = new QLabel ( tr( "Save screenshot as..." ), this ); | 283 | l = new QLabel ( tr( "Save screenshot as..." ), this ); |
284 | vbox-> addWidget ( l, AlignCenter ); | 284 | vbox-> addWidget ( l, AlignCenter ); |
285 | 285 | ||
286 | hbox = new QHBoxLayout ( vbox ); | 286 | hbox = new QHBoxLayout ( vbox ); |
287 | 287 | ||
288 | grabItButton = new QPushButton( tr( "File" ), this, "GrabButton" ); | 288 | grabItButton = new QPushButton( tr( "File" ), this, "GrabButton" ); |
289 | grabItButton ->setFocusPolicy( QWidget::TabFocus ); | 289 | grabItButton ->setFocusPolicy( QWidget::TabFocus ); |
290 | hbox-> addWidget ( grabItButton ); | 290 | hbox-> addWidget ( grabItButton ); |
291 | 291 | ||
292 | scapButton = new QPushButton( tr( "Scap" ), this, "ScapButton" ); | 292 | scapButton = new QPushButton( tr( "Scap" ), this, "ScapButton" ); |
293 | scapButton ->setFocusPolicy( QWidget::TabFocus ); | 293 | scapButton ->setFocusPolicy( QWidget::TabFocus ); |
294 | hbox-> addWidget ( scapButton ); | 294 | hbox-> addWidget ( scapButton ); |
295 | 295 | ||
296 | setFixedSize ( sizeHint ( )); | 296 | setFixedSize ( sizeHint ( )); |
297 | setFocusPolicy ( QWidget::NoFocus ); | 297 | setFocusPolicy ( QWidget::NoFocus ); |
298 | 298 | ||
299 | 299 | ||
300 | grabTimer = new QTimer ( this, "grab timer"); | 300 | grabTimer = new QTimer ( this, "grab timer"); |
301 | 301 | ||
302 | connect ( grabTimer, SIGNAL( timeout ( )), this, SLOT( performGrab ( ))); | 302 | connect ( grabTimer, SIGNAL( timeout()), this, SLOT( performGrab())); |
303 | connect ( grabItButton, SIGNAL( clicked ( )), SLOT( slotGrab ( ))); | 303 | connect ( grabItButton, SIGNAL( clicked()), SLOT( slotGrab())); |
304 | connect ( scapButton, SIGNAL( clicked ( )), SLOT( slotScap ( ))); | 304 | connect ( scapButton, SIGNAL( clicked()), SLOT( slotScap())); |
305 | } | 305 | } |
306 | 306 | ||
307 | void ScreenshotControl::slotGrab() | 307 | void ScreenshotControl::slotGrab() |
308 | { | 308 | { |
309 | buttonPushed = 1; | 309 | buttonPushed = 1; |
310 | hide(); | 310 | hide(); |
311 | 311 | ||
312 | setFileName = FALSE; | 312 | setFileName = FALSE; |
313 | if ( saveNamedCheck->isChecked()) { | 313 | if ( saveNamedCheck->isChecked()) { |
314 | setFileName = TRUE; | 314 | setFileName = TRUE; |
315 | InputDialog *fileDlg; | 315 | InputDialog *fileDlg; |
316 | 316 | ||
317 | fileDlg = new InputDialog( 0 , tr("Name of screenshot "), TRUE, 0); | 317 | fileDlg = new InputDialog( 0 , tr("Name of screenshot "), TRUE, 0); |
318 | fileDlg->exec(); | 318 | fileDlg->exec(); |
319 | fileDlg->raise(); | 319 | fileDlg->raise(); |
320 | QString fileName, list; | 320 | QString fileName, list; |
321 | if ( fileDlg->result() == 1 ) { | 321 | if ( fileDlg->result() == 1 ) { |
322 | fileName = fileDlg->LineEdit1->text(); | 322 | fileName = fileDlg->LineEdit1->text(); |
323 | 323 | ||
324 | if (fileName.find("/", 0, TRUE) == -1) | 324 | if (fileName.find("/", 0, TRUE) == -1) |
325 | FileNamePath = QDir::homeDirPath() + "/Documents/image/png/" + fileName; | 325 | FileNamePath = QDir::homeDirPath() + "/Documents/image/png/" + fileName; |
326 | else | 326 | else |
327 | FileNamePath = fileName; | 327 | FileNamePath = fileName; |
328 | 328 | ||
329 | } | 329 | } |
330 | delete fileDlg; | 330 | delete fileDlg; |
331 | } | 331 | } |
332 | 332 | ||
333 | if ( delaySpin->value() ) | 333 | if ( delaySpin->value() ) |
334 | grabTimer->start( delaySpin->value() * 1000, true ); | 334 | grabTimer->start( delaySpin->value() * 1000, true ); |
335 | else | 335 | else |
336 | show(); | 336 | show(); |
337 | } | 337 | } |
338 | 338 | ||
339 | void ScreenshotControl::slotScap() | 339 | void ScreenshotControl::slotScap() |
340 | { | 340 | { |
341 | buttonPushed = 2; | 341 | buttonPushed = 2; |
342 | hide(); | 342 | hide(); |
343 | 343 | ||
344 | if ( delaySpin->value() ) | 344 | if ( delaySpin->value() ) |
345 | grabTimer->start( delaySpin->value() * 1000, true ); | 345 | grabTimer->start( delaySpin->value() * 1000, true ); |
346 | else | 346 | else |
347 | show(); | 347 | show(); |
348 | } | 348 | } |
349 | 349 | ||
350 | 350 | ||
351 | void ScreenshotControl::savePixmap() | 351 | void ScreenshotControl::savePixmap() |
352 | { | 352 | { |