blob: d66ad8634438cc0ddfabc5655be676381b0cd3da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "onoteedit.h"
ONoteEdit::ONoteEdit (QWidget * parent, const char * name) :
QMultiLineEdit(parent,name) {
setDefaultTabStop(2);
setWordWrap(WidgetWidth);
}
// Copy indentation from previous line
void ONoteEdit::newLine() {
int l,c;
getCursorPosition(&l,&c);
QString s=textLine(l);
insert("\n");
int i=0;
while (s[i]==' ' || s[i]=='\t') insert(QString(s[i])), i++;
}
|