12 CCountryFilter::CCountryFilter(
const QString &isoCode,
const QString &name)
13 : m_isoCode(isoCode.trimmed().toUpper()), m_name(name.trimmed())
15 this->
m_valid = !(this->m_isoCode.isEmpty() && this->m_name.isEmpty());
20 if (!this->
isValid()) {
return inContainer; }
23 for (
const CCountry &country : inContainer)
25 if (!m_isoCode.isEmpty())
27 if (country.getIsoCode() != m_isoCode) {
continue; }
31 if (!this->m_name.isEmpty())
virtual swift::misc::CCountryList filter(const swift::misc::CCountryList &inContainer) const
Used container data.
bool m_valid
is filter valid?
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*".
bool isValid() const
Anything to do?
Value object encapsulating a list of countries.
void push_back(const T &value)
Appends an element at the end of the sequence.
Models to be used with views, mainly QTableView.
Free functions in swift::misc.
T::const_iterator end(const LockFreeReader< T > &reader)
Non-member begin() and end() for so LockFree containers can be used in ranged for loops.