summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/todoentry.ui226
-rw-r--r--core/pim/todo/todoentryimpl.cpp4
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
@@ -29,9 +29,9 @@
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>245</width>
+ <width>429</width>
<height>321</height>
</rect>
</property>
<property stdset="1">
@@ -47,77 +47,75 @@
<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>
@@ -150,20 +148,89 @@
</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>
@@ -211,13 +278,13 @@
</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>
@@ -230,65 +297,74 @@
<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>
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
@@ -62,8 +62,9 @@ NewTaskDialog::NewTaskDialog( const ToDoEvent& task, QWidget *parent,
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
@@ -134,9 +135,10 @@ ToDoEvent NewTaskDialog::todoEntry()
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;
}