Debian Codegraph @

src/dbusmenutypes_p.h

raw symbols SCIP
1 /* This file is part of the dbusmenu-qt library
2 Copyright 2009 Canonical
3 Author: Aurelien Gateau <[email protected]>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License (LGPL) as published by the Free Software Foundation;
8 either version 2 of the License, or (at your option) any later
9 version.
10
11 This library 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 GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20 */
21 #ifndef DBUSMENUTYPES_P_H
22 #define DBUSMENUTYPES_P_H
23
24 // Qt
25 #include <QtCore/QList>
26 #include <QtCore/QStringList>
27 #include <QtCore/QVariant>
28
29 // Local
30 #include <dbusmenu_export.h>
31
32 class QDBusArgument;
33
34 //// DBusMenuItem
35 /**
36 * Internal struct used to communicate on DBus
37 */
38 struct DBUSMENU_EXPORT DBusMenuItem
39 {
40 int id;
41 QVariantMap properties;
42 };
43
44 Q_DECLARE_METATYPE(DBusMenuItem)
45
46 DBUSMENU_EXPORT QDBusArgument &operator<<(QDBusArgument &argument, const DBusMenuItem &item);
47 DBUSMENU_EXPORT const QDBusArgument &operator>>(const QDBusArgument &argument, DBusMenuItem &item);
48
49 typedef QList<DBusMenuItem> DBusMenuItemList;
50
51 Q_DECLARE_METATYPE(DBusMenuItemList)
52
53
54 //// DBusMenuItemKeys
55 /**
56 * Represents a list of keys for a menu item
57 */
58 struct DBUSMENU_EXPORT DBusMenuItemKeys
59 {
60 int id;
61 QStringList properties;
62 };
63
64 Q_DECLARE_METATYPE(DBusMenuItemKeys)
65
66 DBUSMENU_EXPORT QDBusArgument &operator<<(QDBusArgument &argument, const DBusMenuItemKeys &);
67 DBUSMENU_EXPORT const QDBusArgument &operator>>(const QDBusArgument &argument, DBusMenuItemKeys &);
68
69 typedef QList<DBusMenuItemKeys> DBusMenuItemKeysList;
70
71 Q_DECLARE_METATYPE(DBusMenuItemKeysList)
72
73 //// DBusMenuLayoutItem
74 /**
75 * Represents an item with its children. GetLayout() returns a
76 * DBusMenuLayoutItemList.
77 */
78 struct DBusMenuLayoutItem;
79 struct DBUSMENU_EXPORT DBusMenuLayoutItem
80 {
81 int id;
82 QVariantMap properties;
83 QList<DBusMenuLayoutItem> children;
84 };
85
86 Q_DECLARE_METATYPE(DBusMenuLayoutItem)
87
88 DBUSMENU_EXPORT QDBusArgument &operator<<(QDBusArgument &argument, const DBusMenuLayoutItem &);
89 DBUSMENU_EXPORT const QDBusArgument &operator>>(const QDBusArgument &argument, DBusMenuLayoutItem &);
90
91 typedef QList<DBusMenuLayoutItem> DBusMenuLayoutItemList;
92
93 Q_DECLARE_METATYPE(DBusMenuLayoutItemList)
94
95 void DBusMenuTypes_register();
96 #endif /* DBUSMENUTYPES_P_H */