mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
refs #757, materialize filtered data
* menu item / flag * functions in view class * some minor formatting
This commit is contained in:
committed by
Roland Winklmeier
parent
c848d7ca61
commit
610dba2028
@@ -499,6 +499,25 @@ namespace BlackGui
|
||||
return this->m_container;
|
||||
}
|
||||
|
||||
template <typename ObjectType, typename ContainerType, bool UseCompare>
|
||||
const ContainerType &CListModelBase<ObjectType, ContainerType, UseCompare>::containerFiltered() const
|
||||
{
|
||||
return this->m_containerFiltered;
|
||||
}
|
||||
|
||||
template <typename ObjectType, typename ContainerType, bool UseCompare>
|
||||
const ContainerType &CListModelBase<ObjectType, ContainerType, UseCompare>::containerOrFilteredContainer() const
|
||||
{
|
||||
if (this->hasFilter())
|
||||
{
|
||||
return this->m_containerFiltered;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this->m_container;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename ObjectType, typename ContainerType, bool UseCompare>
|
||||
void CListModelBase<ObjectType, ContainerType, UseCompare>::push_back(const ObjectType &object)
|
||||
{
|
||||
@@ -585,19 +604,6 @@ namespace BlackGui
|
||||
return this->update(c, sort);
|
||||
}
|
||||
|
||||
template <typename ObjectType, typename ContainerType, bool UseCompare>
|
||||
const ContainerType &CListModelBase<ObjectType, ContainerType, UseCompare>::containerOrFilteredContainer() const
|
||||
{
|
||||
if (this->hasFilter())
|
||||
{
|
||||
return this->m_containerFiltered;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this->m_container;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename ObjectType, typename ContainerType, bool UseCompare>
|
||||
void CListModelBase<ObjectType, ContainerType, UseCompare>::updateFilteredContainer()
|
||||
{
|
||||
|
||||
@@ -37,7 +37,6 @@ class QMimeData;
|
||||
class QModelIndex;
|
||||
|
||||
namespace BlackMisc { class CWorker; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Models
|
||||
@@ -205,6 +204,9 @@ namespace BlackGui
|
||||
//! Used container data
|
||||
const ContainerType &container() const;
|
||||
|
||||
//! Used container data
|
||||
const ContainerType &containerFiltered() const;
|
||||
|
||||
//! Full container or cached filtered container as approproiate
|
||||
const ContainerType &containerOrFilteredContainer() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user