2 * Copyright (C) 2011 Canonical, Ltd.
5 * Florian Boucault <florian.boucault@canonical.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 3.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21#include "filteroption.h"
24#include <UnityCore/Filter.h>
26FilterOption::FilterOption(unity::dash::FilterOption::Ptr unityFilterOption, QObject *parent) :
27 QObject(parent), m_unityFilterOption(NULL)
29 setUnityFilterOption(unityFilterOption);
32QString FilterOption::id() const
34 return QString::fromStdString(m_unityFilterOption->id());
37QString FilterOption::name() const
39 return QString::fromStdString(m_unityFilterOption->name());
42QString FilterOption::iconHint() const
44 return QString::fromStdString(m_unityFilterOption->icon_hint());
47bool FilterOption::active() const
49 return m_unityFilterOption->active();
52void FilterOption::setActive(bool active)
54 m_unityFilterOption->active = active;
57void FilterOption::setUnityFilterOption(unity::dash::FilterOption::Ptr unityFilterOption)
59 if (m_unityFilterOption != NULL) {
60 // FIXME: should disconnect from m_unityFilterOption's signals
63 m_unityFilterOption = unityFilterOption;
65 /* Property change signals */
66 m_unityFilterOption->id.changed.connect(sigc::mem_fun(this, &FilterOption::idChanged));
67 m_unityFilterOption->name.changed.connect(sigc::mem_fun(this, &FilterOption::nameChanged));
68 m_unityFilterOption->icon_hint.changed.connect(sigc::mem_fun(this, &FilterOption::iconHintChanged));
69 m_unityFilterOption->active.changed.connect(sigc::mem_fun(this, &FilterOption::activeChanged));
72#include "filteroption.moc"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list