summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.pro6
-rw-r--r--core/pim/datebook/dateentryimpl.cpp1
-rw-r--r--core/pim/datebook/noteentry.ui28
-rw-r--r--core/pim/datebook/noteentryimpl.cpp1
-rw-r--r--core/pim/datebook/onoteedit.cpp19
-rw-r--r--core/pim/datebook/onoteedit.h19
6 files changed, 67 insertions, 7 deletions
diff --git a/core/pim/datebook/datebook.pro b/core/pim/datebook/datebook.pro
index 60c2b08..cf3ed30 100644
--- a/core/pim/datebook/datebook.pro
+++ b/core/pim/datebook/datebook.pro
@@ -9,26 +9,28 @@ HEADERS = datebookday.h \
9 datebooksettings.h \ 9 datebooksettings.h \
10 datebookweek.h \ 10 datebookweek.h \
11 datebookweeklst.h \ 11 datebookweeklst.h \
12 datebookweekheaderimpl.h \ 12 datebookweekheaderimpl.h \
13 repeatentry.h \ 13 repeatentry.h \
14 timepicker.h \ 14 timepicker.h \
15 noteentryimpl.h 15 noteentryimpl.h \
16 onoteedit.h
16 17
17 SOURCES= main.cpp \ 18 SOURCES= main.cpp \
18 datebookday.cpp \ 19 datebookday.cpp \
19 datebook.cpp \ 20 datebook.cpp \
20 dateentryimpl.cpp \ 21 dateentryimpl.cpp \
21 datebookdayheaderimpl.cpp \ 22 datebookdayheaderimpl.cpp \
22 datebooksettings.cpp \ 23 datebooksettings.cpp \
23 datebookweek.cpp \ 24 datebookweek.cpp \
24 datebookweeklst.cpp \ 25 datebookweeklst.cpp \
25 datebookweekheaderimpl.cpp \ 26 datebookweekheaderimpl.cpp \
26 repeatentry.cpp \ 27 repeatentry.cpp \
27 timepicker.cpp \ 28 timepicker.cpp \
28 noteentryimpl.cpp 29 noteentryimpl.cpp \
30 onoteedit.cpp
29 31
30 INTERFACES= dateentry.ui \ 32 INTERFACES= dateentry.ui \
31 datebookdayheader.ui \ 33 datebookdayheader.ui \
32 datebooksettingsbase.ui \ 34 datebooksettingsbase.ui \
33 datebookweekheader.ui \ 35 datebookweekheader.ui \
34 datebookweeklstheader.ui \ 36 datebookweeklstheader.ui \
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp
index 9cc5073..dab3375 100644
--- a/core/pim/datebook/dateentryimpl.cpp
+++ b/core/pim/datebook/dateentryimpl.cpp
@@ -38,12 +38,13 @@
38#include <qpopupmenu.h> 38#include <qpopupmenu.h>
39#include <qscrollview.h> 39#include <qscrollview.h>
40#include <qspinbox.h> 40#include <qspinbox.h>
41#include <qtoolbutton.h> 41#include <qtoolbutton.h>
42 42
43#include "timepicker.h" 43#include "timepicker.h"
44#include "onoteedit.h"
44 45
45#include <stdlib.h> 46#include <stdlib.h>
46#include <stdio.h> 47#include <stdio.h>
47 48
48/* 49/*
49 * Constructs a DateEntry which is a child of 'parent', with the 50 * Constructs a DateEntry which is a child of 'parent', with the
diff --git a/core/pim/datebook/noteentry.ui b/core/pim/datebook/noteentry.ui
index ce3c4ad..0bea06e 100644
--- a/core/pim/datebook/noteentry.ui
+++ b/core/pim/datebook/noteentry.ui
@@ -50,19 +50,37 @@
50 </property> 50 </property>
51 <property> 51 <property>
52 <name>hAlign</name> 52 <name>hAlign</name>
53 </property> 53 </property>
54 </widget> 54 </widget>
55 <widget> 55 <widget>
56 <class>QMultiLineEdit</class> 56 <class>ONoteEdit</class>
57 <property stdset="1"> 57 <property stdset="1">
58 <name>name</name> 58 <name>name</name>
59 <cstring>note</cstring> 59 <cstring>note</cstring>
60 </property> 60 </property>
61 <property stdset="1">
62 <name>wordWrap</name>
63 <enum>WidgetWidth</enum>
64 </property>
65 </widget> 61 </widget>
66 </vbox> 62 </vbox>
67</widget> 63</widget>
64<customwidgets>
65 <customwidget>
66 <class>ONoteEdit</class>
67 <header location="local">onoteedit.h</header>
68 <sizehint>
69 <width>-1</width>
70 <height>-1</height>
71 </sizehint>
72 <container>0</container>
73 <sizepolicy>
74 <hordata>7</hordata>
75 <verdata>7</verdata>
76 </sizepolicy>
77 <pixmap>image0</pixmap>
78 </customwidget>
79</customwidgets>
80<images>
81 <image>
82 <name>image0</name>
83 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1ddec44f503c0ae2a154410f53d0ed20e2bf6bdb656dd6861dd23d9a66591b0587fd1654235ebded6f0edcd53e419d87ae7b1f4f9b8f906d0bfe012317426a70b07bdc2f3ec77f8ed6b89559061a0343d06a124cc105596482585094bc0ae599b04646c9018926491b2205e140c485cace25755c175d0a967b622ff900b8cc9c7d29af594ea722d589167f813aa852ba07d94b9dce296e883fe7bb163f23896753</data>
84 </image>
85</images>
68</UI> 86</UI>
diff --git a/core/pim/datebook/noteentryimpl.cpp b/core/pim/datebook/noteentryimpl.cpp
index 9e1abb9..0e45985 100644
--- a/core/pim/datebook/noteentryimpl.cpp
+++ b/core/pim/datebook/noteentryimpl.cpp
@@ -1,10 +1,11 @@
1#include "noteentryimpl.h" 1#include "noteentryimpl.h"
2#include "qstring.h" 2#include "qstring.h"
3#include "qmultilinedit.h" 3#include "qmultilinedit.h"
4#include "qlabel.h" 4#include "qlabel.h"
5#include "onoteedit.h"
5 6
6NoteEntry::NoteEntry(const QString &title, const QString &noteStr, 7NoteEntry::NoteEntry(const QString &title, const QString &noteStr,
7 QWidget* parent, const char* name, bool modal, 8 QWidget* parent, const char* name, bool modal,
8 WFlags fl) : 9 WFlags fl) :
9 NoteEntryBase(parent, name, modal, fl) { 10 NoteEntryBase(parent, name, modal, fl) {
10 11
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}
diff --git a/core/pim/datebook/onoteedit.h b/core/pim/datebook/onoteedit.h
new file mode 100644
index 0000000..2f71d0d
--- a/dev/null
+++ b/core/pim/datebook/onoteedit.h
@@ -0,0 +1,19 @@
1#ifndef ONOTEEDIT_H
2#define ONOTEEDIT_H
3
4#include <qmultilineedit.h>
5
6class ONoteEdit: public QMultiLineEdit {
7
8 Q_OBJECT
9
10 public:
11
12 ONoteEdit (QWidget * parent=0, const char * name=0);
13
14 protected:
15
16 virtual void newLine ();
17};
18
19#endif