20 #ifndef UNITYMENUMODELCACHE_H 21 #define UNITYMENUMODELCACHE_H 23 #include "unityindicatorsglobal.h" 28 #include <QSharedPointer> 32 class UNITYINDICATORS_EXPORT UnityMenuModelCache :
public QObject
36 UnityMenuModelCache(QObject*parent=
nullptr);
38 static UnityMenuModelCache* singleton();
40 virtual QSharedPointer<UnityMenuModel> model(
const QByteArray& path);
43 Q_INVOKABLE
virtual bool contains(
const QByteArray& path);
46 QHash<QByteArray, QSharedPointer<UnityMenuModel>> m_registry;
47 static QPointer<UnityMenuModelCache> theCache;
50 #endif // UNITYMENUMODELCACHE_H