author | llornkcor <llornkcor> | 2002-03-19 00:25:30 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-19 00:25:30 (UTC) |
commit | fbe272267851eeda20bf48aee9a01ac4dd1143c2 (patch) (unidiff) | |
tree | eb2aaea05277d12e66c712c7d109c99c1e3f8f7d | |
parent | 342ac04976065864b351c6b36087a483a8932da7 (diff) | |
download | opie-fbe272267851eeda20bf48aee9a01ac4dd1143c2.zip opie-fbe272267851eeda20bf48aee9a01ac4dd1143c2.tar.gz opie-fbe272267851eeda20bf48aee9a01ac4dd1143c2.tar.bz2 |
added config entry
-rw-r--r-- | core/apps/textedit/textedit.cpp | 11 | ||||
-rw-r--r-- | core/apps/textedit/textedit.h | 3 | ||||
-rw-r--r-- | core/apps/textedit/textedit.pro | 4 |
3 files changed, 12 insertions, 6 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index d3f5fb4..f56d5d3 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -233,12 +233,13 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) | |||
233 | : QMainWindow( parent, name, f ), bFromDocView( FALSE ) | 233 | : QMainWindow( parent, name, f ), bFromDocView( FALSE ) |
234 | { | 234 | { |
235 | doc = 0; | 235 | doc = 0; |
236 | edited=FALSE; | 236 | edited=FALSE; |
237 | edited1=FALSE; | 237 | edited1=FALSE; |
238 | setToolBarsMovable( FALSE ); | 238 | setToolBarsMovable( FALSE ); |
239 | connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | ||
239 | 240 | ||
240 | setIcon( Resource::loadPixmap( "TextEditor" ) ); | 241 | setIcon( Resource::loadPixmap( "TextEditor" ) ); |
241 | 242 | ||
242 | QPEToolBar *bar = new QPEToolBar( this ); | 243 | QPEToolBar *bar = new QPEToolBar( this ); |
243 | bar->setHorizontalStretchable( TRUE ); | 244 | bar->setHorizontalStretchable( TRUE ); |
244 | menu = bar; | 245 | menu = bar; |
@@ -404,24 +405,28 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) | |||
404 | } else { | 405 | } else { |
405 | fileOpen(); | 406 | fileOpen(); |
406 | } | 407 | } |
407 | viewSelection = cfg.readNumEntry( "FileView", 0 ); | 408 | viewSelection = cfg.readNumEntry( "FileView", 0 ); |
408 | } | 409 | } |
409 | 410 | ||
410 | TextEdit::~TextEdit() | 411 | void TextEdit::cleanUp() |
411 | { | 412 | { |
412 | // save(); | 413 | // save(); |
413 | |||
414 | Config cfg("TextEdit"); | 414 | Config cfg("TextEdit"); |
415 | cfg.setGroup("View"); | 415 | cfg.setGroup("View"); |
416 | QFont f = editor->font(); | 416 | QFont f = editor->font(); |
417 | cfg.writeEntry("FontSize",f.pointSize()); | 417 | cfg.writeEntry("FontSize",f.pointSize()); |
418 | cfg.writeEntry("Bold",f.bold()); | 418 | cfg.writeEntry("Bold",f.bold()); |
419 | cfg.writeEntry("Italic",f.italic()); | 419 | cfg.writeEntry("Italic",f.italic()); |
420 | cfg.writeEntry("Wrap",editor->wordWrap() == QMultiLineEdit::WidgetWidth); | 420 | cfg.writeEntry("Wrap",editor->wordWrap() == QMultiLineEdit::WidgetWidth); |
421 | cfg.writeEntry( "FileView", viewSelection ); | 421 | cfg.writeEntry( "FileView", viewSelection ); |
422 | |||
423 | } | ||
424 | |||
425 | TextEdit::~TextEdit() | ||
426 | { | ||
422 | } | 427 | } |
423 | 428 | ||
424 | void TextEdit::zoomIn() | 429 | void TextEdit::zoomIn() |
425 | { | 430 | { |
426 | setFontSize(editor->font().pointSize()+1,FALSE); | 431 | setFontSize(editor->font().pointSize()+1,FALSE); |
427 | } | 432 | } |
diff --git a/core/apps/textedit/textedit.h b/core/apps/textedit/textedit.h index aca2933..a70b581 100644 --- a/core/apps/textedit/textedit.h +++ b/core/apps/textedit/textedit.h | |||
@@ -68,12 +68,13 @@ private slots: | |||
68 | void fileNew(); | 68 | void fileNew(); |
69 | void fileRevert(); | 69 | void fileRevert(); |
70 | void fileOpen(); | 70 | void fileOpen(); |
71 | void changeStartConfig(bool); | 71 | void changeStartConfig(bool); |
72 | bool save(); | 72 | bool save(); |
73 | bool saveAs(); | 73 | bool saveAs(); |
74 | void cleanUp(); | ||
74 | 75 | ||
75 | 76 | ||
76 | void editCut(); | 77 | void editCut(); |
77 | void editCopy(); | 78 | void editCopy(); |
78 | void editPaste(); | 79 | void editPaste(); |
79 | void editFind(); | 80 | void editFind(); |
@@ -108,12 +109,12 @@ private: | |||
108 | QpeEditor* editor; | 109 | QpeEditor* editor; |
109 | QToolBar *menu, *editBar, *searchBar; | 110 | QToolBar *menu, *editBar, *searchBar; |
110 | QLineEdit *searchEdit; | 111 | QLineEdit *searchEdit; |
111 | DocLnk *doc; | 112 | DocLnk *doc; |
112 | bool searchVisible; | 113 | bool searchVisible; |
113 | bool bFromDocView; | 114 | bool bFromDocView; |
114 | int viewSelection; | 115 | int viewSelection; |
115 | QAction *zin, *zout; | 116 | QAction *zin, *zout; |
116 | QString currentFileName; | 117 | QString currentFileName; |
117 | }; | 118 | }; |
118 | 119 | ||
119 | #endif | 120 | #endif |
diff --git a/core/apps/textedit/textedit.pro b/core/apps/textedit/textedit.pro index 1301aed..37ddf15 100644 --- a/core/apps/textedit/textedit.pro +++ b/core/apps/textedit/textedit.pro | |||
@@ -8,8 +8,8 @@ SOURCES = main.cpp textedit.cpp fileBrowser.cpp fontDialog.cpp fileSaver.cpp fil | |||
8 | INCLUDEPATH += $(OPIEDIR)/include | 8 | INCLUDEPATH += $(OPIEDIR)/include |
9 | DEPENDPATH += $(OPIEDIR)/include | 9 | DEPENDPATH += $(OPIEDIR)/include |
10 | LIBS += -lqpe | 10 | LIBS += -lqpe |
11 | 11 | ||
12 | TARGET = textedit | 12 | TARGET = textedit |
13 | 13 | ||
14 | TRANSLATIONS = ../i18n/de/textedit.ts | 14 | TRANSLATIONS += ../i18n/de/textedit.ts |
15 | TRANSLATIONS = ../i18n/pt_BR/textedit.ts | 15 | TRANSLATIONS += ../i18n/pt_BR/textedit.ts |