| 11 | namespace MenuIO |
| 12 | { |
| 13 | static QString buildString(QMenu *menu) |
| 14 | { |
| 15 | QString out; |
| 16 | |
| 17 | for (auto action : menu->actions()) |
| 18 | { |
| 19 | if (action->isSeparator()) |
| 20 | { |
| 21 | out += "separator;"; |
| 22 | } |
| 23 | else if (action->menu()) |
| 24 | { |
| 25 | out += action->menu()->property("tag").toString() + ";"; |
| 26 | } |
| 27 | else |
| 28 | { |
| 29 | out += action->property("tag").toString() + ";"; |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | return out; |
| 34 | } |
| 35 | |
| 36 | static QMenu* buildMenu(QMenu *options, |
| 37 | QString input, |