My Project
Loading...
Searching...
No Matches
OptionSelectorFilterInterface.h
1/*
2 * Copyright (C) 2015 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 */
16
17#ifndef UNITY_SHELL_SCOPES_OPTIONSELECTORFILTERINTERFACE_H
18#define UNITY_SHELL_SCOPES_OPTIONSELECTORFILTERINTERFACE_H
19
20#include <unity/SymbolExport.h>
21
22#include "FilterBaseInterface.h"
23#include "OptionSelectorOptionsInterface.h"
24
25namespace unity
26{
27namespace shell
28{
29namespace scopes
30{
31
33{
34 Q_OBJECT
35
36public:
37 Q_PROPERTY(QString label READ label NOTIFY labelChanged)
38 Q_PROPERTY(bool multiSelect READ multiSelect NOTIFY multiSelectChanged)
39 Q_PROPERTY(unity::shell::scopes::OptionSelectorOptionsInterface* options READ options CONSTANT)
40
41 FiltersInterface::FilterType filterType() const override
42 {
43 return FiltersInterface::OptionSelectorFilter;
44 }
45
46 virtual QString label() const = 0;
47 virtual bool multiSelect() const = 0;
48 virtual OptionSelectorOptionsInterface* options() const = 0;
49
50Q_SIGNALS:
51 void labelChanged(const QString&);
52 void multiSelectChanged(bool);
53
54protected:
56 explicit OptionSelectorFilterInterface(QObject* parent = 0) : FilterBaseInterface(parent) {}
58};
59
60}
61
62}
63}
64
66
67#endif
Definition FilterBaseInterface.h:31
Definition OptionSelectorFilterInterface.h:33
Definition OptionSelectorOptionsInterface.h:31
Top-level namespace for all things Unity-related.
Definition Version.h:38