Diffstat (limited to 'core/pim/todo/tableitems.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/tableitems.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/todo/tableitems.cpp b/core/pim/todo/tableitems.cpp index ebfefc8..86fe07d 100644 --- a/core/pim/todo/tableitems.cpp +++ b/core/pim/todo/tableitems.cpp | |||
@@ -39,25 +39,25 @@ CheckItem::CheckItem( QTable* t, | |||
39 | : OCheckItem(t, sortKey), m_uid(uid ), m_cat( lis ) | 39 | : OCheckItem(t, sortKey), m_uid(uid ), m_cat( lis ) |
40 | { | 40 | { |
41 | } | 41 | } |
42 | CheckItem::~CheckItem() { | 42 | CheckItem::~CheckItem() { |
43 | } | 43 | } |
44 | void CheckItem::setChecked( bool b ) { | 44 | void CheckItem::setChecked( bool b ) { |
45 | OCheckItem::setChecked(b); | 45 | OCheckItem::setChecked(b); |
46 | } | 46 | } |
47 | void CheckItem::toggle() { | 47 | void CheckItem::toggle() { |
48 | TableView* view = static_cast<TableView*>( table() ); | 48 | TableView* view = static_cast<TableView*>( table() ); |
49 | OTodo ev = view->find( view->current() ); | 49 | OTodo ev = view->find( view->current() ); |
50 | ev.setCompleted(!isChecked() ); | 50 | ev.setCompleted(!isChecked() ); |
51 | view->updateFromTable( ev ); | 51 | //view->updateFromTable( ev ); |
52 | 52 | ||
53 | OCheckItem::toggle(); | 53 | OCheckItem::toggle(); |
54 | table()->updateCell( row(), col() ); | 54 | table()->updateCell( row(), col() ); |
55 | } | 55 | } |
56 | int CheckItem::uid() const { | 56 | int CheckItem::uid() const { |
57 | return m_uid; | 57 | return m_uid; |
58 | } | 58 | } |
59 | QArray<int> CheckItem::cats() { | 59 | QArray<int> CheckItem::cats() { |
60 | return m_cat; | 60 | return m_cat; |
61 | } | 61 | } |
62 | 62 | ||
63 | /* ComboItem */ | 63 | /* ComboItem */ |
@@ -85,25 +85,25 @@ QWidget* ComboItem::createEditor()const { | |||
85 | return m_cb; | 85 | return m_cb; |
86 | } | 86 | } |
87 | void ComboItem::setContentFromEditor( QWidget* w) { | 87 | void ComboItem::setContentFromEditor( QWidget* w) { |
88 | TableView* view = static_cast<TableView*>( table() ); | 88 | TableView* view = static_cast<TableView*>( table() ); |
89 | OTodo ev = view->find( view->current() ); | 89 | OTodo ev = view->find( view->current() ); |
90 | 90 | ||
91 | if ( w->inherits( "QComboBox" ) ) | 91 | if ( w->inherits( "QComboBox" ) ) |
92 | setText( ( (QComboBox*)w )->currentText() ); | 92 | setText( ( (QComboBox*)w )->currentText() ); |
93 | else | 93 | else |
94 | QTableItem::setContentFromEditor( w ); | 94 | QTableItem::setContentFromEditor( w ); |
95 | 95 | ||
96 | ev.setPriority( text().toInt() ); | 96 | ev.setPriority( text().toInt() ); |
97 | view->updateFromTable( ev ); | 97 | //view->updateFromTable( ev ); |
98 | } | 98 | } |
99 | void ComboItem::setText( const QString& s ) { | 99 | void ComboItem::setText( const QString& s ) { |
100 | if ( m_cb ) | 100 | if ( m_cb ) |
101 | m_cb->setCurrentItem( s.toInt()-1 ); | 101 | m_cb->setCurrentItem( s.toInt()-1 ); |
102 | 102 | ||
103 | QTableItem::setText( s ); | 103 | QTableItem::setText( s ); |
104 | } | 104 | } |
105 | QString ComboItem::text()const { | 105 | QString ComboItem::text()const { |
106 | if ( m_cb) | 106 | if ( m_cb) |
107 | return m_cb->currentText(); | 107 | return m_cb->currentText(); |
108 | 108 | ||
109 | return QTableItem::text(); | 109 | return QTableItem::text(); |