51 changes: 51 additions & 0 deletions src/gui/qgisinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,29 @@ class GUI_EXPORT QgisInterface : public QObject
//! Add an icon to the plugins toolbar
virtual int addToolBarIcon( QAction *qAction ) = 0;

/**
* Add a widget to the plugins toolbar.
* To remove this widget again, call {@link removeToolBarIcon}
* with the returned QAction.
*
* @param widget widget to add. The toolbar will take ownership of this widget
* @return the QAction you can use to remove this widget from the toolbar
*/
virtual QAction* addToolBarWidget( QWidget* widget ) = 0;

//! Remove an action (icon) from the plugin toolbar
virtual void removeToolBarIcon( QAction *qAction ) = 0;

/**
* Add a widget to the raster toolbar.
* To remove this widget again, call {@link removeRasterToolBarIcon}
* with the returned QAction.
*
* @param widget widget to add. The toolbar will take ownership of this widget
* @return the QAction you can use to remove this widget from the toolbar
*/
virtual QAction* addRasterToolBarWidget( QWidget* widget ) = 0;

//! Add an icon to the Raster toolbar
//! @note added in 2.0
virtual int addRasterToolBarIcon( QAction *qAction ) = 0;
Expand All @@ -129,8 +149,19 @@ class GUI_EXPORT QgisInterface : public QObject

//! Add an icon to the Vector toolbar
//! @note added in 2.0

virtual int addVectorToolBarIcon( QAction *qAction ) = 0;

/**
* Add a widget to the vector toolbar.
* To remove this widget again, call {@link removeVectorToolBarIcon}
* with the returned QAction.
*
* @param widget widget to add. The toolbar will take ownership of this widget
* @return the QAction you can use to remove this widget from the toolbar
*/
virtual QAction* addVectorToolBarWidget( QWidget* widget ) = 0;

//! Remove an action (icon) from the Vector toolbar
//! @note added in 2.0
virtual void removeVectorToolBarIcon( QAction *qAction ) = 0;
Expand All @@ -139,6 +170,16 @@ class GUI_EXPORT QgisInterface : public QObject
//! @note added in 2.0
virtual int addDatabaseToolBarIcon( QAction *qAction ) = 0;

/**
* Add a widget to the database toolbar.
* To remove this widget again, call {@link removeDatabaseToolBarIcon}
* with the returned QAction.
*
* @param widget widget to add. The toolbar will take ownership of this widget
* @return the QAction you can use to remove this widget from the toolbar
*/
virtual QAction* addDatabaseToolBarWidget( QWidget* widget ) = 0;

//! Remove an action (icon) from the Database toolbar
//! @note added in 2.0
virtual void removeDatabaseToolBarIcon( QAction *qAction ) = 0;
Expand All @@ -147,6 +188,16 @@ class GUI_EXPORT QgisInterface : public QObject
//! @note added in 2.0
virtual int addWebToolBarIcon( QAction *qAction ) = 0;

/**
* Add a widget to the web toolbar.
* To remove this widget again, call {@link removeWebToolBarIcon}
* with the returned QAction.
*
* @param widget widget to add. The toolbar will take ownership of this widget
* @return the QAction you can use to remove this widget from the toolbar
*/
virtual QAction* addWebToolBarWidget( QWidget* widget ) = 0;

//! Remove an action (icon) from the Web toolbar
//! @note added in 2.0
virtual void removeWebToolBarIcon( QAction *qAction ) = 0;
Expand Down