mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 07:15:34 +08:00
Display number of table rows in tab
* countChanged event * applied in components
This commit is contained in:
@@ -83,6 +83,9 @@ namespace BlackGui
|
||||
//! Asynchronous update finished
|
||||
void asyncUpdateFinished();
|
||||
|
||||
//! Number of elements changed
|
||||
void rowCountChanged(int count);
|
||||
|
||||
protected slots:
|
||||
//! Helper method with template free signature
|
||||
//! \param variant container is transferred in variant
|
||||
@@ -113,7 +116,6 @@ namespace BlackGui
|
||||
Qt::SortOrder m_sortOrder; //!< sort order (asc/desc)
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* List model
|
||||
*/
|
||||
@@ -182,6 +184,15 @@ namespace BlackGui
|
||||
//! Remove object
|
||||
virtual void remove(const ObjectType &object);
|
||||
|
||||
//! \copydoc ContainerBase::removeIf
|
||||
template <class K0, class V0, class... KeysValues>
|
||||
int removeIf(K0 k0, V0 v0, KeysValues... keysValues)
|
||||
{
|
||||
int c = m_container.removeIf(BlackMisc::Predicates::MemberEqual(k0, v0, keysValues...));
|
||||
if (c > 0) { emit rowCountChanged(this->rowCount());}
|
||||
return c;
|
||||
}
|
||||
|
||||
//! Clear the list
|
||||
virtual void clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user