-rw-r--r-- | core/pim/todo/taskeditoroverviewimpl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pim/todo/taskeditoroverviewimpl.cpp b/core/pim/todo/taskeditoroverviewimpl.cpp index c10ad40..24b3386 100644 --- a/core/pim/todo/taskeditoroverviewimpl.cpp +++ b/core/pim/todo/taskeditoroverviewimpl.cpp | |||
@@ -17,64 +17,65 @@ TaskEditorOverViewImpl::TaskEditorOverViewImpl( QWidget* parent, const char* nam | |||
17 | : TaskEditorOverView( parent, name ) { | 17 | : TaskEditorOverView( parent, name ) { |
18 | init(); | 18 | init(); |
19 | } | 19 | } |
20 | TaskEditorOverViewImpl::~TaskEditorOverViewImpl() { | 20 | TaskEditorOverViewImpl::~TaskEditorOverViewImpl() { |
21 | } | 21 | } |
22 | void TaskEditorOverViewImpl::load( const OTodo& todo) { | 22 | void TaskEditorOverViewImpl::load( const OTodo& todo) { |
23 | /* | 23 | /* |
24 | * now that we're 'preloaded' we | 24 | * now that we're 'preloaded' we |
25 | * need to disable the buttons | 25 | * need to disable the buttons |
26 | * holding the dat | 26 | * holding the dat |
27 | */ | 27 | */ |
28 | btnDue-> setEnabled( FALSE ); | 28 | btnDue-> setEnabled( FALSE ); |
29 | btnComp-> setEnabled( FALSE ); | 29 | btnComp-> setEnabled( FALSE ); |
30 | btnStart->setEnabled( FALSE ); | 30 | btnStart->setEnabled( FALSE ); |
31 | 31 | ||
32 | 32 | ||
33 | QDate date = QDate::currentDate(); | 33 | QDate date = QDate::currentDate(); |
34 | QString str = TimeString::longDateString( date ); | 34 | QString str = TimeString::longDateString( date ); |
35 | 35 | ||
36 | emit recurranceEnabled( FALSE ); | 36 | emit recurranceEnabled( FALSE ); |
37 | ckbStart->setChecked( FALSE ); | 37 | ckbStart->setChecked( FALSE ); |
38 | btnStart->setText( str ); | 38 | btnStart->setText( str ); |
39 | 39 | ||
40 | ckbComp->setChecked( FALSE ); | 40 | ckbComp->setChecked( FALSE ); |
41 | btnComp->setText( str ); | 41 | btnComp->setText( str ); |
42 | 42 | ||
43 | cmbProgress->setCurrentItem( todo.progress()/20 ); | 43 | cmbProgress->setCurrentItem( todo.progress()/20 ); |
44 | cmbSum->insertItem( todo.summary(), 0 ); | 44 | cmbSum->insertItem( todo.summary(), 0 ); |
45 | cmbSum->setCurrentItem( 0 ); | 45 | cmbSum->setCurrentItem( 0 ); |
46 | 46 | ||
47 | ckbDue->setChecked( todo.hasDueDate() ); | 47 | ckbDue->setChecked( todo.hasDueDate() ); |
48 | btnDue->setText( TimeString::longDateString( todo.dueDate() ) ); | 48 | btnDue->setText( TimeString::longDateString( todo.dueDate() ) ); |
49 | btnDue->setEnabled( todo.hasDueDate() ); | ||
49 | 50 | ||
50 | cmbPrio->setCurrentItem( todo.priority() -1 ); | 51 | cmbPrio->setCurrentItem( todo.priority() -1 ); |
51 | ckbCompleted->setChecked( todo.isCompleted() ); | 52 | ckbCompleted->setChecked( todo.isCompleted() ); |
52 | 53 | ||
53 | comboCategory->setCategories( todo.categories(), "Todo List", tr("Todo List") ); | 54 | comboCategory->setCategories( todo.categories(), "Todo List", tr("Todo List") ); |
54 | 55 | ||
55 | } | 56 | } |
56 | void TaskEditorOverViewImpl::save( OTodo& to) { | 57 | void TaskEditorOverViewImpl::save( OTodo& to) { |
57 | qWarning("save it now"); | 58 | qWarning("save it now"); |
58 | if ( ckbDue->isChecked() ) { | 59 | if ( ckbDue->isChecked() ) { |
59 | to.setDueDate( m_due ); | 60 | to.setDueDate( m_due ); |
60 | to.setHasDueDate( true ); | 61 | to.setHasDueDate( true ); |
61 | }else | 62 | }else |
62 | to.setHasDueDate( false ); | 63 | to.setHasDueDate( false ); |
63 | if ( comboCategory->currentCategory() != -1 ) { | 64 | if ( comboCategory->currentCategory() != -1 ) { |
64 | QArray<int> arr = comboCategory->currentCategories(); | 65 | QArray<int> arr = comboCategory->currentCategories(); |
65 | to.setCategories( arr ); | 66 | to.setCategories( arr ); |
66 | } | 67 | } |
67 | to.setPriority( cmbPrio->currentItem() + 1 ); | 68 | to.setPriority( cmbPrio->currentItem() + 1 ); |
68 | to.setCompleted( ckbCompleted->isChecked() ); | 69 | to.setCompleted( ckbCompleted->isChecked() ); |
69 | to.setSummary( cmbSum->currentText() ); | 70 | to.setSummary( cmbSum->currentText() ); |
70 | to.setProgress( cmbProgress->currentItem() * 20 ); | 71 | to.setProgress( cmbProgress->currentItem() * 20 ); |
71 | } | 72 | } |
72 | /* | 73 | /* |
73 | * here we will init the basic view | 74 | * here we will init the basic view |
74 | * one Popup for each Date Button | 75 | * one Popup for each Date Button |
75 | * and some other signal and slots connection | 76 | * and some other signal and slots connection |
76 | */ | 77 | */ |
77 | void TaskEditorOverViewImpl::init() { | 78 | void TaskEditorOverViewImpl::init() { |
78 | QDate curDate = QDate::currentDate(); | 79 | QDate curDate = QDate::currentDate(); |
79 | m_start = m_comp = m_due = curDate; | 80 | m_start = m_comp = m_due = curDate; |
80 | QString str = TimeString::longDateString( curDate ); | 81 | QString str = TimeString::longDateString( curDate ); |