@@ -110,6 +110,11 @@ UnityMenuModel* UnityMenuModelStack::tail() const
110 return !m_menuModels.isEmpty() ? m_menuModels.last()->model() : NULL;
110 return !m_menuModels.isEmpty() ? m_menuModels.last()->model() : NULL;
113+int UnityMenuModelStack::count() const
115+ return m_menuModels.count();
113void UnityMenuModelStack::push(UnityMenuModel* model, int index)
118void UnityMenuModelStack::push(UnityMenuModel* model, int index)
115 UnityMenuModelEntry* entry = new UnityMenuModelEntry(model, tail(), index);
120 UnityMenuModelEntry* entry = new UnityMenuModelEntry(model, tail(), index);
@@ -117,6 +122,7 @@ void UnityMenuModelStack::push(UnityMenuModel* model, int index)
118 m_menuModels << entry;
123 m_menuModels << entry;
119 Q_EMIT tailChanged(model);
124 Q_EMIT tailChanged(model);
125+ Q_EMIT countChanged(m_menuModels.count());
122UnityMenuModel* UnityMenuModelStack::pop()
128UnityMenuModel* UnityMenuModelStack::pop()
@@ -132,6 +138,7 @@ UnityMenuModel* UnityMenuModelStack::pop()
132 if (m_menuModels.isEmpty()) {
138 if (m_menuModels.isEmpty()) {
133 Q_EMIT headChanged(NULL);
139 Q_EMIT headChanged(NULL);
141+ Q_EMIT countChanged(m_menuModels.count());
136 return model;
143 return model;