on cfcde21 help sign in
unity8/tests/mocks/Unity/fake_expandablefilterwidget.cpp
53 lines 1.5 kB history raw
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 */
17#include "fake_expandablefilterwidget.h"
19#include "fake_filters.h"
21FakeExpandbleFilterWidget::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)
27 m_filters = new Filters(this);
30QString FakeExpandbleFilterWidget::filterId() const
32 return m_filterId;
35QString FakeExpandbleFilterWidget::filterTag() const
37 return m_filterTag;
40QString FakeExpandbleFilterWidget::title() const
42 return m_title;
45unity::shell::scopes::FiltersInterface* FakeExpandbleFilterWidget::filters() const
47 return m_filters;
50void FakeExpandbleFilterWidget::addFilter(unity::shell::scopes::FilterBaseInterface* f)
52 m_filters->addFilter(f);