Skip to content
Permalink
Browse files

[processing] Add Toolbox action to the main window toolbar

I realise this adds another toolbar button... but I'd strongly
argue that the toolbox is used FAR FAR more often than many of the
other toolbar actions!
  • Loading branch information
nyalldawson committed Jan 24, 2018
1 parent c41b2dd commit d60f00dc85623f4016944286ff2a903e1f79c9ad
@@ -342,6 +342,14 @@ Get access to the native Add ArcGIS MapServer action.
virtual QAction *actionPasteLayerStyle() = 0;
virtual QAction *actionOpenTable() = 0;
virtual QAction *actionOpenFieldCalculator() = 0;

virtual QAction *actionOpenStatisticalSummary() = 0;
%Docstring
Statistical summary action.

.. versionadded:: 3.0
%End

virtual QAction *actionToggleEditing() = 0;
virtual QAction *actionSaveActiveLayerEdits() = 0;
virtual QAction *actionAllEdits() = 0;
@@ -196,6 +196,7 @@ def initGui(self):
QgsApplication.getThemeIcon("/processingAlgorithm.svg"))
self.iface.registerMainWindowAction(self.toolboxAction, 'Ctrl+Alt+T')
self.toolboxAction.toggled.connect(self.openToolbox)
self.iface.attributesToolBar().insertAction(self.iface.actionOpenStatisticalSummary(), self.toolboxAction)
self.menu.addAction(self.toolboxAction)

self.modelerAction = QAction(
@@ -249,6 +250,7 @@ def openProcessingOptions(self):
def unload(self):
self.toolbox.setVisible(False)
self.iface.removeDockWidget(self.toolbox)
self.iface.attributesToolBar().removeAction(self.toolboxAction)

self.resultsDock.setVisible(False)
self.iface.removeDockWidget(self.resultsDock)
@@ -492,6 +492,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QAction *actionPasteLayerStyle() { return mActionPasteStyle; }
QAction *actionOpenTable() { return mActionOpenTable; }
QAction *actionOpenFieldCalculator() { return mActionOpenFieldCalc; }
QAction *actionStatisticalSummary() { return mActionStatisticalSummary; }
QAction *actionToggleEditing() { return mActionToggleEditing; }
QAction *actionSaveActiveLayerEdits() { return mActionSaveLayerEdits; }
QAction *actionAllEdits() { return mActionAllEdits; }
@@ -641,6 +641,7 @@ QAction *QgisAppInterface::actionCopyLayerStyle() { return qgis->actionCopyLayer
QAction *QgisAppInterface::actionPasteLayerStyle() { return qgis->actionPasteLayerStyle(); }
QAction *QgisAppInterface::actionOpenTable() { return qgis->actionOpenTable(); }
QAction *QgisAppInterface::actionOpenFieldCalculator() { return qgis->actionOpenFieldCalculator(); }
QAction *QgisAppInterface::actionOpenStatisticalSummary() { return qgis->actionStatisticalSummary(); }
QAction *QgisAppInterface::actionToggleEditing() { return qgis->actionToggleEditing(); }
QAction *QgisAppInterface::actionSaveActiveLayerEdits() { return qgis->actionSaveActiveLayerEdits(); }
QAction *QgisAppInterface::actionAllEdits() { return qgis->actionAllEdits(); }
@@ -445,6 +445,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
QAction *actionPasteLayerStyle() override;
QAction *actionOpenTable() override;
QAction *actionOpenFieldCalculator() override;
QAction *actionOpenStatisticalSummary() override;
QAction *actionToggleEditing() override;
QAction *actionSaveActiveLayerEdits() override;
QAction *actionAllEdits() override;
@@ -314,6 +314,13 @@ class GUI_EXPORT QgisInterface : public QObject
virtual QAction *actionPasteLayerStyle() = 0;
virtual QAction *actionOpenTable() = 0;
virtual QAction *actionOpenFieldCalculator() = 0;

/**
* Statistical summary action.
* \since QGIS 3.0
*/
virtual QAction *actionOpenStatisticalSummary() = 0;

virtual QAction *actionToggleEditing() = 0;
virtual QAction *actionSaveActiveLayerEdits() = 0;
virtual QAction *actionAllEdits() = 0;

0 comments on commit d60f00d

Please sign in to comment.
You can’t perform that action at this time.