summaryrefslogtreecommitdiff
path: root/core/pim/todo/tableitems.cpp
authorzecke <zecke>2002-10-07 23:37:48 (UTC)
committer zecke <zecke>2002-10-07 23:37:48 (UTC)
commit626183d58f43f010f5cfb055f8582be0227ff59c (patch) (unidiff)
treead219a64b642fe63480f04cca7c37de4795c5e84 /core/pim/todo/tableitems.cpp
parentcdc6cad191b866d481085da1d05806afb5602b2c (diff)
downloadopie-626183d58f43f010f5cfb055f8582be0227ff59c.zip
opie-626183d58f43f010f5cfb055f8582be0227ff59c.tar.gz
opie-626183d58f43f010f5cfb055f8582be0227ff59c.tar.bz2
We're now using a home made painting of cells
This will theoretically speed up things Currently it's noticeable slower on SQL Cause we do up to 80 queries for 10 different items. As you see a cache could be the answer to these problems. The reason for custom drawing is speed and memory consumption. Take the unlikely case of 10.000 items We would have 40.000 QTableItem but would only show 40 of them at a time. The rest seems to be wasted
Diffstat (limited to 'core/pim/todo/tableitems.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/tableitems.cpp4
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
@@ -45,13 +45,13 @@ void CheckItem::setChecked( bool b ) {
45 OCheckItem::setChecked(b); 45 OCheckItem::setChecked(b);
46} 46}
47void CheckItem::toggle() { 47void 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}
56int CheckItem::uid() const { 56int CheckItem::uid() const {
57 return m_uid; 57 return m_uid;
@@ -91,13 +91,13 @@ void ComboItem::setContentFromEditor( QWidget* w) {
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}
99void ComboItem::setText( const QString& s ) { 99void 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 );