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/>.
20
#ifndef FILTEROPTION_H
21
#define FILTEROPTION_H
24
#include "listmodelwrapper.h"
31
#include <UnityCore/Filter.h>
33
class FilterOption : public QObject
37
Q_PROPERTY(QString id READ id NOTIFY idChanged)
38
Q_PROPERTY(QString name READ name NOTIFY nameChanged)
39
Q_PROPERTY(QString iconHint READ iconHint NOTIFY iconHintChanged)
40
Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged)
43
explicit FilterOption(unity::dash::FilterOption::Ptr unityFilterOption, QObject *parent = 0);
48
QString iconHint() const;
52
void setActive(bool active);
55
void idChanged(std::string);
56
void nameChanged(std::string);
57
void iconHintChanged(std::string);
58
void activeChanged(bool);
61
void setUnityFilterOption(unity::dash::FilterOption::Ptr unityFilterOption);
63
unity::dash::FilterOption::Ptr m_unityFilterOption;
66
Q_DECLARE_METATYPE(FilterOption*)
68
typedef ListModelWrapper<FilterOption, unity::dash::FilterOption::Ptr> FilterOptions;
69
Q_DECLARE_METATYPE(FilterOptions*)
71
#endif // FILTEROPTION_H