Commit 2547d9a7 authored by Eike Ziller's avatar Eike Ziller

Add ActionContainer::insertGroup

Change-Id: I1a7047e0ccc074bb38661ecd34e2c0e64469d843
Reviewed-by: default avatarJarek Kobus <jaroslaw.kobus@nokia.com>
parent 03aa6f82
......@@ -187,6 +187,18 @@ void ActionContainerPrivate::appendGroup(const Id &groupId)
m_groups.append(Group(groupId));
}
void ActionContainerPrivate::insertGroup(const Id &before, const Id &groupId)
{
QList<Group>::iterator it = m_groups.begin();
while (it != m_groups.end()) {
if (it->id == before) {
m_groups.insert(it, Group(groupId));
break;
}
++it;
}
}
QList<Group>::const_iterator ActionContainerPrivate::findGroup(const Id &groupId) const
{
QList<Group>::const_iterator it = m_groups.constBegin();
......
......@@ -68,6 +68,7 @@ public:
virtual QAction *insertLocation(const Id &group) const = 0;
virtual void appendGroup(const Id &group) = 0;
virtual void insertGroup(const Id &before, const Id &group) = 0;
virtual void addAction(Command *action, const Id &group = Id()) = 0;
virtual void addMenu(ActionContainer *menu, const Id &group = Id()) = 0;
virtual void addMenu(ActionContainer *before, ActionContainer *menu, const Id &group = Id()) = 0;
......
......@@ -61,6 +61,7 @@ public:
QAction *insertLocation(const Id &groupId) const;
void appendGroup(const Id &id);
void insertGroup(const Id &before, const Id &groupId);
void addAction(Command *action, const Id &group = Id());
void addMenu(ActionContainer *menu, const Id &group = Id());
void addMenu(ActionContainer *before, ActionContainer *menu, const Id &group = Id());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment