author | zecke <zecke> | 2002-10-07 23:37:48 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-07 23:37:48 (UTC) |
commit | 626183d58f43f010f5cfb055f8582be0227ff59c (patch) (side-by-side diff) | |
tree | ad219a64b642fe63480f04cca7c37de4795c5e84 /core/pim/todo/tableitems.cpp | |
parent | cdc6cad191b866d481085da1d05806afb5602b2c (diff) | |
download | opie-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
-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, : OCheckItem(t, sortKey), m_uid(uid ), m_cat( lis ) { } CheckItem::~CheckItem() { } void CheckItem::setChecked( bool b ) { OCheckItem::setChecked(b); } void CheckItem::toggle() { TableView* view = static_cast<TableView*>( table() ); OTodo ev = view->find( view->current() ); ev.setCompleted(!isChecked() ); - view->updateFromTable( ev ); + //view->updateFromTable( ev ); OCheckItem::toggle(); table()->updateCell( row(), col() ); } int CheckItem::uid() const { return m_uid; } QArray<int> CheckItem::cats() { return m_cat; } /* ComboItem */ @@ -85,25 +85,25 @@ QWidget* ComboItem::createEditor()const { return m_cb; } void ComboItem::setContentFromEditor( QWidget* w) { TableView* view = static_cast<TableView*>( table() ); OTodo ev = view->find( view->current() ); if ( w->inherits( "QComboBox" ) ) setText( ( (QComboBox*)w )->currentText() ); else QTableItem::setContentFromEditor( w ); ev.setPriority( text().toInt() ); - view->updateFromTable( ev ); + //view->updateFromTable( ev ); } void ComboItem::setText( const QString& s ) { if ( m_cb ) m_cb->setCurrentItem( s.toInt()-1 ); QTableItem::setText( s ); } QString ComboItem::text()const { if ( m_cb) return m_cb->currentText(); return QTableItem::text(); |