on eaeb180 help sign in
unity8/plugins/Unity/ratingfilteroption.cpp
62 lines 1.4 kB history raw
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * Authors:
5 * Pawel Stolowski <pawel.stolowski@canonical.com>
6 *
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.
10 *
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.
15 *
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/>.
18 */
20// self
21#include "ratingfilteroption.h"
23RatingFilterOption::RatingFilterOption(const QString &id, float value, QObject *parent) :
24 AbstractFilterOption(parent),
25 m_active(false),
26 m_id(id),
27 m_value(value)
31QString RatingFilterOption::id() const
33 return m_id;
36QString RatingFilterOption::name() const
38 return QString::Null();
41QString RatingFilterOption::iconHint() const
43 return QString::Null();
46float RatingFilterOption::value() const
48 return m_value;
51bool RatingFilterOption::active() const
53 return m_active;
56void RatingFilterOption::setActive(bool active)
58 if (active != m_active) {
59 m_active = active;
60 Q_EMIT activeChanged(m_active);
61 }