Implemented selection of multiple sources

This commit is contained in:
brunoherbelin
2020-06-15 23:38:01 +02:00
parent bfdeb0b52f
commit 89fed033e9
10 changed files with 140 additions and 59 deletions

View File

@@ -14,6 +14,16 @@ void Selection::add(Source *s)
s->setMode(Source::ACTIVE);
}
void Selection::set(SourceList l)
{
clear();
for(auto it = l.begin(); it != l.end(); it++)
(*it)->setMode(Source::ACTIVE);
selection_ = l;
}
void Selection::add(SourceList l)
{
for(auto it = l.begin(); it != l.end(); it++)
@@ -65,3 +75,13 @@ bool Selection::contains (Source *s)
{
return (find(s) != selection_.end());
}
SourceList::iterator Selection::begin()
{
return selection_.begin();
}
SourceList::iterator Selection::end()
{
return selection_.end();
}