author | llornkcor <llornkcor> | 2002-10-17 04:12:20 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-10-17 04:12:20 (UTC) |
commit | 23fbd85de36bac6e8dff5e16a6e22ce19fe15187 (patch) (unidiff) | |
tree | 482f504e56bfcc78f3da73598190b9280a649871 | |
parent | ac2f56d9be571ff2d8165f81fbea03d31c551779 (diff) | |
download | opie-23fbd85de36bac6e8dff5e16a6e22ce19fe15187.zip opie-23fbd85de36bac6e8dff5e16a6e22ce19fe15187.tar.gz opie-23fbd85de36bac6e8dff5e16a6e22ce19fe15187.tar.bz2 |
added hold stylus default menu
-rw-r--r-- | core/apps/textedit/textedit.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index f3937b1..35f9d3c 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -374,48 +374,49 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) | |||
374 | searchBar->setStretchableWidget( searchEdit ); | 374 | searchBar->setStretchableWidget( searchEdit ); |
375 | connect( searchEdit, SIGNAL( textChanged( const QString & ) ), | 375 | connect( searchEdit, SIGNAL( textChanged( const QString & ) ), |
376 | this, SLOT( search() ) ); | 376 | this, SLOT( search() ) ); |
377 | 377 | ||
378 | a = new QAction( tr( "Find Next" ), Resource::loadPixmap( "next" ), QString::null, 0, this, 0 ); | 378 | a = new QAction( tr( "Find Next" ), Resource::loadPixmap( "next" ), QString::null, 0, this, 0 ); |
379 | connect( a, SIGNAL( activated() ), this, SLOT( findNext() ) ); | 379 | connect( a, SIGNAL( activated() ), this, SLOT( findNext() ) ); |
380 | a->addTo( searchBar ); | 380 | a->addTo( searchBar ); |
381 | a->addTo( edit ); | 381 | a->addTo( edit ); |
382 | 382 | ||
383 | a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); | 383 | a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); |
384 | connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); | 384 | connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); |
385 | a->addTo( searchBar ); | 385 | a->addTo( searchBar ); |
386 | 386 | ||
387 | edit->insertSeparator(); | 387 | edit->insertSeparator(); |
388 | a = new QAction( tr( "Delete" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); | 388 | a = new QAction( tr( "Delete" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); |
389 | connect( a, SIGNAL( activated() ), this, SLOT( editDelete() ) ); | 389 | connect( a, SIGNAL( activated() ), this, SLOT( editDelete() ) ); |
390 | a->addTo( edit ); | 390 | a->addTo( edit ); |
391 | 391 | ||
392 | searchBar->hide(); | 392 | searchBar->hide(); |
393 | 393 | ||
394 | editor = new QpeEditor( this ); | 394 | editor = new QpeEditor( this ); |
395 | setCentralWidget( editor ); | 395 | setCentralWidget( editor ); |
396 | editor->setFrameStyle( QFrame::Panel | QFrame::Sunken ); | 396 | editor->setFrameStyle( QFrame::Panel | QFrame::Sunken ); |
397 | connect( editor, SIGNAL( textChanged() ), this, SLOT( editorChanged() ) ); | 397 | connect( editor, SIGNAL( textChanged() ), this, SLOT( editorChanged() ) ); |
398 | QPEApplication::setStylusOperation( editor, QPEApplication::RightOnHold); | ||
398 | 399 | ||
399 | Config cfg("TextEdit"); | 400 | Config cfg("TextEdit"); |
400 | cfg. setGroup ( "Font" ); | 401 | cfg. setGroup ( "Font" ); |
401 | 402 | ||
402 | QFont defaultFont = editor-> font ( ); | 403 | QFont defaultFont = editor-> font ( ); |
403 | 404 | ||
404 | QString family = cfg. readEntry ( "Family", defaultFont. family ( )); | 405 | QString family = cfg. readEntry ( "Family", defaultFont. family ( )); |
405 | int size = cfg. readNumEntry ( "Size", defaultFont. pointSize ( )); | 406 | int size = cfg. readNumEntry ( "Size", defaultFont. pointSize ( )); |
406 | int weight = cfg. readNumEntry ( "Weight", defaultFont. weight ( )); | 407 | int weight = cfg. readNumEntry ( "Weight", defaultFont. weight ( )); |
407 | bool italic = cfg. readBoolEntry ( "Italic", defaultFont. italic ( )); | 408 | bool italic = cfg. readBoolEntry ( "Italic", defaultFont. italic ( )); |
408 | 409 | ||
409 | defaultFont = QFont ( family, size, weight, italic ); | 410 | defaultFont = QFont ( family, size, weight, italic ); |
410 | editor-> setFont ( defaultFont ); | 411 | editor-> setFont ( defaultFont ); |
411 | 412 | ||
412 | updateCaption(); | 413 | updateCaption(); |
413 | 414 | ||
414 | cfg.setGroup ( "View" ); | 415 | cfg.setGroup ( "View" ); |
415 | 416 | ||
416 | promptExit = cfg. readBoolEntry ( "PromptExit", false ); | 417 | promptExit = cfg. readBoolEntry ( "PromptExit", false ); |
417 | openDesktop = cfg. readBoolEntry ( "OpenDesktop", true ); | 418 | openDesktop = cfg. readBoolEntry ( "OpenDesktop", true ); |
418 | filePerms = cfg. readBoolEntry ( "FilePermissions", false ); | 419 | filePerms = cfg. readBoolEntry ( "FilePermissions", false ); |
419 | 420 | ||
420 | if(promptExit ) nAdvanced->setOn ( true ); | 421 | if(promptExit ) nAdvanced->setOn ( true ); |
421 | if(openDesktop) desktopAction->setOn ( true ); | 422 | if(openDesktop) desktopAction->setOn ( true ); |