summaryrefslogtreecommitdiff
path: root/core/pim/datebook/onoteedit.cpp
Unidiff
Diffstat (limited to 'core/pim/datebook/onoteedit.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/onoteedit.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/core/pim/datebook/onoteedit.cpp b/core/pim/datebook/onoteedit.cpp
new file mode 100644
index 0000000..d66ad86
--- a/dev/null
+++ b/core/pim/datebook/onoteedit.cpp
@@ -0,0 +1,19 @@
1#include "onoteedit.h"
2
3ONoteEdit::ONoteEdit (QWidget * parent, const char * name) :
4 QMultiLineEdit(parent,name) {
5 setDefaultTabStop(2);
6 setWordWrap(WidgetWidth);
7}
8
9// Copy indentation from previous line
10void ONoteEdit::newLine() {
11 int l,c;
12 getCursorPosition(&l,&c);
13 QString s=textLine(l);
14
15 insert("\n");
16
17 int i=0;
18 while (s[i]==' ' || s[i]=='\t') insert(QString(s[i])), i++;
19}