Lomiri Action API
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lomiri
action
lomiri-action.h
1
/* This file is part of lomiri-action-api
2
* Copyright 2013 Canonical Ltd.
3
*
4
* lomiri-action-api is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3,
6
* as published by the Free Software Foundation.
7
*
8
* lomiri-action-api is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranties of
10
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11
* PURPOSE. See the GNU Lesser General Public License for more details.
12
*
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*/
16
17
#ifndef LOMIRI_ACTION_ACTION
18
#define LOMIRI_ACTION_ACTION
19
20
namespace
lomiri {
21
namespace
action {
22
class
Action
;
23
}
24
}
25
26
#include <QObject>
27
#include <QVariant>
28
#include <QScopedPointer>
29
30
class
Q_DECL_EXPORT lomiri::
action::Action
:
public
QObject
31
{
32
Q_OBJECT
33
Q_DISABLE_COPY(
Action
)
34
Q_ENUMS(
Type
)
35
36
Q_PROPERTY(QString
name
37
READ
name
38
WRITE setName
39
NOTIFY nameChanged)
40
Q_PROPERTY(QString
text
41
READ
text
42
WRITE setText
43
NOTIFY textChanged)
44
Q_PROPERTY(QString
iconName
45
READ
iconName
46
WRITE setIconName
47
NOTIFY iconNameChanged)
48
Q_PROPERTY(QString
description
49
READ
description
50
WRITE setDescription
51
NOTIFY descriptionChanged)
52
Q_PROPERTY(QString
keywords
53
READ
keywords
54
WRITE setKeywords
55
NOTIFY keywordsChanged)
56
Q_PROPERTY(
bool
enabled
57
READ
enabled
58
WRITE setEnabled
59
NOTIFY enabledChanged)
60
Q_PROPERTY(lomiri::action::
Action
::
Type
parameterType
61
READ
parameterType
62
WRITE setParameterType
63
NOTIFY parameterTypeChanged)
64
65
public:
66
67
enum
Type
{
68
None
,
69
String
,
70
Integer
,
71
Bool
,
72
Real
73
};
74
75
explicit
Action
(QObject *parent = 0);
76
virtual
~Action
();
77
78
QString
name
()
const
;
79
void
setName(
const
QString &value);
80
81
QString
text
()
const
;
82
void
setText(
const
QString &value);
83
84
QString
iconName
()
const
;
85
void
setIconName(
const
QString &value);
86
87
QString
description
()
const
;
88
void
setDescription(
const
QString &value);
89
90
QString
keywords
()
const
;
91
void
setKeywords(
const
QString &value);
92
93
bool
enabled
()
const
;
94
void
setEnabled(
bool
value);
95
96
Type
parameterType
()
const
;
97
void
setParameterType(
Type
value);
98
99
public
slots:
100
void
trigger
(QVariant value = QVariant());
101
102
signals:
103
void
nameChanged(
const
QString &value);
104
void
textChanged(
const
QString &value);
105
void
iconNameChanged(
const
QString &value);
106
void
descriptionChanged(
const
QString &value);
107
void
keywordsChanged(
const
QString &value);
108
void
enabledChanged(
bool
value);
109
void
parameterTypeChanged(
lomiri::action::Action::Type
value);
110
111
void
triggered
(QVariant value);
112
113
private
:
114
class
Private;
115
QScopedPointer<Private> d;
116
};
117
Q_DECLARE_METATYPE(
lomiri::action::Action::Type
)
118
#endif
lomiri::action::Action
The main action class.
Definition
lomiri-action.h:31
lomiri::action::Action::Action
Action(QObject *parent=0)
Definition
lomiri-action.cpp:262
lomiri::action::Action::text
QString text
Definition
lomiri-action.h:37
lomiri::action::Action::enabled
bool enabled
Definition
lomiri-action.h:41
lomiri::action::Action::iconName
QString iconName
Definition
lomiri-action.h:38
lomiri::action::Action::trigger
void trigger(QVariant value=QVariant())
Definition
lomiri-action.cpp:406
lomiri::action::Action::keywords
QString keywords
Definition
lomiri-action.h:40
lomiri::action::Action::Type
Type
Available parameter types.
Definition
lomiri-action.h:46
lomiri::action::Action::None
@ None
Definition
lomiri-action.h:47
lomiri::action::Action::Integer
@ Integer
Definition
lomiri-action.h:49
lomiri::action::Action::Bool
@ Bool
Definition
lomiri-action.h:50
lomiri::action::Action::String
@ String
Definition
lomiri-action.h:48
lomiri::action::Action::Real
@ Real
Definition
lomiri-action.h:51
lomiri::action::Action::name
QString name
Definition
lomiri-action.h:36
lomiri::action::Action::description
QString description
Definition
lomiri-action.h:39
lomiri::action::Action::parameterType
lomiri::action::Action::Type parameterType
Definition
lomiri-action.h:42
lomiri::action::Action::triggered
void triggered(QVariant value)
Generated on
for Lomiri Action API by
1.17.0