author | zecke <zecke> | 2002-06-16 16:34:50 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-16 16:34:50 (UTC) |
commit | 98f3588c957217c720779945a02bc01a164bfaa5 (patch) (side-by-side diff) | |
tree | fcf86a620f334d9354bd39cf2b436c5372de6d53 | |
parent | 3b8192d0f5a41c40092af48df8abc39aa3d1c355 (diff) | |
download | opie-98f3588c957217c720779945a02bc01a164bfaa5.zip opie-98f3588c957217c720779945a02bc01a164bfaa5.tar.gz opie-98f3588c957217c720779945a02bc01a164bfaa5.tar.bz2 |
Progress
-rw-r--r-- | core/pim/todo/todoentry.ui | 226 | ||||
-rw-r--r-- | core/pim/todo/todoentryimpl.cpp | 4 |
2 files changed, 154 insertions, 76 deletions
diff --git a/core/pim/todo/todoentry.ui b/core/pim/todo/todoentry.ui index 87ee68c..5da4bb7 100644 --- a/core/pim/todo/todoentry.ui +++ b/core/pim/todo/todoentry.ui @@ -9,181 +9,248 @@ ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** *********************************************************************</comment> <widget> <class>QDialog</class> <property stdset="1"> <name>name</name> <cstring>NewTaskDialogBase</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>245</width> + <width>429</width> <height>321</height> </rect> </property> <property stdset="1"> <name>caption</name> <string>New Task</string> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> - <cstring>Layout3</cstring> + <cstring>Layout22</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> - <x>1</x> - <y>25</y> - <width>243</width> - <height>17</height> + <x>0</x> + <y>5</y> + <width>240</width> + <height>310</height> </rect> </property> - <hbox> + <grid> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> - <widget> - <class>QLabel</class> - <property stdset="1"> - <name>name</name> - <cstring>TextLabel3</cstring> - </property> - <property stdset="1"> - <name>frameShape</name> - <enum>NoFrame</enum> - </property> - <property stdset="1"> - <name>text</name> - <string>Category:</string> - </property> - </widget> - <widget> - <class>CategorySelect</class> + <widget row="3" column="0" > + <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> - <cstring>comboCategory</cstring> + <cstring>Layout18</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>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel3</cstring> + </property> + <property stdset="1"> + <name>frameShape</name> + <enum>NoFrame</enum> + </property> + <property stdset="1"> + <name>text</name> + <string>Category:</string> + </property> + </widget> + <widget> + <class>CategorySelect</class> + <property stdset="1"> + <name>name</name> + <cstring>comboCategory</cstring> + </property> + <property stdset="1"> + <name>minimumSize</name> + <size> + <width>60</width> + <height>0</height> + </size> + </property> + </widget> + </hbox> </widget> - </hbox> - </widget> - <widget> - <class>QLayoutWidget</class> - <property stdset="1"> - <name>name</name> - <cstring>Layout6</cstring> - </property> - <property stdset="1"> - <name>geometry</name> - <rect> - <x>0</x> - <y>0</y> - <width>240</width> - <height>320</height> - </rect> - </property> - <grid> - <property stdset="1"> - <name>margin</name> - <number>0</number> - </property> - <property stdset="1"> - <name>spacing</name> - <number>6</number> - </property> - <widget row="2" column="0" > + <widget row="4" 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>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel1</cstring> </property> <property stdset="1"> <name>text</name> <string>Summary:</string> </property> </widget> <widget> <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>lneSum</cstring> </property> </widget> </hbox> </widget> - <widget row="3" column="0" > - <class>QMultiLineEdit</class> + <widget row="0" column="0" > + <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> - <cstring>txtTodo</cstring> + <cstring>Layout20</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>QLabel</class> + <property stdset="1"> + <name>name</name> + <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> <widget row="1" column="0" > <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> - <cstring>Layout4</cstring> + <cstring>Layout21</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>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>checkCompleted</cstring> </property> <property stdset="1"> <name>text</name> <string>&Completed</string> </property> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> @@ -191,124 +258,133 @@ <cstring>checkDate</cstring> </property> <property stdset="1"> <name>text</name> <string>D&ue</string> </property> </widget> <widget> <class>QPushButton</class> <property stdset="1"> <name>name</name> <cstring>buttonDate</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>text</name> <string>1 Jan 2001</string> </property> </widget> </hbox> </widget> - <widget row="0" column="0" > + <widget row="2" column="0" > <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> - <cstring>Layout4</cstring> + <cstring>Layout19</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>QLabel</class> <property stdset="1"> <name>name</name> - <cstring>TextLabel2</cstring> + <cstring>txtProg</cstring> </property> <property stdset="1"> <name>text</name> - <string>Priority:</string> + <string>Progress:</string> </property> </widget> <widget> <class>QComboBox</class> <item> <property> <name>text</name> - <string>1 - Very High</string> + <string>0%</string> </property> </item> <item> <property> <name>text</name> - <string>2 - High</string> + <string>20%</string> </property> </item> <item> <property> <name>text</name> - <string>3 - Normal</string> + <string>40%</string> </property> </item> <item> <property> <name>text</name> - <string>4 - Low</string> + <string>60%</string> </property> </item> <item> <property> <name>text</name> - <string>5 - Very Low</string> + <string>80%</string> + </property> + </item> + <item> + <property> + <name>text</name> + <string>100%</string> </property> </item> <property stdset="1"> <name>name</name> - <cstring>comboPriority</cstring> + <cstring>cmbProg</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> + <name>maximumSize</name> + <size> + <width>45</width> + <height>32767</height> + </size> </property> </widget> </hbox> </widget> + <widget row="5" column="0" > + <class>QMultiLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>txtTodo</cstring> + </property> + </widget> </grid> </widget> </widget> <customwidgets> <customwidget> <class>CategorySelect</class> <header location="global">qpe/categoryselect.h</header> <sizehint> <width>-1</width> <height>-1</height> </sizehint> <container>0</container> <sizepolicy> <hordata>7</hordata> <verdata>1</verdata> </sizepolicy> <pixmap>image0</pixmap> </customwidget> </customwidgets> <images> <image> <name>image0</name> <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> </image> diff --git a/core/pim/todo/todoentryimpl.cpp b/core/pim/todo/todoentryimpl.cpp index dfaf9b4..f8e2f4d 100644 --- a/core/pim/todo/todoentryimpl.cpp +++ b/core/pim/todo/todoentryimpl.cpp @@ -42,48 +42,49 @@ #include <qtimer.h> #include <qapplication.h> NewTaskDialog::NewTaskDialog( const ToDoEvent& task, QWidget *parent, const char *name, bool modal, WFlags fl ) : NewTaskDialogBase( parent, name, modal, fl ), todo( task ) { todo.setCategories( task.allCategories() ); if ( todo.hasDate() ) date = todo.date(); else date = QDate::currentDate(); init(); comboPriority->setCurrentItem( task.priority() - 1 ); checkCompleted->setChecked( task.isCompleted() ); checkDate->setChecked( task.hasDate() ); buttonDate->setText( TimeString::longDateString( date ) ); txtTodo->setText( task.description() ); lneSum->setText( task.summary() ); + cmbProg->setCurrentItem( task.progress()/20 ); } /* * Constructs a NewTaskDialog which is a child of 'parent', with the * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ NewTaskDialog::NewTaskDialog( int id, QWidget* parent, const char* name, bool modal, WFlags fl ) : NewTaskDialogBase( parent, name, modal, fl ), date( QDate::currentDate() ) { if ( id != -1 ) { QArray<int> ids( 1 ); ids[0] = id; todo.setCategory( Qtopia::Record::idsToString( ids ) ); } init(); } void NewTaskDialog::init() { @@ -114,43 +115,44 @@ void NewTaskDialog::dateChanged( int y, int m, int d ) } /*! */ ToDoEvent NewTaskDialog::todoEntry() { if( checkDate->isChecked() ){ todo.setDate( date ); todo.setHasDate( true ); }else{ todo.setHasDate( false ); } if ( comboCategory->currentCategory() != -1 ) { QArray<int> arr = comboCategory->currentCategories(); QStringList list; list = QStringList::split(";", Qtopia::Record::idsToString( arr )) ; todo.setCategories( list ); } todo.setPriority( comboPriority->currentItem() + 1 ); todo.setCompleted( checkCompleted->isChecked() ); todo.setDescription( txtTodo->text() ); todo.setSummary( lneSum->text() ); - + QString text = cmbProg->currentText(); + todo.setProgress( text.remove( text.length()-1, 1 ).toUShort() ); return todo; } /*! */ void NewTaskDialog::accept() { QString strText = txtTodo->text(); if ( strText.isEmpty() ) { // hmm... just decline it then, the user obviously didn't care about it QDialog::reject(); return; } QDialog::accept(); } |