summaryrefslogtreecommitdiff
path: root/core/pim/todo/quickeditimpl.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/quickeditimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/quickeditimpl.cpp35
1 files changed, 21 insertions, 14 deletions
diff --git a/core/pim/todo/quickeditimpl.cpp b/core/pim/todo/quickeditimpl.cpp
index 9b54bdc..8d0a9fd 100644
--- a/core/pim/todo/quickeditimpl.cpp
+++ b/core/pim/todo/quickeditimpl.cpp
@@ -15,2 +15,9 @@ QuickEditImpl::QuickEditImpl( QWidget* parent, bool visible )
15 15
16 // Load priority icons
17 // TODO - probably should be done globally somewhere else
18 priority1 = Resource::loadPixmap( "todo/priority1" );
19 priority3 = Resource::loadPixmap( "todo/priority3" );
20 priority5 = Resource::loadPixmap( "todo/priority5" );
21
22
16 // TODO - come up with icons and replace text priority values 23 // TODO - come up with icons and replace text priority values
@@ -18,3 +25,3 @@ QuickEditImpl::QuickEditImpl( QWidget* parent, bool visible )
18 m_lbl->setMinimumWidth(15); 25 m_lbl->setMinimumWidth(15);
19 m_lbl->setText("3"); 26 m_lbl->setPixmap( priority3 );
20 connect(m_lbl, SIGNAL(clicked() ), this, SLOT(slotPrio()) ); 27 connect(m_lbl, SIGNAL(clicked() ), this, SLOT(slotPrio()) );
@@ -59,3 +66,3 @@ void QuickEditImpl::slotEnter() {
59 todo.setUid(1 ); // new uid 66 todo.setUid(1 ); // new uid
60 todo.setPriority( m_lbl->text().toInt() ); 67 todo.setPriority( m_state );
61 todo.setSummary( m_edit->text() ); 68 todo.setSummary( m_edit->text() );
@@ -71,16 +78,16 @@ void QuickEditImpl::slotEnter() {
71void QuickEditImpl::slotPrio() { 78void QuickEditImpl::slotPrio() {
72 m_state++; 79 m_state -= 2;
73 if (m_state > 2 ) 80 if ( m_state < 1 )
74 m_state = 0; 81 m_state = 5;
75 82
76 switch(m_state ) { 83 switch( m_state ) {
77 case 0: 84 case 1:
78 m_lbl->setText( "1" ); 85 m_lbl->setPixmap( priority1 );
79 break; 86 break;
80 case 2: 87 case 5:
81 m_lbl->setText( "5" ); 88 m_lbl->setPixmap( priority5 );
82 break; 89 break;
83 case 1: 90 case 3:
84 default: 91 default:
85 m_lbl->setText( "3"); 92 m_lbl->setPixmap( priority3 );
86 break; 93 break;
@@ -95,4 +102,4 @@ void QuickEditImpl::slotCancel() {
95void QuickEditImpl::reinit() { 102void QuickEditImpl::reinit() {
96 m_state = 1; 103 m_state = 3;
97 m_lbl->setText("3"); 104 m_lbl->setPixmap( priority3 );
98 m_edit->clear(); 105 m_edit->clear();