Skip to content
Permalink
Browse files

Merge pull request #6147 from slarosa/processing_toolbar

[processing][needs-docs] add toolbar to processing toolbox
  • Loading branch information
nyalldawson committed Jan 24, 2018
2 parents 6a2a626 + b49c396 commit e5d00a26abd4d540fe2abbfd902729e56c939a3c
Showing with 38 additions and 1 deletion.
  1. +15 −0 python/plugins/processing/ProcessingPlugin.py
  2. +23 −1 python/plugins/processing/ui/ProcessingToolbox.ui
@@ -203,6 +203,7 @@ def initGui(self):
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')),
@@ -211,6 +212,7 @@ def initGui(self):
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,16 @@ 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("/mActionOptions.svg"),
self.tr('Options'), self.iface.mainWindow())
self.optionsAction.setObjectName('optionsAction')
self.optionsAction.triggered.connect(self.openProcessingOptions)
self.toolbox.processingToolbar.addAction(self.optionsAction)

self.toolbox.processingToolbar.setIconSize(self.iface.iconSize(True))

menuBar = self.iface.mainWindow().menuBar()
menuBar.insertMenu(
@@ -229,6 +241,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 e5d00a2

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