Diffstat (limited to 'noncore/apps/opie-write/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-write/mainwindow.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/noncore/apps/opie-write/mainwindow.cpp b/noncore/apps/opie-write/mainwindow.cpp index 90e1a70..aa03060 100644 --- a/noncore/apps/opie-write/mainwindow.cpp +++ b/noncore/apps/opie-write/mainwindow.cpp | |||
@@ -11,30 +11,34 @@ | |||
11 | ** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 11 | ** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
12 | ** PURPOSE. | 12 | ** PURPOSE. |
13 | ** | 13 | ** |
14 | ** email sales@trolltech.com for information about Qtopia License | 14 | ** email sales@trolltech.com for information about Qtopia License |
15 | ** Agreements. | 15 | ** Agreements. |
16 | ** | 16 | ** |
17 | ** Contact info@trolltech.com if any conditions of this licensing are | 17 | ** Contact info@trolltech.com if any conditions of this licensing are |
18 | ** not clear to you. | 18 | ** not clear to you. |
19 | ** | 19 | ** |
20 | **********************************************************************/ | 20 | **********************************************************************/ |
21 | 21 | ||
22 | #include "mainwindow.h" | 22 | #include "mainwindow.h" |
23 | |||
24 | /* OPIE */ | ||
25 | #include <opie2/odebug.h> | ||
23 | #include <qpe/fileselector.h> | 26 | #include <qpe/fileselector.h> |
24 | #include <qpe/applnk.h> | 27 | #include <qpe/applnk.h> |
25 | #include <qpe/resource.h> | 28 | #include <qpe/resource.h> |
26 | #include <qpe/fontdatabase.h> | 29 | #include <qpe/fontdatabase.h> |
30 | using namespace Opie::Core; | ||
27 | 31 | ||
28 | //#include "qspellchecker.h" | 32 | /* QT */ |
29 | #include "qtextedit.h" | 33 | #include "qtextedit.h" |
30 | #include <qaction.h> | 34 | #include <qaction.h> |
31 | #include <qtoolbar.h> | 35 | #include <qtoolbar.h> |
32 | #include <qtoolbutton.h> | 36 | #include <qtoolbutton.h> |
33 | #include <qtabwidget.h> | 37 | #include <qtabwidget.h> |
34 | #include <qapplication.h> | 38 | #include <qapplication.h> |
35 | #include <qfontdatabase.h> | 39 | #include <qfontdatabase.h> |
36 | #include <qcombobox.h> | 40 | #include <qcombobox.h> |
37 | #include <qlineedit.h> | 41 | #include <qlineedit.h> |
38 | #include <qfileinfo.h> | 42 | #include <qfileinfo.h> |
39 | #include <qfile.h> | 43 | #include <qfile.h> |
40 | #include <qfiledialog.h> | 44 | #include <qfiledialog.h> |
@@ -435,56 +439,56 @@ void MainWindow::fileOpen() | |||
435 | { | 439 | { |
436 | save(); | 440 | save(); |
437 | editorStack->raiseWidget( fileSelector ); | 441 | editorStack->raiseWidget( fileSelector ); |
438 | fileSelector->reread(); | 442 | fileSelector->reread(); |
439 | hideEditTools(); | 443 | hideEditTools(); |
440 | fileSelector->setNewVisible( TRUE ); | 444 | fileSelector->setNewVisible( TRUE ); |
441 | clear(); | 445 | clear(); |
442 | updateCaption(); | 446 | updateCaption(); |
443 | } | 447 | } |
444 | 448 | ||
445 | void MainWindow::fileRevert() | 449 | void MainWindow::fileRevert() |
446 | { | 450 | { |
447 | qDebug( "QMainWindow::fileRevert needs to be done" ); | 451 | odebug << "QMainWindow::fileRevert needs to be done" << oendl; |
448 | } | 452 | } |
449 | 453 | ||
450 | void MainWindow::fileNew() | 454 | void MainWindow::fileNew() |
451 | { | 455 | { |
452 | editor->setTextFormat( Qt::RichText ); | 456 | editor->setTextFormat( Qt::RichText ); |
453 | save(); | 457 | save(); |
454 | newFile(DocLnk()); | 458 | newFile(DocLnk()); |
455 | } | 459 | } |
456 | 460 | ||
457 | void MainWindow::insertTable() | 461 | void MainWindow::insertTable() |
458 | { | 462 | { |
459 | qDebug( "MainWindow::insertTable() needs to be done" ); | 463 | odebug << "MainWindow::insertTable() needs to be done" << oendl; |
460 | } | 464 | } |
461 | 465 | ||
462 | void MainWindow::newFile( const DocLnk &dl ) | 466 | void MainWindow::newFile( const DocLnk &dl ) |
463 | { | 467 | { |
464 | DocLnk nf = dl; | 468 | DocLnk nf = dl; |
465 | nf.setType( "text/html" ); | 469 | nf.setType( "text/html" ); |
466 | clear(); | 470 | clear(); |
467 | editorStack->raiseWidget( editor ); | 471 | editorStack->raiseWidget( editor ); |
468 | editor->viewport()->setFocus(); | 472 | editor->viewport()->setFocus(); |
469 | doc = new DocLnk( nf ); | 473 | doc = new DocLnk( nf ); |
470 | updateCaption(); | 474 | updateCaption(); |
471 | } | 475 | } |
472 | 476 | ||
473 | void MainWindow::openFile( const DocLnk &dl ) | 477 | void MainWindow::openFile( const DocLnk &dl ) |
474 | { | 478 | { |
475 | FileManager fm; | 479 | FileManager fm; |
476 | QString txt; | 480 | QString txt; |
477 | if ( !fm.loadFile( dl, txt ) ) | 481 | if ( !fm.loadFile( dl, txt ) ) |
478 | qDebug( "couldn't open file" ); | 482 | odebug << "couldn't open file" << oendl; |
479 | clear(); | 483 | clear(); |
480 | editorStack->raiseWidget( editor ); | 484 | editorStack->raiseWidget( editor ); |
481 | editor->viewport()->setFocus(); | 485 | editor->viewport()->setFocus(); |
482 | doc = new DocLnk( dl ); | 486 | doc = new DocLnk( dl ); |
483 | editor->setText( txt ); | 487 | editor->setText( txt ); |
484 | editor->setModified( FALSE ); | 488 | editor->setModified( FALSE ); |
485 | updateCaption(); | 489 | updateCaption(); |
486 | } | 490 | } |
487 | 491 | ||
488 | void MainWindow::showEditTools( void ) | 492 | void MainWindow::showEditTools( void ) |
489 | { | 493 | { |
490 | tbMenu->show(); | 494 | tbMenu->show(); |