summaryrefslogtreecommitdiff
path: root/core/apps/textedit/textedit.cpp
Unidiff
Diffstat (limited to 'core/apps/textedit/textedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 1a1b186..da74893 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -452,98 +452,98 @@ void TextEdit::setFontSize(int sz, bool round_down_not_up)
452 break; 452 break;
453 } 453 }
454 } 454 }
455 } 455 }
456 456
457 QFont f = editor->font(); 457 QFont f = editor->font();
458 f.setPointSize(s); 458 f.setPointSize(s);
459 editor->setFont(f); 459 editor->setFont(f);
460 460
461 zin->setEnabled(s != fontsize[nfontsizes-1]); 461 zin->setEnabled(s != fontsize[nfontsizes-1]);
462 zout->setEnabled(s != fontsize[0]); 462 zout->setEnabled(s != fontsize[0]);
463} 463}
464 464
465void TextEdit::setBold(bool y) 465void TextEdit::setBold(bool y)
466{ 466{
467 QFont f = editor->font(); 467 QFont f = editor->font();
468 f.setBold(y); 468 f.setBold(y);
469 editor->setFont(f); 469 editor->setFont(f);
470} 470}
471 471
472void TextEdit::setItalic(bool y) 472void TextEdit::setItalic(bool y)
473{ 473{
474 QFont f = editor->font(); 474 QFont f = editor->font();
475 f.setItalic(y); 475 f.setItalic(y);
476 editor->setFont(f); 476 editor->setFont(f);
477} 477}
478 478
479void TextEdit::setWordWrap(bool y) 479void TextEdit::setWordWrap(bool y)
480{ 480{
481 bool state = editor->edited(); 481 bool state = editor->edited();
482 editor->setWordWrap(y ? QMultiLineEdit::WidgetWidth : QMultiLineEdit::NoWrap ); 482 editor->setWordWrap(y ? QMultiLineEdit::WidgetWidth : QMultiLineEdit::NoWrap );
483 editor->setEdited( state ); 483 editor->setEdited( state );
484} 484}
485 485
486void TextEdit::fileNew() 486void TextEdit::fileNew()
487{ 487{
488 if( !bFromDocView ) { 488 if( !bFromDocView ) {
489 saveAs(); 489 saveAs();
490 } 490 }
491 newFile(DocLnk()); 491 newFile(DocLnk());
492} 492}
493 493
494void TextEdit::fileOpen() 494void TextEdit::fileOpen()
495{ 495{
496 browseForFiles=new fileBrowser(this,"Open File",TRUE,0, "*"); 496 browseForFiles=new fileBrowser(this,"Open File",TRUE,0, "*");
497 browseForFiles->setFileView( viewSelection ); 497 browseForFiles->setFileView( viewSelection );
498 browseForFiles->showMaximized(); 498 browseForFiles->showMaximized();
499 if( browseForFiles->exec() != -1 ) { 499 if( browseForFiles->exec() != -1 ) {
500 QString selFile= browseForFiles->selectedFileName; 500 QString selFile = browseForFiles->selectedFileName;
501 QStringList fileList=browseForFiles->fileList; 501 QStringList fileList = browseForFiles->fileList;
502 qDebug(selFile); 502 qDebug(selFile);
503 QStringList::ConstIterator f; 503 QStringList::ConstIterator f;
504 QString fileTemp; 504 QString fileTemp;
505 for ( f = fileList.begin(); f != fileList.end(); f++ ) { 505 for ( f = fileList.begin(); f != fileList.end(); f++ ) {
506 fileTemp = *f; 506 fileTemp = *f;
507 fileTemp.right( fileTemp.length()-5); 507 fileTemp.right( fileTemp.length()-5);
508 QString fileName = fileTemp; 508 QString fileName = fileTemp;
509 if( fileName != "Unnamed" || fileName != "Empty Text" ) { 509 if( fileName != "Unnamed" || fileName != "Empty Text" ) {
510 currentFileName = fileName; 510 currentFileName = fileName;
511 qDebug("please open "+currentFileName); 511 qDebug("please open "+currentFileName);
512 openFile(fileName ); 512 openFile(fileName );
513 } 513 }
514 } 514 }
515 viewSelection = browseForFiles->SelectionCombo->currentItem(); 515 viewSelection = browseForFiles->SelectionCombo->currentItem();
516 } 516 }
517 delete browseForFiles; 517 delete browseForFiles;
518 editor->setEdited( FALSE); 518 editor->setEdited( FALSE);
519 edited1=FALSE; 519 edited1=FALSE;
520 edited=FALSE; 520 edited=FALSE;
521 if(caption().left(1)=="*") 521 if(caption().left(1)=="*")
522 setCaption(caption().right(caption().length()-1)); 522 setCaption(caption().right(caption().length()-1));
523 doSearchBar(); 523 doSearchBar();
524} 524}
525 525
526void TextEdit::doSearchBar() 526void TextEdit::doSearchBar()
527{ 527{
528 Config cfg("TextEdit"); 528 Config cfg("TextEdit");
529 cfg.setGroup("View"); 529 cfg.setGroup("View");
530 if(cfg.readEntry("SearchBar","Closed") != "Opened") 530 if(cfg.readEntry("SearchBar","Closed") != "Opened")
531 searchBar->hide(); 531 searchBar->hide();
532} 532}
533 533
534#if 0 534#if 0
535void TextEdit::slotFind() 535void TextEdit::slotFind()
536{ 536{
537 FindDialog frmFind( "Text Editor", this ); 537 FindDialog frmFind( "Text Editor", this );
538 connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), 538 connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)),
539 editor, SLOT(slotDoFind( const QString&,bool,bool))); 539 editor, SLOT(slotDoFind( const QString&,bool,bool)));
540 540
541 //case sensitive, backwards, [category] 541 //case sensitive, backwards, [category]
542 542
543 connect( editor, SIGNAL(notFound()), 543 connect( editor, SIGNAL(notFound()),
544 &frmFind, SLOT(slotNotFound()) ); 544 &frmFind, SLOT(slotNotFound()) );
545 connect( editor, SIGNAL(searchWrapped()), 545 connect( editor, SIGNAL(searchWrapped()),
546 &frmFind, SLOT(slotWrapAround()) ); 546 &frmFind, SLOT(slotWrapAround()) );
547 547
548 frmFind.exec(); 548 frmFind.exec();
549 549