summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/.cvsignore2
-rw-r--r--core/pim/datebook/datebook.pro9
-rw-r--r--core/pim/datebook/dateentry.ui13
-rw-r--r--core/pim/datebook/dateentryimpl.cpp26
-rw-r--r--core/pim/datebook/dateentryimpl.h4
-rw-r--r--core/pim/datebook/noteentry.ui68
-rw-r--r--core/pim/datebook/noteentryimpl.cpp16
-rw-r--r--core/pim/datebook/noteentryimpl.h18
8 files changed, 148 insertions, 8 deletions
diff --git a/core/pim/datebook/.cvsignore b/core/pim/datebook/.cvsignore
index d2e4975..74ec374 100644
--- a/core/pim/datebook/.cvsignore
+++ b/core/pim/datebook/.cvsignore
@@ -16 +16,3 @@ datebookweeklstheader.cpp
16datebookweeklstheader.h 16datebookweeklstheader.h
17noteentry.cpp
18noteentry.h
diff --git a/core/pim/datebook/datebook.pro b/core/pim/datebook/datebook.pro
index 9383053..60c2b08 100644
--- a/core/pim/datebook/datebook.pro
+++ b/core/pim/datebook/datebook.pro
@@ -13,3 +13,4 @@ HEADERS = datebookday.h \
13 repeatentry.h \ 13 repeatentry.h \
14 timepicker.h 14 timepicker.h \
15 noteentryimpl.h
15 16
@@ -25,3 +26,4 @@ SOURCES = main.cpp \
25 repeatentry.cpp \ 26 repeatentry.cpp \
26 timepicker.cpp 27 timepicker.cpp \
28 noteentryimpl.cpp
27 29
@@ -33,3 +35,4 @@ INTERFACES = dateentry.ui \
33 datebookweeklstdayhdr.ui \ 35 datebookweeklstdayhdr.ui \
34 repeatentrybase.ui 36 repeatentrybase.ui \
37 noteentry.ui
35 38
diff --git a/core/pim/datebook/dateentry.ui b/core/pim/datebook/dateentry.ui
index 1a712ec..fadbc35 100644
--- a/core/pim/datebook/dateentry.ui
+++ b/core/pim/datebook/dateentry.ui
@@ -491,5 +491,12 @@
491 </property> 491 </property>
492 <property stdset="1">
493 <name>sizePolicy</name>
494 <sizepolicy>
495 <hsizetype>7</hsizetype>
496 <vsizetype>0</vsizetype>
497 </sizepolicy>
498 </property>
492 </widget> 499 </widget>
493 <widget row="10" column="0" rowspan="1" colspan="4" > 500 <widget row="10" column="0" rowspan="1" colspan="4" >
494 <class>QMultiLineEdit</class> 501 <class>QToolButton</class>
495 <property stdset="1"> 502 <property stdset="1">
@@ -498,2 +505,6 @@
498 </property> 505 </property>
506 <property stdset="1">
507 <name>text</name>
508 <string>Note...</string>
509 </property>
499 </widget> 510 </widget>
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp
index c4f6c68..9cc5073 100644
--- a/core/pim/datebook/dateentryimpl.cpp
+++ b/core/pim/datebook/dateentryimpl.cpp
@@ -130,4 +130,4 @@ DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock,
130 checkAllDay->setChecked( event.type() == Event::AllDay ); 130 checkAllDay->setChecked( event.type() == Event::AllDay );
131 if(!event.notes().isEmpty()) 131 if(!event.notes().isEmpty()) noteStr=event.notes();
132 editNote->setText(event.notes()); 132 else noteStr="";
133 spinAlarm->setValue(event.alarmTime()); 133 spinAlarm->setValue(event.alarmTime());
@@ -212,2 +212,5 @@ void DateEntry::init()
212 this, SLOT(slotChangeStartOfWeek(bool)) ); 212 this, SLOT(slotChangeStartOfWeek(bool)) );
213
214 connect( editNote, SIGNAL(clicked()),
215 this, SLOT(slotEditNote()) );
213 216
@@ -222,3 +225,2 @@ void DateEntry::init()
222 this, SLOT( startTimePicked(const QTime &) )); 225 this, SLOT( startTimePicked(const QTime &) ));
223 editNote->setFixedVisibleLines(3);
224 // install eventFilters 226 // install eventFilters
@@ -240,2 +242,18 @@ DateEntry::~DateEntry()
240 */ 242 */
243
244void DateEntry::slotEditNote() {
245 QString s;
246 s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month());
247 NoteEntry noteDlg(s+comboDescription->currentText(), noteStr,
248 this,0,TRUE);
249
250#if defined(Q_WS_QWS) || defined(_WS_QWS_)
251 noteDlg.showMaximized();
252#endif
253 if (noteDlg.exec() ) {
254 noteStr=noteDlg.note->text();
255 }
256
257}
258
241void DateEntry::endDateChanged( int y, int m, int d ) 259void DateEntry::endDateChanged( int y, int m, int d )
@@ -457,3 +475,3 @@ Event DateEntry::event()
457 ev.setRepeat( TRUE, rp ); 475 ev.setRepeat( TRUE, rp );
458 ev.setNotes( editNote->text() ); 476 ev.setNotes( noteStr );
459 477
diff --git a/core/pim/datebook/dateentryimpl.h b/core/pim/datebook/dateentryimpl.h
index 4eb24b4..a3c4668 100644
--- a/core/pim/datebook/dateentryimpl.h
+++ b/core/pim/datebook/dateentryimpl.h
@@ -23,2 +23,3 @@
23#include "dateentry.h" 23#include "dateentry.h"
24#include "noteentryimpl.h"
24 25
@@ -57,2 +58,3 @@ public slots:
57 void slotChangeStartOfWeek( bool ); 58 void slotChangeStartOfWeek( bool );
59 void slotEditNote();
58 60
@@ -72,2 +74,4 @@ private:
72 bool m_showStart:1; 74 bool m_showStart:1;
75
76 QString noteStr;
73}; 77};
diff --git a/core/pim/datebook/noteentry.ui b/core/pim/datebook/noteentry.ui
new file mode 100644
index 0000000..ce3c4ad
--- a/dev/null
+++ b/core/pim/datebook/noteentry.ui
@@ -0,0 +1,68 @@
1<!DOCTYPE UI><UI>
2<class>NoteEntryBase</class>
3<widget>
4 <class>QDialog</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>NoteEntryBase</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>465</width>
15 <height>500</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Edit Note</string>
21 </property>
22 <property>
23 <name>layoutMargin</name>
24 </property>
25 <property>
26 <name>layoutSpacing</name>
27 </property>
28 <vbox>
29 <property stdset="1">
30 <name>margin</name>
31 <number>2</number>
32 </property>
33 <property stdset="1">
34 <name>spacing</name>
35 <number>0</number>
36 </property>
37 <widget>
38 <class>QLabel</class>
39 <property stdset="1">
40 <name>name</name>
41 <cstring>eventLabel</cstring>
42 </property>
43 <property stdset="1">
44 <name>text</name>
45 <string>&lt;b&gt;1/10&lt;/b&gt; Lunch</string>
46 </property>
47 <property stdset="1">
48 <name>alignment</name>
49 <set>AlignCenter</set>
50 </property>
51 <property>
52 <name>hAlign</name>
53 </property>
54 </widget>
55 <widget>
56 <class>QMultiLineEdit</class>
57 <property stdset="1">
58 <name>name</name>
59 <cstring>note</cstring>
60 </property>
61 <property stdset="1">
62 <name>wordWrap</name>
63 <enum>WidgetWidth</enum>
64 </property>
65 </widget>
66 </vbox>
67</widget>
68</UI>
diff --git a/core/pim/datebook/noteentryimpl.cpp b/core/pim/datebook/noteentryimpl.cpp
new file mode 100644
index 0000000..9e1abb9
--- a/dev/null
+++ b/core/pim/datebook/noteentryimpl.cpp
@@ -0,0 +1,16 @@
1#include "noteentryimpl.h"
2#include "qstring.h"
3#include "qmultilinedit.h"
4#include "qlabel.h"
5
6NoteEntry::NoteEntry(const QString &title, const QString &noteStr,
7 QWidget* parent, const char* name, bool modal,
8 WFlags fl) :
9 NoteEntryBase(parent, name, modal, fl) {
10
11
12 eventLabel->setText(title);
13 note->setText(noteStr);
14 int l=note->length();
15 note->setCursorPosition(l,l,false);
16}
diff --git a/core/pim/datebook/noteentryimpl.h b/core/pim/datebook/noteentryimpl.h
new file mode 100644
index 0000000..f3adfa6
--- a/dev/null
+++ b/core/pim/datebook/noteentryimpl.h
@@ -0,0 +1,18 @@
1#ifndef noteentryimpl_h
2#define noteentryimpl_h
3
4#include "noteentry.h"
5
6class QString;
7
8class NoteEntry : public NoteEntryBase
9{
10 Q_OBJECT
11
12public:
13 NoteEntry(const QString &title, const QString &noteStr,
14 QWidget* parent = 0, const char* name = 0,
15 bool modal=TRUE, WFlags fl=0);
16};
17
18#endif