Skip to content
Permalink
Browse files

[processing] add toolbar to toolbox

  • Loading branch information
slarosa committed Jan 23, 2018
1 parent dce341e commit 9c400324e21a0136a6897f74dc21c3a4b0592ce1
Showing with 38 additions and 3 deletions.
  1. +15 −2 python/plugins/processing/ProcessingPlugin.py
  2. +23 −1 python/plugins/processing/ui/ProcessingToolbox.ui
@@ -198,19 +198,21 @@ def initGui(self):

self.modelerAction = QAction(
QgsApplication.getThemeIcon("/processingModel.svg"),
self.tr('Graphical &Modeler...'), self.iface.mainWindow())
self.tr('Graphical &Modeler'), self.iface.mainWindow())
self.modelerAction.setObjectName('modelerAction')
self.modelerAction.triggered.connect(self.openModeler)
self.iface.registerMainWindowAction(self.modelerAction, 'Ctrl+Alt+M')
self.menu.addAction(self.modelerAction)
self.toolbox.processingToolbar.addAction(self.modelerAction)

self.historyAction = QAction(
QIcon(os.path.join(cmd_folder, 'images', 'history.svg')),
self.tr('&History...'), self.iface.mainWindow())
self.tr('&History'), self.iface.mainWindow())
self.historyAction.setObjectName('historyAction')
self.historyAction.triggered.connect(self.openHistory)
self.iface.registerMainWindowAction(self.historyAction, 'Ctrl+Alt+H')
self.menu.addAction(self.historyAction)
self.toolbox.processingToolbar.addAction(self.historyAction)

self.resultsAction = self.resultsDock.toggleViewAction()
self.resultsAction.setObjectName('resultsAction')
@@ -219,6 +221,14 @@ def initGui(self):
self.resultsAction.setText(self.tr('&Results Viewer'))
self.iface.registerMainWindowAction(self.resultsAction, 'Ctrl+Alt+R')
self.menu.addAction(self.resultsAction)
self.toolbox.processingToolbar.addAction(self.resultsAction)

self.optionsAction = QAction(
QgsApplication.getThemeIcon("/processingAlgorithm.svg"),
self.tr('Options'), self.iface.mainWindow())
self.optionsAction.setObjectName('optionsAction')
self.optionsAction.triggered.connect(self.openProcessingOptions)
self.toolbox.processingToolbar.addAction(self.optionsAction)

menuBar = self.iface.mainWindow().menuBar()
menuBar.insertMenu(
@@ -229,6 +239,9 @@ def initGui(self):
initializeMenus()
createMenus()

def openProcessingOptions(self):
self.iface.showOptionsDialog(self.iface.mainWindow(), currentPage='processingOptions')

def unload(self):
self.toolbox.setVisible(False)
self.iface.removeDockWidget(self.toolbox)
@@ -18,9 +18,31 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QToolBar" name="processingToolbar">
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="floatable">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QgsFilterLineEdit" name="searchBox">
<property name="toolTip">

0 comments on commit 9c40032

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