2 * Copyright (C) 2016 Canonical, Ltd.
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.
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.
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/>.
17#ifndef APPLICATIONMENUREGISTRY_H
18#define APPLICATIONMENUREGISTRY_H
21#include <QDBusContext>
22#include <QDBusObjectPath>
25class MenuServicePath : public QObject
28 Q_PROPERTY(QByteArray service MEMBER m_service CONSTANT)
29 Q_PROPERTY(QByteArray menuPath MEMBER m_menuPath CONSTANT)
30 Q_PROPERTY(QByteArray actionPath MEMBER m_actionPath CONSTANT)
32 explicit MenuServicePath(const QByteArray &service,
33 const QByteArray &menuPath,
34 const QByteArray &actionPath)
36 , m_menuPath(menuPath)
37 , m_actionPath(actionPath)
40 const QByteArray m_service;
41 const QByteArray m_menuPath;
42 const QByteArray m_actionPath;
45class ApplicationMenuRegistry : public QObject
49 virtual ~ApplicationMenuRegistry();
52 Q_INVOKABLE QList<QObject*> getMenusForSurface(const QString &surfaceId);
55 void RegisterAppMenu(pid_t processId,
56 const QDBusObjectPath &menuObjectPath,
57 const QDBusObjectPath &actionObjectPath,
58 const QString &service);
59 void UnregisterAppMenu(pid_t processId, const QDBusObjectPath &menuObjectPath);
61 void RegisterSurfaceMenu(const QString &surfaceId,
62 const QDBusObjectPath &menuObjectPath,
63 const QDBusObjectPath &actionObjectPath,
64 const QString &service);
65 void UnregisterSurfaceMenu(const QString &surfaceId, const QDBusObjectPath &menuObjectPath);
68 void appMenuRegistered(pid_t processId);
69 void appMenuUnregistered(pid_t processId);
71 void surfaceMenuRegistered(const QString& surfaceId);
72 void surfaceMenuUnregistered(const QString& surfaceId);
75 explicit ApplicationMenuRegistry(QObject *parent = 0);
77 QMultiMap<pid_t, MenuServicePath*> m_appMenus;
78 QMultiMap<QString, MenuServicePath*> m_surfaceMenus;
81#endif // APPLICATIONMENUREGISTRY_H
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list