~boiko/qmenumodel/fix_icon_uri

« back to all changes in this revision

Viewing changes to libqmenumodel/src/unitymenuactionevents.h

Added UnityMenuAction for "out-of-menu" actions.

Approved by Lars Uebernickel, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2013 Canonical Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU Lesser 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 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
 * Authors:
 
17
 *      Nicholas Dedekind <nick.dedekind@canonical.com
 
18
 */
 
19
 
 
20
#ifndef UNITYMENUACTIONEVENTS_H
 
21
#define UNITYMENUACTIONEVENTS_H
 
22
 
 
23
#include <QEvent>
 
24
#include <QVariant>
 
25
 
 
26
/* Event for a unitymenuaction add */
 
27
class UnityMenuActionAddEvent : public QEvent
 
28
{
 
29
public:
 
30
    static const QEvent::Type eventType;
 
31
    UnityMenuActionAddEvent(bool enabled, const QVariant& state);
 
32
 
 
33
    bool enabled;
 
34
    QVariant state;
 
35
};
 
36
 
 
37
/* Event for a unitymenuaction remove */
 
38
class UnityMenuActionRemoveEvent : public QEvent
 
39
{
 
40
public:
 
41
    static const QEvent::Type eventType;
 
42
    UnityMenuActionRemoveEvent();
 
43
};
 
44
 
 
45
/* Event for change in enabled value of a unitymenuaction */
 
46
class UnityMenuActionEnabledChangedEvent : public QEvent
 
47
{
 
48
public:
 
49
    static const QEvent::Type eventType;
 
50
    UnityMenuActionEnabledChangedEvent(bool enabled);
 
51
 
 
52
    int enabled;
 
53
};
 
54
 
 
55
/* Event for change in state value of a unitymenuaction */
 
56
class UnityMenuActionStateChangeEvent : public QEvent
 
57
{
 
58
public:
 
59
    static const QEvent::Type eventType;
 
60
    UnityMenuActionStateChangeEvent(const QVariant& state);
 
61
 
 
62
    QVariant state;
 
63
};
 
64
 
 
65
#endif //UNITYMENUACTIONEVENTS_H