mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-04 00:06:46 -05:00
[processing] renmed setting group from ProcessingQGIS to Processing
This commit is contained in:
parent
1ad2334dbe
commit
2b61f793f9
@ -47,7 +47,7 @@ class VectorWriter:
|
||||
|
||||
if encoding is None:
|
||||
settings = QSettings()
|
||||
encoding = settings.value("/ProcessingQGIS/encoding", "System")
|
||||
encoding = settings.value("/Processing/encoding", "System")
|
||||
|
||||
if self.fileName.startswith(self.MEMORY_LAYER_PREFIX):
|
||||
self.isMemory = True
|
||||
|
||||
@ -57,8 +57,8 @@ class BatchInputSelectionPanel(QtGui.QWidget):
|
||||
path = text
|
||||
elif os.path.isdir(os.path.dirname(text)):
|
||||
path = os.path.dirname(text)
|
||||
elif settings.contains("/ProcessingQGIS/LastInputPath"):
|
||||
path = unicode(settings.value( "/ProcessingQGIS/LastInputPath"))
|
||||
elif settings.contains("/Processing/LastInputPath"):
|
||||
path = unicode(settings.value( "/Processing/LastInputPath"))
|
||||
else:
|
||||
path = ""
|
||||
|
||||
@ -66,10 +66,10 @@ class BatchInputSelectionPanel(QtGui.QWidget):
|
||||
if ret:
|
||||
files = list(ret)
|
||||
if len(files) == 1:
|
||||
settings.setValue("/ProcessingQGIS/LastInputPath", os.path.dirname(unicode(files[0])))
|
||||
settings.setValue("/Processing/LastInputPath", os.path.dirname(unicode(files[0])))
|
||||
self.text.setText(str(files[0]))
|
||||
else:
|
||||
settings.setValue("/ProcessingQGIS/LastInputPath", os.path.dirname(unicode(files[0])))
|
||||
settings.setValue("/Processing/LastInputPath", os.path.dirname(unicode(files[0])))
|
||||
if isinstance(self.param, ParameterMultipleInput):
|
||||
self.text.setText(";".join(unicode(f) for f in files))
|
||||
else:
|
||||
|
||||
@ -52,8 +52,8 @@ class FileSelectionPanel(QtGui.QWidget):
|
||||
path = text
|
||||
elif os.path.isdir( os.path.dirname(text) ):
|
||||
path = os.path.dirname(text)
|
||||
elif settings.contains("/ProcessingQGIS/LastInputPath"):
|
||||
path = settings.value( "/ProcessingQGIS/LastInputPath")
|
||||
elif settings.contains("/Processing/LastInputPath"):
|
||||
path = settings.value( "/Processing/LastInputPath")
|
||||
else:
|
||||
path = ""
|
||||
|
||||
@ -61,12 +61,12 @@ class FileSelectionPanel(QtGui.QWidget):
|
||||
folder = QtGui.QFileDialog.getExistingDirectory(self, "Select folder", path)
|
||||
if folder:
|
||||
self.text.setText(str(folder))
|
||||
settings.setValue("/ProcessingQGIS/LastInputPath", os.path.dirname(unicode(folder)))
|
||||
settings.setValue("/Processing/LastInputPath", os.path.dirname(unicode(folder)))
|
||||
else:
|
||||
filenames = QtGui.QFileDialog.getOpenFileNames(self, "Open file", path, "*.*")
|
||||
if filenames:
|
||||
self.text.setText(u";".join(filenames))
|
||||
settings.setValue("/ProcessingQGIS/LastInputPath", os.path.dirname(unicode(filenames[0])))
|
||||
settings.setValue("/Processing/LastInputPath", os.path.dirname(unicode(filenames[0])))
|
||||
|
||||
def getValue(self):
|
||||
s = unicode(self.text.text())
|
||||
|
||||
@ -52,8 +52,8 @@ class InputLayerSelectorPanel(QtGui.QWidget):
|
||||
path = text
|
||||
elif os.path.isdir( os.path.dirname(text) ):
|
||||
path = os.path.dirname(text)
|
||||
elif settings.contains("/ProcessingQGIS/LastInputPath"):
|
||||
path = unicode(settings.value( "/ProcessingQGIS/LastInputPath"))
|
||||
elif settings.contains("/Processing/LastInputPath"):
|
||||
path = unicode(settings.value( "/Processing/LastInputPath"))
|
||||
else:
|
||||
path = ""
|
||||
|
||||
@ -61,7 +61,7 @@ class InputLayerSelectorPanel(QtGui.QWidget):
|
||||
if filename:
|
||||
self.text.addItem(filename, filename)
|
||||
self.text.setCurrentIndex(self.text.count() - 1)
|
||||
settings.setValue("/ProcessingQGIS/LastInputPath", os.path.dirname(unicode(filename)))
|
||||
settings.setValue("/Processing/LastInputPath", os.path.dirname(unicode(filename)))
|
||||
|
||||
def getValue(self):
|
||||
return self.text.itemData(self.text.currentIndex())
|
||||
|
||||
@ -77,11 +77,11 @@ class OutputSelectionPanel(QWidget):
|
||||
def saveToFile(self):
|
||||
filefilter = self.output.getFileFilter(self.alg)
|
||||
settings = QSettings()
|
||||
if settings.contains("/ProcessingQGIS/LastOutputPath"):
|
||||
path = settings.value( "/ProcessingQGIS/LastOutputPath")
|
||||
if settings.contains("/Processing/LastOutputPath"):
|
||||
path = settings.value( "/Processing/LastOutputPath")
|
||||
else:
|
||||
path = ProcessingConfig.getSetting(ProcessingConfig.OUTPUT_FOLDER)
|
||||
lastEncoding = settings.value("/ProcessingQGIS/encoding", "System")
|
||||
lastEncoding = settings.value("/Processing/encoding", "System")
|
||||
fileDialog = QgsEncodingFileDialog(self, "Save file", path, filefilter, lastEncoding)
|
||||
fileDialog.setFileMode(QFileDialog.AnyFile)
|
||||
fileDialog.setAcceptMode(QFileDialog.AcceptSave)
|
||||
@ -97,8 +97,8 @@ class OutputSelectionPanel(QWidget):
|
||||
if ext:
|
||||
filename = filename + ext.group(1)
|
||||
self.text.setText(filename)
|
||||
settings.setValue("/ProcessingQGIS/LastOutputPath", os.path.dirname(filename))
|
||||
settings.setValue("/ProcessingQGIS/encoding", encoding)
|
||||
settings.setValue("/Processing/LastOutputPath", os.path.dirname(filename))
|
||||
settings.setValue("/Processing/encoding", encoding)
|
||||
|
||||
def getValue(self):
|
||||
filename = unicode(self.text.text())
|
||||
|
||||
@ -42,7 +42,7 @@ from processing.ui.ui_ProcessingToolbox import Ui_ProcessingToolbox
|
||||
|
||||
class ProcessingToolbox(QDockWidget, Ui_ProcessingToolbox):
|
||||
|
||||
USE_CATEGORIES = "/ProcessingQGIS/UseCategories"
|
||||
USE_CATEGORIES = "/Processing/UseSimplifiedInterface"
|
||||
|
||||
def __init__(self):
|
||||
QDockWidget.__init__(self, None)
|
||||
@ -53,7 +53,7 @@ class ProcessingToolbox(QDockWidget, Ui_ProcessingToolbox):
|
||||
self.modeComboBox.addItems(['Simplified interface', 'Advanced interface'])
|
||||
settings = QSettings()
|
||||
if not settings.contains(self.USE_CATEGORIES):
|
||||
settings.setValue(self.USE_CATEGORIES, True)
|
||||
settings.setValue(self.USE_CATEGORIES, False)
|
||||
useCategories = settings.value(self.USE_CATEGORIES, type = bool)
|
||||
if useCategories:
|
||||
self.modeComboBox.setCurrentIndex(0)
|
||||
|
||||
@ -123,7 +123,7 @@ class ScriptEditorDialog(QDialog, Ui_DlgScriptEditor):
|
||||
filterName = self.tr("Python scripts (*.py)")
|
||||
elif self.algType == self.SCRIPT_R:
|
||||
scriptDir = RUtils.RScriptsFolder()
|
||||
filterName = self.tr("SEXTANTE R script (*.rsx)")
|
||||
filterName = self.tr("Processing R script (*.rsx)")
|
||||
|
||||
self.filename = unicode(QFileDialog.getSaveFileName(self,
|
||||
self.tr("Save script"),
|
||||
|
||||
@ -45,7 +45,7 @@ from processing.ui.ui_DlgModeler import Ui_DlgModeler
|
||||
|
||||
class ModelerDialog(QDialog, Ui_DlgModeler):
|
||||
|
||||
USE_CATEGORIES = "/ProcessingQGIS/UseCategories"
|
||||
USE_CATEGORIES = "/Processing/UseSimplifiedInterface"
|
||||
|
||||
def __init__(self, alg=None):
|
||||
QDialog.__init__(self)
|
||||
@ -53,8 +53,6 @@ class ModelerDialog(QDialog, Ui_DlgModeler):
|
||||
self.hasChanged = False
|
||||
self.setupUi(self)
|
||||
|
||||
#self.setWindowFlags(self.windowFlags() | Qt.WindowSystemMenuHint |
|
||||
# Qt.WindowMinMaxButtonsHint)
|
||||
self.tabWidget.setCurrentIndex(0)
|
||||
self.scene = ModelerScene(self)
|
||||
self.scene.setSceneRect(QRectF(0, 0, 4000, 4000))
|
||||
|
||||
@ -67,6 +67,6 @@ class OutputTable(Output):
|
||||
|
||||
if self.encoding is None:
|
||||
settings = QSettings()
|
||||
self.encoding = settings.value("/ProcessingQGIS/encoding", "System")
|
||||
self.encoding = settings.value("/Processing/encoding", "System")
|
||||
|
||||
return TableWriter(self.value, self.encoding, fields)
|
||||
@ -80,7 +80,7 @@ class OutputVector(Output):
|
||||
|
||||
if self.encoding is None:
|
||||
settings = QSettings()
|
||||
self.encoding = settings.value("/ProcessingQGIS/encoding", "System")
|
||||
self.encoding = settings.value("/Processing/encoding", "System")
|
||||
|
||||
w = VectorWriter(self.value, self.encoding, fields, geomType, crs, options)
|
||||
self.memoryLayer = w.memLayer
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user