~ci-train-bot/unity8/unity8-ubuntu-zesty-2167

« back to all changes in this revision

Viewing changes to plugins/Unity/categoryfilter.h

  • Committer: Michał Sawicz
  • Date: 2013-06-05 22:03:08 UTC
  • Revision ID: michal.sawicz@canonical.com-20130605220308-yny8fv3futtr04fg
Inital unity8 commit.

Previous history can be found at https://code.launchpad.net/~unity-team/unity/phablet

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 Canonical, Ltd.
 
3
 *
 
4
 * Authors:
 
5
 *  Michał Sawicz <michal.sawicz@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
 */
 
19
 
 
20
#ifndef CATEGORY_FILTER_H
 
21
#define CATEGORY_FILTER_H
 
22
 
 
23
// Utils
 
24
#include "plugins/Utils/qsortfilterproxymodelqml.h"
 
25
 
 
26
class CategoryFilter : public QSortFilterProxyModelQML
 
27
{
 
28
    Q_OBJECT
 
29
 
 
30
    Q_PROPERTY(int index READ index WRITE setIndex NOTIFY indexChanged)
 
31
 
 
32
public:
 
33
    explicit CategoryFilter(QObject* parent = 0);
 
34
 
 
35
    /* getters */
 
36
    int index() const;
 
37
 
 
38
    /* setters */
 
39
    void setIndex(int index);
 
40
 
 
41
Q_SIGNALS:
 
42
    void indexChanged(int index);
 
43
 
 
44
private:
 
45
    int m_index;
 
46
};
 
47
 
 
48
#endif // CATEGORY_FILTER_H