Diffstat (limited to 'core/pim/datebook/onoteedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/onoteedit.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/core/pim/datebook/onoteedit.cpp b/core/pim/datebook/onoteedit.cpp index d66ad86..a5f468d 100644 --- a/core/pim/datebook/onoteedit.cpp +++ b/core/pim/datebook/onoteedit.cpp | |||
@@ -1,19 +1,49 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | |||
4 | Copyright (C) Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | .>+-= | ||
8 | _;:, .> :=|. This program is free software; you can | ||
9 | .> <`_, > . <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, .._ License as published by the Free Software | ||
12 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
13 | ._= =} : or (at your option) any later version. | ||
14 | .%`+i> _;_. | ||
15 | .i_,=:_. -<s. This program is distributed in the hope that | ||
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. .:, . . . without even the implied warranty of | ||
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= = ; Library General Public License for more | ||
21 | ++= -. .` .: details. | ||
22 | : = ...= . :.=- | ||
23 | -. .:....=;==+<; You should have received a copy of the GNU | ||
24 | -_. . . )=. = Library General Public License along with | ||
25 | -- :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | */ | ||
30 | |||
1 | #include "onoteedit.h" | 31 | #include "onoteedit.h" |
2 | 32 | ||
3 | ONoteEdit::ONoteEdit (QWidget * parent, const char * name) : | 33 | ONoteEdit::ONoteEdit (QWidget * parent, const char * name) : |
4 | QMultiLineEdit(parent,name) { | 34 | QMultiLineEdit(parent,name) { |
5 | setDefaultTabStop(2); | 35 | setDefaultTabStop(2); |
6 | setWordWrap(WidgetWidth); | 36 | setWordWrap(WidgetWidth); |
7 | } | 37 | } |
8 | 38 | ||
9 | // Copy indentation from previous line | 39 | // Copy indentation from previous line |
10 | void ONoteEdit::newLine() { | 40 | void ONoteEdit::newLine() { |
11 | int l,c; | 41 | int l,c; |
12 | getCursorPosition(&l,&c); | 42 | getCursorPosition(&l,&c); |
13 | QString s=textLine(l); | 43 | QString s=textLine(l); |
14 | 44 | ||
15 | insert("\n"); | 45 | insert("\n"); |
16 | 46 | ||
17 | int i=0; | 47 | int i=0; |
18 | while (s[i]==' ' || s[i]=='\t') insert(QString(s[i])), i++; | 48 | while (s[i]==' ' || s[i]=='\t') insert(QString(s[i])), i++; |
19 | } | 49 | } |