Unity Action API
Main Page
Related Pages
Classes
Files
File List
All
Classes
Functions
Enumerations
Enumerator
Properties
Pages
include
unity
action
unity-action-manager.h
1
/* This file is part of unity-action-api
2
* Copyright 2013 Canonical Ltd.
3
*
4
* unity-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
* unity-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 UNITY_ACTION_MANAGER
18
#define UNITY_ACTION_MANAGER
19
20
namespace
unity {
21
namespace
action {
22
class
ActionManager;
23
class
ActionContext;
24
class
Action;
25
}
26
}
27
28
#include <QObject>
29
#include <QScopedPointer>
30
31
class
Q_DECL_EXPORT unity::
action::ActionManager
:
public
QObject
32
{
33
Q_OBJECT
34
Q_DISABLE_COPY(
ActionManager
)
35
36
Q_PROPERTY(
unity::action::ActionContext
*globalContext
37
READ globalContext)
38
39
public
:
40
41
explicit
ActionManager
(QObject *parent = 0);
42
virtual
~
ActionManager
();
43
44
Q_INVOKABLE
void
addAction
(
unity::action::Action
*action);
45
Q_INVOKABLE
void
removeAction
(
unity::action::Action
*action);
46
47
Q_INVOKABLE
unity::action::ActionContext
*globalContext();
48
49
Q_INVOKABLE
void
addLocalContext
(
unity::action::ActionContext
*context);
50
51
Q_INVOKABLE
void
removeLocalContext
(
unity::action::ActionContext
*context);
52
QSet<ActionContext *>
localContexts
()
const
;
53
54
QSet<Action *>
actions
()
const
;
55
56
signals:
57
void
localContextsChanged
();
58
void
actionsChanged
();
59
60
private
:
61
class
Private;
62
QScopedPointer<Private> d;
63
};
64
#endif
Generated on Tue Jul 16 2013 09:45:18 for Unity Action API by
1.8.4