Showing the changes to interface/src/scripting/MenuScriptingInterface.h (1 of 44 files). Show all
Unified · Split
| @@ -0,0 +1,50 @@ | |||
| 1 | // | ||
| 2 | // MenuScriptingInterface.h | ||
| 3 | // hifi | ||
| 4 | // | ||
| 5 | // Created by Brad Hefta-Gaub on 2/25/14 | ||
| 6 | // Copyright (c) 2014 HighFidelity, Inc. All rights reserved. | ||
| 7 | // | ||
| 8 | |||
| 9 | #ifndef __hifi__MenuScriptingInterface__ | ||
| 10 | #define __hifi__MenuScriptingInterface__ | ||
| 11 | |||
| 12 | #include <QDebug> | ||
| 13 | #include <QMutex> | ||
| 14 | #include <QObject> | ||
| 15 | #include <QString> | ||
| 16 | |||
| 17 | #include "Menu.h" | ||
| 18 | #include <MenuItemProperties.h> | ||
| 19 | |||
| 20 | class MenuScriptingInterface : public QObject { | ||
| 21 | Q_OBJECT | ||
| 22 | MenuScriptingInterface() { }; | ||
| 23 | public: | ||
| 24 | static MenuScriptingInterface* getInstance(); | ||
| 25 | |||
| 26 | private slots: | ||
| 27 | friend class Menu; | ||
| 28 | void menuItemTriggered(); | ||
| 29 | |||
| 30 | public slots: | ||
| 31 | void addMenu(const QString& menuName); | ||
| 32 | void removeMenu(const QString& menuName); | ||
| 33 | |||
| 34 | void addSeparator(const QString& menuName, const QString& separatorName); | ||
| 35 | void removeSeparator(const QString& menuName, const QString& separatorName); | ||
| 36 | |||
| 37 | void addMenuItem(const MenuItemProperties& properties); | ||
| 38 | void addMenuItem(const QString& menuName, const QString& menuitem, const QString& shortcutKey); | ||
| 39 | void addMenuItem(const QString& menuName, const QString& menuitem); | ||
| 40 | |||
| 41 | void removeMenuItem(const QString& menuName, const QString& menuitem); | ||
| 42 | |||
| 43 | bool isOptionChecked(const QString& menuOption); | ||
| 44 | void setIsOptionChecked(const QString& menuOption, bool isChecked); | ||
| 45 | |||
| 46 | signals: | ||
| 47 | void menuItemEvent(const QString& menuItem); | ||
| 48 | }; | ||
| 49 | |||
| 50 | #endif /* defined(__hifi__MenuScriptingInterface__) */ | ||