My Project
Loading...
Searching...
No Matches
ValueSliderValuesInterface.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_VALUESLIDERVALUESINTERFACE_H
18
#define UNITY_SHELL_SCOPES_VALUESLIDERVALUESINTERFACE_H
19
20
#include <unity/SymbolExport.h>
21
#include <QAbstractListModel>
22
23
namespace
unity
24
{
25
namespace
shell
26
{
27
namespace
scopes
28
{
29
30
class
UNITY_API
ValueSliderValuesInterface
:
public
QAbstractListModel
31
{
32
Q_OBJECT
33
34
public
:
35
enum
Roles {
36
RoleValue = Qt::UserRole + 1,
37
RoleLabel
38
};
39
Q_ENUM(Roles)
40
41
QHash<int, QByteArray> roleNames()
const override
42
{
43
QHash<int, QByteArray> roles;
44
roles[RoleValue] =
"value"
;
45
roles[RoleLabel] =
"label"
;
46
return
roles;
47
}
48
49
protected
:
51
explicit
ValueSliderValuesInterface
(QObject* parent = 0) : QAbstractListModel(parent) {}
53
};
54
55
}
56
}
57
}
58
59
Q_DECLARE_METATYPE(
unity::shell::scopes::ValueSliderValuesInterface
*)
60
61
#endif
unity::shell::scopes::ValueSliderValuesInterface
Definition
ValueSliderValuesInterface.h:31
unity
Top-level namespace for all things Unity-related.
Definition
Version.h:38
include
unity
shell
scopes
ValueSliderValuesInterface.h
Generated on Mon Apr 1 2024 05:18:45 for My Project by
1.9.8