Skip to content
Permalink
Browse files

Merge pull request #3800 from nirvn/processing_modeler_panels

[processing] upgrade modeler to make use of qgsdockwidgets
  • Loading branch information
alexbruy committed Nov 24, 2016
2 parents ac721d3 + a6ebe83 commit fdc0a3f874f87f77876eea242a557c69c136cff7
Showing with 280 additions and 105 deletions.
  1. +12 −4 python/plugins/processing/modeler/ModelerDialog.py
  2. +268 −101 python/plugins/processing/ui/DlgModeler.ui
@@ -32,7 +32,7 @@

from qgis.PyQt import uic
from qgis.PyQt.QtCore import Qt, QRectF, QMimeData, QPoint, QPointF, QSettings, QByteArray, QSize, pyqtSignal
from qgis.PyQt.QtWidgets import QGraphicsView, QTreeWidget, QMessageBox, QFileDialog, QTreeWidgetItem, QSizePolicy
from qgis.PyQt.QtWidgets import QGraphicsView, QTreeWidget, QMessageBox, QFileDialog, QTreeWidgetItem, QSizePolicy, QMainWindow
from qgis.PyQt.QtGui import QIcon, QImage, QPainter
from qgis.core import QgsApplication
from qgis.gui import QgsMessageBar
@@ -67,6 +67,17 @@ def __init__(self, alg=None):
self.bar.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
self.centralWidget().layout().insertWidget(0, self.bar)

try:
self.setDockOptions(self.dockOptions() | QMainWindow.GroupedDragging)
except:
pass

self.addDockWidget(Qt.LeftDockWidgetArea, self.propertiesDock)
self.addDockWidget(Qt.LeftDockWidgetArea, self.inputsDock)
self.addDockWidget(Qt.LeftDockWidgetArea, self.algorithmsDock)
self.tabifyDockWidget(self.inputsDock, self.algorithmsDock)
self.inputsDock.raise_()

self.zoom = 1

self.setWindowFlags(Qt.WindowMinimizeButtonHint |
@@ -76,9 +87,7 @@ def __init__(self, alg=None):
settings = QSettings()
self.restoreState(settings.value("/Processing/stateModeler", QByteArray()))
self.restoreGeometry(settings.value("/Processing/geometryModeler", QByteArray()))
self.splitter.restoreState(settings.value("/Processing/stateModelerSplitter", QByteArray()))

self.tabWidget.setCurrentIndex(0)
self.scene = ModelerScene(self)
self.scene.setSceneRect(QRectF(0, 0, self.CANVAS_SIZE, self.CANVAS_SIZE))

@@ -231,7 +240,6 @@ def closeEvent(self, evt):
settings = QSettings()
settings.setValue("/Processing/stateModeler", self.saveState())
settings.setValue("/Processing/geometryModeler", self.saveGeometry())
settings.setValue("/Processing/stateModelerSplitter", self.splitter.saveState())

if self.hasChanged:
ret = QMessageBox.question(

0 comments on commit fdc0a3f

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