20 #ifndef UNITYMENUMODELSTACK_H
21 #define UNITYMENUMODELSTACK_H
23 #include "unityindicatorsglobal.h"
28 class UnityMenuModelEntry;
36 class UNITYINDICATORS_EXPORT UnityMenuModelStack :
public QObject
39 Q_PROPERTY(UnityMenuModel* head READ head WRITE setHead NOTIFY headChanged)
40 Q_PROPERTY(UnityMenuModel* tail READ tail NOTIFY tailChanged)
41 Q_PROPERTY(
int count READ count NOTIFY countChanged)
43 UnityMenuModelStack(QObject*parent=
nullptr);
44 ~UnityMenuModelStack();
46 UnityMenuModel* head()
const;
47 void setHead(UnityMenuModel* model);
49 UnityMenuModel* tail()
const;
53 Q_INVOKABLE
void push(UnityMenuModel* model,
int menuIndex);
54 Q_INVOKABLE UnityMenuModel* pop();
57 void headChanged(UnityMenuModel* head);
58 void tailChanged(UnityMenuModel* tail);
59 void countChanged(
int count);
65 QList<UnityMenuModelEntry*> m_menuModels;
68 #endif // UNITYMENUMODELSTACK_H