author | harlekin <harlekin> | 2003-12-05 11:20:37 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-05 11:20:37 (UTC) |
commit | 2b37759fc317b5efd9b371210b16117f7d346455 (patch) (unidiff) | |
tree | f99beb5ff1c886f9b41a2d3a34300f8f121cf738 /core/pim/today/plugins/todolist/todopluginwidget.cpp | |
parent | 1ef5137234e2b7cd0be2a220a86d848503196269 (diff) | |
download | opie-2b37759fc317b5efd9b371210b16117f7d346455.zip opie-2b37759fc317b5efd9b371210b16117f7d346455.tar.gz opie-2b37759fc317b5efd9b371210b16117f7d346455.tar.bz2 |
today in HEAD up to date
Diffstat (limited to 'core/pim/today/plugins/todolist/todopluginwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginwidget.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/core/pim/today/plugins/todolist/todopluginwidget.cpp b/core/pim/today/plugins/todolist/todopluginwidget.cpp index 15081ec..0364f94 100644 --- a/core/pim/today/plugins/todolist/todopluginwidget.cpp +++ b/core/pim/today/plugins/todolist/todopluginwidget.cpp | |||
@@ -63,7 +63,14 @@ void TodolistPluginWidget::readConfig() { | |||
63 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); | 63 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); |
64 | } | 64 | } |
65 | 65 | ||
66 | void TodolistPluginWidget:: refresh() { | 66 | void TodolistPluginWidget:: refresh() { |
67 | todo->reload(); | ||
68 | getTodo(); | ||
69 | } | ||
70 | |||
71 | void TodolistPluginWidget::reinitialize() { | ||
72 | readConfig(); | ||
73 | todo->reload(); | ||
67 | getTodo(); | 74 | getTodo(); |
68 | } | 75 | } |
69 | 76 | ||
@@ -79,7 +86,7 @@ void TodolistPluginWidget::getTodo() { | |||
79 | int ammount = 0; | 86 | int ammount = 0; |
80 | 87 | ||
81 | // get overdue todos first | 88 | // get overdue todos first |
82 | m_list = todo->overDue(); | 89 | m_list = todo->sorted( true, 3, 2, 1); |
83 | 90 | ||
84 | for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) { | 91 | for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) { |
85 | if (!(*m_it).isCompleted() && ( ammount < m_maxLinesTask ) ) { | 92 | if (!(*m_it).isCompleted() && ( ammount < m_maxLinesTask ) ) { |
@@ -87,7 +94,7 @@ void TodolistPluginWidget::getTodo() { | |||
87 | if( desc.isEmpty() ) { | 94 | if( desc.isEmpty() ) { |
88 | desc = (*m_it).description(); | 95 | desc = (*m_it).description(); |
89 | } | 96 | } |
90 | tmpout += "<font color=#e00000><b>-" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>"; | 97 | tmpout += "<font color=#e00000><b>[" + QString("%1").arg((*m_it).priority() ) + "]" + desc.mid( 0, m_maxCharClip ) + "</b></font><br>"; |
91 | ammount++ ; | 98 | ammount++ ; |
92 | } | 99 | } |
93 | } | 100 | } |
@@ -104,7 +111,7 @@ void TodolistPluginWidget::getTodo() { | |||
104 | if( desc.isEmpty() ) { | 111 | if( desc.isEmpty() ) { |
105 | desc = (*m_it).description(); | 112 | desc = (*m_it).description(); |
106 | } | 113 | } |
107 | tmpout += "<b>-</b>" + desc.mid( 0, m_maxCharClip ) + "<br>"; | 114 | tmpout += "<b> [" + QString("%1").arg((*m_it).priority() ) + "] </b>" + desc.mid( 0, m_maxCharClip ) + "<br>"; |
108 | ammount++; | 115 | ammount++; |
109 | } | 116 | } |
110 | } | 117 | } |