-rw-r--r-- | core/pim/todo/mainwindow.cpp | 2 | ||||
-rw-r--r-- | core/pim/todo/todoentry.ui | 196 | ||||
-rw-r--r-- | core/pim/todo/todoentryimpl.cpp | 3 | ||||
-rw-r--r-- | core/pim/todo/todotable.cpp | 9 | ||||
-rw-r--r-- | core/pim/todo/todotable.h | 3 |
5 files changed, 142 insertions, 71 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index b7b1da0..1358f1c 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -596,3 +596,3 @@ void TodoWindow::slotBeam() connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); - QString description = c.description(); + QString description = c.summary(); ir->send( beamfile, description, "text/x-vCalendar" ); diff --git a/core/pim/todo/todoentry.ui b/core/pim/todo/todoentry.ui index c735e76..87ee68c 100644 --- a/core/pim/todo/todoentry.ui +++ b/core/pim/todo/todoentry.ui @@ -32,3 +32,3 @@ <y>0</y> - <width>249</width> + <width>245</width> <height>321</height> @@ -46,11 +46,2 @@ </property> - <vbox> - <property stdset="1"> - <name>margin</name> - <number>0</number> - </property> - <property stdset="1"> - <name>spacing</name> - <number>0</number> - </property> <widget> @@ -59,3 +50,12 @@ <name>name</name> - <cstring>Layout4</cstring> + <cstring>Layout3</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>1</x> + <y>25</y> + <width>243</width> + <height>17</height> + </rect> </property> @@ -74,3 +74,7 @@ <name>name</name> - <cstring>TextLabel2</cstring> + <cstring>TextLabel3</cstring> + </property> + <property stdset="1"> + <name>frameShape</name> + <enum>NoFrame</enum> </property> @@ -78,3 +82,3 @@ <name>text</name> - <string>Priority:</string> + <string>Category:</string> </property> @@ -82,52 +86,35 @@ <widget> - <class>QComboBox</class> - <item> - <property> - <name>text</name> - <string>1 - Very High</string> - </property> - </item> - <item> - <property> - <name>text</name> - <string>2 - High</string> - </property> - </item> - <item> - <property> - <name>text</name> - <string>3 - Normal</string> - </property> - </item> - <item> - <property> - <name>text</name> - <string>4 - Low</string> - </property> - </item> - <item> - <property> - <name>text</name> - <string>5 - Very Low</string> + <class>CategorySelect</class> + <property stdset="1"> + <name>name</name> + <cstring>comboCategory</cstring> </property> - </item> + </widget> + </hbox> + </widget> + <widget> + <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> - <cstring>comboPriority</cstring> + <cstring>Layout6</cstring> </property> <property stdset="1"> - <name>sizePolicy</name> - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>0</vsizetype> - </sizepolicy> + <name>geometry</name> + <rect> + <x>0</x> + <y>0</y> + <width>240</width> + <height>320</height> + </rect> </property> + <grid> <property stdset="1"> - <name>currentItem</name> - <number>2</number> + <name>margin</name> + <number>0</number> </property> - </widget> - </hbox> - </widget> - <widget> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget row="2" column="0" > <class>QLayoutWidget</class> @@ -135,3 +122,3 @@ <name>name</name> - <cstring>Layout3</cstring> + <cstring>Layout4</cstring> </property> @@ -150,7 +137,3 @@ <name>name</name> - <cstring>TextLabel3</cstring> - </property> - <property stdset="1"> - <name>frameShape</name> - <enum>NoFrame</enum> + <cstring>TextLabel1</cstring> </property> @@ -158,3 +141,3 @@ <name>text</name> - <string>Category:</string> + <string>Summary:</string> </property> @@ -162,6 +145,6 @@ <widget> - <class>CategorySelect</class> + <class>QLineEdit</class> <property stdset="1"> <name>name</name> - <cstring>comboCategory</cstring> + <cstring>lneSum</cstring> </property> @@ -170,3 +153,10 @@ </widget> - <widget> + <widget row="3" column="0" > + <class>QMultiLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>txtTodo</cstring> + </property> + </widget> + <widget row="1" column="0" > <class>QLayoutWidget</class> @@ -224,10 +214,80 @@ </widget> + <widget row="0" column="0" > + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout4</cstring> + </property> + <hbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> <widget> - <class>QMultiLineEdit</class> + <class>QLabel</class> <property stdset="1"> <name>name</name> - <cstring>txtTodo</cstring> + <cstring>TextLabel2</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Priority:</string> + </property> + </widget> + <widget> + <class>QComboBox</class> + <item> + <property> + <name>text</name> + <string>1 - Very High</string> </property> + </item> + <item> + <property> + <name>text</name> + <string>2 - High</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>3 - Normal</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>4 - Low</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>5 - Very Low</string> + </property> + </item> + <property stdset="1"> + <name>name</name> + <cstring>comboPriority</cstring> + </property> + <property stdset="1"> + <name>sizePolicy</name> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>0</vsizetype> + </sizepolicy> + </property> + <property stdset="1"> + <name>currentItem</name> + <number>2</number> + </property> + </widget> + </hbox> + </widget> + </grid> </widget> - </vbox> </widget> diff --git a/core/pim/todo/todoentryimpl.cpp b/core/pim/todo/todoentryimpl.cpp index 26a685c..dfaf9b4 100644 --- a/core/pim/todo/todoentryimpl.cpp +++ b/core/pim/todo/todoentryimpl.cpp @@ -2,2 +2,3 @@ ** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2002 zecke ** @@ -63,2 +64,3 @@ NewTaskDialog::NewTaskDialog( const ToDoEvent& task, QWidget *parent, txtTodo->setText( task.description() ); + lneSum->setText( task.summary() ); } @@ -134,2 +136,3 @@ ToDoEvent NewTaskDialog::todoEntry() todo.setDescription( txtTodo->text() ); + todo.setSummary( lneSum->text() ); diff --git a/core/pim/todo/todotable.cpp b/core/pim/todo/todotable.cpp index 52a3087..779b28c 100644 --- a/core/pim/todo/todotable.cpp +++ b/core/pim/todo/todotable.cpp @@ -574,2 +574,3 @@ void TodoTable::updateJournal( const ToDoEvent &todo, journal_action action ) buf += " Description=\"" + todo.description() + "\""; + buf += " Summary=\"" + todo.summary() + "\""; if(todo.hasDate() ) { @@ -612,4 +613,7 @@ void TodoTable::journalFreeReplaceEntry( const ToDoEvent &todo, int row ) { - QString strTodo; + QString strTodo = todo.summary(); + if( strTodo.isEmpty() ){ strTodo = todo.description().left(40).simplifyWhiteSpace(); + //todo.setSummary(strTodo ); + } if ( row == -1 ) { @@ -910,2 +914,5 @@ static ToDoEvent xmlToEvent( XMLElement *element ) event.setDescription( dummy ); + // summary + dummy = element->attribute("Summary" ); + event.setSummary( dummy ); // category diff --git a/core/pim/todo/todotable.h b/core/pim/todo/todotable.h index 7672f21..39e00d1 100644 --- a/core/pim/todo/todotable.h +++ b/core/pim/todo/todotable.h @@ -201,3 +201,4 @@ inline void TodoTable::insertIntoTable( ToDoEvent *todo, int row ) cmb->setText( QString::number( todo->priority() ) ); - QTableItem *ti = new TodoTextItem( this, todo->description().left(40).simplifyWhiteSpace() ); + QString sum = todo->summary(); + QTableItem *ti = new TodoTextItem( this, sum.isEmpty() ? todo->description().left(40).simplifyWhiteSpace() : sum ); ti->setReplaceable( false ); |