Fri, 13 Dec 2019 15:55:56 +0200
added teapot rendering
#include "uiutilities.h" QVector<QAction*> uiutilities::collectActions(QObject* subject) { QVector<QAction*> actions; for (QAction* action : subject->findChildren<QAction*>()) { if (not action->text().isEmpty() and action->data().isNull() and not action->objectName().isEmpty()) { actions.push_back(action); } } return actions; } uiutilities::KeySequenceMap uiutilities::makeKeySequenceMap(const QVector<QAction*>& actions) { KeySequenceMap result; for (QAction* action : actions) { result[action->objectName()] = action->shortcut(); } return result; }