File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class TOOLKIT_EXPORT ToolManager : public QObject
6565
6666signals:
6767 void toolAdded (Esri::ArcGISRuntime::Toolkit::AbstractTool* tool);
68+ void toolRemoved (const QString& toolName);
6869
6970private:
7071 ToolManager ();
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ void ToolManager::removeTool(AbstractTool* tool)
9191 {
9292 if (it.value () == tool)
9393 {
94+ emit toolRemoved (it.key ());
9495 m_tools.erase (it);
9596 return ;
9697 }
@@ -145,6 +146,28 @@ ToolManager::ToolsList::const_iterator ToolManager::end() const
145146 return m_tools.cend ();
146147}
147148
149+ /* !
150+ \fn void ToolManager::toolAdded(Esri::ArcGISRuntime::Toolkit::AbstractTool* tool);
151+ \brief The signal emitted when a tool has been added to the ToolManager.
152+
153+ \list
154+ \li \a tool - The tool that was added.
155+ \endlist
156+ */
157+
158+ /* !
159+ \fn void ToolManager::toolRemoved(const QString& toolName);
160+ \brief The signal emitted when a tool has been removed from the ToolManager.
161+
162+ \list
163+ \li \a toolName - The name of the tool that was removed.
164+ \endlist
165+
166+ The name of the tool is provided instead of a pointer to the tool
167+ like with \l toolAdded. This is for safety since the pointer may
168+ be invalid when the tool has been removed.
169+ */
170+
148171} // Toolkit
149172} // ArcGISRuntime
150173} // Esri
You can’t perform that action at this time.
0 commit comments