filter panel

This commit is contained in:
2019-03-21 21:48:46 +01:00
parent 354c6154e7
commit f8fa1a4c9e
13 changed files with 675 additions and 13 deletions
+37
View File
@@ -282,3 +282,40 @@ QStringList cLocationList::locationList()
szLocationList.sort(Qt::CaseInsensitive);
return(szLocationList);
}
bool cLocationList::contains(cLocation* const& lpLocation)
{
return(QList::contains(lpLocation));
}
bool cLocationList::contains(QList<qint32> idList, bool bAnd)
{
if(bAnd)
{
int found = 0;
for(QList<qint32>::iterator z = idList.begin();z != idList.end();z++)
{
for(cLocationList::iterator i = begin();i != end();i++)
{
if((*i)->id() == (*z))
{
found++;
break;
}
}
}
if(found == idList.count())
return(true);
return(false);
}
else
{
for(cLocationList::iterator i = begin();i != end();i++)
{
if(idList.contains((*i)->id()))
return(true);
}
return(false);
}
}