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 "radiooptionfilter.h"
23RadioOptionFilter::RadioOptionFilter(QObject *parent) :
24 Filter(parent), m_unityRadioOptionFilter(NULL), m_options(NULL)
28FilterOptions* RadioOptionFilter::options() const
33FilterOption* RadioOptionFilter::getOption(const QString& id) const
35 Q_FOREACH (FilterOption* option, m_options->rawList()) {
36 if (option->id() == id) {
43void RadioOptionFilter::setUnityFilter(unity::dash::Filter::Ptr filter)
45 Filter::setUnityFilter(filter);
46 m_unityRadioOptionFilter = std::dynamic_pointer_cast<unity::dash::RadioOptionFilter>(m_unityFilter);
48 onOptionsChanged(m_unityRadioOptionFilter->options);
51void RadioOptionFilter::onOptionsChanged(unity::dash::RadioOptionFilter::RadioOptions)
53 if (m_options != NULL) {
54 // FIXME: should disconnect from m_unityFilter's signals
58 m_options = new FilterOptions(m_unityRadioOptionFilter->options,
59 m_unityRadioOptionFilter->option_added,
60 m_unityRadioOptionFilter->option_removed);
61 /* Property change signals */
62 m_unityRadioOptionFilter->options.changed.connect(sigc::mem_fun(this, &RadioOptionFilter::onOptionsChanged));
64 Q_EMIT optionsChanged();
67#include "radiooptionfilter.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