mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Some refactoring for model base / view base
* update by int index (row) * updateContainer renaming
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user