summaryrefslogtreecommitdiff
path: root/core/pim/datebook
Unidiff
Diffstat (limited to 'core/pim/datebook') (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
@@ -1,52 +1,54 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 CONFIG += qt warn_on release 2 CONFIG += qt warn_on release
3 DESTDIR = $(OPIEDIR)/bin 3 DESTDIR = $(OPIEDIR)/bin
4 4
5 HEADERS= datebookday.h \ 5 HEADERS= datebookday.h \
6 datebook.h \ 6 datebook.h \
7 dateentryimpl.h \ 7 dateentryimpl.h \
8 datebookdayheaderimpl.h \ 8 datebookdayheaderimpl.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 \
35 datebookweeklstdayhdr.ui \ 37 datebookweeklstdayhdr.ui \
36 repeatentrybase.ui \ 38 repeatentrybase.ui \
37 noteentry.ui 39 noteentry.ui
38 40
39INCLUDEPATH += $(OPIEDIR)/include 41INCLUDEPATH += $(OPIEDIR)/include
40 DEPENDPATH+= $(OPIEDIR)/include 42 DEPENDPATH+= $(OPIEDIR)/include
41LIBS += -lqpe -lopie 43LIBS += -lqpe -lopie
42 44
43 TARGET = datebook 45 TARGET = datebook
44 46
45TRANSLATIONS = ../i18n/pt_BR/datebook.ts 47TRANSLATIONS = ../i18n/pt_BR/datebook.ts
46TRANSLATIONS += ../i18n/de/datebook.ts 48TRANSLATIONS += ../i18n/de/datebook.ts
47TRANSLATIONS += ../i18n/en/datebook.ts 49TRANSLATIONS += ../i18n/en/datebook.ts
48TRANSLATIONS += ../i18n/hu/datebook.ts 50TRANSLATIONS += ../i18n/hu/datebook.ts
49TRANSLATIONS += ../i18n/pl/datebook.ts 51TRANSLATIONS += ../i18n/pl/datebook.ts
50TRANSLATIONS += ../i18n/sl/datebook.ts 52TRANSLATIONS += ../i18n/sl/datebook.ts
51TRANSLATIONS += ../i18n/ja/datebook.ts 53TRANSLATIONS += ../i18n/ja/datebook.ts
52TRANSLATIONS += ../i18n/ko/datebook.ts 54TRANSLATIONS += ../i18n/ko/datebook.ts
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
@@ -20,48 +20,49 @@
20 20
21#include "dateentryimpl.h" 21#include "dateentryimpl.h"
22#include "repeatentry.h" 22#include "repeatentry.h"
23 23
24#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
25#include <qpe/categoryselect.h> 25#include <qpe/categoryselect.h>
26#include <qpe/datebookmonth.h> 26#include <qpe/datebookmonth.h>
27#include <qpe/global.h> 27#include <qpe/global.h>
28#include <qpe/timeconversion.h> 28#include <qpe/timeconversion.h>
29#include <qpe/timestring.h> 29#include <qpe/timestring.h>
30#include <qpe/tzselect.h> 30#include <qpe/tzselect.h>
31 31
32#include <qevent.h> 32#include <qevent.h>
33#include <qcheckbox.h> 33#include <qcheckbox.h>
34#include <qcombobox.h> 34#include <qcombobox.h>
35#include <qlayout.h> 35#include <qlayout.h>
36#include <qlineedit.h> 36#include <qlineedit.h>
37#include <qmultilineedit.h> 37#include <qmultilineedit.h>
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
50 * name 'name' and widget flags set to 'f' 51 * name 'name' and widget flags set to 'f'
51 * 52 *
52 * The dialog will by default be modeless, unless you set 'modal' to 53 * The dialog will by default be modeless, unless you set 'modal' to
53 * TRUE to construct a modal dialog. 54 * TRUE to construct a modal dialog.
54 */ 55 */
55 56
56DateEntry::DateEntry( bool startOnMonday, const QDateTime &start, 57DateEntry::DateEntry( bool startOnMonday, const QDateTime &start,
57 const QDateTime &end, bool whichClock, QWidget* parent, 58 const QDateTime &end, bool whichClock, QWidget* parent,
58 const char* name ) 59 const char* name )
59 : DateEntryBase( parent, name ), 60 : DateEntryBase( parent, name ),
60 ampm( whichClock ), 61 ampm( whichClock ),
61 startWeekOnMonday( startOnMonday ), 62 startWeekOnMonday( startOnMonday ),
62 m_showStart(true) 63 m_showStart(true)
63{ 64{
64 init(); 65 init();
65 setDates(start,end); 66 setDates(start,end);
66 setFocusProxy(comboDescription); 67 setFocusProxy(comboDescription);
67} 68}
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
@@ -32,37 +32,55 @@
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>0</number> 35 <number>0</number>
36 </property> 36 </property>
37 <widget> 37 <widget>
38 <class>QLabel</class> 38 <class>QLabel</class>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>name</name> 40 <name>name</name>
41 <cstring>eventLabel</cstring> 41 <cstring>eventLabel</cstring>
42 </property> 42 </property>
43 <property stdset="1"> 43 <property stdset="1">
44 <name>text</name> 44 <name>text</name>
45 <string>&lt;b&gt;1/10&lt;/b&gt; Lunch</string> 45 <string>&lt;b&gt;1/10&lt;/b&gt; Lunch</string>
46 </property> 46 </property>
47 <property stdset="1"> 47 <property stdset="1">
48 <name>alignment</name> 48 <name>alignment</name>
49 <set>AlignCenter</set> 49 <set>AlignCenter</set>
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,16 +1,17 @@
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
11 12
12 eventLabel->setText(title); 13 eventLabel->setText(title);
13 note->setText(noteStr); 14 note->setText(noteStr);
14 int l=note->length(); 15 int l=note->length();
15 note->setCursorPosition(l,l,false); 16 note->setCursorPosition(l,l,false);
16} 17}
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