Some refactoring for model base / view base

* update by int index (row)
* updateContainer renaming
This commit is contained in:
Klaus Basan
2014-08-02 22:19:55 +02:00
parent 9afc9024ca
commit f8774540f2
7 changed files with 26 additions and 13 deletions

View File

@@ -47,8 +47,8 @@ namespace BlackGui
//! Clear
void clear() { Q_ASSERT(this->m_model); this->m_model->clear(); }
//! Update
template<class ContainerType> int update(const ContainerType &container, bool resize = true)
//! Update whole container
template<class ContainerType> int updateContainer(const ContainerType &container, bool resize = true)
{
Q_ASSERT(this->m_model);
int c = this->m_model->update(container);
@@ -82,6 +82,13 @@ namespace BlackGui
return this->m_model->rowCount();
}
//! Column count
int columnCount() const
{
Q_ASSERT(this->m_model);
return this->m_model->columnCount();
}
//! Any data?
bool isEmpty() const
{