~dandrader/unity8/surfaceDrawn

« back to all changes in this revision

Viewing changes to tests/mocks/Unity/fake_expandablefilterwidget.cpp

  • Committer: CI Train Bot
  • Author(s): Albert Astals Cid
  • Date: 2016-05-04 18:09:25 UTC
  • mfrom: (1944.15.9 expandable_filter)
  • Revision ID: ci-train-bot@canonical.com-20160504180925-cey9wa2qnkh0yahw
Expandable Filter Widget
Approved by: Andrea Cimitan, Pawel Stolowski

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2016 Canonical, Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
#include "fake_expandablefilterwidget.h"
 
18
 
 
19
#include "fake_filters.h"
 
20
 
 
21
FakeExpandbleFilterWidget::FakeExpandbleFilterWidget(const QString &id, const QString &tag, const QString &title, QObject* parent)
 
22
 : unity::shell::scopes::ExpandableFilterWidgetInterface(parent)
 
23
 , m_filterId(id)
 
24
 , m_filterTag(tag)
 
25
 , m_title(title)
 
26
{
 
27
    m_filters = new Filters(this);
 
28
}
 
29
 
 
30
QString FakeExpandbleFilterWidget::filterId() const
 
31
{
 
32
    return m_filterId;
 
33
}
 
34
 
 
35
QString FakeExpandbleFilterWidget::filterTag() const
 
36
{
 
37
    return m_filterTag;
 
38
}
 
39
 
 
40
QString FakeExpandbleFilterWidget::title() const
 
41
{
 
42
    return m_title;
 
43
}
 
44
 
 
45
unity::shell::scopes::FiltersInterface* FakeExpandbleFilterWidget::filters() const
 
46
{
 
47
    return m_filters;
 
48
}
 
49
 
 
50
void FakeExpandbleFilterWidget::addFilter(unity::shell::scopes::FilterBaseInterface* f)
 
51
{
 
52
    m_filters->addFilter(f);
 
53
}