|
AvogadroApp
|
Public Member Functions | |
| void | addAction (const QStringList &path, QAction *action, int priority=-1) |
| void | buildMenuBar (QMenuBar *menuBar) |
| void | buildMenu (QMenu *menu, const QString &path) |
| void | print () |
| const QMap< QString, QList< QAction * > > & | getMenuActions () const |
| void addAction | ( | const QStringList & | path, |
| QAction * | action, | ||
| int | priority = -1 |
||
| ) |
Add a new action to the menu builder object.
| path | The menu path, where each element specifies a menu level. |
| action | The action that will be added at the path. |
| priority | The priority of the entry, higher will be at the top. |
| void buildMenuBar | ( | QMenuBar * | menuBar | ) |
Populate the supplied menu bar with the items added to builder. Ordering is attempted, ensuring File is first, Help is last and ordering by priority and then alphanumerically.
| menu | The menu to be populated. |
| void buildMenu | ( | QMenu * | menu, |
| const QString & | path | ||
| ) |
Populate a menu with the appropriate sub-entries.
| void print | ( | ) |
Print the contents of the MenuBuilder, intended for debug.
| const QMap< QString, QList< QAction * > > & getMenuActions | ( | ) | const |
Get the map of string to action lists.