2 * Copyright 2013 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 * Nick Dedekind <nick.dedekind@canonical.com>
20#ifndef UNITYMENUMODELSTACK_H
21#define UNITYMENUMODELSTACK_H
23#include "unityindicatorsglobal.h"
30// A LIFO queue for storing the current submenu of a UnityMenuModel.
31// The root menu model is set as the head, and each subsiquent submenu that is
32// opened can be pushed onto the queue.
33// The tail is set to the last item on the queue
34// Popping the queue will remove the last entry, and the tail be updated to the last item.
35class UNITYINDICATORS_EXPORT UnityMenuModelStack : public QObject
38 Q_PROPERTY(UnityMenuModel* head READ head WRITE setHead NOTIFY headChanged)
39 Q_PROPERTY(UnityMenuModel* tail READ tail NOTIFY tailChanged)
41 UnityMenuModelStack(QObject*parent=NULL);
42 ~UnityMenuModelStack();
44 UnityMenuModel* head() const;
45 void setHead(UnityMenuModel* model);
47 UnityMenuModel* tail() const;
49 Q_INVOKABLE void push(UnityMenuModel* model);
50 Q_INVOKABLE UnityMenuModel* pop();
53 void headChanged(UnityMenuModel* head);
54 void tailChanged(UnityMenuModel* tail);
57 QList<UnityMenuModel*> m_menuModels;
60#endif // UNITYMENUMODELSTACK_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