automatically when data tree is changed.
\param on 'auto-update tree' flag value
+ \param updateImmediately if \c true, the tree is updated immediately;
+ otherwise the tree must be updated manually
\sa autoUpdate(), updateTree()
*/
-void SUIT_DataBrowser::setAutoUpdate( const bool on )
+void SUIT_DataBrowser::setAutoUpdate( const bool on, const bool updateImmediately )
{
SUIT_ProxyModel* m = qobject_cast<SUIT_ProxyModel*>( model() );
if ( m )
- m->setAutoUpdate( on );
+ m->setAutoUpdate( on, updateImmediately );
}
/*!
void setRoot( SUIT_DataObject* );
bool autoUpdate() const;
- void setAutoUpdate( const bool );
+ void setAutoUpdate( const bool, const bool = true );
void updateTree( SUIT_DataObject* = 0, const bool = true );
automatically when data tree is changed.
\param on 'auto-update tree' flag value
+ \param updateImmediately if \c true, the tree is updated immediately;
+ otherwise the tree must be updated manually
\sa autoUpdate(), updateTree()
*/
-void SUIT_TreeModel::setAutoUpdate( const bool on )
+void SUIT_TreeModel::setAutoUpdate( const bool on, const bool updateImmediately )
{
if ( myAutoUpdate == on )
return;
SUIT_DataObject::connect( SIGNAL( removed( SUIT_DataObject*, SUIT_DataObject* ) ),
this, SLOT( onRemoved( SUIT_DataObject*, SUIT_DataObject* ) ) );
- updateTree();
+ if ( updateImmediately )
+ updateTree();
}
}
automatically when data tree is changed.
\param on 'auto-update tree' flag value
+ \param updateImmediately if \c true, the tree is updated immediately;
+ otherwise the tree must be updated manually
\sa autoUpdate(), updateTree()
*/
-void SUIT_ProxyModel::setAutoUpdate( const bool on )
+void SUIT_ProxyModel::setAutoUpdate( const bool on, const bool updateImmediately )
{
if ( treeModel() )
- treeModel()->setAutoUpdate( on );
+ treeModel()->setAutoUpdate( on, updateImmediately );
}
/*!
void setAutoDeleteTree( const bool );
bool autoUpdate() const;
- void setAutoUpdate( const bool );
+ void setAutoUpdate( const bool, const bool = true );
virtual bool customSorting( const int ) const;
virtual bool lessThan( const QModelIndex& left, const QModelIndex& right ) const;
void setAutoDeleteTree( const bool );
bool autoUpdate() const;
- void setAutoUpdate( const bool );
+ void setAutoUpdate( const bool, const bool = true );
bool isSortingEnabled() const;