author | llornkcor <llornkcor> | 2002-05-29 15:24:04 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-05-29 15:24:04 (UTC) |
commit | ceaf90ad848c69d693f0c9eedbc8f9ab1935e42f (patch) (side-by-side diff) | |
tree | d66941f764e2c162b1707881ce44b8d396651f98 | |
parent | 949c238e785ad1060db41690bb60b1e252824708 (diff) | |
download | opie-ceaf90ad848c69d693f0c9eedbc8f9ab1935e42f.zip opie-ceaf90ad848c69d693f0c9eedbc8f9ab1935e42f.tar.gz opie-ceaf90ad848c69d693f0c9eedbc8f9ab1935e42f.tar.bz2 |
: is not the proper way to end a line in C, nor C++.. please use a ; next time
-rw-r--r-- | core/apps/textedit/textedit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index 403bd92..f89ed6d 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -385,257 +385,257 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) editor = new QpeEditor( this ); setCentralWidget( editor ); editor->setFrameStyle( QFrame::Panel | QFrame::Sunken ); connect( editor, SIGNAL( textChanged() ), this, SLOT( editorChanged() ) ); // resize( 200, 300 ); // setFontSize(defsize,TRUE); FontDatabase fdb; QFont defaultFont=editor->font(); QFontInfo fontInfo(defaultFont); cfg.setGroup("Font"); QString family = cfg.readEntry("Family", fontInfo.family()); QString style = cfg.readEntry("Style", fdb.styleString(defaultFont)); int i_size = cfg.readNumEntry("Size", fontInfo.pointSize()/10); QString charSet = cfg.readEntry("CharSet", QFont::encodingName( fontInfo.charSet()) ); defaultFont = fdb.font(family,style,i_size,charSet); editor->setFont( defaultFont); wa->setOn(wrap); updateCaption(); cfg.setGroup("View"); if(cfg.readEntry("startNew","TRUE") == "TRUE") { nStart->setOn(TRUE); fileNew(); } else { fileOpen(); } viewSelection = cfg.readNumEntry( "FileView", 0 ); } void TextEdit::cleanUp() { // save(); Config cfg("TextEdit"); cfg.setGroup("View"); QFont f = editor->font(); cfg.writeEntry("FontSize",f.pointSize()); cfg.writeEntry("Bold",f.bold()); cfg.writeEntry("Italic",f.italic()); cfg.writeEntry("Wrap",editor->wordWrap() == QMultiLineEdit::WidgetWidth); cfg.writeEntry( "FileView", viewSelection ); } TextEdit::~TextEdit() { } void TextEdit::zoomIn() { setFontSize(editor->font().pointSize()+1,FALSE); } void TextEdit::zoomOut() { setFontSize(editor->font().pointSize()-1,TRUE); } void TextEdit::setFontSize(int sz, bool round_down_not_up) { int s=10; for (int i=0; i<nfontsizes; i++) { if ( fontsize[i] == sz ) { s = sz; break; } else if ( round_down_not_up ) { if ( fontsize[i] < sz ) s = fontsize[i]; } else { if ( fontsize[i] > sz ) { s = fontsize[i]; break; } } } QFont f = editor->font(); f.setPointSize(s); editor->setFont(f); zin->setEnabled(s != fontsize[nfontsizes-1]); zout->setEnabled(s != fontsize[0]); } void TextEdit::setBold(bool y) { QFont f = editor->font(); f.setBold(y); editor->setFont(f); } void TextEdit::setItalic(bool y) { QFont f = editor->font(); f.setItalic(y); editor->setFont(f); } void TextEdit::setWordWrap(bool y) { bool state = editor->edited(); editor->setWordWrap(y ? QMultiLineEdit::WidgetWidth : QMultiLineEdit::NoWrap ); editor->setEdited( state ); } void TextEdit::fileNew() { // if( !bFromDocView ) { // saveAs(); // } newFile(DocLnk()); } void TextEdit::fileOpen() { Config cfg("TextEdit"); cfg.setGroup("View"); bool b=FALSE; // if(cfg.readEntry("useOldFileDialog") == "TRUE") // b=TRUE; // if(!b) { - QString str = OFileDialog::getOpenFileName( 1,"/")://,"", "*", this ); + QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); if(!str.isEmpty() ) openFile( str ); // } else { // QString str; // browseForFiles = new fileBrowser(this,tr("Open File"),TRUE,0, "*"); // // browseForFiles->setFileView( viewSelection ); // browseForFiles->showMaximized(); // // if( result != -1 ) // if( browseForFiles->exec() != -1 ) { // QString selFile = browseForFiles->selectedFileName; // QStringList fileList = browseForFiles->fileList; // qDebug(selFile); // QStringList::ConstIterator f; // QString fileTemp; // for ( f = fileList.begin(); f != fileList.end(); f++ ) { // fileTemp = *f; // fileTemp.right( fileTemp.length()-5); // QString fileName = fileTemp; // if( fileName != "Unnamed" || fileName != "Empty Text" ) { // currentFileName = fileName; // qDebug("please open "+currentFileName); // openFile(currentFileName ); // } // } // viewSelection = browseForFiles->SelectionCombo->currentItem(); // } // delete browseForFiles; // editor->setEdited( FALSE); // edited1=FALSE; // edited=FALSE; // if(caption().left(1)=="*") // setCaption(caption().right(caption().length()-1)); // doSearchBar(); // } } void TextEdit::doSearchBar() { Config cfg("TextEdit"); cfg.setGroup("View"); if(cfg.readEntry("SearchBar","Closed") != "Opened") searchBar->hide(); } #if 0 void TextEdit::slotFind() { FindDialog frmFind( tr("Text Editor"), this ); connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), editor, SLOT(slotDoFind( const QString&,bool,bool))); //case sensitive, backwards, [category] connect( editor, SIGNAL(notFound()), &frmFind, SLOT(slotNotFound()) ); connect( editor, SIGNAL(searchWrapped()), &frmFind, SLOT(slotWrapAround()) ); frmFind.exec(); } #endif void TextEdit::fileRevert() { clear(); fileOpen(); } void TextEdit::editCut() { #ifndef QT_NO_CLIPBOARD editor->cut(); #endif } void TextEdit::editCopy() { #ifndef QT_NO_CLIPBOARD editor->copy(); #endif } void TextEdit::editPaste() { #ifndef QT_NO_CLIPBOARD editor->paste(); #endif } void TextEdit::editFind() { searchBar->show(); searchVisible = TRUE; searchEdit->setFocus(); Config cfg("TextEdit"); cfg.setGroup("View"); cfg.writeEntry("SearchBar","Opened"); } void TextEdit::findNext() { editor->find( searchEdit->text(), FALSE, FALSE ); } void TextEdit::findClose() { searchVisible = FALSE; searchBar->hide(); Config cfg("TextEdit"); cfg.setGroup("View"); cfg.writeEntry("SearchBar","Closed"); cfg.write(); } void TextEdit::search() { editor->find( searchEdit->text(), FALSE, FALSE ); } void TextEdit::newFile( const DocLnk &f ) { DocLnk nf = f; |