Skip to content
Permalink
Browse files

[processing] upgrade modeler to make use of qgsdockwidgets

  • Loading branch information
nirvn committed Nov 24, 2016
1 parent 7e0cd9a commit a6ebe830b07c664f07cddf93c16c915e2dcc3ffc
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 a6ebe83

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