swift
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
swift::gui::models::IModelFilter< ContainerType > Class Template Referenceabstract

Model filter interface. More...

Public Member Functions

 IModelFilter (bool enabled=true)
 Constructor.
 
virtual ~IModelFilter ()=default
 Destructor.
 
virtual ContainerType filter (const ContainerType &container) const =0
 Used container data.
 
bool isValid () const
 Anything to do?
 
virtual bool isEnabled () const
 Enabled?
 
void setEnabled (bool enable)
 Enabled?
 
virtual swift::misc::CVariant getAsValueObject () const
 Return an implementation-specific value object representing the filter.
 

Protected Member Functions

bool stringMatchesFilterExpression (const QString &value, const QString &filter, Qt::CaseSensitivity cs=Qt::CaseInsensitive) const
 Standard string search supporting wildcard at begin and end: "*xyz", "abc*".
 
QString stripWildcard (const QString &value) const
 Remove the * wildcards.
 

Protected Attributes

bool m_valid = false
 is filter valid?
 

Detailed Description

template<class ContainerType>
class swift::gui::models::IModelFilter< ContainerType >

Model filter interface.

Definition at line 20 of file modelfilter.h.


The documentation for this class was generated from the following files: