Showing the changes to interface/src/scripting/SelectionScriptingInterface.h (1 of 5 files). Show all
Unified · Split
| @@ -53,23 +53,33 @@ public: · 52 unmodified lines | |||
| 53 | Q_INVOKABLE void printList(const QString& listName); | 53 | Q_INVOKABLE void printList(const QString& listName); |
| 54 | Q_INVOKABLE bool removeListFromMap(const QString& listName); | 54 | Q_INVOKABLE bool removeListFromMap(const QString& listName); |
| 55 | 55 | ||
| 56 | Q_INVOKABLE bool addToSelectedItemsList(const QString& listName, const QUuid& avatarSessionID); | 56 | Q_INVOKABLE bool addToSelectedItemsList(const QString& listName, const QString& itemType, const QUuid& id); |
| 57 | Q_INVOKABLE bool removeFromSelectedItemsList(const QString& listName, const QUuid& avatarSessionID); | 57 | Q_INVOKABLE bool removeFromSelectedItemsList(const QString& listName, const QString& itemType, const QUuid& id); |
| 58 | 58 | ||
| 59 | Q_INVOKABLE bool addToSelectedItemsList(const QString& listName, const EntityItemID& entityID); | 59 | signals: |
| 60 | Q_INVOKABLE bool removeFromSelectedItemsList(const QString& listName, const EntityItemID& entityID); | 60 | void addedToSelectedItemsList(const QString& listName, const QString& itemType, const QUuid& id); |
| 61 | 61 | void removedFromSelectedItemsList(const QString& listName, const QString& itemType, const QUuid& id); | |
| 62 | Q_INVOKABLE bool addToSelectedItemsList(const QString& listName, const OverlayID& overlayID); | ||
| 63 | Q_INVOKABLE bool removeFromSelectedItemsList(const QString& listName, const OverlayID& overlayID); | ||
| 64 | 62 | ||
| 65 | private: | 63 | private: |
| 66 | AbstractViewStateInterface* _viewState; | ||
| 67 | QMap<QString, GameplayObjects> _selectedItemsListMap; | 64 | QMap<QString, GameplayObjects> _selectedItemsListMap; |
| 68 | 65 | ||
| 69 | template <class T> bool addToGameplayObjects(const QString& listName, T idToAdd); | 66 | template <class T> bool addToGameplayObjects(const QString& listName, T idToAdd); |
| 70 | template <class T> bool removeFromGameplayObjects(const QString& listName, T idToRemove); | 67 | template <class T> bool removeFromGameplayObjects(const QString& listName, T idToRemove); |
| 68 | }; | ||
| 69 | |||
| 70 | |||
| 71 | class SelectionToSceneHandler { | ||
| 72 | public: | ||
| 73 | SelectionToSceneHandler(); | ||
| 74 | void initialize(render::ScenePointer mainScene, const QString& listName); | ||
| 75 | |||
| 76 | public slots: | ||
| 77 | void addedToSelectedItemsList(const QString& listName, const QString& itemType, const QUuid& id); | ||
| 78 | void removedFromSelectedItemsList(const QString& listName, const QString& itemType, const QUuid& id); | ||
| 71 | 79 | ||
| 72 | void updateRendererSelectedList(const QString& listName); | 80 | private: |
| 81 | render::ScenePointer _mainScene; | ||
| 82 | QString _listName { "" }; | ||
| 73 | }; | 83 | }; |
| 74 | 84 | ||
| 75 | #endif // hifi_SelectionScriptingInterface_h | 85 | #endif // hifi_SelectionScriptingInterface_h |